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 <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/13180 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user