1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #5622 from gebart/pr/makefile-usemodule-fix

Makefile.include: Move USEMODULE CFLAGS expansion last
This commit is contained in:
Kaspar Schleiser 2016-07-14 13:15:55 +02:00 committed by GitHub
commit da1e364ef6
2 changed files with 10 additions and 7 deletions

View File

@ -176,8 +176,14 @@ export PREFIX ?= $(if $(TARGET_ARCH),$(TARGET_ARCH)-)
# Import all toolchain settings
include $(RIOTCPU)/Makefile.include.$(TOOLCHAIN)
# Add standard include directories
INCLUDES += -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/sys/include
INCLUDES += -I$(RIOTCPU)/$(CPU)/include
INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include
# mandatory includes!
include $(RIOTBASE)/Makefile.modules
include $(RIOTBASE)/Makefile.pseudomodules
include $(RIOTBASE)/Makefile.defaultmodules
include $(RIOTBOARD)/$(BOARD)/Makefile.include
include $(RIOTCPU)/$(CPU)/Makefile.include
@ -492,6 +498,9 @@ include $(RIOTBASE)/dist/tools/desvirt/Makefile.desvirt
# include bindist target
include $(RIOTBASE)/Makefile.bindist
# Add all USEMODULE modules to CFLAGS
include $(RIOTBASE)/Makefile.modules
# Build a header file with all common macro definitions and undefinitions
# make it phony to force re-run of the script every time even if the file exists
# The script will only touch the file if anything has changed since last time.

View File

@ -1,11 +1,5 @@
include $(RIOTBASE)/Makefile.pseudomodules
include $(RIOTBASE)/Makefile.defaultmodules
USEMODULE := $(filter-out $(filter-out $(FEATURES_PROVIDED), $(FEATURES_OPTIONAL)), $(sort $(USEMODULE)))
INCLUDES += -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/sys/include
INCLUDES += -I$(RIOTCPU)/$(CPU)/include
INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include
ED = $(addprefix FEATURE_,$(sort $(filter $(FEATURES_PROVIDED), $(FEATURES_REQUIRED))))
ED += $(addprefix MODULE_,$(sort $(USEMODULE) $(USEPKG)))
EXTDEFINES = $(addprefix -D,$(shell echo '$(ED)' | tr 'a-z-' 'A-Z_'))