8573a5235eea7033860c1558b9c880b685900406
[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         gstcaps.c               \
59         gstclock.c              \
60         gstcpu.c                \
61         gstdata.c               \
62         gstelement.c            \
63         gstelementfactory.c     \
64         gstevent.c              \
65         gstextratypes.c         \
66         gstinfo.c               \
67         gstmemchunk.c           \
68         gstpad.c                \
69         gstpipeline.c           \
70         gstplugin.c             \
71         gstpluginfeature.c      \
72         gstprops.c              \
73         gstqueue.c              \
74         gstscheduler.c          \
75         gstsystemclock.c        \
76         gstthread.c             \
77         gstthreaddummy.c        \
78         $(GST_TRACE_SRC)        \
79         gsttype.c               \
80         $(GST_TYPEFIND_SRC)     \
81         gstutils.c              \
82         gstregistry.c           \
83         gsttimecache.c          \
84         $(GST_PARSE_SRC)        \
85         $(GSTARCH_SRCS)         \
86         $(GST_LOADSAVE_SRC)
87
88
89 BUILT_SOURCES = gstmarshal.h gstmarshal.c gstenumtypes.h gstenumtypes.c
90
91 gstmarshal.h: gstmarshal.list
92         glib-genmarshal --header --prefix=gst_marshal $(srcdir)/gstmarshal.list > gstmarshal.h.tmp
93         mv gstmarshal.h.tmp gstmarshal.h
94
95 gstmarshal.c: gstmarshal.list
96         echo "#include \"glib-object.h\"" >gstmarshal.c.tmp
97         echo "#include \"gstlog.h\"" >> gstmarshal.c.tmp
98         echo "#include \"gstmarshal.h\"" >> gstmarshal.c.tmp
99         glib-genmarshal --body --prefix=gst_marshal $(srcdir)/gstmarshal.list >> gstmarshal.c.tmp
100         mv gstmarshal.c.tmp gstmarshal.c
101
102 gstenumtypes.h:
103         glib-mkenums \
104         --fhead "#ifndef __GST_ENUM_TYPES_H__\n#define __GST_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
105         --fprod "/* enumerations from \"@filename@\" */\n" \
106         --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
107         --ftail "G_END_DECLS\n\n#endif /* __GST_ENUM_TYPES_H__ */" \
108         $(libgstreamerinclude_HEADERS) > gstenumtypes.h
109
110 gstenumtypes.c:
111         glib-mkenums \
112         --fhead "#include <gst/gst.h>" \
113         --fprod "\n/* enumerations from \"@filename@\" */" \
114         --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[] = {"     \
115         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
116         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
117         $(libgstreamerinclude_HEADERS) > gstenumtypes.c
118
119 # Don't want the generated marshal files in the dist
120 dist-hook:
121         rm -f $(distdir)/gstmarshal.c $(distdir)/gstmarshal.h
122 # Clean generated files
123 distclean-local:
124         rm -f $(top_builddir)/gst/gstmarshal.c $(top_builddir)/gst/gstmarshal.h
125
126 libgstreamerincludedir = $(includedir)/gstreamer-@VERSION@/gst
127 libgstreamerinclude_HEADERS =           \
128         gst.h                   \
129         gstatomic.h             \
130         gstconfig.h             \
131         gstmarshal.h            \
132         gstenumtypes.h          \
133         gstobject.h             \
134         gsttypes.h              \
135         gstautoplug.h           \
136         gstbin.h                \
137         gstbuffer.h             \
138         gstcaps.h               \
139         gstclock.h              \
140         gstcpu.h                \
141         gstdata.h               \
142         gstelement.h            \
143         gstevent.h              \
144         gstextratypes.h         \
145         gstformat.h             \
146         gstinfo.h               \
147         gstlog.h                \
148         gstmemchunk.h           \
149         gstpad.h                \
150         gstpipeline.h           \
151         gstplugin.h             \
152         gstpluginfeature.h      \
153         gstprops.h              \
154         gstqueue.h              \
155         gstscheduler.h          \
156         gstsystemclock.h        \
157         gstthread.h             \
158         gsttrace.h              \
159         gsttype.h               \
160         gsttypefind.h           \
161         gstutils.h              \
162         gstregistry.h           \
163         gsttimecache.h          \
164         gstparse.h              \
165         gstversion.h            \
166         gstxml.h
167
168 noinst_HEADERS =        \
169         gst_private.h   \
170         gstarch.h       \
171         cothreads.h
172
173 libgstreamer_la_CFLAGS = -D_GNU_SOURCE -DGST_CONFIG_DIR=\""$(GST_CONFIG_DIR)"\" \
174         $(LIBGST_CFLAGS) \
175         -D_GNU_SOURCE \
176         -DG_LOG_DOMAIN=g_log_domain_gstreamer \
177         -DGST_CONFIG_DIR=\""$(GST_CONFIG_DIR)"\" 
178
179 # the compiler shoots cothreads.c in the head at -O6
180 libcothreads_la_CFLAGS = $(libgstreamer_la_CFLAGS) -O2 
181
182 libgstreamer_la_LIBADD = $(LIBGST_LIBS) parse/libgstparse.la registries/libgstxmlregistry.la
183 libgstreamer_la_LDFLAGS = @GST_LT_LDFLAGS@ -version-info @GST_LIBVERSION@ 
184
185 EXTRA_DIST = ROADMAP