PX4-build: cope with relative path in PX4_ROOT
This commit is contained in:
parent
d7b1c69362
commit
856d654601
@ -2,6 +2,14 @@
|
||||
|
||||
ifneq ($(PX4_ROOT),)
|
||||
|
||||
# try to cope with relative paths
|
||||
ifeq ($(wildcard $(PX4_ROOT)/nuttx),)
|
||||
PX4_ROOT := $(shell cd $(SKETCHBOOK)/$(PX4_ROOT) && pwd)
|
||||
endif
|
||||
ifeq ($(wildcard $(PX4_ROOT)/nuttx),)
|
||||
$(error ERROR: PX4_ROOT not set correctly - no nuttx directory found)
|
||||
endif
|
||||
|
||||
PX4_CONFIG_FILE=$(MK_DIR)/PX4/config_px4fmu_APM.mk
|
||||
SKETCHFLAGS=$(SKETCHLIBINCLUDES) -I$(PWD) -DCONFIG_HAL_BOARD=HAL_BOARD_PX4 -DSKETCHNAME="\\\"$(SKETCH)\\\"" -DSKETCH_MAIN=ArduPilot_main
|
||||
PX4_MAKE = make -C $(BUILDROOT) -f $(PX4_ROOT)/makefiles/firmware.mk CONFIG_FILE=$(PWD)/$(PX4_CONFIG_FILE) EXTRADEFINES="$(SKETCHFLAGS) "$(EXTRAFLAGS) APM_MODULE_DIR=$(BUILDROOT) SKETCHBOOK=$(SKETCHBOOK) PX4_ROOT=$(PX4_ROOT)
|
||||
|
Loading…
Reference in New Issue
Block a user