tweak snapshot version for rc2
[gnash.git] / Makefile.am
blob1843ce86de2892c8346bae4cd26f8ba82171494b
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         desktop \
53         libbase \
54         libmedia \
55         libsound \
56         libcore \
57         librender \
58         gui \
59         plugin \
60         $(CYGNAL_DIR) \
61         utilities \
62         doc \
63         po \
64         $(NULL)
66 if LIBLTDL2
67 LIBLTDLDIR = libltdl
68 endif
70 if HAVE_VAAPI
71 VAAPI_DIR = libvaapi
72 endif
74 SUBDIRS = $(LIBLTDLDIR) $(VAAPI_DIR) $(STD_DIRS)
75 DIST_SUBDIRS = $(STD_DIRS) cygnal extensions testsuite libltdl libvaapi
77 if TESTSUITE
78 SUBDIRS += testsuite
79 endif
81 if BUILD_EXTENSIONS
82 SUBDIRS += extensions
83 endif
85 # man_MANS = doc/gnash.1 doc/gprocessor.1 doc/dumpshm.1 soldumper.1
87 EXTRA_DIST =  \
88         README \
89         README.git \
90         autogen.sh \
91         config.rpath \
92         macros/incllist macros/libslist \
93         ChangeLog-0.8.0 \
94         ChangeLog-0.8.1 \
95         ChangeLog-0.8.2 \
96         ChangeLog-0.8.3 \
97         ChangeLog-0.8.4 \
98         ChangeLog-0.8.5 \
99         ChangeLog-0.8.6 \
100         ChangeLog-0.8.7 \
101         ChangeLog-0.8.8 \
102         packaging/deb.am \
103         packaging/snapshot.am \
104         packaging/alp.am \
105         packaging/ipkg.am \
106         packaging/bsd.am \
107         packaging/rpm.am \
108         packaging/gnash.xpm \
109         packaging/klash.xpm \
110         revno.h
112 if LIBLTDL1
113 EXTRA_DIST += libltdl/ltdl.h libltdl/ltdl.c
114 endif
116 # dist-hook:
117 #       @test -d "$(distdir)/packaging" || $(mkinstalldirs) "$(distdir)/packaging"
118 #       cp -p $(srcdir)/*.am $(top_distdir)/packaging/
120 CLEANFILES = .configline
121 DISTCLEANFILES = revno.h .lastmod
122 MAINTAINERCLEANFILES = revno.h .lastmod
123 BUILT_SOURCES = revno.h .configline
126 # Extract info from the repository to include in the build.
127 # If top source dir is not a git repository or git is not installed,
128 # keep the current revno.h file (which should be part of any distribution).
129 # It's primarily used by the testsuites and when building binary packages
130 # from multiple branches.
132 # This ia a big hack around makes's built in dependency checking, as the
133 # key file here isn't part of the normal files. In the source tree for
134 # developers, the .git/index files changes on any commits or pulls. We
135 # only want to regenerate this file if that file changes, so we have to
136 # do the dependency check ourselves.
137 revno.h:
138         @if test \! -f .lastmod -o \! -f revno.h ; then \
139           touch -t 197001010000 .lastmod; \
140         fi; \
141         if test -d $(top_srcdir)/.git -a x"${GIT}" != x; then \
142           if test $(top_srcdir)/.git/index -nt .lastmod; then \
143             echo "Getting build info for revno.h"; \
144             revno="`cd $(top_srcdir) ; $(GIT) rev-list HEAD | wc -l`"; \
145             comm_id="`cd $(top_srcdir) ; $(GIT) rev-parse --short HEAD`"; \
146             nick="`cd $(top_srcdir) ; $(GIT) branch | grep '^\*' | cut -d ' ' -f 2`"; \
147           fi \
148         else \
149           revno="$(NOW)"; \
150           comm_id="none"; \
151           nick="$(VERSION)"; \
152         fi; \
153         if test \! -z "$${revno}"; then \
154           echo "Generating revno.h ($${nick} $${revno} $${comm_id})"; \
155           echo "static const char* BRANCH_REVNO  = \"$${revno}\";" > revno.h; \
156           echo "static const char* BRANCH_NICK = \"$${nick}\";" >> revno.h; \
157           echo "static const char* COMMIT_ID = \"$${comm_id}\";" >> revno.h; \
158           touch .lastmod; \
159         fi
161 .configline: revno.h
162         -@rm -f .configline
163         @head config.log | grep " .*/configure " | sed -e 's:^  . .*configure ::' > .configline
166 # Precompiled header support
168 include $(srcdir)/pch.am
171 # Binary tarball packaging
173 include $(srcdir)/packaging/snapshot.am
176 # Build an RPM package
178 include $(srcdir)/packaging/rpm.am
180 # Build a Debian/Ubuntu .deb GNU/Linux package
181 include $(srcdir)/packaging/deb.am
184 # Build a Debian Familiar .ipk GNU/Linux package. These are always
185 # cross compiled, typically for the ARM or XScale.
187 include $(srcdir)/packaging/ipkg.am
190 # Access Linux Platform support.
192 include $(srcdir)/packaging/alp.am
195 # BSD package building
197 include $(srcdir)/packaging/bsd.am
200 # Mozille/Firefox XPI support
202 include $(srcdir)/packaging/xpi.am
204 mudflap:
205         @echo "Rebuilding with GCC Mudflap support"
206         $(MAKE) CXXFLAGS="$(CXXFLAGS) -fmudflapth" LDFLAGS="$(LDFLAGS) -lmudflapth"
208 mudflap-check:
209         @echo "Rechecking with GCC Mudflap support"
210         $(MAKE) check CXXFLAGS="$(CXXFLAGS) -fmudflap" LDFLAGS="$(LDFLAGS) -lmudflap"
212 # Set a few variables to what features we selected so we can dump it with the
213 # test of the config
214 dumpconfig:
215         @echo ""
216         @echo "Building in directories: $(SUBDIRS)"
217         @echo "Some directories may be excluded from the build"
218         @uname -a
219         $(CXX) -v
220         @echo "CXXFLAGS: $(CXXFLAGS)"
221         @echo ""
222         @echo "Image decoding support..."
223         @echo " JPEG_CFLAGS is $(JPEG_CFLAGS)"
224         @echo " JPEG_LIBS is $(JPEG_LIBS)"
225         @echo " PNG_CFLAGS is $(PNG_CFLAGS)"
226         @echo " PNG_LIBS is $(PNG_LIBS)"
227         @echo " GIF_CFLAGS is $(GIF_CFLAGS)"
228         @echo " GIF_LIBS is $(GIF_LIBS)"
229         @echo "Audio decoding support..."
230 if USE_GST_ENGINE
231         @echo " GSTREAMER_CFLAGS is $(GSTREAMER_CFLAGS)"
232         @echo " GSTREAMER_LIBS is $(GSTREAMER_LIBS)"
233         @echo " GSTREAMER_PBUTILS_CFLAGS is $(GSTREAMER_PBUTILS_CFLAGS)"
234         @echo " GSTREAMER_PBUTILS_LIBS is $(GSTREAMER_PBUTILS_LIBS)"
235 endif
236 if USE_FFMPEG_ENGINE
237         @echo " FFMPEG_CFLAGS is $(FFMPEG_CFLAGS)"
238         @echo " FFMPEG_LIBS is $(FFMPEG_LIBS)"
239         @echo " OGG_CFLAGS is $(OGG_CFLAGS)"
240         @echo " OGG_LIBS is $(OGG_LIBS)"
241 endif
242 if HAVE_SPEEX
243         @echo " SPEEX_CFLAGS is $(SPEEX_CFLAGS)"
244         @echo " SPEEXDSP_CFLAGS is $(SPEEXDSP_CFLAGS)"
245         @echo " SPEEX_LIBS is $(SPEEX_LIBS)"
246         @echo " SPEEXDSP_LIBS is $(SPEEXDSP_LIBS)"
247 endif
248         @echo "GUI Toolkit decoding support..." 
249         @echo " SDL_CFLAGS is $(SDL_CFLAGS)"
250         @echo " SDL_LIBS is $(SDL_LIBS)"
251 if BUILD_KDE3_GUI
252         @echo " KDE3_CFLAGS is $(KDE3_CFLAGS)"
253         @echo " KDE3_LIBS is $(KDE3_LIBS)"
254 endif
255 if BUILD_KDE4_GUI
256         @echo " KDE4_CFLAGS is $(KDE4_CFLAGS)"
257         @echo " KDE4_LIBS is $(KDE4_LIBS)"
258 endif
259 if BUILD_QT3_GUI
260         @echo " QT3_CFLAGS is $(QT3_CFLAGS)"
261         @echo " QT3_LIBS is $(QT3_LIBS)"
262 endif
263 if BUILD_QT4_GUI
264         @echo " QT4_CFLAGS is $(QT4_CFLAGS)"
265         @echo " QT4_LIBS is $(QT4_LIBS)"
266 endif
267 if BUILD_QTOPIA3_GUI
268         @echo " QTOPIA3_CFLAGS is $(QTOPIA3_CFLAGS)"
269         @echo " QTOPIA3_LIBS is $(QTOPIA3_LIBS)"
270 endif
271 if BUILD_QTOPIA4_GUI
272         @echo " QTOPIA4_CFLAGS is $(QTOPIA4_CFLAGS)"
273         @echo " QTOPIA4_LIBS is $(QTOPIA4_LIBS)"
274 endif
275 if BUILD_FLTK_GUI
276         @echo " FLTK2_CFLAGS is $(FLTK2_CFLAGS)"
277         @echo " FLTK2_LIBS is $(FLTK2_LIBS)"
278         @echo " XFT_CFLAGS is $(XFT_CFLAGS)"
279         @echo " XFT_LIBS is $(XFT_LIBS)"
280 endif
281 if HAIKU
282         @echo " HAIKU_LIBS is $(HAIKU_LIBS)"
283 endif
284 if BUILD_GTK_GUI
285         @echo " GTK2_CFLAGS is $(GTK2_CFLAGS)"
286         @echo " GTK2_LIBS is $(GTK2_LIBS)"
287         @echo " PANGO_CFLAGS is $(PANGO_CFLAGS)"
288         @echo " PANGO_LIBS is $(PANGO_LIBS)"
289         @echo " ATK_CFLAGS is $(ATK_CFLAGS)"
290         @echo " ATK_LIBS is $(ATK_LIBS)"
291 endif
292         @echo " X11_CFLAGS is $(X11_CFLAGS)"
293         @echo " X11_LIBS is $(X11_LIBS)"
294         @echo "Support libraries..."
295         @echo " INCLTDL $(INCLTDL) "
296         @echo " LIBLTDL $(LIBLTDL) "
297         @echo " GLIB_CFLAGS is $(GLIB_CFLAGS)"
298         @echo " GLIB_LIBS is $(GLIB_LIBS)"
299         @echo " Z_CFLAGS is $(Z_CFLAGS)"
300         @echo " Z_LIBS is $(Z_LIBS)"
301         @echo " FREETYPE_CFLAGS is $(FREETYPE2_CFLAGS)"
302         @echo " FREETYPE_LIBS is $(FREETYPE2_LIBS)"
303         @echo " FONTCONFIG_CFLAGS is $(FONTCONFIG_CFLAGS)"
304         @echo " FONTCONFIG_LIBS is $(FONTCONFIG_LIBS)"
305         @echo " LIBINTL is $(LIBINTL)"
306 if HAVE_DMALLOC
307         @echo " DMALLOC_CFLAGS is $(DMALLOC_CFLAGS)"
308         @echo " DMALLOC_LIBS is $(DMALLOC_LIBS)"
309 endif
310 if BUILD_MYSQL_EXT
311         @echo " MYSQL_CFLAGS is $(MYSQL_CFLAGS)"
312         @echo " MYSQL_LIBS is $(MYSQL_LIBS)"
313 endif
314         @echo " PTHREAD_CFLAGS is $(PTHREAD_CFLAGS)"
315         @echo " PTHREAD_LIBS is $(PTHREAD_LIBS)"
316         @echo " CURL_CFLAGS is $(CURL_CFLAGS)"
317         @echo " CURL_LIBS is $(CURL_LIBS)"
318         @echo " BOOST_CFLAGS is $(BOOST_CFLAGS)"
319         @echo " BOOST_LIBS is $(BOOST_LIBS)"
320         @if test -n "$(BOOST_CYGNAL_LIBS)"; then \
321           echo "        BOOST_CYGNAL_LIBS is $(BOOST_CYGNAL_LIBS)"; \
322         fi
323 if ENABLE_MING
324         @echo " MING_VERSION_CODE $(MING_VERSION_CODE) "
325         @echo " MING_LIBS $(MING_LIBS) "
326         @echo " MING_CFLAGS $(MING_CFLAGS) "
327         @echo " MAKESWF $(MAKESWF) "
328 endif
329 if ENABLE_MTASC
330         @echo " MTASC $(MTASC)"
331         @echo " MTASC CLASSPATH $(MTASC_CLASSPATH)"
332 endif
333 if ENABLE_HAXE
334         @echo " HAXE $(HAXE)"
335         @echo " HAXE CLASSPATH $(HAXE_CLASSPATH)"
336 endif
337 if ENABLE_SWFMILL
338         @echo " SWFMILL $(SWFMILL) "
339         @echo " SWFMILL_VERSION_CODE $(SWFMILL_VERSION) "
340 endif
341 if ENABLE_SWFC
342         @echo " SWFC $(SWFC) "
343 endif
344 if ENABLE_SWFDEC_TESTSUITE
345         @echo " SWFDEC_TESTSUITE $(SWFDEC_TESTSUITE)"
346 endif
347 if ENABLE_HTTP_TESTSUITE
348         @echo " HTTP_TESTSUITE $(HTTP_TESTSUITE)"
349 endif
350 if ENABLE_RED5_TESTING
351         @echo " RED5_HOST $(RED5_HOST)"
352 endif
353         @echo "Graphics support..."     
354 if BUILD_CAIRO_RENDERER
355         @echo " CAIRO_CFLAGS is $(CAIRO_CFLAGS)"
356         @echo " CAIRO_LIBS is $(CAIRO_LIBS)"
357 endif
358 if BUILD_OGL_RENDERER
359         @echo " GLEXT_CFLAGS is $(GLEXT_CFLAGS)"
360         @echo " GLEXT_LIBS is $(GLEXT_LIBS)"
361         @echo " OPENGL_CFLAGS is $(OPENGL_CFLAGS)"
362         @echo " OPENGL_LIBS is $(OPENGL_LIBS)"
363 endif
364 if BUILD_AGG_RENDERER
365         @echo " AGG_CFLAGS is $(AGG_CFLAGS)"
366         @echo " AGG_LIBS is $(AGG_LIBS)"
367 endif
368         @echo ""
369         @echo "A blank value for CFLAGS means the header is installed in the"
370         @echo "default system header location. All the LIBS should have a"
371         @echo "legit value"
372         @echo ""
373         @echo "Configurable options are:"
374         @echo " Media handlers: $(MEDIA_CONFIG)"
375         @echo " Renderer engines: $(RENDERER_CONFIG)"
376         @echo " Hardware Acceleration: $(HWACCEL_CONFIG)"
378 if BUILD_SSL
379         @echo " SSL_CFLAGS is $(SSL_CFLAGS)"
380         @echo " SSL_LIBS is $(SSL_LIBS)"
381 endif
382 if BUILD_SSH
383         @echo " SSH_CFLAGS is $(SSH_CFLAGS)"
384         @echo " SSH_LIBS is $(SSH_LIBS)"
385 endif
386 if BUILD_GTK_GUI
387 if HAVE_XV
388         @echo " Supported GUI: GTK (+XVideo)"
389 else
390         @echo " Supported GUI: GTK"
391 endif
392 endif
393 if BUILD_DUMP_GUI
394         @echo " Supported GUI: Dump"
395 endif
396 if BUILD_KDE3_GUI
397         @echo " Supported GUI: KDE3"
398 endif
399 if BUILD_KDE4_GUI
400         @echo " Supported GUI: KDE4"
401 endif
402 if BUILD_QTOPIA3_GUI
403         @echo " Supported GUI: QTOPIA3"
404 endif
405 if BUILD_QTOPIA4_GUI
406         @echo " Supported GUI: QTOPIA4"
407 endif
408 if BUILD_SDL_GUI
409         @echo " Supported GUI: SDL"
410 endif
411 if BUILD_FLTK_GUI
412         @echo " Supported GUI: FLTK"
413 endif
414 if BUILD_AQUA_GUI
415         @echo " Supported GUI: AQUA"
416 endif
417 if BUILD_FB_GUI
418         @echo " Supported GUI: FB"
419 endif
420 if BUILD_AMIGAOS4_GUI
421        @echo " Supported GUI: AMIGAOS4"
422 endif
423 if BUILD_HAIKU_GUI
424         @echo " Supported GUI: Haiku"
425 endif
426 if JEMALLOC
427         @echo " Using jemalloc memory manager"
428 endif
430         @if test -n "$(EXTENSIONS_LIST)" ; then \
431           echo "        Extensions added are: $(EXTENSIONS_LIST)"; \
432         fi
433         @if test -n "$(SECURITY_LIST)" ; then \
434           echo "        Security features enabled are: $(SECURITY_LIST)"; \
435         fi
436         @if test -n "$(STATISTICS_LIST)" ; then \
437           echo "        Statistics features enabled are: $(STATISTICS_LIST)"; \
438         fi
439 if KPARTS3
440         @echo " KPARTS 3.x (KDE) plugin enabled"
441         @echo "   KPARTS 3.x plugin install dir: $(KDE_PLUGINDIR)"
442         @echo "   KPARTS 3.x service install dir: $(KDE_SERVICESDIR)"
443         @echo "   KPARTS 3.x config dir: ${KDE_CONFIGDIR}"
444         @echo "   KPARTS 3.x appsdata dir: ${KDE_APPSDATADIR}"
445 else
446         @echo " KPARTS 3.x (KDE) plugin disabled"
447 endif
448 if KPARTS4
449         @echo " KPARTS 4.x (KDE) plugin enabled"
450         @echo "   KPARTS 4.x plugin install dir: $(KDE4_PLUGINDIR)"
451         @echo "   KPARTS 4.x service install dir: $(KDE4_SERVICESDIR)"
452         @echo "   KPARTS 4.x config dir: ${KDE4_CONFIGDIR}"
453         @echo "   KPARTS 4.x appsdata dir: ${KDE4_APPSDATADIR}"
454 else
455         @echo " KPARTS 4.x (KDE) plugin disabled"
456 endif
458 if NPAPI
459         @echo " NPAPI (Mozilla) plugin enabled"
460         @echo "   NPAPI plugin install dir: $(FIREFOX_PLUGINS)"
461 else
462         @echo " NPAPI (Mozilla) plugin disabled"
463 endif
464 if USE_PYTHON
465         @echo " PYTHON support enabled"
466 else
467         @echo " PYTHON support disabled"
468 endif
470 if TESTSUITE
471 check-local:
472         $(MAKE) anal
474 anal testreport checksum:
475         $(srcdir)/testsuite/analyse-results.sh
476 endif
478 .PHONY : dumpconfig \
479         revno.h \
480         anal \
481         testreport \
482         checksum \
483         check \
484         mudflap \
485         mudflap-check \
486         install-plugins \
487         uninstall-plugins \
488         install-plugin \
489         apidoc
491 install-plugins install-plugin uninstall-plugins install-pkglib:
492         $(MAKE) -C plugin $@
494 apidoc:
495         $(MAKE) -C doc $@
497 pkgconfigdir = $(libdir)/pkgconfig
498 pkgconfig_DATA = \
499         gnash.pc \
500         $(NULL)
502 SWFDEC_REPO=git://anongit.freedesktop.org/git/swfdec/swfdec
503 SWFDEC_MOUNT=$(srcdir)/testsuite/swfdec/src
504 fetch-swfdec:
505         if test -d "$(SWFDEC_MOUNT)"; then \
506             cd "$(SWFDEC_MOUNT)" && git pull && git branch -v; \
507         else \
508             git clone $(SWFDEC_REPO) "$(SWFDEC_MOUNT)"; \
509         fi 
511 package:
512         @if test -f /etc/debian_version; then $(MAKE) deb; \
513           else if test -f /etc/redhat-release; then $(MAKE) rpm; \
514             else echo "Gnash will not be packaged for this platform"; \
515         fi;fi
517 packageclean:
518         -test -z "$(CLEANFILES)" || rm -rf $(CLEANFILES)
520 # these files are created when building packages
521 CLEANFILES += *.deb *.dsc *.gz *.bz2 *.changes deb-copy-stamp gnash*git* gnash-* rpmbuild gnash.spec .rpmmacros