wargames warp worm worms wtf wump
TOPTARGETS= all clean install
+PREFIX ?= /usr
+LOCALSTATEDIR ?= /var
+SYSCONFDIR ?= /etc
+ROOT := $(shell pwd)
+
+export ROOT PREFIX LOCALSTATEDIR SYSCONFDIR
+
$(TOPTARGETS): $(SUBDIR)
-$(SUBDIR):
- $(MAKE) -C $@ $(MAKECMDGOALS)
+$(SUBDIR): config.h
+ +$(MAKE) -C $@ $(MAKECMDGOALS)
+
+config.h:
+ @echo "#define PREFIX \"$(PREFIX)\"" > config.h
+ @echo "#define LOCALSTATEDIR \"$(LOCALSTATEDIR)\"" >> config.h
+ @echo "#define SYSCONFDIR \"$(SYSCONFDIR)\"" >> config.h
+
+clean:
+ rm -f config.h
.PHONY: $(TOPTARGETS) $(SUBDIR)
clang -o mkdata setup.c
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
clean:
rm -f $(CLEANFILES) $(PROG)
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
clean:
rm -f $(CLEANFILES) $(PROG)
main.c tunable.c update.c
MAN= atc.6
FILES=${GAMES:S@^@${.CURDIR}/games/@g}
-FILESDIR=/usr/share/games/atc
+FILESDIR=$(PREFIX)/share/games/atc
FILESMODE=644
all: $(PROG)
$(PROG): $(SRCS) grammar.y lex.l
yacc -d grammar.y -o grammar.c
lex lex.l
- $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) grammar.c lex.yy.c -lncursesw $(LIBFLA)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) grammar.c lex.yy.c -lncursesw $(LIBFLA) -I$(ROOT)
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm2755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
- mkdir -p $(DESTDIR)/usr/share/games
- cp -r games $(DESTDIR)/usr/share/games/atc
- chmod -R 644 $(DESTDIR)/usr/share/games/atc/*
- mkdir -p $(DESTDIR)/var/games/
+ $(GINSTALL) -Dm2755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
+ mkdir -p $(DESTDIR)/$(PREFIX)/share/games
+ cp -r games $(DESTDIR)/$(PREFIX)/share/games/atc
+ chmod -R 644 $(DESTDIR)/$(PREFIX)/share/games/atc/*
+ mkdir -p $(DESTDIR)/$(LOCALSTATEDIR)/games/
clean:
#include <paths.h>
-#define _PATH_GAMES "/usr/share/games/atc/"
-#define _PATH_SCORE "/var/games/atc_score"
+#include "config.h"
+
+#define _PATH_GAMES PREFIX"/share/games/atc/"
+#define _PATH_SCORE LOCALSTATEDIR"/games/atc_score"
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
clean:
rm -f $(CLEANFILES) $(PROG)
$(STRIP) $(PROG)
install: $(PROG)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
clean:
rm -f $(CLEANFILES) $(PROG)
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
clean:
rm -f $(CLEANFILES) $(PROG)
all: $(PROG)
$(PROG): $(SRCS)
- $(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)
clean:
rm -f $(CLEANFILES) $(PROG)
* @(#)pathnames.h 8.1 (Berkeley) 5/31/93
*/
-#define _PATH_SCORE "/var/games/battlestar.log"
+#include "config.h"
+
+#define _PATH_SCORE LOCALSTATEDIR"/games/battlestar.log"
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
- $(LN) -sf $(MAN).zst $(DESTDIR)/usr/share/man/man6/morse.6
- $(LN) -sf $(MAN).zst $(DESTDIR)/usr/share/man/man6/ppt.6
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
+ $(LN) -sf $(MAN).zst $(DESTDIR)/$(PREFIX)/share/man/man6/morse.6
+ $(LN) -sf $(MAN).zst $(DESTDIR)/$(PREFIX)/share/man/man6/ppt.6
clean:
rm -f $(CLEANFILES) $(PROG)
./mkindex/mkindex < dictionary > dictindex
install: dictindex dictionary boggle
- $(GINSTALL) -Dm644 dictionary $(DESTDIR)/usr/share/games/boggle/dictionary
- $(GINSTALL) -Dm644 dictindex $(DESTDIR)/usr/share/games/boggle/dictindex
+ $(GINSTALL) -Dm644 dictionary $(DESTDIR)/$(PREFIX)/share/games/boggle/dictionary
+ $(GINSTALL) -Dm644 dictindex $(DESTDIR)/$(PREFIX)/share/games/boggle/dictindex
$(MAKE) -C boggle install
.PHONY: all clean install mkdict mkindex boggle
all: boggle
$(PROG): $(SRCS)
- $(CC) $(CFLAGS) $(LDFLAGS) $(SRCS) -o $(PROG) -lncursesw
+ $(CC) $(CFLAGS) $(LDFLAGS) $(SRCS) -o $(PROG) -lncursesw -I$(ROOT)
$(STRIP) boggle
clean:
rm -f boggle
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
.PHONY: all clean install
* @(#)bog.h 8.1 (Berkeley) 6/11/93
*/
+#include "config.h"
+
#define LOADDICT 1 /* Load the dictionary for speed */
/*
* Locations for the dictionary (generated by mkdict),
* index (generated by mkindex), and helpfile
*/
-#define DICT "/usr/share/games/boggle/dictionary"
-#define DICTINDEX "/usr/share/games/boggle/dictindex"
-#define HELPFILE "/usr/share/games/boggle/helpfile"
+#define DICT PREFIX"/share/games/boggle/dictionary"
+#define DICTINDEX PREFIX"/share/games/boggle/dictindex"
+#define HELPFILE PREFIX"/share/games/boggle/helpfile"
/*
* The theoretical maximum for MAXWORDLEN is ('a' - 1) == 96
mkdict: mkdict.c
- clang -o mkdict mkdict.c -I../boggle
+ clang -o mkdict mkdict.c -I../boggle -I$(ROOT)
clean:
rm -f mkdict
mkindex: mkindex.c
- clang -o mkindex mkindex.c -I../boggle
+ clang -o mkindex mkindex.c -I../boggle -I$(ROOT)
clean:
rm -f mkindex
$(STRIP) $(PROG)
install: $(PROG) $(MAN) $(SCRIPTS)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm755 $(SCRIPTS) $(DESTDIR)/usr/games/$(basename $(SCRIPTS))
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
- $(LN) -sf $(MAN).zst $(DESTDIR)/usr/share/man/man6/rot13.6
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm755 $(SCRIPTS) $(DESTDIR)/$(PREFIX)/games/$(basename $(SCRIPTS))
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
+ $(LN) -sf $(MAN).zst $(DESTDIR)/$(PREFIX)/share/man/man6/rot13.6
clean:
rm -f $(CLEANFILES) $(PROG)
all: $(PROG)
$(PROG): $(SRCS)
- $(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)
clean:
rm -f $(CLEANFILES) $(PROG)
* @(#)pathnames.h 8.1 (Berkeley) 5/31/93
*/
-#define _PATH_SCORE "/var/games/cfscores"
+#include "config.h"
+
+#define _PATH_SCORE LOCALSTATEDIR"/games/cfscores"
all: $(PROG)
$(PROG): $(SRCS)
- $(CC) $(CFLAGS) -o $(PROG) $(SRCS) -I../canfield
+ $(CC) $(CFLAGS) -o $(PROG) $(SRCS) -I../canfield -I$(ROOT)
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
clean:
rm -f $(CLEANFILES) $(PROG)
all: $(PROG)
$(PROG): $(SRCS)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) -lncursesw
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) -lncursesw -I$(ROOT)
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
clean:
rm -f $(CLEANFILES) $(PROG)
* POSSIBILITY OF SUCH DAMAGE.
*/
-#define _PATH_FORTUNE "/usr/games/fortune"
+#include "config.h"
+
+#define _PATH_FORTUNE PREFIX"/games/fortune"
PROG= castching
SRCS= castching.c
-BINDIR= /usr/libexec/ching
+BINDIR= $(PREFIX)/libexec/ching
all: $(PROG)
$(STRIP) $(PROG)
install: $(PROG)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/libexec/ching/$(PROG)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(BINDIR)/$(PROG)
clean:
rm -f $(CLEANFILES) $(PROG)
MAN= ching.6
FILES= hexagrams macros
-FILESDIR=/usr/share/games/ching
+FILESDIR=$(PREFIX)/share/games/ching
all:
install: $(PROG) $(MAN) $(SCRIPTS)
- $(GINSTALL) -Dm755 $(SCRIPTS) $(DESTDIR)/usr/games/$(basename $(SCRIPTS))
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(SCRIPTS) $(DESTDIR)/$(PREFIX)/games/$(basename $(SCRIPTS))
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
$(GINSTALL) -d $(DESTDIR)$(FILESDIR)
$(GINSTALL) -Dm644 $(FILES) $(DESTDIR)$(FILESDIR)
all: $(PROG)
$(PROG): $(SRCS)
- $(CC) $(CFLAGS) -o $(PROG) $(SRCS) -I../include
+ $(CC) $(CFLAGS) -o $(PROG) $(SRCS) -I../include -I$(ROOT)
$(STRIP) $(PROG)
install: $(PROG)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/libexec/ching/$(PROG)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/libexec/ching/$(PROG)
clean:
rm -f $(CLEANFILES) $(PROG)
* @(#)pathnames.h 8.1 (Berkeley) 5/31/93
*/
-#define _PATH_HEX "/usr/share/games/ching/hexagrams"
+#include "config.h"
+
+#define _PATH_HEX PREFIX"/share/games/ching/hexagrams"
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
clean:
rm -f $(CLEANFILES) $(PROG)
# $NetBSD: Makefile,v 1.3 1999/02/13 23:53:57 lukem Exp $
SCRIPTS= countmail
-SCRIPTSDIR= /usr/games
MAN= countmail.6
all:
install: $(PROG) $(MAN) $(SCRIPTS)
- $(GINSTALL) -Dm755 $(SCRIPTS) $(DESTDIR)/usr/games/$(SCRIPTS)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(SCRIPTS) $(DESTDIR)/$(PREFIX)/games/$(SCRIPTS)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
.PHONY: all install clean
all: $(PROG)
$(PROG): $(SRCS)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) -lncursesw
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) -lncursesw -I$(ROOT)
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
- $(GINSTALL) -Dm644 $(FILES) $(DESTDIR)/usr/share/games/$(FILESNAME)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm644 $(FILES) $(DESTDIR)/$(PREFIX)/share/games/$(FILESNAME)
clean:
rm -f $(CLEANFILES) $(PROG)
* @(#)pathnames.h 8.1 (Berkeley) 5/31/93
*/
-#define _PATH_INSTR "/usr/share/games/cribbage.instr"
-#define _PATH_LOG "/var/games/criblog"
-#define _PATH_MORE "/usr/bin/more"
+#include "config.h"
+
+#define _PATH_INSTR PREFIX"/share/games/cribbage.instr"
+#define _PATH_LOG LOCALSTATEDIR"/games/criblog"
+#define _PATH_MORE PREFIX"/bin/more"
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
clean:
rm -f $(CLEANFILES) $(PROG)
all: $(PROG)
$(PROG): $(SRCS)
- $(CC) $(CFLAGS) -o $(PROG) $(SRCS) -DSUPPORT_UTMPX
+ $(CC) $(CFLAGS) -o $(PROG) $(SRCS) -DSUPPORT_UTMPX -I$(ROOT)
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN8) $(DESTDIR)/usr/share/man/man8/$(MAN8)
- $(GINSTALL) -Dm644 $(MAN5) $(DESTDIR)/usr/share/man/man5/$(MAN5)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN8) $(DESTDIR)/$(PREFIX)/share/man/man8/$(MAN8)
+ $(GINSTALL) -Dm644 $(MAN5) $(DESTDIR)/$(PREFIX)/share/man/man5/$(MAN5)
clean:
rm -f $(CLEANFILES) $(PROG)
* @(#)pathnames.h 8.1 (Berkeley) 5/31/93
*/
-#define _PATH_CONFIG "/etc/dm.conf"
-#define _PATH_HIDE "/usr/games/hide/"
-#define _PATH_LOG "/var/log/games.log"
-#define _PATH_NOGAMES "/etc/nogames"
+#include "config.h"
+
+#define _PATH_CONFIG SYSCONFDIR"/dm.conf"
+#define _PATH_HIDE PREFIX"/games/hide/"
+#define _PATH_LOG LOCALSTATEDIR"/log/games.log"
+#define _PATH_NOGAMES SYSCONFDIR"/nogames"
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
clean:
rm -f $(CLEANFILES) $(PROG)
all: $(PROG)
$(PROG): $(SRCS)
- $(CC) $(CFLAGS) -o $(PROG) $(SRCS)
+ $(CC) $(CFLAGS) -o $(PROG) $(SRCS) -I$(ROOT)
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/bsd-$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/bsd-$(MAN)
- $(GINSTALL) -Dm644 $(FILES) $(DESTDIR)/usr/share/games/bsd-$(FILES)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/bsd-$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/bsd-$(MAN)
+ $(GINSTALL) -Dm644 $(FILES) $(DESTDIR)/$(PREFIX)/share/games/bsd-$(FILES)
clean:
rm -f $(CLEANFILES) $(PROG)
* @(#)pathnames.h 8.1 (Berkeley) 5/31/93
*/
-#define _PATH_INSTR "/usr/share/games/fish.instr"
-#define _PATH_MORE "/usr/bin/more"
+#include "config.h"
+
+#define _PATH_INSTR PREFIX"/share/games/fish.instr"
+#define _PATH_MORE PREFIX"/bin/more"
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
clean:
rm -f $(CLEANFILES) $(PROG)
MAN= hack.6
CLEANFILES+=makedefs
FILES=help hh data
-FILESDIR=/var/games/hackdir
+FILESDIR=$(LOCALSTATEDIR)/games/hackdir
CLEANFILES+=hack.onames.h
all: $(PROG)
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)
#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[] = {
#ifndef _HACK_H_
#define _HACK_H_
-#include "config.h"
+#include "hack-config.h"
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
* @(#)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"
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
clean:
rm -f $(CLEANFILES) $(PROG)
all: $(PROG)
$(PROG): $(SRCS)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) -lncursesw
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) -lncursesw -I$(ROOT)
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
clean:
rm -f $(CLEANFILES) $(PROG)
* @(#)pathnames.h 8.1 (Berkeley) 5/31/93
*/
-#define _PATH_DICT "/usr/share/dict/words"
+#include "config.h"
+
+#define _PATH_DICT PREFIX"/share/dict/words"
all: $(PROG)
$(PROG): $(SRCS)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) $(EXTRADEFS) -I../include -lncursesw
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) $(EXTRADEFS) -I../include -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)
clean:
rm -f $(CLEANFILES) $(PROG)
all: $(PROG)
$(PROG): $(SRCS)
- $(CC) $(CFLAGS) -o $(PROG) $(SRCS) $(EXTRADEFS) -I../include
+ $(CC) $(CFLAGS) -o $(PROG) $(SRCS) $(EXTRADEFS) -I../include -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)
clean:
rm -f $(CLEANFILES) $(PROG)
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#define PATH_HUNTD "/usr/games/huntd"
+#include "config.h"
+
+#define PATH_HUNTD PREFIX"/games/huntd"
#define PATH_HUNTSOCKET "/tmp/hunt"
#define PATH_STATSOCKET "/tmp/hunt.stats"
all: $(PROG)
$(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)
- $(GINSTALL) -Dm2755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
- $(GINSTALL) -d $(DESTDIR)/usr/share/games/larn
- $(GINSTALL) -Dm644 $(FILES) $(DESTDIR)/usr/share/games/larn/
+ $(GINSTALL) -Dm2755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
+ $(GINSTALL) -d $(DESTDIR)/$(PREFIX)/share/games/larn
+ $(GINSTALL) -Dm644 $(FILES) $(DESTDIR)/$(PREFIX)/share/games/larn/
clean:
rm -f $(CLEANFILES) $(PROG)
* @(#)pathnames.h 5.2 (Berkeley) 4/27/95
*/
-#define _PATH_LOG "/var/games/larn/llog12.0"
-#define _PATH_SCORE "/var/games/larn/lscore12.0"
-#define _PATH_HELP "/usr/share/games/larn/larn.help"
-#define _PATH_LEVELS "/usr/share/games/larn/larnmaze"
-#define _PATH_PLAYERIDS "/var/games/larn/playerids"
+#include "config.h"
+
+#define _PATH_LOG LOCALSTATEDIR"/games/larn/llog12.0"
+#define _PATH_SCORE LOCALSTATEDIR"/games/larn/lscore12.0"
+#define _PATH_HELP PREFIX"/share/games/larn/larn.help"
+#define _PATH_LEVELS PREFIX"/share/games/larn/larnmaze"
+#define _PATH_PLAYERIDS LOCALSTATEDIR"/games/larn/playerids"
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
clean:
rm -f $(CLEANFILES) $(PROG)
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
clean:
rm -f $(CLEANFILES) $(PROG)
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
clean:
rm -f $(CLEANFILES) $(PROG)
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
clean:
rm -f $(CLEANFILES) $(PROG)
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
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.
./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)
* @(#)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"
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
clean:
rm -f $(CLEANFILES) $(PROG)
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
clean:
rm -f $(CLEANFILES) $(PROG)
$(STRIP) $(PROG)
install: $(PROG)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
clean:
rm -f $(CLEANFILES) $(PROG)
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
clean:
rm -f $(CLEANFILES) $(PROG)
midearth morse mult murders poetry posneg pres province seq-easy \
seq-hard sexes sov spell state trek ucc
FILES= $(addprefix datfiles/,$(CATS))
-FILESDIR=/usr/share/games/quiz.db
+FILESDIR=$(PREFIX)/share/games/quiz.db
all: $(PROG)
$(PROG): $(SRCS)
- $(CC) $(CFLAGS) -o $(PROG) $(SRCS)
+ $(CC) $(CFLAGS) -o $(PROG) $(SRCS) -I$(ROOT)
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
$(GINSTALL) -d $(DESTDIR)$(FILESDIR)
$(GINSTALL) -Dm644 $(FILES) $(DESTDIR)$(FILESDIR)
* @(#)pathnames.h 8.1 (Berkeley) 5/31/93
*/
-#define _PATH_PAGER "/usr/bin/more"
-#define _PATH_QUIZIDX "/usr/share/games/quiz.db/index"
+#include "config.h"
+
+#define _PATH_PAGER PREFIX"/bin/more"
+#define _PATH_QUIZIDX PREFIX"/share/games/quiz.db/index"
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
clean:
rm -f $(CLEANFILES) $(PROG)
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
clean:
rm -f $(CLEANFILES) $(PROG)
all: $(PROG)
$(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)
- $(GINSTALL) -Dm2755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
- $(GINSTALL) -d $(DESTDIR)/var/games
+ $(GINSTALL) -Dm2755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
+ $(GINSTALL) -d $(DESTDIR)/$(LOCALSTATEDIR)/games
clean:
rm -f $(CLEANFILES) $(PROG)
* @(#)pathnames.h 8.1 (Berkeley) 5/31/93
*/
-#define _PATH_SCORE "/var/games/robots_roll"
+#include "config.h"
+
+#define _PATH_SCORE LOCALSTATEDIR"/games/robots_roll"
all: $(PROG)
$(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)
- $(GINSTALL) -Dm2755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
- $(GINSTALL) -d $(DESTDIR)/var/games
+ $(GINSTALL) -Dm2755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
+ $(GINSTALL) -d $(DESTDIR)/$(LOCALSTATEDIR)/games
clean:
rm -f $(CLEANFILES) $(PROG)
* @(#)pathnames.h 8.1 (Berkeley) 5/31/93
*/
-#define _PATH_SCOREFILE "/var/games/rogue.scores"
+#include "config.h"
+
+#define _PATH_SCOREFILE LOCALSTATEDIR"/games/rogue.scores"
#define _PATH_SCREENDUMP "rogue.screen"
all: $(PROG)
$(PROG): $(SRCS)
- $(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) -d $(DESTDIR)/var/games
+ $(GINSTALL) -Dm2755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
+ $(GINSTALL) -d $(DESTDIR)/$(LOCALSTATEDIR)/games
clean:
rm -f $(CLEANFILES) $(PROG)
* @(#)pathnames.h 8.1 (Berkeley) 5/31/93
*/
-#define _PATH_LOGFILE "/var/games/saillog"
-#define _PATH_SAILDIR "/var/games/sail"
+#include "config.h"
+
+#define _PATH_LOGFILE LOCALSTATEDIR"/games/saillog"
+#define _PATH_SAILDIR LOCALSTATEDIR"/games/sail"
/* in _PATH_SAILDIR */
#define _FILE_SYNC "#sailsink.%d"
all: $(PROG)
$(PROG): $(SRCS)
- $(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) -d $(DESTDIR)/var/games
+ $(GINSTALL) -Dm2755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
+ $(GINSTALL) -d $(DESTDIR)/$(LOCALSTATEDIR)/games
clean:
rm -f $(CLEANFILES) $(PROG)
* @(#)pathnames.h 8.1 (Berkeley) 5/31/93
*/
-#define _PATH_RAWSCORES "/var/games/snakerawscores"
-#define _PATH_LOGFILE "/var/games/snake.log"
+#include "config.h"
+
+#define _PATH_RAWSCORES LOCALSTATEDIR"/games/snakerawscores"
+#define _PATH_LOGFILE LOCALSTATEDIR"/games/snake.log"
all: $(PROG)
$(PROG): $(SRCS)
- $(CC) $(CFLAGS) -o $(PROG) $(SRCS) -I../snake
+ $(CC) $(CFLAGS) -o $(PROG) $(SRCS) -I../snake -I$(ROOT)
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm2755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
+ $(GINSTALL) -Dm2755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
clean:
rm -f $(CLEANFILES) $(PROG)
$(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)
clean:
rm -f $(CLEANFILES) $(PROG)
all: $(PROG)
$(PROG): $(SRCS)
- $(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) -d $(DESTDIR)/var/games
+ $(GINSTALL) -Dm2755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
+ $(GINSTALL) -d $(DESTDIR)/$(LOCALSTATEDIR)/games
clean:
rm -f $(CLEANFILES) $(PROG)
* @(#)pathnames.h 8.1 (Berkeley) 5/31/93
*/
-#define _PATH_SCOREFILE "/var/games/tetris.scores"
+#include "config.h"
+
+#define _PATH_SCOREFILE LOCALSTATEDIR"/games/tetris.scores"
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
clean:
rm -f $(CLEANFILES) $(PROG)
all:
install: $(MAN) $(SCRIPTS)
- $(GINSTALL) -Dm755 $(SCRIPTS) $(DESTDIR)/usr/games/$(basename $(SCRIPTS))
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(SCRIPTS) $(DESTDIR)/$(PREFIX)/games/$(basename $(SCRIPTS))
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
.PHONY: all install clean
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)
./sm < smp.7 > $@
sm: sm.c
- clang -o $@ sm.c
+ clang -o $@ sm.c -I$(ROOT)
.PHONY: all clean install
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
-#include "config.h"
+#include "warp-config.h"
int
main(void)
+#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
* 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.
#endif
/* warp private library, may use ~ expansion, %x and %l */
-#define PRIVLIB "/usr/share/games/warp" /**/
+#define PRIVLIB PREFIX"/share/games/warp" /**/
#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>
* access.)
*/
-#define SAVEDIR "/var/games/warp"
+#define SAVEDIR LOCALSTATEDIR"/games/warp"
#define NEWSFILE "warp.news"
#define HELPFILE "warp.doc"
#define LOCKFILE ".warp.lock"
# ifdef PRIVLIB
# define WARPLIB PRIVLIB
# else
-# define WARPLIB "/usr/games/warp"
+# define WARPLIB PREFIX"/games/warp"
# endif
#endif
/* 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 */
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
clean:
rm -f $(CLEANFILES) $(PROG)
$(STRIP) $(PROG)
install: $(PROG) $(MAN)
- $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
clean:
rm -f $(CLEANFILES) $(PROG)
all:
install: $(MAN) $(SCRIPTS)
- $(GINSTALL) -Dm755 $(SCRIPTS) $(DESTDIR)/usr/games/$(basename $(SCRIPTS))
- $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+ $(GINSTALL) -Dm755 $(SCRIPTS) $(DESTDIR)/$(PREFIX)/games/$(basename $(SCRIPTS))
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
.PHONY: all install clean
MAN= wump.6
SRCS= wump.c
FILES=wump.info
-FILESDIR=/usr/share/games
+FILESDIR=$(PREFIX)/share/games
all: $(PROG)
$(PROG): $(SRCS)
- $(CC) $(CFLAGS) -o $(PROG) $(SRCS)
+ $(CC) $(CFLAGS) -o $(PROG) $(SRCS) -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)
$(GINSTALL) -Dm644 $(FILES) $(DESTDIR)$(FILESDIR)
clean:
* @(#)pathnames.h 8.1 (Berkeley) 5/31/93
*/
-#define _PATH_PAGER "/usr/bin/more"
-#define _PATH_WUMPINFO "/usr/share/games/wump.info"
+#include "config.h"
+
+#define _PATH_PAGER PREFIX"/bin/more"
+#define _PATH_WUMPINFO PREFIX"/share/games/wump.info"