-
Notifications
You must be signed in to change notification settings - Fork 31
/
Makefile.am
539 lines (498 loc) · 14.6 KB
/
Makefile.am
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
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
#
# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
# Free Software Foundation, Inc.
#
# This program 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 3 of the License, or
# (at your option) any later version.
#
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
## Process this file with automake to produce Makefile.in
# no-portability allows us to use GNU make variable assignments
# without automake complaining.
AUTOMAKE_OPTIONS = 1.6.0 -Wno-portability
ACLOCAL_AMFLAGS = -I macros -I cygnal
noinst_SCRIPT = autogen.sh
CXXFLAGS += $(CROSS_CXXFLAGS)
LDFLAGS += $(CROSS_LDFLAGS)
##
## Any custom ./configure switch we want to be
## given at 'make distcheck' time should go here
##
## We set plugins install dirs to a user-writable
## and likely unused directory for now to avoid
## permission problems and unexpected unistalls
## from home dir. Ideally we should put them somewhere
## under ${prefix} to make the uninstall check effective
## (and I believe it should actually be the default when
## --prefix is given, but that's another story --strk)
##
## We also want to build everything possible, since we're
## testing builds. We also don't use optimization, is makes
## the build go faster.
DISTCHECK_CONFIGURE_FLAGS = \
--with-plugins-install=prefix \
--enable-extensions=all \
--enable-gui=all \
--enable-renderer=all \
--enable-python \
--enable-cygnal
# Only build all devices on Linux, as Input Events are
# primarily a Linux only thing.
if LINUX
DISTCHECK_CONFIGURE_FLAGS += --enable-device=all
else
DISTCHECK_CONFIGURE_FLAGS += --disable-jemalloc
endif
if CYGNAL
CYGNAL_DIR = cygnal
endif
if BUILD_DEVICES
DEVICES_DIR = libdevice
endif
if TESTSUITE
TEST_DIR = testsuite
endif
if BUILD_EXTENSIONS
EXT_DIR = extensions
endif
if BUILD_LIBSOUND
SOUND_DIR = libsound
endif
if BUILD_LIBMEDIA
MEDIA_DIR = libmedia
endif
SUBDIRS = \
desktop \
$(DEVICES_DIR) \
libbase \
$(MEDIA_DIR) \
$(SOUND_DIR) \
libcore \
librender \
gui \
plugin \
$(CYGNAL_DIR) \
utilities \
$(EXT_DIR) \
doc \
po \
$(TEST_DIR) \
$(NULL)
# man_MANS = doc/gnash.1 doc/gprocessor.1 doc/dumpshm.1 soldumper.1
EXTRA_DIST = \
README \
README.git \
autogen.sh \
config.rpath \
base-attempter.sh \
macros/incllist macros/libslist \
doc/changelogs/ChangeLog-0.8.0 \
doc/changelogs/ChangeLog-0.8.1 \
doc/changelogs/ChangeLog-0.8.2 \
doc/changelogs/ChangeLog-0.8.3 \
doc/changelogs/ChangeLog-0.8.4 \
doc/changelogs/ChangeLog-0.8.5 \
doc/changelogs/ChangeLog-0.8.6 \
doc/changelogs/ChangeLog-0.8.7 \
doc/changelogs/ChangeLog-0.8.8 \
packaging/deb.am \
packaging/snapshot.am \
packaging/alp.am \
packaging/ipkg.am \
packaging/bsd.am \
packaging/rpm.am \
packaging/gnash.xpm \
packaging/klash.xpm \
revno.h
# dist-hook:
# @test -d "$(distdir)/packaging" || $(mkinstalldirs) "$(distdir)/packaging"
# cp -p $(srcdir)/*.am $(top_distdir)/packaging/
CLEANFILES = .configline
DISTCLEANFILES = revno.h .lastmod deb-attempt-install-dependencies.sh rpm-attempt-install-dependencies.sh
MAINTAINERCLEANFILES = revno.h .lastmod
BUILT_SOURCES = revno.h .configline
#
# Extract info from the repository to include in the build.
# If top source dir is not a git repository or git is not installed,
# keep the current revno.h file (which should be part of any distribution).
# It's primarily used by the testsuites and when building binary packages
# from multiple branches.
#
# This ia a big hack around makes's built in dependency checking, as the
# key file here isn't part of the normal files. In the source tree for
# developers, the .git/index files changes on any commits or pulls. We
# only want to regenerate this file if that file changes, so we have to
# do the dependency check ourselves.
revno.h:
@if test \! -f .lastmod -o \! -f revno.h ; then \
touch -t 197001010000 .lastmod; \
fi; \
if test -d $(top_srcdir)/.git -a x"${GIT}" != x; then \
if test $(top_srcdir)/.git/index -nt .lastmod; then \
echo "Getting build info for revno.h"; \
revno="`cd $(top_srcdir) ; $(GIT) rev-list HEAD | wc -l`"; \
comm_id="`cd $(top_srcdir) ; $(GIT) rev-parse --short HEAD`"; \
nick="`cd $(top_srcdir) ; $(GIT) branch | grep '^\*' | cut -d ' ' -f 2`"; \
fi \
else \
if test \! -f revno.h; then \
revno="$(NOW)"; \
comm_id="none"; \
nick="$(VERSION)"; \
fi; \
fi; \
if test \! -z "$${revno}"; then \
echo "Generating revno.h ($${nick} $${revno} $${comm_id})"; \
echo "#define BRANCH_REVNO \"$${revno}\"" > revno.h; \
echo "#define BRANCH_NICK \"$${nick}\"" >> revno.h; \
echo "#define COMMIT_ID \"$${comm_id}\"" >> revno.h; \
touch .lastmod; \
fi
.configline: revno.h
-@rm -f .configline
@head config.log | grep " .*/configure " | sed -e 's:^ . .*configure ::' > .configline
#
# Precompiled header support
#
include $(srcdir)/pch.am
#
# Binary tarball packaging
#
include $(srcdir)/packaging/snapshot.am
#
# Build an RPM package
#
include $(srcdir)/packaging/rpm.am
# Build a Debian/Ubuntu .deb GNU/Linux package
include $(srcdir)/packaging/deb.am
#
# Build a Debian Familiar .ipk GNU/Linux package. These are always
# cross compiled, typically for the ARM or XScale.
#
include $(srcdir)/packaging/ipkg.am
#
# Access Linux Platform support.
#
include $(srcdir)/packaging/alp.am
#
# BSD package building
#
include $(srcdir)/packaging/bsd.am
mudflap:
@echo "Rebuilding with GCC Mudflap support"
$(MAKE) CXXFLAGS="$(CXXFLAGS) -fmudflapth" LDFLAGS="$(LDFLAGS) -lmudflapth"
mudflap-check:
@echo "Rechecking with GCC Mudflap support"
$(MAKE) check CXXFLAGS="$(CXXFLAGS) -fmudflap" LDFLAGS="$(LDFLAGS) -lmudflap"
# Set a few variables to what features we selected so we can dump it with the
# test of the config
dumpconfig:
@echo ""
@echo "Building in directories: $(SUBDIRS)"
@echo "Some directories may be excluded from the build"
@uname -a
$(CXX) -v
@echo "CXXFLAGS: $(CXXFLAGS)"
@echo "CFLAGS: $(CFLAGS)"
@echo "LDFLAGS: $(LDFLAGS)"
@echo ""
@echo "Image decoding support..."
@echo " JPEG_CFLAGS is $(JPEG_CFLAGS)"
@echo " JPEG_LIBS is $(JPEG_LIBS)"
@echo " PNG_CFLAGS is $(PNG_CFLAGS)"
@echo " PNG_LIBS is $(PNG_LIBS)"
@echo " GIF_CFLAGS is $(GIF_CFLAGS)"
@echo " GIF_LIBS is $(GIF_LIBS)"
@echo "Audio decoding support..."
if USE_GST_ENGINE
@echo " GSTREAMER_CFLAGS is $(GSTREAMER_CFLAGS)"
@echo " GSTREAMER_LIBS is $(GSTREAMER_LIBS)"
@echo " GSTREAMER_PBUTILS_CFLAGS is $(GSTREAMER_PBUTILS_CFLAGS)"
@echo " GSTREAMER_PBUTILS_LIBS is $(GSTREAMER_PBUTILS_LIBS)"
endif
if USE_FFMPEG_ENGINE
@echo " FFMPEG_CFLAGS is $(FFMPEG_CFLAGS)"
@echo " FFMPEG_LIBS is $(FFMPEG_LIBS)"
endif
if HAVE_SPEEX
@echo " SPEEX_CFLAGS is $(SPEEX_CFLAGS)"
@echo " SPEEXDSP_CFLAGS is $(SPEEXDSP_CFLAGS)"
@echo " SPEEX_LIBS is $(SPEEX_LIBS)"
@echo " SPEEXDSP_LIBS is $(SPEEXDSP_LIBS)"
endif
@echo "GUI Toolkit decoding support..."
@echo " SDL_CFLAGS is $(SDL_CFLAGS)"
@echo " SDL_LIBS is $(SDL_LIBS)"
if BUILD_KDE3_GUI
@echo " KDE3_CFLAGS is $(KDE3_CFLAGS)"
@echo " KDE3_LIBS is $(KDE3_LIBS)"
@echo " QT3_CFLAGS is $(QT3_CFLAGS)"
@echo " QT3_LIBS is $(QT3_LIBS)"
endif
if BUILD_QT4_GUI
@echo " QT4_CFLAGS is $(QT4_CFLAGS)"
@echo " QT4_LIBS is $(QT4_LIBS)"
endif
if KPARTS4
@echo " KDE4_CFLAGS is $(KDE4_CFLAGS)"
@echo " KDE4_LIBS is $(KDE4_LIBS)"
endif
if BUILD_QT4_GUI
@echo " QT4_CFLAGS is $(QT4_CFLAGS)"
@echo " QT4_LIBS is $(QT4_LIBS)"
endif
if BUILD_QTOPIA3_GUI
@echo " QTOPIA3_CFLAGS is $(QTOPIA3_CFLAGS)"
@echo " QTOPIA3_LIBS is $(QTOPIA3_LIBS)"
endif
if BUILD_QTOPIA4_GUI
@echo " QTOPIA4_CFLAGS is $(QTOPIA4_CFLAGS)"
@echo " QTOPIA4_LIBS is $(QTOPIA4_LIBS)"
endif
if BUILD_FLTK_GUI
@echo " FLTK2_CFLAGS is $(FLTK2_CFLAGS)"
@echo " FLTK2_LIBS is $(FLTK2_LIBS)"
@echo " XFT_CFLAGS is $(XFT_CFLAGS)"
@echo " XFT_LIBS is $(XFT_LIBS)"
endif
if HAIKU
@echo " HAIKU_LIBS is $(HAIKU_LIBS)"
endif
if BUILD_GTK_GUI
@echo " GTK2_CFLAGS is $(GTK2_CFLAGS)"
@echo " GTK2_LIBS is $(GTK2_LIBS)"
@echo " PANGO_CFLAGS is $(PANGO_CFLAGS)"
@echo " PANGO_LIBS is $(PANGO_LIBS)"
@echo " ATK_CFLAGS is $(ATK_CFLAGS)"
@echo " ATK_LIBS is $(ATK_LIBS)"
endif
@echo " X11_CFLAGS is $(X11_CFLAGS)"
@echo " X11_LIBS is $(X11_LIBS)"
@echo "Support libraries..."
@echo " LTDL_CFLAGS is $(LTDL_CFLAGS)"
@echo " LTDL_LIBS is $(LTDL_LIBS)"
@echo " GLIB_CFLAGS is $(GLIB_CFLAGS)"
@echo " GLIB_LIBS is $(GLIB_LIBS)"
@echo " Z_CFLAGS is $(Z_CFLAGS)"
@echo " Z_LIBS is $(Z_LIBS)"
@echo " FREETYPE_CFLAGS is $(FREETYPE2_CFLAGS)"
@echo " FREETYPE_LIBS is $(FREETYPE2_LIBS)"
@echo " FONTCONFIG_CFLAGS is $(FONTCONFIG_CFLAGS)"
@echo " FONTCONFIG_LIBS is $(FONTCONFIG_LIBS)"
@echo " LIBINTL is $(LIBINTL)"
if BUILD_MYSQL_EXT
@echo " MYSQL_CFLAGS is $(MYSQL_CFLAGS)"
@echo " MYSQL_LIBS is $(MYSQL_LIBS)"
endif
@echo " PTHREAD_CFLAGS is $(PTHREAD_CFLAGS)"
@echo " PTHREAD_LIBS is $(PTHREAD_LIBS)"
@echo " CURL_CFLAGS is $(CURL_CFLAGS)"
@echo " CURL_LIBS is $(CURL_LIBS)"
@echo " BOOST_CFLAGS is $(BOOST_CFLAGS)"
@echo " BOOST_LIBS is $(BOOST_LIBS)"
@if test -n "$(BOOST_CYGNAL_LIBS)"; then \
echo " BOOST_CYGNAL_LIBS is $(BOOST_CYGNAL_LIBS)"; \
fi
if ENABLE_MING
@echo " MING_VERSION_CODE $(MING_VERSION_CODE) "
@echo " MING_LIBS $(MING_LIBS) "
@echo " MING_CFLAGS $(MING_CFLAGS) "
@echo " MAKESWF $(MAKESWF) "
endif
if ENABLE_MTASC
@echo " MTASC $(MTASC)"
@echo " MTASC CLASSPATH $(MTASC_CLASSPATH)"
endif
if ENABLE_HAXE
@echo " HAXE $(HAXE)"
@echo " HAXE CLASSPATH $(HAXE_CLASSPATH)"
endif
if ENABLE_SWFMILL
@echo " SWFMILL $(SWFMILL) "
@echo " SWFMILL_VERSION_CODE $(SWFMILL_VERSION) "
endif
if ENABLE_SWFC
@echo " SWFC $(SWFC) "
endif
if ENABLE_SWFDEC_TESTSUITE
@echo " SWFDEC_TESTSUITE $(SWFDEC_TESTSUITE)"
endif
if ENABLE_HTTP_TESTSUITE
@echo " HTTP_TESTSUITE $(HTTP_TESTSUITE)"
endif
if ENABLE_RED5_TESTING
@echo " RED5_HOST $(RED5_HOST)"
endif
@echo "Graphics support..."
if BUILD_CAIRO_RENDERER
@echo " CAIRO_CFLAGS is $(CAIRO_CFLAGS)"
@echo " CAIRO_LIBS is $(CAIRO_LIBS)"
endif
if BUILD_OGL_RENDERER
@echo " GLEXT_CFLAGS is $(GLEXT_CFLAGS)"
@echo " GLEXT_LIBS is $(GLEXT_LIBS)"
@echo " OPENGL_CFLAGS is $(OPENGL_CFLAGS)"
@echo " OPENGL_LIBS is $(OPENGL_LIBS)"
endif
if BUILD_OVG_RENDERER
@echo " OPENVG_CFLAGS is $(OPENVG_CFLAGS)"
@echo " OPENVG_LIBS is $(OPENVG_LIBS)"
endif
if BUILD_GLES1_RENDERER
@echo " GLES1_CFLAGS is $(GLES1_CFLAGS)"
@echo " GLES1_LIBS is $(GLES1_LIBS)"
endif
if BUILD_GLES2_RENDERER
@echo " GLES2_CFLAGS is $(GLES2_CFLAGS)"
@echo " GLES2_LIBS is $(GLES2_LIBS)"
endif
if BUILD_AGG_RENDERER
@echo " AGG_CFLAGS is $(AGG_CFLAGS)"
@echo " AGG_LIBS is $(AGG_LIBS)"
endif
@echo ""
@echo "A blank value for CFLAGS means the header is installed in the"
@echo "default system header location. All the LIBS should have a"
@echo "legit value"
@echo ""
@echo "Configurable options are:"
@echo " Media handlers: $(MEDIA_CONFIG)"
@echo " Renderer engines: $(RENDERER_CONFIG)"
@echo " Hardware Acceleration: $(HWACCEL_CONFIG)"
if BUILD_SSL
@echo " SSL_CFLAGS is $(SSL_CFLAGS)"
@echo " SSL_LIBS is $(SSL_LIBS)"
endif
if BUILD_SSH
@echo " SSH_CFLAGS is $(SSH_CFLAGS)"
@echo " SSH_LIBS is $(SSH_LIBS)"
endif
if BUILD_GTK_GUI
@echo " Supported GUI: GTK"
endif
if BUILD_DUMP_GUI
@echo " Supported GUI: Dump"
endif
if BUILD_KDE3_GUI
@echo " Supported GUI: KDE3"
endif
if BUILD_QT4_GUI
@echo " Supported GUI: QT4"
endif
if BUILD_QTOPIA3_GUI
@echo " Supported GUI: QTOPIA3"
endif
if BUILD_QTOPIA4_GUI
@echo " Supported GUI: QTOPIA4"
endif
if BUILD_SDL_GUI
@echo " Supported GUI: SDL"
endif
if BUILD_FLTK_GUI
@echo " Supported GUI: FLTK"
endif
if BUILD_AQUA_GUI
@echo " Supported GUI: AQUA"
endif
if BUILD_FB_GUI
@echo " Supported GUI: FB"
endif
if BUILD_AMIGAOS4_GUI
@echo " Supported GUI: AMIGAOS4"
endif
if BUILD_HAIKU_GUI
@echo " Supported GUI: Haiku"
endif
if JEMALLOC
@echo " Using jemalloc memory manager"
endif
@if test -n "$(EXTENSIONS_LIST)" ; then \
echo " Extensions added are: $(EXTENSIONS_LIST)"; \
fi
@if test -n "$(SECURITY_LIST)" ; then \
echo " Security features enabled are: $(SECURITY_LIST)"; \
fi
@if test -n "$(STATISTICS_LIST)" ; then \
echo " Statistics features enabled are: $(STATISTICS_LIST)"; \
fi
if KPARTS3
@echo " KPARTS 3.x (KDE) plugin enabled"
@echo " KPARTS 3.x plugin install dir: $(KDE_PLUGINDIR)"
@echo " KPARTS 3.x service install dir: $(KDE_SERVICESDIR)"
@echo " KPARTS 3.x config dir: ${KDE_CONFIGDIR}"
@echo " KPARTS 3.x appsdata dir: ${KDE_APPSDATADIR}"
else
@echo " KPARTS 3.x (KDE) plugin disabled"
endif
if KPARTS4
@echo " KPARTS 4.x (KDE) plugin enabled"
@echo " KPARTS 4.x plugin install dir: $(KDE4_PLUGINDIR)"
@echo " KPARTS 4.x service install dir: $(KDE4_SERVICESDIR)"
@echo " KPARTS 4.x config dir: ${KDE4_CONFIGDIR}"
@echo " KPARTS 4.x appsdata dir: ${KDE4_APPSDATADIR}"
else
@echo " KPARTS 4.x (KDE) plugin disabled"
endif
if NPAPI
@echo " NPAPI (Mozilla) plugin enabled"
@echo " NPAPI plugin install dir: $(FIREFOX_PLUGINS)"
else
@echo " NPAPI (Mozilla) plugin disabled"
endif
if USE_PYTHON
@echo " PYTHON support enabled"
else
@echo " PYTHON support disabled"
endif
if TESTSUITE
check-local:
$(MAKE) anal
anal testreport checksum:
$(srcdir)/testsuite/analyse-results.sh $(MODE)
endif
.PHONY : dumpconfig \
revno.h \
anal \
testreport \
checksum \
check \
mudflap \
mudflap-check \
install-plugins \
uninstall-plugins \
install-plugin \
apidoc
install-plugins install-plugin uninstall-plugins install-pkglib:
$(MAKE) -C plugin $@
apidoc:
$(MAKE) -C doc $@
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = \
gnash.pc \
$(NULL)
SWFDEC_REPO=git://anongit.freedesktop.org/git/swfdec/swfdec
SWFDEC_MOUNT=$(top_builddir)/testsuite/swfdec/src
fetch-swfdec:
if test -d "$(SWFDEC_MOUNT)"; then \
cd "$(SWFDEC_MOUNT)" && git pull && git branch -v; \
else \
git clone $(SWFDEC_REPO) "$(SWFDEC_MOUNT)"; \
fi
package:
@if test -f /etc/debian_version; then $(MAKE) deb; \
else if test -f /etc/redhat-release; then $(MAKE) rpm; \
else echo "Gnash will not be packaged for this platform"; \
fi;fi
packageclean:
-test -z "$(CLEANFILES)" || rm -rf $(CLEANFILES)
# these files are created when building packages
CLEANFILES += *.deb *.dsc *.gz *.bz2 *.changes deb-copy-stamp gnash*git* gnash-* rpmbuild gnash.spec .rpmmacros