gst: Install gstdynamictypefactory.h header file
[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_headers_configure = gstversion.h gstconfig.h
39 built_header_make = gstenumtypes.h
40 built_source_make = gstenumtypes.c
41
42 EXTRA_libgstreamer_@GST_API_VERSION@_la_SOURCES = \
43         gstregistrybinary.c
44
45
46 # temporarily not used
47 #       glib-compat.c
48
49 libgstreamer_@GST_API_VERSION@_la_SOURCES = \
50         gst.c                   \
51         gstobject.c             \
52         gstallocator.c          \
53         gstbin.c                \
54         gstbuffer.c             \
55         gstbufferlist.c         \
56         gstbufferpool.c         \
57         gstbus.c                \
58         gstcaps.c               \
59         gstcapsfeatures.c       \
60         gstchildproxy.c         \
61         gstclock.c              \
62         gstclock-linreg.c       \
63         gstcontext.c \
64         gstcontrolbinding.c \
65         gstcontrolsource.c \
66         gstdatetime.c           \
67         gstdebugutils.c         \
68         gstdevice.c             \
69         gstdevicemonitor.c      \
70         gstdeviceprovider.c     \
71         gstdeviceproviderfactory.c \
72         gstdynamictypefactory.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_headers_configure)      \
130         $(built_header_make)            \
131         $(built_source_make)
132 # CLEANFILES is for files generated by make
133 CLEANFILES = $(built_header_make) $(built_source_make) $(as_dll_cleanfiles) *.gcno *.gcda *.gcov *.gcov.out
134 # DISTCLEANFILES is for files generated by configure
135 DISTCLEANFILES = $(built_headers_configure)
136
137 libgstreamer_@GST_API_VERSION@_la_CFLAGS =              \
138         -D_GNU_SOURCE                                   \
139         -DGST_EXPORTS                                   \
140         -DG_LOG_DOMAIN=g_log_domain_gstreamer           \
141         -DGST_API_VERSION=\""$(GST_API_VERSION)"\"      \
142         -DGST_DISABLE_DEPRECATED                        \
143         $(VALGRIND_CFLAGS)                              \
144         $(GST_ALL_CFLAGS)
145
146 libgstreamer_@GST_API_VERSION@_la_LIBADD =              \
147         $(GST_PARSE_LA)                                 \
148         $(GST_PRINTF_LA)                                \
149         $(GST_ALL_LIBS)                                 \
150         $(WIN32_LIBS)                                   \
151         $(SOCKET_LIBS)                                  \
152         $(LIBM)
153
154 libgstreamer_@GST_API_VERSION@_la_LDFLAGS =             \
155         $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
156
157 libgstreamer_@GST_API_VERSION@includedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst
158
159 gst_headers =                   \
160         gst.h                   \
161         glib-compat.h           \
162         gstobject.h             \
163         gstallocator.h          \
164         gstbin.h                \
165         gstbuffer.h             \
166         gstbufferlist.h         \
167         gstbufferpool.h         \
168         gstbus.h                \
169         gstcaps.h               \
170         gstcapsfeatures.h       \
171         gstchildproxy.h         \
172         gstclock.h              \
173         gstcompat.h             \
174         gstcontext.h \
175         gstcontrolbinding.h \
176         gstcontrolsource.h \
177         gstdatetime.h           \
178         gstdebugutils.h         \
179         gstelement.h            \
180         gstelementmetadata.h    \
181         gstdevice.h             \
182         gstdeviceprovider.h     \
183         gstdeviceproviderfactory.h \
184         gstdynamictypefactory.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_headers_configure) $(built_header_make)
236
237 noinst_HEADERS =                \
238         gettext.h               \
239         glib-compat-private.h   \
240         gst-i18n-lib.h          \
241         gst-i18n-app.h          \
242         gstelementmetadata.h    \
243         gstpluginloader.h       \
244         gstquark.h              \
245         gstregistrybinary.h     \
246         gstregistrychunks.h     \
247         gsttracerutils.h                \
248         gst_private.h
249
250 gstenumtypes.h: $(gst_headers)
251         $(AM_V_GEN)$(GLIB_MKENUMS) \
252         --fhead "#ifndef __GST_ENUM_TYPES_H__\n#define __GST_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
253         --fprod "\n/* enumerations from \"@filename@\" */\n" \
254         --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
255         --ftail "G_END_DECLS\n\n#endif /* __GST_ENUM_TYPES_H__ */" \
256         $^ > gstenumtypes.h
257
258 gstenumtypes.c: $(gst_headers)
259         $(AM_V_GEN)$(GLIB_MKENUMS) \
260         --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 " \
261         --fprod "\n/* enumerations from \"@filename@\" */" \
262         --vhead "GType\n@enum_name@_get_type (void)\n{\n  static gsize id = 0;\n  static const G@Type@Value values[] = {"     \
263         --vprod "    { C_@TYPE@(@VALUENAME@), \"@VALUENAME@\", \"@valuenick@\" }," \
264         --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}" \
265         $^ > gstenumtypes.c
266
267 %.c.gcov: .libs/libgstreamer_@GST_API_VERSION@_la-%.gcda %.c
268         $(GCOV) -b -f -o $^ > $@.out
269
270 gcov: $(libgstreamer_@GST_API_VERSION@_la_SOURCES:=.gcov)
271
272 if HAVE_INTROSPECTION
273 BUILT_GIRSOURCES = Gst-@GST_API_VERSION@.gir
274
275 gir_headers=$(patsubst %,$(srcdir)/%, $(libgstreamer_@GST_API_VERSION@include_HEADERS))
276 gir_headers+=$(patsubst %,$(builddir)/%, $(built_header_make))
277 gir_headers+=$(patsubst %,$(builddir)/%, gstversion.h)
278 gir_sources=$(patsubst %,$(srcdir)/%, $(libgstreamer_@GST_API_VERSION@_la_SOURCES))
279 gir_sources+=$(patsubst %,$(builddir)/%, $(built_source_make))
280
281 Gst-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstreamer-@GST_API_VERSION@.la
282         $(AM_V_GEN)GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no GI_SCANNER_DISABLE_CACHE=yes \
283                 CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" PKG_CONFIG="$(PKG_CONFIG)" DLLTOOL="$(DLLTOOL)" \
284                 $(INTROSPECTION_SCANNER) -v --namespace Gst \
285                 --nsversion=@GST_API_VERSION@ \
286                 --verbose \
287                 --warn-all \
288                 -I$(top_srcdir) \
289                 -I$(top_builddir) \
290                 -DIN_GOBJECT_INTROSPECTION=1 \
291                 --c-include='gst/gst.h' \
292                 --library=libgstreamer-@GST_API_VERSION@.la \
293                 --include=GLib-2.0 \
294                 --include=GObject-2.0 \
295                 --include=GModule-2.0 \
296                 --libtool="${LIBTOOL}" \
297                 --pkg glib-2.0 \
298                 --pkg gobject-2.0 \
299                 --pkg gmodule-no-export-2.0 \
300                 --pkg-export gstreamer-@GST_API_VERSION@ \
301                 --add-init-section="$(INTROSPECTION_INIT)" \
302                 --output $@ \
303                 $(gir_headers) \
304                 $(gir_sources)
305
306 # INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to
307 # install anything - we need to install inside our prefix.
308 girdir = $(datadir)/gir-1.0
309 gir_DATA = $(BUILT_GIRSOURCES)
310
311 typelibsdir = $(libdir)/girepository-1.0/
312
313 typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
314
315 %.typelib: %.gir $(INTROSPECTION_COMPILER)
316         $(AM_V_GEN)$(INTROSPECTION_COMPILER) --includedir=$(srcdir) --includedir=$(builddir) $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
317
318 CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
319 endif
320
321 # try to prevent packaging errors
322 check-libexecdir-consistency:
323         @if test "${GST_PLUGIN_SCANNER_INSTALLED}" != "${libexecdir}/gstreamer-$(GST_API_VERSION)/gst-plugin-scanner"; then \
324           echo "*** Inconsistent libexecdir! Please use ./configure --libexecdir=/foo/bar"; \
325           echo "*** to set the libexecdir and not make libexecdir=/foo/bar or the like."; \
326           echo "*** The same goes for prefix, libdir etc."; \
327           echo "*** ${GST_PLUGIN_SCANNER_INSTALLED} != ${libexecdir}/gstreamer-$(GST_API_VERSION)/gst-plugin-scanner"; \
328           exit 1; \
329         fi
330
331 all-local: check-libexecdir-consistency