Simplify the PLATFORM/CONFIG handling a little.

This commit is contained in:
px4dev
2013-02-23 22:00:59 -08:00
parent e9f2197bfa
commit 8440e4f709
4 changed files with 13 additions and 14 deletions
+5 -1
View File
@@ -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
+1
View File
@@ -2,6 +2,7 @@
# Makefile for the px4fmu_default configuration
#
CONFIG = px4fmu_default
PLATFORM = px4fmu
SRCS = $(PX4_BASE)/platforms/empty.c
+1
View File
@@ -2,6 +2,7 @@
# Makefile for the px4io_default configuration
#
CONFIG = px4io_default
PLATFORM = px4io
SRCS = $(PX4_BASE)/platforms/empty.c