add default bufferpool, clean up some code, add bufferpool testing to fakesrc
[platform/upstream/gstreamer.git] / gst / Makefile.am
1 lib_LTLIBRARIES = libgstreamer.la
2 noinst_LTLIBRARIES = libcothreads.la
3
4 if HAVE_CPU_I386
5 GSTARCH_SRCS = gstcpuid_i386.s
6 else
7 GSTARCH_SRCS = 
8 endif
9
10 #GST_INSTRUMENT_FLAGS = -finstrument-functions -DGST_ENABLE_FUNC_INSTRUMENTATION
11
12 if GST_DISABLE_LOADSAVE
13 GST_LOADSAVE_SRC = 
14 else
15 GST_LOADSAVE_SRC = gstxml.c
16 endif
17
18 if GST_DISABLE_TYPEFIND
19 GST_TYPEFIND_SRC = 
20 else
21 GST_TYPEFIND_SRC = gsttypefind.c
22 endif
23
24 if GST_DISABLE_PARSE
25 GST_PARSE_SRC = 
26 else
27 GST_PARSE_SRC = gstparse.c
28 endif
29
30 if GST_DISABLE_AUTOPLUG
31 GST_AUTOPLUG_SRC = 
32 GST_AUTOPLUG_DIRS =
33 else
34 GST_AUTOPLUG_SRC = gstautoplug.c
35 GST_AUTOPLUG_DIRS = autoplug
36 endif
37
38 if GST_DISABLE_TRACE
39 GST_TRACE_SRC = 
40 else
41 GST_TRACE_SRC = gsttrace.c
42 endif
43
44 EXTRA_libgstreamer_la_SOURCES = gstcpuid_i386.s gstmarshal.list gstxml.c gsttypefind.c gstparse.c gstautoplug.c gsttrace.c
45
46 SUBDIRS = parse registries . $(GST_AUTOPLUG_DIRS) elements schedulers types 
47 DIST_SUBDIRS = autoplug elements parse registries schedulers types
48
49 libcothreads_la_SOURCES = cothreads.c
50 libgstreamer_la_SOURCES =               \
51         gst.c                   \
52         gstmarshal.c            \
53         gstenumtypes.c          \
54         gstobject.c             \
55         $(GST_AUTOPLUG_SRC)     \
56         gstbin.c                \
57         gstbuffer.c             \
58         gstbufferpool-default.c \
59         gstcaps.c               \
60         gstclock.c              \
61         gstcpu.c                \
62         gstdata.c               \
63         gstelement.c            \
64         gstelementfactory.c     \
65         gstevent.c              \
66         gstextratypes.c         \
67         gstinfo.c               \
68         gstmemchunk.c           \
69         gstpad.c                \
70         gstpipeline.c           \
71         gstplugin.c             \
72         gstpluginfeature.c      \
73         gstprops.c              \
74         gstqueue.c              \
75         gstscheduler.c          \
76         gstsystemclock.c        \
77         gstthread.c             \
78         gstthreaddummy.c        \
79         $(GST_TRACE_SRC)        \
80         gsttype.c               \
81         $(GST_TYPEFIND_SRC)     \
82         gstutils.c              \
83         gstregistry.c           \
84         gsttimecache.c          \
85         $(GST_PARSE_SRC)        \
86         $(GSTARCH_SRCS)         \
87         $(GST_LOADSAVE_SRC)
88
89
90 BUILT_SOURCES = gstmarshal.h gstmarshal.c gstenumtypes.h gstenumtypes.c
91
92 gstmarshal.h: gstmarshal.list
93         glib-genmarshal --header --prefix=gst_marshal $(srcdir)/gstmarshal.list > gstmarshal.h.tmp
94         mv gstmarshal.h.tmp gstmarshal.h
95
96 gstmarshal.c: gstmarshal.list
97         echo "#include \"glib-object.h\"" >gstmarshal.c.tmp
98         echo "#include \"gstlog.h\"" >> gstmarshal.c.tmp
99         echo "#include \"gstmarshal.h\"" >> gstmarshal.c.tmp
100         glib-genmarshal --body --prefix=gst_marshal $(srcdir)/gstmarshal.list >> gstmarshal.c.tmp
101         mv gstmarshal.c.tmp gstmarshal.c
102
103 gstenumtypes.h:
104         glib-mkenums \
105         --fhead "#ifndef __GST_ENUM_TYPES_H__\n#define __GST_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
106         --fprod "/* enumerations from \"@filename@\" */\n" \
107         --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
108         --ftail "G_END_DECLS\n\n#endif /* __GST_ENUM_TYPES_H__ */" \
109         $(libgstreamerinclude_HEADERS) > gstenumtypes.h
110
111 gstenumtypes.c:
112         glib-mkenums \
113         --fhead "#include <gst/gst.h>" \
114         --fprod "\n/* enumerations from \"@filename@\" */" \
115         --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[] = {"     \
116         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
117         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
118         $(libgstreamerinclude_HEADERS) > gstenumtypes.c
119
120 # Don't want the generated marshal files in the dist
121 dist-hook:
122         rm -f $(distdir)/gstmarshal.c $(distdir)/gstmarshal.h
123 # Clean generated files
124 distclean-local:
125         rm -f $(top_builddir)/gst/gstmarshal.c $(top_builddir)/gst/gstmarshal.h
126
127 libgstreamerincludedir = $(includedir)/gstreamer-@VERSION@/gst
128 libgstreamerinclude_HEADERS =           \
129         gst.h                   \
130         gstatomic.h             \
131         gstconfig.h             \
132         gstmarshal.h            \
133         gstenumtypes.h          \
134         gstobject.h             \
135         gsttypes.h              \
136         gstautoplug.h           \
137         gstbin.h                \
138         gstbuffer.h             \
139         gstcaps.h               \
140         gstclock.h              \
141         gstcpu.h                \
142         gstdata.h               \
143         gstelement.h            \
144         gstevent.h              \
145         gstextratypes.h         \
146         gstformat.h             \
147         gstinfo.h               \
148         gstlog.h                \
149         gstmemchunk.h           \
150         gstpad.h                \
151         gstpipeline.h           \
152         gstplugin.h             \
153         gstpluginfeature.h      \
154         gstprops.h              \
155         gstqueue.h              \
156         gstscheduler.h          \
157         gstsystemclock.h        \
158         gstthread.h             \
159         gsttrace.h              \
160         gsttype.h               \
161         gsttypefind.h           \
162         gstutils.h              \
163         gstregistry.h           \
164         gsttimecache.h          \
165         gstparse.h              \
166         gstversion.h            \
167         gstxml.h
168
169 noinst_HEADERS =                \
170         gst_private.h           \
171         gstarch.h               \
172         cothreads.h             \
173         gstbufferpool-default.h
174
175 libgstreamer_la_CFLAGS = -D_GNU_SOURCE -DGST_CONFIG_DIR=\""$(GST_CONFIG_DIR)"\" \
176         $(LIBGST_CFLAGS) \
177         -D_GNU_SOURCE \
178         -DG_LOG_DOMAIN=g_log_domain_gstreamer \
179         -DGST_CONFIG_DIR=\""$(GST_CONFIG_DIR)"\" 
180
181 # the compiler shoots cothreads.c in the head at -O6
182 libcothreads_la_CFLAGS = $(libgstreamer_la_CFLAGS) -O2 
183
184 libgstreamer_la_LIBADD = $(LIBGST_LIBS) parse/libgstparse.la registries/libgstxmlregistry.la
185 libgstreamer_la_LDFLAGS = @GST_LT_LDFLAGS@ -version-info @GST_LIBVERSION@ 
186
187 EXTRA_DIST = ROADMAP