From 94a458626a9f12aa670926d633f445bebc1fb63c Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Tue, 25 Oct 2011 14:32:21 -0700 Subject: Prevent multiple inclusions of object files and rules This removes 54 make warnings from the build Change-Id: I94ac9875526febe2f95334c1c3971641c1d27f8f Signed-off-by: Stefan Reinauer Signed-off-by: Patrick Georgi Reviewed-on: http://review.coreboot.org/338 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- Makefile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c5438979f757..f2277d16463f 100644 --- a/Makefile +++ b/Makefile @@ -204,6 +204,9 @@ evaluate_subdirs= \ subdirs:=$(TOPLEVEL) $(eval $(call evaluate_subdirs)) +# Eliminate duplicate mentions of source files in a class +$(foreach class,$(classes),$(eval $(class)-srcs:=$(sort $($(class)-srcs)))) + src-to-obj=$(addsuffix .$(1).o, $(basename $(patsubst src/%, $(obj)/%, $($(1)-srcs)))) $(foreach class,$(classes),$(eval $(class)-objs:=$(call src-to-obj,$(class)))) -- cgit v1.2.3