373191c4e96456a1ac05920ba9247ec69b96bc89
[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="$(PKG_CONFIG_PATH):$(top_builddir)/pkgconfig" \
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-0.10` \
92                 --library=gstinterfaces-0.10 \
93                 --include=Gst-0.10 \
94                 --libtool="$(top_builddir)/libtool" \
95                 --pkg gstreamer-0.10 \
96                 --output $@ \
97                 $(gir_headers) \
98                 $(gir_sources)
99
100 # INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to
101 # install anything - we need to install inside our prefix.
102 girdir = $(datadir)/gir-1.0
103 gir_DATA = $(BUILT_GIRSOURCES)
104
105 typelibsdir = $(libdir)/girepository-1.0/
106
107 typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
108
109 %.typelib: %.gir $(INTROSPECTION_COMPILER)
110         $(AM_V_GEN)$(INTROSPECTION_COMPILER) \
111                 --includedir=$(srcdir) \
112                 --includedir=$(builddir) \
113                 --includedir=`$(PKG_CONFIG) --variable=girdir gstreamer-0.10` \
114                 $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
115
116 CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
117 endif