569fbd15c3b48fcbcb158f76501208e7a9826f7b
[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_PARSE
19 GST_PARSE_SRC = 
20 GST_PARSE_DIRS = 
21 GST_PARSE_LIBADD = 
22 else
23 GST_PARSE_SRC = gstparse.c
24 GST_PARSE_DIRS = parse
25 GST_PARSE_LIBADD = parse/libgstparse.la 
26 endif
27
28 if GST_DISABLE_TRACE
29 GST_TRACE_SRC = 
30 else
31 GST_TRACE_SRC = gsttrace.c
32 endif
33
34 if GST_DISABLE_REGISTRY
35 GST_REGISTRY_SRC = 
36 GST_REGISTRY_DIRS =
37 GST_REGISTRY_LIBADD = 
38 else
39 GST_REGISTRY_SRC = gstregistry.c
40 GST_REGISTRY_DIRS = registries
41 GST_REGISTRY_LIBADD = registries/libgstxmlregistry.la
42 endif
43
44 if GST_DISABLE_ENUMTYPES
45 GST_ENUMTYPES_SRC = 
46 else
47 GST_ENUMTYPES_SRC = gstenumtypes.c
48 endif
49
50 if GST_DISABLE_INDEX
51 GST_INDEX_SRC = 
52 GST_INDEX_DIRS =
53 else
54 GST_INDEX_SRC = gstindex.c
55 GST_INDEX_DIRS = indexers
56 endif
57
58 if GST_DISABLE_PLUGIN
59 GST_PLUGIN_SRC = 
60 else
61 GST_PLUGIN_SRC = gstplugin.c
62 endif
63
64 if GST_DISABLE_URI
65 GST_URI_SRC = 
66 else
67 GST_URI_SRC = gsturi.c
68 endif
69
70 EXTRA_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = gstcpuid_i386.s gstmarshal.list gstxml.c gstparse.c gsttrace.c
71
72 SUBDIRS = $(GST_PARSE_DIRS) $(GST_REGISTRY_DIRS) . autoplug elements schedulers $(GST_INDEX_DIRS) 
73 DIST_SUBDIRS = autoplug elements parse registries schedulers indexers
74
75 libgstreamer_@GST_MAJORMINOR@_la_SOURCES =              \
76         gst.c                   \
77         $(GST_ENUMTYPES_SRC)    \
78         gstobject.c             \
79         gstatomic.c             \
80         gstbin.c                \
81         gstbuffer.c             \
82         gstcaps.c               \
83         gstclock.c              \
84         gstcpu.c                \
85         gstdata.c               \
86         gstelement.c            \
87         gstelementfactory.c     \
88         gsterror.c              \
89         gstevent.c              \
90         gstfilter.c             \
91         gstformat.c             \
92         $(GST_INDEX_SRC)        \
93         gstinfo.c               \
94         gstinterface.c          \
95         gstmemchunk.c           \
96         gstpad.c                \
97         gstpipeline.c           \
98         gstplugin.c             \
99         gstpluginfeature.c      \
100         gstprobe.c              \
101         gstqueue.c              \
102         gstquery.c              \
103         gstscheduler.c          \
104         gststructure.c          \
105         gstsystemclock.c        \
106         gsttag.c                \
107         gsttaginterface.c       \
108         gstthread.c             \
109         gstthreaddummy.c        \
110         $(GST_TRACE_SRC)        \
111         gsttrashstack.c         \
112         gsttypefind.c           \
113         $(GST_URI_SRC)          \
114         gsturitype.c            \
115         gstutils.c              \
116         gstvalue.c              \
117         $(GST_REGISTRY_SRC)     \
118         gstregistrypool.c       \
119         $(GST_PARSE_SRC)        \
120         $(GSTARCH_SRCS)         \
121         $(GST_LOADSAVE_SRC)
122
123 nodist_libgstreamer_@GST_MAJORMINOR@_la_SOURCES =               \
124         gstmarshal.c
125
126 BUILT_SOURCES = gstversion.h gstconfig.h gstmarshal.h gstmarshal.c gstenumtypes.h $(GST_ENUMTYPES_SRC) 
127 CLEANFILES = gstmarshal.h gstmarshal.c gstenumtypes.h $(GST_ENUMTYPES_SRC)
128 DISTCLEANFILES = gstversion.h gstconfig.h
129
130 libgstreamer_@GST_MAJORMINOR@_la_CFLAGS = -D_GNU_SOURCE \
131         $(GST_CFLAGS) \
132         -DG_LOG_DOMAIN=g_log_domain_gstreamer \
133         -DGST_MAJORMINOR=\""$(GST_MAJORMINOR)"\" 
134 libgstreamer_@GST_MAJORMINOR@_la_LIBADD = $(LIBGST_LIBS) $(GST_PARSE_LIBADD) $(GST_REGISTRY_LIBADD)
135 libgstreamer_@GST_MAJORMINOR@_la_LDFLAGS = @GST_LT_LDFLAGS@ -version-info @GST_LIBVERSION@ 
136
137
138 libgstreamer_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst
139
140 gst_headers =                   \
141         gst.h                   \
142         gstatomic.h             \
143         gstobject.h             \
144         gstbin.h                \
145         gstbuffer.h             \
146         gstcaps.h               \
147         gstclock.h              \
148         gstcompat.h             \
149         gstcpu.h                \
150         gstdata.h               \
151         gstelement.h            \
152         gsterror.h              \
153         gstevent.h              \
154         gstfilter.h             \
155         gstformat.h             \
156         gstindex.h              \
157         gstinfo.h               \
158         gstinterface.h          \
159         gstlog.h                \
160         gstmacros.h             \
161         gstmemchunk.h           \
162         gstpad.h                \
163         gstpipeline.h           \
164         gstplugin.h             \
165         gstpluginfeature.h      \
166         gstprobe.h              \
167         gstqueue.h              \
168         gstquery.h              \
169         gstscheduler.h          \
170         gststructure.h          \
171         gstsystemclock.h        \
172         gsttag.h                \
173         gsttaginterface.h       \
174         gstthread.h             \
175         gsttrace.h              \
176         gsttrashstack.h         \
177         gsttypefind.h           \
178         gsttypes.h              \
179         gsturi.h                \
180         gsturitype.h            \
181         gstutils.h              \
182         gstvalue.h              \
183         gstregistry.h           \
184         gstregistrypool.h       \
185         gstparse.h              \
186         gstxml.h
187
188 libgstreamer_@GST_MAJORMINOR@include_HEADERS = $(gst_headers)
189 nodist_libgstreamer_@GST_MAJORMINOR@include_HEADERS = \
190         gstconfig.h             \
191         gstversion.h            \
192         gstmarshal.h            \
193         gstenumtypes.h
194
195 noinst_HEADERS =                \
196         gettext.h               \
197         gst-i18n-lib.h          \
198         gst-i18n-app.h          \
199         gst_private.h           \
200         gstatomic_impl.h        \
201         gstdata_private.h       \
202         gstarch.h               \
203         cothreads.h             
204
205 # the compiler shoots cothreads.c in the head at -O6
206 libcothreads_la_SOURCES = cothreads.c
207 libcothreads_la_CFLAGS = $(libgstreamer_@GST_MAJORMINOR@_la_CFLAGS) 
208
209
210 gstmarshal.h: gstmarshal.list
211         glib-genmarshal --header --prefix=gst_marshal $^ > gstmarshal.h.tmp
212         mv gstmarshal.h.tmp gstmarshal.h
213
214 gstmarshal.c: gstmarshal.list
215         echo "#include \"glib-object.h\"" >gstmarshal.c.tmp
216         echo "#include \"gstlog.h\"" >> gstmarshal.c.tmp
217         echo "#include \"gstmarshal.h\"" >> gstmarshal.c.tmp
218         glib-genmarshal --body --prefix=gst_marshal $^ >> gstmarshal.c.tmp
219         mv gstmarshal.c.tmp gstmarshal.c
220
221 gstenumtypes.h: $(gst_headers)
222         glib-mkenums \
223         --fhead "#ifndef __GST_ENUM_TYPES_H__\n#define __GST_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
224         --fprod "/* enumerations from \"@filename@\" */\n" \
225         --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
226         --ftail "G_END_DECLS\n\n#endif /* __GST_ENUM_TYPES_H__ */" \
227         $^ > gstenumtypes.h
228
229 gstenumtypes.c: $(gst_headers)
230         glib-mkenums \
231         --fhead "#include <gst/gst.h>" \
232         --fprod "\n/* enumerations from \"@filename@\" */" \
233         --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[] = {"     \
234         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
235         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
236         $^ > gstenumtypes.c
237
238 EXTRA_DIST = ROADMAP