summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/makefile')
-rw-r--r--crawl-ref/source/makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/crawl-ref/source/makefile b/crawl-ref/source/makefile
index 72922be698..935ef4a926 100644
--- a/crawl-ref/source/makefile
+++ b/crawl-ref/source/makefile
@@ -609,12 +609,12 @@ test:
# This should eliminate an annoying need to use 'make clean' every time.
#
-TRACK_CFLAGS = $(subst ','\'',$(ALL_CFLAGS))
+TRACK_CFLAGS = $(subst ','\'',$(CC) $(CXX) $(ALL_CFLAGS))
.cflags: .force-cflags
@FLAGS='$(TRACK_CFLAGS)'; \
if test x"$$FLAGS" != x"`cat .cflags 2>/dev/null`" ; then \
- echo " * new build flags or prefix"; \
+ echo " * rebuilding crawl: new build flags or prefix"; \
echo "$$FLAGS" > .cflags; \
fi
@@ -625,7 +625,7 @@ TRACK_CFLAGS = $(subst ','\'',$(ALL_CFLAGS))
ifeq ($(shell which fastdep 2> /dev/null),)
-%.d: %.cc
+%.d: %.cc .cflags
$(QUIET_DEPEND)$(CXX) -MM $(ALL_CFLAGS) $< > $@
depend: $(OBJECTS:.o=.d)
@@ -781,7 +781,7 @@ $(OBJECTS:%.o=%.cc): $(CC_DEP) $(TILEDEFHDRS) $(CONTRIB_LIBS)
$(CONTRIB_LIBS): .contrib-libs
@:
-.contrib-libs:
+.contrib-libs: .cflags
+@$(MAKE) -C contrib $(CONTRIBS)
@touch $@