Merge branch 'master' of git.sv.gnu.org:/srv/git/gnash
[gnash.git] / Makefile.am
blob5406d8ef4902074160ce9db154e90472d16803b7
1
2 #   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
3
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
16
18 ## Process this file with automake to produce Makefile.in
19 # no-portability allows us to use GNU make variable assignments
20 # without automake complaining.
21 AUTOMAKE_OPTIONS = 1.6.0 -Wno-portability
23 ACLOCAL_AMFLAGS = -I macros -I cygnal
24 noinst_SCRIPT = autogen.sh
27 ## Any custom ./configure switch we want to be
28 ## given at 'make distcheck' time should go here
30 ## We set plugins install dirs to a user-writable 
31 ## and likely unused directory for now to avoid
32 ## permission problems and unexpected unistalls
33 ## from home dir. Ideally we should put them somewhere
34 ## under ${prefix} to make the uninstall check effective
35 ## (and I believe it should actually be the default when
36 ## --prefix is given, but that's another story --strk)
38 ## We also want to build everything possible, since we're
39 ## testing builds.
40 DISTCHECK_CONFIGURE_FLAGS = \
41         --with-plugins-install=prefix \
42         --enable-extensions=all \
43         --enable-gui=all \
44         --disable-testsuite
45 #--enable-cygnal
47 if CYGNAL
48 CYGNAL_DIR = cygnal
49 endif
51 STD_DIRS = \
52         libbase \
53         libmedia \
54         libsound \
55         libcore \
56         librender \
57         gui \
58         plugin \
59         $(CYGNAL_DIR) \
60         utilities \
61         doc \
62         po \
63         $(NULL)
65 if LIBLTDL2
66 LIBLTDLDIR = libltdl
67 endif
69 if HAVE_VAAPI
70 VAAPI_DIR = libvaapi
71 endif
73 SUBDIRS = $(LIBLTDLDIR) $(VAAPI_DIR) $(STD_DIRS)
74 DIST_SUBDIRS = $(STD_DIRS) cygnal extensions testsuite libltdl libvaapi
76 if TESTSUITE
77 SUBDIRS += testsuite
78 endif
80 if BUILD_EXTENSIONS
81 SUBDIRS += extensions
82 endif
84 # man_MANS = doc/gnash.1 doc/gprocessor.1 doc/dumpshm.1 soldumper.1
86 EXTRA_DIST =  \
87         README \
88         README.git \
89         autogen.sh \
90         config.rpath \
91         macros/incllist macros/libslist \
92         ChangeLog-0.8.0 \
93         ChangeLog-0.8.1 \
94         ChangeLog-0.8.2 \
95         ChangeLog-0.8.3 \
96         ChangeLog-0.8.4 \
97         ChangeLog-0.8.5 \
98         ChangeLog-0.8.6 \
99         ChangeLog-0.8.7 \
100         ChangeLog-0.8.8 \
101         packaging/deb.am \
102         packaging/snapshot.am \
103         packaging/alp.am \
104         packaging/ipkg.am \
105         packaging/bsd.am \
106         packaging/rpm.am \
107         packaging/gnash.xpm \
108         packaging/klash.xpm \
109         revno.h
112 # dist-hook:
113 #       @test -d "$(distdir)/packaging" || $(mkinstalldirs) "$(distdir)/packaging"
114 #       cp -p $(srcdir)/*.am $(top_distdir)/packaging/
116 CLEANFILES = .configline
117 MAINTAINERCLEANFILES = revno.h .lastmod
118 BUILT_SOURCES = revno.h .configline
121 # Extract info from the repository to include in the build.
122 # If top source dir is not a git repository or git is not installed,
123 # keep the current revno.h file (which should be part of any distribution).
124 # It's primarily used by the testsuites and when building binary packages
125 # from multiple branches.
127 # This ia a big hack around makes's built in dependency checking, as the
128 # key file here isn't part of the normal files. In the source tree for
129 # developers, the .git/index files changes on any commits or pulls. We
130 # only want to regenerate this file if that file changes, so we have to
131 # do the dependency check ourselves.
132 revno.h:
133         @if test -d $(top_srcdir)/.git -a x"${GIT}" != x; then \
134           nowmod="$(shell stat -c "%X" $(top_srcdir)/.git/index)"; \
135           if test -e .lastmod; then \
136             lastmod="$(shell cat .lastmod)"; \
137           else \
138             lastmod=0; \
139           fi; \
140           if test $${nowmod} -gt $${lastmod}; then \
141             echo "Getting build info for revno.h"; \
142             rm -f .lastmod; echo "$${nowmod}" > .lastmod; \
143             revno="`cd $(top_srcdir) ; $(GIT) rev-list HEAD | wc -l`"; \
144             comm_id="`cd $(top_srcdir) ; $(GIT) rev-parse --short HEAD`"; \
145             nick="`cd $(top_srcdir) ; $(GIT) branch | grep '^\*' | cut -d ' ' -f 2`"; \
146           fi; \
147         else \
148           revno="$(NOW)"; \
149           nick="master"; \
150           comm_id="none"; \
151         fi; \
152         if test $${nowmod} -gt $${lastmod}; then \
153           echo "Generating revno.h ($${nick} $${revno} $${comm_id})"; \
154           echo "static const char* BRANCH_REVNO  = \"$${revno}\";" > revno.h; \
155           echo "static const char* BRANCH_NICK = \"$${nick}\";" >> revno.h; \
156           echo "static const char* COMMIT_ID = \"$${comm_id}\";" >> revno.h; \
157         fi
159 .configline: revno.h
160         -@rm -f .configline
161         @head config.log | grep " .*/configure " | sed -e 's:^  . .*configure ::' > .configline
164 # Precompiled header support
166 include $(srcdir)/pch.am
169 # Binary tarball packaging
171 include $(srcdir)/packaging/snapshot.am
174 # Build an RPM package
176 include $(srcdir)/packaging/rpm.am
178 # Build a Debian/Ubuntu .deb GNU/Linux package
179 include $(srcdir)/packaging/deb.am
182 # Build a Debian Familiar .ipk GNU/Linux package. These are always
183 # cross compiled, typically for the ARM or XScale.
185 include $(srcdir)/packaging/ipkg.am
188 # Access Linux Platform support.
190 include $(srcdir)/packaging/alp.am
193 # BSD package building
195 include $(srcdir)/packaging/bsd.am
198 # Mozille/Firefox XPI support
200 include $(srcdir)/packaging/xpi.am
202 mudflap:
203         @echo "Rebuilding with GCC Mudflap support"
204         $(MAKE) CXXFLAGS="$(CXXFLAGS) -fmudflapth" LDFLAGS="$(LDFLAGS) -lmudflapth"
206 mudflap-check:
207         @echo "Rechecking with GCC Mudflap support"
208         $(MAKE) check CXXFLAGS="$(CXXFLAGS) -fmudflap" LDFLAGS="$(LDFLAGS) -lmudflap"
210 # Set a few variables to what features we selected so we can dump it with the
211 # test of the config
212 dumpconfig:
213         @echo ""
214         @echo "Building in directories: $(SUBDIRS)"
215         @echo "Some directories may be excluded from the build"
216         @uname -a
217         $(CXX) -v
218         @echo "CXXFLAGS: $(CXXFLAGS)"
219         @echo ""
220         @echo "Image decoding support..."
221         @echo " JPEG_CFLAGS is $(JPEG_CFLAGS)"
222         @echo " JPEG_LIBS is $(JPEG_LIBS)"
223         @echo " PNG_CFLAGS is $(PNG_CFLAGS)"
224         @echo " PNG_LIBS is $(PNG_LIBS)"
225         @echo " GIF_CFLAGS is $(GIF_CFLAGS)"
226         @echo " GIF_LIBS is $(GIF_LIBS)"
227         @echo "Audio decoding support..."
228 if USE_GST_ENGINE
229         @echo " GSTREAMER_CFLAGS is $(GSTREAMER_CFLAGS)"
230         @echo " GSTREAMER_LIBS is $(GSTREAMER_LIBS)"
231         @echo " GSTREAMER_PBUTILS_CFLAGS is $(GSTREAMER_PBUTILS_CFLAGS)"
232         @echo " GSTREAMER_PBUTILS_LIBS is $(GSTREAMER_PBUTILS_LIBS)"
233 endif
234 if USE_FFMPEG_ENGINE
235         @echo " FFMPEG_CFLAGS is $(FFMPEG_CFLAGS)"
236         @echo " FFMPEG_LIBS is $(FFMPEG_LIBS)"
237         @echo " OGG_CFLAGS is $(OGG_CFLAGS)"
238         @echo " OGG_LIBS is $(OGG_LIBS)"
239 endif
240 if HAVE_SPEEX
241         @echo " SPEEX_CFLAGS is $(SPEEX_CFLAGS)"
242         @echo " SPEEXDSP_CFLAGS is $(SPEEXDSP_CFLAGS)"
243         @echo " SPEEX_LIBS is $(SPEEX_LIBS)"
244         @echo " SPEEXDSP_LIBS is $(SPEEXDSP_LIBS)"
245 endif
246         @echo "GUI Toolkit decoding support..." 
247         @echo " SDL_CFLAGS is $(SDL_CFLAGS)"
248         @echo " SDL_LIBS is $(SDL_LIBS)"
249 if BUILD_KDE3_GUI
250         @echo " KDE3_CFLAGS is $(KDE3_CFLAGS)"
251         @echo " KDE3_LIBS is $(KDE3_LIBS)"
252 endif
253 if BUILD_KDE4_GUI
254         @echo " KDE4_CFLAGS is $(KDE4_CFLAGS)"
255         @echo " KDE4_LIBS is $(KDE4_LIBS)"
256 endif
257 if BUILD_QT3_GUI
258         @echo " QT3_CFLAGS is $(QT3_CFLAGS)"
259         @echo " QT3_LIBS is $(QT3_LIBS)"
260 endif
261 if BUILD_QT4_GUI
262         @echo " QT4_CFLAGS is $(QT4_CFLAGS)"
263         @echo " QT4_LIBS is $(QT4_LIBS)"
264 endif
265 if BUILD_QTOPIA3_GUI
266         @echo " QTOPIA3_CFLAGS is $(QTOPIA3_CFLAGS)"
267         @echo " QTOPIA3_LIBS is $(QTOPIA3_LIBS)"
268 endif
269 if BUILD_QTOPIA4_GUI
270         @echo " QTOPIA4_CFLAGS is $(QTOPIA4_CFLAGS)"
271         @echo " QTOPIA4_LIBS is $(QTOPIA4_LIBS)"
272 endif
273 if BUILD_FLTK_GUI
274         @echo " FLTK2_CFLAGS is $(FLTK2_CFLAGS)"
275         @echo " FLTK2_LIBS is $(FLTK2_LIBS)"
276         @echo " XFT_CFLAGS is $(XFT_CFLAGS)"
277         @echo " XFT_LIBS is $(XFT_LIBS)"
278 endif
279 if HAIKU
280         @echo " HAIKU_LIBS is $(HAIKU_LIBS)"
281 endif
282 if BUILD_GTK_GUI
283         @echo " GTK2_CFLAGS is $(GTK2_CFLAGS)"
284         @echo " GTK2_LIBS is $(GTK2_LIBS)"
285         @echo " PANGO_CFLAGS is $(PANGO_CFLAGS)"
286         @echo " PANGO_LIBS is $(PANGO_LIBS)"
287         @echo " ATK_CFLAGS is $(ATK_CFLAGS)"
288         @echo " ATK_LIBS is $(ATK_LIBS)"
289 endif
290         @echo " X11_CFLAGS is $(X11_CFLAGS)"
291         @echo " X11_LIBS is $(X11_LIBS)"
292         @echo "Support libraries..."
293         @echo " INCLTDL $(INCLTDL) "
294         @echo " LIBLTDL $(LIBLTDL) "
295         @echo " GLIB_CFLAGS is $(GLIB_CFLAGS)"
296         @echo " GLIB_LIBS is $(GLIB_LIBS)"
297         @echo " Z_CFLAGS is $(Z_CFLAGS)"
298         @echo " Z_LIBS is $(Z_LIBS)"
299         @echo " FREETYPE_CFLAGS is $(FREETYPE2_CFLAGS)"
300         @echo " FREETYPE_LIBS is $(FREETYPE2_LIBS)"
301         @echo " FONTCONFIG_CFLAGS is $(FONTCONFIG_CFLAGS)"
302         @echo " FONTCONFIG_LIBS is $(FONTCONFIG_LIBS)"
303         @echo " LIBINTL is $(LIBINTL)"
304 if HAVE_DMALLOC
305         @echo " DMALLOC_CFLAGS is $(DMALLOC_CFLAGS)"
306         @echo " DMALLOC_LIBS is $(DMALLOC_LIBS)"
307 endif
308 if BUILD_MYSQL_EXT
309         @echo " MYSQL_CFLAGS is $(MYSQL_CFLAGS)"
310         @echo " MYSQL_LIBS is $(MYSQL_LIBS)"
311 endif
312         @echo " PTHREAD_CFLAGS is $(PTHREAD_CFLAGS)"
313         @echo " PTHREAD_LIBS is $(PTHREAD_LIBS)"
314         @echo " CURL_CFLAGS is $(CURL_CFLAGS)"
315         @echo " CURL_LIBS is $(CURL_LIBS)"
316         @echo " BOOST_CFLAGS is $(BOOST_CFLAGS)"
317         @echo " BOOST_LIBS is $(BOOST_LIBS)"
318         @if test -n "$(BOOST_CYGNAL_LIBS)"; then \
319           echo "        BOOST_CYGNAL_LIBS is $(BOOST_CYGNAL_LIBS)"; \
320         fi
321 if ENABLE_MING
322         @echo " MING_VERSION_CODE $(MING_VERSION_CODE) "
323         @echo " MING_LIBS $(MING_LIBS) "
324         @echo " MING_CFLAGS $(MING_CFLAGS) "
325         @echo " MAKESWF $(MAKESWF) "
326 endif
327 if ENABLE_MTASC
328         @echo " MTASC $(MTASC)"
329         @echo " MTASC CLASSPATH $(MTASC_CLASSPATH)"
330 endif
331 if ENABLE_HAXE
332         @echo " HAXE $(HAXE)"
333         @echo " HAXE CLASSPATH $(HAXE_CLASSPATH)"
334 endif
335 if ENABLE_SWFMILL
336         @echo " SWFMILL $(SWFMILL) "
337         @echo " SWFMILL_VERSION_CODE $(SWFMILL_VERSION) "
338 endif
339 if ENABLE_SWFC
340         @echo " SWFC $(SWFC) "
341 endif
342 if ENABLE_SWFDEC_TESTSUITE
343         @echo " SWFDEC_TESTSUITE $(SWFDEC_TESTSUITE)"
344 endif
345 if ENABLE_HTTP_TESTSUITE
346         @echo " HTTP_TESTSUITE $(HTTP_TESTSUITE)"
347 endif
348 if ENABLE_RED5_TESTING
349         @echo " RED5_HOST $(RED5_HOST)"
350 endif
351         @echo "Graphics support..."     
352 if BUILD_CAIRO_RENDERER
353         @echo " CAIRO_CFLAGS is $(CAIRO_CFLAGS)"
354         @echo " CAIRO_LIBS is $(CAIRO_LIBS)"
355 endif
356 if BUILD_OGL_RENDERER
357         @echo " GLEXT_CFLAGS is $(GLEXT_CFLAGS)"
358         @echo " GLEXT_LIBS is $(GLEXT_LIBS)"
359         @echo " OPENGL_CFLAGS is $(OPENGL_CFLAGS)"
360         @echo " OPENGL_LIBS is $(OPENGL_LIBS)"
361 endif
362 if BUILD_AGG_RENDERER
363         @echo " AGG_CFLAGS is $(AGG_CFLAGS)"
364         @echo " AGG_LIBS is $(AGG_LIBS)"
365 endif
366         @echo ""
367         @echo "A blank value for CFLAGS means the header is installed in the"
368         @echo "default system header location. All the LIBS should have a"
369         @echo "legit value"
370         @echo ""
371         @echo "Configurable options are:"
372         @echo " Media handlers: $(MEDIA_CONFIG)"
373         @echo " Renderer engines: $(RENDERER_CONFIG)"
374         @echo " Hardware Acceleration: $(HWACCEL_CONFIG)"
376 if BUILD_SSL
377         @echo " SSL_CFLAGS is $(SSL_CFLAGS)"
378         @echo " SSL_LIBS is $(SSL_LIBS)"
379 endif
380 if BUILD_SSH
381         @echo " SSH_CFLAGS is $(SSH_CFLAGS)"
382         @echo " SSH_LIBS is $(SSH_LIBS)"
383 endif
384 if BUILD_GTK_GUI
385 if HAVE_XV
386         @echo " Supported GUI: GTK (+XVideo)"
387 else
388         @echo " Supported GUI: GTK"
389 endif
390 endif
391 if BUILD_DUMP_GUI
392         @echo " Supported GUI: Dump"
393 endif
394 if BUILD_KDE3_GUI
395         @echo " Supported GUI: KDE3"
396 endif
397 if BUILD_KDE4_GUI
398         @echo " Supported GUI: KDE4"
399 endif
400 if BUILD_QTOPIA3_GUI
401         @echo " Supported GUI: QTOPIA3"
402 endif
403 if BUILD_QTOPIA4_GUI
404         @echo " Supported GUI: QTOPIA4"
405 endif
406 if BUILD_SDL_GUI
407         @echo " Supported GUI: SDL"
408 endif
409 if BUILD_FLTK_GUI
410         @echo " Supported GUI: FLTK"
411 endif
412 if BUILD_AQUA_GUI
413         @echo " Supported GUI: AQUA"
414 endif
415 if BUILD_FB_GUI
416         @echo " Supported GUI: FB"
417 endif
418 if BUILD_AMIGAOS4_GUI
419        @echo " Supported GUI: AMIGAOS4"
420 endif
421 if BUILD_HAIKU_GUI
422         @echo " Supported GUI: Haiku"
423 endif
424 if JEMALLOC
425         @echo " Using jemalloc memory manager"
426 endif
428         @if test -n "$(EXTENSIONS_LIST)" ; then \
429           echo "        Extensions added are: $(EXTENSIONS_LIST)"; \
430         fi
431         @if test -n "$(SECURITY_LIST)" ; then \
432           echo "        Security features enabled are: $(SECURITY_LIST)"; \
433         fi
434         @if test -n "$(STATISTICS_LIST)" ; then \
435           echo "        Statistics features enabled are: $(STATISTICS_LIST)"; \
436         fi
437 if KPARTS3
438         @echo " KPARTS 3.x (KDE) plugin enabled"
439         @echo "   KPARTS 3.x plugin install dir: $(KDE_PLUGINDIR)"
440         @echo "   KPARTS 3.x service install dir: $(KDE_SERVICESDIR)"
441         @echo "   KPARTS 3.x config dir: ${KDE_CONFIGDIR}"
442         @echo "   KPARTS 3.x appsdata dir: ${KDE_APPSDATADIR}"
443 else
444         @echo " KPARTS 3.x (KDE) plugin disabled"
445 endif
446 if KPARTS4
447         @echo " KPARTS 4.x (KDE) plugin enabled"
448         @echo "   KPARTS 4.x plugin install dir: $(KDE4_PLUGINDIR)"
449         @echo "   KPARTS 4.x service install dir: $(KDE4_SERVICESDIR)"
450         @echo "   KPARTS 4.x config dir: ${KDE4_CONFIGDIR}"
451         @echo "   KPARTS 4.x appsdata dir: ${KDE4_APPSDATADIR}"
452 else
453         @echo " KPARTS 4.x (KDE) plugin disabled"
454 endif
456 if NPAPI
457         @echo " NPAPI (Mozilla) plugin enabled"
458         @echo "   NPAPI plugin install dir: $(FIREFOX_PLUGINS)"
459 else
460         @echo " NPAPI (Mozilla) plugin disabled"
461 endif
462 if USE_PYTHON
463         @echo " PYTHON support enabled"
464 else
465         @echo " PYTHON support disabled"
466 endif
468 if TESTSUITE
469 check-local:
470         $(MAKE) anal
472 anal testreport checksum:
473         $(srcdir)/testsuite/anaylse-results.sh
474 endif
476 .PHONY : dumpconfig \
477         revno.h \
478         anal \
479         testreport \
480         checksum \
481         check \
482         mudflap \
483         mudflap-check \
484         install-plugins \
485         uninstall-plugins \
486         install-plugin \
487         apidoc
489 install-plugins install-plugin uninstall-plugins install-pkglib:
490         $(MAKE) -C plugin $@
492 apidoc:
493         $(MAKE) -C doc $@
495 pkgconfigdir = $(libdir)/pkgconfig
496 pkgconfig_DATA = \
497         gnash.pc \
498         $(NULL)
500 SWFDEC_REPO=git://anongit.freedesktop.org/git/swfdec/swfdec
501 SWFDEC_MOUNT=$(srcdir)/testsuite/swfdec/src
502 fetch-swfdec:
503         if test -d "$(SWFDEC_MOUNT)"; then \
504             cd "$(SWFDEC_MOUNT)" && git pull && git branch -v; \
505         else \
506             git clone $(SWFDEC_REPO) "$(SWFDEC_MOUNT)"; \
507         fi