1 # Makefile for the open-source release of adventure 2.5
5 UNAME_S := $(shell uname -s)
6 GCCVERSIONGTEQ4 := $(shell expr `gcc -dumpversion | cut -f1 -d.` \>= 4)
7 ifeq ($(UNAME_S),Darwin)
9 else ifeq "$(GCCVERSIONGTEQ4)" "1"
13 OBJS=main.o init.o actions1.o actions2.o score.o misc.o
14 SOURCES=$(OBJS:.o=.c) COPYING NEWS README TODO adventure.text advent.text control misc.h main.h share.h funcs.h
17 $(CC) $(CCFLAGS) -O $(DBX) -c $<
19 advent: $(OBJS) database.o
20 $(CC) $(CCFLAGS) -O $(DBX) -o advent $(OBJS) database.o $(LIBS)
22 main.o: main.h misc.h funcs.h database.h
24 init.o: misc.h main.h share.h funcs.h database.h
26 actions1.o: misc.h main.h share.h funcs.h database.h
28 actions2.o: misc.h main.h share.h funcs.h
30 score.o: misc.h main.h share.h database.h
32 misc.o: misc.h main.h database.h
34 database.c database.h: compile
36 $(CC) $(CCFLAGS) -O $(DBX) -c database.c
39 rm -f *.o advent advent.html advent.6 database.[ch] compile
40 cd tests; $(MAKE) --quiet clean
43 cd tests; $(MAKE) --quiet
45 # Requires asciidoc and xsltproc/docbook stylesheets.
47 a2x --doctype manpage --format manpage $<
49 a2x --doctype manpage --format xhtml -D . $<
52 advent-$(VERS).tar.gz: $(SOURCES) advent.6
53 tar --transform='s:^:advent-$(VERS)/:' --show-transformed-names -cvzf advent-$(VERS).tar.gz $(SOURCES) advent.6
55 dist: advent-$(VERS).tar.gz
57 release: advent-$(VERS).tar.gz advent.html
58 shipper version=$(VERS) | sh -e -x
61 shipper -N -w version=$(VERS) | sh -e -x