summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/makefile.unix
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-01-11 07:32:06 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-01-11 07:32:06 +0000
commit4ddca565ae4b6e57e3445e9f4ff6f072ff0036e5 (patch)
tree3b93f632312a72d19f7dd2b8fece3d36bdaaa9d0 /crawl-ref/source/makefile.unix
parent184022aa4b8b6adcdd3452c371cae6d34b9b77fd (diff)
downloadcrawl-ref-4ddca565ae4b6e57e3445e9f4ff6f072ff0036e5.tar.gz
crawl-ref-4ddca565ae4b6e57e3445e9f4ff6f072ff0036e5.zip
Handle morgue_dir option better (create dir if it doesn't exist), updated
makefile.unix to copy docs to the data directory for make install. Added SAVEDIR variable to the makefile so the user doesn't need to edit AppHdr.h for SAVE_DIR_PATH. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@831 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/makefile.unix')
-rw-r--r--crawl-ref/source/makefile.unix17
1 files changed, 15 insertions, 2 deletions
diff --git a/crawl-ref/source/makefile.unix b/crawl-ref/source/makefile.unix
index ac22286d29..d1c37f1658 100644
--- a/crawl-ref/source/makefile.unix
+++ b/crawl-ref/source/makefile.unix
@@ -24,8 +24,11 @@ MCHMOD = 2755
INSTALLDIR := /usr/games
# If you're installing Crawl for multiple users, you *must* set this to a
-# valid path before building Crawl.
-DATADIR :=
+# valid path before building Crawl. This is not necessary if you are building
+# Crawl for a single user.
+
+SAVEDIR := /usr/games/crawl-saves/
+DATADIR := /usr/games/crawl-data/
LIB = -lncurses
@@ -36,6 +39,10 @@ CFWARN := -Wall -Wwrite-strings \
CFOTHERS := -fsigned-char -D$(OS_TYPE) $(EXTRA_FLAGS)
+ifneq ($(SAVEDIR),)
+CFOTHERS += '-DSAVE_DIR_PATH="$(SAVEDIR)"'
+endif
+
ifneq ($(DATADIR),)
CFOTHERS += '-DDATA_DIR_PATH="$(DATADIR)"'
endif
@@ -120,6 +127,7 @@ endif
#
install: $(GAME)
+ [ -d $(INSTALLDIR) ] || mkdir -p $(INSTALLDIR)
$(COPY) $(GAME) ${INSTALLDIR}
chmod ${MCHMOD} ${INSTALLDIR}/$(GAME)
ifeq ($(DATADIR),)
@@ -127,6 +135,11 @@ ifeq ($(DATADIR),)
endif
mkdir -p $(DATADIR)/data
cp dat/*.des $(DATADIR)/data
+ mkdir -p $(DATADIR)/docs
+ cp ../docs/*.txt $(DATADIR)/docs
+ifneq ($(SAVEDIR),)
+ mkdir -p $(SAVEDIR)
+endif
clean:
$(DELETE) *.o