File: Makefile

package info (click to toggle)
spellcast 1.0-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 500 kB
  • ctags: 669
  • sloc: ansic: 7,370; makefile: 87
file content (82 lines) | stat: -rw-r--r-- 2,859 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# These three lines define the fonts that spellcast tries to use by default;
# it looks for FONT1 first, then FONT2, then FONT3. (If a user sets
# his spellcast*font resource, that is tried first, instead of FONT1.)
# You can change these to suit your environment. 
FONT1 = \"-*-times-medium-r-*--14-*\"
FONT2 = \"-*-helvetica-medium-r-*--12-*\"
FONT3 = \"fixed\"

# The next line defines the directory in which game transcripts are
# stored. It should be a fully-qualified pathname, beginning (but
# not ending) with a slash.
LOGDIR = \"/var/lib/games/spellcast\"

# The next lines define the directories where the executable, man page, and
# spell list postscript file are installed. Change them to whatever is appropriate.
DESTDIR=debian/tmp
DESTBIN=$(DESTDIR)/usr/games
DESTMAN=$(DESTDIR)/usr/man/man6
DESTLIB=$(DESTDIR)/usr/doc/spellcast

# If you are compiling on a Sun and you find the game crashes
# all the time, try uncommenting the next line.
#OTHERLIBS = -lbsdmalloc

CFLAGS = -O2 -g -I/usr/X11R6/include -I./bitmaps -DBODYFONT=$(FONT1) \
	-DBODYFONT_ALT=$(FONT2) -DBODYFONT_ALT2=$(FONT3) -DTRANSCRIPTDIR=$(LOGDIR)
LFLAGS = -g

XLIB = -L/usr/X11R6/lib -lX11

OBJS = engine.o espells.o execute.o execute2.o emonster.o etran.o
XOBJS = main.o xtext.o xquery.o xloop.o xgest.o xbutton.o xtalk.o

all: spellcast

# spellcast: the X executable
spellcast: $(OBJS) $(XOBJS)
	$(CC) $(LFLAGS) -o spellcast $(OBJS) $(XOBJS) $(XLIB) $(OTHERLIBS)

# stupid: the stupid stdin/stdout version of the game
stupid: stupid.o $(OBJS)
	$(CC) $(LFLAGS) -o spellcast stupid.o $(OBJS)

# makelist: a small program used to create spelllist.ps, which you
# shouldn't have to use, because spelllist.ps is already there.
makelist: makelist.o espells.o
	$(CC) $(LFLAGS) -o makelist makelist.o espells.o

install: spellcast
	install -c -s spellcast $(DESTBIN)
	install -c spellcast.6 $(DESTMAN)
	-mkdir $(DESTLIB)
	install -c spelllist.ps $(DESTLIB)

main.o: handwave.h spelllist.h xspell.h patchlevel.h
xtext.o: handwave.h spelllist.h xspell.h
xquery.o: handwave.h spelllist.h xspell.h
xloop.o: handwave.h spelllist.h xspell.h
xgest.o: handwave.h spelllist.h xspell.h
xbutton.o: handwave.h spelllist.h xspell.h
xtalk.o: handwave.h spelllist.h xspell.h

internal.h: spelllist.h

engine.o: handwave.h spelllist.h internal.h
espells.o: handwave.h spelllist.h internal.h
execute.o: handwave.h spelllist.h internal.h
execute2.o: handwave.h spelllist.h internal.h
emonster.o: handwave.h spelllist.h internal.h
etran.o: handwave.h spelllist.h internal.h

stupid.o: stupid.c handwave.h spelllist.h

# The following rule creates the spelllist.ps document,
# but you shouldn't have to use it, because it's already
# there.
spelllist.ps: makelist bitmaps/base.ps
	./makelist > tmp.ps
	cat bitmaps/base.ps tmp.ps > spelllist.ps

clean:
	rm -f *~ *.o spellcast stupid makelist tmp.ps core