Use configure --enable-minishogi to select build of gnuminishogi.
[gnushogi.git] / Makefile.in
1 #
2 # Makefile for GNU Shogi and xshogi
3 #
4 # Copyright (c) 1993, 1994 Matthias Mutz
5 # Copyright (c) 1998, 1999 Michael Vanier and the Free Software Foundation
6 #
7 # GNU Shogi is based on GNU Chess
8 # Copyright (c) 1992 Free Software Foundation
9 #
10 # This file is part of GNU Shogi.
11 #
12 # GNU Shogi is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; either version 1, or (at your option)
15 # any later version.
16 #
17 # GNU Shogi is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 # GNU General Public License for more details.
21 #
22 # You should have received a copy of the GNU General Public License
23 # along with GNU Shogi; see the file COPYING.  If not, write to
24 # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
25 #
26
27 VERSION     = 1.3.2
28 ROOT        = @top_srcdir@
29 BUILDROOT   = @top_builddir@
30 GNUSHOGIDIR = $(BUILDROOT)/gnushogi
31 XSHOGIDIR   = $(BUILDROOT)/xshogi
32
33 PROGNAME = @PROGNAME@
34
35 #
36 # Default targets.
37 #
38
39 all : gnushogi_compile pat2inc bbk @XSHOGI@
40
41
42 #
43 # Primary targets.
44 #
45
46 gnushogi_compile:
47         -cd $(GNUSHOGIDIR) && $(MAKE) $(PROGNAME)
48
49 pat2inc:
50         -cd $(GNUSHOGIDIR) && $(MAKE) pat2inc
51
52 sizetest:
53         -cd $(GNUSHOGIDIR) && $(MAKE) sizetest
54
55 xshogi_compile:
56         -cd $(XSHOGIDIR) && $(MAKE)
57
58 bbk:
59         -cd $(GNUSHOGIDIR) && $(MAKE) $(PROGNAME).bbk
60
61
62 #
63 # Installation.
64 #
65
66 install: gnushogi_install @XSHOGIINSTALL@
67
68 gnushogi_install:
69         -cd $(GNUSHOGIDIR) && $(MAKE) install
70
71 xshogi_install: $(XSHOGIDIR)/xshogi
72         -cd $(XSHOGIDIR) && $(MAKE) install
73
74
75
76 #
77 # Cleanup.
78 #
79
80 clean: gnushogi_clean @XSHOGICLEAN@ doc_clean
81
82 gnushogi_clean:
83         cd $(GNUSHOGIDIR) && $(MAKE) clean
84
85 xshogi_clean:
86         cd $(XSHOGIDIR) && $(MAKE) clean
87
88 doc_clean:
89         cd $(BUILDROOT)/doc && $(MAKE) clean
90
91
92 #
93 # Building a distribution.
94 #
95
96 DISTNAME = @PACKAGE_TARNAME@-@PACKAGE_VERSION@
97
98 dist:
99         $(MAKE) maintainerclean
100         rm -rf $(DISTNAME)
101         mkdir $(DISTNAME)
102         tar -cf - --exclude .git $(ROOT) | (cd $(DISTNAME) && tar -xf -)
103         cd $(DISTNAME) && $(ROOT)/autogen.sh && $(ROOT)/configure
104         cd $(DISTNAME)/doc && $(MAKE) info
105         cd $(DISTNAME) && make distclean
106         tar -zcf $(DISTNAME).tar.gz $(DISTNAME)
107
108 #
109 # Return to a pristine pre-configuration state.
110 #
111
112 DISTCLEANFILES = \
113         config.cache config.log config.status config.h Makefile \
114     $(GNUSHOGIDIR)/Makefile $(GNUSHOGIDIR)/Makefile.profile \
115     $(XSHOGIDIR)/Makefile autom4te.cache
116
117 distclean: clean
118         rm -rf $(DISTCLEANFILES)
119         cd $(BUILDROOT)/doc && $(MAKE) distclean
120
121 #
122 # Extra cleanup, for the maintainer only.
123 #
124
125 MAINTAINERCLEANFILES = configure config.h.in
126
127 maintainerclean: distclean
128         rm -f $(MAINTAINERCLEANFILES)
129         cd $(BUILDROOT)/doc && $(MAKE) maintainerclean