mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
makefiles: Add an APPLICATION_MODULE variable
Set the application module name with APPLICATION_MODULE. The default module name is "application_$(APPLICATION)". This should fix name conflicts where an application/test has the same name as an existing module and so both write to the same archive.
This commit is contained in:
parent
f1f079fb0e
commit
d724e71a26
@ -292,8 +292,12 @@ ifeq ($(origin RIOT_VERSION), undefined)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Set module by prepending APPLICATION name with 'application_'.
|
||||
# It prevents conflict with application and modules with the same name.
|
||||
APPLICATION_MODULE ?= application_$(APPLICATION)
|
||||
|
||||
# the binaries to link
|
||||
BASELIBS += $(BINDIR)/${APPLICATION}.a
|
||||
BASELIBS += $(BINDIR)/$(APPLICATION_MODULE).a
|
||||
BASELIBS += $(APPDEPS)
|
||||
|
||||
.PHONY: all link clean flash term doc debug debug-server reset objdump help info-modules
|
||||
|
@ -22,8 +22,8 @@ QUIET ?= 1
|
||||
# to flag that the directory should only be included when doing a normal build,
|
||||
# and that the resulting .a should be saved when doing "make bindist"
|
||||
BIN_DIRS += abc
|
||||
BIN_USEMODULE += abc # include "abc" module
|
||||
BIN_USEMODULE += bindist # include application module (named $APPLICATION)
|
||||
BIN_USEMODULE += abc # include "abc" module
|
||||
BIN_USEMODULE += $(APPLICATION_MODULE) # include application module
|
||||
|
||||
# list of extra files to include in binary distribution
|
||||
DIST_FILES += Makefile
|
||||
|
@ -1,4 +1,4 @@
|
||||
MODULE = $(APPLICATION)
|
||||
MODULE = $(APPLICATION_MODULE)
|
||||
|
||||
DIRS += $(RIOTCPU)/$(CPU) $(RIOTBOARD)/$(BOARD)
|
||||
DIRS += $(RIOTBASE)/core $(RIOTBASE)/drivers $(RIOTBASE)/sys
|
||||
|
@ -6,6 +6,7 @@ export QQ # as Q, but be more quiet
|
||||
export QUIET # The parameter to use whether to show verbose makefile commands or not.
|
||||
|
||||
export APPLICATION # The application, set in the Makefile which is run by the user.
|
||||
export APPLICATION_MODULE # The application module name.
|
||||
export BOARD # The board to compile the application for.
|
||||
export CPU # The CPU, set by the board's Makefile.include.
|
||||
export CPU_MODEL # The specific identifier of the used CPU, used for some CPU implementations to differentiate between different memory layouts
|
||||
|
Loading…
Reference in New Issue
Block a user