Merge remote-tracking branch 'origin/0.10'
[platform/upstream/gstreamer.git] / libs / gst / check / Makefile.am
1 lib_LTLIBRARIES = libgstcheck-@GST_MAJORMINOR@.la
2
3 SYMBOLS_FILE = exports.sym
4
5 BUILT_SOURCES = internal-check.h
6
7 libgstcheck_@GST_MAJORMINOR@_la_DEPENDENCIES = \
8         $(top_builddir)/gst/libgstreamer-@GST_MAJORMINOR@.la \
9         internal-check.h \
10         $(SYMBOLS_FILE)
11 libgstcheck_@GST_MAJORMINOR@_la_SOURCES =       \
12         gstbufferstraw.c                        \
13         gstcheck.c                              \
14         gstconsistencychecker.c
15
16 libgstcheck_@GST_MAJORMINOR@_la_CFLAGS = $(GST_OBJ_CFLAGS) \
17         -I$(top_builddir)/libs \
18         -I$(top_builddir)/libs/gst/check \
19         -I$(top_builddir)/libs/gst/check/libcheck
20 libgstcheck_@GST_MAJORMINOR@_la_LIBADD = $(GST_OBJ_LIBS) \
21         $(top_builddir)/libs/gst/check/libcheck/libcheckinternal.la \
22         $(LIBM)
23 libgstcheck_@GST_MAJORMINOR@_la_LDFLAGS = \
24         -export-symbols $(SYMBOLS_FILE) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
25
26 libgstcheck_@GST_MAJORMINOR@includedir =                \
27         $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/check
28
29 libgstcheck_@GST_MAJORMINOR@include_HEADERS =    \
30         gstbufferstraw.h                        \
31         gstcheck.h                              \
32         gstconsistencychecker.h
33
34 nodist_libgstcheck_@GST_MAJORMINOR@include_HEADERS =    \
35         internal-check.h        
36
37 CLEANFILES = *.gcno *.gcda *.gcov internal-check.h $(SYMBOLS_FILE)
38
39 internal-check.h: $(top_builddir)/libs/gst/check/libcheck/check.h
40         $(AM_V_GEN)cp $(top_builddir)/libs/gst/check/libcheck/check.h internal-check.h
41
42 %.c.gcov: .libs/libgstcheck_@GST_MAJORMINOR@_la-%.gcda %.c
43         $(GCOV) -b -f -o $^ > $@.out
44
45 gcov: $(libgstcheck_@GST_MAJORMINOR@_la_SOURCES:=.gcov)
46
47 SUBDIRS = libcheck
48
49 LIBGSTCHECK_EXPORTED_VARS = \
50         _gst_check_threads_running \
51         _gst_check_raised_critical \
52         _gst_check_raised_warning \
53         _gst_check_expecting_log \
54         buffers \
55         check_cond \
56         check_debug \
57         check_mutex \
58         mutex \
59         start_cond \
60         sync_cond \
61         thread_list
62
63 LIBGSTCHECK_EXPORTED_FUNCS = \
64         _gst_check_run_test_func \
65         gst_buffer_straw_get_buffer \
66         gst_buffer_straw_start_pipeline \
67         gst_buffer_straw_stop_pipeline \
68         gst_check_abi_list \
69         gst_check_caps_equal \
70         gst_check_buffer_data \
71         gst_check_chain_func \
72         gst_check_drop_buffers \
73         gst_check_element_push_buffer \
74         gst_check_element_push_buffer_list \
75         gst_check_init \
76         gst_check_message_error \
77         gst_check_run_suite \
78         gst_check_setup_element \
79         gst_check_setup_sink_pad \
80         gst_check_setup_sink_pad_by_name \
81         gst_check_setup_src_pad \
82         gst_check_setup_src_pad_by_name \
83         gst_check_teardown_element \
84         gst_check_teardown_pad_by_name \
85         gst_check_teardown_sink_pad \
86         gst_check_teardown_src_pad \
87         gst_consistency_checker_add_pad \
88         gst_consistency_checker_new \
89         gst_consistency_checker_reset \
90         gst_consistency_checker_free
91
92 LIBGSTCHECK_EXPORTED_SYMBOLS = \
93         $(LIBGSTCHECK_EXPORTED_VARS) \
94         $(LIBGSTCHECK_EXPORTED_FUNCS)
95
96 # Please do not even think about changing the alphabet below into A-Za-z.
97 # It is there for purpose. (Bug #602093)
98 CHECK_SYMS=`$(SED) -n -e 's/^..*CK_EXPORT[ ]\{1,\}\([_0-9ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]\{1,\}\)..*$$/\1/p' @top_srcdir@/libs/gst/check/libcheck/check.h.in`
99 print-check-symbols:
100         @for s in $(CHECK_SYMS); do \
101           echo $$s; \
102         done;
103
104 $(SYMBOLS_FILE):
105         $(AM_V_GEN)rm -f $(SYMBOLS_FILE) 2>/dev/null; \
106         for s in $(LIBGSTCHECK_EXPORTED_SYMBOLS) $(CHECK_SYMS); do \
107           echo $$s >> $(SYMBOLS_FILE); \
108         done
109
110 if HAVE_INTROSPECTION
111 BUILT_GIRSOURCES = GstCheck-@GST_MAJORMINOR@.gir
112
113 gir_headers=$(patsubst %,$(srcdir)/%, $(libgstcheck_@GST_MAJORMINOR@include_HEADERS)) \
114     $(patsubst %,$(builddir)/%, $(nodist_libgstcheck_@GST_MAJORMINOR@include_HEADERS))
115 gir_sources=$(patsubst %,$(srcdir)/%, $(libgstcheck_@GST_MAJORMINOR@_la_SOURCES))
116 gir_cincludes=$(patsubst %,--c-include='gst/check/%',$(libgstcheck_@GST_MAJORMINOR@include_HEADERS)) \
117     $(patsubst %,--c-include='gst/check/%',$(nodist_libgstcheck_@GST_MAJORMINOR@include_HEADERS))
118
119 GstCheck-@GST_MAJORMINOR@.gir: $(INTROSPECTION_SCANNER) libgstcheck-@GST_MAJORMINOR@.la
120         $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
121                 GST_PLUGIN_SYSTEM_PATH="" GST_PLUGIN_PATH="" GST_REGISTRY_UPDATE=no \
122                 $(INTROSPECTION_SCANNER) -v --namespace GstCheck \
123                 --nsversion=@GST_MAJORMINOR@ \
124                 --strip-prefix=Gst \
125                 --warn-all \
126                 -DGST_USE_UNSTABLE_API \
127                 -I$(top_srcdir) \
128                 -I$(top_srcdir)/libs \
129                 -I$(top_builddir) \
130                 -I$(top_builddir)/libs \
131                 $(gir_cincludes) \
132                 --add-include-path=$(top_builddir)/gst \
133                 --library-path=$(top_builddir)/gst \
134                 --library=$(top_builddir)/gst/libgstreamer-0.11.la \
135                 --library=libgstcheck-0.11.la \
136                 --include=Gst-0.11 \
137                 --libtool="$(top_builddir)/libtool" \
138                 --pkg gstreamer-@GST_MAJORMINOR@ \
139                 --pkg-export gstreamer-check-@GST_MAJORMINOR@ \
140                 --add-init-section="gst_init(NULL,NULL);" \
141                 --output $@ \
142                 $(gir_headers) \
143                 $(gir_sources)
144
145 # INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to
146 # install anything - we need to install inside our prefix.
147 girdir = $(datadir)/gir-1.0
148 gir_DATA = $(BUILT_GIRSOURCES)
149
150 typelibsdir = $(libdir)/girepository-1.0/
151
152 typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
153
154 %.typelib: %.gir $(INTROSPECTION_COMPILER)
155         $(AM_V_GEN)$(INTROSPECTION_COMPILER) --includedir=$(srcdir) --includedir=$(builddir) --includedir=$(top_builddir)/gst $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
156
157 CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
158 endif