gst/gstutils.c: RPAD fixes all around.
[platform/upstream/gstreamer.git] / gst / Makefile.am
1 lib_LTLIBRARIES = libgstreamer-@GST_MAJORMINOR@.la
2 noinst_LTLIBRARIES =
3
4 #GST_INSTRUMENT_FLAGS = -finstrument-functions -DGST_ENABLE_FUNC_INSTRUMENTATION
5
6 if GST_DISABLE_LOADSAVE
7 GST_LOADSAVE_SRC = 
8 else
9 GST_LOADSAVE_SRC = gstxml.c
10 endif
11
12 if GST_DISABLE_PARSE
13 GST_PARSE_SRC = 
14 GST_PARSE_DIRS = 
15 GST_PARSE_LA = 
16 else
17 GST_PARSE_SRC = gstparse.c
18 GST_PARSE_DIRS = parse
19 GST_PARSE_LA = parse/libgstparse.la 
20 endif
21
22 if GST_DISABLE_TRACE
23 GST_TRACE_SRC = 
24 else
25 GST_TRACE_SRC = gsttrace.c
26 endif
27
28 if GST_DISABLE_REGISTRY
29 GST_REGISTRY_SRC = 
30 GST_REGISTRY_DIRS =
31 GST_REGISTRY_LA = 
32 else
33 GST_REGISTRY_SRC = gstregistry.c
34 GST_REGISTRY_DIRS = registries
35 GST_REGISTRY_LA = registries/libgstxmlregistry.la
36 endif
37
38 if GST_DISABLE_ENUMTYPES
39 GST_ENUMTYPES_SRC = 
40 else
41 GST_ENUMTYPES_SRC = gstenumtypes.c
42 endif
43
44 if GST_DISABLE_INDEX
45 GST_INDEX_SRC = 
46 GST_INDEX_DIRS =
47 else
48 GST_INDEX_SRC = gstindex.c
49 GST_INDEX_DIRS = indexers
50 endif
51
52 if GST_DISABLE_PLUGIN
53 GST_PLUGIN_SRC = 
54 else
55 GST_PLUGIN_SRC = gstplugin.c
56 endif
57
58 if GST_DISABLE_URI
59 GST_URI_SRC = 
60 else
61 GST_URI_SRC = gsturi.c
62 endif
63
64 SUBDIRS = $(GST_PARSE_DIRS) $(GST_REGISTRY_DIRS) . base elements schedulers $(GST_INDEX_DIRS) 
65 DIST_SUBDIRS = base elements parse registries schedulers indexers
66
67 # make variables for all generated source and header files to make the
68 # distinction clear
69                                                                                 
70 built_header_configure = gstconfig.h gstversion.h
71 built_header_make = gstenumtypes.h gstmarshal.h
72 built_source_make = $(GST_ENUMTYPES_SRC) gstmarshal.c
73
74 EXTRA_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
75         gstmarshal.list gstxml.c gstparse.c gsttrace.c
76
77 libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
78         gst.c                   \
79         gstobject.c             \
80         gstbin.c                \
81         gstbuffer.c             \
82         gstbus.c                \
83         gstcaps.c               \
84         gstclock.c              \
85         gstelement.c            \
86         gstelementfactory.c     \
87         gsterror.c              \
88         gstevent.c              \
89         gstfilter.c             \
90         gstformat.c             \
91         gstghostpad.c           \
92         $(GST_INDEX_SRC)        \
93         gstinfo.c               \
94         gstinterface.c          \
95         gstiterator.c           \
96         gstmemchunk.c           \
97         gstmessage.c            \
98         gstminiobject.c         \
99         gstpad.c                \
100         gstpipeline.c           \
101         gstplugin.c             \
102         gstpluginfeature.c      \
103         gstprobe.c              \
104         gstquery.c              \
105         gstqueryutils.c         \
106         gstqueue.c              \
107         gstscheduler.c          \
108         gststructure.c          \
109         gstsystemclock.c        \
110         gsttag.c                \
111         gsttaginterface.c       \
112         gsttask.c               \
113         $(GST_TRACE_SRC)        \
114         gsttrashstack.c         \
115         gsttypefind.c           \
116         $(GST_URI_SRC)          \
117         gsturitype.c            \
118         gstutils.c              \
119         gstvalue.c              \
120         $(GST_REGISTRY_SRC)     \
121         gstregistrypool.c       \
122         $(GST_PARSE_SRC)        \
123         $(GSTARCH_SRCS)         \
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)
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         $(GST_LIB_CFLAGS)                       \
142         -DG_LOG_DOMAIN=g_log_domain_gstreamer   \
143         -DGST_MAJORMINOR=\""$(GST_MAJORMINOR)"\" 
144 libgstreamer_@GST_MAJORMINOR@_la_LIBADD = \
145         $(GST_LIB_LIBS) $(GST_PARSE_LA) $(GST_REGISTRY_LA)
146 libgstreamer_@GST_MAJORMINOR@_la_LDFLAGS = \
147         @GST_LT_LDFLAGS@ -version-info @GST_LIBVERSION@ \
148         -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*
149
150 libgstreamer_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst
151
152 gst_headers =                   \
153         gst.h                   \
154         gstobject.h             \
155         gstbin.h                \
156         gstbuffer.h             \
157         gstbus.h                \
158         gstcaps.h               \
159         gstclock.h              \
160         gstcompat.h             \
161         gstelement.h            \
162         gstelementfactory.h     \
163         gsterror.h              \
164         gstevent.h              \
165         gstfilter.h             \
166         gstformat.h             \
167         gstghostpad.h           \
168         gstindex.h              \
169         gstinfo.h               \
170         gstinterface.h          \
171         gstiterator.h           \
172         gstmacros.h             \
173         gstmemchunk.h           \
174         gstmessage.h            \
175         gstminiobject.h         \
176         gstpad.h                \
177         gstpipeline.h           \
178         gstplugin.h             \
179         gstpluginfeature.h      \
180         gstprobe.h              \
181         gstquery.h              \
182         gstqueryutils.h         \
183         gstqueue.h              \
184         gstscheduler.h          \
185         gststructure.h          \
186         gstsystemclock.h        \
187         gsttag.h                \
188         gsttaginterface.h       \
189         gsttask.h               \
190         gsttrace.h              \
191         gsttrashstack.h         \
192         gsttypefind.h           \
193         gsttypes.h              \
194         gsturi.h                \
195         gsturitype.h            \
196         gstutils.h              \
197         gstvalue.h              \
198         gstregistry.h           \
199         gstregistrypool.h       \
200         gstparse.h              \
201         gstxml.h
202
203 libgstreamer_@GST_MAJORMINOR@include_HEADERS = $(gst_headers)
204 nodist_libgstreamer_@GST_MAJORMINOR@include_HEADERS = \
205         $(built_header_configure) $(built_header_make)
206
207 noinst_HEADERS =                \
208         gettext.h               \
209         gst-i18n-lib.h          \
210         gst-i18n-app.h          \
211         gst_private.h           \
212         gstarch.h               \
213         cothreads.h             
214
215 gstmarshal.h: gstmarshal.list
216         glib-genmarshal --header --prefix=gst_marshal $(srcdir)/gstmarshal.list > gstmarshal.h.tmp
217         mv gstmarshal.h.tmp gstmarshal.h
218
219 gstmarshal.c: gstmarshal.list gst_private.h
220         echo "#include \"gst_private.h\"" > gstmarshal.c.tmp
221         echo "#include \"glib-object.h\"" >> gstmarshal.c.tmp
222         echo "#include \"gstmarshal.h\"" >> gstmarshal.c.tmp
223         glib-genmarshal --body --prefix=gst_marshal $(srcdir)/gstmarshal.list >> gstmarshal.c.tmp
224         mv gstmarshal.c.tmp gstmarshal.c
225
226 gstenumtypes.h: $(gst_headers)
227         glib-mkenums \
228         --fhead "#ifndef __GST_ENUM_TYPES_H__\n#define __GST_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
229         --fprod "/* enumerations from \"@filename@\" */\n" \
230         --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
231         --ftail "G_END_DECLS\n\n#endif /* __GST_ENUM_TYPES_H__ */" \
232         $^ > gstenumtypes.h
233
234 gstenumtypes.c: $(gst_headers)
235         glib-mkenums \
236         --fhead "#include \"gst_private.h\"\n#include <gst/gst.h>" \
237         --fprod "\n/* enumerations from \"@filename@\" */" \
238         --vhead "GType\n@enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G@Type@Value values[] = {"     \
239         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
240         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
241         $^ > gstenumtypes.c