diff options
author | Steven Noonan <steven@uplinklabs.net> | 2009-11-06 23:25:34 -0800 |
---|---|---|
committer | Steven Noonan <steven@uplinklabs.net> | 2009-11-06 23:26:01 -0800 |
commit | 96944cb324ba858b8fd89175edf14c5a26bd58d6 (patch) | |
tree | bc98e6bd57644f0c834f782ec4635dffc7ba3661 /crawl-ref/source/makefile | |
parent | 66bf04b8445e54594ffa1cf1569f176244951da1 (diff) | |
download | crawl-ref-96944cb324ba858b8fd89175edf14c5a26bd58d6.tar.gz crawl-ref-96944cb324ba858b8fd89175edf14c5a26bd58d6.zip |
makefile: cleanup, simplify, and optimize dependency generation0.6.0-a1
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Diffstat (limited to 'crawl-ref/source/makefile')
-rw-r--r-- | crawl-ref/source/makefile | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/crawl-ref/source/makefile b/crawl-ref/source/makefile index b879ef6005..6aa60a5627 100644 --- a/crawl-ref/source/makefile +++ b/crawl-ref/source/makefile @@ -623,34 +623,23 @@ TRACK_CFLAGS = $(subst ','\'',$(CC) $(CXX) $(ALL_CFLAGS)) ########################################################################## # Dependencies -ifeq ($(shell which fastdep 2> /dev/null),) - -%.d: %.cc .cflags - $(QUIET_DEPEND)$(CXX) -MM $(ALL_CFLAGS) $< > $@ - -depend: $(OBJECTS:.o=.d) - -ifneq ($(MAKECMDGOALS),clean) -ifneq ($(MAKECMDGOALS),distclean) --include $(OBJECTS:.o=.d) -endif -endif +DEPS := $(OBJECTS:.o=.d) +ifeq ($(shell which fastdep 2> /dev/null),) +DEPEND := $(CXX) -MM $(ALL_CFLAGS) else +DEPEND := fastdep $(DEFINES) $(INCLUDES) +endif -DEPENDENCY_MKF := makefile.dep - -depend: $(DEPENDENCY_MKF) +%.d: %.cc .cflags + $(QUIET_DEPEND)$(DEPEND) $< > $@ -%.dep: $(OBJECTS:.o=.cc) - $(QUIET_DEPEND)fastdep $(DEFINES) $(INCLUDES) $(OBJECTS:.o=.cc) > $@ +depend: $(DEPS) ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),distclean) --include $(DEPENDENCY_MKF) -endif +-include $(DEPS) endif - endif |