1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/Makefile.modules
Joakim Nohlgård a678e868e9 Makefile.include: Move USEMODULE CFLAGS expansion last
Some USEMODULE parts (e.g. defined in ${BOARD}/Makefile.dep) were not
being properly exported to CFLAGS -DMODULE_xxx options.
2016-07-13 16:44:28 +02:00

12 lines
482 B
Makefile

USEMODULE := $(filter-out $(filter-out $(FEATURES_PROVIDED), $(FEATURES_OPTIONAL)), $(sort $(USEMODULE)))
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_'))
REALMODULES = $(filter-out $(PSEUDOMODULES), $(sort $(USEMODULE)))
export BASELIBS += $(REALMODULES:%=$(BINDIR)%.a)
CFLAGS += $(EXTDEFINES)
export USEMODULE