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