update release version and regenerate preformatted copies.
[gnash.git] / Makefile.am
blobc2f39fe904c4a715728ba24e40708e14ddb6f875
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
111 if LIBLTDL1
112 EXTRA_DIST += libltdl/ltdl.h libltdl/ltdl.c
113 endif
115 # dist-hook:
116 #       @test -d "$(distdir)/packaging" || $(mkinstalldirs) "$(distdir)/packaging"
117 #       cp -p $(srcdir)/*.am $(top_distdir)/packaging/
119 CLEANFILES = .configline
120 DISTCLEANFILES = revno.h .lastmod
121 MAINTAINERCLEANFILES = revno.h .lastmod
122 BUILT_SOURCES = revno.h .configline
125 # Extract info from the repository to include in the build.
126 # If top source dir is not a git repository or git is not installed,
127 # keep the current revno.h file (which should be part of any distribution).
128 # It's primarily used by the testsuites and when building binary packages
129 # from multiple branches.
131 # This ia a big hack around makes's built in dependency checking, as the
132 # key file here isn't part of the normal files. In the source tree for
133 # developers, the .git/index files changes on any commits or pulls. We
134 # only want to regenerate this file if that file changes, so we have to
135 # do the dependency check ourselves.
136 revno.h:
137         @if test \! -e .lastmod; then \
138           touch -t 197001010000 .lastmod; \
139         fi; \
140         if test -d $(top_srcdir)/.git -a x"${GIT}" != x; then \
141           if test $(top_srcdir)/.git/index -nt .lastmod; then \
142             echo "Getting build info for revno.h"; \
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           comm_id="none"; \
150           nick="master"; \
151         fi; \
152         if test \! -z "$${revno}"; 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           touch .lastmod; \
158         fi
160 .configline: revno.h
161         -@rm -f .configline
162         @head config.log | grep " .*/configure " | sed -e 's:^  . .*configure ::' > .configline
165 # Precompiled header support
167 include $(srcdir)/pch.am
170 # Binary tarball packaging
172 include $(srcdir)/packaging/snapshot.am
175 # Build an RPM package
177 include $(srcdir)/packaging/rpm.am
179 # Build a Debian/Ubuntu .deb GNU/Linux package
180 include $(srcdir)/packaging/deb.am
183 # Build a Debian Familiar .ipk GNU/Linux package. These are always
184 # cross compiled, typically for the ARM or XScale.
186 include $(srcdir)/packaging/ipkg.am
189 # Access Linux Platform support.
191 include $(srcdir)/packaging/alp.am
194 # BSD package building
196 include $(srcdir)/packaging/bsd.am
199 # Mozille/Firefox XPI support
201 include $(srcdir)/packaging/xpi.am
203 mudflap:
204         @echo "Rebuilding with GCC Mudflap support"
205         $(MAKE) CXXFLAGS="$(CXXFLAGS) -fmudflapth" LDFLAGS="$(LDFLAGS) -lmudflapth"
207 mudflap-check:
208         @echo "Rechecking with GCC Mudflap support"
209         $(MAKE) check CXXFLAGS="$(CXXFLAGS) -fmudflap" LDFLAGS="$(LDFLAGS) -lmudflap"
211 # Set a few variables to what features we selected so we can dump it with the
212 # test of the config
213 dumpconfig:
214         @echo ""
215         @echo "Building in directories: $(SUBDIRS)"
216         @echo "Some directories may be excluded from the build"
217         @uname -a
218         $(CXX) -v
219         @echo "CXXFLAGS: $(CXXFLAGS)"
220         @echo ""
221         @echo "Image decoding support..."
222         @echo " JPEG_CFLAGS is $(JPEG_CFLAGS)"
223         @echo " JPEG_LIBS is $(JPEG_LIBS)"
224         @echo " PNG_CFLAGS is $(PNG_CFLAGS)"
225         @echo " PNG_LIBS is $(PNG_LIBS)"
226         @echo " GIF_CFLAGS is $(GIF_CFLAGS)"
227         @echo " GIF_LIBS is $(GIF_LIBS)"
228         @echo "Audio decoding support..."
229 if USE_GST_ENGINE
230         @echo " GSTREAMER_CFLAGS is $(GSTREAMER_CFLAGS)"
231         @echo " GSTREAMER_LIBS is $(GSTREAMER_LIBS)"
232         @echo " GSTREAMER_PBUTILS_CFLAGS is $(GSTREAMER_PBUTILS_CFLAGS)"
233         @echo " GSTREAMER_PBUTILS_LIBS is $(GSTREAMER_PBUTILS_LIBS)"
234 endif
235 if USE_FFMPEG_ENGINE
236         @echo " FFMPEG_CFLAGS is $(FFMPEG_CFLAGS)"
237         @echo " FFMPEG_LIBS is $(FFMPEG_LIBS)"
238         @echo " OGG_CFLAGS is $(OGG_CFLAGS)"
239         @echo " OGG_LIBS is $(OGG_LIBS)"
240 endif
241 if HAVE_SPEEX
242         @echo " SPEEX_CFLAGS is $(SPEEX_CFLAGS)"
243         @echo " SPEEXDSP_CFLAGS is $(SPEEXDSP_CFLAGS)"
244         @echo " SPEEX_LIBS is $(SPEEX_LIBS)"
245         @echo " SPEEXDSP_LIBS is $(SPEEXDSP_LIBS)"
246 endif
247         @echo "GUI Toolkit decoding support..." 
248         @echo " SDL_CFLAGS is $(SDL_CFLAGS)"
249         @echo " SDL_LIBS is $(SDL_LIBS)"
250 if BUILD_KDE3_GUI
251         @echo " KDE3_CFLAGS is $(KDE3_CFLAGS)"
252         @echo " KDE3_LIBS is $(KDE3_LIBS)"
253 endif
254 if BUILD_KDE4_GUI
255         @echo " KDE4_CFLAGS is $(KDE4_CFLAGS)"
256         @echo " KDE4_LIBS is $(KDE4_LIBS)"
257 endif
258 if BUILD_QT3_GUI
259         @echo " QT3_CFLAGS is $(QT3_CFLAGS)"
260         @echo " QT3_LIBS is $(QT3_LIBS)"
261 endif
262 if BUILD_QT4_GUI
263         @echo " QT4_CFLAGS is $(QT4_CFLAGS)"
264         @echo " QT4_LIBS is $(QT4_LIBS)"
265 endif
266 if BUILD_QTOPIA3_GUI
267         @echo " QTOPIA3_CFLAGS is $(QTOPIA3_CFLAGS)"
268         @echo " QTOPIA3_LIBS is $(QTOPIA3_LIBS)"
269 endif
270 if BUILD_QTOPIA4_GUI
271         @echo " QTOPIA4_CFLAGS is $(QTOPIA4_CFLAGS)"
272         @echo " QTOPIA4_LIBS is $(QTOPIA4_LIBS)"
273 endif
274 if BUILD_FLTK_GUI
275         @echo " FLTK2_CFLAGS is $(FLTK2_CFLAGS)"
276         @echo " FLTK2_LIBS is $(FLTK2_LIBS)"
277         @echo " XFT_CFLAGS is $(XFT_CFLAGS)"
278         @echo " XFT_LIBS is $(XFT_LIBS)"
279 endif
280 if HAIKU
281         @echo " HAIKU_LIBS is $(HAIKU_LIBS)"
282 endif
283 if BUILD_GTK_GUI
284         @echo " GTK2_CFLAGS is $(GTK2_CFLAGS)"
285         @echo " GTK2_LIBS is $(GTK2_LIBS)"
286         @echo " PANGO_CFLAGS is $(PANGO_CFLAGS)"
287         @echo " PANGO_LIBS is $(PANGO_LIBS)"
288         @echo " ATK_CFLAGS is $(ATK_CFLAGS)"
289         @echo " ATK_LIBS is $(ATK_LIBS)"
290 endif
291         @echo " X11_CFLAGS is $(X11_CFLAGS)"
292         @echo " X11_LIBS is $(X11_LIBS)"
293         @echo "Support libraries..."
294         @echo " INCLTDL $(INCLTDL) "
295         @echo " LIBLTDL $(LIBLTDL) "
296         @echo " GLIB_CFLAGS is $(GLIB_CFLAGS)"
297         @echo " GLIB_LIBS is $(GLIB_LIBS)"
298         @echo " Z_CFLAGS is $(Z_CFLAGS)"
299         @echo " Z_LIBS is $(Z_LIBS)"
300         @echo " FREETYPE_CFLAGS is $(FREETYPE2_CFLAGS)"
301         @echo " FREETYPE_LIBS is $(FREETYPE2_LIBS)"
302         @echo " FONTCONFIG_CFLAGS is $(FONTCONFIG_CFLAGS)"
303         @echo " FONTCONFIG_LIBS is $(FONTCONFIG_LIBS)"
304         @echo " LIBINTL is $(LIBINTL)"
305 if HAVE_DMALLOC
306         @echo " DMALLOC_CFLAGS is $(DMALLOC_CFLAGS)"
307         @echo " DMALLOC_LIBS is $(DMALLOC_LIBS)"
308 endif
309 if BUILD_MYSQL_EXT
310         @echo " MYSQL_CFLAGS is $(MYSQL_CFLAGS)"
311         @echo " MYSQL_LIBS is $(MYSQL_LIBS)"
312 endif
313         @echo " PTHREAD_CFLAGS is $(PTHREAD_CFLAGS)"
314         @echo " PTHREAD_LIBS is $(PTHREAD_LIBS)"
315         @echo " CURL_CFLAGS is $(CURL_CFLAGS)"
316         @echo " CURL_LIBS is $(CURL_LIBS)"
317         @echo " BOOST_CFLAGS is $(BOOST_CFLAGS)"
318         @echo " BOOST_LIBS is $(BOOST_LIBS)"
319         @if test -n "$(BOOST_CYGNAL_LIBS)"; then \
320           echo "        BOOST_CYGNAL_LIBS is $(BOOST_CYGNAL_LIBS)"; \
321         fi
322 if ENABLE_MING
323         @echo " MING_VERSION_CODE $(MING_VERSION_CODE) "
324         @echo " MING_LIBS $(MING_LIBS) "
325         @echo " MING_CFLAGS $(MING_CFLAGS) "
326         @echo " MAKESWF $(MAKESWF) "
327 endif
328 if ENABLE_MTASC
329         @echo " MTASC $(MTASC)"
330         @echo " MTASC CLASSPATH $(MTASC_CLASSPATH)"
331 endif
332 if ENABLE_HAXE
333         @echo " HAXE $(HAXE)"
334         @echo " HAXE CLASSPATH $(HAXE_CLASSPATH)"
335 endif
336 if ENABLE_SWFMILL
337         @echo " SWFMILL $(SWFMILL) "
338         @echo " SWFMILL_VERSION_CODE $(SWFMILL_VERSION) "
339 endif
340 if ENABLE_SWFC
341         @echo " SWFC $(SWFC) "
342 endif
343 if ENABLE_SWFDEC_TESTSUITE
344         @echo " SWFDEC_TESTSUITE $(SWFDEC_TESTSUITE)"
345 endif
346 if ENABLE_HTTP_TESTSUITE
347         @echo " HTTP_TESTSUITE $(HTTP_TESTSUITE)"
348 endif
349 if ENABLE_RED5_TESTING
350         @echo " RED5_HOST $(RED5_HOST)"
351 endif
352         @echo "Graphics support..."     
353 if BUILD_CAIRO_RENDERER
354         @echo " CAIRO_CFLAGS is $(CAIRO_CFLAGS)"
355         @echo " CAIRO_LIBS is $(CAIRO_LIBS)"
356 endif
357 if BUILD_OGL_RENDERER
358         @echo " GLEXT_CFLAGS is $(GLEXT_CFLAGS)"
359         @echo " GLEXT_LIBS is $(GLEXT_LIBS)"
360         @echo " OPENGL_CFLAGS is $(OPENGL_CFLAGS)"
361         @echo " OPENGL_LIBS is $(OPENGL_LIBS)"
362 endif
363 if BUILD_AGG_RENDERER
364         @echo " AGG_CFLAGS is $(AGG_CFLAGS)"
365         @echo " AGG_LIBS is $(AGG_LIBS)"
366 endif
367         @echo ""
368         @echo "A blank value for CFLAGS means the header is installed in the"
369         @echo "default system header location. All the LIBS should have a"
370         @echo "legit value"
371         @echo ""
372         @echo "Configurable options are:"
373         @echo " Media handlers: $(MEDIA_CONFIG)"
374         @echo " Renderer engines: $(RENDERER_CONFIG)"
375         @echo " Hardware Acceleration: $(HWACCEL_CONFIG)"
377 if BUILD_SSL
378         @echo " SSL_CFLAGS is $(SSL_CFLAGS)"
379         @echo " SSL_LIBS is $(SSL_LIBS)"
380 endif
381 if BUILD_SSH
382         @echo " SSH_CFLAGS is $(SSH_CFLAGS)"
383         @echo " SSH_LIBS is $(SSH_LIBS)"
384 endif
385 if BUILD_GTK_GUI
386 if HAVE_XV
387         @echo " Supported GUI: GTK (+XVideo)"
388 else
389         @echo " Supported GUI: GTK"
390 endif
391 endif
392 if BUILD_DUMP_GUI
393         @echo " Supported GUI: Dump"
394 endif
395 if BUILD_KDE3_GUI
396         @echo " Supported GUI: KDE3"
397 endif
398 if BUILD_KDE4_GUI
399         @echo " Supported GUI: KDE4"
400 endif
401 if BUILD_QTOPIA3_GUI
402         @echo " Supported GUI: QTOPIA3"
403 endif
404 if BUILD_QTOPIA4_GUI
405         @echo " Supported GUI: QTOPIA4"
406 endif
407 if BUILD_SDL_GUI
408         @echo " Supported GUI: SDL"
409 endif
410 if BUILD_FLTK_GUI
411         @echo " Supported GUI: FLTK"
412 endif
413 if BUILD_AQUA_GUI
414         @echo " Supported GUI: AQUA"
415 endif
416 if BUILD_FB_GUI
417         @echo " Supported GUI: FB"
418 endif
419 if BUILD_AMIGAOS4_GUI
420        @echo " Supported GUI: AMIGAOS4"
421 endif
422 if BUILD_HAIKU_GUI
423         @echo " Supported GUI: Haiku"
424 endif
425 if JEMALLOC
426         @echo " Using jemalloc memory manager"
427 endif
429         @if test -n "$(EXTENSIONS_LIST)" ; then \
430           echo "        Extensions added are: $(EXTENSIONS_LIST)"; \
431         fi
432         @if test -n "$(SECURITY_LIST)" ; then \
433           echo "        Security features enabled are: $(SECURITY_LIST)"; \
434         fi
435         @if test -n "$(STATISTICS_LIST)" ; then \
436           echo "        Statistics features enabled are: $(STATISTICS_LIST)"; \
437         fi
438 if KPARTS3
439         @echo " KPARTS 3.x (KDE) plugin enabled"
440         @echo "   KPARTS 3.x plugin install dir: $(KDE_PLUGINDIR)"
441         @echo "   KPARTS 3.x service install dir: $(KDE_SERVICESDIR)"
442         @echo "   KPARTS 3.x config dir: ${KDE_CONFIGDIR}"
443         @echo "   KPARTS 3.x appsdata dir: ${KDE_APPSDATADIR}"
444 else
445         @echo " KPARTS 3.x (KDE) plugin disabled"
446 endif
447 if KPARTS4
448         @echo " KPARTS 4.x (KDE) plugin enabled"
449         @echo "   KPARTS 4.x plugin install dir: $(KDE4_PLUGINDIR)"
450         @echo "   KPARTS 4.x service install dir: $(KDE4_SERVICESDIR)"
451         @echo "   KPARTS 4.x config dir: ${KDE4_CONFIGDIR}"
452         @echo "   KPARTS 4.x appsdata dir: ${KDE4_APPSDATADIR}"
453 else
454         @echo " KPARTS 4.x (KDE) plugin disabled"
455 endif
457 if NPAPI
458         @echo " NPAPI (Mozilla) plugin enabled"
459         @echo "   NPAPI plugin install dir: $(FIREFOX_PLUGINS)"
460 else
461         @echo " NPAPI (Mozilla) plugin disabled"
462 endif
463 if USE_PYTHON
464         @echo " PYTHON support enabled"
465 else
466         @echo " PYTHON support disabled"
467 endif
469 if TESTSUITE
470 check-local:
471         $(MAKE) anal
473 anal testreport checksum:
474         $(srcdir)/testsuite/analyse-results.sh
475 endif
477 .PHONY : dumpconfig \
478         revno.h \
479         anal \
480         testreport \
481         checksum \
482         check \
483         mudflap \
484         mudflap-check \
485         install-plugins \
486         uninstall-plugins \
487         install-plugin \
488         apidoc
490 install-plugins install-plugin uninstall-plugins install-pkglib:
491         $(MAKE) -C plugin $@
493 apidoc:
494         $(MAKE) -C doc $@
496 pkgconfigdir = $(libdir)/pkgconfig
497 pkgconfig_DATA = \
498         gnash.pc \
499         $(NULL)
501 SWFDEC_REPO=git://anongit.freedesktop.org/git/swfdec/swfdec
502 SWFDEC_MOUNT=$(srcdir)/testsuite/swfdec/src
503 fetch-swfdec:
504         if test -d "$(SWFDEC_MOUNT)"; then \
505             cd "$(SWFDEC_MOUNT)" && git pull && git branch -v; \
506         else \
507             git clone $(SWFDEC_REPO) "$(SWFDEC_MOUNT)"; \
508         fi 
510 package:
511         @if test -f /etc/debian_version; then $(MAKE) deb; \
512           else if test -f /etc/redhat-release; then $(MAKE) rpm; \
513             else echo "Gnash will not be packaged for this platform"; \
514         fi;fi
516 packageclean:
517         -test -z "$(CLEANFILES)" || rm -rf $(CLEANFILES)
519 # these files are created when building packages
520 CLEANFILES += *.deb *.dsc *.gz *.bz2 *.changes deb-copy-stamp gnash*git* gnash*dev rpmbuild gnash.spec .rpmmacros