Do not expect exact load timing. Hopefull makes buildbot results more stable (see...
[gnash.git] / libbase / Makefile.am
blobb90294f57d3f6e18e27b6fab775674d69a9eacce
1 #   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
2 #   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 EXTRA_DIST = gnashrc.in gnashpluginrc.in
21 sysconf_DATA = gnashrc gnashpluginrc
23 # this is where Gnash plugins get installed
24 pluginsdir = $(prefix)/lib/gnash/plugins
26 # If we are using an installable libltdl, then it needs to be built
27 # before libgnash, as libgnash depends on it for extensions.
28 pkglib_LTLIBRARIES = libgnashbase.la
30 libgnashbase_la_CPPFLAGS = -DPLUGINSDIR=\"$(pluginsdir)\" \
31         -DSYSCONFDIR=\"$(sysconfdir)\" \
32         -I$(top_srcdir)/libltdl \
33         $(PTHREAD_CFLAGS) \
34         $(PNG_CFLAGS) \
35         $(GIF_CFLAGS) \
36         $(GLIB_CFLAGS) \
37         $(GSTREAMER_CFLAGS) \
38         $(CURL_CFLAGS) \
39         $(OPENGL_CFLAGS) \
40         $(Z_CFLAGS) \
41         $(JPEG_CFLAGS) \
42         $(BOOST_CFLAGS) \
43         $(INCLTDL) \
44         $(NULL)
46 if ANDROID
47 libgnashbase_la_CPPFLAGS += $(ANDROID_NDK)/usr/include
48 endif
50 # These headers get installed
52 libgnashbase_la_LIBADD = \
53         $(JPEG_LIBS) \
54         $(PNG_LIBS) \
55         $(GIF_LIBS) \
56         $(Z_LIBS) \
57         $(CURL_LIBS) \
58         $(OPENGL_LIBS) \
59         $(LIBINTL) \
60         $(BOOST_LIBS) \
61         $(PTHREAD_LIBS) \
62         $(NULL)
64 libgnashbase_la_SOURCES = \
65         extension.cpp \
66         $(MALLOC) \
67         GnashImage.cpp \
68         SWFCtype.cpp \
69         GnashImageJpeg.cpp \
70         GnashFileUtilities.cpp \
71         AMF.cpp \
72         RTMP.cpp \
73         log.cpp \
74         memory.cpp \
75         rc.cpp \
76         sharedlib.cpp \
77         string_table.cpp \
78         tu_file.cpp \
79         IOChannel.cpp \
80         Socket.cpp \
81         ClockTime.cpp \
82         NamingPolicy.cpp \
83         WallClockTimer.cpp \
84         utf8.cpp \
85         curl_adapter.cpp \
86         noseek_fd_adapter.cpp \
87         zlib_adapter.cpp \
88         URL.cpp \
89         GC.cpp \
90         BitsReader.cpp \
91         arg_parser.cpp \
92         URLAccessManager.cpp \
93         StreamProvider.cpp \
94         $(NULL)
97 if ANDROID
98 libgnashbase_la_SOURCES += SharedMemHaiku.cpp
99 else
100 if HAIKU
101 libgnashbase_la_SOURCES += SharedMemHaiku.cpp
102 else
103 if WIN32
104 libgnashbase_la_SOURCES += SharedMemW32.cpp
105 else
106 libgnashbase_la_SOURCES += SharedMem.cpp
107 endif
108 endif
109 endif
111 edit = sed \
112         -e 's|@DEFAULT_FLASH_PLATFORM_ID[@]|$(DEFAULT_FLASH_PLATFORM_ID)|g' \
113         -e 's|@DEFAULT_FLASH_MAJOR_VERSION[@]|$(DEFAULT_FLASH_MAJOR_VERSION)|g' \
114         -e 's|@DEFAULT_FLASH_MINOR_VERSION[@]|$(DEFAULT_FLASH_MINOR_VERSION)|g' \
115         -e 's|@DEFAULT_FLASH_REV_NUMBER[@]|$(DEFAULT_FLASH_REV_NUMBER)|g' \
116         -e 's|@DEFAULT_STREAMS_TIMEOUT[@]|$(DEFAULT_STREAMS_TIMEOUT)|g' \
117         -e 's|@DEFAULT_SOL_SAFEDIR[@]|$(DEFAULT_SOL_SAFEDIR)|g' 
119 gnashrc: gnashrc.in Makefile
120         $(edit) '$(srcdir)/$@.in' >$@
122 gnashpluginrc: gnashpluginrc.in
123         $(edit) '$(srcdir)/$@.in' >$@
125 if USE_PNG
126 libgnashbase_la_SOURCES += GnashImagePng.cpp
127 endif
129 if USE_GIF
130 libgnashbase_la_SOURCES += GnashImageGif.cpp
131 endif
133 if LIBLTDL1
134 noinst_LTLIBRARIES = libltdlc.la
135 libltdlc_la_CPPFLAGS = $(LTDLINCL) -I$(top_srcdir)/libltdl
136 libltdlc_la_SOURCES = $(top_srcdir)/libltdl/ltdl.c
137 libgnashbase_la_LIBADD += $(top_builddir)/libbase/libltdlc.la
138 endif
140 if LIBLTDL2
141 libgnashbase_la_LIBADD += $(top_builddir)/libltdl/libltdlc.la
142 endif
145 if HAIKU
146   libgnashbase_la_LIBADD += $(HAIKU_LIBS)
147 endif
149 if WIN32
150   libgnashbase_la_LIBADD += -lws2_32 -lwinmm
151 endif
153 # Maybe use jemalloc, which handles memory fragmentation for
154 # ECAMscript languages better than the regular system malloc.
155 # This is controlled by the --enable-jemalloc (disabled by default)
156 # configure option.
157 if JEMALLOC
158 MALLOC = jemalloc.c
159 else
160 MALLOC = 
161 endif
163 noinst_HEADERS =
165 inst_HEADERS = \
166         $(LIBLTDLHEAD) \
167         accumulator.h \
168         SimpleBuffer.h \
169         extension.h \
170         GnashNumeric.h \
171         jemtree.h \
172         GnashSleep.h \
173         gmemory.h \
174         SharedMem.h \
175         sharedlib.h \
176         tree.hh \
177         tu_file.h \
178         IOChannel.h \
179         Socket.h \
180         GnashSystemFDHeaders.h \
181         GnashSystemNetHeaders.h \
182         GnashSystemIOHeaders.h \
183         GnashFileUtilities.h \
184         ClockTime.h \
185         WallClockTimer.h \
186         utf8.h \
187         noseek_fd_adapter.h \
188         zlib_adapter.h \
189         BitsReader.h \
190         arg_parser.h \
191         getclocktime.hpp \
192         GnashAlgorithm.h \
193         GnashFactory.h \
194         URLAccessManager.h \
195         StreamProvider.h \
196         $(NULL)
198 if USE_PNG
199 noinst_HEADERS += GnashImagePng.h
200 endif
201 if USE_GIF
202 noinst_HEADERS += GnashImageGif.h
203 endif
205 EXTENSIONS_API = \
206         StringPredicates.h \
207         Stats.h \
208         GnashEnums.h \
209         smart_ptr.h \
210         string_table.h \
211         ref_counted.h \
212         GC.h \
213         GnashException.h \
214         AMF.h \
215         RTMP.h \
216         dsodefs.h \
217         utility.h \
218         log.h \
219         rc.h \
220         gettext.h \
221         URL.h \
222         Point2d.h \
223         Range2d.h \
224         snappingrange.h \
225         NetworkAdapter.h \
226         NamingPolicy.h \
227         GnashImageJpeg.h \
228         CachedBitmap.h \
229         GnashImage.h \
230         ImageIterators.h \
231         SWFCtype.h \
232         $(NULL)
234 instdir = $(includedir)/gnash
235 inst_HEADERS += $(EXTENSIONS_API)
237 libgnashbase_la_LDFLAGS = -release $(VERSION) 
238 libgnashbase_la_DEPENDENCIES = $(LIBLTDLLIB)
240 if BUILD_OGL_RENDERER
241    libgnashbase_la_SOURCES += \
242         GnashTexture.cpp \
243         $(NULL)
245    noinst_HEADERS += \
246         GnashTexture.h \
247         $(NULL)
248 endif
250 if HAVE_VAAPI
251    libgnashbase_la_SOURCES += \
252         GnashVaapiImage.cpp \
253         $(NULL)
255    noinst_HEADERS += \
256         GnashVaapiImage.h \
257         GnashVaapiImageProxy.h \
258         $(NULL)
260 if HAVE_VAAPI_GLX
261    libgnashbase_la_SOURCES += \
262         GnashVaapiTexture.cpp \
263         $(NULL)
265    noinst_HEADERS += \
266         GnashVaapiTexture.h \
267         $(NULL)
268 endif
270 if HAVE_VAAPI
271    libgnashbase_la_CPPFLAGS += \
272         -I$(top_srcdir)/libvaapi \
273         $(NULL)
275    libgnashbase_la_LIBADD += \
276         $(top_builddir)/libvaapi/libgnashvaapi.la \
277         $(NULL)
279    libgnashbase_la_DEPENDENCIES += \
280         $(top_builddir)/libvaapi/libgnashvaapi.la \
281         $(NULL)
282 endif
283 endif
285 if WIN32
286   libgnashbase_la_LDFLAGS += -no-undefined
287   libgnashbase_la_LIBADD += -lws2_32 -lwinmm
288 endif
290 if ENABLE_PCH
291 AM_CXXFLAGS = $(PCH_FLAGS)
292 endif
294 CLEANFILES = libltdl.la libltdlc.la gnashrc gnashpluginrc
296 # Rebuild with GCC 4.x Mudflap support
297 mudflap:
298         @echo "Rebuilding with GCC Mudflap support"
299         $(MAKE) CXXFLAGS="$(CXXFLAGS) -fmudflap" LDFLAGS="$(LDFLAGS) -lmudflap"