Allow dumping pipelines as dot graphs. Fixes #456573.
[platform/upstream/gstreamer.git] / gst / Makefile.am
1 lib_LTLIBRARIES = libgstreamer-@GST_MAJORMINOR@.la
2
3 if GST_DISABLE_LOADSAVE
4 GST_LOADSAVE_SRC =
5 else
6 GST_LOADSAVE_SRC = gstxml.c
7 endif
8
9 if GST_DISABLE_REGISTRY
10 GST_REGISTRY_SRC =
11 else
12 if USE_BINARY_REGISTRY
13 GST_REGISTRY_SRC = gstregistrybinary.c
14 else
15 GST_REGISTRY_SRC = gstregistryxml.c
16 endif
17 endif
18
19 if GST_DISABLE_PARSE
20 SUBDIRS_PARSE =
21 GST_PARSE_LA =
22 else
23 SUBDIRS_PARSE = parse
24 GST_PARSE_LA = parse/libgstparse.la
25 endif
26
27 if GST_DISABLE_TRACE
28 GST_TRACE_SRC =
29 else
30 GST_TRACE_SRC = gsttrace.c
31 endif
32
33 if GST_DISABLE_ENUMTYPES
34 GST_ENUMTYPES_SRC =
35 else
36 GST_ENUMTYPES_SRC = gstenumtypes.c
37 endif
38
39 if GST_DISABLE_INDEX
40 GST_INDEX_SRC =
41 else
42 GST_INDEX_SRC = gstindex.c gstindexfactory.c
43 endif
44
45 if GST_DISABLE_PLUGIN
46 GST_PLUGIN_SRC =
47 else
48 GST_PLUGIN_SRC = gstplugin.c
49 endif
50
51 if GST_DISABLE_URI
52 GST_URI_SRC =
53 else
54 GST_URI_SRC = gsturi.c
55 endif
56
57 SUBDIRS = $(SUBDIRS_PARSE)
58
59 DIST_SUBDIRS = parse
60
61 # make variables for all generated source and header files to make the
62 # distinction clear
63
64 built_header_configure = gstconfig.h gstversion.h
65 built_header_make = gstenumtypes.h gstmarshal.h
66 built_source_make = $(GST_ENUMTYPES_SRC) gstmarshal.c
67
68 EXTRA_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
69         gstmarshal.list gsttrace.c gstxml.c \
70         gstregistryxml.c gstregistrybinary.c
71
72
73 # temporarily not used
74 #       glib-compat.c
75
76 libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
77         gst.c                   \
78         gstobject.c             \
79         gstbin.c                \
80         gstbuffer.c             \
81         gstbus.c                \
82         gstcaps.c               \
83         gstchildproxy.c         \
84         gstclock.c              \
85         gstdebugutils.c         \
86         gstelement.c            \
87         gstelementfactory.c     \
88         gsterror.c              \
89         gstevent.c              \
90         gstfilter.c             \
91         gstformat.c             \
92         gstghostpad.c           \
93         $(GST_INDEX_SRC)        \
94         gstinfo.c               \
95         gstinterface.c          \
96         gstiterator.c           \
97         gstmessage.c            \
98         gstminiobject.c         \
99         gstpad.c                \
100         gstpadtemplate.c        \
101         gstparamspecs.c         \
102         gstpipeline.c           \
103         gstplugin.c             \
104         gstpluginfeature.c      \
105         gstquark.c              \
106         gstquery.c              \
107         gstregistry.c           \
108         gstsegment.c            \
109         gststructure.c          \
110         gstsystemclock.c        \
111         gsttaglist.c            \
112         gsttagsetter.c          \
113         gsttask.c               \
114         $(GST_TRACE_SRC)        \
115         gsttypefind.c           \
116         gsttypefindfactory.c    \
117         $(GST_URI_SRC)          \
118         gstutils.c              \
119         gstvalue.c              \
120         gstparse.c              \
121         $(GST_REGISTRY_SRC)     \
122         $(GST_LOADSAVE_SRC)
123
124 # do not put files in the distribution that are generated
125 nodist_libgstreamer_@GST_MAJORMINOR@_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_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_header_configure)
136
137 libgstreamer_@GST_MAJORMINOR@_la_CFLAGS =               \
138         -D_GNU_SOURCE                                   \
139         -DG_LOG_DOMAIN=g_log_domain_gstreamer           \
140         -DGST_MAJORMINOR=\""$(GST_MAJORMINOR)"\"        \
141         -DGST_DISABLE_DEPRECATED                        \
142         $(VALGRIND_CFLAGS)                              \
143         $(GST_ALL_CFLAGS)
144
145 libgstreamer_@GST_MAJORMINOR@_la_LIBADD =               \
146         $(GST_PARSE_LA)                                 \
147         $(GST_ALL_LIBS)                                 \
148         $(XML_LIBS)
149
150 libgstreamer_@GST_MAJORMINOR@_la_LDFLAGS =              \
151         $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
152
153 libgstreamer_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst
154
155 gst_headers =                   \
156         gst.h                   \
157         glib-compat.h           \
158         gstobject.h             \
159         gstbin.h                \
160         gstbuffer.h             \
161         gstbus.h                \
162         gstcaps.h               \
163         gstchildproxy.h         \
164         gstclock.h              \
165         gstcompat.h             \
166         gstdebugutils.h         \
167         gstelement.h            \
168         gstelementfactory.h     \
169         gsterror.h              \
170         gstevent.h              \
171         gstfilter.h             \
172         gstformat.h             \
173         gstghostpad.h           \
174         gstindex.h              \
175         gstindexfactory.h       \
176         gstinfo.h               \
177         gstinterface.h          \
178         gstiterator.h           \
179         gstmacros.h             \
180         gstmessage.h            \
181         gstminiobject.h         \
182         gstpad.h                \
183         gstpadtemplate.h        \
184         gstparamspecs.h         \
185         gstpipeline.h           \
186         gstplugin.h             \
187         gstpluginfeature.h      \
188         gstquery.h              \
189         gstsegment.h            \
190         gststructure.h          \
191         gstsystemclock.h        \
192         gsttaglist.h            \
193         gsttagsetter.h          \
194         gsttask.h               \
195         gsttrace.h              \
196         gsttypefind.h           \
197         gsttypefindfactory.h    \
198         gsturi.h                \
199         gstutils.h              \
200         gstvalue.h              \
201         gstregistry.h           \
202         gstparse.h              \
203         gstxml.h
204
205 libgstreamer_@GST_MAJORMINOR@include_HEADERS = $(gst_headers)
206 nodist_libgstreamer_@GST_MAJORMINOR@include_HEADERS = \
207         $(built_header_configure) $(built_header_make)
208
209 noinst_HEADERS =                \
210         gettext.h               \
211         glib-compat-private.h   \
212         gst-i18n-lib.h          \
213         gst-i18n-app.h          \
214         gstquark.h              \
215         gstregistrybinary.h     \
216         gst_private.h
217
218 gstmarshal.h: gstmarshal.list
219         glib-genmarshal --header --prefix=gst_marshal $(srcdir)/gstmarshal.list > gstmarshal.h.tmp
220         mv gstmarshal.h.tmp gstmarshal.h
221
222 gstmarshal.c: gstmarshal.list gst_private.h
223         echo "#include \"gst_private.h\"" > gstmarshal.c.tmp
224         echo "#include \"glib-object.h\"" >> gstmarshal.c.tmp
225         echo "#include \"gstmarshal.h\"" >> gstmarshal.c.tmp
226         glib-genmarshal --body --prefix=gst_marshal $(srcdir)/gstmarshal.list >> gstmarshal.c.tmp
227         mv gstmarshal.c.tmp gstmarshal.c
228
229 gstenumtypes.h: $(gst_headers)
230         glib-mkenums \
231         --fhead "#ifndef __GST_ENUM_TYPES_H__\n#define __GST_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
232         --fprod "\n/* enumerations from \"@filename@\" */\n" \
233         --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
234         --ftail "G_END_DECLS\n\n#endif /* __GST_ENUM_TYPES_H__ */" \
235         $^ > gstenumtypes.h
236
237 gstenumtypes.c: $(gst_headers)
238         glib-mkenums \
239         --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 " \
240         --fprod "\n/* enumerations from \"@filename@\" */" \
241         --vhead "static void\nregister_@enum_name@ (GType* id)\n{\n  static const G@Type@Value values[] = {"     \
242         --vprod "    { C_@TYPE@(@VALUENAME@), \"@VALUENAME@\", \"@valuenick@\" }," \
243         --vtail "    { 0, NULL, NULL }\n  };\n  *id = g_@type@_register_static (\"@EnumName@\", values);\n}\nGType\n@enum_name@_get_type (void)\n{\n  static GType id;\n  static GOnce once = G_ONCE_INIT;\n\n  g_once (&once, (GThreadFunc)register_@enum_name@, &id);\n  return id;\n}\n" \
244         $^ > gstenumtypes.c
245
246 %.c.gcov: .libs/libgstreamer_@GST_MAJORMINOR@_la-%.gcda %.c
247         $(GCOV) -b -f -o $^ > $@.out
248
249 gcov: $(libgstreamer_@GST_MAJORMINOR@_la_SOURCES:=.gcov)