mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-19 09:54:15 +01:00
Revert "Makefile: better solution for MODULE_MODULENAME_BUILTIN name conversion"
The problem is that we have modules defined as: Airspeed or Airspeed/revolution or Extensions/MagBaro and, probably Extensions/MagBaro/revolution can be expected too. It is impossible to get module name from such mixed cases. So the better solution does not work for MagBaro, reverted. This reverts commit 5d760d20fa7124815f27f1a1f5551534676ec2e0. +review OPReview-422
This commit is contained in:
parent
5d760d20fa
commit
927977216b
@ -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).
|
||||
|
Loading…
x
Reference in New Issue
Block a user