summaryrefslogtreecommitdiffstats
path: root/phantasia/Makefile
diff options
context:
space:
mode:
authorsimonb <simonb@NetBSD.org>2001-03-27 02:23:28 +0000
committersimonb <simonb@NetBSD.org>2001-03-27 02:23:28 +0000
commitbae50c403e053e5ef8d399f1adb6677e2c4fabf8 (patch)
treead61e58e0c87ee85362e899cdc03c25592f39846 /phantasia/Makefile
parent00b8e31689c6400d8ad915067f021b8e246df989 (diff)
downloadbsdgames-darwin-bae50c403e053e5ef8d399f1adb6677e2c4fabf8.tar.gz
bsdgames-darwin-bae50c403e053e5ef8d399f1adb6677e2c4fabf8.tar.zst
bsdgames-darwin-bae50c403e053e5ef8d399f1adb6677e2c4fabf8.zip
Build the data files in the obj/compile directory and install them with
FILES and FILESDIR. "Problem" reported by David Querbach on current-users.
Diffstat (limited to 'phantasia/Makefile')
-rw-r--r--phantasia/Makefile29
1 files changed, 20 insertions, 9 deletions
diff --git a/phantasia/Makefile b/phantasia/Makefile
index 35afaa32..e7f31f06 100644
--- a/phantasia/Makefile
+++ b/phantasia/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2000/06/20 16:07:04 matt Exp $
+# $NetBSD: Makefile,v 1.22 2001/03/27 02:23:28 simonb Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93
.include <bsd.own.mk> # for UNPRIVILEGED
@@ -12,9 +12,26 @@ HIDEGAME=hidegame
SETGIDGAME=yes
USETBL=
MAN= phantasia.6
-CLEANFILES+=map setup setup.lo host_phantglobs.lo
-realall: setup phantasia
+FILESDIR=/var/games/phantasia
+FILESOWN=games
+FILESGRP=games
+FILESMODE=0660
+ALLFILES=gold lastdead mess monsters void motd characs scoreboard
+FILES=gold lastdead mess monsters void motd
+# don't overwrite existing characters or scorefile
+.for file in characs scoreboard
+.if !exists(${DESTDIR}/${FILESDIR}/${file})
+FILES+=${file}
+.endif
+.endfor
+
+CLEANFILES+=map setup setup.lo host_phantglobs.lo ${ALLFILES}
+
+${PROG}: ${FILES}
+
+${FILES}: setup
+ ${.OBJDIR}/setup -m ${.CURDIR}/monsters.asc
setup: host_phantglobs.lo setup.lo monsters.asc ${LIBM}
${HOST_LINK.c} host_phantglobs.lo setup.lo -o ${.TARGET} -lm
@@ -25,12 +42,6 @@ host_phantglobs.lo: ${.CURDIR}/phantglobs.c
setup.lo: ${.CURDIR}/setup.c
${HOST_COMPILE.c} -o setup.lo ${.CURDIR}/setup.c
-afterinstall:
- DESTDIR=${DESTDIR} ./setup -m ${.CURDIR}/monsters.asc
-.if !defined(UNPRIVILEGED)
- chown games:games ${DESTDIR}/var/games/phantasia/*
-.endif
-
# Make Phantasia map. Change the map commands reflect your installation.
# PLOTDEVICE is used for plotting the map. Change as appropriate.