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