New typefind system: bytestream is now part of the core all plugins have been modifie...
[platform/upstream/gstreamer.git] / gst / Makefile.am
1 lib_LTLIBRARIES = libgstreamer-@GST_MAJORMINOR@.la
2 noinst_LTLIBRARIES = libcothreads.la
3
4 if HAVE_CPU_I386
5 GSTARCH_SRCS = gstcpuid_i386.s
6 else
7 GSTARCH_SRCS = 
8 endif
9
10 #GST_INSTRUMENT_FLAGS = -finstrument-functions -DGST_ENABLE_FUNC_INSTRUMENTATION
11
12 if GST_DISABLE_LOADSAVE
13 GST_LOADSAVE_SRC = 
14 else
15 GST_LOADSAVE_SRC = gstxml.c
16 endif
17
18 if GST_DISABLE_TYPEFIND
19 GST_TYPEFIND_SRC =
20 else
21 GST_TYPEFIND_SRC = gsttypefind.c
22 endif
23
24 if GST_DISABLE_AUTOPLUG
25 GST_AUTOPLUG_SRC =
26 GST_AUTOPLUG_DIRS =
27 else
28 GST_AUTOPLUG_SRC = gstautoplug.c
29 GST_AUTOPLUG_DIRS = autoplug
30 endif
31
32 if GST_DISABLE_PARSE
33 GST_PARSE_SRC = 
34 GST_PARSE_DIRS = 
35 GST_PARSE_LIBADD = 
36 else
37 GST_PARSE_SRC = gstparse.c
38 GST_PARSE_DIRS = parse
39 GST_PARSE_LIBADD = parse/libgstparse.la 
40 endif
41
42 if GST_DISABLE_TRACE
43 GST_TRACE_SRC = 
44 else
45 GST_TRACE_SRC = gsttrace.c
46 endif
47
48 if GST_DISABLE_REGISTRY
49 GST_REGISTRY_SRC = 
50 GST_REGISTRY_DIRS =
51 GST_REGISTRY_LIBADD = 
52 else
53 GST_REGISTRY_SRC = gstregistry.c
54 GST_REGISTRY_DIRS = registries
55 GST_REGISTRY_LIBADD = registries/libgstxmlregistry.la
56 endif
57
58 if GST_DISABLE_ENUMTYPES
59 GST_ENUMTYPES_SRC = 
60 else
61 GST_ENUMTYPES_SRC = gstenumtypes.c
62 endif
63
64 if GST_DISABLE_INDEX
65 GST_INDEX_SRC = 
66 GST_INDEX_DIRS =
67 else
68 GST_INDEX_SRC = gstindex.c
69 GST_INDEX_DIRS = indexers
70 endif
71
72 if GST_DISABLE_PLUGIN
73 GST_PLUGIN_SRC = 
74 else
75 GST_PLUGIN_SRC = gstplugin.c
76 endif
77
78 if GST_DISABLE_URI
79 GST_URI_SRC = 
80 else
81 GST_URI_SRC = gsturi.c
82 endif
83
84 EXTRA_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = gstcpuid_i386.s gstmarshal.list gstxml.c gsttypefind.c gstparse.c gstautoplug.c gsttrace.c
85
86 SUBDIRS = $(GST_PARSE_DIRS) $(GST_REGISTRY_DIRS) . $(GST_AUTOPLUG_DIRS) elements schedulers types $(GST_INDEX_DIRS) 
87 DIST_SUBDIRS = autoplug elements parse registries schedulers types indexers
88
89 libgstreamer_@GST_MAJORMINOR@_la_SOURCES =              \
90         gst.c                   \
91         gstmarshal.c            \
92         $(GST_ENUMTYPES_SRC)    \
93         gstobject.c             \
94         gstatomic.c             \
95         $(GST_AUTOPLUG_SRC)     \
96         gstbin.c                \
97         gstbuffer.c             \
98         gstbufferpool-default.c \
99         gstbytestream.c         \
100         gstcaps.c               \
101         gstclock.c              \
102         gstcpu.c                \
103         gstdata.c               \
104         gstelement.c            \
105         gstelementfactory.c     \
106         gstevent.c              \
107         gstfilter.c             \
108         gstformat.c             \
109         $(GST_INDEX_SRC)        \
110         gstinfo.c               \
111         gstinterface.c          \
112         gstmemchunk.c           \
113         gstpad.c                \
114         gstpipeline.c           \
115         gstplugin.c             \
116         gstpluginfeature.c      \
117         gstprobe.c              \
118         gstprops.c              \
119         gstqueue.c              \
120         gstquery.c              \
121         gstscheduler.c          \
122         gstsystemclock.c        \
123         gstthread.c             \
124         gstthreaddummy.c        \
125         $(GST_TRACE_SRC)        \
126         gsttrashstack.c         \
127         gsttype.c               \
128         $(GST_TYPEFIND_SRC)     \
129         $(GST_URI_SRC)          \
130         gsturitype.c            \
131         gstutils.c              \
132         $(GST_REGISTRY_SRC)     \
133         gstregistrypool.c       \
134         $(GST_PARSE_SRC)        \
135         $(GSTARCH_SRCS)         \
136         $(GST_LOADSAVE_SRC)
137
138
139 BUILT_SOURCES = gstversion.h gstconfig.h gstmarshal.h gstmarshal.c gstenumtypes.h $(GST_ENUMTYPES_SRC) 
140
141 libgstreamer_@GST_MAJORMINOR@_la_CFLAGS = -D_GNU_SOURCE \
142         $(GST_CFLAGS) \
143         -DG_LOG_DOMAIN=g_log_domain_gstreamer \
144         -DGST_CACHE_DIR=\""$(GST_CACHE_DIR)"\" \
145         -DGST_MAJORMINOR=\""$(GST_MAJORMINOR)"\" 
146 libgstreamer_@GST_MAJORMINOR@_la_LIBADD = $(LIBGST_LIBS) $(GST_PARSE_LIBADD) $(GST_REGISTRY_LIBADD)
147 libgstreamer_@GST_MAJORMINOR@_la_LDFLAGS = @GST_LT_LDFLAGS@ -version-info @GST_LIBVERSION@ 
148
149
150 libgstreamer_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst
151
152 gst_headers =                   \
153         gst.h                   \
154         gstatomic.h             \
155         gstobject.h             \
156         gsttypes.h              \
157         gstautoplug.h           \
158         gstbin.h                \
159         gstbuffer.h             \
160         gstbufferpool-default.h \
161         gstbytestream.h         \
162         gstcaps.h               \
163         gstclock.h              \
164         gstcompat.h             \
165         gstcpu.h                \
166         gstdata.h               \
167         gstelement.h            \
168         gstevent.h              \
169         gstfilter.h             \
170         gstformat.h             \
171         gstindex.h              \
172         gstinfo.h               \
173         gstinterface.h          \
174         gstlog.h                \
175         gstmacros.h             \
176         gstmemchunk.h           \
177         gstpad.h                \
178         gstpipeline.h           \
179         gstplugin.h             \
180         gstpluginfeature.h      \
181         gstprobe.h              \
182         gstprops.h              \
183         gstqueue.h              \
184         gstquery.h              \
185         gstscheduler.h          \
186         gstsystemclock.h        \
187         gstthread.h             \
188         gsttrace.h              \
189         gsttrashstack.h         \
190         gsttype.h               \
191         gsttypefind.h           \
192         gsturi.h                \
193         gsturitype.h            \
194         gstutils.h              \
195         gstregistry.h           \
196         gstregistrypool.h       \
197         gstparse.h              \
198         gstxml.h
199
200 built_headers =                 \
201         gstconfig.h             \
202         gstversion.h            \
203         gstmarshal.h            \
204         gstenumtypes.h
205
206 libgstreamer_@GST_MAJORMINOR@include_HEADERS = $(gst_headers) $(built_headers)
207
208 noinst_HEADERS =                \
209         gst_private.h           \
210         gstatomic_impl.h        \
211         gstdata_private.h       \
212         gstarch.h               \
213         cothreads.h             
214
215 # the compiler shoots cothreads.c in the head at -O6
216 libcothreads_la_SOURCES = cothreads.c
217 libcothreads_la_CFLAGS = $(libgstreamer_@GST_MAJORMINOR@_la_CFLAGS) 
218
219
220 gstmarshal.h: gstmarshal.list
221         glib-genmarshal --header --prefix=gst_marshal $^ > gstmarshal.h.tmp
222         mv gstmarshal.h.tmp gstmarshal.h
223
224 gstmarshal.c: gstmarshal.list
225         echo "#include \"glib-object.h\"" >gstmarshal.c.tmp
226         echo "#include \"gstlog.h\"" >> gstmarshal.c.tmp
227         echo "#include \"gstmarshal.h\"" >> gstmarshal.c.tmp
228         glib-genmarshal --body --prefix=gst_marshal $^ >> 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 "/* 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/gst.h>" \
242         --fprod "\n/* enumerations from \"@filename@\" */" \
243         --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[] = {"     \
244         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
245         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
246         $^ > gstenumtypes.c
247
248 # Don't want the generated marshal files in the dist
249 dist-hook:
250         rm -f $(distdir)/gstmarshal.c $(distdir)/gstmarshal.h
251
252 # Clean generated files
253 distclean-local:
254         rm -f $(top_builddir)/gst/gstmarshal.c $(top_builddir)/gst/gstmarshal.h
255
256 EXTRA_DIST = ROADMAP