configure.ac: Add DATADIR for storing presets.
[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 if USE_BINARY_REGISTRY
13 GST_REGISTRY_SRC = gstregistrybinary.c
14 else
15 GST_REGISTRY_SRC = gstregistryxml.c
16 endif
17 endif
18
19 if GST_DISABLE_PARSE
20 SUBDIRS_PARSE =
21 GST_PARSE_LA =
22 else
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 gsttrace.c gstxml.c \
70         gstregistryxml.c gstregistrybinary.c
71
72
73 # temporarily not used
74 #       glib-compat.c
75
76 libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
77         gst.c                   \
78         gstobject.c             \
79         gstbin.c                \
80         gstbuffer.c             \
81         gstbus.c                \
82         gstcaps.c               \
83         gstchildproxy.c         \
84         gstclock.c              \
85         gstdebugutils.c         \
86         gstelement.c            \
87         gstelementfactory.c     \
88         gsterror.c              \
89         gstevent.c              \
90         gstfilter.c             \
91         gstformat.c             \
92         gstghostpad.c           \
93         $(GST_INDEX_SRC)        \
94         gstinfo.c               \
95         gstinterface.c          \
96         gstiterator.c           \
97         gstmessage.c            \
98         gstminiobject.c         \
99         gstpad.c                \
100         gstpadtemplate.c        \
101         gstparamspecs.c         \
102         gstpipeline.c           \
103         gstplugin.c             \
104         gstpluginfeature.c      \
105         gstpoll.c               \
106         gstpreset.c             \
107         gstquark.c              \
108         gstquery.c              \
109         gstregistry.c           \
110         gstsegment.c            \
111         gststructure.c          \
112         gstsystemclock.c        \
113         gsttaglist.c            \
114         gsttagsetter.c          \
115         gsttask.c               \
116         $(GST_TRACE_SRC)        \
117         gsttypefind.c           \
118         gsttypefindfactory.c    \
119         $(GST_URI_SRC)          \
120         gstutils.c              \
121         gstvalue.c              \
122         gstparse.c              \
123         $(GST_REGISTRY_SRC)     \
124         $(GST_LOADSAVE_SRC)
125
126 # do not put files in the distribution that are generated
127 nodist_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = $(built_source_make)
128
129 # BUILT_SOURCES are built on make all/check/install before all other targets
130 BUILT_SOURCES = \
131         $(built_header_configure)       \
132         $(built_header_make)            \
133         $(built_source_make)
134 # CLEANFILES is for files generated by make
135 CLEANFILES = $(built_header_make) $(built_source_make) $(as_dll_cleanfiles) *.gcno *.gcda *.gcov *.gcov.out
136 # DISTCLEANFILES is for files generated by configure
137 DISTCLEANFILES = $(built_header_configure)
138
139 libgstreamer_@GST_MAJORMINOR@_la_CFLAGS =               \
140         -D_GNU_SOURCE                                   \
141         -DG_LOG_DOMAIN=g_log_domain_gstreamer           \
142         -DGST_MAJORMINOR=\""$(GST_MAJORMINOR)"\"        \
143         -DGST_DISABLE_DEPRECATED                        \
144         $(VALGRIND_CFLAGS)                              \
145         $(GST_ALL_CFLAGS)
146
147 libgstreamer_@GST_MAJORMINOR@_la_LIBADD =               \
148         $(GST_PARSE_LA)                                 \
149         $(GST_ALL_LIBS)                                 \
150         $(XML_LIBS)
151
152 libgstreamer_@GST_MAJORMINOR@_la_LDFLAGS =              \
153         $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
154
155 libgstreamer_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst
156
157 gst_headers =                   \
158         gst.h                   \
159         glib-compat.h           \
160         gstobject.h             \
161         gstbin.h                \
162         gstbuffer.h             \
163         gstbus.h                \
164         gstcaps.h               \
165         gstchildproxy.h         \
166         gstclock.h              \
167         gstcompat.h             \
168         gstdebugutils.h         \
169         gstelement.h            \
170         gstelementfactory.h     \
171         gsterror.h              \
172         gstevent.h              \
173         gstfilter.h             \
174         gstformat.h             \
175         gstghostpad.h           \
176         gstindex.h              \
177         gstindexfactory.h       \
178         gstinfo.h               \
179         gstinterface.h          \
180         gstiterator.h           \
181         gstmacros.h             \
182         gstmessage.h            \
183         gstminiobject.h         \
184         gstpad.h                \
185         gstpadtemplate.h        \
186         gstparamspecs.h         \
187         gstpipeline.h           \
188         gstplugin.h             \
189         gstpluginfeature.h      \
190         gstpoll.h               \
191         gstpreset.h             \
192         gstquery.h              \
193         gstsegment.h            \
194         gststructure.h          \
195         gstsystemclock.h        \
196         gsttaglist.h            \
197         gsttagsetter.h          \
198         gsttask.h               \
199         gsttrace.h              \
200         gsttypefind.h           \
201         gsttypefindfactory.h    \
202         gsturi.h                \
203         gstutils.h              \
204         gstvalue.h              \
205         gstregistry.h           \
206         gstparse.h              \
207         gstxml.h
208
209 libgstreamer_@GST_MAJORMINOR@include_HEADERS = $(gst_headers)
210 nodist_libgstreamer_@GST_MAJORMINOR@include_HEADERS = \
211         $(built_header_configure) $(built_header_make)
212
213 noinst_HEADERS =                \
214         gettext.h               \
215         glib-compat-private.h   \
216         gst-i18n-lib.h          \
217         gst-i18n-app.h          \
218         gstquark.h              \
219         gstregistrybinary.h     \
220         gst_private.h
221
222 gstmarshal.h: gstmarshal.list
223         glib-genmarshal --header --prefix=gst_marshal $(srcdir)/gstmarshal.list > gstmarshal.h.tmp
224         mv gstmarshal.h.tmp gstmarshal.h
225
226 gstmarshal.c: gstmarshal.list gst_private.h
227         echo "#include \"gst_private.h\"" > gstmarshal.c.tmp
228         echo "#include \"glib-object.h\"" >> gstmarshal.c.tmp
229         echo "#include \"gstmarshal.h\"" >> gstmarshal.c.tmp
230         glib-genmarshal --body --prefix=gst_marshal $(srcdir)/gstmarshal.list >> gstmarshal.c.tmp
231         mv gstmarshal.c.tmp gstmarshal.c
232
233 gstenumtypes.h: $(gst_headers)
234         glib-mkenums \
235         --fhead "#ifndef __GST_ENUM_TYPES_H__\n#define __GST_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
236         --fprod "\n/* enumerations from \"@filename@\" */\n" \
237         --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
238         --ftail "G_END_DECLS\n\n#endif /* __GST_ENUM_TYPES_H__ */" \
239         $^ > gstenumtypes.h
240
241 gstenumtypes.c: $(gst_headers)
242         glib-mkenums \
243         --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 " \
244         --fprod "\n/* enumerations from \"@filename@\" */" \
245         --vhead "static void\nregister_@enum_name@ (GType* id)\n{\n  static const G@Type@Value values[] = {"     \
246         --vprod "    { C_@TYPE@(@VALUENAME@), \"@VALUENAME@\", \"@valuenick@\" }," \
247         --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" \
248         $^ > gstenumtypes.c
249
250 %.c.gcov: .libs/libgstreamer_@GST_MAJORMINOR@_la-%.gcda %.c
251         $(GCOV) -b -f -o $^ > $@.out
252
253 gcov: $(libgstreamer_@GST_MAJORMINOR@_la_SOURCES:=.gcov)