From 81b09f40087d1a00afe30e379d2e8460203b1c5c Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Sat, 23 Jan 2016 00:50:00 +0100 Subject: Makefile: Make full use of src-to-obj macro There were several spots in the tree where the path to a per class object file was hardcoded. To make use of the src-to-obj macro for this, it had to be moved before the inclusion of subdirs. Which is fine, as it doesn't have dependencies beside $(obj). Tested by verifying that the resulting coreboot.rom files didn't change for all of Jenkins' abuild configurations. Change-Id: I2eb1beeb8ae55872edfd95f750d7d5a1cee474c4 Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/13180 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/lib/Makefile.inc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/lib') diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc index 5e788c0589..7eb91082b3 100644 --- a/src/lib/Makefile.inc +++ b/src/lib/Makefile.inc @@ -167,11 +167,11 @@ ramstage-y += version.c smm-y += version.c verstage-y += version.c -$(obj)/lib/version.bootblock.o : $(obj)/build.h -$(obj)/lib/version.romstage.o : $(obj)/build.h -$(obj)/lib/version.ramstage.o : $(obj)/build.h -$(obj)/lib/version.smm.o : $(obj)/build.h -$(obj)/lib/version.verstage.o : $(obj)/build.h +$(call src-to-obj,bootblock,$(dir)/version.c) : $(obj)/build.h +$(call src-to-obj,romstage,$(dir)/version.c) : $(obj)/build.h +$(call src-to-obj,ramstage,$(dir)/version.c) : $(obj)/build.h +$(call src-to-obj,smm,$(dir)/version.c) : $(obj)/build.h +$(call src-to-obj,verstage,$(dir)/version.c) : $(obj)/build.h romstage-y += bootmode.c ramstage-y += bootmode.c @@ -202,8 +202,8 @@ RMODULE_LDFLAGS := -z defs -Bsymbolic # It will create the necessary Make rules to create a rmodule. The resulting # rmdoule is named $(1).rmod define rmodule_link -$(strip $(1)): $(strip $(2)) $$(COMPILER_RT_rmodules_$(4)) $(obj)/lib/rmodule.rmodules_$(4).ld | $$(RMODTOOL) - $$(LD_rmodules_$(4)) $$(LDFLAGS_rmodules_$(4)) $(RMODULE_LDFLAGS) -T $(obj)/lib/rmodule.rmodules_$(4).ld --defsym=__heap_size=$(strip $(3)) -o $$@ --whole-archive --start-group $(filter-out %.ld,$(2)) --end-group +$(strip $(1)): $(strip $(2)) $$(COMPILER_RT_rmodules_$(4)) $(call src-to-obj,rmodules_$(4),src/lib/rmodule.ld) | $$(RMODTOOL) + $$(LD_rmodules_$(4)) $$(LDFLAGS_rmodules_$(4)) $(RMODULE_LDFLAGS) -T $(call src-to-obj,rmodules_$(4),src/lib/rmodule.ld) --defsym=__heap_size=$(strip $(3)) -o $$@ --whole-archive --start-group $(filter-out %.ld,$(2)) --end-group $$(NM_rmodules_$(4)) -n $$@ > $$(basename $$@).map endef -- cgit v1.2.3