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.PATH: ${.CURDIR}/..
5
6PROG=	phantasia
7MAN=	phantasia.6
8SRCS=	main.c fight.c io.c interplayer.c gamesupport.c misc.c phantglobs.c
9DPADD=	${LIBM}
10LDADD=	-lm
11VARGAMES=
12GAMESCURSES=
13
14DATAFILES=	characs gold lastdead mess motd scoreboard void
15CLEANFILES=	${DATAFILES} map monsters
16
17FILES=		monsters
18FILESMODE=	660
19FILESGRP=	${BINGRP}
20FILESDIR=	/var/games/phantasia
21
22.ORDER: monsters ${DATAFILES}
23monsters ${DATAFILES}: monsters.asc setup.c
24	${.OBJDIR}/../setup/setup.nx -m ${.CURDIR}/../monsters.asc
25
26beforeinstall:
27.for file in ${DATAFILES}
28.if !exists(${DESTDIR}/var/games/phantasia/${file})
29	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 660 \
30	    ${file} ${DESTDIR}/var/games/phantasia
31.endif
32.endfor
33
34# Make Phantasia map.  Change the map commands reflect your installation.
35# PLOTDEVICE is used for plotting the map.  Change as appropriate.
36# Requires dports graphics/plotutils
37map: map.c
38	${CC} -static -O ${.CURDIR}/../map.c -L/usr/local/lib -lplot -o ${.TARGET}
39	./map | plot > /dev/tty
40
41.include <bsd.prog.mk>
42