diff --git a/make/apps-defs.mk b/make/apps-defs.mk index a54472188..3e2c86b37 100644 --- a/make/apps-defs.mk +++ b/make/apps-defs.mk @@ -106,10 +106,8 @@ SRC += $(foreach mod, $(OPTMODULES), $(wildcard $(OPMODULEDIR)/$(mod)/*.c)) # Declare all non-optional modules as built-in to force inclusion. # Built-in modules are always enabled and cannot be disabled. -# Module name 'ModuleName' or board-specific 'ModuleName/revolution' will be -# normalized to 'ModuleName' and defined as '-DMODULE_MODULENAME_BUILTIN' -MODNAMES := $(foreach mod,$(MODULES),$(firstword $(subst /, ,$(mod)))) -MODULES_BUILTIN := $(foreach mod,$(MODNAMES),-DMODULE_$(shell $(ECHO) $(mod) | tr '[:lower:]' '[:upper:]')_BUILTIN) +MODNAMES := $(notdir $(subst /revolution,,$(MODULES))) +MODULES_BUILTIN := $(foreach mod, $(MODNAMES), -DMODULE_$(shell $(ECHO) $(mod) | tr '[:lower:]' '[:upper:]')_BUILTIN) CDEFS += $(MODULES_BUILTIN) # List C source files here which must be compiled in ARM-Mode (no -mthumb).