1# 2# Copyright (c) 1989 The Regents of the University of California. 3# All rights reserved. 4# 5# This code is derived from software contributed to Berkeley by 6# Edward Estes. 7# 8# Redistribution and use in source and binary forms are permitted 9# provided that the above copyright notice and this paragraph are 10# duplicated in all such forms and that any documentation, 11# advertising materials, and other materials related to such 12# distribution and use acknowledge that the software was developed 13# by the University of California, Berkeley. The name of the 14# University may not be used to endorse or promote products derived 15# from this software without specific prior written permission. 16# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 17# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 18# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 19# 20# @(#)Makefile 5.6 (Berkeley) 03/06/89 21# 22# PLOTDEVICE is used for plotting the map. 23# Change as appropriate. 24PLOTDEVICE = > /dev/tty 25 26# The following are program constants which are implementation dependent. 27# 28# DEST is passed on. Note that there is no closing quote here. 29# WIZARD is the login of the one who will clean up things. 30# UID is the uid of game wizard. 31# define OK_TO_PLAY to restrict playing access at certain times. 32# Also see function ok_to_play() in main.c, and tailor to your own needs. 33# define ENEMY to include code for checking of a 'hit list' of resricted 34# accounts. The list of logins goes in the file 'enemy'. 35# SHELL is the default shell for shell escapes. If SHELL is not defined, 36# shell escapes are not enabled. 37 38DEST= /usr/games/lib/phantasia 39DESTR= /usr/games 40CFLAGS= -O -DDEST=\"${DEST} -DDESTR=\"${DESTR} -DWIZARD=\"root\" -DUID=0 \ 41 -DENEMY -DBSD42 42LIBC= /lib/libc.a 43SRCS= main.c fight.c io.c interplayer.c gamesupport.c misc.c phantglobs.c 44OBJS= main.o fight.o io.o interplayer.o gamesupport.o misc.o phantglobs.o 45MAN= phantasia.0 46 47# Make documentation. 48# The flags below on tbl and nroff are to make a line printable version. 49.6.0: 50 tbl -TX phantasia.6 | /usr/man/manroff > phantasia.0 51 52all: phantasia setup 53 54phantasia: ${OBJS} ${LIBC} 55 ${CC} ${OBJS} -o $@ -lm -lcurses -ltermlib 56 57# Make the initialization program. 58setup: phantglobs.o setup.o monsters.asc ${LIBC} 59 ${CC} phantglobs.o setup.o -o $@ -lm -lcurses -ltermlib 60 61install: ${MAN} 62 -[ -d ${DESTDIR}/usr/games/lib/phantasia ] || mkdir ${DESTDIR}/usr/games/lib/phantasia 63 chmod 700 /usr/games/lib/phantasia 64 chown games.bin /usr/games/lib/phantasia 65 install -s -o games -g bin -m 4700 phantasia ${DESTDIR}/usr/games/hide 66 (cd ${DESTDIR}/usr/games; rm -f phantasia; ln -s dm phantasia; chown games.bin phantasia) 67 install -c -o games -g bin -m 400 phantasia.0 ${DESTDIR}/usr/games/lib/phantasia/phant.help 68 install -c -o bin -g bin -m 444 phantasia.0 ${DESTDIR}/usr/man/cat6 69 ./setup 70 chown games.bin /usr/games/lib/phantasia/* 71 72# Make Phantasia map. 73# Change the map commands reflect your installation. 74# Pre-System III installations may use 'plot' instead of 'tplot'. 75map: map.c 76 ${CC} -O map.c -lplot -o $@ 77 map | tplot ${PLOTDEVICE} 78 79# Convert old character file to new format. 80# 'convert' is meant to be run only once. 81# PLUS = PHANTPLUS for conversion from 3.3.1+. 82convert: convert.c oldplayer.h phantstruct.h 83 ${CC} ${CFLAGS} ${PLUS} convert.c ${LDFLAGS} -o convert 84 convert 85 @echo "New data is in newcharacs." 86 87clean: 88 rm -f *.o core phantasia phant.help phantasia.0 setup 89 90cleandir: clean 91 rm -f ${MAN} tags .depend 92 93depend: ${SRCS} 94 mkdep ${CFLAGS} ${SRCS} 95 96lint: ${SRCS} 97 lint ${CFLAGS} ${SRCS} 98 99tags: ${SRCS} 100 ctags ${SRCS} 101