don't put rc2 into the version, it screws up RPM building. Fix this elsewhere in...
[gnash.git] / gui / Makefile.am
blob45916dabccf9aec25938b72717c140df939c58d5
1 ## Process this file with automake to generate Makefile.in
2
3 #   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010,
4 #   2011 Free Software Foundation, Inc.
5
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
10
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
20 # build gtk-gnash, kde-gnash, sdl-gnash, fltk-gnash, aqua-gnash, fb-gnash,
21 # riscos-gnash, haiku-gnash and dump-gnash
24 AUTOMAKE_OPTIONS = -Wno-portability
26 DIST_SUBDIRS = pythonmod fb dump
28 # Build the current directory first. It's hard to see, but there is a '.' dot here.
29 SUBDIRS = . fb
31 if BUILD_FB_GUI
32 SUBDIRS += fb
33 endif
35 if BUILD_DUMP_GUI
36 SUBDIRS += dump
37 endif
39 # If python support is enabled, built that too
40 if HAS_PYTHON
41 SUBDIRS += pythonmod
42 endif
45 localedir = $(datadir)/locale
47 # this is where Gnash plugins get installed
48 pluginsdir = $(libdir)/gnash/plugins
50 # noinst_LTLIBRARIES = libgnashgui.la
51 BUILT_SOURCES =
53 EXTRA_DIST = gnash.in \
54         kde/klash3.moc.in \
55         kde/Kde4Gui.moc.in \
56         kde/Kde4Glue.moc.in
58 noinst_HEADERS =
59 noinst_LTLIBRARIES = 
61 # top_builddir and top_srcdir are for revno.h; its location depends on
62 # whether we're building from a snapshot or a checkout.
63 AM_CPPFLAGS = \
64         -I$(top_builddir) \
65         -I$(top_srcdir) \
66         -I$(top_srcdir)/libnet \
67         -I$(top_srcdir)/libcore \
68         -I$(top_srcdir)/libcore/swf \
69         -I$(top_srcdir)/libcore/parser \
70         -I$(top_srcdir)/libcore/vm \
71         -I$(top_srcdir)/libcore/asobj \
72         -I$(top_srcdir)/libltdl \
73         -I$(top_srcdir)/libbase \
74         -I$(top_srcdir)/librender \
75         -I$(top_srcdir)/librender/agg \
76         -I$(top_srcdir)/librender/cairo \
77         -I$(top_srcdir)/librender/opengl \
78         -I$(top_srcdir)/libmedia \
79         -I$(top_srcdir)/libsound \
80         -DLOCALEDIR=\"$(localedir)\" \
81         -DPLUGINSDIR=\"$(pluginsdir)\" \
82         -DLIBAVCODEC_IDENT=\"$(LIBAVCODEC_IDENT)\" \
83         $(GLIB_CFLAGS) \
84         $(LIRC_CFLAGS) \
85         $(BOOST_CFLAGS) \
86         $(PYTHON_LIBS) \
87         $(PTHREAD_CFLAGS) \
88         $(NULL)
90 GTK_CFLAGS = \
91         $(GTK2_CFLAGS) \
92         $(GLEXT_CFLAGS) \
93         $(GLIB_CFLAGS) \
94         $(PANGO_CFLAGS) \
95         $(ATK_CFLAGS) \
96         $(CAIRO_CFLAGS)
98 GTK_LIBS =  \
99         $(GTK2_LIBS) \
100         $(GLEXT_LIBS) \
101         $(CAIRO_LIBS) \
102         $(PANGO_LIBS) \
103         $(ATK_LIBS) \
104         $(GLIB_LIBS) \
105         $(EXPAT_LIBS) \
106         $(X11_LIBS) \
107         $(Z_LIBS)
109 # The following will be filled up later
110 GUI_CPPFLAGS = 
112 ## WARNING: make sure GLIB_LIBS appears first
113 ## See: http://lists.gnu.org/archive/html/gnash-dev/2006-07/msg00076.html
114 AM_LDFLAGS =  \
115         $(GLIB_LIBS) \
116         $(CURL_LIBS) \
117         $(JPEG_LIBS) \
118         $(PNG_LIBS) \
119         $(LIRC_LIBS) \
120         $(MYSQL_LIBS) \
121         $(INTLLIBS) \
122         $(TS_LIBS) \
123         $(BOOST_LIBS) \
124         $(PTHREAD_LIBS) \
125         $(NULL)
128 GNASH_LIBS = \
129         $(top_builddir)/libcore/libgnashcore.la \
130         $(top_builddir)/librender/libgnashrender.la \
131         $(top_builddir)/libsound/libgnashsound.la \
132         $(top_builddir)/libmedia/libgnashmedia.la \
133         $(top_builddir)/libbase/libgnashbase.la
135 # if LIBLTDL2
136 # GNASH_LIBS += $(top_builddir)/libltdl/libltdlc.la
137 # endif
138 # if LIBLTDL1
139 # GNASH_LIBS += $(top_builddir)/libbase/libltdlc.la
140 # endif
142 # Only build loadable modules unless statically linking
143 # if DYNAMIC_GUI # make shared libraries suitable for dlopen().
144 # if  ENABLE_SHARED
145 #      LIB_FLAGS = -module -avoid-version -no-undefined
146 # else
147 #      LIB_FLAGS = -release $(VERSION)
148 # endif # ENABLE_SHARED
149 # else # make shared libraries suitable for linking.
150 LIB_FLAGS = -release $(VERSION)
151 if WIN32
152 LIB_FLAGS += --enable-auto-import
153 endif
155 # endif # DYNAMIC_GUI
158 if USE_FFMPEG_ENGINE
159 AM_LDFLAGS += $(FFMPEG_LIBS) $(LIBVA_LIBS) $(LIBVA_X11_LIBS) 
160 AM_CPPFLAGS += $(FFMPEG_CFLAGS) 
161 endif
163 if USE_GST_ENGINE
164 GST_STUFF = $(GSTREAMER_PBUTILS_LIBS) $(GSTREAMER_PLUGINS_BASE_LIBS) $(GSTREAMER_LIBS)
165 AM_CPPFLAGS += $(GSTREAMER_CFLAGS)
166 AM_LDFLAGS += $(GST_STUFF)
167 endif
169 # if USE_GUI_FLTK
170 #  FLTK_SRCS = fltk.cpp fltksup.h $(FLTK_AGG_SRCS) $(FLTK_CAIRO_SRCS)
171 #  AM_CPPFLAGS += $(FLTK2_CFLAGS) $(X11_CFLAGS)
172 #  AM_LDFLAGS += $(FLTK2_LIBS) $(XFT_LIBS) $(X11_LIBS)
173 # else
174 #  FLTK_SRCS = 
175 # endif
177 AM_CPPFLAGS += -DPKGDATADIR="\"$(pkgdatadir)\""
178 AM_CPPFLAGS += -DRENDERER_CONFIG="\"$(RENDERER_CONFIG)\""
179 AM_CPPFLAGS += -DHWACCEL_CONFIG="\"$(HWACCEL_CONFIG)\""
180 AM_CPPFLAGS += -DMEDIA_CONFIG="\"$(MEDIA_CONFIG)\""
181 AM_CPPFLAGS += -DCONFIG_CONFIG="\"$(shell cat ../.configline)\""
182 AM_CPPFLAGS += -DCXXFLAGS="\"$(CXXFLAGS)\"" 
184 dist_images_DATA = images/gnash_128_96.ico images/GnashG.png
185 #dist_images_DATA = images/gnash_G_v3.ico
186 imagesdir = $(pkgdatadir)
188 bin_SCRIPTS = gnash
189 bin_PROGRAMS = 
191 gnash: gnash.in
192         cp $(srcdir)/gnash.in $@
193         chmod +x $@
195 if BUILD_KDE4_GUI
196 bin_SCRIPTS += klash
197 endif
199 # Always include the device files in the source tarball
200 EXTRA_DIST += \
201         fb/TouchDevice.cpp \
202         fb/MouseDevice.cpp \
203         fb/EventDevice.cpp
205 GUI_SRCS = gnash.cpp \
206         gui.cpp gui.h \
207         Player.cpp Player.h \
208         NullGui.cpp NullGui.h \
209         ScreenShotter.cpp ScreenShotter.h \
210         $(NULL)
212 if BUILD_AQUA_GUI
213 BUILT_SOURCES += bundle
214 EXTRA_DIST += Gnash.app
215 endif
217 # Build the QTOPIA gui
218 if BUILD_QTOPIA3_GUI
219 include $(srcdir)/kde/qtopia3.am
220 endif
222 # Build the KDE3 gui
223 if BUILD_KDE3_GUI
224 BUILT_SOURCES += klash3.moc 
225 include $(srcdir)/kde/kde3.am
226 endif
228 # Build the KDE4 gui
229 if BUILD_KDE4_GUI
230 BUILT_SOURCES += Kde4Gui.moc
231 BUILT_SOURCES += Kde4Glue.moc
232 include $(srcdir)/kde/kde4.am
233 endif
235 # Build the SDL gui
236 if BUILD_SDL_GUI
237 include $(srcdir)/sdl/sdl.am
238 endif
240 # Build the AmigaOS4 gui
241 if BUILD_AMIGAOS4_GUI
242 include $(srcdir)/aos4/aos4.am
243 endif
245 # Build the Haiku gui
246 if BUILD_HAIKU_GUI
247 include $(srcdir)/haiku/haiku.am
248 endif
250 # Build the FLTK gui
251 if BUILD_FLTK_GUI
252 include $(srcdir)/fltk/fltk.am
253 endif
255 # Build the AQUA gui
256 if BUILD_AQUA_GUI
257 include $(srcdir)/aqua/aqua.am
258 endif
260 # Build the GTK gui
261 if BUILD_GTK_GUI
262 include $(srcdir)/gtk/gtk.am
263 endif
265 # Build the RISCOS gui
266 if BUILD_RISCOS_GUI
267 include $(srcdir)/riscos/riscos.am
268 endif
270 CLEANFILES = klash3.moc Kde4Gui.moc Kde4Glue.moc gnash
272 bundle: Info.plist aqua-gnash
273         @echo " Building: $(bundle_name)" 
274         rm -rf $(bundle_name)/Contents
275         mkdir -p $(bundle_name)/Contents/MacOS
276         mkdir -p $(bundle_name)/Contents/Resources
277         echo "APPL????" > $(bundle_name)/Contents/PkgInfo
278         cp Info.plist $(bundle_name)/Contents/Info.plist
279         cp -f aqua-gnash $(bundle_name)/Contents/MacOS/Gnash
280         cp -f images/GnashG.icns $(bundle_name)/Contents/Resources/
283 #noinst_PROGRAMS = guitest # klash flak
284 #guitest_SOURCES = guitest.cpp #fltk.cpp #fltksup.h fltksupp.h gnash.cpp gtk.cpp 
285 #       gtksup.h gui.cpp gui.h menu.cpp menu.h sdl.cpp sdlsup.h [21~sdlsupp.h
286 #guitest_LDADD = $(gnash_LDADD)
288 # Rebuild with GCC 4.x Mudflap support
289 mudflap:
290         @echo "Rebuilding with GCC Mudflap support"
291         $(MAKE) CXXFLAGS="$(CXXFLAGS) -fmudflap" LDFLAGS="$(LDFLAGS) -lmudflap"
293 clean-hook:
294         -rm -f core.* $(CLEANFILES)
296 # if DYNAMIC_GUI
297 # install-pluginsLTLIBRARIES: $(plugins_LTLIBRARIES)
298 #       test -d "$(DESTDIR)$(plugindir)" || $(mkinstalldirs) "$(DESTDIR)$(plugindir)"
299 #       for i in $(plugins_LTLIBRARIES); do \
300 #         $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$i "$(DESTDIR)$(plugindir)/$$i" ; \
301 #       done
302 # endif