Long-dead code removal: unused macro
[gnushogi.git] / gnushogi / Makefile.am
blob7e159e9539b2bf85fa8cdc09f38e9414834c800a
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)
11 # any later version.
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.
38 gnushogi_CPPFLAGS = \
39         -DHASHFILE=\"$(pkglibdir)/gnushogi.hsh\" \
40         -DBOOK=\"$(pkglibdir)/gnushogi.tbk\" \
41         -DBINBOOK=\"$(pkglibdir)/gnushogi.bbk\"
42 gnuminishogi_CPPFLAGS = \
43         -DMINISHOGI \
44         -DHASHFILE=\"$(pkglibdir)/gnuminishogi.hsh\" \
45         -DBOOK=\"$(pkglibdir)/gnuminishogi.tbk\" \
46         -DBINBOOK=\"$(pkglibdir)/gnuminishogi.bbk\"
48 BUILTHEADERS = \
49         gnushogi-pattern.inc \
50         gnuminishogi-pattern.inc
52 noinst_HEADERS = \
53         $(BUILTHEADERS) \
54         book.h \
55         debug.h \
56         eval.h \
57         gnushogi.h \
58         opts.h \
59         pattern.h
61 COMMONSOURCES =         \
62         globals.c       \
63         init-common.c   \
64         pattern-common.c
66 NOTCOMMONFILES =       \
67         attacks.c      \
68         book.c         \
69         commondsp.c    \
70         eval.c         \
71         genmove.c      \
72         init.c         \
73         pattern.c      \
74         rawdsp.c       \
75         search.c       \
76         tcontrl.c      \
77         util.c
79 gnushogi_SOURCES = \
80         main.c \
81         $(NOTCOMMONFILES) \
82         $(COMMONSOURCES)
83 gnuminishogi_SOURCES = \
84         main.c \
85         $(NOTCOMMONFILES) \
86         $(COMMONSOURCES)
88 EXTRA_gnushogi_SOURCES = \
89         cursesdsp.c
90 EXTRA_gnuminishogi_SOURCES = \
91         cursesdsp.c
93 BUILT_SOURCES = $(BUILTHEADERS)
95 gnushogi_DEPENDENCIES = @CURSESDSP@
96 gnushogi_LDADD = @CURSESDSP@ @LIBCURSES@
97 gnuminishogi_DEPENDENCIES = @CURSESDSPMINI@
98 gnuminishogi_LDADD = @CURSESDSPMINI@ @LIBCURSES@
100 pat2inc_SOURCES = \
101         pat2inc.c \
102         makepattern.c \
103         $(COMMONSOURCES)
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"; \
110           exit 1; \
111         fi
112         $(MAKE) $(AM_MAKEFLAGS) @PAT2INCEXE@
113         ./pat2inc $< $@
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"; \
117           exit 1; \
118         fi
119         $(MAKE) $(AM_MAKEFLAGS) @PAT2INCEXE@
120         ./pat2inc $< $@
122 # just get *.inc generated
123 gnushogi_bootstrap: $(BUILTHEADERS)
124         :
126 # optional support for prebuilding a bbk
128 gnushogi.bbk: $(top_srcdir)/misc/gnushogi.tbk gnushogi$(EXEEXT)
129         rm -f $@
130         cat $< > _tmp_t
131         echo quit | ./gnushogi -R -b _tmp_t -B $@ -S 8000 -P 40 3 0
132         rm _tmp_t
133 gnuminishogi.bbk: $(top_srcdir)/misc/gnuminishogi.tbk gnuminishogi$(EXEEXT)
134         rm -f $@
135         cat $< > _tmp_t
136         echo quit | ./gnuminishogi -R -b _tmp_t -B $@ -S 8000 -P 40 3 0
137         rm _tmp_t