summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPatrick Georgi <patrick.georgi@secunet.com>2011-03-08 20:49:18 +0000
committerPatrick Georgi <patrick.georgi@coresystems.de>2011-03-08 20:49:18 +0000
commit57205c7e43e1ec3d4d62ea86e33c7acb7dbad81d (patch)
treefaf3d8d31671ad0b9413345a874a1d82b11dabc0 /Makefile
parent943b8b599758016380939b76394ab1b2cf913258 (diff)
Add option_table.h as dependency for all C based object files if option tables are used.
This is to make sure that the file exists when it is needed. While this isn't the case for every C source file, it doesn't hurt either to create the file a bit sooner than strictly necessary. Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com> Acked-by: Jonathan Kollasch <jakllsch@kollasch.net> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6438 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 4c787ef174..06847b61a0 100644
--- a/Makefile
+++ b/Makefile
@@ -207,9 +207,10 @@ define create_cc_template
# $1 obj class
# $2 source suffix (c, S)
# $3 additional compiler flags
+# $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
+$(obj)/$$(1).$(1).o: src/$$(1).$(2) $(obj)/config.h $(4)
@printf " CC $$$$(subst $$$$(obj)/,,$$$$(@))\n"
$(CC) $(3) -MMD $$$$(CFLAGS) -c -o $$$$@ $$$$<
en$(EMPTY)def
@@ -219,7 +220,7 @@ endef
filetypes-of-class=$(subst .,,$(sort $(suffix $($(1)-srcs))))
$(foreach class,$(classes), \
$(foreach type,$(call filetypes-of-class,$(class)), \
- $(eval $(call create_cc_template,$(class),$(type),$($(class)-$(type)-ccopts)))))
+ $(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))))))
$(eval $(foreach class,$(classes),$(call foreach-src,$(class))))