bsd.dep.mk: fix race condition with beforedepend
[dragonfly.git] / games / phantasia / Makefile
blobff1d3c44468fd024f9c9e1acab7fc000056ac859
1 # @(#)Makefile 8.1 (Berkeley) 5/31/93
2 # $FreeBSD: src/games/phantasia/Makefile,v 1.16.2.2 2002/08/07 16:31:42 ru Exp $
3 # $DragonFly: src/games/phantasia/Makefile,v 1.5 2006/10/08 16:22:36 pavalos Exp $
5 PROG= phantasia
6 SRCS= main.c fight.c io.c interplayer.c gamesupport.c misc.c phantglobs.c
7 DPADD= ${LIBM} ${LIBCURSES} ${LIBTERMCAP} ${LIBCOMPAT}
8 LDADD= -lm -lcurses -ltermcap -lcompat
9 NXLDLIBS= -lm
10 DATAFILES=characs gold lastdead mess monsters motd scoreboard void
11 HIDEGAME=hidegame
12 MAN= phantasia.6
13 CLEANFILES=${DATAFILES} cross-phantglobs.no map setup.nx setup.no stamp.setuprun
15 all: stamp.setuprun
17 build-tools: setup.nx
19 cross-phantglobs.no: phantglobs.c
20 ${NXCC} ${NXCFLAGS} -c ${.ALLSRC} -o ${.TARGET}
22 stamp.setuprun: monsters.asc setup.nx
23 ./setup.nx -m ${.CURDIR}/monsters.asc
24 touch ${.TARGET}
26 setup.nx: cross-phantglobs.no setup.no ${LIBM}
27 ${NXCC} ${NXCFLAGS} ${NXLDFLAGS} ${.ALLSRC} ${NXLDLIBS} -o ${.TARGET}
29 beforeinstall:
30 .for file in ${DATAFILES}
31 .if !exists(${DESTDIR}/var/games/phantasia/${file})
32 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 660 \
33 ${file} ${DESTDIR}/var/games/phantasia
34 .endif
35 .endfor
37 # Make Phantasia map. Change the map commands reflect your installation.
38 # PLOTDEVICE is used for plotting the map. Change as appropriate.
39 map: map.c
40 ${CC} -static -O ${.CURDIR}/map.c -lplot -o ${.TARGET}
41 ./map | plot > /dev/tty
43 .include <bsd.prog.mk>