File: Makefile.am

package info (click to toggle)
gnubg 1.06.002-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 26,604 kB
  • sloc: ansic: 97,578; xml: 15,136; sh: 4,919; yacc: 700; makefile: 581; python: 573; lex: 297; sql: 238; awk: 26
file content (274 lines) | stat: -rw-r--r-- 6,486 bytes parent folder | download | duplicates (2)
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
## $Id: Makefile.am,v 1.267 2017/06/28 20:17:54 plm Exp $

ACLOCAL_AMFLAGS = -I m4

SUBDIRS = win32 lib doc met po m4 sounds board3d textures scripts flags fonts non-src pixmaps .

bin_PROGRAMS = gnubg makebearoff makehyper bearoffdump makeweights

#
##include path
#
if WIN32
localeloc=-DLOCALEDIR=\"locale\" 
else
localeloc=-DLOCALEDIR=\"$(localedir)\"
endif 

AM_CPPFLAGS = -I$(srcdir)/lib -I$(srcdir)/board3d -I$(builddir)/pixmaps -I$(srcdir)/pixmaps \
	   $(localeloc) @FREETYPE2_CFLAGS@ @GLIB_CFLAGS@ \
	   @LIBPNG_CFLAGS@ @GTK_CFLAGS@ @CAIRO_CFLAGS@ @PANGOCAIRO_CFLAGS@ \
	   @GTHREAD_CFLAGS@ @GTKGLEXT_CFLAGS@ @CANBERRA_CFLAGS@ @GOBJECT_CFLAGS@ \
	   @LIBCURL_CPPFLAGS@

if USE_SQLITE
AM_CPPFLAGS += @SQLITE_CFLAGS@
endif
if USE_PYTHON
AM_CPPFLAGS += @PYTHON_CPPFLAGS@ 
endif

AM_CPPFLAGS += -DAC_DOCDIR='"$(docdir)"' -DAC_DATADIR='"$(datadir)"' -DAC_PKGDATADIR='"$(datadir)/gnubg"'

OTHER_LIBS =
if WIN32
OTHER_LIBS += win32/win32res.o
endif

BUILT_SOURCES = sgf_y.c sgf_l.c copying.c credits.c external_l.c external_y.c

#
## sources for building the main executable
#

gnubg_SOURCES = \
		analysis.c \
		analysis.h \
		backgammon.h \
		bearoff.c \
		bearoffgammon.c \
		bearoffgammon.h \
		bearoff.h \
		boarddim.h \
		boardpos.c \
		boardpos.h \
		common.h \
		copying.c \
		credits.c \
		credits.h \
		dbprovider.c \
		dbprovider.h \
		dice.c \
		dice.h \
		drawboard.c \
		drawboard.h \
        eval.c \
        evallock.c \
		eval.h \
		export.c \
		export.h \
		external.c \
		external.h \
		external_l.l \
		external_y.y \
		file.c \
		file.h \
		format.c \
		formatgs.c \
		formatgs.h \
		format.h \
		glib-ext.c \
		glib-ext.h \
		gnubg.c \
		gnubgmodule.c \
		gnubgmodule.h \
		html.c \
		htmlimages.c \
		import.c \
		import.h \
		latex.c \
		matchequity.c \
		matchequity.h \
		matchid.c \
		matchid.h \
		mec.c \
		mec.h \
        mtsupport.c \
		multithread.c \
		multithread.h \
		openurl.c \
		openurl.h \
		osr.c \
		osr.h \
		output.c \
		output.h \
		play.c \
		positionid.c \
		positionid.h \
		progress.c \
		progress.h \
		pylocdefs.h \
	    randomorg.h \
	    randomorg.c \
		relational.c \
		relational.h \
		render.c \
		render.h \
		renderprefs.c \
		renderprefs.h \
		rollout.c \
		rollout.h \
		set.c \
		sgf.c \
		sgf.h \
		sgf_l.l \
		sgf_y.y \
		show.c \
		simpleboard.c \
		simpleboard.h \
		sound.c \
		sound.h \
		speed.c \
		text.c \
		timer.c \
		util.h \
		util.c 

if USE_GTK
gnubg_SOURCES += gtkboard.c gtkboard.h gtkgame.c gtkgame.h gtkfile.c gtkfile.h \
		 gtkprefs.c gtkprefs.h gtk-multiview.c gtk-multiview.h gtktheory.c \
		 gtktheory.h gtkexport.c gtkexport.h gtkcube.c gtkcube.h \
		 gtkchequer.c gtkchequer.h gtkrace.c gtkrace.h gtkmovefilter.c \
		 gtkmovefilter.h gtkmet.c gtkmet.h gtksplash.c \
		 gtksplash.h gtkrolls.c gtkrolls.h gtktempmap.c gtktempmap.h \
		 gtkoptions.h gtkoptions.c gtktoolbar.h gtktoolbar.c \
		 gtkgamelist.c gtkpanels.c gtkpanels.h gtkmovelist.c gtkmovelistctrl.c gtkmovelistctrl.h \
		 gtkwindows.c gtkwindows.h gtkrelational.c gtkrelational.h gnubgstock.c gnubgstock.h \
		 gtkuidefs.h gtklocdefs.c gtklocdefs.h
endif


#
##linkpath for gnubg
#

