build system: Allow using .a archives as source

Change-Id: I1d61971f1458ca7e4257abb6a9c2aa15ac08e1d0
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/10001
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
Patrick Georgi 2015-04-27 18:01:12 +02:00 committed by Patrick Georgi
parent e993ec7948
commit ef345c26a7
1 changed files with 10 additions and 0 deletions

View File

@ -149,6 +149,16 @@ $$(call src-to-obj,$1,$$(1).ld): $$(1).ld $(obj)/config.h
en$(EMPTY)def
endef
# Add handler to deal with archives
define generic-objs_a_template_gen
de$(EMPTY)fine $(1)-objs_a_template
$$(call src-to-obj,$1,$$(1).a): $$(1).a
@printf " CP $$$$(subst $$$$(obj)/,,$$$$(@))\n"
cp $$$$< $$$$@.tmp
mv $$$$@.tmp $$$$@
en$(EMPTY)def
endef
# Add handler to add no rules for manual files
define generic-objs_manual_template_gen
# do nothing