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