dbf4400ff0647fc9b2c2120e108d56af280bd333
[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
4 PROG=   phantasia
5 MAN=    phantasia.6
6 SRCS=   main.c fight.c io.c interplayer.c gamesupport.c misc.c phantglobs.c
7 DPADD=  ${LIBM} ${LIBNCURSES}
8 LDADD=  -lm -lprivate_ncurses
9
10 CFLAGS+=        -I${_SHLIBDIRPREFIX}/usr/include/priv/ncurses
11 LDFLAGS+=       ${PRIVATELIB_LDFLAGS}
12
13 NXLDLIBS=       -lm
14 DATAFILES=      characs gold lastdead mess monsters motd scoreboard void
15 HIDEGAME=       hidegame
16 CLEANFILES=     ${DATAFILES} cross-phantglobs.no map setup.nx setup.no \
17                 stamp.setuprun
18
19 all: stamp.setuprun
20
21 build-tools: setup.nx
22
23 cross-phantglobs.no: phantglobs.c
24         ${NXCC} ${NXCFLAGS} -c ${.ALLSRC} -o ${.TARGET}
25
26 stamp.setuprun: monsters.asc setup.nx
27         ./setup.nx -m ${.CURDIR}/monsters.asc
28         touch ${.TARGET}
29
30 setup.nx: cross-phantglobs.no setup.no ${LIBM}
31         ${NXCC} ${NXCFLAGS} ${NXLDFLAGS} ${.ALLSRC} ${NXLDLIBS} -o ${.TARGET}
32
33 beforeinstall:
34 .for file in ${DATAFILES}
35 .if !exists(${DESTDIR}/var/games/phantasia/${file})
36         ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 660 \
37             ${file} ${DESTDIR}/var/games/phantasia
38 .endif
39 .endfor
40
41 # Make Phantasia map.  Change the map commands reflect your installation.
42 # PLOTDEVICE is used for plotting the map.  Change as appropriate.
43 map: map.c
44         ${CC} -static -O ${.CURDIR}/map.c -lplot -o ${.TARGET}
45         ./map | plot > /dev/tty
46
47 .include <bsd.prog.mk>