Fixes for /usr/xbin binaries bootstrap dir.
[minix3.git] / commands / advent / Makefile
blobaff80c4f15d67ba911aa636554d7f6a4a1d096b7
1 # Makefile for advent
3 # Where to put the adventure text files, and the binary executable.
4 # Need the trailing "/"s.
5 TEXTDIR = /usr/lib/advent/
6 BINDIR = /usr/bin
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.
11 CC = exec cc
12 CFLAGS = -D_POSIX_SOURCE
13 LDFLAGS = -i
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
22 all: $(DAT) advent
24 install: $(TEXTDIR) $(INSTDAT) $(BINDIR)/advent
26 $(TEXTDIR):
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 $? $@
44 advent: $(OBJS)
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
52 ./setup
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
62 clean:
63 @rm -f *.o *.BAK *.dat advtext.h core advent setup