summaryrefslogtreecommitdiffstats
path: root/tetris
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 /tetris
parent08eca96e71d96ad1f8e9b888875ab5570f208d19 (diff)
downloadbsdgames-darwin-23454acb66be2a88647262d98d50e0f115519ea0.tar.gz
bsdgames-darwin-23454acb66be2a88647262d98d50e0f115519ea0.tar.zst
bsdgames-darwin-23454acb66be2a88647262d98d50e0f115519ea0.zip
Use PREFIX now
Diffstat (limited to 'tetris')
-rw-r--r--tetris/Makefile8
-rw-r--r--tetris/pathnames.h4
2 files changed, 7 insertions, 5 deletions
diff --git a/tetris/Makefile b/tetris/Makefile
index aeda79a9..ebec48b6 100644
--- a/tetris/Makefile
+++ b/tetris/Makefile
@@ -8,13 +8,13 @@ MAN= tetris.6
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)
diff --git a/tetris/pathnames.h b/tetris/pathnames.h
index f96e3cc5..5a9ccc04 100644
--- a/tetris/pathnames.h
+++ b/tetris/pathnames.h
@@ -34,4 +34,6 @@
* @(#)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"