summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/makefile
diff options
context:
space:
mode:
authorSteven Noonan <steven@uplinklabs.net>2010-01-02 14:07:55 -0800
committerSteven Noonan <steven@uplinklabs.net>2010-01-02 14:07:55 -0800
commitd54de77e23c945c5d34e7d9e04fefece29f9f7e2 (patch)
tree2cf868723cf7e6d3c6aa8287fe4a48ab8e3d96db /crawl-ref/source/makefile
parent96237179cdbf6ed2d5a7ce3ea3f717bb400b4635 (diff)
downloadcrawl-ref-d54de77e23c945c5d34e7d9e04fefece29f9f7e2.tar.gz
crawl-ref-d54de77e23c945c5d34e7d9e04fefece29f9f7e2.zip
makefile: add depfile regeneration rule
Due to earlier changes, this rule is only executed when the .d file exists but it's out-of-date. For initial .d generation, the object compilation rule is executed instead. Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Diffstat (limited to 'crawl-ref/source/makefile')
-rw-r--r--crawl-ref/source/makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/makefile b/crawl-ref/source/makefile
index a023a4286c..15f3643d2a 100644
--- a/crawl-ref/source/makefile
+++ b/crawl-ref/source/makefile
@@ -876,6 +876,9 @@ endif
$(OBJECTS:%.o=%.cc): $(CC_DEP) $(TILEDEFHDRS) $(CONTRIB_LIBS)
+%.d: %.cc .cflags
+ $(QUIET_DEPEND)$(CXX) -MM $(ALL_CFLAGS) $< > $*.d
+
%.o: %.m .cflags
$(QUIET_CC)$(CC) $(ALL_CFLAGS) -Wp,-MD,$*.d -c $< -o $*.o