2 # Makefile for `Hunt the Wumpus' and `Superhack' games
13 $(CC) $(CFLAGS) wumpus.c -o wumpus
15 superhack: superhack.c
16 $(CC) $(CFLAGS) superhack.c -o superhack
19 rm -f wumpus wumpus.o superhack superhack.o TAGS
20 rm -f *~ *.1 *.html *.tar.gz MANIFEST
28 wumpus.html: wumpus.xml
29 xmlto html-nochunks wumpus.xml
31 SOURCES = README COPYING NEWS control Makefile wumpus.c superhack.c wumpus.xml wumpus.png wumpus.desktop superhack.desktop
33 install: wumpus superhack wumpus.6
34 mkdir -p $(prefix)/bin
35 mkdir -p $(prefix)/share/man/man6
36 cp wumpus superhack $(prefix)/bin/
37 cp wumpus.6 $(prefix)/share/man/man6/
40 rm $(prefix)/bin/wumpus $(prefix)/bin/superhack
41 rm $(prefix)/share/man/man6/wumpus.6
45 cppcheck -DREVISION=$(VERS) $(CPPCHECKOPTS) wumpus.c
46 cppcheck -DREVISION=$(VERS) $(CPPCHECKOPTS) superhack.c
48 wumpus-$(VERS).tar.gz: $(SOURCES) wumpus.6
49 @ls $(SOURCES) wumpus.6 | sed s:^:wumpus-$(VERS)/: >MANIFEST
50 @(cd ..; ln -s wumpus wumpus-$(VERS))
51 (cd ..; tar -czf wumpus/wumpus-$(VERS).tar.gz `cat wumpus/MANIFEST`)
52 @(cd ..; rm wumpus-$(VERS))
54 dist: wumpus-$(VERS).tar.gz
56 release: wumpus-$(VERS).tar.gz wumpus.html
57 shipper version=$(VERS) | sh -e -x
60 shipper -N -w version=$(VERS) | sh -e -x