aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2013-01-16 22:38:47 -0800
committerpx4dev <px4@purgatory.org>2013-02-23 22:00:59 -0800
commit8440e4f70907e87661e295f1585208620d68b84e (patch)
tree5c47927a0acce504bec96bb8158fe5949e4ce6bb /Makefile
parente9f2197bfa40522d6a58e01888dada4531d9dbcf (diff)
downloadpx4-firmware-8440e4f70907e87661e295f1585208620d68b84e.tar.gz
px4-firmware-8440e4f70907e87661e295f1585208620d68b84e.tar.bz2
px4-firmware-8440e4f70907e87661e295f1585208620d68b84e.zip
Simplify the PLATFORM/CONFIG handling a little.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 6 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index bcbe6b790..20a23b3f1 100644
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,11 @@ RMDIR = rm -rf
CONFIGS ?= px4fmu_default px4io_default
#
+# Platforms (boards) that we build NuttX export kits for.
+#
+PLATFORMS = px4fmu px4io
+
+#
# If the user has listed a config as a target, strip it out and override CONFIGS
#
EXPLICIT_CONFIGS := $(filter $(CONFIGS),$(MAKECMDGOALS))
@@ -40,16 +45,6 @@ $(EXPLICIT_CONFIGS): all
endif
#
-# Platforms (boards) that we build prelink kits for.
-#
-PLATFORMS = px4fmu px4io
-
-#
-# Some handy macros
-#
-PLATFORM_FROM_CONFIG = $(word 1,$(subst _, ,$1))
-
-#
# Built products
#
STAGED_FIRMWARES = $(foreach config,$(CONFIGS),$(IMAGE_DIR)/$(config).px4)
@@ -72,7 +67,7 @@ $(STAGED_FIRMWARES): $(IMAGE_DIR)/%.px4: $(BUILD_DIR)/%.build/firmware.px4
$(Q) $(COPY) $< $@
#
-# Generate FIRMWARES
+# Generate FIRMWARES.
#
$(BUILD_DIR)/%.build/firmware.px4: config = $(patsubst $(BUILD_DIR)/%.build/firmware.px4,%,$@)
$(BUILD_DIR)/%.build/firmware.px4: work_dir = $(BUILD_DIR)/$(config).build
@@ -81,8 +76,6 @@ $(FIRMWARES): $(BUILD_DIR)/%.build/firmware.px4:
$(Q) mkdir -p $(work_dir)
$(Q) make -C $(work_dir) \
-f $(PX4_BASE)/makefiles/$(config).mk \
- CONFIG=$(config) \
- PLATFORM=$(call PLATFORM_FROM_CONFIG,$(config)) \
WORK_DIR=$(work_dir)
#