work on builds without check
[platform/upstream/gstreamer.git] / gst / Makefile.am
1 lib_LTLIBRARIES = libgstreamer-@GST_MAJORMINOR@.la
2
3 if HAVE_CHECK
4 SUBDIRS_CHECK = check
5 else
6 SUBDIRS_CHECK =
7 endif
8
9 if GST_DISABLE_LOADSAVE
10 GST_LOADSAVE_SRC = 
11 else
12 GST_LOADSAVE_SRC = gstxml.c
13 endif
14
15 if GST_DISABLE_PARSE
16 GST_PARSE_SRC = 
17 SUBDIRS_PARSE = 
18 GST_PARSE_LA = 
19 else
20 GST_PARSE_SRC = gstparse.c
21 SUBDIRS_PARSE = parse
22 GST_PARSE_LA = parse/libgstparse.la 
23 endif
24
25 if GST_DISABLE_TRACE
26 GST_TRACE_SRC = 
27 else
28 GST_TRACE_SRC = gsttrace.c
29 endif
30
31 if GST_DISABLE_REGISTRY
32 GST_REGISTRY_SRC = 
33 SUBDIRS_REGISTRY =
34 GST_REGISTRY_LA = 
35 else
36 GST_REGISTRY_SRC = gstregistry.c
37 SUBDIRS_REGISTRY = registries
38 GST_REGISTRY_LA = registries/libgstxmlregistry.la
39 endif
40
41 if GST_DISABLE_ENUMTYPES
42 GST_ENUMTYPES_SRC = 
43 else
44 GST_ENUMTYPES_SRC = gstenumtypes.c
45 endif
46
47 if GST_DISABLE_INDEX
48 GST_INDEX_SRC = 
49 SUBDIRS_INDEX =
50 else
51 GST_INDEX_SRC = gstindex.c
52 SUBDIRS_INDEX = indexers
53 endif
54
55 if GST_DISABLE_PLUGIN
56 GST_PLUGIN_SRC = 
57 else
58 GST_PLUGIN_SRC = gstplugin.c
59 endif
60
61 if GST_DISABLE_URI
62 GST_URI_SRC = 
63 else
64 GST_URI_SRC = gsturi.c
65 endif
66
67 SUBDIRS = $(SUBDIRS_PARSE) $(SUBDIRS_REGISTRY) . base elements $(SUBDIRS_INDEX) $(SUBDIRS_CHECK)
68 DIST_SUBDIRS = base elements parse registries indexers check
69
70 # make variables for all generated source and header files to make the
71 # distinction clear
72                                                                                 
73 built_header_configure = gstconfig.h gstversion.h
74 built_header_make = gstenumtypes.h gstmarshal.h
75 built_source_make = $(GST_ENUMTYPES_SRC) gstmarshal.c
76
77 EXTRA_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
78         gstmarshal.list gstxml.c gstparse.c gsttrace.c
79
80 libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
81         gst.c                   \
82         gstobject.c             \
83         gstbin.c                \
84         gstbuffer.c             \
85         gstbus.c                \
86         gstcaps.c               \
87         gstclock.c              \
88         gstelement.c            \
89         gstelementfactory.c     \
90         gsterror.c              \
91         gstevent.c              \
92         gstfilter.c             \
93         gstformat.c             \
94         gstghostpad.c           \
95         $(GST_INDEX_SRC)        \
96         gstinfo.c               \
97         gstinterface.c          \
98         gstiterator.c           \
99         gstmemchunk.c           \
100         gstmessage.c            \
101         gstminiobject.c         \
102         gstpad.c                \
103         gstpipeline.c           \
104         gstplugin.c             \
105         gstpluginfeature.c      \
106         gstquery.c              \
107         gstqueryutils.c         \
108         gstqueue.c              \
109         gststructure.c          \
110         gstsystemclock.c        \
111         gsttag.c                \
112         gsttaginterface.c       \
113         gsttask.c               \
114         $(GST_TRACE_SRC)        \
115         gsttrashstack.c         \
116         gsttypefind.c           \
117         $(GST_URI_SRC)          \
118         gsturitype.c            \
119         gstutils.c              \
120         gstvalue.c              \
121         $(GST_REGISTRY_SRC)     \
122         gstregistrypool.c       \
123         $(GST_PARSE_SRC)        \
124         $(GSTARCH_SRCS)         \
125         $(GST_LOADSAVE_SRC)
126
127 # do not put files in the distribution that are generated
128 nodist_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = $(built_source_make)
129
130 # BUILT_SOURCES are built on make all/check/install before all other targets
131 BUILT_SOURCES = \
132         $(built_header_configure)       \
133         $(built_header_make)            \
134         $(built_source_make)
135 # CLEANFILES is for files generated by make
136 CLEANFILES = $(built_header_make) $(built_source_make) $(as_dll_cleanfiles)
137 # DISTCLEANFILES is for files generated by configure
138 DISTCLEANFILES = $(built_header_configure)
139                                                                                 
140 libgstreamer_@GST_MAJORMINOR@_la_CFLAGS =       \
141         -D_GNU_SOURCE                           \
142         $(GST_LIB_CFLAGS)                       \
143         -DG_LOG_DOMAIN=g_log_domain_gstreamer   \
144         -DGST_MAJORMINOR=\""$(GST_MAJORMINOR)"\" 
145 libgstreamer_@GST_MAJORMINOR@_la_LIBADD = \
146         $(GST_LIB_LIBS) $(GST_PARSE_LA) $(GST_REGISTRY_LA)
147 libgstreamer_@GST_MAJORMINOR@_la_LDFLAGS = \
148         @GST_LT_LDFLAGS@ -version-info @GST_LIBVERSION@ \
149         -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*
150
151 libgstreamer_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst
152
153 gst_headers =                   \
154         gst.h                   \
155         gstobject.h             \
156         gstbin.h                \
157         gstbuffer.h             \
158         gstbus.h                \
159         gstcaps.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         gstinfo.h               \
171         gstinterface.h          \
172         gstiterator.h           \
173         gstmacros.h             \
174         gstmemchunk.h           \
175         gstmessage.h            \
176         gstminiobject.h         \
177         gstpad.h                \
178         gstpipeline.h           \
179         gstplugin.h             \
180         gstpluginfeature.h      \
181         gstquery.h              \
182         gstqueryutils.h         \
183         gstqueue.h              \
184         gststructure.h          \
185         gstsystemclock.h        \
186         gsttag.h                \
187         gsttaginterface.h       \
188         gsttask.h               \
189         gsttrace.h              \
190         gsttrashstack.h         \
191         gsttypefind.h           \
192         gsturi.h                \
193         gsturitype.h            \
194         gstutils.h              \
195         gstvalue.h              \
196         gstregistry.h           \
197         gstregistrypool.h       \
198         gstparse.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 noinst_HEADERS =                \
206         gettext.h               \
207         gst-i18n-lib.h          \
208         gst-i18n-app.h          \
209         gst_private.h
210
211 gstmarshal.h: gstmarshal.list
212         glib-genmarshal --header --prefix=gst_marshal $(srcdir)/gstmarshal.list > gstmarshal.h.tmp
213         mv gstmarshal.h.tmp gstmarshal.h
214
215 gstmarshal.c: gstmarshal.list gst_private.h
216         echo "#include \"gst_private.h\"" > gstmarshal.c.tmp
217         echo "#include \"glib-object.h\"" >> gstmarshal.c.tmp
218         echo "#include \"gstmarshal.h\"" >> gstmarshal.c.tmp
219         glib-genmarshal --body --prefix=gst_marshal $(srcdir)/gstmarshal.list >> gstmarshal.c.tmp
220         mv gstmarshal.c.tmp gstmarshal.c
221
222 gstenumtypes.h: $(gst_headers)
223         glib-mkenums \
224         --fhead "#ifndef __GST_ENUM_TYPES_H__\n#define __GST_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
225         --fprod "/* enumerations from \"@filename@\" */\n" \
226         --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
227         --ftail "G_END_DECLS\n\n#endif /* __GST_ENUM_TYPES_H__ */" \
228         $^ > gstenumtypes.h
229
230 gstenumtypes.c: $(gst_headers)
231         glib-mkenums \
232         --fhead "#include \"gst_private.h\"\n#include <gst/gst.h>" \
233         --fprod "\n/* enumerations from \"@filename@\" */" \
234         --vhead "GType\n@enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G@Type@Value values[] = {"     \
235         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
236         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
237         $^ > gstenumtypes.c