1# 2# Hunt 3# Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold 4# San Francisco, California 5# 6SHELL= /bin/sh 7HDR= hunt.h bsd.h talk_ctl.h 8DSRC1= answer.c driver.c draw.c execute.c expl.c makemaze.c 9DSRC2= shots.c terminal.c extern.c \ 10 faketalk.c ctl.c ctl_transact.c get_names.c 11DSRC= ${DSRC1} ${DSRC2} 12DOBJ= answer.o driver.o draw.o execute.o expl.o makemaze.o \ 13 shots.o terminal.o extern.o \ 14 faketalk.o ctl.o ctl_transact.o get_names.o 15PSRC= hunt.c connect.c playit.c pathname.c otto.c 16POBJ= hunt.o connect.o playit.o otto.o 17 18# 19# Installation destinations 20BINDIR= /usr/games 21LIBDIR= /usr/libexec 22MANDIR= /usr/contrib/man/cat6 23 24# 25# Game parameter flags are: 26# RANDOM Include doors which disperse shots randomly 27# REFLECT Include diagonal walls that reflect shots 28# MONITOR Include code for watching the game from the sidelines 29# OOZE Include slime shots 30# FLY Make people fly when walls regenerate under them 31# VOLCANO Include occasional large slime explosions 32# DRONE Include occasional drone shots 33# BOOTS Include boots (which makes you immune to slime) 34# OTTO Reserved for CGL automatic player 35# 36GAME_PARAM= -DRANDOM -DREFLECT -DMONITOR -DOOZE -DFLY -DVOLCANO -DBOOTS \ 37 -DOTTO 38 39# 40# System parameter flags are: 41# DEBUG Don't trust everything in the code 42# INTERNET Use the Internet domain IPC instead of UNIX domain 43# LOG Use syslog error-logging in driver (needs SYSLOG_42 or 44# or SYSLOG_43) 45# OLDIPC Use 4.1a internet system calls (must also define 46# INTERNET) 47# TERMINFO Use terminfo instead of termcap 48# SYSLOG_42 Use 4.2 BSD syslog(3) 49# SYSLOG_43 Use 4.2 BSD syslog(3) 50# LOG Use syslog(3) for logging errors 51# BSD_RELEASE Which version of BSD distribution 52# 42 is 4.2BSD (implies SYSLOG_42) 53# 43 is 4.3BSD (implies BROADCAST, SYSLOG_43) 54# USE_CURSES Use curses for everything (automatic w/TERMINFO) 55# SIGNAL_TYPE void or int 56# HPUX do special HPUX only hacks 57# 58# NOTE: if you change the domain (INTERNET vs UNIX) then "make newdomain" 59# 60DEFS_BSD43= -DINTERNET -DLOG -DBSD_RELEASE=43 -DSIGNAL_TYPE=int 61DEFS_BSD44= -DINTERNET -DLOG -DBSD_RELEASE=44 -DSIGNAL_TYPE=void 62DEFS_SUN= -DINTERNET -DLOG -DBSD_RELEASE=42 -DBROADCAST -DSIGNAL_TYPE=int 63DEFS_SUN4_0= -DINTERNET -DLOG -DSYSLOG_43 -DBROADCAST -DSIGNAL_TYPE=void 64DEFS_ULTRIX= -DINTERNET -DLOG -DBSD_RELEASE=42 -DSIGNAL_TYPE=void 65DEFS_HPUX= -DHPUX -DINTERNET -DLOG -DSYSLOG_43 -DBROADCAST -DTERMINFO -DSIGNAL_TYPE=void 66DEFS_SGI= -DINTERNET -DLOG -DBSD_RELEASE=43 -DTERMINFO -DSIGNAL_TYPE=void 67DEFS_NEXT= $(DEFS_43) -bsd -traditional -Dconst= -DSIGNAL_TYPE=int 68DEFS_OSF1= -DINTERNET -DLOG -DBSD_RELEASE=43 -DSIGNAL_TYPE=void -D_BSD 69 70# 71# The following flags are used for system specific compilation arguments. 72# Change them to include the appropriate arguments. For example, on SGI 73# machines, they should look like 74# SYSCFLAGS= -I/usr/include/bsd 75# SYSLIBS= -lbsd 76# 77SYSCFLAGS= 78SYSLIBS= 79 80# 81# Generic definitions 82# 83DEFS= $(GAME_PARAM) $(DEFS_BSD44) 84CFLAGS= -O2 $(SYSCFLAGS) $(DEFS) 85 86# 87# Normal targets 88# 89all: hunt huntd 90 91hunt: $(POBJ) pathname.o 92 $(CC) -o hunt $(POBJ) pathname.o -lcurses -ltermcap $(SYSLIBS) 93 94huntd: $(DOBJ) pathname.o 95 $(CC) -o huntd $(DOBJ) pathname.o $(SYSLIBS) 96 97debug: hunt.dbg huntd.dbg 98 99hunt.dbg: $(POBJ) pathname.dbg.o 100 $(CC) -o hunt.dbg $(POBJ) pathname.dbg.o -lcurses -ltermcap $(SYSLIBS) 101 102huntd.dbg: $(DOBJ) pathname.dbg.o 103 $(CC) -o huntd.dbg $(DOBJ) pathname.dbg.o $(SYSLIBS) 104 105# 106# Source distribution in three files to a particular person 107# 108mail.msg: 109 -@if test x${MAIL} = x ; then\ 110 /bin/echo MAIL not set ;\ 111 fi 112mail.quit: 113 @test x$mail != x 114mail: mail.msg mail.quit 115 shar -a README hunt.6 huntd.6 Makefile ${HDR} ${PSRC} |\ 116 Mail -s "Hunt (part 1 of 3)" ${MAIL} 117 shar -a ${DSRC1} | Mail -s "Hunt (part 2 of 3)" ${MAIL} 118 shar -a ${DSRC2} | Mail -s "Hunt (part 3 of 3)" ${MAIL} 119 120mail.part2: mail.msg mail.quit 121 shar -a ${DSRC1} | Mail -s "Hunt (part 2 of 3)" ${MAIL} 122 123# 124# Single file source distribution 125# 126shar: 127 shar README hunt.6 huntd.6 Makefile ${HDR} ${PSRC} ${DSRC1} \ 128 ${DSRC2} | compress -c > hunt.shar.Z 129 130# 131# System installation 132# 133install: 134 install -s -o bin -g bin -m 555 huntd ${LIBDIR}/huntd 135 install -s -o bin -g bin -m 555 hunt ${BINDIR}/hunt 136 nroff -man hunt.6 > ${MANDIR}/hunt.0 137 nroff -man huntd.6 > ${MANDIR}/huntd.0 138 chown bin.bin ${MANDIR}/hunt.0 ${MANDIR}/huntd.0 139 chmod 444 ${MANDIR}/hunt.0 ${MANDIR}/huntd.0 140 141# 142# Object file dependencies 143# 144$(POBJ): $(HDR) 145 146$(DOBJ): $(HDR) 147 $(CC) $(CFLAGS) -c $*.c 148 149pathname.o: pathname.c Makefile 150 $(CC) $(CFLAGS) -DHUNTD=\"${LIBDIR}/huntd\" -c pathname.c 151 152pathname.dbg.o: pathname.c 153 @echo $(CC) $(CFLAGS) -DDEBUG -c pathname.c -o pathname.dbg.o 154 @rm -f x.c 155 @ln pathname.c x.c 156 @$(CC) $(CFLAGS) -DDEBUG -c x.c 157 @mv x.o pathname.dbg.o 158 @rm -f x.c 159 160# 161# Miscellaneous functions 162# 163lint: driver.lint hunt.lint 164 165driver.lint: $(DSRC) 166 lint $(DEFS) $(DSRC) 2>&1 > driver.lint 167 168hunt.lint: $(PSRC) 169 lint $(DEFS) $(PSRC) -lcurses 2>&1 > hunt.lint 170 171tags: $(DSRC) $(PSRC) 172 ctags $(DSRC) $(PSRC) 173 174clean: 175 rm -f $(POBJ) $(DOBJ) pathname.o pathname.dbg.o errs hunt.dbg \ 176 huntd.dbg hunt huntd hunt.lint driver.lint hunt.shar.Z 177 178newdomain: 179 rm hunt.o extern.o driver.o 180