summaryrefslogtreecommitdiff
path: root/Template
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2015-05-02 19:12:33 +0200
committerTobias Klauser <tklauser@distanz.ch>2015-05-02 19:15:13 +0200
commitdafb89c7a307272189b29a5c74bd6e33068ac831 (patch)
tree853db4973b17b69580f3f4ae7ece4a8c24f6d1ba /Template
parent11c7e6a5f5d0d78f03f59e5d071aff7a11126127 (diff)
build: Make module build also depend on header file
If only a header file is changed, the corresponding module is not rebuilt. Thus, add a rule to make module build depend on the header file as well (where applicable) to circumvent this effect. Note: This will still not necessarily catch every dependency between modules, source and header files. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'Template')
-rw-r--r--Template3
1 files changed, 3 insertions, 0 deletions
diff --git a/Template b/Template
index fa574de..3410769 100644
--- a/Template
+++ b/Template
@@ -20,6 +20,9 @@ define TOOL_templ
$$(CCQ) $$(CFLAGS) -o $$@ -c $$<
$(1)/%.tab.o: $(1)/%.tab.c
$$(CCQ) $$(CFLAGS) -o $$@ -c $$<
+ $(1)/%.o: %.c %.h
+ $$(CHECK) $$(CFLAGS) $$(CHECKFLAGS) $$<
+ $$(CCQ) $$(CFLAGS) -o $(1)/$$(shell basename $$@) -c $$<
$(1)/%.o: %.c
$$(CHECK) $$(CFLAGS) $$(CHECKFLAGS) $$<
$$(CCQ) $$(CFLAGS) -o $(1)/$$(shell basename $$@) -c $$<