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 pattern file contains various opening patterns. The program tries to
35 # obtain such a pattern in the opening stage. Sequences of opening
36 # patterns may be described in order to support the correct order of moves.
39 -DHASHFILE=\"$(pkglibdir)/gnushogi.hsh\" \
40 -DBOOK=\"$(pkglibdir)/gnushogi.tbk\" \
41 -DBINBOOK=\"$(pkglibdir)/gnushogi.bbk\"
42 gnuminishogi_CPPFLAGS = \
44 -DHASHFILE=\"$(pkglibdir)/gnuminishogi.hsh\" \
45 -DBOOK=\"$(pkglibdir)/gnuminishogi.tbk\" \
46 -DBINBOOK=\"$(pkglibdir)/gnuminishogi.bbk\"
49 gnushogi-pattern.inc \
50 gnuminishogi-pattern.inc
83 gnuminishogi_SOURCES = \
88 EXTRA_gnushogi_SOURCES = \
90 EXTRA_gnuminishogi_SOURCES = \
93 BUILT_SOURCES = $(BUILTHEADERS)
95 gnushogi_DEPENDENCIES = @CURSESDSP@
96 gnushogi_LDADD = @CURSESDSP@ @LIBCURSES@
97 gnuminishogi_DEPENDENCIES = @CURSESDSPMINI@
98 gnuminishogi_LDADD = @CURSESDSPMINI@ @LIBCURSES@
105 pat2inc_LDADD = @LIBCURSES@
107 gnushogi-pattern.inc: $(top_srcdir)/misc/gnushogi.pat $(pat2inc_SOURCES)
108 if [ "x@PAT2INCEXE@" = "x" ]; then \
109 echo "$@ needs rebuilding, which can only be done when NOT cross-compiling"; \
112 $(MAKE) $(AM_MAKEFLAGS) @PAT2INCEXE@
114 gnuminishogi-pattern.inc: $(top_srcdir)/misc/gnuminishogi.pat $(pat2inc_SOURCES)
115 if [ "x@PAT2INCEXE@" = "x" ]; then \
116 echo "$@ needs rebuilding, which can only be done when NOT cross-compiling"; \
119 $(MAKE) $(AM_MAKEFLAGS) @PAT2INCEXE@
122 # just get *.inc generated
123 gnushogi_bootstrap: $(BUILTHEADERS)
126 # optional support for prebuilding a bbk
128 gnushogi.bbk: $(top_srcdir)/misc/gnushogi.tbk gnushogi$(EXEEXT)
131 echo quit | ./gnushogi -R -b _tmp_t -B $@ -S 8000 -P 40 3 0
133 gnuminishogi.bbk: $(top_srcdir)/misc/gnuminishogi.tbk gnuminishogi$(EXEEXT)
136 echo quit | ./gnuminishogi -R -b _tmp_t -B $@ -S 8000 -P 40 3 0