taskpool: add new object to manage threads
[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_PLUGIN
34 GST_PLUGIN_SRC =
35 else
36 GST_PLUGIN_SRC = gstplugin.c
37 endif
38
39 SUBDIRS = $(SUBDIRS_PARSE)
40
41 DIST_SUBDIRS = parse
42
43 # make variables for all generated source and header files to make the
44 # distinction clear
45
46 built_header_configure = gstconfig.h gstversion.h
47 built_header_make = gstenumtypes.h gstmarshal.h
48 built_source_make = gstenumtypes.c gstmarshal.c
49
50 EXTRA_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
51         gstmarshal.list gsttrace.c gstxml.c \
52         gstregistryxml.c gstregistrybinary.c
53
54
55 # temporarily not used
56 #       glib-compat.c
57
58 libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
59         gst.c                   \
60         gstobject.c             \
61         gstbin.c                \
62         gstbuffer.c             \
63         gstbus.c                \
64         gstcaps.c               \
65         gstchildproxy.c         \
66         gstclock.c              \
67         gstdebugutils.c         \
68         gstelement.c            \
69         gstelementfactory.c     \
70         gsterror.c              \
71         gstevent.c              \
72         gstfilter.c             \
73         gstformat.c             \
74         gstghostpad.c           \
75         gstindex.c              \
76         gstindexfactory.c       \
77         gstinfo.c               \
78         gstinterface.c          \
79         gstiterator.c           \
80         gstmessage.c            \
81         gstminiobject.c         \
82         gstpad.c                \
83         gstpadtemplate.c        \
84         gstparamspecs.c         \
85         gstpipeline.c           \
86         gstplugin.c             \
87         gstpluginfeature.c      \
88         gstpoll.c               \
89         gstpreset.c             \
90         gstquark.c              \
91         gstquery.c              \
92         gstregistry.c           \
93         gstsegment.c            \
94         gststructure.c          \
95         gstsystemclock.c        \
96         gsttaglist.c            \
97         gsttagsetter.c          \
98         gsttask.c               \
99         gsttaskpool.c           \
100         $(GST_TRACE_SRC)        \
101         gsttypefind.c           \
102         gsttypefindfactory.c    \
103         gsturi.c                \
104         gstutils.c              \
105         gstvalue.c              \
106         gstparse.c              \
107         $(GST_REGISTRY_SRC)     \
108         $(GST_LOADSAVE_SRC)
109
110 # do not put files in the distribution that are generated
111 nodist_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = $(built_source_make)
112
113 # BUILT_SOURCES are built on make all/check/install before all other targets
114 BUILT_SOURCES = \
115         $(built_header_configure)       \
116         $(built_header_make)            \
117         $(built_source_make)
118 # CLEANFILES is for files generated by make
119 CLEANFILES = $(built_header_make) $(built_source_make) $(as_dll_cleanfiles) *.gcno *.gcda *.gcov *.gcov.out
120 # DISTCLEANFILES is for files generated by configure
121 DISTCLEANFILES = $(built_header_configure)
122
123 libgstreamer_@GST_MAJORMINOR@_la_CFLAGS =               \
124         -D_GNU_SOURCE                                   \
125         -DGST_EXPORTS                                   \
126         -DG_LOG_DOMAIN=g_log_domain_gstreamer           \
127         -DGST_MAJORMINOR=\""$(GST_MAJORMINOR)"\"        \
128         -DGST_DISABLE_DEPRECATED                        \
129         $(VALGRIND_CFLAGS)                              \
130         $(GST_ALL_CFLAGS)
131
132 libgstreamer_@GST_MAJORMINOR@_la_LIBADD =               \
133         $(GST_PARSE_LA)                                 \
134         $(GST_ALL_LIBS)                                 \
135         $(WIN32_LIBS)                                   \
136         $(XML_LIBS)
137
138 libgstreamer_@GST_MAJORMINOR@_la_LDFLAGS =              \
139         $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS) $(LIBM)
140
141 libgstreamer_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst
142
143 gst_headers =                   \
144         gst.h                   \
145         glib-compat.h           \
146         gstobject.h             \
147         gstbin.h                \
148         gstbuffer.h             \
149         gstbus.h                \
150         gstcaps.h               \
151         gstchildproxy.h         \
152         gstclock.h              \
153         gstcompat.h             \
154         gstdebugutils.h         \
155         gstelement.h            \
156         gstelementfactory.h     \
157         gsterror.h              \
158         gstevent.h              \
159         gstfilter.h             \
160         gstformat.h             \
161         gstghostpad.h           \
162         gstindex.h              \
163         gstindexfactory.h       \
164         gstinfo.h               \
165         gstinterface.h          \
166         gstiterator.h           \
167         gstmacros.h             \
168         gstmessage.h            \
169         gstminiobject.h         \
170         gstpad.h                \
171         gstpadtemplate.h        \
172         gstparamspecs.h         \
173         gstpipeline.h           \
174         gstplugin.h             \
175         gstpluginfeature.h      \
176         gstpoll.h               \
177         gstpreset.h             \
178         gstquery.h              \
179         gstsegment.h            \
180         gststructure.h          \
181         gstsystemclock.h        \
182         gsttaglist.h            \
183         gsttagsetter.h          \
184         gsttask.h               \
185         gsttaskpool.h           \
186         gsttrace.h              \
187         gsttypefind.h           \
188         gsttypefindfactory.h    \
189         gsturi.h                \
190         gstutils.h              \
191         gstvalue.h              \
192         gstregistry.h           \
193         gstparse.h              \
194         gstxml.h
195
196 libgstreamer_@GST_MAJORMINOR@include_HEADERS = $(gst_headers)
197 nodist_libgstreamer_@GST_MAJORMINOR@include_HEADERS = \
198         $(built_header_configure) $(built_header_make)
199
200 noinst_HEADERS =                \
201         gettext.h               \
202         glib-compat-private.h   \
203         gst-i18n-lib.h          \
204         gst-i18n-app.h          \
205         gstquark.h              \
206         gstregistrybinary.h     \
207         gst_private.h
208
209 gstmarshal.h: gstmarshal.list
210         glib-genmarshal --header --prefix=gst_marshal $(srcdir)/gstmarshal.list > gstmarshal.h.tmp
211         mv gstmarshal.h.tmp gstmarshal.h
212
213 gstmarshal.c: gstmarshal.list gst_private.h
214         echo "#include \"gst_private.h\"" > gstmarshal.c.tmp
215         echo "#include \"glib-object.h\"" >> gstmarshal.c.tmp
216         echo "#include \"gstmarshal.h\"" >> gstmarshal.c.tmp
217         glib-genmarshal --body --prefix=gst_marshal $(srcdir)/gstmarshal.list >> gstmarshal.c.tmp
218         mv gstmarshal.c.tmp gstmarshal.c
219
220 gstenumtypes.h: $(gst_headers)
221         glib-mkenums \
222         --fhead "#ifndef __GST_ENUM_TYPES_H__\n#define __GST_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
223         --fprod "\n/* enumerations from \"@filename@\" */\n" \
224         --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
225         --ftail "G_END_DECLS\n\n#endif /* __GST_ENUM_TYPES_H__ */" \
226         $^ > gstenumtypes.h
227
228 gstenumtypes.c: $(gst_headers)
229         glib-mkenums \
230         --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 " \
231         --fprod "\n/* enumerations from \"@filename@\" */" \
232         --vhead "GType\n@enum_name@_get_type (void)\n{\n  static gsize id = 0;\n  static const G@Type@Value values[] = {"     \
233         --vprod "    { C_@TYPE@(@VALUENAME@), \"@VALUENAME@\", \"@valuenick@\" }," \
234         --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}" \
235         $^ > gstenumtypes.c
236
237 %.c.gcov: .libs/libgstreamer_@GST_MAJORMINOR@_la-%.gcda %.c
238         $(GCOV) -b -f -o $^ > $@.out
239
240 gcov: $(libgstreamer_@GST_MAJORMINOR@_la_SOURCES:=.gcov)