check/Makefile.am: Use CHECK_CFLAGS and CHECK_LIBS
[platform/upstream/gstreamer.git] / check / Makefile.am
1 include $(top_srcdir)/common/check.mak
2
3 CHECK_REGISTRY=$(top_builddir)/check/test-registry.xml
4
5 GST_TOOLS_DIR = $(top_builddir)/tools
6
7 TESTS_ENVIRONMENT=\
8         GST_PLUGIN_PATH_ONLY=yes \
9         GST_PLUGIN_PATH=$(top_builddir)/gst \
10         GST_REGISTRY=$(CHECK_REGISTRY)
11
12 plugindir = $(libdir)/gstreamer-@GST_MAJORMINOR@
13
14 # rebuild gst-register-@GST_MAJORMINOR@ if needed
15 $(top_builddir)/tools/gst-register-@GST_MAJORMINOR@$(EXEEXT):
16         cd $(top_builddir)/tools && make
17
18 # override to _not_ install the test plugins
19 install-pluginLTLIBRARIES:
20
21 # ths core dumps of some machines have PIDs appended
22 CLEANFILES = core.* test-registry.xml
23
24 SUPPRESSIONS = $(top_srcdir)/common/gst.supp
25
26 clean-local: clean-local-check
27
28 $(CHECK_REGISTRY):
29         $(TESTS_ENVIRONMENT)                                    \
30         $(top_builddir)/tools/gst-register
31
32 # FIXME: it'd be nicer to run the versioned register, but in that case
33 # "make dist" complains about not finding gst-register-0.9.c
34 TESTS = $(top_builddir)/tools/gst-register      \
35         gst/gst                                 \
36         gst/gstbin                              \
37         gst/gstbuffer                           \
38         gst/gstbus                              \
39         gst/gstcaps                             \
40         gst/gstelement                          \
41         gst/gstevent                            \
42         gst/gstghostpad                         \
43         gst/gstiterator                         \
44         gst/gstmessage                          \
45         gst/gstminiobject                       \
46         gst/gstobject                           \
47         gst/gstpad                              \
48         gst/gstsystemclock                      \
49         gst/gststructure                        \
50         gst/gsttag                              \
51         gst/gstvalue                            \
52         elements/fakesrc                        \
53         elements/identity                       \
54         pipelines/simple_launch_lines           \
55         pipelines/cleanup                       \
56         states/sinks                            \
57         gst-libs/controller                     \
58         gst-libs/gdp
59
60 check_PROGRAMS = $(TESTS)
61
62 noinst_HEADERS = gst/capslist.h
63
64 AM_CFLAGS = $(GST_OBJ_CFLAGS) $(CHECK_CFLAGS)
65 LDADD = $(GST_OBJ_LIBS) \
66         $(top_builddir)/gst/check/libgstcheck-@GST_MAJORMINOR@.la \
67         $(CHECK_LIBS)
68
69 gst_libs_gdp_SOURCES = \
70         gst-libs/gdp.c \
71         $(top_srcdir)/libs/gst/dataprotocol/dataprotocol.c
72 # remove GST_ENABLE_NEW when dataprotocol has been declared API-stable
73 gst_libs_gdp_CFLAGS = $(AM_CFLAGS) -DGST_ENABLE_NEW
74
75 gst_libs_controller_LDADD = $(GST_OBJ_LIBS) \
76         $(top_builddir)/gst/check/libgstcheck-@GST_MAJORMINOR@.la \
77         $(CHECK_LIBS) \
78         $(top_builddir)/libs/gst/controller/libgstcontroller-@GST_MAJORMINOR@.la 
79
80 # valgrind testing
81 # these just need valgrind fixing, period
82 TESTS_TO_FIX =                                  \
83         gst-libs/controller                     \
84         pipelines/cleanup                       \
85         pipelines/simple_launch_lines
86
87 # these need fixing because the threads cause segfaults under valgrind
88 TESTS_THREADED =                                \
89         gst/gstminiobject                       \
90         gst/gstobject
91
92 VALGRIND_TESTS_DISABLE =                        \
93         $(top_builddir)/tools/gst-register      \
94         $(TESTS_THREADED)                       \
95         $(TESTS_TO_FIX)