buffermeta: add beginnings of buffer metadata
[platform/upstream/gstreamer.git] / gst / Makefile.am
1 lib_LTLIBRARIES = libgstreamer-@GST_MAJORMINOR@.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 SUBDIRS = $(SUBDIRS_PARSE)
30
31 DIST_SUBDIRS = parse
32
33 # make variables for all generated source and header files to make the
34 # distinction clear
35
36 built_header_configure = gstconfig.h gstversion.h
37 built_header_make = gstenumtypes.h gstmarshal.h
38 built_source_make = gstenumtypes.c gstmarshal.c
39
40 EXTRA_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
41         gstmarshal.list gsttrace.c \
42         gstregistrybinary.c
43
44
45 # temporarily not used
46 #       glib-compat.c
47
48 libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
49         gst.c                   \
50         gstobject.c             \
51         gstbin.c                \
52         gstbuffer.c             \
53         gstbufferlist.c         \
54         gstbuffermeta.c         \
55         gstbus.c                \
56         gstcaps.c               \
57         gstchildproxy.c         \
58         gstclock.c              \
59         gstdatetime.c           \
60         gstdebugutils.c         \
61         gstelement.c            \
62         gstelementfactory.c     \
63         gsterror.c              \
64         gstevent.c              \
65         gstfilter.c             \
66         gstformat.c             \
67         gstghostpad.c           \
68         gstindex.c              \
69         gstindexfactory.c       \
70         gstinfo.c               \
71         gstinterface.c          \
72         gstiterator.c           \
73         gstatomicqueue.c        \
74         gstmessage.c            \
75         gstminiobject.c         \
76         gstpad.c                \
77         gstpadtemplate.c        \
78         gstparamspecs.c         \
79         gstpipeline.c           \
80         gstplugin.c             \
81         gstpluginfeature.c      \
82         gstpluginloader.c       \
83         gstpoll.c               \
84         gstpreset.c             \
85         gstquark.c              \
86         gstquery.c              \
87         gstregistry.c           \
88         gstregistrychunks.c     \
89         gstsegment.c            \
90         gststructure.c          \
91         gstsystemclock.c        \
92         gsttaglist.c            \
93         gsttagsetter.c          \
94         gsttask.c               \
95         gsttaskpool.c           \
96         $(GST_TRACE_SRC)        \
97         gsttypefind.c           \
98         gsttypefindfactory.c    \
99         gsturi.c                \
100         gstutils.c              \
101         gstvalue.c              \
102         gstparse.c              \
103         $(GST_REGISTRY_SRC)
104
105 # do not put files in the distribution that are generated
106 nodist_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = $(built_source_make)
107
108 # BUILT_SOURCES are built on make all/check/install before all other targets
109 BUILT_SOURCES = \
110         $(built_header_configure)       \
111         $(built_header_make)            \
112         $(built_source_make)
113 # CLEANFILES is for files generated by make
114 CLEANFILES = $(built_header_make) $(built_source_make) $(as_dll_cleanfiles) *.gcno *.gcda *.gcov *.gcov.out
115 # DISTCLEANFILES is for files generated by configure
116 DISTCLEANFILES = $(built_header_configure)
117
118 libgstreamer_@GST_MAJORMINOR@_la_CFLAGS =               \
119         -D_GNU_SOURCE                                   \
120         -DGST_EXPORTS                                   \
121         -DG_LOG_DOMAIN=g_log_domain_gstreamer           \
122         -DGST_MAJORMINOR=\""$(GST_MAJORMINOR)"\"        \
123         -DGST_DISABLE_DEPRECATED                        \
124         $(VALGRIND_CFLAGS)                              \
125         $(GST_ALL_CFLAGS)
126
127 libgstreamer_@GST_MAJORMINOR@_la_LIBADD =               \
128         $(GST_PARSE_LA)                                 \
129         $(GST_ALL_LIBS)                                 \
130         $(WIN32_LIBS)                                   \
131         $(XML_LIBS)                                     \
132         $(LIBM)
133
134 libgstreamer_@GST_MAJORMINOR@_la_LDFLAGS =              \
135         $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
136
137 libgstreamer_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst
138
139 gst_headers =                   \
140         gst.h                   \
141         glib-compat.h           \
142         gstobject.h             \
143         gstbin.h                \
144         gstbuffer.h             \
145         gstbufferlist.h         \
146         gstbuffermeta.h         \
147         gstbus.h                \
148         gstcaps.h               \
149         gstchildproxy.h         \
150         gstclock.h              \
151         gstcompat.h             \
152         gstdatetime.h           \
153         gstdebugutils.h         \
154         gstelement.h            \
155         gstelementfactory.h     \
156         gsterror.h              \
157         gstevent.h              \
158         gstfilter.h             \
159         gstformat.h             \
160         gstghostpad.h           \
161         gstindex.h              \
162         gstindexfactory.h       \
163         gstinfo.h               \
164         gstinterface.h          \
165         gstiterator.h           \
166         gstatomicqueue.h        \
167         gstmacros.h             \
168         gstmessage.h            \
169         gstminiobject.h         \
170         gstpad.h                \
171         gstpadtemplate.h        \
172         gstparamspecs.h         \
173         gstpipeline.h           \
174         gstplugin.h             \
175         gstpluginfeature.h      \
176         gstpoll.h               \
177         gstpreset.h             \
178         gstquery.h              \
179         gstsegment.h            \
180         gststructure.h          \
181         gstsystemclock.h        \
182         gsttaglist.h            \
183         gsttagsetter.h          \
184         gsttask.h               \
185         gsttaskpool.h           \
186         gsttrace.h              \
187         gsttypefind.h           \
188         gsttypefindfactory.h    \
189         gsturi.h                \
190         gstutils.h              \
191         gstvalue.h              \
192         gstregistry.h           \
193         gstparse.h
194
195 libgstreamer_@GST_MAJORMINOR@include_HEADERS = $(gst_headers) math-compat.h
196
197 nodist_libgstreamer_@GST_MAJORMINOR@include_HEADERS = \
198         $(built_header_configure) $(built_header_make)
199
200 noinst_HEADERS =                \
201         gettext.h               \
202         glib-compat-private.h   \
203         gst-i18n-lib.h          \
204         gst-i18n-app.h          \
205         gstelementmetadata.h    \
206         gstpluginloader.h       \
207         gstquark.h              \
208         gstregistrybinary.h     \
209         gstregistrychunks.h     \
210         gst_private.h
211
212 gstmarshal.h: gstmarshal.list
213         $(AM_V_GEN)glib-genmarshal --header --prefix=gst_marshal $(srcdir)/gstmarshal.list > gstmarshal.h.tmp && \
214         mv gstmarshal.h.tmp gstmarshal.h
215
216 gstmarshal.c: gstmarshal.list gst_private.h
217         $(AM_V_GEN)echo "#include \"gst_private.h\"" > gstmarshal.c.tmp && \
218         echo "#include \"glib-object.h\"" >> gstmarshal.c.tmp && \
219         echo "#include \"gstmarshal.h\"" >> gstmarshal.c.tmp && \
220         glib-genmarshal --body --prefix=gst_marshal $(srcdir)/gstmarshal.list >> gstmarshal.c.tmp && \
221         mv gstmarshal.c.tmp gstmarshal.c
222
223 gstenumtypes.h: $(gst_headers)
224         $(AM_V_GEN)glib-mkenums \
225         --fhead "#ifndef __GST_ENUM_TYPES_H__\n#define __GST_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
226         --fprod "\n/* enumerations from \"@filename@\" */\n" \
227         --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
228         --ftail "G_END_DECLS\n\n#endif /* __GST_ENUM_TYPES_H__ */" \
229         $^ > gstenumtypes.h
230
231 gstenumtypes.c: $(gst_headers)
232         $(AM_V_GEN)glib-mkenums \
233         --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 " \
234         --fprod "\n/* enumerations from \"@filename@\" */" \
235         --vhead "GType\n@enum_name@_get_type (void)\n{\n  static gsize id = 0;\n  static const G@Type@Value values[] = {"     \
236         --vprod "    { C_@TYPE@(@VALUENAME@), \"@VALUENAME@\", \"@valuenick@\" }," \
237         --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}" \
238         $^ > gstenumtypes.c
239
240 %.c.gcov: .libs/libgstreamer_@GST_MAJORMINOR@_la-%.gcda %.c
241         $(GCOV) -b -f -o $^ > $@.out
242
243 gcov: $(libgstreamer_@GST_MAJORMINOR@_la_SOURCES:=.gcov)
244
245 if HAVE_INTROSPECTION
246 BUILT_GIRSOURCES = Gst-@GST_MAJORMINOR@.gir
247
248 gir_headers=$(patsubst %,$(srcdir)/%, $(libgstreamer_@GST_MAJORMINOR@include_HEADERS))
249 gir_sources=$(patsubst %,$(srcdir)/%, $(libgstreamer_@GST_MAJORMINOR@_la_SOURCES))
250
251 Gst-@GST_MAJORMINOR@.gir: $(INTROSPECTION_SCANNER) libgstreamer-@GST_MAJORMINOR@.la
252         $(AM_V_GEN)$(INTROSPECTION_SCANNER) -v --namespace Gst \
253                 --nsversion=@GST_MAJORMINOR@ \
254                 -I$(top_srcdir) \
255                 -I$(top_builddir) \
256                 -DIN_GOBJECT_INTROSPECTION=1 \
257                 --c-include='gst/gst.h' \
258                 --library=libgstreamer-0.11.la \
259                 --include=GLib-2.0 \
260                 --include=GObject-2.0 \
261                 --include=GModule-2.0 \
262                 --libtool="$(top_builddir)/libtool" \
263                 --pkg glib-2.0 \
264                 --pkg gobject-2.0 \
265                 --pkg gmodule-no-export-2.0 \
266                 --pkg gthread-2.0 \
267                 --pkg-export gstreamer-0.11 \
268                 --output $@ \
269                 $(gir_headers) \
270                 $(gir_sources)
271
272 # INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to
273 # install anything - we need to install inside our prefix.
274 girdir = $(datadir)/gir-1.0
275 gir_DATA = $(BUILT_GIRSOURCES)
276
277 typelibsdir = $(libdir)/girepository-1.0/
278
279 typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
280
281 %.typelib: %.gir $(INTROSPECTION_COMPILER)
282         $(AM_V_GEN)$(INTROSPECTION_COMPILER) --includedir=$(srcdir) --includedir=$(builddir) $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
283
284 CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
285 endif
286
287 # try to prevent packaging errors
288 check-libexecdir-consistency:
289         @if test "${GST_PLUGIN_SCANNER_INSTALLED}" != "${libexecdir}/gstreamer-$(GST_MAJORMINOR)/gst-plugin-scanner"; then \
290           echo "*** Inconsistent libexecdir! Please use ./configure --libexecdir=/foo/bar"; \
291           echo "*** to set the libexecdir and not make libexecdir=/foo/bar or the like."; \
292           echo "*** The same goes for prefix, libdir etc."; \
293           echo "*** ${GST_PLUGIN_SCANNER_INSTALLED} != ${libexecdir}/gstreamer-$(GST_MAJORMINOR)/gst-plugin-scanner"; \
294           exit 1; \
295         fi
296
297 all-local: check-libexecdir-consistency