Don't use scoped_lock objects to hold locks requested by libcurl. Should fix bug...
[gnash.git] / gui / Makefile.am
blob46cd7cae8118824e79a3dbde7e71c5d9e07a94b2
1 ## Process this file with automake to generate Makefile.in
2
3 #   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 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
18
19 # build gtk-gnash, kde-gnash, sdl-gnash, fltk-gnash, aqua-gnash, fb-gnash,
20 # riscos-gnash, haiku-gnash and dump-gnash
23 AUTOMAKE_OPTIONS = -Wno-portability
25 DIST_SUBDIRS = pythonmod fb dump
27 # Build the current directory first. It's hard to see, but there is a '.' dot here.
28 SUBDIRS = . fb
30 if BUILD_FB_GUI
31 SUBDIRS += fb
32 endif
34 if BUILD_DUMP_GUI
35 SUBDIRS += dump
36 endif
38 # If python support is enabled, built that too
39 if HAS_PYTHON
40 SUBDIRS += pythonmod
41 endif
44 localedir = $(datadir)/locale
46 # this is where Gnash plugins get installed
47 pluginsdir = $(libdir)/gnash/plugins
49 # noinst_LTLIBRARIES = libgnashgui.la
50 BUILT_SOURCES =
52 EXTRA_DIST = gnash.in \
53         kde/klash3.moc.in \
54         kde/Kde4Gui.moc.in \
55         kde/Kde4Glue.moc.in
57 noinst_HEADERS =
58 noinst_LTLIBRARIES = 
60 # top_builddir and top_srcdir are for revno.h; its location depends on
61 # whether we're building from a snapshot or a checkout.
62 AM_CPPFLAGS = \
63         -I$(top_builddir) \
64         -I$(top_srcdir) \
65         -I$(top_srcdir)/libnet \
66         -I$(top_srcdir)/libcore \
67         -I$(top_srcdir)/libcore/swf \
68         -I$(top_srcdir)/libcore/parser \
69         -I$(top_srcdir)/libcore/vm \
70         -I$(top_srcdir)/libcore/asobj \
71         -I$(top_srcdir)/libltdl \
72         -I$(top_srcdir)/libbase \
73         -I$(top_srcdir)/librender \
74         -I$(top_srcdir)/librender/agg \
75         -I$(top_srcdir)/librender/cairo \
76         -I$(top_srcdir)/librender/opengl \
77         -I$(top_srcdir)/libmedia \
78         -I$(top_srcdir)/libsound \
79         -DLOCALEDIR=\"$(localedir)\" \
80         -DPLUGINSDIR=\"$(pluginsdir)\" \
81         -DLIBAVCODEC_IDENT=\"$(LIBAVCODEC_IDENT)\" \
82         $(GLIB_CFLAGS) \
83         $(LIRC_CFLAGS) \
84         $(BOOST_CFLAGS) \
85         $(PYTHON_LIBS) \
86         $(PTHREAD_CFLAGS) \
87         $(NULL)
89 GTK_CFLAGS = \
90         $(GTK2_CFLAGS) \
91         $(GLEXT_CFLAGS) \
92         $(GLIB_CFLAGS) \
93         $(PANGO_CFLAGS) \
94         $(ATK_CFLAGS) \
95         $(CAIRO_CFLAGS)
97 GTK_LIBS =  \
98         $(GTK2_LIBS) \
99         $(GLEXT_LIBS) \
100         $(CAIRO_LIBS) \
101         $(PANGO_LIBS) \
102         $(ATK_LIBS) \
103         $(GLIB_LIBS) \
104         $(EXPAT_LIBS) \
105         $(X11_LIBS) \
106         $(Z_LIBS)
108 # The following will be filled up later
109 GUI_CPPFLAGS = 
111 ## WARNING: make sure GLIB_LIBS appears first
112 ## See: http://lists.gnu.org/archive/html/gnash-dev/2006-07/msg00076.html
113 AM_LDFLAGS =  \
114         $(GLIB_LIBS) \
115         $(CURL_LIBS) \
116         $(JPEG_LIBS) \
117         $(PNG_LIBS) \
118         $(LIRC_LIBS) \
119         $(MYSQL_LIBS) \
120         $(INTLLIBS) \
121         $(TS_LIBS) \
122         $(BOOST_LIBS) \
123         $(PTHREAD_LIBS) \
124         $(NULL)
127 GNASH_LIBS = \
128         $(top_builddir)/libcore/libgnashcore.la \
129         $(top_builddir)/librender/libgnashrender.la \
130         $(top_builddir)/libsound/libgnashsound.la \
131         $(top_builddir)/libmedia/libgnashmedia.la \
132         $(top_builddir)/libbase/libgnashbase.la
134 # if LIBLTDL2
135 # GNASH_LIBS += $(top_builddir)/libltdl/libltdlc.la
136 # endif
137 # if LIBLTDL1
138 # GNASH_LIBS += $(top_builddir)/libbase/libltdlc.la
139 # endif
141 # Only build loadable modules unless statically linking
142 # if DYNAMIC_GUI # make shared libraries suitable for dlopen().
143 # if  ENABLE_SHARED
144 #      LIB_FLAGS = -module -avoid-version -no-undefined
145 # else
146 #      LIB_FLAGS = -release $(VERSION)
147 # endif # ENABLE_SHARED
148 # else # make shared libraries suitable for linking.
149 LIB_FLAGS = -release $(VERSION)
150 if WIN32
151 LIB_FLAGS += --enable-auto-import
152 endif
154 # endif # DYNAMIC_GUI
157 if USE_FFMPEG_ENGINE
158 AM_LDFLAGS += $(FFMPEG_LIBS) $(LIBVA_LIBS) $(LIBVA_X11_LIBS) 
159 AM_CPPFLAGS += $(FFMPEG_CFLAGS) 
160 endif
162 if USE_GST_ENGINE
163 GST_STUFF = $(GSTREAMER_PBUTILS_LIBS) $(GSTREAMER_PLUGINS_BASE_LIBS) $(GSTREAMER_LIBS)
164 AM_CPPFLAGS += $(GSTREAMER_CFLAGS)
165 AM_LDFLAGS += $(GST_STUFF)
166 endif
168 # if USE_GUI_FLTK
169 #  FLTK_SRCS = fltk.cpp fltksup.h $(FLTK_AGG_SRCS) $(FLTK_CAIRO_SRCS)
170 #  AM_CPPFLAGS += $(FLTK2_CFLAGS) $(X11_CFLAGS)
171 #  AM_LDFLAGS += $(FLTK2_LIBS) $(XFT_LIBS) $(X11_LIBS)
172 # else
173 #  FLTK_SRCS = 
174 # endif
176 AM_CPPFLAGS += -DPKGDATADIR="\"$(pkgdatadir)\""
177 AM_CPPFLAGS += -DRENDERER_CONFIG="\"$(RENDERER_CONFIG)\""
178 AM_CPPFLAGS += -DHWACCEL_CONFIG="\"$(HWACCEL_CONFIG)\""
179 AM_CPPFLAGS += -DMEDIA_CONFIG="\"$(MEDIA_CONFIG)\""
180 AM_CPPFLAGS += -DCONFIG_CONFIG="\"$(shell cat ../.configline)\""
181 AM_CPPFLAGS += -DCXXFLAGS="\"$(CXXFLAGS)\"" 
183 dist_images_DATA = images/gnash_128_96.ico images/GnashG.png
184 #dist_images_DATA = images/gnash_G_v3.ico
185 imagesdir = $(pkgdatadir)
187 bin_SCRIPTS = gnash
188 bin_PROGRAMS = 
190 gnash: gnash.in
191         cp $(srcdir)/gnash.in $@
192         chmod +x $@
194 if BUILD_KDE4_GUI
195 bin_SCRIPTS += klash
196 endif
198 # Always include the device files in the source tarball
199 EXTRA_DIST += \
200         fb/TouchDevice.cpp \
201         fb/MouseDevice.cpp \
202         fb/EventDevice.cpp
204 GUI_SRCS = gnash.cpp \
205         gui.cpp gui.h \
206         Player.cpp Player.h \
207         NullGui.cpp NullGui.h \
208         ScreenShotter.cpp ScreenShotter.h \
209         $(NULL)
211 if BUILD_AQUA_GUI
212 BUILT_SOURCES += bundle
213 EXTRA_DIST += Gnash.app
214 endif
216 # Build the QTOPIA gui
217 if BUILD_QTOPIA3_GUI
218 include $(srcdir)/kde/qtopia3.am
219 endif
221 # Build the KDE3 gui
222 if BUILD_KDE3_GUI
223 BUILT_SOURCES += klash3.moc 
224 include $(srcdir)/kde/kde3.am
225 endif
227 # Build the KDE4 gui
228 if BUILD_KDE4_GUI
229 BUILT_SOURCES += Kde4Gui.moc
230 BUILT_SOURCES += Kde4Glue.moc
231 include $(srcdir)/kde/kde4.am
232 endif
234 # Build the SDL gui
235 if BUILD_SDL_GUI
236 include $(srcdir)/sdl/sdl.am
237 endif
239 # Build the AmigaOS4 gui
240 if BUILD_AMIGAOS4_GUI
241 include $(srcdir)/aos4/aos4.am
242 endif
244 # Build the Haiku gui
245 if BUILD_HAIKU_GUI
246 include $(srcdir)/haiku/haiku.am
247 endif
249 # Build the FLTK gui
250 if BUILD_FLTK_GUI
251 include $(srcdir)/fltk/fltk.am
252 endif
254 # Build the AQUA gui
255 if BUILD_AQUA_GUI
256 include $(srcdir)/aqua/aqua.am
257 endif
259 # Build the GTK gui
260 if BUILD_GTK_GUI
261 include $(srcdir)/gtk/gtk.am
262 endif
264 # Build the RISCOS gui
265 if BUILD_RISCOS_GUI
266 include $(srcdir)/riscos/riscos.am
267 endif
269 CLEANFILES = klash3.moc Kde4Gui.moc Kde4Glue.moc gnash
271 bundle: Info.plist aqua-gnash
272         @echo " Building: $(bundle_name)" 
273         rm -rf $(bundle_name)/Contents
274         mkdir -p $(bundle_name)/Contents/MacOS
275         mkdir -p $(bundle_name)/Contents/Resources
276         echo "APPL????" > $(bundle_name)/Contents/PkgInfo
277         cp Info.plist $(bundle_name)/Contents/Info.plist
278         cp -f aqua-gnash $(bundle_name)/Contents/MacOS/Gnash
279         cp -f images/GnashG.icns $(bundle_name)/Contents/Resources/
282 #noinst_PROGRAMS = guitest # klash flak
283 #guitest_SOURCES = guitest.cpp #fltk.cpp #fltksup.h fltksupp.h gnash.cpp gtk.cpp 
284 #       gtksup.h gui.cpp gui.h menu.cpp menu.h sdl.cpp sdlsup.h [21~sdlsupp.h
285 #guitest_LDADD = $(gnash_LDADD)
287 # Rebuild with GCC 4.x Mudflap support
288 mudflap:
289         @echo "Rebuilding with GCC Mudflap support"
290         $(MAKE) CXXFLAGS="$(CXXFLAGS) -fmudflap" LDFLAGS="$(LDFLAGS) -lmudflap"
292 clean-hook:
293         -rm -f core.* $(CLEANFILES)
295 # if DYNAMIC_GUI
296 # install-pluginsLTLIBRARIES: $(plugins_LTLIBRARIES)
297 #       test -d "$(DESTDIR)$(plugindir)" || $(mkinstalldirs) "$(DESTDIR)$(plugindir)"
298 #       for i in $(plugins_LTLIBRARIES); do \
299 #         $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$i "$(DESTDIR)$(plugindir)/$$i" ; \
300 #       done
301 # endif