summaryrefslogtreecommitdiffstats
path: root/hack
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 /hack
parent08eca96e71d96ad1f8e9b888875ab5570f208d19 (diff)
downloadbsdgames-darwin-23454acb66be2a88647262d98d50e0f115519ea0.tar.gz
bsdgames-darwin-23454acb66be2a88647262d98d50e0f115519ea0.tar.zst
bsdgames-darwin-23454acb66be2a88647262d98d50e0f115519ea0.zip
Use PREFIX now
Diffstat (limited to 'hack')
-rw-r--r--hack/Makefile8
-rw-r--r--hack/def.objects.h2
-rw-r--r--hack/hack-config.h (renamed from hack/config.h)0
-rw-r--r--hack/hack.h2
-rw-r--r--hack/pathnames.h8
5 files changed, 11 insertions, 9 deletions
diff --git a/hack/Makefile b/hack/Makefile
index 318f3034..c4aed9cb 100644
--- a/hack/Makefile
+++ b/hack/Makefile
@@ -16,7 +16,7 @@ SRCS+= alloc.c hack.Decl.c hack.apply.c hack.bones.c hack.c hack.cmd.c \
MAN= hack.6
CLEANFILES+=makedefs
FILES=help hh data
-FILESDIR=/var/games/hackdir
+FILESDIR=$(LOCALSTATEDIR)/games/hackdir
CLEANFILES+=hack.onames.h
all: $(PROG)
@@ -30,12 +30,12 @@ makedefs: makedefs.c
hack.h: hack.onames.h
$(PROG): $(SRCS) hack.h
- $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) -lncursesw
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) -lncursesw -I$(ROOT)
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(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)
mkdir -p $(DESTDIR)$(FILESDIR)
$(GINSTALL) -Dm660 $(FILES) $(DESTDIR)$(FILESDIR)
diff --git a/hack/def.objects.h b/hack/def.objects.h
index e9b34d17..3bed8c35 100644
--- a/hack/def.objects.h
+++ b/hack/def.objects.h
@@ -64,7 +64,7 @@
#ifndef _DEF_OBJECTS_H_
#define _DEF_OBJECTS_H_
/* objects have letter " % ) ( 0 _ ` [ ! ? / = * */
-#include "config.h"
+#include "hack-config.h"
#include "def.objclass.h"
struct objclass objects[] = {
diff --git a/hack/config.h b/hack/hack-config.h
index 7f51a842..7f51a842 100644
--- a/hack/config.h
+++ b/hack/hack-config.h
diff --git a/hack/hack.h b/hack/hack.h
index 575b00ef..4579fae6 100644
--- a/hack/hack.h
+++ b/hack/hack.h
@@ -64,7 +64,7 @@
#ifndef _HACK_H_
#define _HACK_H_
-#include "config.h"
+#include "hack-config.h"
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
diff --git a/hack/pathnames.h b/hack/pathnames.h
index 3af190e9..bbd2fa71 100644
--- a/hack/pathnames.h
+++ b/hack/pathnames.h
@@ -31,7 +31,9 @@
* @(#)pathnames.h 8.1 (Berkeley) 5/31/93
*/
-#define _PATH_MAIL "/usr/bin/mail"
-#define _PATH_QUEST "/var/games/questdir"
-#define _PATH_HACK "/var/games/hackdir"
+#include "config.h"
+
+#define _PATH_MAIL PREFIX"/bin/mail"
+#define _PATH_QUEST LOCALSTATEDIR"/games/questdir"
+#define _PATH_HACK LOCALSTATEDIR"/games/hackdir"