From ebecb71e1ed92ea5070051db902dcbe9df284dc5 Mon Sep 17 00:00:00 2001 From: Elliot Berman Date: Sat, 14 Sep 2019 22:45:32 -0700 Subject: [PATCH] Add support for extra Make scripts Automatically include any firmware/*.mk scripts in Make system to allow templates to modify build process (e.g. add extra flags or dependencies). --- common.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common.mk b/common.mk index 27a333daf..349b4b6a3 100644 --- a/common.mk +++ b/common.mk @@ -162,6 +162,8 @@ ifeq ($(USE_PACKAGE),1) DEFAULT_BIN=$(HOT_BIN) endif +-include $(wildcard $(FWDIR)/*.mk) + .PHONY: all clean quick quick: $(DEFAULT_BIN) @@ -198,10 +200,10 @@ endif # if project is a library source, compile the archive and link output.elf against the archive rather than source objects ifeq ($(IS_LIBRARY),1) -ELF_DEPS=$(filter-out $(call GETALLOBJ,$(EXCLUDE_SRC_FROM_LIB)), $(call GETALLOBJ,$(EXCLUDE_SRCDIRS))) +ELF_DEPS+=$(filter-out $(call GETALLOBJ,$(EXCLUDE_SRC_FROM_LIB)), $(call GETALLOBJ,$(EXCLUDE_SRCDIRS))) LIBRARIES+=$(LIBAR) else -ELF_DEPS=$(call GETALLOBJ,$(EXCLUDE_SRCDIRS)) +ELF_DEPS+=$(call GETALLOBJ,$(EXCLUDE_SRCDIRS)) endif $(MONOLITH_BIN): $(MONOLITH_ELF) $(BINDIR)