adding back RELEASE clean up disting of built files
[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 SUBDIRS = $(GST_PARSE_DIRS) $(GST_REGISTRY_DIRS) . autoplug elements schedulers $(GST_INDEX_DIRS) 
71 DIST_SUBDIRS = autoplug elements parse registries schedulers indexers
72
73 # make variables for all generated source and header files to make the
74 # distinction clear
75                                                                                 
76 built_header_configure = gstconfig.h gstversion.h
77 built_header_make = gstenumtypes.h gstmarshal.h
78 built_source_make = $(GST_ENUMTYPES_SRC) gstmarshal.c
79
80 EXTRA_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
81         gstcpuid_i386.s gstmarshal.list gstxml.c gstparse.c gsttrace.c
82
83 libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
84         gst.c                   \
85         gstobject.c             \
86         gstatomic.c             \
87         gstbin.c                \
88         gstbuffer.c             \
89         gstcaps.c               \
90         gstclock.c              \
91         gstcpu.c                \
92         gstdata.c               \
93         gstelement.c            \
94         gstelementfactory.c     \
95         gsterror.c              \
96         gstevent.c              \
97         gstfilter.c             \
98         gstformat.c             \
99         $(GST_INDEX_SRC)        \
100         gstinfo.c               \
101         gstinterface.c          \
102         gstmemchunk.c           \
103         gstpad.c                \
104         gstpipeline.c           \
105         gstplugin.c             \
106         gstpluginfeature.c      \
107         gstprobe.c              \
108         gstqueue.c              \
109         gstquery.c              \
110         gstscheduler.c          \
111         gststructure.c          \
112         gstsystemclock.c        \
113         gsttag.c                \
114         gsttaginterface.c       \
115         gstthread.c             \
116         gstthreaddummy.c        \
117         $(GST_TRACE_SRC)        \
118         gsttrashstack.c         \
119         gsttypefind.c           \
120         $(GST_URI_SRC)          \
121         gsturitype.c            \
122         gstutils.c              \
123         gstvalue.c              \
124         $(GST_REGISTRY_SRC)     \
125         gstregistrypool.c       \
126         $(GST_PARSE_SRC)        \
127         $(GSTARCH_SRCS)         \
128         $(GST_LOADSAVE_SRC)
129
130 # do not put files in the distribution that are generated
131 nodist_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = $(built_source_make)
132
133 # BUILT_SOURCES are built on make all/check/install before all other targets
134 BUILT_SOURCES = \
135         $(built_header_configure)       \
136         $(built_header_make)            \
137         $(built_source_make)
138 # CLEANFILES is for files generated by make
139 CLEANFILES = $(built_header_make) $(built_source_make)
140 # DISTCLEANFILES is for files generated by configure
141 DISTCLEANFILES = $(built_header_configure)
142                                                                                 
143 libgstreamer_@GST_MAJORMINOR@_la_CFLAGS = \
144         -D_GNU_SOURCE                           \
145         $(GST_CFLAGS)                           \
146         -DG_LOG_DOMAIN=g_log_domain_gstreamer   \
147         -DGST_MAJORMINOR=\""$(GST_MAJORMINOR)"\" 
148 libgstreamer_@GST_MAJORMINOR@_la_LIBADD = \
149         $(LIBGST_LIBS) $(GST_PARSE_LIBADD) $(GST_REGISTRY_LIBADD)
150 libgstreamer_@GST_MAJORMINOR@_la_LDFLAGS = \
151         @GST_LT_LDFLAGS@ -version-info @GST_LIBVERSION@ 
152
153
154 libgstreamer_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst
155
156 gst_headers =                   \
157         gst.h                   \
158         gstatomic.h             \
159         gstobject.h             \
160         gstbin.h                \
161         gstbuffer.h             \
162         gstcaps.h               \
163         gstclock.h              \
164         gstcompat.h             \
165         gstcpu.h                \
166         gstdata.h               \
167         gstelement.h            \
168         gsterror.h              \
169         gstevent.h              \
170         gstfilter.h             \
171         gstformat.h             \
172         gstindex.h              \
173         gstinfo.h               \
174         gstinterface.h          \
175         gstlog.h                \
176         gstmacros.h             \
177         gstmemchunk.h           \
178         gstpad.h                \
179         gstpipeline.h           \
180         gstplugin.h             \
181         gstpluginfeature.h      \
182         gstprobe.h              \
183         gstqueue.h              \
184         gstquery.h              \
185         gstscheduler.h          \
186         gststructure.h          \
187         gstsystemclock.h        \
188         gsttag.h                \
189         gsttaginterface.h       \
190         gstthread.h             \
191         gsttrace.h              \
192         gsttrashstack.h         \
193         gsttypefind.h           \
194         gsttypes.h              \
195         gsturi.h                \
196         gsturitype.h            \
197         gstutils.h              \
198         gstvalue.h              \
199         gstregistry.h           \
200         gstregistrypool.h       \
201         gstparse.h              \
202         gstxml.h
203
204 libgstreamer_@GST_MAJORMINOR@include_HEADERS = $(gst_headers)
205 nodist_libgstreamer_@GST_MAJORMINOR@include_HEADERS = \
206         $(built_header_configure) $(built_header_make)
207
208 noinst_HEADERS =                \
209         gettext.h               \
210         gst-i18n-lib.h          \
211         gst-i18n-app.h          \
212         gst_private.h           \
213         gstatomic_impl.h        \
214         gstdata_private.h       \
215         gstarch.h               \
216         cothreads.h             
217
218 # the compiler shoots cothreads.c in the head at -O6
219 libcothreads_la_SOURCES = cothreads.c
220 libcothreads_la_CFLAGS = $(libgstreamer_@GST_MAJORMINOR@_la_CFLAGS) 
221
222
223 gstmarshal.h: gstmarshal.list
224         glib-genmarshal --header --prefix=gst_marshal $^ > gstmarshal.h.tmp
225         mv gstmarshal.h.tmp gstmarshal.h
226
227 gstmarshal.c: gstmarshal.list
228         echo "#include \"glib-object.h\"" >gstmarshal.c.tmp
229         echo "#include \"gstlog.h\"" >> gstmarshal.c.tmp
230         echo "#include \"gstmarshal.h\"" >> gstmarshal.c.tmp
231         glib-genmarshal --body --prefix=gst_marshal $^ >> gstmarshal.c.tmp
232         mv gstmarshal.c.tmp gstmarshal.c
233
234 gstenumtypes.h: $(gst_headers)
235         glib-mkenums \
236         --fhead "#ifndef __GST_ENUM_TYPES_H__\n#define __GST_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
237         --fprod "/* enumerations from \"@filename@\" */\n" \
238         --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
239         --ftail "G_END_DECLS\n\n#endif /* __GST_ENUM_TYPES_H__ */" \
240         $^ > gstenumtypes.h
241
242 gstenumtypes.c: $(gst_headers)
243         glib-mkenums \
244         --fhead "#include <gst/gst.h>" \
245         --fprod "\n/* enumerations from \"@filename@\" */" \
246         --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[] = {"     \
247         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
248         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
249         $^ > gstenumtypes.c
250
251 EXTRA_DIST = ROADMAP