touchpad: normalize the touchpad resolution to 400dpi, not 10 units/mm
[platform/upstream/libinput.git] / test / Makefile.am
1 if BUILD_TESTS
2 AM_CPPFLAGS = -I$(top_srcdir)/include \
3               -I$(top_srcdir)/src \
4               $(CHECK_CFLAGS) \
5               $(LIBEVDEV_CFLAGS) \
6               $(LIBUDEV_CFLAGS)
7
8 AM_CFLAGS = $(GCC_CFLAGS)
9 AM_CXXFLAGS = $(GCC_CXXFLAGS)
10
11 TEST_LIBS = liblitest.la $(CHECK_LIBS) $(LIBUDEV_LIBS) $(LIBEVDEV_LIBS) $(top_builddir)/src/libinput.la
12 noinst_LTLIBRARIES = liblitest.la
13 liblitest_la_SOURCES = \
14         $(top_srcdir)/src/libinput-util.h \
15         $(top_srcdir)/src/libinput-util.c \
16         litest.h \
17         litest-int.h \
18         litest-bcm5974.c \
19         litest-keyboard.c \
20         litest-mouse.c \
21         litest-synaptics.c \
22         litest-synaptics-st.c \
23         litest-synaptics-t440.c \
24         litest-trackpoint.c \
25         litest-wacom-touch.c \
26         litest.c
27
28 run_tests = \
29         test-udev \
30         test-path \
31         test-pointer \
32         test-touch \
33         test-log \
34         test-touchpad \
35         test-misc \
36         test-keyboard
37 build_tests = \
38         test-build-cxx \
39         test-build-linker \
40         test-build-pedantic-c99 \
41         test-build-std-gnuc90
42
43 noinst_PROGRAMS = $(build_tests) $(run_tests)
44 TESTS = $(run_tests)
45
46 .NOTPARALLEL:
47
48 test_udev_SOURCES = udev.c
49 test_udev_LDADD = $(TEST_LIBS)
50 test_udev_LDFLAGS = -static
51
52 test_path_SOURCES = path.c
53 test_path_LDADD = $(TEST_LIBS)
54 test_path_LDFLAGS = -static
55
56 test_pointer_SOURCES = pointer.c
57 test_pointer_LDADD = $(TEST_LIBS)
58 test_pointer_LDFLAGS = -static
59
60 test_touch_SOURCES = touch.c
61 test_touch_LDADD = $(TEST_LIBS)
62 test_touch_LDFLAGS = -static
63
64 test_log_SOURCES = log.c
65 test_log_LDADD = $(TEST_LIBS)
66 test_log_LDFLAGS = -static
67
68 test_touchpad_SOURCES = touchpad.c
69 test_touchpad_LDADD = $(TEST_LIBS)
70 test_touchpad_LDFLAGS = -static
71
72 test_misc_SOURCES = misc.c
73 test_misc_LDADD = $(TEST_LIBS)
74 test_misc_LDFLAGS = -static
75
76 test_keyboard_SOURCES = keyboard.c
77 test_keyboard_LDADD = $(TEST_LIBS)
78 test_keyboard_LDFLAGS = -static
79
80 # build-test only
81 test_build_pedantic_c99_SOURCES = build-pedantic.c
82 test_build_pedantic_c99_CFLAGS = -std=c99 -pedantic -Werror
83
84 test_build_std_gnuc90_SOURCES = build-pedantic.c
85 test_build_std_gnuc90_CFLAGS = -std=gnu90 -Werror
86
87 # test for linking with the minimal linker flags
88 test_build_linker_SOURCES = build-pedantic.c
89 test_build_linker_CFLAGS = -I$(top_srcdir)/src
90 test_build_linker_LDADD = $(top_builddir)/src/libinput.la
91
92 # test including from C++
93 test_build_cxx_SOURCES = build-cxx.cc
94 test_build_cxx_CXXFLAGS = -Wall -Wextra -Wno-unused-parameter $(AM_CXXFLAGS)
95
96 if HAVE_VALGRIND
97 VALGRIND_FLAGS=--leak-check=full \
98                --quiet \
99                --error-exitcode=3 \
100                --suppressions=$(srcdir)/valgrind.suppressions
101
102 valgrind:
103         $(MAKE) check-TESTS LOG_COMPILER="$(VALGRIND)" LOG_FLAGS="$(VALGRIND_FLAGS)" CK_FORK=no
104
105 check: valgrind
106
107 endif
108 endif
109 EXTRA_DIST=valgrind.suppressions