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