77a38aba8199f979aa17e28edcdd792a951e956b
[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         $(GST_AUTOPLUG_SRC)     \
95         gstatomic.c             \
96         gstbin.c                \
97         gstbuffer.c             \
98         gstbufferpool-default.c \
99         gstcaps.c               \
100         gstclock.c              \
101         gstcpu.c                \
102         gstdata.c               \
103         gstelement.c            \
104         gstelementfactory.c     \
105         gstevent.c              \
106         gstfilter.c             \
107         gstformat.c             \
108         $(GST_INDEX_SRC)        \
109         gstinfo.c               \
110         gstmemchunk.c           \
111         gstpad.c                \
112         gstpipeline.c           \
113         gstplugin.c             \
114         gstpluginfeature.c      \
115         gstprobe.c              \
116         gstprops.c              \
117         gstqueue.c              \
118         gstquery.c              \
119         gstscheduler.c          \
120         gstsystemclock.c        \
121         gstthread.c             \
122         gstthreaddummy.c        \
123         $(GST_TRACE_SRC)        \
124         gsttrashstack.c         \
125         gsttype.c               \
126         $(GST_TYPEFIND_SRC)     \
127         $(GST_URI_SRC)          \
128         gsturitype.c            \
129         gstutils.c              \
130         $(GST_REGISTRY_SRC)     \
131         gstregistrypool.c       \
132         $(GST_PARSE_SRC)        \
133         $(GSTARCH_SRCS)         \
134         $(GST_LOADSAVE_SRC)
135
136
137 BUILT_SOURCES = gstmarshal.h gstmarshal.c gstenumtypes.h $(GST_ENUMTYPES_SRC) 
138
139 libgstreamer_@GST_MAJORMINOR@_la_CFLAGS = -D_GNU_SOURCE \
140         $(GST_CFLAGS) \
141         -DG_LOG_DOMAIN=g_log_domain_gstreamer \
142         -DGST_CACHE_DIR=\""$(GST_CACHE_DIR)"\" \
143         -DGST_MAJORMINOR=\""$(GST_MAJORMINOR)"\" 
144 libgstreamer_@GST_MAJORMINOR@_la_LIBADD = $(LIBGST_LIBS) $(GST_PARSE_LIBADD) $(GST_REGISTRY_LIBADD)
145 libgstreamer_@GST_MAJORMINOR@_la_LDFLAGS = @GST_LT_LDFLAGS@ -version-info @GST_LIBVERSION@ 
146
147
148 libgstreamer_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst
149
150 gst_headers =                   \
151         gst.h                   \
152         gstatomic.h             \
153         gstconfig.h             \
154         gstobject.h             \
155         gsttypes.h              \
156         gstautoplug.h           \
157         gstbin.h                \
158         gstbuffer.h             \
159         gstbufferpool-default.h \
160         gstcaps.h               \
161         gstclock.h              \
162         gstcompat.h             \
163         gstcpu.h                \
164         gstdata.h               \
165         gstelement.h            \
166         gstevent.h              \
167         gstfilter.h             \
168         gstformat.h             \
169         gstindex.h              \
170         gstinfo.h               \
171         gstlog.h                \
172         gstmacros.h             \
173         gstmemchunk.h           \
174         gstpad.h                \
175         gstpipeline.h           \
176         gstplugin.h             \
177         gstpluginfeature.h      \
178         gstprobe.h              \
179         gstprops.h              \
180         gstqueue.h              \
181         gstquery.h              \
182         gstscheduler.h          \
183         gstsystemclock.h        \
184         gstthread.h             \
185         gsttrace.h              \
186         gsttrashstack.h         \
187         gsttype.h               \
188         gsttypefind.h           \
189         gsturi.h                \
190         gsturitype.h            \
191         gstutils.h              \
192         gstregistry.h           \
193         gstregistrypool.h       \
194         gstparse.h              \
195         gstxml.h
196
197 built_headers =                 \
198         gstversion.h            \
199         gstmarshal.h            \
200         gstenumtypes.h
201
202 libgstreamer_@GST_MAJORMINOR@include_HEADERS = $(gst_headers) $(built_headers)
203
204 noinst_HEADERS =                \
205         gst_private.h           \
206         gstatomic_impl.h        \
207         gstdata_private.h       \
208         gstarch.h               \
209         cothreads.h             
210
211 # the compiler shoots cothreads.c in the head at -O6
212 libcothreads_la_SOURCES = cothreads.c
213 libcothreads_la_CFLAGS = $(libgstreamer_@GST_MAJORMINOR@_la_CFLAGS) 
214
215
216 gstmarshal.h: gstmarshal.list
217         glib-genmarshal --header --prefix=gst_marshal $^ > gstmarshal.h.tmp
218         mv gstmarshal.h.tmp gstmarshal.h
219
220 gstmarshal.c: gstmarshal.list
221         echo "#include \"glib-object.h\"" >gstmarshal.c.tmp
222         echo "#include \"gstlog.h\"" >> gstmarshal.c.tmp
223         echo "#include \"gstmarshal.h\"" >> gstmarshal.c.tmp
224         glib-genmarshal --body --prefix=gst_marshal $^ >> gstmarshal.c.tmp
225         mv gstmarshal.c.tmp gstmarshal.c
226
227 gstenumtypes.h: $(gst_headers)
228         glib-mkenums \
229         --fhead "#ifndef __GST_ENUM_TYPES_H__\n#define __GST_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
230         --fprod "/* enumerations from \"@filename@\" */\n" \
231         --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
232         --ftail "G_END_DECLS\n\n#endif /* __GST_ENUM_TYPES_H__ */" \
233         $^ > gstenumtypes.h
234
235 gstenumtypes.c: $(gst_headers)
236         glib-mkenums \
237         --fhead "#include <gst/gst.h>" \
238         --fprod "\n/* enumerations from \"@filename@\" */" \
239         --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[] = {"     \
240         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
241         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
242         $^ > gstenumtypes.c
243
244 # Don't want the generated marshal files in the dist
245 dist-hook:
246         rm -f $(distdir)/gstmarshal.c $(distdir)/gstmarshal.h
247
248 # Clean generated files
249 distclean-local:
250         rm -f $(top_builddir)/gst/gstmarshal.c $(top_builddir)/gst/gstmarshal.h
251
252 EXTRA_DIST = ROADMAP