2019-03-05 15:48:28 +01:00
|
|
|
_ALLMODULES = $(sort $(USEMODULE) $(USEPKG))
|
|
|
|
|
2019-03-05 15:57:13 +01:00
|
|
|
# Define MODULE_MODULE_NAME preprocessor macros for all modules.
|
2019-11-01 16:38:10 +01:00
|
|
|
# Note: Some modules may be using the 'IS_USED' macro, defined in
|
|
|
|
# kernel_defines.h, please refer to its documentation if you change the way
|
|
|
|
# module macros are defined.
|
2019-03-05 15:48:28 +01:00
|
|
|
ED = $(addprefix MODULE_,$(_ALLMODULES))
|
2019-09-17 15:39:26 +02:00
|
|
|
# EXTDEFINES will be put in CFLAGS_WITH_MACROS
|
2019-08-29 14:20:25 +02:00
|
|
|
EXTDEFINES = $(addprefix -D,$(call uppercase_and_underscore,$(ED)))
|
2017-03-22 19:32:29 +01:00
|
|
|
|
|
|
|
# filter "pseudomodules" from "real modules", but not "no_pseudomodules"
|
2019-03-05 15:59:35 +01:00
|
|
|
REALMODULES += $(filter-out $(PSEUDOMODULES), $(_ALLMODULES))
|
|
|
|
REALMODULES += $(filter $(NO_PSEUDOMODULES), $(_ALLMODULES))
|
2020-08-10 14:45:39 +02:00
|
|
|
BASELIBS += $(REALMODULES:%=%.module)
|
2020-09-01 17:09:57 +02:00
|
|
|
|
|
|
|
# Add modules compiled with Makefile.base and extra archives
|
|
|
|
GENERATED_MODULES = $(notdir $(shell find $(BINDIR) -type d)) $(basename $(notdir $(ARCHIVES)))
|
|
|
|
|
|
|
|
NON_GENERATED_MODULES = $(filter-out $(GENERATED_MODULES),$(REALMODULES))
|