use _object_ref_sink() when we can
[platform/upstream/gstreamer.git] / gst-libs / gst / pbutils / Makefile.am
1 lib_LTLIBRARIES = libgstpbutils-@GST_MAJORMINOR@.la
2
3 headers_pbutils = \
4         pbutils.h         \
5         codec-utils.h     \
6         descriptions.h    \
7         install-plugins.h \
8         missing-plugins.h \
9         gstdiscoverer.h
10
11 # variables used for enum/marshal generation
12 glib_enum_headers = $(headers_pbutils)
13 glib_enum_define = PB_UTILS
14 glib_gen_prefix = pbutils
15 glib_gen_basename = pbutils
16
17 built_headers_configure = \
18         gstpluginsbaseversion.h
19
20 libgstpbutils_@GST_MAJORMINOR@_la_SOURCES = \
21         gstpluginsbaseversion.c \
22         pbutils.c         \
23         codec-utils.c     \
24         descriptions.c    \
25         install-plugins.c \
26         missing-plugins.c \
27         gstdiscoverer.c   \
28         gstdiscoverer-types.c
29
30 nodist_libgstpbutils_@GST_MAJORMINOR@_la_SOURCES = \
31         pbutils-enumtypes.c     \
32         pbutils-marshal.c
33
34 libgstpbutils_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/pbutils
35 libgstpbutils_@GST_MAJORMINOR@include_HEADERS = \
36         $(headers_pbutils)
37 nodist_libgstpbutils_@GST_MAJORMINOR@include_HEADERS = \
38         $(built_headers_configure) \
39         pbutils-enumtypes.h
40 noinst_HEADERS = \
41         pbutils-private.h
42 EXTRA_DIST = pbutils-marshal.list
43
44 libgstpbutils_@GST_MAJORMINOR@_la_LIBADD = \
45   $(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_MAJORMINOR@.la \
46   $(GST_LIBS)
47 libgstpbutils_@GST_MAJORMINOR@_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
48 libgstpbutils_@GST_MAJORMINOR@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
49
50 BUILT_SOURCES = \
51         pbutils-enumtypes.c \
52         pbutils-enumtypes.h \
53         pbutils-marshal.c   \
54         pbutils-marshal.h
55
56 CLEANFILES = $(BUILT_SOURCES)
57
58 # DISTCLEANFILES is for files generated by configure
59 DISTCLEANFILES = $(built_headers_configure)
60
61 include $(top_srcdir)/common/gst-glib-gen.mak
62
63 if HAVE_INTROSPECTION
64 BUILT_GIRSOURCES = GstPbutils-@GST_MAJORMINOR@.gir
65
66 gir_headers=$(patsubst %,$(srcdir)/%, $(libgstpbutils_@GST_MAJORMINOR@include_HEADERS))
67 gir_headers+=$(patsubst %,$(builddir)/%, $(nodist_libgstpbutils_@GST_MAJORMINOR@include_HEADERS))
68 gir_sources=$(patsubst %,$(srcdir)/%, $(libgstpbutils_@GST_MAJORMINOR@_la_SOURCES))
69 gir_sources+=$(patsubst %,$(builddir)/%, $(nodist_libgstpbutils_@GST_MAJORMINOR@_la_SOURCES))
70 gir_cincludes=$(patsubst %,--c-include='gst/pbutils/%',$(libgstpbutils_@GST_MAJORMINOR@include_HEADERS))
71 gir_cincludes+=$(patsubst %,--c-include='gst/pbutils/%',$(nodist_libgstpbutils_@GST_MAJORMINOR@include_HEADERS))
72
73 GstPbutils-@GST_MAJORMINOR@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_MAJORMINOR@.la
74         $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
75                 $(INTROSPECTION_SCANNER) -v --namespace GstPbutils \
76                 --nsversion=@GST_MAJORMINOR@ \
77                 --strip-prefix=Gst \
78                 $(gir_cincludes) \
79                 -I$(top_srcdir)/gst-libs \
80                 -I$(top_builddir)/gst-libs \
81                 --add-include-path=$(srcdir)/../video \
82                 --add-include-path=`$(PKG_CONFIG) --variable=girdir gstreamer-@GST_MAJORMINOR@` \
83                 --library=libgstpbutils-@GST_MAJORMINOR@.la \
84                 --include=Gst-@GST_MAJORMINOR@ \
85                 --libtool="$(top_builddir)/libtool" \
86                 --pkg gstreamer-@GST_MAJORMINOR@ \
87                 --pkg gstreamer-video-@GST_MAJORMINOR@ \
88                 --pkg-export gstreamer-pbutils-@GST_MAJORMINOR@ \
89                 --output $@ \
90                 $(gir_headers) \
91                 $(gir_sources)
92
93 # INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to
94 # install anything - we need to install inside our prefix.
95 girdir = $(datadir)/gir-1.0
96 gir_DATA = $(BUILT_GIRSOURCES)
97
98 typelibsdir = $(libdir)/girepository-1.0/
99
100 typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
101
102 %.typelib: %.gir $(INTROSPECTION_COMPILER)
103         $(AM_V_GEN)$(INTROSPECTION_COMPILER) \
104                 --includedir=$(srcdir) \
105                 --includedir=$(srcdir)/../video \
106                 --includedir=$(builddir) \
107                 --includedir=`$(PKG_CONFIG) --variable=girdir gstreamer-@GST_MAJORMINOR@` \
108                 $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
109
110 CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
111 endif