|
|
1.1 root 1: #
2: # Copyright (c) 1985 Regents of the University of California.
3: # All rights reserved.
4: #
5: # Redistribution and use in source and binary forms are permitted
6: # provided that the above copyright notice and this paragraph are
7: # duplicated in all such forms and that any documentation,
8: # advertising materials, and other materials related to such
9: # distribution and use acknowledge that the software was developed
10: # by the University of California, Berkeley. The name of the
11: # University may not be used to endorse or promote products derived
12: # from this software without specific prior written permission.
13: # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14: # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15: # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16: #
17: # @(#)Makefile 5.4 (Berkeley) 6/27/88
18: #
19: # Hunt
20: # Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold
21: # San Francisco, California
22: #
23: HDR= hunt.h
24: DSRC= answer.c driver.c draw.c execute.c expl.c makemaze.c \
25: shots.c terminal.c extern.c pathname.c
26: DOBJ= answer.o driver.o draw.o execute.o expl.o makemaze.o \
27: shots.o terminal.o extern.o
28: PSRC= hunt.c connect.c playit.c pathname.c
29: POBJ= hunt.o connect.o playit.o
30:
31: #
32: # Flags are:
33: # DEBUG Don't trust everything in the code
34: # INTERNET Use the Internet domain IPC instead of UNIX domain
35: # BROADCAST Use internet broadcasting code when looking for driver
36: # OLDIPC Use 4.1a internet system calls (must also define
37: # INTERNET but not BROADCAST)
38: # RANDOM Include doors which disperse shots randomly
39: # REFLECT Include diagonal walls that reflect shots
40: # MONITOR Include code for watching the game from the sidelines
41: # OOZE Include slime shots
42: # FLY Make people fly when walls regenerate under them
43: # START_FLYING Players enter flying (FLY must also be defined)
44: # VOLCANO Include occasional large slime explosions
45: #
46: # NOTE: if you change the domain (INTERNET vs UNIX) then "make newdomain"
47: #
48: DEFS= -I. -DBROADCAST -DRANDOM -DREFLECT -DMONITOR -DINTERNET \
49: -DOOZE -DFLY -DVOLCANO
50: CFLAGS= -O $(DEFS)
51: LDFLAGS=
52: PROFLAGS=
53: LD= /bin/ld
54: .SUFFIXES: .uu .obj .c,v
55:
56: .obj.uu:
57: uuencode $*.obj < $*.obj > $*.uu
58:
59: .c,v.c:
60: co $*.c
61:
62: standard: hunt hunt.driver
63:
64: #
65: # For testing
66: #
67: debug: hunt.dbg hunt.driver.dbg
68:
69: hunt.dbg: $(POBJ) pathname.dbg.o
70: $(CC) $(LDFLAGS) -o hunt.dbg $(POBJ) pathname.dbg.o -lcurses -ltermlib
71:
72: hunt.driver.dbg: $(DOBJ) pathname.dbg.o
73: $(CC) $(PROFLAGS) $(LDFLAGS) -o hunt.driver.dbg $(DOBJ) pathname.dbg.o
74:
75: #
76: # Binary distribution to other sites
77: #
78: distribution: hunt.uu hunt.driver.uu README pathname.c Makefile.dist hunt.6
79: @ln Makefile.dist makefile
80: shar -a README makefile pathname.c hunt.uu hunt.driver.uu hunt.6\
81: > distribution
82: @rm -f makefile hunt.uu hunt.driver.uu hunt.obj hunt.driver.obj
83:
84: hunt.driver.obj: $(DOBJ) pathname.o
85: $(LD) -r -x -o hunt.driver.obj $(DOBJ)
86: symstrip hunt.driver.obj pathname.o -lcurses -ltermcap
87:
88: hunt.obj: $(POBJ) pathname.o
89: $(LD) -r -x -o hunt.obj $(POBJ)
90: symstrip hunt.obj pathname.o -lcurses -ltermcap
91:
92: #
93: # System installation
94: #
95: install: standard
96: install -s -o games -g bin -m 700 hunt.driver $(DESTDIR)/usr/games/lib/hunt.driver
97: install -s -o games -g bin -m 700 hunt $(DESTDIR)/usr/games/hide
98: (cd ${DESTDIR}/usr/games; rm -f hunt; ln -s dm hunt; chown games.bin hunt)
99:
100: hunt: $(POBJ) pathname.o
101: $(CC) $(LDFLAGS) -o hunt $(POBJ) pathname.o -lcurses -ltermlib
102:
103: hunt.driver: $(DOBJ) pathname.o
104: $(CC) $(PROFLAGS) $(LDFLAGS) -o hunt.driver $(DOBJ) pathname.o
105:
106: #
107: # Object file dependencies
108: #
109: $(POBJ): $(HDR)
110:
111: $(DOBJ): $(HDR)
112: $(CC) $(CFLAGS) $(PROFLAGS) -c $*.c
113:
114: pathname.dbg.o: pathname.c
115: @echo $(CC) $(CFLAGS) -DDEBUG -c pathname.c -o pathname.dbg.o
116: @rm -f x.c
117: @ln pathname.c x.c
118: @$(CC) $(CFLAGS) -DDEBUG -c x.c
119: @mv x.o pathname.dbg.o
120: @rm -f x.c
121:
122: #
123: # Miscellaneous functions
124: #
125: lint: $(DSRC) $(PSRC)
126: lint $(DEFS) -DSTANDARD $(DSRC) 2>&1 > driver.lint
127: lint $(DEFS) -DSTANDARD $(PSRC) -lcurses 2>&1 > hunt.lint
128:
129: tags: $(DSRC) $(PSRC)
130: ctags $(DSRC) $(PSRC)
131:
132: newdomain:
133: rm -f hunt.o extern.o driver.o
134:
135: clean:
136: rm -f hunt hunt.driver *.o tags errs
137:
138: depend:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.