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 cp wumpus superhack /usr/bin/
33 cp wumpus.6 /usr/share/man/man6/
36 rm /usr/bin/wumpus /usr/bin/superhack
37 rm /usr/share/man/man6/wumpus.6
41 cppcheck -DREVISION=$(VERS) $(CPPCHECKOPTS) wumpus.c
42 cppcheck -DREVISION=$(VERS) $(CPPCHECKOPTS) superhack.c
44 wumpus-$(VERS).tar.gz: $(SOURCES) wumpus.6
45 @ls $(SOURCES) wumpus.6 | sed s:^:wumpus-$(VERS)/: >MANIFEST
46 @(cd ..; ln -s wumpus wumpus-$(VERS))
47 (cd ..; tar -czf wumpus/wumpus-$(VERS).tar.gz `cat wumpus/MANIFEST`)
48 @(cd ..; rm wumpus-$(VERS))
50 dist: wumpus-$(VERS).tar.gz
52 release: wumpus-$(VERS).tar.gz wumpus.html
53 shipper version=$(VERS) | sh -e -x
56 shipper -N -w version=$(VERS) | sh -e -x