DeviceProvider: Rename from DeviceMonitor
[platform/upstream/gstreamer.git] / gst / Makefile.am
1 lib_LTLIBRARIES = libgstreamer-@GST_API_VERSION@.la
2
3 if GST_DISABLE_REGISTRY
4 GST_REGISTRY_SRC =
5 else
6 GST_REGISTRY_SRC = gstregistrybinary.c
7 endif
8
9 if GST_DISABLE_PARSE
10 SUBDIRS_PARSE =
11 GST_PARSE_LA =
12 else
13 SUBDIRS_PARSE = parse
14 GST_PARSE_LA = parse/libgstparse.la
15 endif
16
17 if GST_DISABLE_TRACE
18 GST_TRACE_SRC =
19 else
20 GST_TRACE_SRC = gsttrace.c
21 endif
22
23 if GST_DISABLE_PLUGIN
24 GST_PLUGIN_SRC =
25 else
26 GST_PLUGIN_SRC = gstplugin.c
27 endif
28
29 if !GST_DISABLE_GST_DEBUG
30 SUBDIRS_PRINTF = printf
31 GST_PRINTF_LA = printf/libgstprintf.la
32 else
33 SUBDIRS_PRINTF =
34 GST_PRINTF_LA =
35 endif
36
37 SUBDIRS = $(SUBDIRS_PARSE) $(SUBDIRS_PRINTF)
38
39 DIST_SUBDIRS = parse printf
40
41 # make variables for all generated source and header files to make the
42 # distinction clear
43
44 built_header_configure = gstconfig.h gstversion.h
45 built_header_make = gstenumtypes.h
46 built_source_make = gstenumtypes.c
47
48 EXTRA_libgstreamer_@GST_API_VERSION@_la_SOURCES = \
49         gsttrace.c \
50         gstregistrybinary.c
51
52
53 # temporarily not used
54 #       glib-compat.c
55
56 libgstreamer_@GST_API_VERSION@_la_SOURCES = \
57         gst.c                   \
58         gstobject.c             \
59         gstallocator.c          \
60         gstbin.c                \
61         gstbuffer.c             \
62         gstbufferlist.c         \
63         gstbufferpool.c         \
64         gstbus.c                \
65         gstcaps.c               \
66         gstcapsfeatures.c       \
67         gstchildproxy.c         \
68         gstclock.c              \
69         gstcontext.c \
70         gstcontrolbinding.c \
71         gstcontrolsource.c \
72         gstdatetime.c           \
73         gstdebugutils.c         \
74         gstdevice.c             \
75         gstdeviceprovider.c     \
76         gstdeviceproviderfactory.c \
77         gstelement.c            \
78         gstelementfactory.c     \
79         gsterror.c              \
80         gstevent.c              \
81         gstformat.c             \
82         gstghostpad.c           \
83         gstglobaldevicemonitor.c \
84         gstinfo.c               \
85         gstiterator.c           \
86         gstatomicqueue.c        \
87         gstmessage.c            \
88         gstmeta.c               \
89         gstmemory.c             \
90         gstminiobject.c         \
91         gstpad.c                \
92         gstpadtemplate.c        \
93         gstparamspecs.c         \
94         gstpipeline.c           \
95         gstplugin.c             \
96         gstpluginfeature.c      \
97         gstpluginloader.c       \
98         gstpoll.c               \
99         gstpreset.c             \
100         gstquark.c              \
101         gstquery.c              \
102         gstregistry.c           \
103         gstregistrychunks.c     \
104         gstsample.c             \
105         gstsegment.c            \
106         gststructure.c          \
107         gstsystemclock.c        \
108         gsttaglist.c            \
109         gsttagsetter.c          \
110         gsttask.c               \
111         gsttaskpool.c           \
112         gsttoc.c                \
113         gsttocsetter.c          \
114         $(GST_TRACE_SRC)        \
115         gsttypefind.c           \
116         gsttypefindfactory.c    \
117         gsturi.c                \
118         gstutils.c              \
119         gstvalue.c              \
120         gstparse.c              \
121         $(GST_REGISTRY_SRC)
122
123 # do not put files in the distribution that are generated
124 nodist_libgstreamer_@GST_API_VERSION@_la_SOURCES = $(built_source_make)
125
126 # BUILT_SOURCES are built on make all/check/install before all other targets
127 BUILT_SOURCES = \
128         $(built_header_configure)       \
129         $(built_header_make)            \
130         $(built_source_make)
131 # CLEANFILES is for files generated by make
132 CLEANFILES = $(built_header_make) $(built_source_make) $(as_dll_cleanfiles) *.gcno *.gcda *.gcov *.gcov.out
133 # DISTCLEANFILES is for files generated by configure
134 DISTCLEANFILES = $(built_header_configure)
135
136 libgstreamer_@GST_API_VERSION@_la_CFLAGS =              \
137         -D_GNU_SOURCE                                   \
138         -DGST_EXPORTS                                   \
139         -DG_LOG_DOMAIN=g_log_domain_gstreamer           \
140         -DGST_API_VERSION=\""$(GST_API_VERSION)"\"      \
141         -DGST_DISABLE_DEPRECATED                        \
142         $(VALGRIND_CFLAGS)                              \
143         $(GST_ALL_CFLAGS)
144
145 libgstreamer_@GST_API_VERSION@_la_LIBADD =              \
146         $(GST_PARSE_LA)                                 \
147         $(GST_PRINTF_LA)                                \
148         $(GST_ALL_LIBS)                                 \
149         $(WIN32_LIBS)                                   \
150         $(LIBM)
151
152 libgstreamer_@GST_API_VERSION@_la_LDFLAGS =             \
153         $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
154
155 libgstreamer_@GST_API_VERSION@includedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst
156
157 gst_headers =                   \
158         gst.h                   \
159         glib-compat.h           \
160         gstobject.h             \
161         gstallocator.h          \
162         gstbin.h                \
163         gstbuffer.h             \
164         gstbufferlist.h         \
165         gstbufferpool.h         \
166         gstbus.h                \
167         gstcaps.h               \
168         gstcapsfeatures.h       \
169         gstchildproxy.h         \
170         gstclock.h              \
171         gstcompat.h             \
172         gstcontext.h \
173         gstcontrolbinding.h \
174         gstcontrolsource.h \
175         gstdatetime.h           \
176         gstdebugutils.h         \
177         gstelement.h            \
178         gstelementmetadata.h    \
179         gstdevice.h             \
180         gstdeviceprovider.h     \
181         gstdeviceproviderfactory.h \
182         gstelementfactory.h     \
183         gsterror.h              \
184         gstevent.h              \
185         gstformat.h             \
186         gstghostpad.h           \
187         gstglobaldevicemonitor.h \
188         gstinfo.h               \
189         gstiterator.h           \
190         gstatomicqueue.h        \
191         gstmacros.h             \
192         gstmessage.h            \
193         gstmeta.h               \
194         gstmemory.h             \
195         gstminiobject.h         \
196         gstpad.h                \
197         gstpadtemplate.h        \
198         gstparamspecs.h         \
199         gstpipeline.h           \
200         gstplugin.h             \
201         gstpluginfeature.h      \
202         gstpoll.h               \
203         gstpreset.h             \
204         gstquery.h              \
205         gstsample.h             \
206         gstsegment.h            \
207         gststructure.h          \
208         gstsystemclock.h        \
209         gsttaglist.h            \
210         gsttagsetter.h          \
211         gsttask.h               \
212         gsttaskpool.h           \
213         gsttoc.h                \
214         gsttocsetter.h          \
215         gsttypefind.h           \
216         gsttypefindfactory.h    \
217         gsturi.h                \
218         gstutils.h              \
219         gstvalue.h              \
220         gstregistry.h           \
221         gstparse.h
222
223 libgstreamer_@GST_API_VERSION@include_HEADERS = $(gst_headers) math-compat.h
224
225 nodist_libgstreamer_@GST_API_VERSION@include_HEADERS = \
226         $(built_header_configure) $(built_header_make)
227
228 noinst_HEADERS =                \
229         gettext.h               \
230         glib-compat-private.h   \
231         gst-i18n-lib.h          \
232         gst-i18n-app.h          \
233         gstelementmetadata.h    \
234         gstpluginloader.h       \
235         gstquark.h              \
236         gstregistrybinary.h     \
237         gstregistrychunks.h     \
238         gsttrace.h              \
239         gst_private.h
240
241 gstenumtypes.h: $(gst_headers)
242         $(AM_V_GEN)$(GLIB_MKENUMS) \
243         --fhead "#ifndef __GST_ENUM_TYPES_H__\n#define __GST_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
244         --fprod "\n/* enumerations from \"@filename@\" */\n" \
245         --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
246         --ftail "G_END_DECLS\n\n#endif /* __GST_ENUM_TYPES_H__ */" \
247         $^ > gstenumtypes.h
248
249 gstenumtypes.c: $(gst_headers)
250         $(AM_V_GEN)$(GLIB_MKENUMS) \
251         --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 " \
252         --fprod "\n/* enumerations from \"@filename@\" */" \
253         --vhead "GType\n@enum_name@_get_type (void)\n{\n  static gsize id = 0;\n  static const G@Type@Value values[] = {"     \
254         --vprod "    { C_@TYPE@(@VALUENAME@), \"@VALUENAME@\", \"@valuenick@\" }," \
255         --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}" \
256         $^ > gstenumtypes.c
257
258 %.c.gcov: .libs/libgstreamer_@GST_API_VERSION@_la-%.gcda %.c
259         $(GCOV) -b -f -o $^ > $@.out
260
261 gcov: $(libgstreamer_@GST_API_VERSION@_la_SOURCES:=.gcov)
262
263 Android.mk: Makefile.am
264         androgenizer -:PROJECT gstreamer -:SHARED libgstreamer-@GST_API_VERSION@ \
265          -:TAGS eng debug \
266          -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
267          -:SOURCES $(libgstreamer_@GST_API_VERSION@_la_SOURCES) \
268                    $(nodist_libgstreamer_@GST_API_VERSION@_la_SOURCES) \
269          -:CFLAGS $(DEFS) $(libgstreamer_@GST_API_VERSION@_la_CFLAGS) \
270          -:LDFLAGS $(libgstreamer_@GST_API_VERSION@_la_LDFLAGS) \
271                    $(libgstreamer_@GST_API_VERSION@_la_LIBADD) \
272                    -ldl \
273          -:SUBDIR gst/parse \
274          -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst \
275          -:HEADERS $(libgstreamer_@GST_API_VERSION@include_HEADERS) \
276          -:LIBFILTER_STATIC gstparse \
277          -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
278         > $@
279
280 if HAVE_INTROSPECTION
281 BUILT_GIRSOURCES = Gst-@GST_API_VERSION@.gir
282
283 gir_headers=$(patsubst %,$(srcdir)/%, $(libgstreamer_@GST_API_VERSION@include_HEADERS))
284 gir_headers+=$(patsubst %,$(builddir)/%, $(built_header_make))
285 gir_headers+=$(patsubst %,$(builddir)/%, gstversion.h)
286 gir_sources=$(patsubst %,$(srcdir)/%, $(libgstreamer_@GST_API_VERSION@_la_SOURCES))
287 gir_sources+=$(patsubst %,$(builddir)/%, $(built_source_make))
288
289 Gst-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstreamer-@GST_API_VERSION@.la
290         $(AM_V_GEN)GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
291                 $(INTROSPECTION_SCANNER) -v --namespace Gst \
292                 --nsversion=@GST_API_VERSION@ \
293                 --warn-all \
294                 -I$(top_srcdir) \
295                 -I$(top_builddir) \
296                 -DIN_GOBJECT_INTROSPECTION=1 \
297                 --c-include='gst/gst.h' \
298                 --library=libgstreamer-@GST_API_VERSION@.la \
299                 --include=GLib-2.0 \
300                 --include=GObject-2.0 \
301                 --include=GModule-2.0 \
302                 --libtool="${LIBTOOL}" \
303                 --pkg glib-2.0 \
304                 --pkg gobject-2.0 \
305                 --pkg gmodule-no-export-2.0 \
306                 --pkg-export gstreamer-@GST_API_VERSION@ \
307                 --add-init-section="gst_init(NULL, NULL);" \
308                 --output $@ \
309                 $(gir_headers) \
310                 $(gir_sources)
311
312 # INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to
313 # install anything - we need to install inside our prefix.
314 girdir = $(datadir)/gir-1.0
315 gir_DATA = $(BUILT_GIRSOURCES)
316
317 typelibsdir = $(libdir)/girepository-1.0/
318
319 typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
320
321 %.typelib: %.gir $(INTROSPECTION_COMPILER)
322         $(AM_V_GEN)$(INTROSPECTION_COMPILER) --includedir=$(srcdir) --includedir=$(builddir) $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
323
324 CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
325 endif
326
327 # try to prevent packaging errors
328 check-libexecdir-consistency:
329         @if test "${GST_PLUGIN_SCANNER_INSTALLED}" != "${libexecdir}/gstreamer-$(GST_API_VERSION)/gst-plugin-scanner"; then \
330           echo "*** Inconsistent libexecdir! Please use ./configure --libexecdir=/foo/bar"; \
331           echo "*** to set the libexecdir and not make libexecdir=/foo/bar or the like."; \
332           echo "*** The same goes for prefix, libdir etc."; \
333           echo "*** ${GST_PLUGIN_SCANNER_INSTALLED} != ${libexecdir}/gstreamer-$(GST_API_VERSION)/gst-plugin-scanner"; \
334           exit 1; \
335         fi
336
337 all-local: check-libexecdir-consistency