mirror of https://github.com/ArduPilot/ardupilot
build: fixed dependency on frame type in make target
This commit is contained in:
parent
2c0699c9ed
commit
24b481ac0d
|
@ -56,7 +56,7 @@ module_mk:
|
|||
$(v) cmp $(SKETCHBOOK)/module.mk $(SKETCHBOOK)/module.mk.new 2>/dev/null || mv $(SKETCHBOOK)/module.mk.new $(SKETCHBOOK)/module.mk
|
||||
$(v) rm -f $(SKETCHBOOK)/module.mk.new
|
||||
|
||||
px4-v1: showflags $(PX4_ROOT)/Archives/px4fmu-v1.export $(SKETCHCPP) module_mk px4-io-v1
|
||||
px4-v1: $(BUILDROOT)/make.flags $(PX4_ROOT)/Archives/px4fmu-v1.export $(SKETCHCPP) module_mk px4-io-v1
|
||||
$(RULEHDR)
|
||||
$(v) rm -f $(PX4_ROOT)/makefiles/$(PX4_V1_CONFIG_FILE)
|
||||
$(v) cp $(PWD)/$(PX4_V1_CONFIG_FILE) $(PX4_ROOT)/makefiles/
|
||||
|
@ -65,7 +65,7 @@ px4-v1: showflags $(PX4_ROOT)/Archives/px4fmu-v1.export $(SKETCHCPP) module_mk p
|
|||
$(v) cp $(PX4_ROOT)/Images/px4fmu-v1_APM.px4 $(SKETCH)-v1.px4
|
||||
$(v) echo "PX4 $(SKETCH) Firmware is in $(SKETCH)-v1.px4"
|
||||
|
||||
px4-v2: showflags $(PX4_ROOT)/Archives/px4fmu-v2.export $(SKETCHCPP) module_mk px4-io-v2
|
||||
px4-v2: $(BUILDROOT)/make.flags $(PX4_ROOT)/Archives/px4fmu-v2.export $(SKETCHCPP) module_mk px4-io-v2
|
||||
$(RULEHDR)
|
||||
$(v) rm -f $(PX4_ROOT)/makefiles/$(PX4_V2_CONFIG_FILE)
|
||||
$(v) cp $(PWD)/$(PX4_V2_CONFIG_FILE) $(PX4_ROOT)/makefiles/
|
||||
|
|
|
@ -63,15 +63,19 @@ else
|
|||
v =
|
||||
endif
|
||||
|
||||
showflags:
|
||||
@echo "HAL_BOARD=$(HAL_BOARD) HAL_BOARD_SUBTYPE=$(HAL_BOARD_SUBTYPE) TOOLCHAIN=$(TOOLCHAIN) EXTRAFLAGS=$(EXTRAFLAGS)"
|
||||
.PHONY: $(BUILDROOT)/make.flags
|
||||
$(BUILDROOT)/make.flags:
|
||||
@mkdir -p $(BUILDROOT)
|
||||
@echo "// BUILDROOT=$(BUILDROOT) HAL_BOARD=$(HAL_BOARD) HAL_BOARD_SUBTYPE=$(HAL_BOARD_SUBTYPE) TOOLCHAIN=$(TOOLCHAIN) EXTRAFLAGS=$(EXTRAFLAGS)" > $(BUILDROOT)/make.flags
|
||||
@cat $(BUILDROOT)/make.flags
|
||||
|
||||
#
|
||||
# Build the sketch.cpp file
|
||||
$(SKETCHCPP): showflags $(SKETCHCPP_SRC)
|
||||
$(SKETCHCPP): $(BUILDROOT)/make.flags $(SKETCHCPP_SRC)
|
||||
@echo "building $(SKETCHCPP)"
|
||||
$(RULEHDR)
|
||||
$(v)$(AWK) -v mode=header '$(SKETCH_SPLITTER)' $(SKETCHCPP_SRC) > $@.new
|
||||
$(v)cat $(BUILDROOT)/make.flags > $@.new
|
||||
$(v)$(AWK) -v mode=header '$(SKETCH_SPLITTER)' $(SKETCHCPP_SRC) >> $@.new
|
||||
$(v)echo "#line 1 \"autogenerated\"" >> $@.new
|
||||
$(v)$(AWK) '$(SKETCH_PROTOTYPER)' $(SKETCHCPP_SRC) >> $@.new
|
||||
$(v)$(AWK) -v mode=body '$(SKETCH_SPLITTER)' $(SKETCHCPP_SRC) >> $@.new
|
||||
|
|
|
@ -47,7 +47,7 @@ empty: all
|
|||
%-obc: EXTRAFLAGS += "-DOBC_FAILSAFE=ENABLED "
|
||||
|
||||
# cope with copter and hil targets
|
||||
FRAMES = quad tri hexa y6 octa octa-quad heli single
|
||||
FRAMES = quad tri hexa y6 octa octa-quad heli single obc
|
||||
BOARDS = apm1 apm2 apm2beta apm1-1280 px4 px4-v1 px4-v2 sitl flymaple linux vrbrain vrbrain-v40 vrbrain-v45 vrbrainv-50 vrbrain-v51 vrubrain-v51 vrhero-v10 erle pxf
|
||||
|
||||
define frame_template
|
||||
|
@ -55,8 +55,9 @@ $(1)-$(2) : EXTRAFLAGS += "-DFRAME_CONFIG=$(shell echo $(2) | tr a-z A-Z | sed s
|
|||
$(1)-$(2) : $(1)
|
||||
$(1)-$(2)-hil : $(1)-$(2)
|
||||
$(1)-$(2)-hilsensors : $(1)-$(2)
|
||||
$(1)-$(2)-upload : $(1)-$(2)
|
||||
$(1)-$(2)-upload : $(1)-upload
|
||||
$(1)-hil : $(1)
|
||||
$(1)-obc : $(1)
|
||||
$(1)-hilsensors : $(1)
|
||||
endef
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ module_mk:
|
|||
$(v) cmp $(SKETCHBOOK)/module.mk $(SKETCHBOOK)/module.mk.new 2>/dev/null || mv $(SKETCHBOOK)/module.mk.new $(SKETCHBOOK)/module.mk
|
||||
$(v) rm -f $(SKETCHBOOK)/module.mk.new
|
||||
|
||||
vrbrain-v40: showflags $(VRBRAIN_ROOT)/Archives/vrbrain-v40.export $(SKETCHCPP) module_mk
|
||||
vrbrain-v40: $(BUILDROOT)/make.flags $(VRBRAIN_ROOT)/Archives/vrbrain-v40.export $(SKETCHCPP) module_mk
|
||||
$(RULEHDR)
|
||||
$(v) rm -f $(VRBRAIN_ROOT)/makefiles/$(VRBRAIN_VB40_CONFIG_FILE)
|
||||
$(v) cp $(VRBRAIN_MK_DIR)/$(VRBRAIN_VB40_CONFIG_FILE) $(VRBRAIN_ROOT)/makefiles/
|
||||
|
@ -72,7 +72,7 @@ vrbrain-v40: showflags $(VRBRAIN_ROOT)/Archives/vrbrain-v40.export $(SKETCHCPP)
|
|||
$(v) cp $(VRBRAIN_ROOT)/Images/vrbrain-v40_APM.bin $(SKETCH)-vrbrain-v40.bin
|
||||
$(v) echo "VRBRAIN $(SKETCH) Firmware is in $(SKETCH)-vrbrain-v40.vrx"
|
||||
|
||||
vrbrain-v45: showflags $(VRBRAIN_ROOT)/Archives/vrbrain-v45.export $(SKETCHCPP) module_mk
|
||||
vrbrain-v45: $(BUILDROOT)/make.flags $(VRBRAIN_ROOT)/Archives/vrbrain-v45.export $(SKETCHCPP) module_mk
|
||||
$(RULEHDR)
|
||||
$(v) rm -f $(VRBRAIN_ROOT)/makefiles/$(VRBRAIN_VB45_CONFIG_FILE)
|
||||
$(v) cp $(VRBRAIN_MK_DIR)/$(VRBRAIN_VB45_CONFIG_FILE) $(VRBRAIN_ROOT)/makefiles/
|
||||
|
@ -86,7 +86,7 @@ vrbrain-v45: showflags $(VRBRAIN_ROOT)/Archives/vrbrain-v45.export $(SKETCHCPP)
|
|||
$(v) cp $(VRBRAIN_ROOT)/Images/vrbrain-v45_APM.bin $(SKETCH)-vrbrain-v45.bin
|
||||
$(v) echo "VRBRAIN $(SKETCH) Firmware is in $(SKETCH)-vrbrain-v45.vrx"
|
||||
|
||||
vrbrain-v50: showflags $(VRBRAIN_ROOT)/Archives/vrbrain-v50.export $(SKETCHCPP) module_mk
|
||||
vrbrain-v50: $(BUILDROOT)/make.flags $(VRBRAIN_ROOT)/Archives/vrbrain-v50.export $(SKETCHCPP) module_mk
|
||||
$(RULEHDR)
|
||||
$(v) rm -f $(VRBRAIN_ROOT)/makefiles/$(VRBRAIN_VB50_CONFIG_FILE)
|
||||
$(v) cp $(VRBRAIN_MK_DIR)/$(VRBRAIN_VB50_CONFIG_FILE) $(VRBRAIN_ROOT)/makefiles/
|
||||
|
@ -100,7 +100,7 @@ vrbrain-v50: showflags $(VRBRAIN_ROOT)/Archives/vrbrain-v50.export $(SKETCHCPP)
|
|||
$(v) cp $(VRBRAIN_ROOT)/Images/vrbrain-v50_APM.bin $(SKETCH)-vrbrain-v50.bin
|
||||
$(v) echo "VRBRAIN $(SKETCH) Firmware is in $(SKETCH)-vrbrain-v50.vrx"
|
||||
|
||||
vrbrain-v51: showflags $(VRBRAIN_ROOT)/Archives/vrbrain-v51.export $(SKETCHCPP) module_mk
|
||||
vrbrain-v51: $(BUILDROOT)/make.flags $(VRBRAIN_ROOT)/Archives/vrbrain-v51.export $(SKETCHCPP) module_mk
|
||||
$(RULEHDR)
|
||||
$(v) rm -f $(VRBRAIN_ROOT)/makefiles/$(VRBRAIN_VB51_CONFIG_FILE)
|
||||
$(v) cp $(VRBRAIN_MK_DIR)/$(VRBRAIN_VB51_CONFIG_FILE) $(VRBRAIN_ROOT)/makefiles/
|
||||
|
@ -114,7 +114,7 @@ vrbrain-v51: showflags $(VRBRAIN_ROOT)/Archives/vrbrain-v51.export $(SKETCHCPP)
|
|||
$(v) cp $(VRBRAIN_ROOT)/Images/vrbrain-v51_APM.bin $(SKETCH)-vrbrain-v51.bin
|
||||
$(v) echo "VRBRAIN $(SKETCH) Firmware is in $(SKETCH)-vrbrain-v51.vrx"
|
||||
|
||||
vrubrain-v51: showflags $(VRBRAIN_ROOT)/Archives/vrubrain-v51.export $(SKETCHCPP) module_mk
|
||||
vrubrain-v51: $(BUILDROOT)/make.flags $(VRBRAIN_ROOT)/Archives/vrubrain-v51.export $(SKETCHCPP) module_mk
|
||||
$(RULEHDR)
|
||||
$(v) rm -f $(VRBRAIN_ROOT)/makefiles/$(VRBRAIN_VU51_CONFIG_FILE)
|
||||
$(v) cp $(VRBRAIN_MK_DIR)/$(VRBRAIN_VU51_CONFIG_FILE) $(VRBRAIN_ROOT)/makefiles/
|
||||
|
@ -128,7 +128,7 @@ vrubrain-v51: showflags $(VRBRAIN_ROOT)/Archives/vrubrain-v51.export $(SKETCHCPP
|
|||
$(v) cp $(VRBRAIN_ROOT)/Images/vrubrain-v51_APM.bin $(SKETCH)-vrubrain-v51.bin
|
||||
$(v) echo "MICRO VRBRAIN $(SKETCH) Firmware is in $(SKETCH)-vrubrain-v51.vrx"
|
||||
|
||||
vrhero-v10: showflags $(VRBRAIN_ROOT)/Archives/vrhero-v10.export $(SKETCHCPP) module_mk
|
||||
vrhero-v10: $(BUILDROOT)/make.flags $(VRBRAIN_ROOT)/Archives/vrhero-v10.export $(SKETCHCPP) module_mk
|
||||
$(RULEHDR)
|
||||
$(v) rm -f $(VRBRAIN_ROOT)/makefiles/$(VRBRAIN_VH10_CONFIG_FILE)
|
||||
$(v) cp $(VRBRAIN_MK_DIR)/$(VRBRAIN_VH10_CONFIG_FILE) $(VRBRAIN_ROOT)/makefiles/
|
||||
|
|
Loading…
Reference in New Issue