1 # Makefile for the open-source release of adventure 2.5
4 CCFLAGS=-std=c99 -O0 --coverage
6 UNAME_S := $(shell uname -s)
7 ifeq ($(UNAME_S),Linux)
11 OBJS=main.o init.o actions1.o actions2.o score.o misc.o database.o
12 DOCS=COPYING NEWS README TODO advent.adoc history.adoc index.adoc hints.adoc
13 SOURCES=$(OBJS:.o=.c) advent.h funcs.h adventure.text $(DOCS) control
16 $(CC) $(CCFLAGS) $(DBX) -c $<
18 advent: $(OBJS) database.o
19 $(CC) $(CCFLAGS) $(DBX) -o advent $(OBJS) $(LIBS)
21 main.o: advent.h funcs.h database.h
23 init.o: advent.h funcs.h database.h
25 actions1.o: advent.h funcs.h database.h
27 actions2.o: advent.h funcs.h
29 score.o: advent.h database.h
31 misc.o: advent.h database.h
33 database.o: database.h
38 $(CC) $(CCFLAGS) -o $@ $<
40 database.c database.h: compile adventure.text
42 $(CC) $(CCFLAGS) $(DBX) -c database.c
45 rm -f *.o advent *.html advent.6 database.[ch] compile *.gcno *.gcda
46 cd tests; $(MAKE) --quiet clean
49 cd tests; $(MAKE) --quiet
51 # Requires asciidoc and xsltproc/docbook stylesheets.
53 a2x --doctype manpage --format manpage $<
54 .asc.html: advent.adoc
55 a2x --doctype manpage --format xhtml -D . $<
58 advent-$(VERS).tar.gz: $(SOURCES) advent.6
59 tar --transform='s:^:advent-$(VERS)/:' --show-transformed-names -cvzf advent-$(VERS).tar.gz $(SOURCES) advent.6
61 dist: advent-$(VERS).tar.gz
63 release: advent-$(VERS).tar.gz advent.html
64 shipper version=$(VERS) | sh -e -x
67 shipper -N -w version=$(VERS) | sh -e -x