Merge from vendor branch GROFF:
[dragonfly.git] / games / phantasia / Makefile
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.4 2005/05/31 00:06:26 swildner Exp $
4
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
14 WARNS?= 6
15
16 all: stamp.setuprun
17
18 build-tools: setup.nx
19
20 cross-phantglobs.no: phantglobs.c
21         ${NXCC} ${NXCFLAGS} -c ${.ALLSRC} -o ${.TARGET}
22
23 stamp.setuprun: monsters.asc setup.nx
24         ./setup.nx -m ${.CURDIR}/monsters.asc
25         touch ${.TARGET}
26
27 setup.nx: cross-phantglobs.no setup.no ${LIBM}
28         ${NXCC} ${NXCFLAGS} ${NXLDFLAGS} ${.ALLSRC} ${NXLDLIBS} -o ${.TARGET}
29
30 beforeinstall:
31 .for file in ${DATAFILES}
32 .if !exists(${DESTDIR}/var/games/phantasia/${file})
33         ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 660 \
34             ${file} ${DESTDIR}/var/games/phantasia
35 .endif
36 .endfor
37
38 # Make Phantasia map.  Change the map commands reflect your installation.
39 # PLOTDEVICE is used for plotting the map.  Change as appropriate.
40 map: map.c
41         ${CC} -static -O ${.CURDIR}/map.c -lplot -o ${.TARGET}
42         ./map | plot > /dev/tty
43
44 .include <bsd.prog.mk>