build system: Add hook to postprocess classes (object lists)

This will be used to minimize the ramstage class, to avoid command
line lengths to exceed the limit on mingw, esp. after we got rid
of ramstage.a

Change-Id: I80582d04476545c275e8d1d08fb52a99f58cebcc
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/1910
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Patrick Georgi 2012-11-25 14:31:08 +01:00
parent 6999217ab6
commit 79f9010e80
1 changed files with 4 additions and 0 deletions

View File

@ -237,6 +237,10 @@ $(foreach class,$(classes),$(eval $(class)-srcs:=$(sort $($(class)-srcs))))
src-to-obj=$(addsuffix .$(1).o, $(basename $(patsubst src/%, $(obj)/%, $($(1)-srcs)))) src-to-obj=$(addsuffix .$(1).o, $(basename $(patsubst src/%, $(obj)/%, $($(1)-srcs))))
$(foreach class,$(classes),$(eval $(class)-objs:=$(call src-to-obj,$(class)))) $(foreach class,$(classes),$(eval $(class)-objs:=$(call src-to-obj,$(class))))
# Call post-processors if they're defined
$(foreach class,$(classes),\
$(if $(value $(class)-postprocess),$(eval $(call $(class)-postprocess,$($(class)-objs)))))
allsrcs:=$(foreach var, $(addsuffix -srcs,$(classes)), $($(var))) allsrcs:=$(foreach var, $(addsuffix -srcs,$(classes)), $($(var)))
allobjs:=$(foreach var, $(addsuffix -objs,$(classes)), $($(var))) allobjs:=$(foreach var, $(addsuffix -objs,$(classes)), $($(var)))
alldirs:=$(sort $(abspath $(dir $(allobjs)))) alldirs:=$(sort $(abspath $(dir $(allobjs))))