Do not assume directories passed to mkdirRecursive have to be absolute. Fixes bug...
[gnash.git] / Makefile.am
blobf959b6e5ef6998cdfbc36630b8d1efda8d6e07b5
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 = revno.h .configline
117 BUILT_SOURCES = revno.h .configline
120 # Extract info from the repository to include in the build. If
121 # bazar (bzr) isn't installed, just print stubs, as this is only
122 # used for display purposes. It's primarily used by the testsuites
123 # and when building binary packages from multiple branches.
124 # Note that this is only rebuilt after "make clean", if the Makefile
125 # has changed, or the source tree gets reconfigured. So unless you do
126 # a make clean, or nuke the revno.h file, this can get slightly
127 # behind the current version. Currently Gnash doesn't have this info
128 # so it'll be an improvement anyway. Bzr is amazing slow producing
129 # the info, which is why we don't want to do it all the time.
131 revno.h: Makefile.in
132         -@if test -d $(srcdir)/.bzr; then \
133           status=`which bzr 2>&1 | grep -c " no bzr"`; \
134           if test x"$${status}" = x"0"; then \
135             echo "Generating revno.h"; \
136             $(RM) -f revno.h; \
137             revno=`(cd $(srcdir) && bzr revno)`; \
138             nick=`basename $(top_srcdir)`; \
139           else \
140             revno="$(NOW)"; \
141           fi; \
142         else \
143           if test -d $(top_srcdir)/.git; then \
144             status=`which git 2>&1 | grep -c " no git"`; \
145             if test x"$${status}" = x"0"; then \
146               echo "Generating revno.h"; \
147               $(RM) -f revno.h; \
148               revno="`(cd $(top_srcdir) && git describe --tags | cut -d '-' -f 2-3 | tr a- a.)`"; \
149               nick="`(cd $(top_srcdir) && git branch | grep "\*" | cut -d ' ' -f 2)`"; \
150             fi; \
151           else \
152             revno="$(NOW)"; \
153             nick="none"; \
154           fi; \
155           if test x$$revno = x; then \
156             revno="$(NOW)"; \
157           fi; \
158         fi; \
159         echo "static const char* BRANCH_REVNO  = \"$${revno}\";" > revno.h; \
160         echo "static const char* BRANCH_NICK = \"$${nick}\";" >> revno.h;
162 # The branch nickname and revision number must be set before including
163 # the other Makefile fragments used for package building, as they use
164 # these values.
165 BRANCH_REVNO  := $(shell grep "REVNO" revno.h | cut -d '"' -f 2 | cut -d '.' -f 1)
166 BRANCH_NICK   := $(shell grep "NICK" revno.h | cut -d '"' -f 2)
168 .configline: config.log
169         -@rm -f .configline
170         @head config.log | grep " .*/configure " | sed -e 's:^  . .*configure ::' > .configline
173 # Precompiled header support
175 include $(srcdir)/pch.am
178 # Binary tarball packaging
180 include $(srcdir)/packaging/snapshot.am
183 # Build an RPM package
185 include $(srcdir)/packaging/rpm.am
187 # Build a Debian/Ubuntu .deb GNU/Linux package
188 include $(srcdir)/packaging/deb.am
191 # Build a Debian Familiar .ipk GNU/Linux package. These are always
192 # cross compiled, typically for the ARM or XScale.
194 include $(srcdir)/packaging/ipkg.am
197 # Access Linux Platform support.
199 include $(srcdir)/packaging/alp.am
202 # BSD package building
204 include $(srcdir)/packaging/bsd.am
207 # Mozille/Firefox XPI support
209 include $(srcdir)/packaging/xpi.am
211 mudflap:
212         @echo "Rebuilding with GCC Mudflap support"
213         $(MAKE) CXXFLAGS="$(CXXFLAGS) -fmudflapth" LDFLAGS="$(LDFLAGS) -lmudflapth"
215 mudflap-check:
216         @echo "Rechecking with GCC Mudflap support"
217         $(MAKE) check CXXFLAGS="$(CXXFLAGS) -fmudflap" LDFLAGS="$(LDFLAGS) -lmudflap"
219 # Set a few variables to what features we selected so we can dump it with the
220 # test of the config
221 dumpconfig:
222         @echo ""
223         @echo "Building in directories: $(SUBDIRS)"
224         @echo "Some directories may be excluded from the build"
225         @uname -a
226         $(CXX) -v
227         @echo "CXXFLAGS: $(CXXFLAGS)"
228         @echo ""
229         @echo "Image decoding support..."
230         @echo " JPEG_CFLAGS is $(JPEG_CFLAGS)"
231         @echo " JPEG_LIBS is $(JPEG_LIBS)"
232         @echo " PNG_CFLAGS is $(PNG_CFLAGS)"
233         @echo " PNG_LIBS is $(PNG_LIBS)"
234         @echo " GIF_CFLAGS is $(GIF_CFLAGS)"
235         @echo " GIF_LIBS is $(GIF_LIBS)"
236         @echo "Audio decoding support..."
237 if USE_GST_ENGINE
238         @echo " GSTREAMER_CFLAGS is $(GSTREAMER_CFLAGS)"
239         @echo " GSTREAMER_LIBS is $(GSTREAMER_LIBS)"
240         @echo " GSTREAMER_PBUTILS_CFLAGS is $(GSTREAMER_PBUTILS_CFLAGS)"
241         @echo " GSTREAMER_PBUTILS_LIBS is $(GSTREAMER_PBUTILS_LIBS)"
242 endif
243 if USE_FFMPEG_ENGINE
244         @echo " FFMPEG_CFLAGS is $(FFMPEG_CFLAGS)"
245         @echo " FFMPEG_LIBS is $(FFMPEG_LIBS)"
246         @echo " OGG_CFLAGS is $(OGG_CFLAGS)"
247         @echo " OGG_LIBS is $(OGG_LIBS)"
248 endif
249 if HAVE_SPEEX
250         @echo " SPEEX_CFLAGS is $(SPEEX_CFLAGS)"
251         @echo " SPEEXDSP_CFLAGS is $(SPEEXDSP_CFLAGS)"
252         @echo " SPEEX_LIBS is $(SPEEX_LIBS)"
253         @echo " SPEEXDSP_LIBS is $(SPEEXDSP_LIBS)"
254 endif
255         @echo "GUI Toolkit decoding support..." 
256         @echo " SDL_CFLAGS is $(SDL_CFLAGS)"
257         @echo " SDL_LIBS is $(SDL_LIBS)"
258 if BUILD_KDE3_GUI
259         @echo " KDE3_CFLAGS is $(KDE3_CFLAGS)"
260         @echo " KDE3_LIBS is $(KDE3_LIBS)"
261 endif
262 if BUILD_KDE4_GUI
263         @echo " KDE4_CFLAGS is $(KDE4_CFLAGS)"
264         @echo " KDE4_LIBS is $(KDE4_LIBS)"
265 endif
266 if BUILD_QT3_GUI
267         @echo " QT3_CFLAGS is $(QT3_CFLAGS)"
268         @echo " QT3_LIBS is $(QT3_LIBS)"
269 endif
270 if BUILD_QT4_GUI
271         @echo " QT4_CFLAGS is $(QT4_CFLAGS)"
272         @echo " QT4_LIBS is $(QT4_LIBS)"
273 endif
274 if BUILD_QTOPIA3_GUI
275         @echo " QTOPIA3_CFLAGS is $(QTOPIA3_CFLAGS)"
276         @echo " QTOPIA3_LIBS is $(QTOPIA3_LIBS)"
277 endif
278 if BUILD_QTOPIA4_GUI
279         @echo " QTOPIA4_CFLAGS is $(QTOPIA4_CFLAGS)"
280         @echo " QTOPIA4_LIBS is $(QTOPIA4_LIBS)"
281 endif
282 if BUILD_FLTK_GUI
283         @echo " FLTK2_CFLAGS is $(FLTK2_CFLAGS)"
284         @echo " FLTK2_LIBS is $(FLTK2_LIBS)"
285         @echo " XFT_CFLAGS is $(XFT_CFLAGS)"
286         @echo " XFT_LIBS is $(XFT_LIBS)"
287 endif
288 if HAIKU
289         @echo " HAIKU_LIBS is $(HAIKU_LIBS)"
290 endif
291 if BUILD_GTK_GUI
292         @echo " GTK2_CFLAGS is $(GTK2_CFLAGS)"
293         @echo " GTK2_LIBS is $(GTK2_LIBS)"
294         @echo " PANGO_CFLAGS is $(PANGO_CFLAGS)"
295         @echo " PANGO_LIBS is $(PANGO_LIBS)"
296         @echo " ATK_CFLAGS is $(ATK_CFLAGS)"
297         @echo " ATK_LIBS is $(ATK_LIBS)"
298 endif
299         @echo " X11_CFLAGS is $(X11_CFLAGS)"
300         @echo " X11_LIBS is $(X11_LIBS)"
301         @echo "Support libraries..."
302         @echo " INCLTDL $(INCLTDL) "
303         @echo " LIBLTDL $(LIBLTDL) "
304         @echo " GLIB_CFLAGS is $(GLIB_CFLAGS)"
305         @echo " GLIB_LIBS is $(GLIB_LIBS)"
306         @echo " Z_CFLAGS is $(Z_CFLAGS)"
307         @echo " Z_LIBS is $(Z_LIBS)"
308         @echo " FREETYPE_CFLAGS is $(FREETYPE2_CFLAGS)"
309         @echo " FREETYPE_LIBS is $(FREETYPE2_LIBS)"
310         @echo " FONTCONFIG_CFLAGS is $(FONTCONFIG_CFLAGS)"
311         @echo " FONTCONFIG_LIBS is $(FONTCONFIG_LIBS)"
312         @echo " LIBINTL is $(LIBINTL)"
313 if HAVE_DMALLOC
314         @echo " DMALLOC_CFLAGS is $(DMALLOC_CFLAGS)"
315         @echo " DMALLOC_LIBS is $(DMALLOC_LIBS)"
316 endif
317 if BUILD_MYSQL_EXT
318         @echo " MYSQL_CFLAGS is $(MYSQL_CFLAGS)"
319         @echo " MYSQL_LIBS is $(MYSQL_LIBS)"
320 endif
321         @echo " PTHREAD_CFLAGS is $(PTHREAD_CFLAGS)"
322         @echo " PTHREAD_LIBS is $(PTHREAD_LIBS)"
323         @echo " CURL_CFLAGS is $(CURL_CFLAGS)"
324         @echo " CURL_LIBS is $(CURL_LIBS)"
325         @echo " BOOST_CFLAGS is $(BOOST_CFLAGS)"
326         @echo " BOOST_LIBS is $(BOOST_LIBS)"
327         @if test -n "$(BOOST_CYGNAL_LIBS)"; then \
328           echo "        BOOST_CYGNAL_LIBS is $(BOOST_CYGNAL_LIBS)"; \
329         fi
330 if ENABLE_MING
331         @echo " MING_VERSION_CODE $(MING_VERSION_CODE) "
332         @echo " MING_LIBS $(MING_LIBS) "
333         @echo " MING_CFLAGS $(MING_CFLAGS) "
334         @echo " MAKESWF $(MAKESWF) "
335 endif
336 if ENABLE_MTASC
337         @echo " MTASC $(MTASC)"
338         @echo " MTASC CLASSPATH $(MTASC_CLASSPATH)"
339 endif
340 if ENABLE_HAXE
341         @echo " HAXE $(HAXE)"
342         @echo " HAXE CLASSPATH $(HAXE_CLASSPATH)"
343 endif
344 if ENABLE_SWFMILL
345         @echo " SWFMILL $(SWFMILL) "
346         @echo " SWFMILL_VERSION_CODE $(SWFMILL_VERSION) "
347 endif
348 if ENABLE_SWFC
349         @echo " SWFC $(SWFC) "
350 endif
351 if ENABLE_SWFDEC_TESTSUITE
352         @echo " SWFDEC_TESTSUITE $(SWFDEC_TESTSUITE)"
353 endif
354 if ENABLE_HTTP_TESTSUITE
355         @echo " HTTP_TESTSUITE $(HTTP_TESTSUITE)"
356 endif
357 if ENABLE_RED5_TESTING
358         @echo " RED5_HOST $(RED5_HOST)"
359 endif
360         @echo "Graphics support..."     
361 if BUILD_CAIRO_RENDERER
362         @echo " CAIRO_CFLAGS is $(CAIRO_CFLAGS)"
363         @echo " CAIRO_LIBS is $(CAIRO_LIBS)"
364 endif
365 if BUILD_OGL_RENDERER
366         @echo " GLEXT_CFLAGS is $(GLEXT_CFLAGS)"
367         @echo " GLEXT_LIBS is $(GLEXT_LIBS)"
368         @echo " OPENGL_CFLAGS is $(OPENGL_CFLAGS)"
369         @echo " OPENGL_LIBS is $(OPENGL_LIBS)"
370 endif
371 if BUILD_AGG_RENDERER
372         @echo " AGG_CFLAGS is $(AGG_CFLAGS)"
373         @echo " AGG_LIBS is $(AGG_LIBS)"
374 endif
375         @echo ""
376         @echo "A blank value for CFLAGS means the header is installed in the"
377         @echo "default system header location. All the LIBS should have a"
378         @echo "legit value"
379         @echo ""
380         @echo "Configurable options are:"
381         @echo " Media handlers: $(MEDIA_CONFIG)"
382         @echo " Renderer engines: $(RENDERER_CONFIG)"
383         @echo " Hardware Acceleration: $(HWACCEL_CONFIG)"
385 if BUILD_SSL
386         @echo " SSL_CFLAGS is $(SSL_CFLAGS)"
387         @echo " SSL_LIBS is $(SSL_LIBS)"
388 endif
389 if BUILD_SSH
390         @echo " SSH_CFLAGS is $(SSH_CFLAGS)"
391         @echo " SSH_LIBS is $(SSH_LIBS)"
392 endif
393 if BUILD_GTK_GUI
394 if HAVE_XV
395         @echo " Supported GUI: GTK (+XVideo)"
396 else
397         @echo " Supported GUI: GTK"
398 endif
399 endif
400 if BUILD_DUMP_GUI
401         @echo " Supported GUI: Dump"
402 endif
403 if BUILD_KDE3_GUI
404         @echo " Supported GUI: KDE3"
405 endif
406 if BUILD_KDE4_GUI
407         @echo " Supported GUI: KDE4"
408 endif
409 if BUILD_QTOPIA3_GUI
410         @echo " Supported GUI: QTOPIA3"
411 endif
412 if BUILD_QTOPIA4_GUI
413         @echo " Supported GUI: QTOPIA4"
414 endif
415 if BUILD_SDL_GUI
416         @echo " Supported GUI: SDL"
417 endif
418 if BUILD_FLTK_GUI
419         @echo " Supported GUI: FLTK"
420 endif
421 if BUILD_AQUA_GUI
422         @echo " Supported GUI: AQUA"
423 endif
424 if BUILD_FB_GUI
425         @echo " Supported GUI: FB"
426 endif
427 if BUILD_AMIGAOS4_GUI
428        @echo " Supported GUI: AMIGAOS4"
429 endif
430 if BUILD_HAIKU_GUI
431         @echo " Supported GUI: Haiku"
432 endif
433 if JEMALLOC
434         @echo " Using jemalloc memory manager"
435 endif
437         @if test -n "$(EXTENSIONS_LIST)" ; then \
438           echo "        Extensions added are: $(EXTENSIONS_LIST)"; \
439         fi
440         @if test -n "$(SECURITY_LIST)" ; then \
441           echo "        Security features enabled are: $(SECURITY_LIST)"; \
442         fi
443         @if test -n "$(STATISTICS_LIST)" ; then \
444           echo "        Statistics features enabled are: $(STATISTICS_LIST)"; \
445         fi
446 if KPARTS3
447         @echo " KPARTS 3.x (KDE) plugin enabled"
448         @echo "   KPARTS 3.x plugin install dir: $(KDE_PLUGINDIR)"
449         @echo "   KPARTS 3.x service install dir: $(KDE_SERVICESDIR)"
450         @echo "   KPARTS 3.x config dir: ${KDE_CONFIGDIR}"
451         @echo "   KPARTS 3.x appsdata dir: ${KDE_APPSDATADIR}"
452 else
453         @echo " KPARTS 3.x (KDE) plugin disabled"
454 endif
455 if KPARTS4
456         @echo " KPARTS 4.x (KDE) plugin enabled"
457         @echo "   KPARTS 4.x plugin install dir: $(KDE4_PLUGINDIR)"
458         @echo "   KPARTS 4.x service install dir: $(KDE4_SERVICESDIR)"
459         @echo "   KPARTS 4.x config dir: ${KDE4_CONFIGDIR}"
460         @echo "   KPARTS 4.x appsdata dir: ${KDE4_APPSDATADIR}"
461 else
462         @echo " KPARTS 4.x (KDE) plugin disabled"
463 endif
465 if NPAPI
466         @echo " NPAPI (Mozilla) plugin enabled"
467         @echo "   NPAPI plugin install dir: $(FIREFOX_PLUGINS)"
468 else
469         @echo " NPAPI (Mozilla) plugin disabled"
470 endif
471 if USE_PYTHON
472         @echo " PYTHON support enabled"
473 else
474         @echo " PYTHON support disabled"
475 endif
477 if TESTSUITE
478 check-local:
479         $(MAKE) anal
481 anal testreport checksum:
482         $(srcdir)/testsuite/anaylse-results.sh
483 endif
485 .PHONY : dumpconfig \
486         anal \
487         testreport \
488         checksum \
489         check \
490         mudflap \
491         mudflap-check \
492         install-plugins \
493         uninstall-plugins \
494         install-plugin \
495         apidoc
497 install-plugins install-plugin uninstall-plugins install-pkglib:
498         $(MAKE) -C plugin $@
500 apidoc:
501         $(MAKE) -C doc $@
503 pkgconfigdir = $(libdir)/pkgconfig
504 pkgconfig_DATA = \
505         gnash.pc \
506         $(NULL)
508 SWFDEC_REPO=git://anongit.freedesktop.org/git/swfdec/swfdec
509 SWFDEC_MOUNT=$(srcdir)/testsuite/swfdec/src
510 fetch-swfdec:
511         if test -d "$(SWFDEC_MOUNT)"; then \
512             cd "$(SWFDEC_MOUNT)" && git pull && git branch -v; \
513         else \
514             git clone $(SWFDEC_REPO) "$(SWFDEC_MOUNT)"; \
515         fi