Initial import from FreeBSD RELENG_4:
[dragonfly.git] / games / phantasia / Makefile
CommitLineData
984263bc
MD
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
4PROG= phantasia
5SRCS= main.c fight.c io.c interplayer.c gamesupport.c misc.c phantglobs.c
6DPADD= ${LIBM} ${LIBCURSES} ${LIBTERMCAP} ${LIBCOMPAT}
7LDADD= -lm -lcurses -ltermcap -lcompat
8DATAFILES=characs gold lastdead mess monsters motd scoreboard void
9HIDEGAME=hidegame
10MAN= phantasia.6
11CLEANFILES=${DATAFILES} cross-phantglobs.o map setup setup.o stamp.setuprun
12
13all: stamp.setuprun
14
15build-tools: setup
16
17cross-phantglobs.o: phantglobs.c
18 ${CC} ${CFLAGS} -c -o ${.TARGET} ${.ALLSRC}
19
20stamp.setuprun: monsters.asc setup
21 ./setup -m ${.CURDIR}/monsters.asc
22 touch ${.TARGET}
23
24setup: cross-phantglobs.o setup.o ${LIBM}
25 ${CC} -static ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC:M*.o} -lm
26
27beforeinstall:
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.
37map: map.c
38 ${CC} -static -O ${.CURDIR}/map.c -lplot -o ${.TARGET}
39 ./map | plot > /dev/tty
40
41.include <bsd.prog.mk>