Update with current status
[gnash.git] / gui / Makefile.am
bloba3933c3e339087ad8a5c80ff629c658200b20f0e
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, qt4-gnash, sdl-gnash, fltk-gnash, aqua-gnash, fb-gnash,
21 # haiku-gnash and dump-gnash
24 AUTOMAKE_OPTIONS = -Wno-portability
26 SUBDIRS = .
28 # If python support is enabled, built that too
29 if HAS_PYTHON
30 SUBDIRS += pythonmod
31 endif
33 # if BUILD_DUMP_GUI
34 # SUBDIRS += dump
35 # endif
37 localedir = $(datadir)/locale
39 # this is where Gnash plugins get installed
40 pluginsdir = $(libdir)/gnash/plugins
42 # noinst_LTLIBRARIES = libgnashgui.la
43 BUILT_SOURCES =
45 DIST_SUBDIRS = pythonmod
46 EXTRA_DIST = gnash.in \
47         qt/klash3.moc.in \
48         qt/Qt4Gui.moc.in \
49         qt/Qt4Glue.moc.in
51 noinst_HEADERS =
52 noinst_LTLIBRARIES = 
54 # top_builddir and top_srcdir are for revno.h; its location depends on
55 # whether we're building from a snapshot or a checkout.
56 AM_CPPFLAGS = \
57         -I$(top_builddir) \
58         -I$(top_srcdir) \
59         -I$(top_srcdir)/libnet \
60         -I$(top_srcdir)/libcore \
61         -I$(top_srcdir)/libcore/swf \
62         -I$(top_srcdir)/libcore/parser \
63         -I$(top_srcdir)/libcore/vm \
64         -I$(top_srcdir)/libcore/asobj \
65         -I$(top_srcdir)/libltdl \
66         -I$(top_srcdir)/libbase \
67         -I$(top_srcdir)/libdevice \
68         -I$(top_srcdir)/librender \
69         -I$(top_srcdir)/librender/agg \
70         -I$(top_srcdir)/librender/cairo \
71         -I$(top_srcdir)/librender/opengl \
72         -I$(top_srcdir)/libmedia \
73         -I$(top_srcdir)/libsound \
74         -DLOCALEDIR=\"$(localedir)\" \
75         -DPLUGINSDIR=\"$(pluginsdir)\" \
76         -DLIBAVCODEC_IDENT=\"$(LIBAVCODEC_IDENT)\" \
77         $(BOOST_CFLAGS) \
78         $(PTHREAD_CFLAGS) \
79         $(NULL)
81 if BUILD_EGL_DEVICE
82 AM_CPPFLAGS += $(EGL_CFLAGS)
83 endif
84 if BUILD_DIRECTFB_DEVICE
85 AM_CPPFLAGS += $(DIRECTFB_CFLAGS)
86 endif
88 GTK_CFLAGS = \
89         $(GTK2_CFLAGS) \
90         $(GLEXT_CFLAGS) \
91         $(GLIB_CFLAGS) \
92         $(PANGO_CFLAGS) \
93         $(ATK_CFLAGS) \
94         $(CAIRO_CFLAGS)
96 GTK_LIBS =  \
97         $(GLIB_LIBS) \
98         $(GTK2_LIBS) \
99         $(GLEXT_LIBS) \
100         $(CAIRO_LIBS) \
101         $(PANGO_LIBS) \
102         $(ATK_LIBS) \
103         $(EXPAT_LIBS) \
104         $(X11_LIBS)
106 # The following will be filled up later
107 GUI_CPPFLAGS = 
109 AM_CXXFLAGS = $(CROSS_CXXFLAGS)
111 GNASH_LIBS = \
112         $(top_builddir)/libcore/libgnashcore.la \
113         $(top_builddir)/libdevice/libgnashdevice.la \
114         $(top_builddir)/librender/libgnashrender.la \
115         $(top_builddir)/libbase/libgnashbase.la
117 if BUILD_LIBMEDIA
118 GNASH_LIBS += $(top_builddir)/libmedia/libgnashmedia.la
119 endif
120 if BUILD_LIBSOUND
121 GNASH_LIBS += $(top_builddir)/libsound/libgnashsound.la
122 endif
124 if HAVE_VAAPI
125 GNASH_LIBS += \
126         $(top_builddir)/libdevice/libgnashvaapi.la \
127         $(LIBVA_LIBS) \
128         $(LIBVA_X11_LIBS)
129 if BUILD_OGL_RENDERER
130 GNASH_LIBS += $(LIBVA_GLX_LIBS)
131 endif   # BUILD_OGL_RENDERER
132 endif   # HAVE_VAAPI
134 LIB_FLAGS = -release $(VERSION)
135 if WIN32
136 LIB_FLAGS += --enable-auto-import
137 endif
139 AM_CPPFLAGS += -DPKGDATADIR="\"$(pkgdatadir)\""
140 AM_CPPFLAGS += -DRENDERER_CONFIG="\"$(RENDERER_CONFIG)\""
141 AM_CPPFLAGS += -DHWACCEL_CONFIG="\"$(HWACCEL_CONFIG)\""
142 AM_CPPFLAGS += -DMEDIA_CONFIG="\"$(MEDIA_CONFIG)\""
143 AM_CPPFLAGS += -DCONFIG_CONFIG="\"$(shell cat ../.configline)\""
144 AM_CPPFLAGS += -DCXXFLAGS="\"$(CXXFLAGS)\"" 
146 dist_images_DATA = images/gnash_128_96.ico images/GnashG.png
147 imagesdir = $(pkgdatadir)
149 bin_SCRIPTS = gnash
150 bin_PROGRAMS = 
152 gnash: gnash.in
153         cp $(srcdir)/gnash.in $@
154         chmod +x $@
156 GUI_SRCS = gnash.cpp \
157         gui.cpp gui.h \
158         Player.cpp Player.h \
159         NullGui.cpp NullGui.h \
160         ScreenShotter.cpp ScreenShotter.h \
161         $(NULL)
163 if BUILD_DUMP_GUI
164 include $(srcdir)/dump/dump.am
165 endif
167 if BUILD_AQUA_GUI
168 BUILT_SOURCES += bundle
169 EXTRA_DIST += Gnash.app
170 endif
172 # Build the FB gui
173 if BUILD_FB_GUI
174 include $(srcdir)/fb/fb.am
175 endif
177 # Build the QTOPIA gui
178 if BUILD_QTOPIA3_GUI
179 include $(srcdir)/qt/qtopia3.am
180 endif
182 # Build the KDE3 gui
183 if BUILD_KDE3_GUI
184 BUILT_SOURCES += klash3.moc 
185 include $(srcdir)/qt/kde3.am
186 endif
188 # Build the QT4 gui
189 if BUILD_QT4_GUI
190 BUILT_SOURCES += Qt4Gui.moc
191 BUILT_SOURCES += Qt4Glue.moc
192 include $(srcdir)/qt/qt4.am
193 endif
195 # Build the SDL gui
196 if BUILD_SDL_GUI
197 include $(srcdir)/sdl/sdl.am
198 endif
200 # Build the AmigaOS4 gui
201 if BUILD_AMIGAOS4_GUI
202 include $(srcdir)/aos4/aos4.am
203 endif
205 # Build the Haiku gui
206 if BUILD_HAIKU_GUI
207 include $(srcdir)/haiku/haiku.am
208 endif
210 # Build the FLTK gui
211 if BUILD_FLTK_GUI
212 include $(srcdir)/fltk/fltk.am
213 endif
215 # Build the AQUA gui
216 if BUILD_AQUA_GUI
217 include $(srcdir)/aqua/aqua.am
218 endif
220 # Build the GTK gui
221 if BUILD_GTK_GUI
222 include $(srcdir)/gtk/gtk.am
223 endif
225 CLEANFILES = klash3.moc Qt4Gui.moc Qt4Glue.moc gnash
227 bundle: Info.plist aqua-gnash
228         @echo " Building: $(bundle_name)" 
229         rm -rf $(bundle_name)/Contents
230         mkdir -p $(bundle_name)/Contents/MacOS
231         mkdir -p $(bundle_name)/Contents/Resources
232         echo "APPL????" > $(bundle_name)/Contents/PkgInfo
233         cp Info.plist $(bundle_name)/Contents/Info.plist
234         cp -f aqua-gnash $(bundle_name)/Contents/MacOS/Gnash
235         cp -f images/GnashG.icns $(bundle_name)/Contents/Resources/
237 clean-hook:
238         -rm -f core.* $(CLEANFILES)
240 if ENABLE_DEVELOPER_TESTS
241 check_PROGRAMS = test_glue
243 test_glue_SOURCES = \
244         test_glue.cpp \
245         fb/fb_glue_agg.cpp \
246         fb/fb_glue_ovg.cpp
247 test_glue_CPPFLAGS = \
248         -DFAKEFB=\"$(FAKEFB)\" \
249         $(AM_CPPFLAGS) \
250         $(DIRECTFB_CFLAGS)
251 #       -DUSE_TESTSUITE
252 test_glue_LDADD = $(GNASH_LIBS)
253 endif