From ded2ebc8e7601f5c3f36801fe56e010ef99be9d9 Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Wed, 25 Sep 2019 10:35:33 +0200 Subject: [PATCH 1/2] Makefile.include: add BUILD_FILES - Add BULD_FILES that holds all files that need to be built and linked. --- Makefile.include | 5 ++++- makefiles/vars.inc.mk | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile.include b/Makefile.include index 8df7939bfe..52be7f16da 100644 --- a/Makefile.include +++ b/Makefile.include @@ -442,6 +442,9 @@ ifeq (,$(FLASHFILE)) $(error FLASHFILE is not defined for this board: $(FLASHFILE)) endif +# By default always build ELFFILE and FLASHFILE +BUILD_FILES += $(ELFFILE) $(FLASHFILE) + # variables used to compile and link c++ CPPMIX ?= $(if $(wildcard *.cpp),1,) @@ -470,7 +473,7 @@ ifeq ($(BUILD_IN_DOCKER),1) link: ..in-docker-container else ifeq (,$(RIOTNOLINK)) -link: ..compiler-check ..build-message $(ELFFILE) $(FLASHFILE) print-size +link: ..compiler-check ..build-message $(BUILD_FILES) print-size else link: ..compiler-check ..build-message $(BASELIBS) endif # RIOTNOLINK diff --git a/makefiles/vars.inc.mk b/makefiles/vars.inc.mk index d788e772a0..f2bfcc5557 100644 --- a/makefiles/vars.inc.mk +++ b/makefiles/vars.inc.mk @@ -80,6 +80,7 @@ export ELFFILE # The unstripped result of the compilation. export HEXFILE # The 'intel hex' stripped result of the compilation. # BINFILE # The 'binary' stripped result of the compilation. # FLASHFILE # The output file used for flashing +# BUILD_FILES # The list of files to be built # DEBUGGER # The command to call on "make debug", usually a script starting the GDB front-end. # DEBUGGER_FLAGS # The parameters to supply to DEBUGGER. # DEBUGSERVER # The command to call on "make debug-server", usually a script starting the GDB server. From 5790e061c7f1aca516309a306fe4cb373cb5af69 Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Wed, 25 Sep 2019 10:36:31 +0200 Subject: [PATCH 2/2] makefiles/boot/riotboot.mk: use BUILD_FILES - Fixes compiling in docker by using BUILD_FILES to define extra files to be built --- makefiles/boot/riotboot.mk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/makefiles/boot/riotboot.mk b/makefiles/boot/riotboot.mk index f07d049617..a1281422d0 100644 --- a/makefiles/boot/riotboot.mk +++ b/makefiles/boot/riotboot.mk @@ -49,9 +49,7 @@ SLOT_RIOT_ELFS = $(BINDIR_APP)-slot0.elf $(BINDIR_APP)-slot1.elf # ensure both slot elf files are always linked # this ensures that both "make test" and "make test-murdock" can rely on them # being present without having to trigger re-compilation. -ifneq (1, $(RIOTNOLINK)) -link: $(SLOT_RIOT_ELFS) -endif +BUILD_FILES += $(SLOT_RIOT_ELFS) # Create binary target with RIOT header $(SLOT_RIOT_BINS): %.$(APP_VER).riot.bin: %.hdr %.bin