initialize validbounds on ::init, log_debug sizes
[gnash.git] / libbase / Makefile.am
blob44ec61aa4cdcd7f6787c09ffdb3a2ca648cbddb2
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         $(Z_CFLAGS) \
40         $(JPEG_CFLAGS) \
41         $(BOOST_CFLAGS) \
42         $(INCLTDL) \
43         $(NULL)
45 if ANDROID
46 libgnashbase_la_CPPFLAGS += $(ANDROID_NDK)/usr/include
47 endif
49 # These headers get installed
51 libgnashbase_la_LIBADD = \
52         $(JPEG_LIBS) \
53         $(PNG_LIBS) \
54         $(GIF_LIBS) \
55         $(Z_LIBS) \
56         $(CURL_LIBS) \
57         $(OPENGL_LIBS) \
58         $(LIBINTL) \
59         $(BOOST_LIBS) \
60         $(PTHREAD_LIBS) \
61         $(NULL)
63 libgnashbase_la_SOURCES = \
64         extension.cpp \
65         $(MALLOC) \
66         GnashImage.cpp \
67         GnashImageJpeg.cpp \
68         GnashFileUtilities.cpp \
69         AMF.cpp \
70         RTMP.cpp \
71         log.cpp \
72         memory.cpp \
73         rc.cpp \
74         sharedlib.cpp \
75         string_table.cpp \
76         tu_file.cpp \
77         IOChannel.cpp \
78         Socket.cpp \
79         ClockTime.cpp \
80         NamingPolicy.cpp \
81         WallClockTimer.cpp \
82         utf8.cpp \
83         curl_adapter.cpp \
84         noseek_fd_adapter.cpp \
85         zlib_adapter.cpp \
86         URL.cpp \
87         GC.cpp \
88         BitsReader.cpp \
89         arg_parser.cpp \
90         URLAccessManager.cpp \
91         StreamProvider.cpp \
92         $(NULL)
95 if ANDROID
96 libgnashbase_la_SOURCES += SharedMemHaiku.cpp
97 else
98 if HAIKU
99 libgnashbase_la_SOURCES += SharedMemHaiku.cpp
100 else
101 libgnashbase_la_SOURCES += SharedMem.cpp
102 endif
103 endif
105 edit = sed \
106         -e 's|@DEFAULT_FLASH_PLATFORM_ID[@]|$(DEFAULT_FLASH_PLATFORM_ID)|g' \
107         -e 's|@DEFAULT_FLASH_MAJOR_VERSION[@]|$(DEFAULT_FLASH_MAJOR_VERSION)|g' \
108         -e 's|@DEFAULT_FLASH_MINOR_VERSION[@]|$(DEFAULT_FLASH_MINOR_VERSION)|g' \
109         -e 's|@DEFAULT_FLASH_REV_NUMBER[@]|$(DEFAULT_FLASH_REV_NUMBER)|g' \
110         -e 's|@DEFAULT_STREAMS_TIMEOUT[@]|$(DEFAULT_STREAMS_TIMEOUT)|g' \
111         -e 's|@DEFAULT_SOL_SAFEDIR[@]|$(DEFAULT_SOL_SAFEDIR)|g' 
113 gnashrc: gnashrc.in Makefile
114         $(edit) '$(srcdir)/$@.in' >$@
116 gnashpluginrc: gnashpluginrc.in
117         $(edit) '$(srcdir)/$@.in' >$@
119 if USE_PNG
120 libgnashbase_la_SOURCES += GnashImagePng.cpp
121 endif
123 if USE_GIF
124 libgnashbase_la_SOURCES += GnashImageGif.cpp
125 endif
127 if LIBLTDL1
128 noinst_LTLIBRARIES = libltdlc.la
129 libltdlc_la_CPPFLAGS = $(LTDLINCL) -I$(top_srcdir)/libltdl
130 libltdlc_la_SOURCES = $(top_srcdir)/libltdl/ltdl.c
131 libgnashbase_la_LIBADD += $(top_builddir)/libbase/libltdlc.la
132 endif
134 if LIBLTDL2
135 libgnashbase_la_LIBADD += $(top_builddir)/libltdl/libltdlc.la
136 endif
139 if HAIKU
140   libgnashbase_la_LIBADD += $(HAIKU_LIBS)
141 endif
143 if WIN32
144   libgnashbase_la_LIBADD += -lws2_32 -lwinmm
145 endif
147 # Maybe use jemalloc, which handles memory fragmentation for
148 # ECAMscript languages better than the regular system malloc.
149 # This is controlled by the --enable-jemalloc (disabled by default)
150 # configure option.
151 if JEMALLOC
152 MALLOC = jemalloc.c
153 else
154 MALLOC = 
155 endif
157 noinst_HEADERS =
159 inst_HEADERS = \
160         $(LIBLTDLHEAD) \
161         SimpleBuffer.h \
162         extension.h \
163         GnashNumeric.h \
164         jemtree.h \
165         GnashSleep.h \
166         gmemory.h \
167         SharedMem.h \
168         sharedlib.h \
169         tree.hh \
170         tu_file.h \
171         IOChannel.h \
172         Socket.h \
173         GnashSystemFDHeaders.h \
174         GnashSystemNetHeaders.h \
175         GnashSystemIOHeaders.h \
176         GnashFileUtilities.h \
177         ClockTime.h \
178         WallClockTimer.h \
179         utf8.h \
180         noseek_fd_adapter.h \
181         zlib_adapter.h \
182         BitsReader.h \
183         arg_parser.h \
184         getclocktime.hpp \
185         GnashAlgorithm.h \
186         GnashFactory.h \
187         URLAccessManager.h \
188         StreamProvider.h \
189         $(NULL)
191 if USE_PNG
192 noinst_HEADERS += GnashImagePng.h
193 endif
194 if USE_GIF
195 noinst_HEADERS += GnashImageGif.h
196 endif
198 EXTENSIONS_API = \
199         StringPredicates.h \
200         Stats.h \
201         GnashEnums.h \
202         smart_ptr.h \
203         string_table.h \
204         ref_counted.h \
205         GC.h \
206         GnashException.h \
207         AMF.h \
208         RTMP.h \
209         dsodefs.h \
210         utility.h \
211         log.h \
212         rc.h \
213         gettext.h \
214         URL.h \
215         Point2d.h \
216         Range2d.h \
217         snappingrange.h \
218         NetworkAdapter.h \
219         NamingPolicy.h \
220         GnashImageJpeg.h \
221         CachedBitmap.h \
222         GnashImage.h \
223         ImageIterators.h \
224         $(NULL)
226 instdir = $(includedir)/gnash
227 inst_HEADERS += $(EXTENSIONS_API)
229 libgnashbase_la_LDFLAGS = -release $(VERSION) 
230 libgnashbase_la_DEPENDENCIES = $(LIBLTDLLIB)
232 if BUILD_OGL_RENDERER
233    libgnashbase_la_SOURCES += \
234         GnashTexture.cpp \
235         $(NULL)
237    noinst_HEADERS += \
238         GnashTexture.h \
239         $(NULL)
240 endif
242 if HAVE_VAAPI
243    libgnashbase_la_SOURCES += \
244         GnashVaapiImage.cpp \
245         $(NULL)
247    noinst_HEADERS += \
248         GnashVaapiImage.h \
249         GnashVaapiImageProxy.h \
250         $(NULL)
252 if HAVE_VAAPI_GLX
253    libgnashbase_la_SOURCES += \
254         GnashVaapiTexture.cpp \
255         $(NULL)
257    noinst_HEADERS += \
258         GnashVaapiTexture.h \
259         $(NULL)
260 endif
262 if HAVE_VAAPI
263    libgnashbase_la_CPPFLAGS += \
264         -I$(top_srcdir)/libvaapi \
265         $(NULL)
267    libgnashbase_la_LIBADD += \
268         $(top_builddir)/libvaapi/libgnashvaapi.la \
269         $(NULL)
271    libgnashbase_la_DEPENDENCIES += \
272         $(top_builddir)/libvaapi/libgnashvaapi.la \
273         $(NULL)
274 endif
275 endif
277 if WIN32
278   libgnashbase_la_LDFLAGS += -no-undefined
279   libgnashbase_la_LIBADD += -lws2_32 -lwinmm
280 endif
282 if ENABLE_PCH
283 AM_CXXFLAGS = $(PCH_FLAGS)
284 endif
286 CLEANFILES = libltdl.la libltdlc.la gnashrc gnashpluginrc
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"