2 # Makefile for `Hunt the Wumpus' and `Superhack' games
11 $(CC) $(CFLAGS) wumpus.c -o wumpus
13 superhack: superhack.c
14 $(CC) $(CFLAGS) superhack.c -o superhack
17 rm -f wumpus wumpus.o superhack superhack.o TAGS
18 rm -f *~ *.1 *.html *.tar.gz MANIFEST
26 wumpus.html: wumpus.xml
27 xmlto html-nochunks wumpus.xml
29 SOURCES = README COPYING NEWS Makefile wumpus.c superhack.c wumpus.xml
32 mkdir -p $(prefix)/bin
33 mkdir -p $(prefix)/share/man/man6
34 cp wumpus superhack $(prefix)/bin/
35 cp wumpus.6 $(prefix)/share/man/man6/
38 rm $(prefix)/bin/wumpus $(prefix)/bin/superhack
39 rm $(prefix)/share/man/man6/wumpus.6
43 cppcheck -DREVISION=$(VERS) $(CPPCHECKOPTS) wumpus.c
44 cppcheck -DREVISION=$(VERS) $(CPPCHECKOPTS) superhack.c
46 wumpus-$(VERS).tar.gz: $(SOURCES) wumpus.6
47 @ls $(SOURCES) wumpus.6 | sed s:^:wumpus-$(VERS)/: >MANIFEST
48 @(cd ..; ln -s wumpus wumpus-$(VERS))
49 (cd ..; tar -czf wumpus/wumpus-$(VERS).tar.gz `cat wumpus/MANIFEST`)
50 @(cd ..; rm wumpus-$(VERS))
52 dist: wumpus-$(VERS).tar.gz
54 release: wumpus-$(VERS).tar.gz wumpus.html
55 shipper version=$(VERS) | sh -e -x
58 shipper -N -w version=$(VERS) | sh -e -x