Update with current status
[gnash.git] / libbase / Makefile.am
blob5e572c4074cc9ac2cecd391c70606bd4c9d05e5c
1 #   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
2 #   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
17 AUTOMAKE_OPTIONS = foreign
19 pkglib_LTLIBRARIES = libgnashbase.la
20 sysconf_DATA = gnashrc gnashpluginrc
21 EXTRA_DIST = gnashrc.in gnashpluginrc.in
23 libgnashbase_la_SOURCES = \
24         AMF.cpp \
25         AMF.h \
26         arg_parser.cpp \
27         arg_parser.h \
28         BitsReader.cpp \
29         BitsReader.h \
30         ClockTime.cpp \
31         ClockTime.h \
32         dsodefs.h \
33         GC.cpp \
34         GC.h \
35         getclocktime.hpp \
36         gettext.h \
37         gmemory.h \
38         GnashAlgorithm.h \
39         GnashEnums.h \
40         GnashException.h \
41         GnashFileUtilities.cpp \
42         GnashFileUtilities.h \
43         GnashImage.cpp \
44         GnashImage.h \
45         GnashImageJpeg.cpp \
46         GnashImageJpeg.h \
47         GnashNumeric.h \
48         GnashSleep.h \
49         GnashSystemFDHeaders.h \
50         GnashSystemIOHeaders.h \
51         GnashSystemNetHeaders.h \
52         IOChannel.cpp \
53         IOChannel.h \
54         log.cpp \
55         log.h \
56         memory.cpp \
57         NamingPolicy.cpp \
58         NamingPolicy.h \
59         NetworkAdapter.cpp \
60         NetworkAdapter.h \
61         noseek_fd_adapter.cpp \
62         noseek_fd_adapter.h \
63         rc.cpp \
64         rc.h \
65         RTMP.cpp \
66         RTMP.h \
67         SharedMem.h \
68         SimpleBuffer.h \
69         Socket.cpp \
70         Socket.h \
71         Stats.h \
72         StreamProvider.cpp \
73         StreamProvider.h \
74         StringPredicates.h \
75         string_table.cpp \
76         string_table.h \
77         SWFCtype.cpp \
78         SWFCtype.h \
79         tu_file.cpp \
80         tu_file.h \
81         URLAccessManager.cpp \
82         URLAccessManager.h \
83         URL.cpp \
84         URL.h \
85         utf8.cpp \
86         utf8.h \
87         utility.h \
88         WallClockTimer.cpp \
89         WallClockTimer.h \
90         zlib_adapter.cpp \
91         zlib_adapter.h \
92         $(NULL)
94 if JEMALLOC
95 libgnashbase_la_SOURCES += \
96         jemalloc_gnash.c \
97         $(NULL)
98 endif
100 if ANDROID
101 libgnashbase_la_SOURCES += SharedMemHaiku.cpp
102 else
103 if HAIKU
104 libgnashbase_la_SOURCES += SharedMemHaiku.cpp
105 else
106 if WIN32
107 libgnashbase_la_SOURCES += SharedMemW32.cpp
108 else
109 libgnashbase_la_SOURCES += SharedMem.cpp
110 endif
111 endif
112 endif
114 if ENABLE_EXTENSIONS
115 libgnashbase_la_SOURCES += \
116         extension.cpp \
117         extension.h \
118         sharedlib.cpp \
119         sharedlib.h \
120         $(NULL)
121 endif
123 if USE_PNG
124 libgnashbase_la_SOURCES += \
125         GnashImagePng.cpp \
126         GnashImagePng.h \
127         $(NULL)
128 endif
130 if USE_GIF
131 libgnashbase_la_SOURCES += \
132         GnashImageGif.cpp \
133         GnashImageGif.h \
134         $(NULL)
135 endif
137 if HAVE_VAAPI
138 libgnashbase_la_SOURCES += \
139         GnashVaapiImage.cpp \
140         GnashVaapiImage.h \
141         GnashVaapiImageProxy.h \
142         GnashVaapiTexture.cpp \
143         GnashVaapiTexture.h \
144         $(NULL)
146 endif
149 # this is where Gnash plugins get installed
150 pluginsdir = $(prefix)/lib/gnash/plugins
152 libgnashbase_la_CPPFLAGS = -DPLUGINSDIR=\"$(pluginsdir)\" \
153         -DSYSCONFDIR=\"$(sysconfdir)\" \
154         $(PTHREAD_CFLAGS) \
155         $(PNG_CFLAGS) \
156         $(GIF_CFLAGS) \
157         $(CURL_CFLAGS) \
158         $(Z_CFLAGS) \
159         $(JPEG_CFLAGS) \
160         $(BOOST_CFLAGS) \
161         $(OPENGL_CFLAGS) \
162         $(LTDL_CFLAGS) \
163         $(JEMALLOC_CFLAGS) \
164         -I$(top_srcdir)/librender \
165         $(NULL)
167 libgnashbase_la_LIBADD = \
168         $(JPEG_LIBS) \
169         $(PNG_LIBS) \
170         $(GIF_LIBS) \
171         $(Z_LIBS) \
172         $(CURL_LIBS) \
173         $(LIBINTL) \
174         $(BOOST_LIBS) \
175         $(OPENGL_LIBS) \
176         $(OPENVG_LIBS) \
177         $(EGL_LIBS) \
178         $(PTHREAD_LIBS) \
179         $(LTDL_LIBS) \
180         $(JEMALLOC_LIBS) \
181         $(NULL)
183 if ANDROID
184 libgnashbase_la_LIBADD += -lui -llog
185 endif   # ANDROID
187 if HAIKU
188   libgnashbase_la_LIBADD += $(HAIKU_LIBS)
189 endif
191 inst_HEADERS = \
192         accumulator.h \
193         SimpleBuffer.h \
194         GnashNumeric.h \
195         GnashSleep.h \
196         gmemory.h \
197         SharedMem.h \
198         tree.hh \
199         tu_file.h \
200         IOChannel.h \
201         Socket.h \
202         GnashSystemFDHeaders.h \
203         GnashSystemNetHeaders.h \
204         GnashSystemIOHeaders.h \
205         GnashFileUtilities.h \
206         ClockTime.h \
207         WallClockTimer.h \
208         utf8.h \
209         noseek_fd_adapter.h \
210         zlib_adapter.h \
211         BitsReader.h \
212         arg_parser.h \
213         getclocktime.hpp \
214         GnashAlgorithm.h \
215         GnashFactory.h \
216         URLAccessManager.h \
217         StreamProvider.h \
218         $(NULL)
220 if ENABLE_EXTENSIONS
221 inst_HEADERS += extension.h sharedlib.h
222 endif
224 EXTENSIONS_API = \
225         StringPredicates.h \
226         Stats.h \
227         GnashEnums.h \
228         string_table.h \
229         ref_counted.h \
230         GC.h \
231         GnashException.h \
232         AMF.h \
233         RTMP.h \
234         dsodefs.h \
235         utility.h \
236         log.h \
237         rc.h \
238         gettext.h \
239         URL.h \
240         Point2d.h \
241         Range2d.h \
242         snappingrange.h \
243         NetworkAdapter.h \
244         NamingPolicy.h \
245         GnashImageJpeg.h \
246         CachedBitmap.h \
247         GnashImage.h \
248         ImageIterators.h \
249         SWFCtype.h \
250         $(NULL)
252 instdir = $(includedir)/gnash
253 inst_HEADERS += $(EXTENSIONS_API)
255 libgnashbase_la_LDFLAGS = -release $(VERSION)
256 libgnashbase_la_DEPENDENCIES =
258 if HAVE_VAAPI
259    libgnashbase_la_CPPFLAGS += \
260         -I$(top_srcdir)/libdevice/vaapi \
261         $(NULL)
263    libgnashbase_la_LIBADD += \
264         $(top_builddir)/libdevice/libgnashvaapi.la \
265         $(NULL)
267    libgnashbase_la_DEPENDENCIES += \
268         $(top_builddir)/libdevice/libgnashvaapi.la \
269         $(NULL)
270 endif
272 if WIN32
273   libgnashbase_la_LDFLAGS += -no-undefined
274   libgnashbase_la_LIBADD += -lws2_32 -lwinmm
275 endif
277 AM_CXXFLAGS = $(CROSS_CXXFLAGS)
278 AM_LDFLAGS = $(CROSS_LDFLAGS)
280 if ENABLE_PCH
281 AM_CXXFLAGS += $(PCH_FLAGS)
282 endif
284 edit = sed \
285         -e 's|@DEFAULT_FLASH_PLATFORM_ID[@]|$(DEFAULT_FLASH_PLATFORM_ID)|g' \
286         -e 's|@DEFAULT_FLASH_MAJOR_VERSION[@]|$(DEFAULT_FLASH_MAJOR_VERSION)|g' \
287         -e 's|@DEFAULT_FLASH_MINOR_VERSION[@]|$(DEFAULT_FLASH_MINOR_VERSION)|g' \
288         -e 's|@DEFAULT_FLASH_REV_NUMBER[@]|$(DEFAULT_FLASH_REV_NUMBER)|g' \
289         -e 's|@DEFAULT_STREAMS_TIMEOUT[@]|$(DEFAULT_STREAMS_TIMEOUT)|g' \
290         -e 's|@DEFAULT_SOL_SAFEDIR[@]|$(DEFAULT_SOL_SAFEDIR)|g' 
292 gnashrc: gnashrc.in Makefile
293         $(edit) '$(srcdir)/$@.in' >$@
295 gnashpluginrc: gnashpluginrc.in
296         $(edit) '$(srcdir)/$@.in' >$@
298 CLEANFILES = gnashrc gnashpluginrc
300 # Remove libtool .la files
301 install-exec-hook:
302         $(RM) $(DESTDIR)$(libdir)/gnash/libgnashbase.la
304 uninstall-local:
305         $(RM) $(DESTDIR)$(libdir)/gnash/libgnashbase-*.so