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