aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2013-08-23 00:23:32 -0700
committerpx4dev <px4@purgatory.org>2013-08-23 00:23:32 -0700
commit54711bbcfe52fe33c213b9e15a1da9ad978d3535 (patch)
treec71a1b8b3c7c8bb0a8b18d839e5b20fd40872782 /Makefile
parentf70a4b3b7045a24baf70e642e9a354a13e5fa7d1 (diff)
downloadpx4-firmware-54711bbcfe52fe33c213b9e15a1da9ad978d3535.tar.gz
px4-firmware-54711bbcfe52fe33c213b9e15a1da9ad978d3535.tar.bz2
px4-firmware-54711bbcfe52fe33c213b9e15a1da9ad978d3535.zip
In order to save people from themselves, force a given FMU version to depend on the corresponding _default IO version. This avoids the risk of building a new FMU ROMFS with an old IO firmware, at the cost of the sanity of anyone reading this.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index c34945eca..cbf0da6c9 100644
--- a/Makefile
+++ b/Makefile
@@ -122,6 +122,19 @@ $(FIRMWARES): $(BUILD_DIR)%.build/firmware.px4:
$(FIRMWARE_GOAL)
#
+# Make FMU firmwares depend on pre-packaged IO binaries.
+#
+# This is a pretty vile hack, since it hard-codes knowledge of the FMU->IO dependency
+# and forces the _default config in all cases. There has to be a better way to do this...
+#
+FMU_VERSION = $(patsubst px4fmu-%,%,$(word 1, $(subst _, ,$(1))))
+define FMU_DEP
+$(BUILD_DIR)$(1).build/firmware.px4: $(IMAGE_DIR)px4io-$(call FMU_VERSION,$(1))_default.px4
+endef
+FMU_CONFIGS := $(filter px4fmu%,$(CONFIGS))
+$(foreach config,$(FMU_CONFIGS),$(eval $(call FMU_DEP,$(config))))
+
+#
# Build the NuttX export archives.
#
# Note that there are no explicit dependencies extended from these