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