Merge branch 'master' into 0.11
[platform/upstream/gstreamer.git] / gst-libs / gst / interfaces / Makefile.am
1 lib_LTLIBRARIES = libgstinterfaces-@GST_MAJORMINOR@.la
2 libgstinterfacesincludedir = \
3         $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/interfaces
4
5 headers_interfaces =            \
6         colorbalance.h          \
7         colorbalancechannel.h   \
8         mixer.h                 \
9         mixeroptions.h          \
10         mixertrack.h            \
11         navigation.h            \
12         propertyprobe.h         \
13         streamvolume.h          \
14         tuner.h                 \
15         tunernorm.h             \
16         tunerchannel.h          \
17         videoorientation.h      \
18         xoverlay.h
19
20 # variables used for enum/marshal generation
21 glib_enum_headers = $(headers_interfaces)
22 glib_enum_define = GST_INTERFACES
23 glib_gen_prefix = gst_interfaces
24 glib_gen_basename = interfaces
25
26 built_sources = \
27         interfaces-marshal.c \
28         interfaces-enumtypes.c
29
30 built_headers = \
31         interfaces-marshal.h \
32         interfaces-enumtypes.h
33
34 libgstinterfacesinclude_HEADERS = \
35         $(headers_interfaces)
36
37 nodist_libgstinterfacesinclude_HEADERS = \
38         interfaces-enumtypes.h
39
40 libgstinterfaces_@GST_MAJORMINOR@_la_SOURCES = \
41         colorbalance.c          \
42         colorbalancechannel.c   \
43         mixer.c                 \
44         mixeroptions.c          \
45         mixertrack.c            \
46         navigation.c            \
47         propertyprobe.c         \
48         streamvolume.c          \
49         tuner.c                 \
50         tunernorm.c             \
51         tunerchannel.c          \
52         videoorientation.c      \
53         xoverlay.c
54
55 nodist_libgstinterfaces_@GST_MAJORMINOR@_la_SOURCES =   \
56         $(built_sources)                                \
57         interfaces-marshal.h
58
59 libgstinterfaces_@GST_MAJORMINOR@_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
60 libgstinterfaces_@GST_MAJORMINOR@_la_LIBADD = $(GST_LIBS) $(LIBM) 
61 libgstinterfaces_@GST_MAJORMINOR@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
62
63 BUILT_SOURCES = \
64         $(built_sources) \
65         $(built_headers)
66
67 EXTRA_DIST = interfaces-marshal.list
68
69 CLEANFILES = $(BUILT_SOURCES)
70
71 include $(top_srcdir)/common/gst-glib-gen.mak
72
73 if HAVE_INTROSPECTION
74 BUILT_GIRSOURCES = GstInterfaces-@GST_MAJORMINOR@.gir
75
76 gir_headers=$(patsubst %,$(srcdir)/%, $(libgstinterfacesinclude_HEADERS))
77 gir_headers+=$(patsubst %,$(builddir)/%, $(nodist_libgstinterfacesinclude_HEADERS))
78 gir_sources=$(patsubst %,$(srcdir)/%, $(libgstinterfaces_@GST_MAJORMINOR@_la_SOURCES))
79 gir_sources+=$(patsubst %,$(builddir)/%, $(nodist_libgstinterfaces_@GST_MAJORMINOR@_la_SOURCES))
80 gir_cincludes=$(patsubst %,--c-include='gst/interfaces/%',$(libgstinterfacesinclude_HEADERS))
81 gir_cincludes+=$(patsubst %,--c-include='gst/interfaces/%',$(nodist_libgstinterfacesinclude_HEADERS))
82
83 GstInterfaces-@GST_MAJORMINOR@.gir: $(INTROSPECTION_SCANNER) libgstinterfaces-@GST_MAJORMINOR@.la
84         $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
85                 $(INTROSPECTION_SCANNER) -v --namespace GstInterfaces \
86                 --nsversion=@GST_MAJORMINOR@ \
87                 --strip-prefix=Gst \
88                 $(gir_cincludes) \
89                 -I$(top_srcdir)/gst-libs \
90                 -I$(top_builddir)/gst-libs \
91                 --add-include-path=`$(PKG_CONFIG) --variable=girdir gstreamer-@GST_MAJORMINOR@` \
92                 --library=libgstinterfaces-@GST_MAJORMINOR@.la \
93                 --include=Gst-@GST_MAJORMINOR@ \
94                 --libtool="$(top_builddir)/libtool" \
95                 --pkg gstreamer-@GST_MAJORMINOR@ \
96                 --pkg-export gstreamer-interfaces-@GST_MAJORMINOR@ \
97                 --output $@ \
98                 $(gir_headers) \
99                 $(gir_sources)
100
101 # INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to
102 # install anything - we need to install inside our prefix.
103 girdir = $(datadir)/gir-1.0
104 gir_DATA = $(BUILT_GIRSOURCES)
105
106 typelibsdir = $(libdir)/girepository-1.0/
107
108 typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
109
110 %.typelib: %.gir $(INTROSPECTION_COMPILER)
111         $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
112                 $(INTROSPECTION_COMPILER) \
113                 --includedir=$(srcdir) \
114                 --includedir=$(builddir) \
115                 --includedir=`$(PKG_CONFIG) --variable=girdir gstreamer-@GST_MAJORMINOR@` \
116                 $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
117
118 CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
119 endif