1 # $NetBSD: Makefile,v 1.29 2003/10/19 01:01:44 lukem Exp $ 2 # @(#)Makefile 8.1 (Berkeley) 5/31/93 3 4 .include <bsd.own.mk> 5 6 PROG= phantasia 7 SRCS= fight.c gamesupport.c interplayer.c io.c main.c misc.c phantglobs.c 8 9 DPADD= ${LIBM} ${LIBCURSES} 10 LDADD= -lm -lcurses 11 HIDEGAME=hidegame 12 SETGIDGAME=yes 13 USETBL= 14 MAN= phantasia.6 15 16 FILESDIR=/var/games/phantasia 17 FILESOWN=games 18 FILESGRP=games 19 FILESMODE=0660 20 ALLFILES=gold lastdead mess monsters void motd characs scoreboard 21 FILES=gold lastdead mess monsters void motd 22 # don't overwrite existing characters or scorefile 23 .for file in characs scoreboard 24 .if !exists(${DESTDIR}${FILESDIR}/${file}) 25 FILES+=${file} 26 .endif 27 .endfor 28 29 CLEANFILES+=map setup setup.lo host_phantglobs.lo ${ALLFILES} 30 31 realall: ${FILES} 32 33 ${FILES}: setup 34 ${_MKMSG} " create ${.TARGET}" 35 ${_MKCMD}\ 36 ./setup -m ${.CURDIR}/monsters.asc 37 38 setup: host_phantglobs.lo setup.lo monsters.asc ${LIBM} 39 ${_MKMSG} "compile ${.TARGET}" 40 ${_MKCMD}\ 41 ${HOST_LINK.c} host_phantglobs.lo setup.lo -o ${.TARGET} -lm 42 43 BUILDSYMLINKS+= phantglobs.c host_phantglobs.c 44 HOST_CPPFLAGS+= -I${.CURDIR} 45 46 # Make Phantasia map. Change the map commands reflect your installation. 47 # PLOTDEVICE is used for plotting the map. Change as appropriate. 48 49 map: map.c 50 ${CC} -O ${.CURDIR}/map.c -lplot -o ${.TARGET} 51 ./map | plot > /dev/tty 52 53 .include <bsd.prog.mk> 54