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