gnubg_LDADD = -L$(srcdir)/lib lib/libevent.la
if USE_GTK
if FOUND_GLIB_COMPILE_RESOURCES
gnubg_LDADD += pixmaps/libresources.la
endif
endif
gnubg_LDADD += @GTK_LIBS@ @LIBPNG_LIBS@ @CAIRO_LIBS@ @PANGOCAIRO_LIBS@ \
	      @GTHREAD_LIBS@ @GOBJECT_LIBS@ \
	      @READLINE_LIBS@ @GMP_LIB@ @LTLIBOBJS@ \
	      @FREETYPE2_LIBS@ @GLIB_LIBS@ @CANBERRA_LIBS@ \
	      @LIBCURL@ $(OTHER_LIBS)

if USE_SQLITE
gnubg_LDADD += @SQLITE_LIBS@
endif
if USE_PYTHON
gnubg_LDADD += @PYTHON_LIBS@
endif
if USE_BOARD3D
gnubg_LDADD += -L$(srcdir)/board3d board3d/libboard3d.la $(GTKGLEXT_LIBS) $(GLU_LIBS)
endif

if WIN32
if USE_GTK
gnubg_LDFLAGS = -mwindows
endif
endif



#
##common sources for building the utility programs
#
UTILSOURCES = eval.h eval.c positionid.h positionid.c \
	matchequity.c matchequity.h matchid.h matchid.c \
	osr.c osr.h multithread.h mtsupport.c \
	bearoffgammon.c bearoffgammon.h bearoff.c bearoff.h \
	mec.h mec.c util.c util.h glib-ext.c glib-ext.h

makebearoff_SOURCES = makebearoff.c $(UTILSOURCES)
makebearoff_LDADD = -Llib lib/libevent.la @GLIB_LIBS@ @GTHREAD_LIBS@ @GOBJECT_LIBS@

makehyper_SOURCES = makehyper.c $(UTILSOURCES)
makehyper_LDADD =  -Llib lib/libevent.la @GLIB_LIBS@ @GTHREAD_LIBS@ @GOBJECT_LIBS@

bearoffdump_SOURCES = bearoffdump.c drawboard.c $(UTILSOURCES)
bearoffdump_LDADD = -Llib lib/libevent.la @GLIB_LIBS@ @GTHREAD_LIBS@ @GOBJECT_LIBS@

makeweights_SOURCES = makeweights.c glib-ext.c
makeweights_LDADD = -Llib lib/libevent.la @GLIB_LIBS@ @GTHREAD_LIBS@ @GOBJECT_LIBS@


#
##files to be installed in the datadir
#
pkgdata_DATA = gnubg_ts0.bd gnubg.wd boards.xml \
	gnubg_os0.bd textures.txt gnubg.sql gnubg.gtkrc gnubg.css

#
##files to add to the tarball when 'make dist'
#
EXTRA_DIST = config.rpath  copying.awk gnubg.gtkrc gnubg.css credits.sh \
	$(BUILT_SOURCES) ABOUT-NLS boards.xml gnubg.sql autogen.sh \
	gnubg.weights textures.txt AUTHORS \
	external_y.h sgf_y.h commands.inc movefilters.inc

#
# targets created by credits.sh
#
credits.c: credits.sh
	cd $(srcdir) && $(SHELL) ./credits.sh

credits.h: credits.sh
	cd $(srcdir) && $(SHELL) ./credits.sh

AUTHORS: credits.sh
	cd $(srcdir) && $(SHELL) ./credits.sh

#
##copying.c target
#
if WIN32
copying.c: copying.awk
	$(AWK) -f $(srcdir)/copying.awk < $(srcdir)/COPYING > $@

copying.$(OBJEXT): copying.c
	$(COMPILE) -c $< -o $@
else
copying.c: COPYING copying.awk
	$(AWK) -f $(srcdir)/copying.awk < $(srcdir)/COPYING > $@
endif


#
##databases
#
if CROSS_COMPILING
gnubg.wd:
	@echo ' ** NOTE: Since you are cross-compiling GNU Backgammon,'
	@echo ' ** it is not possible to generate weight and database files'
	@echo ' ** on the build system.  To create these files manually,'
	@echo ' ** use commands like:'
	@echo ' **   makeweights < gnubg.weights > gnubg.wd'
	@echo ' **   makebearoff -o 6 -s 7999999 -f gnubg_os0.bd'
	@echo ' **   makebearoff -t 6x6 -f gnubg_ts0.bd'
	@echo ' ** on the host system.'
else
gnubg.wd: gnubg.weights makeweights$(EXEEXT)
	[ $@ -nt $< ] || \
	./makeweights -f $@ $< 
gnubg_os0.bd: makebearoff$(EXEEXT)
	[ -s $@ ] || \
	./makebearoff -o 6 -s 7999999 -f $@
gnubg_ts0.bd: makebearoff$(EXEEXT)
	[ -s $@ ] || \
	./makebearoff -t 6x6 -f $@
endif

MOSTLYCLEANFILES=sgf_y.c sgf_y.h sgf_l.c external_l.c external_l.h external_y.c external_y.h copying.c credits.c credits.h AUTHORS
DISTCLEANFILES=gnubg_os0.bd gnubg_ts0.bd gnubg.wd