Initial import from FreeBSD RELENG_4:
[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 SRCS=   main.c fight.c io.c interplayer.c gamesupport.c misc.c phantglobs.c
6 DPADD=  ${LIBM} ${LIBCURSES} ${LIBTERMCAP} ${LIBCOMPAT}
7 LDADD=  -lm -lcurses -ltermcap -lcompat
8 DATAFILES=characs gold lastdead mess monsters motd scoreboard void
9 HIDEGAME=hidegame
10 MAN=    phantasia.6
11 CLEANFILES=${DATAFILES} cross-phantglobs.o map setup setup.o stamp.setuprun
12
13 all: stamp.setuprun
14
15 build-tools: setup
16
17 cross-phantglobs.o: phantglobs.c
18         ${CC} ${CFLAGS} -c -o ${.TARGET} ${.ALLSRC}
19
20 stamp.setuprun: monsters.asc setup
21         ./setup -m ${.CURDIR}/monsters.asc
22         touch ${.TARGET}
23
24 setup: cross-phantglobs.o setup.o ${LIBM}
25         ${CC} -static ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC:M*.o} -lm
26
27 beforeinstall:
28 .for file in ${DATAFILES}
29 .if !exists(${DESTDIR}/var/games/phantasia/${file})
30         ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 660 \
31             ${file} ${DESTDIR}/var/games/phantasia
32 .endif
33 .endfor
34
35 # Make Phantasia map.  Change the map commands reflect your installation.
36 # PLOTDEVICE is used for plotting the map.  Change as appropriate.
37 map: map.c
38         ${CC} -static -O ${.CURDIR}/map.c -lplot -o ${.TARGET}
39         ./map | plot > /dev/tty
40
41 .include <bsd.prog.mk>