xref: /netbsd-src/games/phantasia/Makefile (revision 037708cbd4616ccd0d7d0381ebd3964d6696c188)
1#	$NetBSD: Makefile,v 1.6 1997/04/19 07:29:31 thorpej Exp $
2#	@(#)Makefile	8.1 (Berkeley) 5/31/93
3
4PROG=	phantasia
5SRCS=	main.c fight.c io.c interplayer.c gamesupport.c misc.c phantglobs.c
6DPADD=	${LIBM} ${LIBCURSES} ${LIBTERM} ${LIBCOMPAT}
7LDADD=	-lm -lcurses -ltermlib -lcompat
8HIDEGAME=hidegame
9MAN=	phantasia.6
10CLEANFILES+=map setup setup.o host_phantglobs.o
11
12all: setup phantasia
13
14setup: host_phantglobs.o setup.o monsters.asc ${LIBM}
15	${HOST_CC} host_phantglobs.o setup.o -o ${.TARGET} -lm
16
17host_phantglobs.o: ${.CURDIR}/phantglobs.c
18	${HOST_COMPILE.c} -o host_phantglobs.o ${.CURDIR}/phantglobs.c
19
20setup.o: ${.CURDIR}/setup.c
21	${HOST_COMPILE.c} ${.CURDIR}/setup.c
22
23beforeinstall:
24	./setup -m ${.CURDIR}/monsters.asc
25	chown games:bin ${DESTDIR}/var/games/phantasia/*
26
27# Make Phantasia map.  Change the map commands reflect your installation.
28# PLOTDEVICE is used for plotting the map.  Change as appropriate.
29
30map: map.c
31	${CC} -O ${.CURDIR}/map.c -lplot -o ${.TARGET}
32	./map | plot > /dev/tty
33
34# XXX this rule shouldn't be here.
35phantasia.cat6: phantasia.6
36	tbl ${.CURDIR}/phantasia.6 | nroff -man > ${.TARGET}
37
38.include <bsd.prog.mk>
39