configure.ac: reorganize clean up document more remove cruft
[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_ENUMTYPES
32 GST_ENUMTYPES_SRC = 
33 else
34 GST_ENUMTYPES_SRC = gstenumtypes.c
35 endif
36
37 if GST_DISABLE_INDEX
38 GST_INDEX_SRC = 
39 SUBDIRS_INDEX =
40 else
41 GST_INDEX_SRC = gstindex.c gstindexfactory.c
42 SUBDIRS_INDEX = indexers
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) . base elements $(SUBDIRS_INDEX) $(SUBDIRS_CHECK)
58 DIST_SUBDIRS = base elements parse indexers check
59
60 # make variables for all generated source and header files to make the
61 # distinction clear
62                                                                                 
63 built_header_configure = gstconfig.h gstversion.h
64 built_header_make = gstenumtypes.h gstmarshal.h
65 built_source_make = $(GST_ENUMTYPES_SRC) gstmarshal.c
66
67 EXTRA_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
68         gstmarshal.list gstxml.c gstparse.c gsttrace.c
69
70 libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
71         glib-compat.c           \
72         gst.c                   \
73         gstobject.c             \
74         gstbin.c                \
75         gstbuffer.c             \
76         gstbus.c                \
77         gstcaps.c               \
78         gstchildproxy.c         \
79         gstclock.c              \
80         gstelement.c            \
81         gstelementfactory.c     \
82         gsterror.c              \
83         gstevent.c              \
84         gstfilter.c             \
85         gstformat.c             \
86         gstghostpad.c           \
87         $(GST_INDEX_SRC)        \
88         gstinfo.c               \
89         gstinterface.c          \
90         gstiterator.c           \
91         gstmessage.c            \
92         gstminiobject.c         \
93         gstpad.c                \
94         gstpadtemplate.c        \
95         gstpipeline.c           \
96         gstplugin.c             \
97         gstpluginfeature.c      \
98         gstquery.c              \
99         gstqueue.c              \
100         gstregistry.c           \
101         gstregistryxml.c        \
102         gststructure.c          \
103         gstsystemclock.c        \
104         gsttaglist.c            \
105         gsttagsetter.c          \
106         gsttask.c               \
107         $(GST_TRACE_SRC)        \
108         gsttypefind.c           \
109         gsttypefindfactory.c    \
110         $(GST_URI_SRC)          \
111         gsturitype.c            \
112         gstutils.c              \
113         gstvalue.c              \
114         $(GST_PARSE_SRC)        \
115         $(GSTARCH_SRCS)         \
116         $(GST_LOADSAVE_SRC)
117
118 # do not put files in the distribution that are generated
119 nodist_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = $(built_source_make)
120
121 # BUILT_SOURCES are built on make all/check/install before all other targets
122 BUILT_SOURCES = \
123         $(built_header_configure)       \
124         $(built_header_make)            \
125         $(built_source_make)
126 # CLEANFILES is for files generated by make
127 CLEANFILES = $(built_header_make) $(built_source_make) $(as_dll_cleanfiles)
128 # DISTCLEANFILES is for files generated by configure
129 DISTCLEANFILES = $(built_header_configure)
130                                                                                 
131 libgstreamer_@GST_MAJORMINOR@_la_CFLAGS =               \
132         -D_GNU_SOURCE                                   \
133         -DG_LOG_DOMAIN=g_log_domain_gstreamer           \
134         -DGST_MAJORMINOR=\""$(GST_MAJORMINOR)"\"        \
135         -DGST_DISABLE_DEPRECATED                        \
136         $(VALGRIND_CFLAGS)                              \
137         $(GST_ALL_CFLAGS)
138
139 libgstreamer_@GST_MAJORMINOR@_la_LIBADD =               \
140         $(GST_PARSE_LA)                                 \
141         $(VALGRIND_LIBS)                                \
142         $(GST_ALL_LIBS)                                 \
143         $(XML_LIBS)
144
145 libgstreamer_@GST_MAJORMINOR@_la_LDFLAGS =              \
146         $(GST_LT_LDFLAGS)                               \
147         $(GST_ALL_LDFLAGS)
148
149 libgstreamer_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst
150
151 gst_headers =                   \
152         gst.h                   \
153         gstobject.h             \
154         gstbin.h                \
155         gstbuffer.h             \
156         gstbus.h                \
157         gstcaps.h               \
158         gstchildproxy.h         \
159         gstclock.h              \
160         gstcompat.h             \
161         gstelement.h            \
162         gstelementfactory.h     \
163         gsterror.h              \
164         gstevent.h              \
165         gstfilter.h             \
166         gstformat.h             \
167         gstghostpad.h           \
168         gstindex.h              \
169         gstindexfactory.h       \
170         gstinfo.h               \
171         gstinterface.h          \
172         gstiterator.h           \
173         gstmacros.h             \
174         gstmessage.h            \
175         gstminiobject.h         \
176         gstpad.h                \
177         gstpadtemplate.h        \
178         gstpipeline.h           \
179         gstplugin.h             \
180         gstpluginfeature.h      \
181         gstquery.h              \
182         gstqueue.h              \
183         gststructure.h          \
184         gstsystemclock.h        \
185         gsttaglist.h            \
186         gsttagsetter.h          \
187         gsttask.h               \
188         gsttrace.h              \
189         gsttypefind.h           \
190         gsttypefindfactory.h    \
191         gsturi.h                \
192         gsturitype.h            \
193         gstutils.h              \
194         gstvalue.h              \
195         gstregistry.h           \
196         gstparse.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 noinst_HEADERS =                \
204         gettext.h               \
205         glib-compat.h           \
206         gst-i18n-lib.h          \
207         gst-i18n-app.h          \
208         gst_private.h
209
210 gstmarshal.h: gstmarshal.list
211         glib-genmarshal --header --prefix=gst_marshal $(srcdir)/gstmarshal.list > gstmarshal.h.tmp
212         mv gstmarshal.h.tmp gstmarshal.h
213
214 gstmarshal.c: gstmarshal.list gst_private.h
215         echo "#include \"gst_private.h\"" > gstmarshal.c.tmp
216         echo "#include \"glib-object.h\"" >> gstmarshal.c.tmp
217         echo "#include \"gstmarshal.h\"" >> gstmarshal.c.tmp
218         glib-genmarshal --body --prefix=gst_marshal $(srcdir)/gstmarshal.list >> gstmarshal.c.tmp
219         mv gstmarshal.c.tmp gstmarshal.c
220
221 gstenumtypes.h: $(gst_headers)
222         glib-mkenums \
223         --fhead "#ifndef __GST_ENUM_TYPES_H__\n#define __GST_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
224         --fprod "\n/* enumerations from \"@filename@\" */\n" \
225         --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
226         --ftail "G_END_DECLS\n\n#endif /* __GST_ENUM_TYPES_H__ */" \
227         $^ > gstenumtypes.h
228
229 gstenumtypes.c: $(gst_headers)
230         glib-mkenums \
231         --fhead "#include \"gst_private.h\"\n#include <gst/gst.h>" \
232         --fprod "\n/* enumerations from \"@filename@\" */" \
233         --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[] = {"     \
234         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
235         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
236         $^ > gstenumtypes.c