summaryrefslogtreecommitdiffstats
path: root/warp
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 /warp
parent08eca96e71d96ad1f8e9b888875ab5570f208d19 (diff)
downloadbsdgames-darwin-23454acb66be2a88647262d98d50e0f115519ea0.tar.gz
bsdgames-darwin-23454acb66be2a88647262d98d50e0f115519ea0.tar.zst
bsdgames-darwin-23454acb66be2a88647262d98d50e0f115519ea0.zip
Use PREFIX now
Diffstat (limited to 'warp')
-rw-r--r--warp/Makefile10
-rw-r--r--warp/sm.c2
-rw-r--r--warp/warp-config.h (renamed from warp/config.h)6
-rw-r--r--warp/warp.h9
4 files changed, 15 insertions, 12 deletions
diff --git a/warp/Makefile b/warp/Makefile
index 0e674c14..855b68af 100644
--- a/warp/Makefile
+++ b/warp/Makefile
@@ -11,17 +11,17 @@ CLEANFILES+=warp.6
MAN= warp.6
FILES=smap.0 smap.1 smap.2 smap.3 smap.4 smap.5 smap.6 smap.7
-FILESDIR=/usr/share/games/warp
+FILESDIR=$(PREFIX)/share/games/warp
all: $(PROG) $(MAN) $(FILES)
$(PROG): $(SRCS)
- $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) -lncursesw
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) -lncursesw -I$(ROOT)
$(STRIP) $(PROG)
install: $(PROG) $(MAN) $(FILES)
- $(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) -Dm644 $(FILES) $(DESTDIR)$(FILESDIR)
@@ -56,6 +56,6 @@ smap.7: smp.7 sm
./sm < smp.7 > $@
sm: sm.c
- clang -o $@ sm.c
+ clang -o $@ sm.c -I$(ROOT)
.PHONY: all clean install
diff --git a/warp/sm.c b/warp/sm.c
index 69b10401..a91c64ac 100644
--- a/warp/sm.c
+++ b/warp/sm.c
@@ -9,7 +9,7 @@
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
-#include "config.h"
+#include "warp-config.h"
int
main(void)
diff --git a/warp/config.h b/warp/warp-config.h
index 8f4d28a4..825991a3 100644
--- a/warp/config.h
+++ b/warp/warp-config.h
@@ -1,3 +1,5 @@
+#include "config.h"
+
/* RDCHK:
* This symbol, if defined, indicates that the rdchk routine is available
* to find out if there is input pending on an IO channel. Generally
@@ -83,7 +85,7 @@
* This symbol contains the full name of the preferred user shell on this
* system. Usual values are /bin/csh, /bin/ksh, /bin/sh.
*/
-#define PREFSHELL "/bin/csh" /**/
+#define PREFSHELL "/bin/sh" /**/
/* ROOTID:
* This symbol contains the uid of root, normally 0.
@@ -113,4 +115,4 @@
#endif
/* warp private library, may use ~ expansion, %x and %l */
-#define PRIVLIB "/usr/share/games/warp" /**/
+#define PRIVLIB PREFIX"/share/games/warp" /**/
diff --git a/warp/warp.h b/warp/warp.h
index 24abfdc3..4dabe7be 100644
--- a/warp/warp.h
+++ b/warp/warp.h
@@ -15,7 +15,8 @@
#ifndef WARP_H
#define WARP_H
-#include "config.h" /* generated by Configure script */
+#include "config.h"
+#include "warp-config.h" /* generated by Configure script */
#include <sys/types.h>
#include <sys/stat.h>
@@ -43,7 +44,7 @@
* access.)
*/
-#define SAVEDIR "/var/games/warp"
+#define SAVEDIR LOCALSTATEDIR"/games/warp"
#define NEWSFILE "warp.news"
#define HELPFILE "warp.doc"
#define LOCKFILE ".warp.lock"
@@ -59,7 +60,7 @@
# ifdef PRIVLIB
# define WARPLIB PRIVLIB
# else
-# define WARPLIB "/usr/games/warp"
+# define WARPLIB PREFIX"/games/warp"
# endif
#endif
@@ -267,7 +268,7 @@ EXT char amb[YSIZE][XSIZE];
/* preferred shell for use in doshell routine */
/* ksh or sh would be okay here */
#ifndef PREFSHELL
-# define PREFSHELL "/bin/csh"
+# define PREFSHELL "/bin/sh"
#endif
/* path to fastest starting shell */