1 lib_LTLIBRARIES = libgstreamer-@GST_MAJORMINOR@.la
3 if GST_DISABLE_LOADSAVE
6 GST_LOADSAVE_SRC = gstxml.c
9 if GST_DISABLE_REGISTRY
12 GST_REGISTRY_SRC = gstregistrybinary.c
20 GST_PARSE_LA = parse/libgstparse.la
26 GST_TRACE_SRC = gsttrace.c
32 GST_PLUGIN_SRC = gstplugin.c
35 SUBDIRS = $(SUBDIRS_PARSE)
39 # make variables for all generated source and header files to make the
42 built_header_configure = gstconfig.h gstversion.h
43 built_header_make = gstenumtypes.h gstmarshal.h
44 built_source_make = gstenumtypes.c gstmarshal.c
46 EXTRA_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
47 gstmarshal.list gsttrace.c gstxml.c \
51 # temporarily not used
54 libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
101 gsttypefindfactory.c \
106 $(GST_REGISTRY_SRC) \
109 # do not put files in the distribution that are generated
110 nodist_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = $(built_source_make)
112 # BUILT_SOURCES are built on make all/check/install before all other targets
114 $(built_header_configure) \
115 $(built_header_make) \
117 # CLEANFILES is for files generated by make
118 CLEANFILES = $(built_header_make) $(built_source_make) $(as_dll_cleanfiles) *.gcno *.gcda *.gcov *.gcov.out
119 # DISTCLEANFILES is for files generated by configure
120 DISTCLEANFILES = $(built_header_configure)
122 libgstreamer_@GST_MAJORMINOR@_la_CFLAGS = \
125 -DG_LOG_DOMAIN=g_log_domain_gstreamer \
126 -DGST_MAJORMINOR=\""$(GST_MAJORMINOR)"\" \
127 -DGST_DISABLE_DEPRECATED \
131 libgstreamer_@GST_MAJORMINOR@_la_LIBADD = \
137 libgstreamer_@GST_MAJORMINOR@_la_LDFLAGS = \
138 $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS) $(LIBM)
140 libgstreamer_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst
156 gstelementfactory.h \
188 gsttypefindfactory.h \
196 libgstreamer_@GST_MAJORMINOR@include_HEADERS = $(gst_headers)
197 nodist_libgstreamer_@GST_MAJORMINOR@include_HEADERS = \
198 $(built_header_configure) $(built_header_make)
202 glib-compat-private.h \
205 gstelementdetails.h \
208 gstregistrybinary.h \
209 gstregistrychunks.h \
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
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
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__ */" \
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}" \
240 %.c.gcov: .libs/libgstreamer_@GST_MAJORMINOR@_la-%.gcda %.c
241 $(GCOV) -b -f -o $^ > $@.out
243 gcov: $(libgstreamer_@GST_MAJORMINOR@_la_SOURCES:=.gcov)
245 if HAVE_INTROSPECTION
246 BUILT_GIRSOURCES = Gst-@GST_MAJORMINOR@.gir
248 gir_headers=$(patsubst %,$(srcdir)/%, $(libgstreamer_@GST_MAJORMINOR@include_HEADERS))
249 gir_sources=$(patsubst %,$(srcdir)/%, $(libgstreamer_@GST_MAJORMINOR@_la_SOURCES))
251 Gst-@GST_MAJORMINOR@.gir: $(INTROSPECTION_SCANNER) libgstreamer-@GST_MAJORMINOR@.la
252 $(AM_V_GEN)$(INTROSPECTION_SCANNER) -v --namespace Gst \
253 --nsversion=@GST_MAJORMINOR@ \
256 -DIN_GOBJECT_INTROSPECTION=1 \
257 --c-include='gst/gst.h' \
258 --library=libgstreamer-0.10.la \
260 --include=GObject-2.0 \
261 --include=GModule-2.0 \
262 --include=libxml2-2.0 \
263 --libtool="$(top_builddir)/libtool" \
266 --pkg gmodule-no-export-2.0 \
273 # INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to
274 # install anything - we need to install inside our prefix.
275 girdir = $(datadir)/gir-1.0
276 gir_DATA = $(BUILT_GIRSOURCES)
278 typelibsdir = $(libdir)/girepository-1.0/
280 typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
282 %.typelib: %.gir $(INTROSPECTION_COMPILER)
283 $(AM_V_GEN)$(INTROSPECTION_COMPILER) --includedir=$(srcdir) --includedir=$(builddir) $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
285 CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
288 # try to prevent packaging errors
289 check-libexecdir-consistency:
290 @if test "${GST_PLUGIN_SCANNER_INSTALLED}" != "${libexecdir}/gstreamer-$(GST_MAJORMINOR)/gst-plugin-scanner"; then \
291 echo "*** Inconsistent libexecdir! Please use ./configure --libexecdir=/foo/bar"; \
292 echo "*** to set the libexecdir and not make libexecdir=/foo/bar or the like."; \
293 echo "*** The same goes for prefix, libdir etc."; \
294 echo "*** ${GST_PLUGIN_SCANNER_INSTALLED} != ${libexecdir}/gstreamer-$(GST_MAJORMINOR)/gst-plugin-scanner"; \
298 all-local: check-libexecdir-consistency