Update with current status
[gnash.git] / Makefile.am
blob2aa8d8a78d4caec39b84b550e853d994ea5871db
1
2 #   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
3 #   2015, 2017 Free Software Foundation, Inc.
4
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17
19 ## Process this file with automake to produce Makefile.in
20 # no-portability allows us to use GNU make variable assignments
21 # without automake complaining.
22 AUTOMAKE_OPTIONS = 1.6.0 -Wno-portability
24 ACLOCAL_AMFLAGS = -I macros -I cygnal
25 noinst_SCRIPT = autogen.sh
27 CXXFLAGS += $(CROSS_CXXFLAGS)
28 LDFLAGS += $(CROSS_LDFLAGS)
31 ## Any custom ./configure switch we want to be
32 ## given at 'make distcheck' time should go here
34 ## We set plugins install dirs to a user-writable 
35 ## and likely unused directory for now to avoid
36 ## permission problems and unexpected unistalls
37 ## from home dir. Ideally we should put them somewhere
38 ## under ${prefix} to make the uninstall check effective
39 ## (and I believe it should actually be the default when
40 ## --prefix is given, but that's another story --strk)
42 ## We also want to build everything possible, since we're
43 ## testing builds. We also don't use optimization, is makes
44 ## the build go faster.
45 DISTCHECK_CONFIGURE_FLAGS = \
46         --with-plugins-install=prefix \
47         --enable-extensions=all \
48         --enable-gui=all \
49         --enable-renderer=all \
50         --enable-python \
51         --enable-cygnal
53 # Only build all devices on Linux, as Input Events are
54 # primarily a Linux only thing.
55 if LINUX
56 DISTCHECK_CONFIGURE_FLAGS += --enable-device=all
57 else
58 DISTCHECK_CONFIGURE_FLAGS += --disable-jemalloc
59 endif
61 if CYGNAL
62 CYGNAL_DIR = cygnal
63 endif
65 if BUILD_DEVICES
66 DEVICES_DIR = libdevice
67 endif
69 if TESTSUITE
70 TEST_DIR = testsuite
71 endif
73 if BUILD_EXTENSIONS
74 EXT_DIR = extensions
75 endif
77 if BUILD_LIBSOUND
78 SOUND_DIR = libsound
79 endif
81 if BUILD_LIBMEDIA
82 MEDIA_DIR = libmedia
83 endif
85 SUBDIRS = \
86         desktop \
87         $(DEVICES_DIR) \
88         libbase \
89         $(MEDIA_DIR) \
90         $(SOUND_DIR) \
91         libcore \
92         librender \
93         gui \
94         plugin \
95         $(CYGNAL_DIR) \
96         utilities \
97         $(EXT_DIR) \
98         doc \
99         po \
100         $(TEST_DIR) \
101         $(NULL)
103 # man_MANS = doc/gnash.1 doc/gprocessor.1 doc/dumpshm.1 soldumper.1
105 EXTRA_DIST =  \
106         README \
107         README.git \
108         autogen.sh \
109         config.rpath \
110         base-attempter.sh \
111         macros/incllist macros/libslist \
112         doc/changelogs/ChangeLog-0.8.0 \
113         doc/changelogs/ChangeLog-0.8.1 \
114         doc/changelogs/ChangeLog-0.8.2 \
115         doc/changelogs/ChangeLog-0.8.3 \
116         doc/changelogs/ChangeLog-0.8.4 \
117         doc/changelogs/ChangeLog-0.8.5 \
118         doc/changelogs/ChangeLog-0.8.6 \
119         doc/changelogs/ChangeLog-0.8.7 \
120         doc/changelogs/ChangeLog-0.8.8 \
121         packaging/deb.am \
122         packaging/snapshot.am \
123         packaging/alp.am \
124         packaging/ipkg.am \
125         packaging/bsd.am \
126         packaging/rpm.am \
127         packaging/gnash.xpm \
128         packaging/klash.xpm \
129         revno.h
131 # dist-hook:
132 #       @test -d "$(distdir)/packaging" || $(mkinstalldirs) "$(distdir)/packaging"
133 #       cp -p $(srcdir)/*.am $(top_distdir)/packaging/
135 CLEANFILES = .configline
136 DISTCLEANFILES = revno.h .lastmod deb-attempt-install-dependencies.sh rpm-attempt-install-dependencies.sh
137 MAINTAINERCLEANFILES = revno.h .lastmod
138 BUILT_SOURCES = revno.h .configline
141 # Extract info from the repository to include in the build.
142 # If top source dir is not a git repository or git is not installed,
143 # keep the current revno.h file (which should be part of any distribution).
144 # It's primarily used by the testsuites and when building binary packages
145 # from multiple branches.
147 # This ia a big hack around makes's built in dependency checking, as the
148 # key file here isn't part of the normal files. In the source tree for
149 # developers, the .git/index files changes on any commits or pulls. We
150 # only want to regenerate this file if that file changes, so we have to
151 # do the dependency check ourselves.
152 revno.h:
153         @if test \! -f .lastmod -o \! -f revno.h ; then \
154           touch -t 197001010000 .lastmod; \
155         fi; \
156         if test -d $(top_srcdir)/.git -a x"${GIT}" != x; then \
157           if test $(top_srcdir)/.git/index -nt .lastmod; then \
158             echo "Getting build info for revno.h"; \
159             revno="`cd $(top_srcdir) ; $(GIT) rev-list HEAD | wc -l`"; \
160             comm_id="`cd $(top_srcdir) ; $(GIT) rev-parse --short HEAD`"; \
161             nick="`cd $(top_srcdir) ; $(GIT) symbolic-ref -q HEAD`"; \
162             nick="`basename "$${nick}"`"; \
163             if test -z "$${nick}"; then \
164                   nick="none"; \
165             fi; \
166           fi \
167         else \
168           if test \! -f revno.h; then \
169             revno="$(NOW)"; \
170             comm_id="none"; \
171             nick="$(VERSION)"; \
172           fi; \
173         fi; \
174         if test \! -z "$${revno}"; then \
175           echo "Generating revno.h ($${nick} $${revno} $${comm_id})"; \
176           echo "#define BRANCH_REVNO \"$${revno}\"" > revno.h; \
177           echo "#define BRANCH_NICK \"$${nick}\"" >> revno.h; \
178           echo "#define COMMIT_ID \"$${comm_id}\"" >> revno.h; \
179           touch .lastmod; \
180         fi
182 .configline: revno.h
183         -@rm -f .configline
184         @head config.log | grep " .*/configure " | sed -e 's:^  . .*configure ::' > .configline
187 # Precompiled header support
189 include $(srcdir)/pch.am
192 # Binary tarball packaging
194 include $(srcdir)/packaging/snapshot.am
197 # Build an RPM package
199 include $(srcdir)/packaging/rpm.am
201 # Build a Debian/Ubuntu .deb GNU/Linux package
202 include $(srcdir)/packaging/deb.am
205 # Build a Debian Familiar .ipk GNU/Linux package. These are always
206 # cross compiled, typically for the ARM or XScale.
208 include $(srcdir)/packaging/ipkg.am
211 # Access Linux Platform support.
213 include $(srcdir)/packaging/alp.am
216 # BSD package building
218 include $(srcdir)/packaging/bsd.am
220 mudflap:
221         @echo "Rebuilding with GCC Mudflap support"
222         $(MAKE) CXXFLAGS="$(CXXFLAGS) -fmudflapth" LDFLAGS="$(LDFLAGS) -lmudflapth"
224 mudflap-check:
225         @echo "Rechecking with GCC Mudflap support"
226         $(MAKE) check CXXFLAGS="$(CXXFLAGS) -fmudflap" LDFLAGS="$(LDFLAGS) -lmudflap"
228 # Set a few variables to what features we selected so we can dump it with the
229 # test of the config
230 dumpconfig:
231         @echo ""
232         @echo "Building in directories: $(SUBDIRS)"
233         @echo "Some directories may be excluded from the build"
234         @uname -a
235         $(CXX) -v
236         @echo "CXXFLAGS: $(CXXFLAGS)"
237         @echo "CFLAGS: $(CFLAGS)"
238         @echo "LDFLAGS: $(LDFLAGS)"
239         @echo ""
240         @echo "Image decoding support..."
241         @echo " JPEG_CFLAGS is $(JPEG_CFLAGS)"
242         @echo " JPEG_LIBS is $(JPEG_LIBS)"
243         @echo " PNG_CFLAGS is $(PNG_CFLAGS)"
244         @echo " PNG_LIBS is $(PNG_LIBS)"
245         @echo " GIF_CFLAGS is $(GIF_CFLAGS)"
246         @echo " GIF_LIBS is $(GIF_LIBS)"
247         @echo "Audio decoding support..."
248 if USE_GST_ENGINE
249         @echo " GSTREAMER_CFLAGS is $(GSTREAMER_CFLAGS)"
250         @echo " GSTREAMER_LIBS is $(GSTREAMER_LIBS)"
251         @echo " GSTREAMER_PBUTILS_CFLAGS is $(GSTREAMER_PBUTILS_CFLAGS)"
252         @echo " GSTREAMER_PBUTILS_LIBS is $(GSTREAMER_PBUTILS_LIBS)"
253 endif
254 if USE_FFMPEG_ENGINE
255         @echo " FFMPEG_CFLAGS is $(FFMPEG_CFLAGS)"
256         @echo " FFMPEG_LIBS is $(FFMPEG_LIBS)"
257 endif
258 if HAVE_SPEEX
259         @echo " SPEEX_CFLAGS is $(SPEEX_CFLAGS)"
260         @echo " SPEEXDSP_CFLAGS is $(SPEEXDSP_CFLAGS)"
261         @echo " SPEEX_LIBS is $(SPEEX_LIBS)"
262         @echo " SPEEXDSP_LIBS is $(SPEEXDSP_LIBS)"
263 endif
264         @echo "GUI Toolkit decoding support..." 
265         @echo " SDL_CFLAGS is $(SDL_CFLAGS)"
266         @echo " SDL_LIBS is $(SDL_LIBS)"
267 if BUILD_KDE3_GUI
268         @echo " KDE3_CFLAGS is $(KDE3_CFLAGS)"
269         @echo " KDE3_LIBS is $(KDE3_LIBS)"
270         @echo " QT3_CFLAGS is $(QT3_CFLAGS)"
271         @echo " QT3_LIBS is $(QT3_LIBS)"
272 endif
273 if BUILD_QT4_GUI
274         @echo " QT4_CFLAGS is $(QT4_CFLAGS)"
275         @echo " QT4_LIBS is $(QT4_LIBS)"
276 endif
277 if KPARTS4
278         @echo " KDE4_CFLAGS is $(KDE4_CFLAGS)"
279         @echo " KDE4_LIBS is $(KDE4_LIBS)"
280 endif
281 if BUILD_QT4_GUI
282         @echo " QT4_CFLAGS is $(QT4_CFLAGS)"
283         @echo " QT4_LIBS is $(QT4_LIBS)"
284 endif
285 if BUILD_QTOPIA3_GUI
286         @echo " QTOPIA3_CFLAGS is $(QTOPIA3_CFLAGS)"
287         @echo " QTOPIA3_LIBS is $(QTOPIA3_LIBS)"
288 endif
289 if BUILD_QTOPIA4_GUI
290         @echo " QTOPIA4_CFLAGS is $(QTOPIA4_CFLAGS)"
291         @echo " QTOPIA4_LIBS is $(QTOPIA4_LIBS)"
292 endif
293 if BUILD_FLTK_GUI
294         @echo " FLTK2_CFLAGS is $(FLTK2_CFLAGS)"
295         @echo " FLTK2_LIBS is $(FLTK2_LIBS)"
296         @echo " XFT_CFLAGS is $(XFT_CFLAGS)"
297         @echo " XFT_LIBS is $(XFT_LIBS)"
298 endif
299 if HAIKU
300         @echo " HAIKU_LIBS is $(HAIKU_LIBS)"
301 endif
302 if BUILD_GTK_GUI
303         @echo " GTK2_CFLAGS is $(GTK2_CFLAGS)"
304         @echo " GTK2_LIBS is $(GTK2_LIBS)"
305         @echo " PANGO_CFLAGS is $(PANGO_CFLAGS)"
306         @echo " PANGO_LIBS is $(PANGO_LIBS)"
307         @echo " ATK_CFLAGS is $(ATK_CFLAGS)"
308         @echo " ATK_LIBS is $(ATK_LIBS)"
309 endif
310         @echo " X11_CFLAGS is $(X11_CFLAGS)"
311         @echo " X11_LIBS is $(X11_LIBS)"
312         @echo "Support libraries..."
313         @echo " LTDL_CFLAGS is $(LTDL_CFLAGS)"
314         @echo " LTDL_LIBS is $(LTDL_LIBS)"
315         @echo " GLIB_CFLAGS is $(GLIB_CFLAGS)"
316         @echo " GLIB_LIBS is $(GLIB_LIBS)"
317         @echo " Z_CFLAGS is $(Z_CFLAGS)"
318         @echo " Z_LIBS is $(Z_LIBS)"
319         @echo " FREETYPE_CFLAGS is $(FREETYPE2_CFLAGS)"
320         @echo " FREETYPE_LIBS is $(FREETYPE2_LIBS)"
321         @echo " FONTCONFIG_CFLAGS is $(FONTCONFIG_CFLAGS)"
322         @echo " FONTCONFIG_LIBS is $(FONTCONFIG_LIBS)"
323         @echo " LIBINTL is $(LIBINTL)"
324 if BUILD_MYSQL_EXT
325         @echo " MYSQL_CFLAGS is $(MYSQL_CFLAGS)"
326         @echo " MYSQL_LIBS is $(MYSQL_LIBS)"
327 endif
328         @echo " PTHREAD_CFLAGS is $(PTHREAD_CFLAGS)"
329         @echo " PTHREAD_LIBS is $(PTHREAD_LIBS)"
330         @echo " CURL_CFLAGS is $(CURL_CFLAGS)"
331         @echo " CURL_LIBS is $(CURL_LIBS)"
332         @echo " BOOST_CFLAGS is $(BOOST_CFLAGS)"
333         @echo " BOOST_LIBS is $(BOOST_LIBS)"
334         @if test -n "$(BOOST_CYGNAL_LIBS)"; then \
335           echo "        BOOST_CYGNAL_LIBS is $(BOOST_CYGNAL_LIBS)"; \
336         fi
337 if ENABLE_MING
338         @echo " MING_VERSION_CODE $(MING_VERSION_CODE) "
339         @echo " MING_LIBS $(MING_LIBS) "
340         @echo " MING_CFLAGS $(MING_CFLAGS) "
341         @echo " MAKESWF $(MAKESWF) "
342 endif
343 if ENABLE_MTASC
344         @echo " MTASC $(MTASC)"
345         @echo " MTASC CLASSPATH $(MTASC_CLASSPATH)"
346 endif
347 if ENABLE_HAXE
348         @echo " HAXE $(HAXE)"
349         @echo " HAXE CLASSPATH $(HAXE_CLASSPATH)"
350 endif
351 if ENABLE_SWFMILL
352         @echo " SWFMILL $(SWFMILL) "
353         @echo " SWFMILL_VERSION_CODE $(SWFMILL_VERSION) "
354 endif
355 if ENABLE_SWFC
356         @echo " SWFC $(SWFC) "
357 endif
358 if ENABLE_SWFDEC_TESTSUITE
359         @echo " SWFDEC_TESTSUITE $(SWFDEC_TESTSUITE)"
360 endif
361 if ENABLE_HTTP_TESTSUITE
362         @echo " HTTP_TESTSUITE $(HTTP_TESTSUITE)"
363 endif
364 if ENABLE_RED5_TESTING
365         @echo " RED5_HOST $(RED5_HOST)"
366 endif
367         @echo "Graphics support..."     
368 if BUILD_CAIRO_RENDERER
369         @echo " CAIRO_CFLAGS is $(CAIRO_CFLAGS)"
370         @echo " CAIRO_LIBS is $(CAIRO_LIBS)"
371 endif
372 if BUILD_OGL_RENDERER
373         @echo " GLEXT_CFLAGS is $(GLEXT_CFLAGS)"
374         @echo " GLEXT_LIBS is $(GLEXT_LIBS)"
375         @echo " OPENGL_CFLAGS is $(OPENGL_CFLAGS)"
376         @echo " OPENGL_LIBS is $(OPENGL_LIBS)"
377 endif
378 if BUILD_OVG_RENDERER
379         @echo " OPENVG_CFLAGS is $(OPENVG_CFLAGS)"
380         @echo " OPENVG_LIBS is $(OPENVG_LIBS)"
381 endif
382 if BUILD_GLES1_RENDERER
383         @echo " GLES1_CFLAGS is $(GLES1_CFLAGS)"
384         @echo " GLES1_LIBS is $(GLES1_LIBS)"
385 endif
386 if BUILD_GLES2_RENDERER
387         @echo " GLES2_CFLAGS is $(GLES2_CFLAGS)"
388         @echo " GLES2_LIBS is $(GLES2_LIBS)"
389 endif
390 if BUILD_AGG_RENDERER
391         @echo " AGG_CFLAGS is $(AGG_CFLAGS)"
392         @echo " AGG_LIBS is $(AGG_LIBS)"
393 endif
394         @echo ""
395         @echo "A blank value for CFLAGS means the header is installed in the"
396         @echo "default system header location. All the LIBS should have a"
397         @echo "legit value"
398         @echo ""
399         @echo "Configurable options are:"
400         @echo " Media handlers: $(MEDIA_CONFIG)"
401         @echo " Renderer engines: $(RENDERER_CONFIG)"
402         @echo " Hardware Acceleration: $(HWACCEL_CONFIG)"
404 if BUILD_SSL
405         @echo " SSL_CFLAGS is $(SSL_CFLAGS)"
406         @echo " SSL_LIBS is $(SSL_LIBS)"
407 endif
408 if BUILD_SSH
409         @echo " SSH_CFLAGS is $(SSH_CFLAGS)"
410         @echo " SSH_LIBS is $(SSH_LIBS)"
411 endif
412 if BUILD_GTK_GUI
413         @echo " Supported GUI: GTK"
414 endif
415 if BUILD_DUMP_GUI
416         @echo " Supported GUI: Dump"
417 endif
418 if BUILD_KDE3_GUI
419         @echo " Supported GUI: KDE3"
420 endif
421 if BUILD_QT4_GUI
422         @echo " Supported GUI: QT4"
423 endif
424 if BUILD_QTOPIA3_GUI
425         @echo " Supported GUI: QTOPIA3"
426 endif
427 if BUILD_QTOPIA4_GUI
428         @echo " Supported GUI: QTOPIA4"
429 endif
430 if BUILD_SDL_GUI
431         @echo " Supported GUI: SDL"
432 endif
433 if BUILD_FLTK_GUI
434         @echo " Supported GUI: FLTK"
435 endif
436 if BUILD_AQUA_GUI
437         @echo " Supported GUI: AQUA"
438 endif
439 if BUILD_FB_GUI
440         @echo " Supported GUI: FB"
441 endif
442 if BUILD_AMIGAOS4_GUI
443        @echo " Supported GUI: AMIGAOS4"
444 endif
445 if BUILD_HAIKU_GUI
446         @echo " Supported GUI: Haiku"
447 endif
448 if JEMALLOC
449         @echo " Using jemalloc memory manager"
450 endif
452         @if test -n "$(EXTENSIONS_LIST)" ; then \
453           echo "        Extensions added are: $(EXTENSIONS_LIST)"; \
454         fi
455         @if test -n "$(SECURITY_LIST)" ; then \
456           echo "        Security features enabled are: $(SECURITY_LIST)"; \
457         fi
458         @if test -n "$(STATISTICS_LIST)" ; then \
459           echo "        Statistics features enabled are: $(STATISTICS_LIST)"; \
460         fi
461 if KPARTS3
462         @echo " KPARTS 3.x (KDE) plugin enabled"
463         @echo "   KPARTS 3.x plugin install dir: $(KDE_PLUGINDIR)"
464         @echo "   KPARTS 3.x service install dir: $(KDE_SERVICESDIR)"
465         @echo "   KPARTS 3.x config dir: ${KDE_CONFIGDIR}"
466         @echo "   KPARTS 3.x appsdata dir: ${KDE_APPSDATADIR}"
467 else
468         @echo " KPARTS 3.x (KDE) plugin disabled"
469 endif
470 if KPARTS4
471         @echo " KPARTS 4.x (KDE) plugin enabled"
472         @echo "   KPARTS 4.x plugin install dir: $(KDE4_PLUGINDIR)"
473         @echo "   KPARTS 4.x service install dir: $(KDE4_SERVICESDIR)"
474         @echo "   KPARTS 4.x config dir: ${KDE4_CONFIGDIR}"
475         @echo "   KPARTS 4.x appsdata dir: ${KDE4_APPSDATADIR}"
476 else
477         @echo " KPARTS 4.x (KDE) plugin disabled"
478 endif
480 if NPAPI
481         @echo " NPAPI (Mozilla) plugin enabled"
482         @echo "   NPAPI plugin install dir: $(FIREFOX_PLUGINS)"
483 else
484         @echo " NPAPI (Mozilla) plugin disabled"
485 endif
486 if USE_PYTHON
487         @echo " PYTHON support enabled"
488 else
489         @echo " PYTHON support disabled"
490 endif
492 if TESTSUITE
493 check-local:
494         $(MAKE) anal
496 anal testreport checksum:
497         $(srcdir)/testsuite/analyse-results.sh $(MODE)
498 endif
500 .PHONY : dumpconfig \
501         revno.h \
502         anal \
503         testreport \
504         checksum \
505         check \
506         mudflap \
507         mudflap-check \
508         install-plugins \
509         uninstall-plugins \
510         install-plugin \
511         apidoc
513 install-plugins install-plugin uninstall-plugins install-pkglib:
514         $(MAKE) -C plugin $@
516 apidoc:
517         $(MAKE) -C doc $@
519 pkgconfigdir = $(libdir)/pkgconfig
520 pkgconfig_DATA = \
521         gnash.pc \
522         $(NULL)
524 SWFDEC_REPO=git://anongit.freedesktop.org/git/swfdec/swfdec
525 SWFDEC_MOUNT=$(top_builddir)/testsuite/swfdec/src
526 fetch-swfdec:
527         if test -d "$(SWFDEC_MOUNT)"; then \
528             cd "$(SWFDEC_MOUNT)" && git pull && git branch -v; \
529         else \
530             git clone $(SWFDEC_REPO) "$(SWFDEC_MOUNT)"; \
531         fi 
533 package:
534         @if test -f /etc/debian_version; then $(MAKE) deb; \
535           else if test -f /etc/redhat-release; then $(MAKE) rpm; \
536             else echo "Gnash will not be packaged for this platform"; \
537         fi;fi
539 packageclean:
540         -test -z "$(CLEANFILES)" || rm -rf $(CLEANFILES)
542 # these files are created when building packages
543 CLEANFILES += *.deb *.dsc *.gz *.bz2 *.changes deb-copy-stamp gnash*git* gnash-* rpmbuild gnash.spec .rpmmacros