From af647650c5dbb642caa62d50d0e67e83b6c1e949 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 2 Jan 2013 17:28:09 +1100 Subject: [PATCH] build: added makefile wrappers for px4 or AVR build --- mk/apm.mk | 28 ++++++++++++++++++++++++++++ mk/px4_targets.mk | 14 ++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 mk/apm.mk create mode 100644 mk/px4_targets.mk diff --git a/mk/apm.mk b/mk/apm.mk new file mode 100644 index 0000000000..263b58a48d --- /dev/null +++ b/mk/apm.mk @@ -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 diff --git a/mk/px4_targets.mk b/mk/px4_targets.mk new file mode 100644 index 0000000000..8a5446d4c3 --- /dev/null +++ b/mk/px4_targets.mk @@ -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