1# $NetBSD: Makefile,v 1.38 2023/10/07 12:15:52 rin Exp $ 2# @(#)Makefile 8.1 (Berkeley) 5/31/93 3 4.include <bsd.own.mk> 5 6PROG= phantasia 7SRCS= fight.c gamesupport.c interplayer.c io.c main.c misc.c phantglobs.c 8 9DPADD= ${LIBM} ${LIBCURSES} ${LIBTERMINFO} 10LDADD= -lm -lcurses -lterminfo 11HIDEGAME=hidegame 12SETGIDGAME=yes 13USETBL= 14MAN= phantasia.6 15 16FILESDIR=/var/games/phantasia 17FILESOWN=games 18FILESGRP=games 19FILESMODE=0660 20ALLFILES=gold lastdead mess monsters void motd characs scoreboard 21FILES=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}) 25FILES+=${file} 26.endif 27.endfor 28 29CLEANFILES+=map mkdata setup.lo host_phantglobs.lo ${ALLFILES} files.stamp 30 31realall: ${FILES} 32 33${FILES}: files.stamp 34files.stamp: mkdata monsters.asc 35 ${_MKMSG_CREATE} ${FILES} 36 rm -f ${.TARGET} 37 ./mkdata -m ${.CURDIR}/monsters.asc 38 touch ${.TARGET} 39 40mkdata: host_phantglobs.lo setup.lo ${LIBM} 41 ${_MKTARGET_LINK} 42 ${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC:M*.lo} -lm 43 44BUILDSYMLINKS+= phantglobs.c host_phantglobs.c 45HOST_CPPFLAGS+= -I${.CURDIR} 46 47# Make Phantasia map. Change the map commands reflect your installation. 48# PLOTDEVICE is used for plotting the map. Change as appropriate. 49 50map: map.c 51 ${CC} -O ${.CURDIR}/map.c -lplot -o ${.TARGET} 52 ./map | plot > /dev/tty 53 54.include <bsd.prog.mk> 55