summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2015-04-03 10:32:17 +0200
committerPatrick Georgi <pgeorgi@google.com>2015-04-04 20:06:55 +0200
commitd69839bdfdea5d67bbbed12f29cdac52e9036875 (patch)
tree3db675c765f3742f8d71935d4b5614e1ef0d83ee /Makefile
parent08884e39cd3c7d0d0250e0e7921d12b5ae10ada1 (diff)
downloadcoreboot-staging-d69839bdfdea5d67bbbed12f29cdac52e9036875.zip
coreboot-staging-d69839bdfdea5d67bbbed12f29cdac52e9036875.tar.gz
build system: use full (in-tree) paths
So far we assumed that all files in *-srcs are below src/ which wasn't really true actually and will be less true with future changes. Fix up crt0.S handling on x86, which is covered by default rules due to this change. This is inspired by the commit listed below, but rewritten to match upstream, and split in smaller pieces to keep intent clear. Change-Id: Icae563c2d545b1aea809406e73faf3b417796a1b Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Based-On-Change-Id: I50af7dacf616e0f8ff4c43f4acc679089ad7022b Based-On-Signed-off-by: Julius Werner <jwerner@chromium.org> Based-On-Reviewed-on: https://chromium-review.googlesource.com/219170 Reviewed-on: http://review.coreboot.org/9288 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index f6f9a60..3ad19df 100644
--- a/Makefile
+++ b/Makefile
@@ -230,7 +230,7 @@ define create_cc_template
# $4 additional dependencies
ifn$(EMPTY)def $(1)-objs_$(2)_template
de$(EMPTY)fine $(1)-objs_$(2)_template
-$(obj)/$$(1).$(1).o: src/$$(1).$(2) $(obj)/config.h $(4)
+$$(call src-to-obj,$1,$$(1).$2): $$(1).$2 $(obj)/config.h $(4)
@printf " CC $$$$(subst $$$$(obj)/,,$$$$(@))\n"
$(CC_$(1)) -MMD $$$$(CPPFLAGS_$(1)) $$$$(CFLAGS_$(1)) -MT $$$$(@) $(3) -c -o $$$$@ $$$$<
en$(EMPTY)def
@@ -244,7 +244,7 @@ $(foreach class,$(classes), \
$(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,$(basename $(file)))))
$(eval $(foreach class,$(classes),$(call foreach-src,$(class))))
DEPENDENCIES = $(addsuffix .d,$(basename $(allobjs)))
OpenPOWER on IntegriCloud