gst/: The attached patch adds two missing defines to gsttrace.h when tracing is disab...
[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
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         gstquery.c              \
103         gstregistry.c           \
104         gstsegment.c            \
105         gststructure.c          \
106         gstsystemclock.c        \
107         gsttaglist.c            \
108         gsttagsetter.c          \
109         gsttask.c               \
110         $(GST_TRACE_SRC)        \
111         gsttypefind.c           \
112         gsttypefindfactory.c    \
113         $(GST_URI_SRC)          \
114         gstutils.c              \
115         gstvalue.c              \
116         $(GST_PARSE_SRC)        \
117         $(GST_REGISTRY_SRC)     \
118         $(GST_LOADSAVE_SRC)
119
120 # do not put files in the distribution that are generated
121 nodist_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = $(built_source_make)
122
123 # BUILT_SOURCES are built on make all/check/install before all other targets
124 BUILT_SOURCES = \
125         $(built_header_configure)       \
126         $(built_header_make)            \
127         $(built_source_make)
128 # CLEANFILES is for files generated by make
129 CLEANFILES = $(built_header_make) $(built_source_make) $(as_dll_cleanfiles) *.gcno *.gcda *.gcov *.gcov.out
130 # DISTCLEANFILES is for files generated by configure
131 DISTCLEANFILES = $(built_header_configure)
132                                                                                 
133 libgstreamer_@GST_MAJORMINOR@_la_CFLAGS =               \
134         -D_GNU_SOURCE                                   \
135         -DG_LOG_DOMAIN=g_log_domain_gstreamer           \
136         -DGST_MAJORMINOR=\""$(GST_MAJORMINOR)"\"        \
137         -DGST_DISABLE_DEPRECATED                        \
138         $(VALGRIND_CFLAGS)                              \
139         $(GST_ALL_CFLAGS)
140
141 libgstreamer_@GST_MAJORMINOR@_la_LIBADD =               \
142         $(GST_PARSE_LA)                                 \
143         $(GST_ALL_LIBS)                                 \
144         $(XML_LIBS)
145
146 libgstreamer_@GST_MAJORMINOR@_la_LDFLAGS =              \
147         $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
148
149 libgstreamer_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst
150
151 gst_headers =                   \
152         gst.h                   \
153         glib-compat.h           \
154         gstobject.h             \
155         gstbin.h                \
156         gstbuffer.h             \
157         gstbus.h                \
158         gstcaps.h               \
159         gstchildproxy.h         \
160         gstclock.h              \
161         gstcompat.h             \
162         gstelement.h            \
163         gstelementfactory.h     \
164         gsterror.h              \
165         gstevent.h              \
166         gstfilter.h             \
167         gstformat.h             \
168         gstghostpad.h           \
169         gstindex.h              \
170         gstindexfactory.h       \
171         gstinfo.h               \
172         gstinterface.h          \
173         gstiterator.h           \
174         gstmacros.h             \
175         gstmessage.h            \
176         gstminiobject.h         \
177         gstpad.h                \
178         gstpadtemplate.h        \
179         gstpipeline.h           \
180         gstplugin.h             \
181         gstpluginfeature.h      \
182         gstquery.h              \
183         gstsegment.h            \
184         gststructure.h          \
185         gstsystemclock.h        \
186         gsttaglist.h            \
187         gsttagsetter.h          \
188         gsttask.h               \
189         gsttrace.h              \
190         gsttypefind.h           \
191         gsttypefindfactory.h    \
192         gsturi.h                \
193         gstutils.h              \
194         gstvalue.h              \
195         gstregistry.h           \
196         $(GST_PARSE_H)          \
197         gstxml.h
198
199 libgstreamer_@GST_MAJORMINOR@include_HEADERS = $(gst_headers)
200 nodist_libgstreamer_@GST_MAJORMINOR@include_HEADERS = \
201         $(built_header_configure) $(built_header_make)
202
203 EXTRA_DIST = \
204         gstparse.h
205
206 noinst_HEADERS =                \
207         gettext.h               \
208         glib-compat-private.h   \
209         gst-i18n-lib.h          \
210         gst-i18n-app.h          \
211         gst_private.h
212
213 gstmarshal.h: gstmarshal.list
214         glib-genmarshal --header --prefix=gst_marshal $(srcdir)/gstmarshal.list > gstmarshal.h.tmp
215         mv gstmarshal.h.tmp gstmarshal.h
216
217 gstmarshal.c: gstmarshal.list gst_private.h
218         echo "#include \"gst_private.h\"" > gstmarshal.c.tmp
219         echo "#include \"glib-object.h\"" >> gstmarshal.c.tmp
220         echo "#include \"gstmarshal.h\"" >> gstmarshal.c.tmp
221         glib-genmarshal --body --prefix=gst_marshal $(srcdir)/gstmarshal.list >> gstmarshal.c.tmp
222         mv gstmarshal.c.tmp gstmarshal.c
223
224 gstenumtypes.h: $(gst_headers)
225         glib-mkenums \
226         --fhead "#ifndef __GST_ENUM_TYPES_H__\n#define __GST_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
227         --fprod "\n/* enumerations from \"@filename@\" */\n" \
228         --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
229         --ftail "G_END_DECLS\n\n#endif /* __GST_ENUM_TYPES_H__ */" \
230         $^ > gstenumtypes.h
231
232 gstenumtypes.c: $(gst_headers)
233         glib-mkenums \
234         --fhead "#include \"gst_private.h\"\n#include <gst/gst.h>" \
235         --fprod "\n/* enumerations from \"@filename@\" */" \
236         --vhead "static void\nregister_@enum_name@ (GType* id)\n{\n  static const G@Type@Value values[] = {"     \
237         --vprod "    { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
238         --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" \
239         $^ > gstenumtypes.c
240
241 %.c.gcov: .libs/libgstreamer_@GST_MAJORMINOR@_la-%.gcda %.c
242         $(GCOV) -b -f -o $^ > $@.out
243
244 gcov: $(libgstreamer_@GST_MAJORMINOR@_la_SOURCES:=.gcov)