build system: Allow defining generic rules
Provide a mechanism to define rules that apply for a given filetype (.c, .asl, ...) across all classes (ramstage, ...) Change-Id: If45c526d294e0374c32efef01f0213c6b78b1e43 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/9286 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
75fcaf9e69
commit
416ab38ea4
3
Makefile
3
Makefile
|
@ -241,7 +241,8 @@ filetypes-of-class=$(subst .,,$(sort $(suffix $($(1)-srcs))))
|
||||||
$(foreach class,$(classes), \
|
$(foreach class,$(classes), \
|
||||||
$(foreach type,$(call filetypes-of-class,$(class)), \
|
$(foreach type,$(call filetypes-of-class,$(class)), \
|
||||||
$(eval $(class)-$(type)-ccopts += $(generic-$(type)-ccopts) $($(class)-generic-ccopts)) \
|
$(eval $(class)-$(type)-ccopts += $(generic-$(type)-ccopts) $($(class)-generic-ccopts)) \
|
||||||
$(eval $(call create_cc_template,$(class),$(type),$($(class)-$(type)-ccopts),$($(class)-$(type)-deps)))))
|
$(if $(generic-objs_$(type)_template_gen),$(eval $(call generic-objs_$(type)_template_gen,$(class))),\
|
||||||
|
$(eval $(call create_cc_template,$(class),$(type),$($(class)-$(type)-ccopts),$($(class)-$(type)-deps))))))
|
||||||
|
|
||||||
foreach-src=$(foreach file,$($(1)-srcs),$(eval $(call $(1)-objs_$(subst .,,$(suffix $(file)))_template,$(subst src/,,$(basename $(file))))))
|
foreach-src=$(foreach file,$($(1)-srcs),$(eval $(call $(1)-objs_$(subst .,,$(suffix $(file)))_template,$(subst src/,,$(basename $(file))))))
|
||||||
$(eval $(foreach class,$(classes),$(call foreach-src,$(class))))
|
$(eval $(foreach class,$(classes),$(call foreach-src,$(class))))
|
||||||
|
|
Loading…
Reference in New Issue