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