summaryrefslogtreecommitdiffstats
path: root/phantasia
diff options
context:
space:
mode:
authorCameron Katri <me@cameronkatri.com>2021-03-28 14:39:02 -0400
committerCameron Katri <me@cameronkatri.com>2021-03-28 14:39:02 -0400
commit23454acb66be2a88647262d98d50e0f115519ea0 (patch)
treec593751ce3649be2e502fac3e080d6c0045b9fa0 /phantasia
parent08eca96e71d96ad1f8e9b888875ab5570f208d19 (diff)
downloadbsdgames-darwin-23454acb66be2a88647262d98d50e0f115519ea0.tar.gz
bsdgames-darwin-23454acb66be2a88647262d98d50e0f115519ea0.tar.zst
bsdgames-darwin-23454acb66be2a88647262d98d50e0f115519ea0.zip
Use PREFIX now
Diffstat (limited to 'phantasia')
-rw-r--r--phantasia/Makefile10
-rw-r--r--phantasia/pathnames.h20
2 files changed, 16 insertions, 14 deletions
diff --git a/phantasia/Makefile b/phantasia/Makefile
index 3792164c..c0a4484a 100644
--- a/phantasia/Makefile
+++ b/phantasia/Makefile
@@ -5,7 +5,7 @@ PROG= phantasia
SRCS= fight.c gamesupport.c interplayer.c io.c main.c misc.c phantglobs.c
MAN= phantasia.6
-FILESDIR=/var/games/phantasia
+FILESDIR=$(LOCALSTATEDIR)/games/phantasia
FILESMODE=0660
ALLFILES=gold lastdead mess monsters void motd characs scoreboard
FILES=gold lastdead mess monsters void motd
@@ -21,7 +21,7 @@ files.stamp: mkdata monsters.asc
touch files.stamp
mkdata: phantglobs.c setup.c
- clang -o mkdata phantglobs.c setup.c
+ clang -o mkdata phantglobs.c setup.c -I$(ROOT)
# Make Phantasia map. Change the map commands reflect your installation.
# PLOTDEVICE is used for plotting the map. Change as appropriate.
@@ -31,14 +31,14 @@ map: map.c
./map | plot > /dev/tty
$(PROG): $(SRCS)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) -lncursesw
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) -lncursesw -I$(ROOT)
$(STRIP) $(PROG)
$(ALLFILES): $(FILES)
install: $(PROG) $(MAN) $(ALLFILES)
- $(GINSTALL) -Dm2755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm2755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
$(GINSTALL) -d $(DESTDIR)$(FILESDIR)
$(GINSTALL) -Dm$(FILESMODE) $(ALLFILES) $(DESTDIR)$(FILESDIR)
diff --git a/phantasia/pathnames.h b/phantasia/pathnames.h
index af287785..5bfc3bc0 100644
--- a/phantasia/pathnames.h
+++ b/phantasia/pathnames.h
@@ -31,12 +31,14 @@
* @(#)pathnames.h 8.2 (Berkeley) 4/2/94
*/
-#define _PATH_GAMEPROG "/usr/games/phantasia"
-#define _PATH_GOLD "/var/games/phantasia/gold"
-#define _PATH_LASTDEAD "/var/games/phantasia/lastdead"
-#define _PATH_MESS "/var/games/phantasia/mess"
-#define _PATH_MONST "/var/games/phantasia/monsters"
-#define _PATH_MOTD "/var/games/phantasia/motd"
-#define _PATH_PEOPLE "/var/games/phantasia/characs"
-#define _PATH_SCORE "/var/games/phantasia/scoreboard"
-#define _PATH_VOID "/var/games/phantasia/void"
+#include "config.h"
+
+#define _PATH_GAMEPROG PREFIX"/games/phantasia"
+#define _PATH_GOLD LOCALSTATEDIR"/games/phantasia/gold"
+#define _PATH_LASTDEAD LOCALSTATEDIR"/games/phantasia/lastdead"
+#define _PATH_MESS LOCALSTATEDIR"/games/phantasia/mess"
+#define _PATH_MONST LOCALSTATEDIR"/games/phantasia/monsters"
+#define _PATH_MOTD LOCALSTATEDIR"/games/phantasia/motd"
+#define _PATH_PEOPLE LOCALSTATEDIR"/games/phantasia/characs"
+#define _PATH_SCORE LOCALSTATEDIR"/games/phantasia/scoreboard"
+#define _PATH_VOID LOCALSTATEDIR"/games/phantasia/void"