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