summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/makefile
diff options
context:
space:
mode:
authorSteven Noonan <steven@uplinklabs.net>2009-10-25 14:55:21 -0700
committerSteven Noonan <steven@uplinklabs.net>2009-10-25 14:55:21 -0700
commitd6e7e3908b6c7b27fab61074eb0b688276a5a5b6 (patch)
tree9149e0c6c63971425a19ba8352124d40d1116233 /crawl-ref/source/makefile
parent6d2b0d5c6b3648b54cfdf079f8b4789734917b91 (diff)
downloadcrawl-ref-d6e7e3908b6c7b27fab61074eb0b688276a5a5b6.tar.gz
crawl-ref-d6e7e3908b6c7b27fab61074eb0b688276a5a5b6.zip
makefiles: improve 'clean' and 'distclean' targets to clean all outputs
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Diffstat (limited to 'crawl-ref/source/makefile')
-rw-r--r--crawl-ref/source/makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/crawl-ref/source/makefile b/crawl-ref/source/makefile
index a34a59fedd..6d2b01e57f 100644
--- a/crawl-ref/source/makefile
+++ b/crawl-ref/source/makefile
@@ -120,6 +120,10 @@ endif
#
include makefile.obj
+ifneq (,$(findstring clean,$(MAKECMDGOALS)))
+TILES := YesPlease
+endif
+
# Works for Mac OS X and Linux.
OBJECTS += crash-u.o
@@ -699,13 +703,14 @@ endif
clean:
+$(MAKE) -C $(UTIL) clean
- $(RM) $(OBJECTS) $(OBJECTS:.o=.d) *.ixx build.h compflag.h .contrib-ok
+ +$(MAKE) -C $(RLTILES) -f makefile.unix clean
+ $(RM) $(GAME) $(GAME).exe $(EXTRA_OBJECTS) $(OBJECTS) $(OBJECTS:.o=.d) *.ixx build.h compflag.h .contrib-ok .contrib-libs
clean-contrib:
+$(MAKE) -C contrib clean
distclean: clean clean-contrib clean-rltiles
- $(RM) bones.* morgue.txt scores $(GAME) *.sav core *.0* *.lab $(DEPENDENCY_MKF)
+ $(RM) morgue saves scores $(GAME) core *.0* *.lab $(DEPENDENCY_MKF)
.contrib-ok:
@for a in contrib/lua/src/Makefile contrib/sqlite/Makefile contrib/pcre/Makefile; do \
@@ -779,6 +784,7 @@ dat/tiles/%.png: $(RLTILES)/%.png
$(QUIET_COPY)$(COPY) $< $@
clean-rltiles:
+ $(RM) $(DESTTILEFILES)
+$(MAKE) -C $(RLTILES) -f makefile.unix distclean
#############################################################################