1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/makefiles/modules.inc.mk
Gaëtan Harter 8d58e3bf91
makefiles/modules.inc.mk: refactor, do not overwrite NO_PSEUDOMODULES
Refactor to define REALMODULES incrementally without overwriting
'NO_PSEUDOMODULES'.

This also allows an external makefile to maybe add something there if it really
needs to.
2019-03-05 16:04:20 +01:00

12 lines
486 B
Makefile

_ALLMODULES = $(sort $(USEMODULE) $(USEPKG))
# Define MODULE_MODULE_NAME preprocessor macros for all modules.
ED = $(addprefix MODULE_,$(_ALLMODULES))
EXTDEFINES = $(addprefix -D,$(shell echo '$(ED)' | tr 'a-z-' 'A-Z_'))
CFLAGS += $(EXTDEFINES)
# filter "pseudomodules" from "real modules", but not "no_pseudomodules"
REALMODULES += $(filter-out $(PSEUDOMODULES), $(_ALLMODULES))
REALMODULES += $(filter $(NO_PSEUDOMODULES), $(_ALLMODULES))
BASELIBS += $(REALMODULES:%=$(BINDIR)/%.a)