Merge remote-tracking branch 'origin/master' into 0.11
[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_new \
88         gst_consistency_checker_reset \
89         gst_consistency_checker_free
90
91 LIBGSTCHECK_EXPORTED_SYMBOLS = \
92         $(LIBGSTCHECK_EXPORTED_VARS) \
93         $(LIBGSTCHECK_EXPORTED_FUNCS)
94
95 # Please do not even think about changing the alphabet below into A-Za-z.
96 # It is there for purpose. (Bug #602093)
97 CHECK_SYMS=`$(SED) -n -e 's/^..*CK_EXPORT[ ]\{1,\}\([_0-9ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]\{1,\}\)..*$$/\1/p' @top_srcdir@/libs/gst/check/libcheck/check.h.in`
98 print-check-symbols:
99         @for s in $(CHECK_SYMS); do \
100           echo $$s; \
101         done;
102
103 $(SYMBOLS_FILE):
104         $(AM_V_GEN)rm -f $(SYMBOLS_FILE) 2>/dev/null; \
105         for s in $(LIBGSTCHECK_EXPORTED_SYMBOLS) $(CHECK_SYMS); do \
106           echo $$s >> $(SYMBOLS_FILE); \
107         done
108
109 if HAVE_INTROSPECTION
110 BUILT_GIRSOURCES = GstCheck-@GST_MAJORMINOR@.gir
111
112 gir_headers=$(patsubst %,$(srcdir)/%, $(libgstcheck_@GST_MAJORMINOR@include_HEADERS)) \
113     $(patsubst %,$(builddir)/%, $(nodist_libgstcheck_@GST_MAJORMINOR@include_HEADERS))
114 gir_sources=$(patsubst %,$(srcdir)/%, $(libgstcheck_@GST_MAJORMINOR@_la_SOURCES))
115 gir_cincludes=$(patsubst %,--c-include='gst/check/%',$(libgstcheck_@GST_MAJORMINOR@include_HEADERS)) \
116     $(patsubst %,--c-include='gst/check/%',$(nodist_libgstcheck_@GST_MAJORMINOR@include_HEADERS))
117
118 GstCheck-@GST_MAJORMINOR@.gir: $(INTROSPECTION_SCANNER) libgstcheck-@GST_MAJORMINOR@.la
119         $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
120                 GST_PLUGIN_SYSTEM_PATH="" GST_PLUGIN_PATH="" GST_REGISTRY_UPDATE=no \
121                 $(INTROSPECTION_SCANNER) -v --namespace GstCheck \
122                 --nsversion=@GST_MAJORMINOR@ \
123                 --strip-prefix=Gst \
124                 --warn-all \
125                 -DGST_USE_UNSTABLE_API \
126                 -I$(top_srcdir) \
127                 -I$(top_srcdir)/libs \
128                 -I$(top_builddir) \
129                 -I$(top_builddir)/libs \
130                 $(gir_cincludes) \
131                 --add-include-path=$(top_builddir)/gst \
132                 --library-path=$(top_builddir)/gst \
133                 --library=$(top_builddir)/gst/libgstreamer-0.11.la \
134                 --library=libgstcheck-0.11.la \
135                 --include=Gst-0.11 \
136                 --libtool="$(top_builddir)/libtool" \
137                 --pkg gstreamer-@GST_MAJORMINOR@ \
138                 --pkg-export gstreamer-check-@GST_MAJORMINOR@ \
139                 --add-init-section="gst_init(NULL,NULL);" \
140                 --output $@ \
141                 $(gir_headers) \
142                 $(gir_sources)
143
144 # INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to
145 # install anything - we need to install inside our prefix.
146 girdir = $(datadir)/gir-1.0
147 gir_DATA = $(BUILT_GIRSOURCES)
148
149 typelibsdir = $(libdir)/girepository-1.0/
150
151 typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
152
153 %.typelib: %.gir $(INTROSPECTION_COMPILER)
154         $(AM_V_GEN)$(INTROSPECTION_COMPILER) --includedir=$(srcdir) --includedir=$(builddir) --includedir=$(top_builddir)/gst $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
155
156 CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
157 endif