remove am-frags, as it no longer exists. Add fb/ to the input devices, or they won...
[gnash.git] / gui / Makefile.am
blobd4121786219a882b76ddbdf7f24bb1b454749b20
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 # Build the current directory first. It's hard to see, but there is a '.' dot here.
26 SUBDIRS = .
28 localedir = $(datadir)/locale
30 # this is where Gnash plugins get installed
31 pluginsdir = $(libdir)/gnash/plugins
33 # noinst_LTLIBRARIES = libgnashgui.la
34 BUILT_SOURCES = .configline
36 EXTRA_DIST = gnash.in \
37         kde/klash3.moc.in \
38         kde/Kde4Gui.moc.in \
39         kde/Kde4Glue.moc.in
41 # If python support is enabled, built that too
42 if HAS_PYTHON
43 SUBDIRS += pythonmod
44 endif
45 DIST_SUBDIRS = pythonmod
47 noinst_HEADERS =
48 noinst_LTLIBRARIES = 
50 # top_builddir and top_srcdir are for revno.h; its location depends on
51 # whether we're building from a snapshot or a checkout.
52 AM_CPPFLAGS = \
53         -I$(top_builddir) \
54         -I$(top_srcdir) \
55         -I$(top_srcdir)/libnet \
56         -I$(top_srcdir)/libcore \
57         -I$(top_srcdir)/libcore/swf \
58         -I$(top_srcdir)/libcore/parser \
59         -I$(top_srcdir)/libcore/vm \
60         -I$(top_srcdir)/libcore/asobj \
61         -I$(top_srcdir)/libltdl \
62         -I$(top_srcdir)/libbase \
63         -I$(top_srcdir)/librender \
64         -I$(top_srcdir)/libmedia \
65         -I$(top_srcdir)/libsound \
66         -I$(top_srcdir)/libmedia/ffmpeg \
67         -I$(top_srcdir)/libmedia/gst \
68         -I$(top_srcdir)/libmedia/haiku \
69         -DLOCALEDIR=\"$(localedir)\" \
70         -DPLUGINSDIR=\"$(pluginsdir)\" \
71         -DLIBAVCODEC_IDENT=\"$(LIBAVCODEC_IDENT)\" \
72         $(GLIB_CFLAGS) \
73         $(LIRC_CFLAGS) \
74         $(BOOST_CFLAGS) \
75         $(PYTHON_LIBS) \
76         $(PTHREAD_CFLAGS) \
77         $(NULL)
79 GTK_CFLAGS = \
80         $(GTK2_CFLAGS) \
81         $(GLEXT_CFLAGS) \
82         $(GLIB_CFLAGS) \
83         $(PANGO_CFLAGS) \
84         $(ATK_CFLAGS) \
85         $(CAIRO_CFLAGS)
87 GTK_LIBS =  \
88         $(GTK2_LIBS) \
89         $(GLEXT_LIBS) \
90         $(CAIRO_LIBS) \
91         $(PANGO_LIBS) \
92         $(ATK_LIBS) \
93         $(GLIB_LIBS) \
94         $(EXPAT_LIBS) \
95         $(X11_LIBS) \
96         $(Z_LIBS)
98 DUMP_CFLAGS =
100 DUMP_LIBS =
102 # The following will be filled up later
103 GUI_CPPFLAGS = 
105 ## WARNING: make sure GLIB_LIBS appears first
106 ## See: http://lists.gnu.org/archive/html/gnash-dev/2006-07/msg00076.html
107 AM_LDFLAGS =  \
108         $(GLIB_LIBS) \
109         $(CURL_LIBS) \
110         $(JPEG_LIBS) \
111         $(PNG_LIBS) \
112         $(LIRC_LIBS) \
113         $(MYSQL_LIBS) \
114         $(INTLLIBS) \
115         $(TS_LIBS)
116         $(BOOST_LIBS) \
117         $(PTHREAD_LIBS) \
118         $(NULL)
121 GNASH_LIBS = \
122         $(top_builddir)/libcore/libgnashcore.la \
123         $(top_builddir)/librender/libgnashrender.la \
124         $(top_builddir)/libsound/libgnashsound.la \
125         $(top_builddir)/libmedia/libgnashmedia.la \
126         $(top_builddir)/libbase/libgnashbase.la
128 if LIBLTDL2
129 GNASH_LIBS += $(top_builddir)/libltdl/libltdlc.la
130 endif
131 if LIBLTDL1
132 GNASH_LIBS += $(top_builddir)/libbase/libltdlc.la
133 endif
135 # Only build loadable modules unless statically linking
136 # if DYNAMIC_GUI # make shared libraries suitable for dlopen().
137 # if  ENABLE_SHARED
138 #      LIB_FLAGS = -module -avoid-version -no-undefined
139 # else
140 #      LIB_FLAGS = -release $(VERSION)
141 # endif # ENABLE_SHARED
142 # else # make shared libraries suitable for linking.
143 LIB_FLAGS = -release $(VERSION)
144 if WIN32
145 LIB_FLAGS += --enable-auto-import
146 endif
148 # endif # DYNAMIC_GUI
151 if USE_FFMPEG_ENGINE
152 AM_LDFLAGS += $(FFMPEG_LIBS) $(LIBVA_LIBS) $(LIBVA_X11_LIBS) 
153 AM_CPPFLAGS += $(FFMPEG_CFLAGS) 
154 endif
156 if USE_GST_ENGINE
157 GST_STUFF = $(GSTPBUTILS_LIBS) $(GSTREAMER_PLUGINS_BASE_LIBS) $(GSTREAMER_LIBS)
158 AM_CPPFLAGS += $(GSTREAMER_CFLAGS)
159 AM_LDFLAGS += $(GST_STUFF)
160 endif
162 # if USE_GUI_FLTK
163 #  FLTK_SRCS = fltk.cpp fltksup.h $(FLTK_AGG_SRCS) $(FLTK_CAIRO_SRCS)
164 #  AM_CPPFLAGS += $(FLTK2_CFLAGS) $(X11_CFLAGS)
165 #  AM_LDFLAGS += $(FLTK2_LIBS) $(XFT_LIBS) $(X11_LIBS)
166 # else
167 #  FLTK_SRCS = 
168 # endif
170 AM_CPPFLAGS += -DPKGDATADIR="\"$(pkgdatadir)\""
171 AM_CPPFLAGS += -DRENDERER_CONFIG="\"$(RENDERER_CONFIG)\""
172 AM_CPPFLAGS += -DHWACCEL_CONFIG="\"$(HWACCEL_CONFIG)\""
173 AM_CPPFLAGS += -DMEDIA_CONFIG="\"$(MEDIA_CONFIG)\""
174 AM_CPPFLAGS += -DCONFIG_CONFIG="\"$(shell cat .configline)\""
175 AM_CPPFLAGS += -DCXXFLAGS="\"$(CXXFLAGS)\"" 
177 dist_images_DATA = images/gnash_128_96.ico images/GnashG.png
178 #dist_images_DATA = images/gnash_G_v3.ico
179 imagesdir = $(pkgdatadir)
181 bin_SCRIPTS = gnash
182 bin_PROGRAMS = 
184 gnash: gnash.in
185         cp $< $@
186         chmod +x $@
188 # Always include the device files in the source tarball
189 EXTRA_DIST += \
190         fb/TouchDevice.cpp \
191         fb/MouseDevice.cpp \
192         fb/EventDevice.cpp
194 GUI_SRCS = gnash.cpp \
195         gui.cpp gui.h \
196         Player.cpp Player.h \
197         NullGui.cpp NullGui.h \
198         ScreenShotter.cpp ScreenShotter.h \
199         $(NULL)
201 if BUILD_AQUA_GUI
202 BUILT_SOURCES += bundle
203 EXTRA_DIST += Gnash.app
204 endif
206 # Build the QTOPIA gui
207 if BUILD_QTOPIA3_GUI
208 include $(srcdir)/kde/qtopia3.am
209 endif
211 # Build the KDE3 gui
212 if BUILD_KDE3_GUI
213 BUILT_SOURCES += klash3.moc 
214 include $(srcdir)/kde/kde3.am
215 endif
217 # Build the KDE4 gui
218 if BUILD_KDE4_GUI
219 BUILT_SOURCES += Kde4Gui.moc
220 BUILT_SOURCES += Kde4Glue.moc
221 include $(srcdir)/kde/kde4.am
222 endif
224 # Build the SDL gui
225 if BUILD_SDL_GUI
226 include $(srcdir)/sdl/sdl.am
227 endif
229 # Build the AmigaOS4 gui
230 if BUILD_AMIGAOS4_GUI
231 include $(srcdir)/aos4/aos4.am
232 endif
234 # Build the Haiku gui
235 if BUILD_HAIKU_GUI
236 include $(srcdir)/haiku/haiku.am
237 endif
239 # Build the FLTK gui
240 if BUILD_FLTK_GUI
241 include $(srcdir)/fltk/fltk.am
242 endif
244 # Build the AQUA gui
245 if BUILD_AQUA_GUI
246 include $(srcdir)/aqua/aqua.am
247 endif
249 # Build the GTK gui
250 if BUILD_GTK_GUI
251 include $(srcdir)/gtk/gtk.am
252 endif
254 # Build the DUMP gui
255 if BUILD_DUMP_GUI
256 include $(srcdir)/dump/dump.am
257 endif
259 # Build the FB gui
260 if BUILD_FB_GUI
261 include $(srcdir)/fb/fb.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 .configline 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 .configline: ../config.log
283         -@rm -f .configline
284         @head ../config.log | grep " .*/configure " | sed -e 's:^  . .*configure ::' > .configline
286 #noinst_PROGRAMS = guitest # klash flak
287 #guitest_SOURCES = guitest.cpp #fltk.cpp #fltksup.h fltksupp.h gnash.cpp gtk.cpp 
288 #       gtksup.h gui.cpp gui.h menu.cpp menu.h sdl.cpp sdlsup.h [21~sdlsupp.h
289 #guitest_LDADD = $(gnash_LDADD)
291 # Rebuild with GCC 4.x Mudflap support
292 mudflap:
293         @echo "Rebuilding with GCC Mudflap support"
294         $(MAKE) CXXFLAGS="$(CXXFLAGS) -fmudflap" LDFLAGS="$(LDFLAGS) -lmudflap"
296 clean-hook:
297         -rm -f core.* $(CLEANFILES)
299 # if DYNAMIC_GUI
300 # install-pluginsLTLIBRARIES: $(plugins_LTLIBRARIES)
301 #       test -d "$(DESTDIR)$(plugindir)" || $(mkinstalldirs) "$(DESTDIR)$(plugindir)"
302 #       for i in $(plugins_LTLIBRARIES); do \
303 #         $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$i "$(DESTDIR)$(plugindir)/$$i" ; \
304 #       done
305 # endif