configure.ac: Add checks for poll, ppoll and pselect.
[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         gstpoll.c               \
106         gstquark.c              \
107         gstquery.c              \
108         gstregistry.c           \
109         gstsegment.c            \
110         gststructure.c          \
111         gstsystemclock.c        \
112         gsttaglist.c            \
113         gsttagsetter.c          \
114         gsttask.c               \
115         $(GST_TRACE_SRC)        \
116         gsttypefind.c           \
117         gsttypefindfactory.c    \
118         $(GST_URI_SRC)          \
119         gstutils.c              \
120         gstvalue.c              \
121         gstparse.c              \
122         $(GST_REGISTRY_SRC)     \
123         $(GST_LOADSAVE_SRC)
124
125 # do not put files in the distribution that are generated
126 nodist_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = $(built_source_make)
127
128 # BUILT_SOURCES are built on make all/check/install before all other targets
129 BUILT_SOURCES = \
130         $(built_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)
137
138 libgstreamer_@GST_MAJORMINOR@_la_CFLAGS =               \
139         -D_GNU_SOURCE                                   \
140         -DG_LOG_DOMAIN=g_log_domain_gstreamer           \
141         -DGST_MAJORMINOR=\""$(GST_MAJORMINOR)"\"        \
142         -DGST_DISABLE_DEPRECATED                        \
143         $(VALGRIND_CFLAGS)                              \
144         $(GST_ALL_CFLAGS)
145
146 libgstreamer_@GST_MAJORMINOR@_la_LIBADD =               \
147         $(GST_PARSE_LA)                                 \
148         $(GST_ALL_LIBS)                                 \
149         $(XML_LIBS)
150
151 libgstreamer_@GST_MAJORMINOR@_la_LDFLAGS =              \
152         $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
153
154 libgstreamer_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst
155
156 gst_headers =                   \
157         gst.h                   \
158         glib-compat.h           \
159         gstobject.h             \
160         gstbin.h                \
161         gstbuffer.h             \
162         gstbus.h                \
163         gstcaps.h               \
164         gstchildproxy.h         \
165         gstclock.h              \
166         gstcompat.h             \
167         gstdebugutils.h         \
168         gstelement.h            \
169         gstelementfactory.h     \
170         gsterror.h              \
171         gstevent.h              \
172         gstfilter.h             \
173         gstformat.h             \
174         gstghostpad.h           \
175         gstindex.h              \
176         gstindexfactory.h       \
177         gstinfo.h               \
178         gstinterface.h          \
179         gstiterator.h           \
180         gstmacros.h             \
181         gstmessage.h            \
182         gstminiobject.h         \
183         gstpad.h                \
184         gstpadtemplate.h        \
185         gstparamspecs.h         \
186         gstpipeline.h           \
187         gstplugin.h             \
188         gstpluginfeature.h      \
189         gstpoll.h               \
190         gstquery.h              \
191         gstsegment.h            \
192         gststructure.h          \
193         gstsystemclock.h        \
194         gsttaglist.h            \
195         gsttagsetter.h          \
196         gsttask.h               \
197         gsttrace.h              \
198         gsttypefind.h           \
199         gsttypefindfactory.h    \
200         gsturi.h                \
201         gstutils.h              \
202         gstvalue.h              \
203         gstregistry.h           \
204         gstparse.h              \
205         gstxml.h
206
207 libgstreamer_@GST_MAJORMINOR@include_HEADERS = $(gst_headers)
208 nodist_libgstreamer_@GST_MAJORMINOR@include_HEADERS = \
209         $(built_header_configure) $(built_header_make)
210
211 noinst_HEADERS =                \
212         gettext.h               \
213         glib-compat-private.h   \
214         gst-i18n-lib.h          \
215         gst-i18n-app.h          \
216         gstquark.h              \
217         gstregistrybinary.h     \
218         gst_private.h
219
220 gstmarshal.h: gstmarshal.list
221         glib-genmarshal --header --prefix=gst_marshal $(srcdir)/gstmarshal.list > gstmarshal.h.tmp
222         mv gstmarshal.h.tmp gstmarshal.h
223
224 gstmarshal.c: gstmarshal.list gst_private.h
225         echo "#include \"gst_private.h\"" > gstmarshal.c.tmp
226         echo "#include \"glib-object.h\"" >> gstmarshal.c.tmp
227         echo "#include \"gstmarshal.h\"" >> gstmarshal.c.tmp
228         glib-genmarshal --body --prefix=gst_marshal $(srcdir)/gstmarshal.list >> gstmarshal.c.tmp
229         mv gstmarshal.c.tmp gstmarshal.c
230
231 gstenumtypes.h: $(gst_headers)
232         glib-mkenums \
233         --fhead "#ifndef __GST_ENUM_TYPES_H__\n#define __GST_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
234         --fprod "\n/* enumerations from \"@filename@\" */\n" \
235         --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
236         --ftail "G_END_DECLS\n\n#endif /* __GST_ENUM_TYPES_H__ */" \
237         $^ > gstenumtypes.h
238
239 gstenumtypes.c: $(gst_headers)
240         glib-mkenums \
241         --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 " \
242         --fprod "\n/* enumerations from \"@filename@\" */" \
243         --vhead "static void\nregister_@enum_name@ (GType* id)\n{\n  static const G@Type@Value values[] = {"     \
244         --vprod "    { C_@TYPE@(@VALUENAME@), \"@VALUENAME@\", \"@valuenick@\" }," \
245         --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" \
246         $^ > gstenumtypes.c
247
248 %.c.gcov: .libs/libgstreamer_@GST_MAJORMINOR@_la-%.gcda %.c
249         $(GCOV) -b -f -o $^ > $@.out
250
251 gcov: $(libgstreamer_@GST_MAJORMINOR@_la_SOURCES:=.gcov)