build: added makefile wrappers for px4 or AVR build

This commit is contained in:
Andrew Tridgell 2013-01-02 17:28:09 +11:00
parent 2fe77fa6fa
commit af647650c5
2 changed files with 42 additions and 0 deletions

28
mk/apm.mk Normal file
View 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
View 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