Suppress bad gatings in variant seirawan
[fairymax.git] / Makefile
1 srcdir = .
2
3 CC=gcc
4 CFLAGS += -O2
5
6
7 ALL= fairymax shamax maxqi fairymax.6.gz
8
9 all: ${ALL}
10
11 fairymax: fairymax.c
12         $(CC) $(CFLAGS) -DINI_FILE=\"/usr/share/games/fairymax/fmax.ini\" fairymax.c -o fairymax
13
14 shamax: fairymax.c
15         $(CC) $(CFLAGS) -DINI_FILE=\"/usr/share/games/fairymax/fmax.ini\" -DSHATRANJ fairymax.c -o shamax
16
17 maxqi: maxqi.c
18         $(CC) $(CFLAGS) -DINI_FILE=\"/usr/share/games/fairymax/qmax.ini\" maxqi.c -o maxqi
19
20 install: ${ALL} ${srcdir}/data/*
21         cp -u ${srcdir}/fairymax $(DESTDIR)/usr/games
22         cp -u ${srcdir}/shamax $(DESTDIR)/usr/games
23         cp -u ${srcdir}/maxqi $(DESTDIR)/usr/games
24         install -d -m0755 $(DESTDIR)/usr/share/games/fairymax
25         cp -u ${srcdir}/data/* $(DESTDIR)/usr/share/games/fairymax
26         install -d -m0755 $(DESTDIR)/usr/share/man/man6
27         cp -u ${srcdir}/fairymax.6.gz $(DESTDIR)/usr/share/man/man6
28
29 fairymax.6.gz: fairymax.pod
30         pod2man -s 6 fairymax.pod > fmax.man
31         cp fmax.man fairymax.6
32         rm -f fairymax.6.gz
33         gzip fairymax.6
34
35 clean:
36         rm -f ${ALL}
37
38 dist-clean:
39         rm -f ${ALL} *~ data/*~ *.man md5sums
40
41 dist:
42         install -d -m0755 Fairy-Max
43         install -d -m0755 Fairy-Max/data
44         rm -f fairymax.tar fairymax.tar.gz
45         cp fairymax.c maxqi.c fairymax.pod Makefile README changelog copyright md5sums Fairy-Max
46         cp data/* Fairy-Max/data
47         md5 Fairy-Max/* Fairy-Max/data/* > Fairy-Max/md5sums
48         tar -cvvf fairymax.tar Fairy-Max
49         gzip fairymax.tar
50         rm Fairy-Max/data/*
51         rmdir Fairy-Max/data
52         rm Fairy-Max/*
53         rmdir Fairy-Max
54
55 uninstall:
56         rm -f $(DESTDIR)/usr/share/games/fairymax/*
57         rmdir $(DESTDIR)/usr/share/games/fairymax
58         rm -f $(DESTDIR)/usr/share/man/man6/fairymax.6.gz
59         rm -f $(DESTDIR)/usr/games/fairymax
60         rm -f $(DESTDIR)/usr/games/shamax
61         rm -f $(DESTDIR)/usr/games/maxqi
62