summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--Makefile.inc3
2 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 395910f721..3c576082be 100644
--- a/Makefile
+++ b/Makefile
@@ -249,7 +249,7 @@ $(foreach class,$(classes), \
foreach-src=$(foreach file,$($(1)-srcs),$(eval $(call $(1)-objs_$(subst .,,$(suffix $(file)))_template,$(basename $(file)))))
$(eval $(foreach class,$(classes),$(call foreach-src,$(class))))
-DEPENDENCIES = $(addsuffix .d,$(basename $(allobjs)))
+DEPENDENCIES += $(addsuffix .d,$(basename $(allobjs)))
-include $(DEPENDENCIES)
printall:
diff --git a/Makefile.inc b/Makefile.inc
index 9c043c4825..204e5185a7 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -112,7 +112,8 @@ files-in-dir=$(filter-out $(call dir-wildcards,$(call filter-out-dirs,$(1),$(sor
#######################################################################
# reduce command line length by linking the objects of each
# directory into an intermediate file
-ramstage-postprocess=$(foreach d,$(sort $(dir $(filter-out %.ld,$(1)))), \
+ramstage-postprocess=$$(eval DEPENDENCIES+=$$(addsuffix .d,$$(basename $(1)))) \
+ $(foreach d,$(sort $(dir $(filter-out %.ld,$(1)))), \
$(eval $(d)ramstage.o: $(call files-in-dir,$(d),$(filter-out %.ld,$(1))); $$(LD_ramstage) -o $$@ -r $$^ ) \
$(eval ramstage-objs:=$(d)ramstage.o $(filter-out $(filter-out %.ld, $(call files-in-dir,$(d),$(1))),$(ramstage-objs))))