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