bufferpool: Don't check size in config validation
[platform/upstream/gstreamer.git] / gst / Makefile.am
1 lib_LTLIBRARIES = libgstreamer-@GST_API_VERSION@.la
2
3 if GST_DISABLE_REGISTRY
4 GST_REGISTRY_SRC =
5 else
6 GST_REGISTRY_SRC = gstregistrybinary.c
7 endif
8
9 if GST_DISABLE_PARSE
10 SUBDIRS_PARSE =
11 GST_PARSE_LA =
12 else
13 SUBDIRS_PARSE = parse
14 GST_PARSE_LA = parse/libgstparse.la
15 endif
16
17 if GST_DISABLE_TRACE
18 GST_TRACE_SRC =
19 else
20 GST_TRACE_SRC = gsttrace.c
21 endif
22
23 if GST_DISABLE_PLUGIN
24 GST_PLUGIN_SRC =
25 else
26 GST_PLUGIN_SRC = gstplugin.c
27 endif
28
29 if !GST_DISABLE_GST_DEBUG
30 SUBDIRS_PRINTF = printf
31 GST_PRINTF_LA = printf/libgstprintf.la
32 else
33 SUBDIRS_PRINTF =
34 GST_PRINTF_LA =
35 endif
36
37 SUBDIRS = $(SUBDIRS_PARSE) $(SUBDIRS_PRINTF)
38
39 DIST_SUBDIRS = parse printf
40
41 # make variables for all generated source and header files to make the
42 # distinction clear
43
44 built_header_configure = gstversion.h
45 built_sys_header_configure = gstconfig.h
46 built_header_make = gstenumtypes.h
47 built_source_make = gstenumtypes.c
48
49 EXTRA_libgstreamer_@GST_API_VERSION@_la_SOURCES = \
50         gsttrace.c \
51         gstregistrybinary.c
52
53
54 # temporarily not used
55 #       glib-compat.c
56
57 libgstreamer_@GST_API_VERSION@_la_SOURCES = \
58         gst.c                   \
59         gstobject.c             \
60         gstallocator.c          \
61         gstbin.c                \
62         gstbuffer.c             \
63         gstbufferlist.c         \
64         gstbufferpool.c         \
65         gstbus.c                \
66         gstcaps.c               \
67         gstcapsfeatures.c       \
68         gstchildproxy.c         \
69         gstclock.c              \
70         gstcontext.c \
71         gstcontrolbinding.c \
72         gstcontrolsource.c \
73         gstdatetime.c           \
74         gstdebugutils.c         \
75         gstdevice.c             \
76         gstdeviceprovider.c     \
77         gstdeviceproviderfactory.c \
78         gstelement.c            \
79         gstelementfactory.c     \
80         gsterror.c              \
81         gstevent.c              \
82         gstformat.c             \
83         gstghostpad.c           \
84         gstdevicemonitor.c      \
85         gstinfo.c               \
86         gstiterator.c           \
87         gstatomicqueue.c        \
88         gstmessage.c            \
89         gstmeta.c               \
90         gstmemory.c             \
91         gstminiobject.c         \
92         gstpad.c                \
93         gstpadtemplate.c        \
94         gstparamspecs.c         \
95         gstpipeline.c           \
96         gstplugin.c             \
97         gstpluginfeature.c      \
98         gstpluginloader.c       \
99         gstpoll.c               \
100         gstpreset.c             \
101         gstquark.c              \
102         gstquery.c              \
103         gstregistry.c           \
104         gstregistrychunks.c     \
105         gstsample.c             \
106         gstsegment.c            \
107         gststructure.c          \
108         gstsystemclock.c        \
109         gsttaglist.c            \
110         gsttagsetter.c          \
111         gsttask.c               \
112         gsttaskpool.c           \
113         gsttoc.c                \
114         gsttocsetter.c          \
115         $(GST_TRACE_SRC)        \
116         gsttypefind.c           \
117         gsttypefindfactory.c    \
118         gsturi.c                \
119         gstutils.c              \
120         gstvalue.c              \
121         gstparse.c              \
122         $(GST_REGISTRY_SRC)
123
124 # do not put files in the distribution that are generated
125 nodist_libgstreamer_@GST_API_VERSION@_la_SOURCES = $(built_source_make)
126
127 # BUILT_SOURCES are built on make all/check/install before all other targets
128 BUILT_SOURCES = \
129         $(built_header_configure)       \
130         $(built_sys_header_configure)   \
131         $(built_header_make)            \
132         $(built_source_make)
133 # CLEANFILES is for files generated by make
134 CLEANFILES = $(built_header_make) $(built_source_make) $(as_dll_cleanfiles) *.gcno *.gcda *.gcov *.gcov.out
135 # DISTCLEANFILES is for files generated by configure
136 DISTCLEANFILES = $(built_header_configure) $(built_sys_header_configure)
137
138 libgstreamer_@GST_API_VERSION@_la_CFLAGS =              \
139         -D_GNU_SOURCE                                   \
140         -DGST_EXPORTS                                   \
141         -DG_LOG_DOMAIN=g_log_domain_gstreamer           \
142         -DGST_API_VERSION=\""$(GST_API_VERSION)"\"      \
143         -DGST_DISABLE_DEPRECATED                        \
144         $(VALGRIND_CFLAGS)                              \
145         $(GST_ALL_CFLAGS)
146
147 libgstreamer_@GST_API_VERSION@_la_LIBADD =              \
148         $(GST_PARSE_LA)                                 \
149         $(GST_PRINTF_LA)                                \
150         $(GST_ALL_LIBS)                                 \
151         $(WIN32_LIBS)                                   \
152         $(LIBM)
153
154 libgstreamer_@GST_API_VERSION@_la_LDFLAGS =             \
155         $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
156
157 libgstreamer_@GST_API_VERSION@includedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst
158
159 gst_headers =                   \
160         gst.h                   \
161         glib-compat.h           \
162         gstobject.h             \
163         gstallocator.h          \
164         gstbin.h                \
165         gstbuffer.h             \
166         gstbufferlist.h         \
167         gstbufferpool.h         \
168         gstbus.h                \
169         gstcaps.h               \
170         gstcapsfeatures.h       \
171         gstchildproxy.h         \
172         gstclock.h              \
173         gstcompat.h             \
174         gstcontext.h \
175         gstcontrolbinding.h \
176         gstcontrolsource.h \
177         gstdatetime.h           \
178         gstdebugutils.h         \
179         gstelement.h            \
180         gstelementmetadata.h    \
181         gstdevice.h             \
182         gstdeviceprovider.h     \
183         gstdeviceproviderfactory.h \
184         gstelementfactory.h     \
185         gsterror.h              \
186         gstevent.h              \
187         gstformat.h             \
188         gstghostpad.h           \
189         gstdevicemonitor.h      \
190         gstinfo.h               \
191         gstiterator.h           \
192         gstatomicqueue.h        \
193         gstmacros.h             \
194         gstmessage.h            \
195         gstmeta.h               \
196         gstmemory.h             \
197         gstminiobject.h         \
198         gstpad.h                \
199         gstpadtemplate.h        \
200         gstparamspecs.h         \
201         gstpipeline.h           \
202         gstplugin.h             \
203         gstpluginfeature.h      \
204         gstpoll.h               \
205         gstpreset.h             \
206         gstquery.h              \
207         gstsample.h             \
208         gstsegment.h            \
209         gststructure.h          \
210         gstsystemclock.h        \
211         gsttaglist.h            \
212         gsttagsetter.h          \
213         gsttask.h               \
214         gsttaskpool.h           \
215         gsttoc.h                \
216         gsttocsetter.h          \
217         gsttypefind.h           \
218         gsttypefindfactory.h    \
219         gsturi.h                \
220         gstutils.h              \
221         gstvalue.h              \
222         gstregistry.h           \
223         gstparse.h
224
225 libgstreamer_@GST_API_VERSION@include_HEADERS = $(gst_headers) math-compat.h
226
227 nodist_libgstreamer_@GST_API_VERSION@include_HEADERS = \
228         $(built_header_configure) $(built_header_make)
229
230 configexecincludedir = $(libdir)/gstreamer-@GST_API_VERSION@/include/gst
231 nodist_configexecinclude_HEADERS = $(built_sys_header_configure)
232
233 noinst_HEADERS =                \
234         gettext.h               \
235         glib-compat-private.h   \
236         gst-i18n-lib.h          \
237         gst-i18n-app.h          \
238         gstelementmetadata.h    \
239         gstpluginloader.h       \
240         gstquark.h              \
241         gstregistrybinary.h     \
242         gstregistrychunks.h     \
243         gsttrace.h              \
244         gst_private.h
245
246 gstenumtypes.h: $(gst_headers)
247         $(AM_V_GEN)$(GLIB_MKENUMS) \
248         --fhead "#ifndef __GST_ENUM_TYPES_H__\n#define __GST_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
249         --fprod "\n/* enumerations from \"@filename@\" */\n" \
250         --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
251         --ftail "G_END_DECLS\n\n#endif /* __GST_ENUM_TYPES_H__ */" \
252         $^ > gstenumtypes.h
253
254 gstenumtypes.c: $(gst_headers)
255         $(AM_V_GEN)$(GLIB_MKENUMS) \
256         --fhead "#include \"gst_private.h\"\n#include <gst/gst.h>\n#define C_ENUM(v) ((gint) v)\n#define C_FLAGS(v) ((guint) v)\n " \
257         --fprod "\n/* enumerations from \"@filename@\" */" \
258         --vhead "GType\n@enum_name@_get_type (void)\n{\n  static gsize id = 0;\n  static const G@Type@Value values[] = {"     \
259         --vprod "    { C_@TYPE@(@VALUENAME@), \"@VALUENAME@\", \"@valuenick@\" }," \
260         --vtail "    { 0, NULL, NULL }\n  };\n\n  if (g_once_init_enter (&id)) {\n    GType tmp = g_@type@_register_static (\"@EnumName@\", values);\n    g_once_init_leave (&id, tmp);\n  }\n\n  return (GType) id;\n}" \
261         $^ > gstenumtypes.c
262
263 %.c.gcov: .libs/libgstreamer_@GST_API_VERSION@_la-%.gcda %.c
264         $(GCOV) -b -f -o $^ > $@.out
265
266 gcov: $(libgstreamer_@GST_API_VERSION@_la_SOURCES:=.gcov)
267
268 Android.mk: Makefile.am
269         androgenizer -:PROJECT gstreamer -:SHARED libgstreamer-@GST_API_VERSION@ \
270          -:TAGS eng debug \
271          -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
272          -:SOURCES $(libgstreamer_@GST_API_VERSION@_la_SOURCES) \
273                    $(nodist_libgstreamer_@GST_API_VERSION@_la_SOURCES) \
274          -:CFLAGS $(DEFS) $(libgstreamer_@GST_API_VERSION@_la_CFLAGS) \
275          -:LDFLAGS $(libgstreamer_@GST_API_VERSION@_la_LDFLAGS) \
276                    $(libgstreamer_@GST_API_VERSION@_la_LIBADD) \
277                    -ldl \
278          -:SUBDIR gst/parse \
279          -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst \
280          -:HEADERS $(libgstreamer_@GST_API_VERSION@include_HEADERS) \
281          -:LIBFILTER_STATIC gstparse \
282          -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
283         > $@
284
285 if HAVE_INTROSPECTION
286 BUILT_GIRSOURCES = Gst-@GST_API_VERSION@.gir
287
288 gir_headers=$(patsubst %,$(srcdir)/%, $(libgstreamer_@GST_API_VERSION@include_HEADERS))
289 gir_headers+=$(patsubst %,$(builddir)/%, $(built_header_make))
290 gir_headers+=$(patsubst %,$(builddir)/%, gstversion.h)
291 gir_sources=$(patsubst %,$(srcdir)/%, $(libgstreamer_@GST_API_VERSION@_la_SOURCES))
292 gir_sources+=$(patsubst %,$(builddir)/%, $(built_source_make))
293
294 Gst-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstreamer-@GST_API_VERSION@.la
295         $(AM_V_GEN)GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
296                 $(INTROSPECTION_SCANNER) -v --namespace Gst \
297                 --nsversion=@GST_API_VERSION@ \
298                 --warn-all \
299                 -I$(top_srcdir) \
300                 -I$(top_builddir) \
301                 -DIN_GOBJECT_INTROSPECTION=1 \
302                 --c-include='gst/gst.h' \
303                 --library=libgstreamer-@GST_API_VERSION@.la \
304                 --include=GLib-2.0 \
305                 --include=GObject-2.0 \
306                 --include=GModule-2.0 \
307                 --libtool="${LIBTOOL}" \
308                 --pkg glib-2.0 \
309                 --pkg gobject-2.0 \
310                 --pkg gmodule-no-export-2.0 \
311                 --pkg-export gstreamer-@GST_API_VERSION@ \
312                 --add-init-section="gst_init(NULL, NULL);" \
313                 --output $@ \
314                 $(gir_headers) \
315                 $(gir_sources)
316
317 # INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to
318 # install anything - we need to install inside our prefix.
319 girdir = $(datadir)/gir-1.0
320 gir_DATA = $(BUILT_GIRSOURCES)
321
322 typelibsdir = $(libdir)/girepository-1.0/
323
324 typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
325
326 %.typelib: %.gir $(INTROSPECTION_COMPILER)
327         $(AM_V_GEN)$(INTROSPECTION_COMPILER) --includedir=$(srcdir) --includedir=$(builddir) $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
328
329 CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
330 endif
331
332 # try to prevent packaging errors
333 check-libexecdir-consistency:
334         @if test "${GST_PLUGIN_SCANNER_INSTALLED}" != "${libexecdir}/gstreamer-$(GST_API_VERSION)/gst-plugin-scanner"; then \
335           echo "*** Inconsistent libexecdir! Please use ./configure --libexecdir=/foo/bar"; \
336           echo "*** to set the libexecdir and not make libexecdir=/foo/bar or the like."; \
337           echo "*** The same goes for prefix, libdir etc."; \
338           echo "*** ${GST_PLUGIN_SCANNER_INSTALLED} != ${libexecdir}/gstreamer-$(GST_API_VERSION)/gst-plugin-scanner"; \
339           exit 1; \
340         fi
341
342 all-local: check-libexecdir-consistency