From 5453523933e6d0c6535e1f9160ec2e98788da3a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Tue, 5 Mar 2019 15:57:13 +0100 Subject: [PATCH] makefiles/modules.inc.mk: group CFLAGS handling Put all lines related to CFLAGS handling together. --- makefiles/modules.inc.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/makefiles/modules.inc.mk b/makefiles/modules.inc.mk index 9d2f289bae..f02218f35d 100644 --- a/makefiles/modules.inc.mk +++ b/makefiles/modules.inc.mk @@ -1,11 +1,11 @@ _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" NO_PSEUDOMODULES := $(filter $(NO_PSEUDOMODULES), $(_ALLMODULES)) REALMODULES = $(filter-out $(PSEUDOMODULES), $(_ALLMODULES)) $(NO_PSEUDOMODULES) BASELIBS += $(REALMODULES:%=$(BINDIR)/%.a) - -CFLAGS += $(EXTDEFINES)