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