diff options
author | px4dev <px4@purgatory.org> | 2013-01-16 22:38:47 -0800 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2013-02-23 22:00:59 -0800 |
commit | 8440e4f70907e87661e295f1585208620d68b84e (patch) | |
tree | 5c47927a0acce504bec96bb8158fe5949e4ce6bb /makefiles | |
parent | e9f2197bfa40522d6a58e01888dada4531d9dbcf (diff) | |
download | px4-firmware-8440e4f70907e87661e295f1585208620d68b84e.tar.gz px4-firmware-8440e4f70907e87661e295f1585208620d68b84e.tar.bz2 px4-firmware-8440e4f70907e87661e295f1585208620d68b84e.zip |
Simplify the PLATFORM/CONFIG handling a little.
Diffstat (limited to 'makefiles')
-rw-r--r-- | makefiles/firmware.mk | 6 | ||||
-rw-r--r-- | makefiles/px4fmu_default.mk | 1 | ||||
-rw-r--r-- | makefiles/px4io_default.mk | 1 |
3 files changed, 7 insertions, 1 deletions
diff --git a/makefiles/firmware.mk b/makefiles/firmware.mk index c85c5c919..cde646036 100644 --- a/makefiles/firmware.mk +++ b/makefiles/firmware.mk @@ -74,11 +74,15 @@ RMDIR = rm -rf # # Sanity-check the PLATFORM variable and then get the platform config. +# If PLATFORM is not set, but CONFIG is, use that. # # The platform config in turn will fetch the toolchain configuration. # ifeq ($(PLATFORM),) -$(error The PLATFORM variable must be set before including firmware.mk) +ifeq ($(CONFIG),) +$(error At least one of the PLATFORM or CONFIG variables must be set before including firmware.mk) +endif +PLATFORM := $(firstword $(subst _, ,$(CONFIG))) endif include $(PX4_MK_INCLUDE)/$(PLATFORM).mk diff --git a/makefiles/px4fmu_default.mk b/makefiles/px4fmu_default.mk index 9bb5e09a4..6f7eaa41d 100644 --- a/makefiles/px4fmu_default.mk +++ b/makefiles/px4fmu_default.mk @@ -2,6 +2,7 @@ # Makefile for the px4fmu_default configuration # +CONFIG = px4fmu_default PLATFORM = px4fmu SRCS = $(PX4_BASE)/platforms/empty.c diff --git a/makefiles/px4io_default.mk b/makefiles/px4io_default.mk index e961e46f7..d4f43d701 100644 --- a/makefiles/px4io_default.mk +++ b/makefiles/px4io_default.mk @@ -2,6 +2,7 @@ # Makefile for the px4io_default configuration # +CONFIG = px4io_default PLATFORM = px4io SRCS = $(PX4_BASE)/platforms/empty.c |