File: Makefile.am

package info (click to toggle)
gnushogi 1.5~git20140725-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 1,900 kB
  • sloc: ansic: 12,731; sh: 4,104; makefile: 128
file content (137 lines) | stat: -rw-r--r-- 3,603 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#
# Makefile for GNU Shogi
#
# Copyright (c) 2013 Yann Dirson and the Free Software Foundation
#
# This file is part of GNU Shogi.
#
# GNU Shogi is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 1, or (at your option)
# any later version.
#
# GNU Shogi is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Shogi; see the file COPYING.  If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#

pkgbindatadir = $(pkglibdir)

bin_PROGRAMS = gnushogi gnuminishogi
noinst_PROGRAMS = @PAT2INC@ sizetest
EXTRA_PROGRAMS = pat2inc

pkgbindata_DATA = $(top_srcdir)/misc/gnushogi.tbk
# gnuminishogi.bbk would be empty

AM_CFLAGS = @CEXTRAFLAGS@ @WARNINGS@

# The pattern file contains various opening patterns. The program tries to
# obtain such a pattern in the opening stage. Sequences of opening
# patterns may be described in order to support the correct order of moves.

gnushogi_CPPFLAGS = \
	-DHASHFILE=\"$(pkglibdir)/gnushogi.hsh\" \
	-DBOOK=\"$(pkglibdir)/gnushogi.tbk\" \
	-DBINBOOK=\"$(pkglibdir)/gnushogi.bbk\"
gnuminishogi_CPPFLAGS = \
	-DMINISHOGI \
	-DHASHFILE=\"$(pkglibdir)/gnuminishogi.hsh\" \
	-DBOOK=\"$(pkglibdir)/gnuminishogi.tbk\" \
	-DBINBOOK=\"$(pkglibdir)/gnuminishogi.bbk\"

BUILTHEADERS = \
	gnushogi-pattern.inc \
	gnuminishogi-pattern.inc

noinst_HEADERS = \
	$(BUILTHEADERS) \
	book.h \
	debug.h \
	eval.h \
	gnushogi.h \
	opts.h \
	pattern.h

COMMONSOURCES =         \
	globals.c      	\
	init-common.c   \
	pattern-common.c

NOTCOMMONFILES =       \
	attacks.c      \
	book.c         \
	commondsp.c    \
	eval.c         \
	genmove.c      \
	init.c         \
	pattern.c      \
	rawdsp.c       \
	search.c       \
	tcontrl.c      \
	util.c

gnushogi_SOURCES = \
	main.c \
	$(NOTCOMMONFILES) \
	$(COMMONSOURCES)
gnuminishogi_SOURCES = \
	main.c \
	$(NOTCOMMONFILES) \
	$(COMMONSOURCES)

EXTRA_gnushogi_SOURCES = \
	cursesdsp.c
EXTRA_gnuminishogi_SOURCES = \
	cursesdsp.c

BUILT_SOURCES = $(BUILTHEADERS)

gnushogi_DEPENDENCIES = @CURSESDSP@
gnushogi_LDADD = @CURSESDSP@ @LIBCURSES@
gnuminishogi_DEPENDENCIES = @CURSESDSPMINI@
gnuminishogi_LDADD = @CURSESDSPMINI@ @LIBCURSES@

pat2inc_SOURCES = \
	pat2inc.c \
	makepattern.c \
	$(COMMONSOURCES)

pat2inc_LDADD = @LIBCURSES@

gnushogi-pattern.inc: $(top_srcdir)/misc/gnushogi.pat $(pat2inc_SOURCES)
	if [ "x@PAT2INCEXE@" = "x" ]; then \
	  echo "$@ needs rebuilding, which can only be done when NOT cross-compiling"; \
	  exit 1; \
	fi
	$(MAKE) $(AM_MAKEFLAGS) @PAT2INCEXE@
	./pat2inc $< $@
gnuminishogi-pattern.inc: $(top_srcdir)/misc/gnuminishogi.pat $(pat2inc_SOURCES)
	if [ "x@PAT2INCEXE@" = "x" ]; then \
	  echo "$@ needs rebuilding, which can only be done when NOT cross-compiling"; \
	  exit 1; \
	fi
	$(MAKE) $(AM_MAKEFLAGS) @PAT2INCEXE@
	./pat2inc $< $@

# just get *.inc generated
gnushogi_bootstrap: $(BUILTHEADERS)
	:

# optional support for prebuilding a bbk

gnushogi.bbk: $(top_srcdir)/misc/gnushogi.tbk gnushogi$(EXEEXT)
	rm -f $@
	cat $< > _tmp_t
	echo quit | ./gnushogi -R -b _tmp_t -B $@ -S 8000 -P 40 3 0
	rm _tmp_t
gnuminishogi.bbk: $(top_srcdir)/misc/gnuminishogi.tbk gnuminishogi$(EXEEXT)
	rm -f $@
	cat $< > _tmp_t
	echo quit | ./gnuminishogi -R -b _tmp_t -B $@ -S 8000 -P 40 3 0
	rm _tmp_t