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/makefile19
1 files changed, 3 insertions, 16 deletions
diff --git a/crawl-ref/source/makefile b/crawl-ref/source/makefile
index 283a6bd2f2..feedfd0f10 100644
--- a/crawl-ref/source/makefile
+++ b/crawl-ref/source/makefile
@@ -419,11 +419,11 @@ endif
endif
ifneq ($(strip $(SAVEDIR)),)
-CFOTHERS_L += '-DSAVE_DIR_PATH="$(strip $(prefix))/$(strip $(SAVEDIR))"'
+CFOTHERS_L += -DSAVE_DIR_PATH=\"$(strip $(prefix))/$(strip $(SAVEDIR))\"
endif
ifneq ($(strip $(DATADIR)),)
-CFOTHERS_L += '-DDATA_DIR_PATH="$(strip $(prefix))/$(strip $(DATADIR))"'
+CFOTHERS_L += -DDATA_DIR_PATH=\"$(strip $(prefix))/$(strip $(DATADIR))\"
endif
ifndef NO_NCURSES
@@ -701,20 +701,7 @@ distclean: clean clean-contrib clean-rltiles
# This information is included in crash reports, and is printed with
# "crawl -version"
compflag.h:
- $(QUIET_GEN)
- @echo "// Automatically generated by makefile" > compflag.h
- @echo "#ifndef __included_crawl_compiler_flags_h" >> compflag.h
- @echo "#define __included_crawl_compiler_flags_h" >> compflag.h
- @echo -n "#define CRAWL_CFLAGS \"" >> compflag.h
- @echo -n $(CFLAGS) | sed 's/\"/\\"/g' >> compflag.h
- @echo "\"" >> compflag.h
- @echo -n "#define CRAWL_CFLAGS_L \"" >> compflag.h
- @echo -n $(CFLAGS_L) | sed 's/\"/\\"/g' >> compflag.h
- @echo "\"" >> compflag.h
- @echo -n "#define CRAWL_LDFLAGS \"" >> compflag.h
- @echo -n $(LDFLAGS) | sed 's/\"/\\"/g' >> compflag.h
- @echo "\"" >> compflag.h
- @echo "#endif" >> compflag.h
+ $(QUIET_GEN)util/gen-cflg.pl compflag.h "$(CFLAGS)" "$(CFLAGS_L)" "$(LDFLAGS)"
$(GAME): $(GAME_DEPENDS)
$(QUIET_LINK)$(CXX) $(LDFLAGS) $(EXTRA_OBJECTS) $(OBJECTS) -o $(GAME) $(LIB)