1 lib_LTLIBRARIES = libgstreamer-@GST_MAJORMINOR@.la
3 if GST_DISABLE_REGISTRY
6 GST_REGISTRY_SRC = gstregistrybinary.c
14 GST_PARSE_LA = parse/libgstparse.la
20 GST_TRACE_SRC = gsttrace.c
26 GST_PLUGIN_SRC = gstplugin.c
29 SUBDIRS = $(SUBDIRS_PARSE)
33 # make variables for all generated source and header files to make the
36 built_header_configure = gstconfig.h gstversion.h
37 built_header_make = gstenumtypes.h gstmarshal.h
38 built_source_make = gstenumtypes.c gstmarshal.c
40 EXTRA_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
41 gstmarshal.list gsttrace.c \
45 # temporarily not used
48 libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
97 gsttypefindfactory.c \
104 # do not put files in the distribution that are generated
105 nodist_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = $(built_source_make)
107 # BUILT_SOURCES are built on make all/check/install before all other targets
109 $(built_header_configure) \
110 $(built_header_make) \
112 # CLEANFILES is for files generated by make
113 CLEANFILES = $(built_header_make) $(built_source_make) $(as_dll_cleanfiles) *.gcno *.gcda *.gcov *.gcov.out
114 # DISTCLEANFILES is for files generated by configure
115 DISTCLEANFILES = $(built_header_configure)
117 libgstreamer_@GST_MAJORMINOR@_la_CFLAGS = \
120 -DG_LOG_DOMAIN=g_log_domain_gstreamer \
121 -DGST_MAJORMINOR=\""$(GST_MAJORMINOR)"\" \
122 -DGST_DISABLE_DEPRECATED \
126 libgstreamer_@GST_MAJORMINOR@_la_LIBADD = \
133 libgstreamer_@GST_MAJORMINOR@_la_LDFLAGS = \
134 $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
136 libgstreamer_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst
153 gstelementfactory.h \
186 gsttypefindfactory.h \
193 libgstreamer_@GST_MAJORMINOR@include_HEADERS = $(gst_headers) math-compat.h
195 nodist_libgstreamer_@GST_MAJORMINOR@include_HEADERS = \
196 $(built_header_configure) $(built_header_make)
200 glib-compat-private.h \
203 gstelementmetadata.h \
206 gstregistrybinary.h \
207 gstregistrychunks.h \
210 gstmarshal.h: gstmarshal.list
211 $(AM_V_GEN)glib-genmarshal --header --prefix=gst_marshal $(srcdir)/gstmarshal.list > gstmarshal.h.tmp && \
212 mv gstmarshal.h.tmp gstmarshal.h
214 gstmarshal.c: gstmarshal.list gst_private.h
215 $(AM_V_GEN)echo "#include \"gst_private.h\"" > gstmarshal.c.tmp && \
216 echo "#include \"glib-object.h\"" >> gstmarshal.c.tmp && \
217 echo "#include \"gstmarshal.h\"" >> gstmarshal.c.tmp && \
218 glib-genmarshal --body --prefix=gst_marshal $(srcdir)/gstmarshal.list >> gstmarshal.c.tmp && \
219 mv gstmarshal.c.tmp gstmarshal.c
221 gstenumtypes.h: $(gst_headers)
222 $(AM_V_GEN)glib-mkenums \
223 --fhead "#ifndef __GST_ENUM_TYPES_H__\n#define __GST_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
224 --fprod "\n/* enumerations from \"@filename@\" */\n" \
225 --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
226 --ftail "G_END_DECLS\n\n#endif /* __GST_ENUM_TYPES_H__ */" \
229 gstenumtypes.c: $(gst_headers)
230 $(AM_V_GEN)glib-mkenums \
231 --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 " \
232 --fprod "\n/* enumerations from \"@filename@\" */" \
233 --vhead "GType\n@enum_name@_get_type (void)\n{\n static gsize id = 0;\n static const G@Type@Value values[] = {" \
234 --vprod " { C_@TYPE@(@VALUENAME@), \"@VALUENAME@\", \"@valuenick@\" }," \
235 --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 %.c.gcov: .libs/libgstreamer_@GST_MAJORMINOR@_la-%.gcda %.c
239 $(GCOV) -b -f -o $^ > $@.out
241 gcov: $(libgstreamer_@GST_MAJORMINOR@_la_SOURCES:=.gcov)
243 if HAVE_INTROSPECTION
244 BUILT_GIRSOURCES = Gst-@GST_MAJORMINOR@.gir
246 gir_headers=$(patsubst %,$(srcdir)/%, $(libgstreamer_@GST_MAJORMINOR@include_HEADERS))
247 gir_sources=$(patsubst %,$(srcdir)/%, $(libgstreamer_@GST_MAJORMINOR@_la_SOURCES))
249 Gst-@GST_MAJORMINOR@.gir: $(INTROSPECTION_SCANNER) libgstreamer-@GST_MAJORMINOR@.la
250 $(AM_V_GEN)$(INTROSPECTION_SCANNER) -v --namespace Gst \
251 --nsversion=@GST_MAJORMINOR@ \
254 -DIN_GOBJECT_INTROSPECTION=1 \
255 --c-include='gst/gst.h' \
256 --library=libgstreamer-0.11.la \
258 --include=GObject-2.0 \
259 --include=GModule-2.0 \
260 --libtool="$(top_builddir)/libtool" \
263 --pkg gmodule-no-export-2.0 \
265 --pkg-export gstreamer-0.11 \
270 # INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to
271 # install anything - we need to install inside our prefix.
272 girdir = $(datadir)/gir-1.0
273 gir_DATA = $(BUILT_GIRSOURCES)
275 typelibsdir = $(libdir)/girepository-1.0/
277 typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
279 %.typelib: %.gir $(INTROSPECTION_COMPILER)
280 $(AM_V_GEN)$(INTROSPECTION_COMPILER) --includedir=$(srcdir) --includedir=$(builddir) $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
282 CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
285 # try to prevent packaging errors
286 check-libexecdir-consistency:
287 @if test "${GST_PLUGIN_SCANNER_INSTALLED}" != "${libexecdir}/gstreamer-$(GST_MAJORMINOR)/gst-plugin-scanner"; then \
288 echo "*** Inconsistent libexecdir! Please use ./configure --libexecdir=/foo/bar"; \
289 echo "*** to set the libexecdir and not make libexecdir=/foo/bar or the like."; \
290 echo "*** The same goes for prefix, libdir etc."; \
291 echo "*** ${GST_PLUGIN_SCANNER_INSTALLED} != ${libexecdir}/gstreamer-$(GST_MAJORMINOR)/gst-plugin-scanner"; \
295 all-local: check-libexecdir-consistency