build system: create proper dependency files
Tell gcc what to use as target part of the generated rule. This is inspired by the commit listed below, but rewritten to match upstream, and split in smaller pieces to keep intent clear. Change-Id: Ie4814143337abb3cf1e9e8db7e96201a517a17b8 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Based-On-Change-Id: I50af7dacf616e0f8ff4c43f4acc679089ad7022b Based-On-Signed-off-by: Julius Werner <jwerner@chromium.org> Based-On-Reviewed-on: https://chromium-review.googlesource.com/219170 Reviewed-on: http://review.coreboot.org/9285 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
parent
f1df82a458
commit
75fcaf9e69
2
Makefile
2
Makefile
|
@ -232,7 +232,7 @@ ifn$(EMPTY)def $(1)-objs_$(2)_template
|
|||
de$(EMPTY)fine $(1)-objs_$(2)_template
|
||||
$(obj)/$$(1).$(1).o: src/$$(1).$(2) $(obj)/config.h $(4)
|
||||
@printf " CC $$$$(subst $$$$(obj)/,,$$$$(@))\n"
|
||||
$(CC_$(1)) $(3) -MMD $$$$(CPPFLAGS_$(1)) $$$$(CFLAGS_$(1)) -c -o $$$$@ $$$$<
|
||||
$(CC_$(1)) -MMD $$$$(CPPFLAGS_$(1)) $$$$(CFLAGS_$(1)) -MT $$$$(@) $(3) -c -o $$$$@ $$$$<
|
||||
en$(EMPTY)def
|
||||
end$(EMPTY)if
|
||||
endef
|
||||
|
|
Loading…
Reference in New Issue