Remove old alloc tracing code now that we have a GstTracer-based replacement
[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_PLUGIN
18 GST_PLUGIN_SRC =
19 else
20 GST_PLUGIN_SRC = gstplugin.c
21 endif
22
23 if !GST_DISABLE_GST_DEBUG
24 SUBDIRS_PRINTF = printf
25 GST_PRINTF_LA = printf/libgstprintf.la
26 else
27 SUBDIRS_PRINTF =
28 GST_PRINTF_LA =
29 endif
30
31 SUBDIRS = $(SUBDIRS_PARSE) $(SUBDIRS_PRINTF)
32
33 DIST_SUBDIRS = parse printf
34
35 # make variables for all generated source and header files to make the
36 # distinction clear
37
38 built_header_configure = gstversion.h
39 built_sys_header_configure = gstconfig.h
40 built_header_make = gstenumtypes.h
41 built_source_make = gstenumtypes.c
42
43 EXTRA_libgstreamer_@GST_API_VERSION@_la_SOURCES = \
44         gstregistrybinary.c
45
46
47 # temporarily not used
48 #       glib-compat.c
49
50 libgstreamer_@GST_API_VERSION@_la_SOURCES = \
51         gst.c                   \
52         gstobject.c             \
53         gstallocator.c          \
54         gstbin.c                \
55         gstbuffer.c             \
56         gstbufferlist.c         \
57         gstbufferpool.c         \
58         gstbus.c                \
59         gstcaps.c               \
60         gstcapsfeatures.c       \
61         gstchildproxy.c         \
62         gstclock.c              \
63         gstclock-linreg.c       \
64         gstcontext.c \
65         gstcontrolbinding.c \
66         gstcontrolsource.c \
67         gstdatetime.c           \
68         gstdebugutils.c         \
69         gstdevice.c             \
70         gstdevicemonitor.c      \
71         gstdeviceprovider.c     \
72         gstdeviceproviderfactory.c \
73         gstelement.c            \
74         gstelementfactory.c     \
75         gsterror.c              \
76         gstevent.c              \
77         gstformat.c             \
78         gstghostpad.c           \
79         gstinfo.c               \
80         gstiterator.c           \
81         gstatomicqueue.c        \
82         gstmessage.c            \
83         gstmeta.c               \
84         gstmemory.c             \
85         gstminiobject.c         \
86         gstpad.c                \
87         gstpadtemplate.c        \
88         gstparamspecs.c         \
89         gstpipeline.c           \
90         gstplugin.c             \
91         gstpluginfeature.c      \
92         gstpluginloader.c       \
93         gstpoll.c               \
94         gstpreset.c             \
95         gstprotection.c         \
96         gstquark.c              \
97         gstquery.c              \
98         gstregistry.c           \
99         gstregistrychunks.c     \
100         gstsample.c             \
101         gstsegment.c            \
102         gststreamcollection.c   \
103         gststreams.c            \
104         gststructure.c          \
105         gstsystemclock.c        \
106         gsttaglist.c            \
107         gsttagsetter.c          \
108         gsttask.c               \
109         gsttaskpool.c           \
110         gsttoc.c                \
111         gsttocsetter.c          \
112         gsttracer.c             \
113         gsttracerfactory.c      \
114         gsttracerrecord.c               \
115         gsttracerutils.c                \
116         gsttypefind.c           \
117         gsttypefindfactory.c    \
118         gsturi.c                \
119         gstutils.c              \
120         gstvalue.c              \
121         gstparse.c              \
122         $(GST_REGISTRY_SRC)
123
124 # do not put files in the distribution that are generated
125 nodist_libgstreamer_@GST_API_VERSION@_la_SOURCES = $(built_source_make)
126
127 # BUILT_SOURCES are built on make all/check/install before all other targets
128 BUILT_SOURCES = \
129         $(built_header_configure)       \
130         $(built_sys_header_configure)   \
131         $(built_header_make)            \
132         $(built_source_make)
133 # CLEANFILES is for files generated by make
134 CLEANFILES = $(built_header_make) $(built_source_make) $(as_dll_cleanfiles) *.gcno *.gcda *.gcov *.gcov.out
135 # DISTCLEANFILES is for files generated by configure
136 DISTCLEANFILES = $(built_header_configure) $(built_sys_header_configure)
137
138 libgstreamer_@GST_API_VERSION@_la_CFLAGS =              \
139         -D_GNU_SOURCE                                   \
140         -DGST_EXPORTS                                   \
141         -DG_LOG_DOMAIN=g_log_domain_gstreamer           \
142         -DGST_API_VERSION=\""$(GST_API_VERSION)"\"      \
143         -DGST_DISABLE_DEPRECATED                        \
144         $(VALGRIND_CFLAGS)                              \
145         $(GST_ALL_CFLAGS)
146
147 libgstreamer_@GST_API_VERSION@_la_LIBADD =              \
148         $(GST_PARSE_LA)                                 \
149         $(GST_PRINTF_LA)                                \
150         $(GST_ALL_LIBS)                                 \
151         $(WIN32_LIBS)                                   \
152         $(SOCKET_LIBS)                                  \
153         $(LIBM)
154
155 libgstreamer_@GST_API_VERSION@_la_LDFLAGS =             \
156         $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
157
158 libgstreamer_@GST_API_VERSION@includedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst
159
160 gst_headers =                   \
161         gst.h                   \
162         glib-compat.h           \
163         gstobject.h             \
164         gstallocator.h          \
165         gstbin.h                \
166         gstbuffer.h             \
167         gstbufferlist.h         \
168         gstbufferpool.h         \
169         gstbus.h                \
170         gstcaps.h               \
171         gstcapsfeatures.h       \
172         gstchildproxy.h         \
173         gstclock.h              \
174         gstcompat.h             \
175         gstcontext.h \
176         gstcontrolbinding.h \
177         gstcontrolsource.h \
178         gstdatetime.h           \
179         gstdebugutils.h         \
180         gstelement.h            \
181         gstelementmetadata.h    \
182         gstdevice.h             \
183         gstdeviceprovider.h     \
184         gstdeviceproviderfactory.h \
185         gstelementfactory.h     \
186         gsterror.h              \
187         gstevent.h              \
188         gstformat.h             \
189         gstghostpad.h           \
190         gstdevicemonitor.h      \
191         gstinfo.h               \
192         gstiterator.h           \
193         gstatomicqueue.h        \
194         gstmacros.h             \
195         gstmessage.h            \
196         gstmeta.h               \
197         gstmemory.h             \
198         gstminiobject.h         \
199         gstpad.h                \
200         gstpadtemplate.h        \
201         gstparamspecs.h         \
202         gstpipeline.h           \
203         gstplugin.h             \
204         gstpluginfeature.h      \
205         gstpoll.h               \
206         gstpreset.h             \
207         gstprotection.h         \
208         gstquery.h              \
209         gstsample.h             \
210         gstsegment.h            \
211         gststreamcollection.h   \
212         gststreams.h            \
213         gststructure.h          \
214         gstsystemclock.h        \
215         gsttaglist.h            \
216         gsttagsetter.h          \
217         gsttask.h               \
218         gsttaskpool.h           \
219         gsttoc.h                \
220         gsttocsetter.h          \
221         gsttracer.h             \
222         gsttracerfactory.h      \
223         gsttracerrecord.h               \
224         gsttypefind.h           \
225         gsttypefindfactory.h    \
226         gsturi.h                \
227         gstutils.h              \
228         gstvalue.h              \
229         gstregistry.h           \
230         gstparse.h
231
232 libgstreamer_@GST_API_VERSION@include_HEADERS = $(gst_headers) math-compat.h
233
234 nodist_libgstreamer_@GST_API_VERSION@include_HEADERS = \
235         $(built_header_configure) $(built_header_make)
236
237 configexecincludedir = $(libdir)/gstreamer-@GST_API_VERSION@/include/gst
238 nodist_configexecinclude_HEADERS = $(built_sys_header_configure)
239
240 noinst_HEADERS =                \
241         gettext.h               \
242         glib-compat-private.h   \
243         gst-i18n-lib.h          \
244         gst-i18n-app.h          \
245         gstelementmetadata.h    \
246         gstpluginloader.h       \
247         gstquark.h              \
248         gstregistrybinary.h     \
249         gstregistrychunks.h     \
250         gsttracerutils.h                \
251         gst_private.h
252
253 gstenumtypes.h: $(gst_headers)
254         $(AM_V_GEN)$(GLIB_MKENUMS) \
255         --fhead "#ifndef __GST_ENUM_TYPES_H__\n#define __GST_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
256         --fprod "\n/* enumerations from \"@filename@\" */\n" \
257         --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
258         --ftail "G_END_DECLS\n\n#endif /* __GST_ENUM_TYPES_H__ */" \
259         $^ > gstenumtypes.h
260
261 gstenumtypes.c: $(gst_headers)
262         $(AM_V_GEN)$(GLIB_MKENUMS) \
263         --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 " \
264         --fprod "\n/* enumerations from \"@filename@\" */" \
265         --vhead "GType\n@enum_name@_get_type (void)\n{\n  static gsize id = 0;\n  static const G@Type@Value values[] = {"     \
266         --vprod "    { C_@TYPE@(@VALUENAME@), \"@VALUENAME@\", \"@valuenick@\" }," \
267         --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}" \
268         $^ > gstenumtypes.c
269
270 %.c.gcov: .libs/libgstreamer_@GST_API_VERSION@_la-%.gcda %.c
271         $(GCOV) -b -f -o $^ > $@.out
272
273 gcov: $(libgstreamer_@GST_API_VERSION@_la_SOURCES:=.gcov)
274
275 if HAVE_INTROSPECTION
276 BUILT_GIRSOURCES = Gst-@GST_API_VERSION@.gir
277
278 gir_headers=$(patsubst %,$(srcdir)/%, $(libgstreamer_@GST_API_VERSION@include_HEADERS))
279 gir_headers+=$(patsubst %,$(builddir)/%, $(built_header_make))
280 gir_headers+=$(patsubst %,$(builddir)/%, gstversion.h)
281 gir_sources=$(patsubst %,$(srcdir)/%, $(libgstreamer_@GST_API_VERSION@_la_SOURCES))
282 gir_sources+=$(patsubst %,$(builddir)/%, $(built_source_make))
283
284 Gst-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstreamer-@GST_API_VERSION@.la
285         $(AM_V_GEN)GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no GI_SCANNER_DISABLE_CACHE=yes \
286                 CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" PKG_CONFIG="$(PKG_CONFIG)" DLLTOOL="$(DLLTOOL)" \
287                 $(INTROSPECTION_SCANNER) -v --namespace Gst \
288                 --nsversion=@GST_API_VERSION@ \
289                 --verbose \
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="${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="$(INTROSPECTION_INIT)" \
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