mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
41d10cf005
Do not remove the '-D' and '-U' values from CFLAGS. This prevents issues where a '-D' could contain a space. Some values way be duplicated from the 'riotbuild.h' header and the command line but with the same value so without conflict. To not put too many things in the command line, the -DMODULE_NAME are only put in CFLAGS_WITH_MACROS. Also, as now, the deferred value of CFLAGS is used for 'riotbuild.h', macros set after the inclusion of `Makefile.include` will be taken into account.
12 lines
509 B
Makefile
12 lines
509 B
Makefile
_ALLMODULES = $(sort $(USEMODULE) $(USEPKG))
|
|
|
|
# Define MODULE_MODULE_NAME preprocessor macros for all modules.
|
|
ED = $(addprefix MODULE_,$(_ALLMODULES))
|
|
# EXTDEFINES will be put in CFLAGS_WITH_MACROS
|
|
EXTDEFINES = $(addprefix -D,$(shell echo '$(ED)' | tr 'a-z-' 'A-Z_'))
|
|
|
|
# filter "pseudomodules" from "real modules", but not "no_pseudomodules"
|
|
REALMODULES += $(filter-out $(PSEUDOMODULES), $(_ALLMODULES))
|
|
REALMODULES += $(filter $(NO_PSEUDOMODULES), $(_ALLMODULES))
|
|
BASELIBS += $(REALMODULES:%=$(BINDIR)/%.a)
|