mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
make: pass BLOBS to makefiles/application.inc.mk
For regular modules, adding files to BLOBS is sufficient to create the corresponding headers. Application modules are different, as they use a minimal makefile (makefiles.application.inc.mk) to build, thus application level variables are not available. This commit makes Makefile.include pass BLOBS to the application Makefile as APPLICATION_BLOBS, and application.inc.mk use that variable as value for BLOBS. The indirection is necessary so submakefiles (e.g., those visited by DIRS) do not hard override BLOBS.
This commit is contained in:
parent
a100c1c0ea
commit
b4da3b464f
@ -512,7 +512,8 @@ $(ELFFILE): $(BASELIBS)
|
||||
$(Q)$(_LINK) -o $@
|
||||
|
||||
$(BINDIR)/$(APPLICATION_MODULE).a: pkg-build $(BUILDDEPS)
|
||||
$(Q)DIRS="$(DIRS)" "$(MAKE)" -C $(APPDIR) -f $(RIOTMAKE)/application.inc.mk
|
||||
$(Q)DIRS="$(DIRS)" APPLICATION_BLOBS="$(BLOBS)" \
|
||||
"$(MAKE)" -C $(APPDIR) -f $(RIOTMAKE)/application.inc.mk
|
||||
$(BINDIR)/$(APPLICATION_MODULE).a: FORCE
|
||||
|
||||
# Other modules are built by application.inc.mk and packages building
|
||||
|
@ -3,4 +3,17 @@ MODULE = $(APPLICATION_MODULE)
|
||||
DIRS += $(RIOTCPU)/$(CPU) $(RIOTBOARD)/$(BOARD)
|
||||
DIRS += $(RIOTBASE)/core $(RIOTBASE)/drivers $(RIOTBASE)/sys
|
||||
|
||||
# For regular modules, adding files to BLOBS to their Makefile is sufficient to
|
||||
# create the corresponding headers.
|
||||
#
|
||||
# Application modules are different, as they use this makefile to build, thus
|
||||
# application level variables are not available unless exported.
|
||||
#
|
||||
# But exporting e.g., BLOBS, would pre-set the variable for all
|
||||
# submakefiles.
|
||||
#
|
||||
# As workaround, $(RIOTBASE)/Makefile.include passes BLOBS to this
|
||||
# Makefile as APPLICATION_BLOBS.
|
||||
BLOBS = $(APPLICATION_BLOBS)
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
|
Loading…
Reference in New Issue
Block a user