use new uinput device to control the cursor
[gnash.git] / Makefile.am
blob86825d2f4482f5a52438dc3a5b2f7566660f9d7b
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. We also don't use optimization, is makes
40 ## the build go faster.
41 DISTCHECK_CONFIGURE_FLAGS = \
42         --with-plugins-install=prefix \
43         --enable-extensions=all \
44         --enable-gui=all \
45         --enable-python \
46         --enable-cygnal
48 # Only build all devices on Linux, as Input Events are
49 # primarily a Linux only thing.
50 if LINUX
51 DISTCHECK_CONFIGURE_FLAGS += --enable-device=all
52 endif
54 if CYGNAL
55 CYGNAL_DIR = cygnal
56 endif
58 if BUILD_DEVICES
59 DEVICES_DIR = libdevice
60 endif
62 if TESTSUITE
63 TEST_DIR = testsuite
64 endif
66 if BUILD_EXTENSIONS
67 EXT_DIR = extensions
68 endif
70 SUBDIRS = \
71         desktop \
72         libbase \
73         libmedia \
74         libsound \
75         libcore \
76         $(DEVICES_DIR) \
77         librender \
78         gui \
79         plugin \
80         $(CYGNAL_DIR) \
81         utilities \
82         $(EXT_DIR) \
83         doc \
84         po \
85         $(TEST_DIR) \
86         $(NULL)
88 # man_MANS = doc/gnash.1 doc/gprocessor.1 doc/dumpshm.1 soldumper.1
90 EXTRA_DIST =  \
91         README \
92         README.git \
93         autogen.sh \
94         config.rpath \
95         base-attempter.sh \
96         macros/incllist macros/libslist \
97         doc/changelogs/ChangeLog-0.8.0 \
98         doc/changelogs/ChangeLog-0.8.1 \
99         doc/changelogs/ChangeLog-0.8.2 \
100         doc/changelogs/ChangeLog-0.8.3 \
101         doc/changelogs/ChangeLog-0.8.4 \
102         doc/changelogs/ChangeLog-0.8.5 \
103         doc/changelogs/ChangeLog-0.8.6 \
104         doc/changelogs/ChangeLog-0.8.7 \
105         doc/changelogs/ChangeLog-0.8.8 \
106         packaging/deb.am \
107         packaging/snapshot.am \
108         packaging/alp.am \
109         packaging/ipkg.am \
110         packaging/bsd.am \
111         packaging/rpm.am \
112         packaging/gnash.xpm \
113         packaging/klash.xpm \
114         revno.h
116 # dist-hook:
117 #       @test -d "$(distdir)/packaging" || $(mkinstalldirs) "$(distdir)/packaging"
118 #       cp -p $(srcdir)/*.am $(top_distdir)/packaging/
120 CLEANFILES = .configline
121 DISTCLEANFILES = revno.h .lastmod deb-attempt-install-dependencies.sh rpm-attempt-install-dependencies.sh
122 MAINTAINERCLEANFILES = revno.h .lastmod
123 BUILT_SOURCES = revno.h .configline
126 # Extract info from the repository to include in the build.
127 # If top source dir is not a git repository or git is not installed,
128 # keep the current revno.h file (which should be part of any distribution).
129 # It's primarily used by the testsuites and when building binary packages
130 # from multiple branches.
132 # This ia a big hack around makes's built in dependency checking, as the
133 # key file here isn't part of the normal files. In the source tree for
134 # developers, the .git/index files changes on any commits or pulls. We
135 # only want to regenerate this file if that file changes, so we have to
136 # do the dependency check ourselves.
137 revno.h:
138         @if test \! -f .lastmod -o \! -f revno.h ; then \
139           touch -t 197001010000 .lastmod; \
140         fi; \
141         if test -d $(top_srcdir)/.git -a x"${GIT}" != x; then \
142           if test $(top_srcdir)/.git/index -nt .lastmod; then \
143             echo "Getting build info for revno.h"; \
144             revno="`cd $(top_srcdir) ; $(GIT) rev-list HEAD | wc -l`"; \
145             comm_id="`cd $(top_srcdir) ; $(GIT) rev-parse --short HEAD`"; \
146             nick="`cd $(top_srcdir) ; $(GIT) branch | grep '^\*' | cut -d ' ' -f 2`"; \
147           fi \
148         else \
149           if test \! -f revno.h; then \
150             revno="$(NOW)"; \
151             comm_id="none"; \
152             nick="$(VERSION)"; \
153           fi; \
154         fi; \
155         if test \! -z "$${revno}"; then \
156           echo "Generating revno.h ($${nick} $${revno} $${comm_id})"; \
157           echo "#define BRANCH_REVNO \"$${revno}\"" > revno.h; \
158           echo "#define BRANCH_NICK \"$${nick}\"" >> revno.h; \
159           echo "#define COMMIT_ID \"$${comm_id}\"" >> revno.h; \
160           touch .lastmod; \
161         fi
163 .configline: revno.h
164         -@rm -f .configline
165         @head config.log | grep " .*/configure " | sed -e 's:^  . .*configure ::' > .configline
168 # Precompiled header support
170 include $(srcdir)/pch.am
173 # Binary tarball packaging
175 include $(srcdir)/packaging/snapshot.am
178 # Build an RPM package
180 include $(srcdir)/packaging/rpm.am
182 # Build a Debian/Ubuntu .deb GNU/Linux package
183 include $(srcdir)/packaging/deb.am
186 # Build a Debian Familiar .ipk GNU/Linux package. These are always
187 # cross compiled, typically for the ARM or XScale.
189 include $(srcdir)/packaging/ipkg.am
192 # Access Linux Platform support.
194 include $(srcdir)/packaging/alp.am
197 # BSD package building
199 include $(srcdir)/packaging/bsd.am
201 mudflap:
202         @echo "Rebuilding with GCC Mudflap support"
203         $(MAKE) CXXFLAGS="$(CXXFLAGS) -fmudflapth" LDFLAGS="$(LDFLAGS) -lmudflapth"
205 mudflap-check:
206         @echo "Rechecking with GCC Mudflap support"
207         $(MAKE) check CXXFLAGS="$(CXXFLAGS) -fmudflap" LDFLAGS="$(LDFLAGS) -lmudflap"
209 # Set a few variables to what features we selected so we can dump it with the
210 # test of the config
211 dumpconfig:
212         @echo ""
213         @echo "Building in directories: $(SUBDIRS)"
214         @echo "Some directories may be excluded from the build"
215         @uname -a
216         $(CXX) -v
217         @echo "CXXFLAGS: $(CXXFLAGS)"
218         @echo ""
219         @echo "Image decoding support..."
220         @echo " JPEG_CFLAGS is $(JPEG_CFLAGS)"
221         @echo " JPEG_LIBS is $(JPEG_LIBS)"
222         @echo " PNG_CFLAGS is $(PNG_CFLAGS)"
223         @echo " PNG_LIBS is $(PNG_LIBS)"
224         @echo " GIF_CFLAGS is $(GIF_CFLAGS)"
225         @echo " GIF_LIBS is $(GIF_LIBS)"
226         @echo "Audio decoding support..."
227 if USE_GST_ENGINE
228         @echo " GSTREAMER_CFLAGS is $(GSTREAMER_CFLAGS)"
229         @echo " GSTREAMER_LIBS is $(GSTREAMER_LIBS)"
230         @echo " GSTREAMER_PBUTILS_CFLAGS is $(GSTREAMER_PBUTILS_CFLAGS)"
231         @echo " GSTREAMER_PBUTILS_LIBS is $(GSTREAMER_PBUTILS_LIBS)"
232 endif
233 if USE_FFMPEG_ENGINE
234         @echo " FFMPEG_CFLAGS is $(FFMPEG_CFLAGS)"
235         @echo " FFMPEG_LIBS is $(FFMPEG_LIBS)"
236 endif
237 if HAVE_SPEEX
238         @echo " SPEEX_CFLAGS is $(SPEEX_CFLAGS)"
239         @echo " SPEEXDSP_CFLAGS is $(SPEEXDSP_CFLAGS)"
240         @echo " SPEEX_LIBS is $(SPEEX_LIBS)"
241         @echo " SPEEXDSP_LIBS is $(SPEEXDSP_LIBS)"
242 endif
243         @echo "GUI Toolkit decoding support..." 
244         @echo " SDL_CFLAGS is $(SDL_CFLAGS)"
245         @echo " SDL_LIBS is $(SDL_LIBS)"
246 if BUILD_KDE3_GUI
247         @echo " KDE3_CFLAGS is $(KDE3_CFLAGS)"
248         @echo " KDE3_LIBS is $(KDE3_LIBS)"
249         @echo " QT3_CFLAGS is $(QT3_CFLAGS)"
250         @echo " QT3_LIBS is $(QT3_LIBS)"
251 endif
252 if BUILD_QT4_GUI
253         @echo " QT4_CFLAGS is $(QT4_CFLAGS)"
254         @echo " QT4_LIBS is $(QT4_LIBS)"
255 endif
256 if KPARTS4
257         @echo " KDE4_CFLAGS is $(KDE4_CFLAGS)"
258         @echo " KDE4_LIBS is $(KDE4_LIBS)"
259 endif
260 if BUILD_QT4_GUI
261         @echo " QT4_CFLAGS is $(QT4_CFLAGS)"
262         @echo " QT4_LIBS is $(QT4_LIBS)"
263 endif
264 if BUILD_QTOPIA3_GUI
265         @echo " QTOPIA3_CFLAGS is $(QTOPIA3_CFLAGS)"
266         @echo " QTOPIA3_LIBS is $(QTOPIA3_LIBS)"
267 endif
268 if BUILD_QTOPIA4_GUI
269         @echo " QTOPIA4_CFLAGS is $(QTOPIA4_CFLAGS)"
270         @echo " QTOPIA4_LIBS is $(QTOPIA4_LIBS)"
271 endif
272 if BUILD_FLTK_GUI
273         @echo " FLTK2_CFLAGS is $(FLTK2_CFLAGS)"
274         @echo " FLTK2_LIBS is $(FLTK2_LIBS)"
275         @echo " XFT_CFLAGS is $(XFT_CFLAGS)"
276         @echo " XFT_LIBS is $(XFT_LIBS)"
277 endif
278 if HAIKU
279         @echo " HAIKU_LIBS is $(HAIKU_LIBS)"
280 endif
281 if BUILD_GTK_GUI
282         @echo " GTK2_CFLAGS is $(GTK2_CFLAGS)"
283         @echo " GTK2_LIBS is $(GTK2_LIBS)"
284         @echo " PANGO_CFLAGS is $(PANGO_CFLAGS)"
285         @echo " PANGO_LIBS is $(PANGO_LIBS)"
286         @echo " ATK_CFLAGS is $(ATK_CFLAGS)"
287         @echo " ATK_LIBS is $(ATK_LIBS)"
288 endif
289         @echo " X11_CFLAGS is $(X11_CFLAGS)"
290         @echo " X11_LIBS is $(X11_LIBS)"
291         @echo "Support libraries..."
292         @echo " LTDL_CFLAGS is $(LTDL_CFLAGS)"
293         @echo " LTDL_LIBS is $(LTDL_LIBS)"
294         @echo " GLIB_CFLAGS is $(GLIB_CFLAGS)"
295         @echo " GLIB_LIBS is $(GLIB_LIBS)"
296         @echo " Z_CFLAGS is $(Z_CFLAGS)"
297         @echo " Z_LIBS is $(Z_LIBS)"
298         @echo " FREETYPE_CFLAGS is $(FREETYPE2_CFLAGS)"
299         @echo " FREETYPE_LIBS is $(FREETYPE2_LIBS)"
300         @echo " FONTCONFIG_CFLAGS is $(FONTCONFIG_CFLAGS)"
301         @echo " FONTCONFIG_LIBS is $(FONTCONFIG_LIBS)"
302         @echo " LIBINTL is $(LIBINTL)"
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_OVG_RENDERER
358         @echo " OPENVG_CFLAGS is $(OPENVG_CFLAGS)"
359         @echo " OPENVG_LIBS is $(OPENVG_LIBS)"
360 endif
361 if BUILD_GLES1_RENDERER
362         @echo " GLES1_CFLAGS is $(GLES1_CFLAGS)"
363         @echo " GLES1_LIBS is $(GLES1_LIBS)"
364 endif
365 if BUILD_GLES2_RENDERER
366         @echo " GLES2_CFLAGS is $(GLES2_CFLAGS)"
367         @echo " GLES2_LIBS is $(GLES2_LIBS)"
368 endif
369 if BUILD_AGG_RENDERER
370         @echo " AGG_CFLAGS is $(AGG_CFLAGS)"
371         @echo " AGG_LIBS is $(AGG_LIBS)"
372 endif
373         @echo ""
374         @echo "A blank value for CFLAGS means the header is installed in the"
375         @echo "default system header location. All the LIBS should have a"
376         @echo "legit value"
377         @echo ""
378         @echo "Configurable options are:"
379         @echo " Media handlers: $(MEDIA_CONFIG)"
380         @echo " Renderer engines: $(RENDERER_CONFIG)"
381         @echo " Hardware Acceleration: $(HWACCEL_CONFIG)"
383 if BUILD_SSL
384         @echo " SSL_CFLAGS is $(SSL_CFLAGS)"
385         @echo " SSL_LIBS is $(SSL_LIBS)"
386 endif
387 if BUILD_SSH
388         @echo " SSH_CFLAGS is $(SSH_CFLAGS)"
389         @echo " SSH_LIBS is $(SSH_LIBS)"
390 endif
391 if BUILD_GTK_GUI
392         @echo " Supported GUI: GTK"
393 endif
394 if BUILD_DUMP_GUI
395         @echo " Supported GUI: Dump"
396 endif
397 if BUILD_KDE3_GUI
398         @echo " Supported GUI: KDE3"
399 endif
400 if BUILD_QT4_GUI
401         @echo " Supported GUI: QT4"
402 endif
403 if BUILD_QTOPIA3_GUI
404         @echo " Supported GUI: QTOPIA3"
405 endif
406 if BUILD_QTOPIA4_GUI
407         @echo " Supported GUI: QTOPIA4"
408 endif
409 if BUILD_SDL_GUI
410         @echo " Supported GUI: SDL"
411 endif
412 if BUILD_FLTK_GUI
413         @echo " Supported GUI: FLTK"
414 endif
415 if BUILD_AQUA_GUI
416         @echo " Supported GUI: AQUA"
417 endif
418 if BUILD_FB_GUI
419         @echo " Supported GUI: FB"
420 endif
421 if BUILD_AMIGAOS4_GUI
422        @echo " Supported GUI: AMIGAOS4"
423 endif
424 if BUILD_HAIKU_GUI
425         @echo " Supported GUI: Haiku"
426 endif
427 if JEMALLOC
428         @echo " Using jemalloc memory manager"
429 endif
431         @if test -n "$(EXTENSIONS_LIST)" ; then \
432           echo "        Extensions added are: $(EXTENSIONS_LIST)"; \
433         fi
434         @if test -n "$(SECURITY_LIST)" ; then \
435           echo "        Security features enabled are: $(SECURITY_LIST)"; \
436         fi
437         @if test -n "$(STATISTICS_LIST)" ; then \
438           echo "        Statistics features enabled are: $(STATISTICS_LIST)"; \
439         fi
440 if KPARTS3
441         @echo " KPARTS 3.x (KDE) plugin enabled"
442         @echo "   KPARTS 3.x plugin install dir: $(KDE_PLUGINDIR)"
443         @echo "   KPARTS 3.x service install dir: $(KDE_SERVICESDIR)"
444         @echo "   KPARTS 3.x config dir: ${KDE_CONFIGDIR}"
445         @echo "   KPARTS 3.x appsdata dir: ${KDE_APPSDATADIR}"
446 else
447         @echo " KPARTS 3.x (KDE) plugin disabled"
448 endif
449 if KPARTS4
450         @echo " KPARTS 4.x (KDE) plugin enabled"
451         @echo "   KPARTS 4.x plugin install dir: $(KDE4_PLUGINDIR)"
452         @echo "   KPARTS 4.x service install dir: $(KDE4_SERVICESDIR)"
453         @echo "   KPARTS 4.x config dir: ${KDE4_CONFIGDIR}"
454         @echo "   KPARTS 4.x appsdata dir: ${KDE4_APPSDATADIR}"
455 else
456         @echo " KPARTS 4.x (KDE) plugin disabled"
457 endif
459 if NPAPI
460         @echo " NPAPI (Mozilla) plugin enabled"
461         @echo "   NPAPI plugin install dir: $(FIREFOX_PLUGINS)"
462 else
463         @echo " NPAPI (Mozilla) plugin disabled"
464 endif
465 if USE_PYTHON
466         @echo " PYTHON support enabled"
467 else
468         @echo " PYTHON support disabled"
469 endif
471 if TESTSUITE
472 check-local:
473         $(MAKE) anal
475 anal testreport checksum:
476         $(srcdir)/testsuite/analyse-results.sh
477 endif
479 .PHONY : dumpconfig \
480         revno.h \
481         anal \
482         testreport \
483         checksum \
484         check \
485         mudflap \
486         mudflap-check \
487         install-plugins \
488         uninstall-plugins \
489         install-plugin \
490         apidoc
492 install-plugins install-plugin uninstall-plugins install-pkglib:
493         $(MAKE) -C plugin $@
495 apidoc:
496         $(MAKE) -C doc $@
498 pkgconfigdir = $(libdir)/pkgconfig
499 pkgconfig_DATA = \
500         gnash.pc \
501         $(NULL)
503 SWFDEC_REPO=git://anongit.freedesktop.org/git/swfdec/swfdec
504 SWFDEC_MOUNT=$(top_builddir)/testsuite/swfdec/src
505 fetch-swfdec:
506         if test -d "$(SWFDEC_MOUNT)"; then \
507             cd "$(SWFDEC_MOUNT)" && git pull && git branch -v; \
508         else \
509             git clone $(SWFDEC_REPO) "$(SWFDEC_MOUNT)"; \
510         fi 
512 package:
513         @if test -f /etc/debian_version; then $(MAKE) deb; \
514           else if test -f /etc/redhat-release; then $(MAKE) rpm; \
515             else echo "Gnash will not be packaged for this platform"; \
516         fi;fi
518 packageclean:
519         -test -z "$(CLEANFILES)" || rm -rf $(CLEANFILES)
521 # these files are created when building packages
522 CLEANFILES += *.deb *.dsc *.gz *.bz2 *.changes deb-copy-stamp gnash*git* gnash-* rpmbuild gnash.spec .rpmmacros