mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-03 12:14:10 -04:00
build: added makefile wrappers for px4 or AVR build
This commit is contained in:
parent
2fe77fa6fa
commit
af647650c5
28
mk/apm.mk
Normal file
28
mk/apm.mk
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# find the mk/ directory, which is where this makefile fragment
|
||||||
|
# lives
|
||||||
|
MK_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
|
||||||
|
|
||||||
|
ifeq ($(APPDIR),)
|
||||||
|
|
||||||
|
####################
|
||||||
|
# AVR and SITL build
|
||||||
|
|
||||||
|
|
||||||
|
include $(MK_DIR)/Arduino.mk
|
||||||
|
include $(MK_DIR)/targets.mk
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
####################
|
||||||
|
# PX4 build
|
||||||
|
APPNAME = ArduPlane
|
||||||
|
PRIORITY = SCHED_PRIORITY_DEFAULT
|
||||||
|
STACKSIZE = 4096
|
||||||
|
|
||||||
|
SKETCHBOOK=..
|
||||||
|
include $(APPDIR)/mk/apm.mk
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
# these targets need to be outside the APPDIR if above
|
||||||
|
include $(MK_DIR)/px4_targets.mk
|
14
mk/px4_targets.mk
Normal file
14
mk/px4_targets.mk
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# PX4 build is via external build system
|
||||||
|
|
||||||
|
ifneq ($(PX4_ROOT),)
|
||||||
|
|
||||||
|
px4:
|
||||||
|
make -C $(PX4_ROOT) EXTERNAL_APPS=$(PWD)
|
||||||
|
|
||||||
|
px4-clean:
|
||||||
|
make -C $(PX4_ROOT) EXTERNAL_APPS=$(PWD) clean
|
||||||
|
|
||||||
|
px4-upload:
|
||||||
|
make -C $(PX4_ROOT) EXTERNAL_APPS=$(PWD) upload
|
||||||
|
|
||||||
|
endif
|
Loading…
Reference in New Issue
Block a user