2 # Makefile for GNU Shogi
4 # Copyright (c) 2013 Yann Dirson and the Free Software Foundation
6 # This file is part of GNU Shogi.
8 # GNU Shogi is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 1, or (at your option)
13 # GNU Shogi is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with GNU Shogi; see the file COPYING. If not, write to
20 # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
23 pkgbindatadir = $(pkglibdir)
25 bin_PROGRAMS = gnushogi gnuminishogi
26 noinst_PROGRAMS = @PAT2INC@ sizetest
27 EXTRA_PROGRAMS = pat2inc
29 pkgbindata_DATA = $(top_srcdir)/misc/gnushogi.tbk
30 # gnuminishogi.bbk would be empty
32 AM_CFLAGS = @CEXTRAFLAGS@ @WARNINGS@
34 # The hashfile is a record of positions seen. It is used by
35 # GNU Shogi to avoid making the same mistakes, a form of learning.
37 HASH = -DHASHFILE=\"$(pkglibdir)/$(PROGNAME).hsh\"
40 # The "book" is a record of the first few moves, for playing good
41 # moves easily and quickly, saving time, and irritating the human
44 TEXTBOOK = -DBOOK=\"$(pkglibdir)/$(PROGNAME).tbk\"
45 BINBOOK = -DBINBOOK=\"$(pkglibdir)/$(PROGNAME).bbk\"
48 # The pattern file contains various opening patterns. The program tries to
49 # obtain such a pattern in the opening stage. Sequences of opening
50 # patterns may be described in order to support the correct order of moves.
53 -DHASHFILE=\"$(pkglibdir)/gnushogi.hsh\" \
54 -DBOOK=\"$(pkglibdir)/gnushogi.tbk\" \
55 -DBINBOOK=\"$(pkglibdir)/gnushogi.bbk\"
56 gnuminishogi_CPPFLAGS = \
58 -DHASHFILE=\"$(pkglibdir)/gnuminishogi.hsh\" \
59 -DBOOK=\"$(pkglibdir)/gnuminishogi.tbk\" \
60 -DBINBOOK=\"$(pkglibdir)/gnuminishogi.bbk\"
63 gnushogi-pattern.inc \
64 gnuminishogi-pattern.inc
97 gnuminishogi_SOURCES = \
102 EXTRA_gnushogi_SOURCES = \
104 EXTRA_gnuminishogi_SOURCES = \
107 BUILT_SOURCES = $(BUILTHEADERS)
109 gnushogi_DEPENDENCIES = @CURSESDSP@
110 gnushogi_LDADD = @CURSESDSP@ @LIBCURSES@
111 gnuminishogi_DEPENDENCIES = @CURSESDSPMINI@
112 gnuminishogi_LDADD = @CURSESDSPMINI@ @LIBCURSES@
119 pat2inc_LDADD = @LIBCURSES@
121 gnushogi-pattern.inc: $(top_srcdir)/misc/gnushogi.pat @PAT2INCEXE@
123 gnuminishogi-pattern.inc: $(top_srcdir)/misc/gnuminishogi.pat @PAT2INCEXE@
126 # just get *.inc generated
127 gnushogi_bootstrap: $(BUILTHEADERS)
130 # optional support for prebuilding a bbk
132 gnushogi.bbk: $(top_srcdir)/misc/gnushogi.tbk gnushogi$(EXEEXT)
135 echo quit | ./gnushogi -R -b _tmp_t -B $@ -S 8000 -P 40 3 0
137 gnuminishogi.bbk: $(top_srcdir)/misc/gnuminishogi.tbk gnuminishogi$(EXEEXT)
140 echo quit | ./gnuminishogi -R -b _tmp_t -B $@ -S 8000 -P 40 3 0