1# These three lines define the fonts that spellcast tries to use by default;
2# it looks for FONT1 first, then FONT2, then FONT3. (If a user sets
3# his spellcast*font resource, that is tried first, instead of FONT1.)
4# You can change these to suit your environment.
5FONT1 = \"-*-times-medium-r-*--14-*\"
6FONT2 = \"-*-helvetica-medium-r-*--12-*\"
7FONT3 = \"fixed\"
8
9# The next line defines the directory in which game transcripts are
10# stored. It should be a fully-qualified pathname, beginning (but
11# not ending) with a slash.
12LOGDIR = \"/tmp\"
13
14# The next lines define the directories where the executable, man page, and
15# spell list postscript file are installed. Change them to whatever is appropriate.
16DESTDIR=/afs/andrew.cmu.edu/usr0/games
17DESTBIN=$(DESTDIR)/bin/.unpriv/@sys
18DESTMAN=$(DESTDIR)/man/man6
19DESTLIB=$(DESTDIR)/lib/spellcast
20
21# If you are compiling on a Sun and you find the game crashes
22# all the time, try uncommenting the next line.
23#OTHERLIBS = -lbsdmalloc
24
25CFLAGS += -I${LOCALBASE}/include -I./bitmaps -DBODYFONT=$(FONT1) \
26	-DBODYFONT_ALT=$(FONT2) -DBODYFONT_ALT2=$(FONT3) -DTRANSCRIPTDIR=$(LOGDIR)
27LFLAGS =
28
29XLIB = -L${LOCALBASE}/lib -lX11
30
31OBJS = engine.o espells.o execute.o execute2.o emonster.o etran.o
32XOBJS = main.o xtext.o xquery.o xloop.o xgest.o xbutton.o xtalk.o
33
34all: spellcast
35
36# spellcast: the X executable
37spellcast: $(OBJS) $(XOBJS)
38	$(CC) $(LFLAGS) -o spellcast $(OBJS) $(XOBJS) $(XLIB) $(OTHERLIBS)
39
40# stupid: the stupid stdin/stdout version of the game
41stupid: stupid.o $(OBJS)
42	$(CC) $(LFLAGS) -o spellcast stupid.o $(OBJS)
43
44# makelist: a small program used to create spelllist.ps, which you
45# shouldn't have to use, because spelllist.ps is already there.
46makelist: makelist.o espells.o
47	$(CC) $(LFLAGS) -o makelist makelist.o espells.o
48
49install: spellcast
50	install -c -s spellcast $(DESTBIN)
51	install -c spellcast.6 $(DESTMAN)
52	-mkdir $(DESTLIB)
53	install -c spelllist.ps $(DESTLIB)
54
55main.o: handwave.h spelllist.h xspell.h patchlevel.h
56xtext.o: handwave.h spelllist.h xspell.h
57xquery.o: handwave.h spelllist.h xspell.h
58xloop.o: handwave.h spelllist.h xspell.h
59xgest.o: handwave.h spelllist.h xspell.h
60xbutton.o: handwave.h spelllist.h xspell.h
61xtalk.o: handwave.h spelllist.h xspell.h
62
63internal.h: spelllist.h
64
65engine.o: handwave.h spelllist.h internal.h
66espells.o: handwave.h spelllist.h internal.h
67execute.o: handwave.h spelllist.h internal.h
68execute2.o: handwave.h spelllist.h internal.h
69emonster.o: handwave.h spelllist.h internal.h
70etran.o: handwave.h spelllist.h internal.h
71
72stupid.o: stupid.c handwave.h spelllist.h
73
74# The following rule creates the spelllist.ps document,
75# but you shouldn't have to use it, because it's already
76# there.
77spelllist.ps: makelist bitmaps/base.ps
78	./makelist > tmp.ps
79	cat bitmaps/base.ps tmp.ps > spelllist.ps
80
81clean:
82	rm -f *~ *.o spellcast stupid makelist tmp.ps core
83