mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-21 11:54:15 +01:00
Makefile: better solution for MODULE_MODULENAME_BUILTIN name conversion
Now it does not depend on board-specific part and uses module canonical name. +review OPReview-422
This commit is contained in:
parent
9424be584c
commit
5d760d20fa
@ -106,8 +106,10 @@ SRC += $(foreach mod, $(OPTMODULES), $(wildcard $(OPMODULEDIR)/$(mod)/*.c))
|
|||||||
|
|
||||||
# Declare all non-optional modules as built-in to force inclusion.
|
# Declare all non-optional modules as built-in to force inclusion.
|
||||||
# Built-in modules are always enabled and cannot be disabled.
|
# Built-in modules are always enabled and cannot be disabled.
|
||||||
MODNAMES := $(notdir $(subst /revolution,,$(MODULES)))
|
# Module name 'ModuleName' or board-specific 'ModuleName/revolution' will be
|
||||||
MODULES_BUILTIN := $(foreach mod, $(MODNAMES), -DMODULE_$(shell $(ECHO) $(mod) | tr '[:lower:]' '[:upper:]')_BUILTIN)
|
# 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)
|
||||||
CDEFS += $(MODULES_BUILTIN)
|
CDEFS += $(MODULES_BUILTIN)
|
||||||
|
|
||||||
# List C source files here which must be compiled in ARM-Mode (no -mthumb).
|
# List C source files here which must be compiled in ARM-Mode (no -mthumb).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user