Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[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.2 2003/06/17 04:25:24 dillon 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 DATAFILES=characs gold lastdead mess monsters motd scoreboard void
10 HIDEGAME=hidegame
11 MAN=    phantasia.6
12 CLEANFILES=${DATAFILES} cross-phantglobs.o map setup setup.o stamp.setuprun
13
14 all: stamp.setuprun
15
16 build-tools: setup
17
18 cross-phantglobs.o: phantglobs.c
19         ${CC} ${CFLAGS} -c -o ${.TARGET} ${.ALLSRC}
20
21 stamp.setuprun: monsters.asc setup
22         ./setup -m ${.CURDIR}/monsters.asc
23         touch ${.TARGET}
24
25 setup: cross-phantglobs.o setup.o ${LIBM}
26         ${CC} -static ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC:M*.o} -lm
27
28 beforeinstall:
29 .for file in ${DATAFILES}
30 .if !exists(${DESTDIR}/var/games/phantasia/${file})
31         ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 660 \
32             ${file} ${DESTDIR}/var/games/phantasia
33 .endif
34 .endfor
35
36 # Make Phantasia map.  Change the map commands reflect your installation.
37 # PLOTDEVICE is used for plotting the map.  Change as appropriate.
38 map: map.c
39         ${CC} -static -O ${.CURDIR}/map.c -lplot -o ${.TARGET}
40         ./map | plot > /dev/tty
41
42 .include <bsd.prog.mk>