commit binary registry (disabled by default, see #359653)
[platform/upstream/gstreamer.git] / gst / Makefile.am
1 lib_LTLIBRARIES = libgstreamer-@GST_MAJORMINOR@.la
2
3 if GST_DISABLE_LOADSAVE
4 GST_LOADSAVE_SRC = 
5 else
6 GST_LOADSAVE_SRC = gstxml.c
7 endif
8
9 if GST_DISABLE_REGISTRY
10 GST_REGISTRY_SRC = 
11 else
12 GST_REGISTRY_SRC = gstregistryxml.c gstregistrybinary.c
13 endif
14
15 if GST_DISABLE_PARSE
16 GST_PARSE_SRC = 
17 GST_PARSE_H = 
18 SUBDIRS_PARSE = 
19 GST_PARSE_LA = 
20 else
21 GST_PARSE_SRC = gstparse.c
22 GST_PARSE_H = gstparse.h
23 SUBDIRS_PARSE = parse
24 GST_PARSE_LA = parse/libgstparse.la 
25 endif
26
27 if GST_DISABLE_TRACE
28 GST_TRACE_SRC = 
29 else
30 GST_TRACE_SRC = gsttrace.c
31 endif
32
33 if GST_DISABLE_ENUMTYPES
34 GST_ENUMTYPES_SRC = 
35 else
36 GST_ENUMTYPES_SRC = gstenumtypes.c
37 endif
38
39 if GST_DISABLE_INDEX
40 GST_INDEX_SRC = 
41 else
42 GST_INDEX_SRC = gstindex.c gstindexfactory.c
43 endif
44
45 if GST_DISABLE_PLUGIN
46 GST_PLUGIN_SRC = 
47 else
48 GST_PLUGIN_SRC = gstplugin.c
49 endif
50
51 if GST_DISABLE_URI
52 GST_URI_SRC = 
53 else
54 GST_URI_SRC = gsturi.c
55 endif
56
57 SUBDIRS = $(SUBDIRS_PARSE)
58
59 DIST_SUBDIRS = parse
60
61 # make variables for all generated source and header files to make the
62 # distinction clear
63                                                                                 
64 built_header_configure = gstconfig.h gstversion.h
65 built_header_make = gstenumtypes.h gstmarshal.h
66 built_source_make = $(GST_ENUMTYPES_SRC) gstmarshal.c
67
68 EXTRA_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
69         gstmarshal.list gstxml.c gstparse.c gsttrace.c gstregistryxml.c
70
71
72 # temporarily not used
73 #       glib-compat.c
74
75 libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
76         gst.c                   \
77         gstobject.c             \
78         gstbin.c                \
79         gstbuffer.c             \
80         gstbus.c                \
81         gstcaps.c               \
82         gstchildproxy.c         \
83         gstclock.c              \
84         gstelement.c            \
85         gstelementfactory.c     \
86         gsterror.c              \
87         gstevent.c              \
88         gstfilter.c             \
89         gstformat.c             \
90         gstghostpad.c           \
91         $(GST_INDEX_SRC)        \
92         gstinfo.c               \
93         gstinterface.c          \
94         gstiterator.c           \
95         gstmessage.c            \
96         gstminiobject.c         \
97         gstpad.c                \
98         gstpadtemplate.c        \
99         gstpipeline.c           \
100         gstplugin.c             \
101         gstpluginfeature.c      \
102         gstquark.c              \
103         gstquery.c              \
104         gstregistry.c           \
105         gstsegment.c            \
106         gststructure.c          \
107         gstsystemclock.c        \
108         gsttaglist.c            \
109         gsttagsetter.c          \
110         gsttask.c               \
111         $(GST_TRACE_SRC)        \
112         gsttypefind.c           \
113         gsttypefindfactory.c    \
114         $(GST_URI_SRC)          \
115         gstutils.c              \
116         gstvalue.c              \
117         $(GST_PARSE_SRC)        \
118         $(GST_REGISTRY_SRC)     \
119         $(GST_LOADSAVE_SRC)
120
121 # do not put files in the distribution that are generated
122 nodist_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = $(built_source_make)
123
124 # BUILT_SOURCES are built on make all/check/install before all other targets
125 BUILT_SOURCES = \
126         $(built_header_configure)       \
127         $(built_header_make)            \
128         $(built_source_make)
129 # CLEANFILES is for files generated by make
130 CLEANFILES = $(built_header_make) $(built_source_make) $(as_dll_cleanfiles) *.gcno *.gcda *.gcov *.gcov.out
131 # DISTCLEANFILES is for files generated by configure
132 DISTCLEANFILES = $(built_header_configure)
133                                                                                 
134 libgstreamer_@GST_MAJORMINOR@_la_CFLAGS =               \
135         -D_GNU_SOURCE                                   \
136         -DG_LOG_DOMAIN=g_log_domain_gstreamer           \
137         -DGST_MAJORMINOR=\""$(GST_MAJORMINOR)"\"        \
138         -DGST_DISABLE_DEPRECATED                        \
139         $(VALGRIND_CFLAGS)                              \
140         $(GST_ALL_CFLAGS)
141
142 libgstreamer_@GST_MAJORMINOR@_la_LIBADD =               \
143         $(GST_PARSE_LA)                                 \
144         $(GST_ALL_LIBS)                                 \
145         $(XML_LIBS)
146
147 libgstreamer_@GST_MAJORMINOR@_la_LDFLAGS =              \
148         $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
149
150 libgstreamer_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst
151
152 gst_headers =                   \
153         gst.h                   \
154         glib-compat.h           \
155         gstobject.h             \
156         gstbin.h                \
157         gstbuffer.h             \
158         gstbus.h                \
159         gstcaps.h               \
160         gstchildproxy.h         \
161         gstclock.h              \
162         gstcompat.h             \
163         gstelement.h            \
164         gstelementfactory.h     \
165         gsterror.h              \
166         gstevent.h              \
167         gstfilter.h             \
168         gstformat.h             \
169         gstghostpad.h           \
170         gstindex.h              \
171         gstindexfactory.h       \
172         gstinfo.h               \
173         gstinterface.h          \
174         gstiterator.h           \
175         gstmacros.h             \
176         gstmessage.h            \
177         gstminiobject.h         \
178         gstpad.h                \
179         gstpadtemplate.h        \
180         gstpipeline.h           \
181         gstplugin.h             \
182         gstpluginfeature.h      \
183         gstquery.h              \
184         gstsegment.h            \
185         gststructure.h          \
186         gstsystemclock.h        \
187         gsttaglist.h            \
188         gsttagsetter.h          \
189         gsttask.h               \
190         gsttrace.h              \
191         gsttypefind.h           \
192         gsttypefindfactory.h    \
193         gsturi.h                \
194         gstutils.h              \
195         gstvalue.h              \
196         gstregistry.h           \
197         $(GST_PARSE_H)          \
198         gstxml.h
199
200 libgstreamer_@GST_MAJORMINOR@include_HEADERS = $(gst_headers)
201 nodist_libgstreamer_@GST_MAJORMINOR@include_HEADERS = \
202         $(built_header_configure) $(built_header_make)
203
204 EXTRA_DIST = \
205         gstparse.h
206
207 noinst_HEADERS =                \
208         gettext.h               \
209         glib-compat-private.h   \
210         gst-i18n-lib.h          \
211         gst-i18n-app.h          \
212         gstquark.h              \
213         gstregistrybinary.h     \
214         gst_private.h
215
216 gstmarshal.h: gstmarshal.list
217         glib-genmarshal --header --prefix=gst_marshal $(srcdir)/gstmarshal.list > gstmarshal.h.tmp
218         mv gstmarshal.h.tmp gstmarshal.h
219
220 gstmarshal.c: gstmarshal.list gst_private.h
221         echo "#include \"gst_private.h\"" > gstmarshal.c.tmp
222         echo "#include \"glib-object.h\"" >> gstmarshal.c.tmp
223         echo "#include \"gstmarshal.h\"" >> gstmarshal.c.tmp
224         glib-genmarshal --body --prefix=gst_marshal $(srcdir)/gstmarshal.list >> 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 "\n/* 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_private.h\"\n#include <gst/gst.h>\n#define C_ENUM(v) ((gint) v)\n#define C_FLAGS(v) ((guint) v)\n " \
238         --fprod "\n/* enumerations from \"@filename@\" */" \
239         --vhead "static void\nregister_@enum_name@ (GType* id)\n{\n  static const G@Type@Value values[] = {"     \
240         --vprod "    { C_@TYPE@(@VALUENAME@), \"@VALUENAME@\", \"@valuenick@\" }," \
241         --vtail "    { 0, NULL, NULL }\n  };\n  *id = g_@type@_register_static (\"@EnumName@\", values);\n}\nGType\n@enum_name@_get_type (void)\n{\n  static GType id;\n  static GOnce once = G_ONCE_INIT;\n\n  g_once (&once, (GThreadFunc)register_@enum_name@, &id);\n  return id;\n}\n" \
242         $^ > gstenumtypes.c
243
244 %.c.gcov: .libs/libgstreamer_@GST_MAJORMINOR@_la-%.gcda %.c
245         $(GCOV) -b -f -o $^ > $@.out
246
247 gcov: $(libgstreamer_@GST_MAJORMINOR@_la_SOURCES:=.gcov)