build: added EXTERNAL_SCRIPTS to PX4 build

This commit is contained in:
Andrew Tridgell 2013-01-21 08:22:02 +11:00
parent ffb2924dd4
commit 4200593206

View File

@ -2,20 +2,31 @@
ifneq ($(PX4_ROOT),)
# install rc.APM from the AP_HAL_PX4/scripts directory as /etc/init.d/rc.APM
HAL_PX4_DIR = $(realpath $(MK_DIR)/../libraries/AP_HAL_PX4)
PX4_EXTERNAL_SCRIPTS = $(HAL_PX4_DIR)/scripts/rc.APM~init.d/rc.APM
PX4_EXTERNAL = EXTERNAL_APPS=$(PWD) EXTERNAL_SCRIPTS=$(PX4_EXTERNAL_SCRIPTS)
PX4_MAKE = make -C $(PX4_ROOT) $(PX4_EXTERNAL)
px4:
make -C $(PX4_ROOT) configure_px4fmu
make -C $(PX4_ROOT) EXTERNAL_APPS=$(PWD)
$(PX4_MAKE)
px4-clean: clean
make -C $(PX4_ROOT) EXTERNAL_APPS=$(PWD) clean
make -C $(PX4_ROOT) EXTERNAL_APPS=$(PWD) configure_px4fmu
$(PX4_MAKE) clean
$(PX4_MAKE) configure_px4fmu
px4-upload:
make -C $(PX4_ROOT) EXTERNAL_APPS=$(PWD) upload
$(PX4_MAKE) upload
else
px4:
$(error ERROR: You need to add PX4_ROOT to your config.mk)
px4-clean: px4
px4-upload: px4
endif