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