gst/Makefile.am: do not install a .c file in the header directory
[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 GST_TRACE_H = 
30 else
31 GST_TRACE_SRC = gsttrace.c
32 GST_TRACE_H = gsttrace.h
33 endif
34
35 if GST_DISABLE_ENUMTYPES
36 GST_ENUMTYPES_SRC = 
37 else
38 GST_ENUMTYPES_SRC = gstenumtypes.c
39 endif
40
41 if GST_DISABLE_INDEX
42 GST_INDEX_SRC = 
43 else
44 GST_INDEX_SRC = gstindex.c gstindexfactory.c
45 endif
46
47 if GST_DISABLE_PLUGIN
48 GST_PLUGIN_SRC = 
49 else
50 GST_PLUGIN_SRC = gstplugin.c
51 endif
52
53 if GST_DISABLE_URI
54 GST_URI_SRC = 
55 else
56 GST_URI_SRC = gsturi.c
57 endif
58
59 SUBDIRS = $(SUBDIRS_PARSE)
60
61 DIST_SUBDIRS = parse
62
63 # make variables for all generated source and header files to make the
64 # distinction clear
65                                                                                 
66 built_header_configure = gstconfig.h gstversion.h
67 built_header_make = gstenumtypes.h gstmarshal.h
68 built_source_make = $(GST_ENUMTYPES_SRC) gstmarshal.c
69
70 EXTRA_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
71         gstmarshal.list gstxml.c gstparse.c gsttrace.c gstregistryxml.c
72
73
74 # temporarily not used
75 #       glib-compat.c
76
77 libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
78         gst.c                   \
79         gstobject.c             \
80         gstbin.c                \
81         gstbuffer.c             \
82         gstbus.c                \
83         gstcaps.c               \
84         gstchildproxy.c         \
85         gstclock.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         gstpipeline.c           \
102         gstplugin.c             \
103         gstpluginfeature.c      \
104         gstquery.c              \
105         gstregistry.c           \
106         gstsegment.c            \
107         gststructure.c          \
108         gstsystemclock.c        \
109         gsttaglist.c            \
110         gsttagsetter.c          \
111         gsttask.c               \
112         $(GST_TRACE_SRC)        \
113         gsttypefind.c           \
114         gsttypefindfactory.c    \
115         $(GST_URI_SRC)          \
116         gstutils.c              \
117         gstvalue.c              \
118         $(GST_PARSE_SRC)        \
119         $(GST_REGISTRY_SRC)     \
120         $(GST_LOADSAVE_SRC)
121
122 # do not put files in the distribution that are generated
123 nodist_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = $(built_source_make)
124
125 # BUILT_SOURCES are built on make all/check/install before all other targets
126 BUILT_SOURCES = \
127         $(built_header_configure)       \
128         $(built_header_make)            \
129         $(built_source_make)
130 # CLEANFILES is for files generated by make
131 CLEANFILES = $(built_header_make) $(built_source_make) $(as_dll_cleanfiles) *.gcno *.gcda *.gcov *.gcov.out
132 # DISTCLEANFILES is for files generated by configure
133 DISTCLEANFILES = $(built_header_configure)
134                                                                                 
135 libgstreamer_@GST_MAJORMINOR@_la_CFLAGS =               \
136         -D_GNU_SOURCE                                   \
137         -DG_LOG_DOMAIN=g_log_domain_gstreamer           \
138         -DGST_MAJORMINOR=\""$(GST_MAJORMINOR)"\"        \
139         -DGST_DISABLE_DEPRECATED                        \
140         $(VALGRIND_CFLAGS)                              \
141         $(GST_ALL_CFLAGS)
142
143 libgstreamer_@GST_MAJORMINOR@_la_LIBADD =               \
144         $(GST_PARSE_LA)                                 \
145         $(GST_ALL_LIBS)                                 \
146         $(XML_LIBS)
147
148 libgstreamer_@GST_MAJORMINOR@_la_LDFLAGS =              \
149         $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
150
151 libgstreamer_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst
152
153 gst_headers =                   \
154         gst.h                   \
155         glib-compat.h           \
156         gstobject.h             \
157         gstbin.h                \
158         gstbuffer.h             \
159         gstbus.h                \
160         gstcaps.h               \
161         gstchildproxy.h         \
162         gstclock.h              \
163         gstcompat.h             \
164         gstelement.h            \
165         gstelementfactory.h     \
166         gsterror.h              \
167         gstevent.h              \
168         gstfilter.h             \
169         gstformat.h             \
170         gstghostpad.h           \
171         gstindex.h              \
172         gstindexfactory.h       \
173         gstinfo.h               \
174         gstinterface.h          \
175         gstiterator.h           \
176         gstmacros.h             \
177         gstmessage.h            \
178         gstminiobject.h         \
179         gstpad.h                \
180         gstpadtemplate.h        \
181         gstpipeline.h           \
182         gstplugin.h             \
183         gstpluginfeature.h      \
184         gstquery.h              \
185         gstsegment.h            \
186         gststructure.h          \
187         gstsystemclock.h        \
188         gsttaglist.h            \
189         gsttagsetter.h          \
190         gsttask.h               \
191         $(GST_TRACE_H)          \
192         gsttypefind.h           \
193         gsttypefindfactory.h    \
194         gsturi.h                \
195         gstutils.h              \
196         gstvalue.h              \
197         gstregistry.h           \
198         $(GST_PARSE_H)          \
199         gstxml.h
200
201 libgstreamer_@GST_MAJORMINOR@include_HEADERS = $(gst_headers)
202 nodist_libgstreamer_@GST_MAJORMINOR@include_HEADERS = \
203         $(built_header_configure) $(built_header_make)
204
205 EXTRA_DIST = \
206         gstparse.h \
207         gsttrace.h
208
209 noinst_HEADERS =                \
210         gettext.h               \
211         glib-compat-private.h   \
212         gst-i18n-lib.h          \
213         gst-i18n-app.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>" \
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 "    { @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)