source: trunk/minix/commands/advent/Makefile@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 1.5 KB
RevLine 
[9]1# Makefile for advent
2
3# Where to put the adventure text files, and the binary executable.
4# Need the trailing "/"s.
5TEXTDIR = /usr/lib/advent/
6BINDIR = /usr/bin
7
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.
10
11CC = exec cc
12CFLAGS = -D_POSIX_SOURCE
13LDFLAGS = -i
14
15OBJS = advent.o database.o english.o initial.o itverb.o score.o\
16 travel.o turn.o utility.o verb.o vocab.o
17
18DAT = advent1.dat advent2.dat advent3.dat advent4.dat
19INSTDAT = $(TEXTDIR)advent1.dat $(TEXTDIR)advent2.dat \
20 $(TEXTDIR)advent3.dat $(TEXTDIR)advent4.dat
21
22all: $(DAT) advent
23
24install: $(TEXTDIR) $(INSTDAT) $(BINDIR)/advent
25
26$(TEXTDIR):
27 install -d -o bin $(TEXTDIR)
28
29$(TEXTDIR)advent1.dat: advent1.dat
30 install -c -o bin $? $@
31
32$(TEXTDIR)advent2.dat: advent2.dat
33 install -c -o bin $? $@
34
35$(TEXTDIR)advent3.dat: advent3.dat
36 install -c -o bin $? $@
37
38$(TEXTDIR)advent4.dat: advent4.dat
39 install -c -o bin $? $@
40
41$(BINDIR)/advent: advent
42 install -cs -o bin $? $@
43
44advent: $(OBJS)
45 $(CC) $(LDFLAGS) -o advent $(OBJS)
46
47setup: setup.c advent.h
48 $(CC) $(CFLAGS) $(LDFLAGS) -o setup setup.c
49
50advtext.h advent1.dat advent2.dat advent3.dat advent4.dat: \
51 setup advent1.txt advent2.txt advent3.txt advent4.txt
52 ./setup
53
54advent.o: advent.h advdec.h advent.c
55 $(CC) -c $(CFLAGS) -DTEXTDIR='"$(TEXTDIR)"' advent.c
56
57database.o: advent.h advdec.h advtext.h
58travel.o: advent.h advdec.h advcave.h
59initial.o english.o itverb.o score.o turn.o utility.o\
60 verb.o vocab.o: advent.h advdec.h
61
62clean:
63 @rm -f *.o *.BAK *.dat advtext.h core advent setup
Note: See TracBrowser for help on using the repository browser.