mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
Filter out multiple definitions of the same module
This commit is contained in:
parent
13f8837422
commit
460da08a37
@ -96,6 +96,8 @@ PROJECT_OBJECTFILES = ${addprefix $(OBJECTDIR)/,${call oname, $(PROJECT_SOURCEFI
|
|||||||
$(OBJECTDIR):
|
$(OBJECTDIR):
|
||||||
mkdir $@
|
mkdir $@
|
||||||
|
|
||||||
|
uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1)))
|
||||||
|
|
||||||
### Include application makefiles
|
### Include application makefiles
|
||||||
|
|
||||||
ifdef APPS
|
ifdef APPS
|
||||||
@ -125,8 +127,9 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef MODULES
|
ifdef MODULES
|
||||||
MODULESSUBST = ${subst /,-,$(MODULES)}
|
UNIQUEMODULES = $(call uniq,$(MODULES))
|
||||||
MODULEDIRS = ${wildcard ${addprefix $(CONTIKI)/, $(MODULES)}}
|
MODULESSUBST = ${subst /,-,$(UNIQUEMODULES)}
|
||||||
|
MODULEDIRS = ${wildcard ${addprefix $(CONTIKI)/, $(UNIQUEMODULES)}}
|
||||||
MODULEINCLUDES = ${foreach m, $(MODULESSUBST), ${wildcard ${foreach d, $(MODULEDIRS), $(d)/Makefile.$(m)}}}
|
MODULEINCLUDES = ${foreach m, $(MODULESSUBST), ${wildcard ${foreach d, $(MODULEDIRS), $(d)/Makefile.$(m)}}}
|
||||||
-include $(MODULEINCLUDES)
|
-include $(MODULEINCLUDES)
|
||||||
MODULES_SOURCES = ${foreach m, $(MODULESSUBST), $($(m)_src)}
|
MODULES_SOURCES = ${foreach m, $(MODULESSUBST), $($(m)_src)}
|
||||||
|
Loading…
Reference in New Issue
Block a user