3 # Where to put the adventure text files, and the binary executable.
4 # Need the trailing "/"s.
5 TEXTDIR
= /usr
/lib
/advent
/
8 # Flags you may want to add to CFLAGS:
9 # -DHAS_STDC=0 or 1 We have Standard C. Default=1 iff __STDC__ is nonzero.
12 CFLAGS
= -D_POSIX_SOURCE
15 OBJS
= advent.o database.o english.o initial.o itverb.o score.o\
16 travel.o turn.o utility.o verb.o vocab.o
18 DAT
= advent1.dat advent2.dat advent3.dat advent4.dat
19 INSTDAT
= $(TEXTDIR
)advent1.dat
$(TEXTDIR
)advent2.dat \
20 $(TEXTDIR
)advent3.dat
$(TEXTDIR
)advent4.dat
24 install: $(TEXTDIR
) $(INSTDAT
) $(BINDIR
)/advent
27 install -d
-o bin
$(TEXTDIR
)
29 $(TEXTDIR
)advent1.dat
: advent1.dat
30 install -c
-o bin
$?
$@
32 $(TEXTDIR
)advent2.dat
: advent2.dat
33 install -c
-o bin
$?
$@
35 $(TEXTDIR
)advent3.dat
: advent3.dat
36 install -c
-o bin
$?
$@
38 $(TEXTDIR
)advent4.dat
: advent4.dat
39 install -c
-o bin
$?
$@
41 $(BINDIR
)/advent
: advent
42 install -cs
-o bin
$?
$@
45 $(CC
) $(LDFLAGS
) -o advent
$(OBJS
)
47 setup
: setup.c advent.h
48 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o setup setup.c
50 advtext.h advent1.dat advent2.dat advent3.dat advent4.dat
: \
51 setup advent1.txt advent2.txt advent3.txt advent4.txt
54 advent.o
: advent.h advdec.h advent.c
55 $(CC
) -c
$(CFLAGS
) -DTEXTDIR
='"$(TEXTDIR)"' advent.c
57 database.o
: advent.h advdec.h advtext.h
58 travel.o
: advent.h advdec.h advcave.h
59 initial.o english.o itverb.o score.o turn.o utility.o\
60 verb.o vocab.o
: advent.h advdec.h
63 @
rm -f
*.o
*.BAK
*.dat advtext.h core advent setup