Added segment helper structure and methods. Not fully implemented yet.
[platform/upstream/gstreamer.git] / gst / Makefile.am
1 lib_LTLIBRARIES = libgstreamer-@GST_MAJORMINOR@.la
2
3 if HAVE_CHECK
4 SUBDIRS_CHECK = check
5 else
6 SUBDIRS_CHECK =
7 endif
8
9 if GST_DISABLE_LOADSAVE
10 GST_LOADSAVE_SRC = 
11 else
12 GST_LOADSAVE_SRC = gstxml.c
13 endif
14
15 if GST_DISABLE_PARSE
16 GST_PARSE_SRC = 
17 SUBDIRS_PARSE = 
18 GST_PARSE_LA = 
19 else
20 GST_PARSE_SRC = gstparse.c
21 SUBDIRS_PARSE = parse
22 GST_PARSE_LA = parse/libgstparse.la 
23 endif
24
25 if GST_DISABLE_TRACE
26 GST_TRACE_SRC = 
27 else
28 GST_TRACE_SRC = gsttrace.c
29 endif
30
31 if GST_DISABLE_ENUMTYPES
32 GST_ENUMTYPES_SRC = 
33 else
34 GST_ENUMTYPES_SRC = gstenumtypes.c
35 endif
36
37 if GST_DISABLE_INDEX
38 GST_INDEX_SRC = 
39 SUBDIRS_INDEX =
40 else
41 GST_INDEX_SRC = gstindex.c gstindexfactory.c
42 SUBDIRS_INDEX = indexers
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 if GST_DISABLE_NET
58 SUBDIRS_NET = 
59 else
60 SUBDIRS_NET = net
61 endif
62
63 SUBDIRS = \
64         $(SUBDIRS_PARSE) \
65         . \
66         base \
67         elements \
68         $(SUBDIRS_INDEX) \
69         $(SUBDIRS_NET) \
70         $(SUBDIRS_CHECK)
71
72 DIST_SUBDIRS = base elements parse indexers net check
73
74 # make variables for all generated source and header files to make the
75 # distinction clear
76                                                                                 
77 built_header_configure = gstconfig.h gstversion.h
78 built_header_make = gstenumtypes.h gstmarshal.h
79 built_source_make = $(GST_ENUMTYPES_SRC) gstmarshal.c
80
81 EXTRA_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
82         gstmarshal.list gstxml.c gstparse.c gsttrace.c
83
84 libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
85         glib-compat.c           \
86         gst.c                   \
87         gstobject.c             \
88         gstbin.c                \
89         gstbuffer.c             \
90         gstbus.c                \
91         gstcaps.c               \
92         gstchildproxy.c         \
93         gstclock.c              \
94         gstelement.c            \
95         gstelementfactory.c     \
96         gsterror.c              \
97         gstevent.c              \
98         gstfilter.c             \
99         gstformat.c             \
100         gstghostpad.c           \
101         $(GST_INDEX_SRC)        \
102         gstinfo.c               \
103         gstinterface.c          \
104         gstiterator.c           \
105         gstmessage.c            \
106         gstminiobject.c         \
107         gstpad.c                \
108         gstpadtemplate.c        \
109         gstpipeline.c           \
110         gstplugin.c             \
111         gstpluginfeature.c      \
112         gstquery.c              \
113         gstqueue.c              \
114         gstregistry.c           \
115         gstregistryxml.c        \
116         gstsegment.c            \
117         gststructure.c          \
118         gstsystemclock.c        \
119         gsttaglist.c            \
120         gsttagsetter.c          \
121         gsttask.c               \
122         $(GST_TRACE_SRC)        \
123         gsttypefind.c           \
124         gsttypefindfactory.c    \
125         $(GST_URI_SRC)          \
126         gsturitype.c            \
127         gstutils.c              \
128         gstvalue.c              \
129         $(GST_PARSE_SRC)        \
130         $(GSTARCH_SRCS)         \
131         $(GST_LOADSAVE_SRC)
132
133 # do not put files in the distribution that are generated
134 nodist_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = $(built_source_make)
135
136 # BUILT_SOURCES are built on make all/check/install before all other targets
137 BUILT_SOURCES = \
138         $(built_header_configure)       \
139         $(built_header_make)            \
140         $(built_source_make)
141 # CLEANFILES is for files generated by make
142 CLEANFILES = $(built_header_make) $(built_source_make) $(as_dll_cleanfiles)
143 # DISTCLEANFILES is for files generated by configure
144 DISTCLEANFILES = $(built_header_configure)
145                                                                                 
146 libgstreamer_@GST_MAJORMINOR@_la_CFLAGS =               \
147         -D_GNU_SOURCE                                   \
148         -DG_LOG_DOMAIN=g_log_domain_gstreamer           \
149         -DGST_MAJORMINOR=\""$(GST_MAJORMINOR)"\"        \
150         -DGST_DISABLE_DEPRECATED                        \
151         $(VALGRIND_CFLAGS)                              \
152         $(GST_ALL_CFLAGS)
153
154 libgstreamer_@GST_MAJORMINOR@_la_LIBADD =               \
155         $(GST_PARSE_LA)                                 \
156         $(GST_ALL_LIBS)                                 \
157         $(XML_LIBS)
158
159 libgstreamer_@GST_MAJORMINOR@_la_LDFLAGS =              \
160         $(GST_LT_LDFLAGS)                               \
161         $(GST_ALL_LDFLAGS)
162
163 libgstreamer_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst
164
165 gst_headers =                   \
166         gst.h                   \
167         gstobject.h             \
168         gstbin.h                \
169         gstbuffer.h             \
170         gstbus.h                \
171         gstcaps.h               \
172         gstchildproxy.h         \
173         gstclock.h              \
174         gstcompat.h             \
175         gstelement.h            \
176         gstelementfactory.h     \
177         gsterror.h              \
178         gstevent.h              \
179         gstfilter.h             \
180         gstformat.h             \
181         gstghostpad.h           \
182         gstindex.h              \
183         gstindexfactory.h       \
184         gstinfo.h               \
185         gstinterface.h          \
186         gstiterator.h           \
187         gstmacros.h             \
188         gstmessage.h            \
189         gstminiobject.h         \
190         gstpad.h                \
191         gstpadtemplate.h        \
192         gstpipeline.h           \
193         gstplugin.h             \
194         gstpluginfeature.h      \
195         gstquery.h              \
196         gstqueue.h              \
197         gstsegment.h            \
198         gststructure.h          \
199         gstsystemclock.h        \
200         gsttaglist.h            \
201         gsttagsetter.h          \
202         gsttask.h               \
203         gsttrace.h              \
204         gsttypefind.h           \
205         gsttypefindfactory.h    \
206         gsturi.h                \
207         gsturitype.h            \
208         gstutils.h              \
209         gstvalue.h              \
210         gstregistry.h           \
211         gstparse.h              \
212         gstxml.h
213
214 libgstreamer_@GST_MAJORMINOR@include_HEADERS = $(gst_headers)
215 nodist_libgstreamer_@GST_MAJORMINOR@include_HEADERS = \
216         $(built_header_configure) $(built_header_make)
217
218 noinst_HEADERS =                \
219         gettext.h               \
220         glib-compat.h           \
221         gst-i18n-lib.h          \
222         gst-i18n-app.h          \
223         gst_private.h
224
225 gstmarshal.h: gstmarshal.list
226         glib-genmarshal --header --prefix=gst_marshal $(srcdir)/gstmarshal.list > gstmarshal.h.tmp
227         mv gstmarshal.h.tmp gstmarshal.h
228
229 gstmarshal.c: gstmarshal.list gst_private.h
230         echo "#include \"gst_private.h\"" > gstmarshal.c.tmp
231         echo "#include \"glib-object.h\"" >> gstmarshal.c.tmp
232         echo "#include \"gstmarshal.h\"" >> gstmarshal.c.tmp
233         glib-genmarshal --body --prefix=gst_marshal $(srcdir)/gstmarshal.list >> gstmarshal.c.tmp
234         mv gstmarshal.c.tmp gstmarshal.c
235
236 gstenumtypes.h: $(gst_headers)
237         glib-mkenums \
238         --fhead "#ifndef __GST_ENUM_TYPES_H__\n#define __GST_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
239         --fprod "\n/* enumerations from \"@filename@\" */\n" \
240         --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
241         --ftail "G_END_DECLS\n\n#endif /* __GST_ENUM_TYPES_H__ */" \
242         $^ > gstenumtypes.h
243
244 gstenumtypes.c: $(gst_headers)
245         glib-mkenums \
246         --fhead "#include \"gst_private.h\"\n#include <gst/gst.h>" \
247         --fprod "\n/* enumerations from \"@filename@\" */" \
248         --vhead "static void\nregister_@enum_name@ (GType* id)\n{\n  static const G@Type@Value values[] = {"     \
249         --vprod "    { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
250         --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" \
251         $^ > gstenumtypes.c