autotools: Don't use wayland-scanner.m4
[platform/upstream/weston.git] / tests / Makefile.am
1 TESTS = $(shared_tests) $(module_tests) $(weston_tests)
2
3 shared_tests = \
4         config-parser.test
5
6 module_tests =                          \
7         surface-test.la                 \
8         surface-global-test.la
9
10 weston_tests =                          \
11         keyboard.weston                 \
12         event.weston                    \
13         button.weston                   \
14         text.weston                     \
15         subsurface.weston               \
16         $(xwayland_test)
17
18 AM_TESTS_ENVIRONMENT = \
19         abs_builddir='$(abs_builddir)'; export abs_builddir;
20
21 TEST_EXTENSIONS = .la .weston
22 LA_LOG_COMPILER = $(srcdir)/weston-tests-env
23 WESTON_LOG_COMPILER = $(srcdir)/weston-tests-env
24
25 clean-local:
26         -rm -rf logs
27
28 # To remove when automake 1.11 support is dropped
29 export abs_builddir
30
31 noinst_LTLIBRARIES =                    \
32         $(weston_test)
33
34 noinst_PROGRAMS =                       \
35         $(setbacklight)                 \
36         matrix-test
37
38 check_LTLIBRARIES =                     \
39         $(module_tests)
40
41 check_PROGRAMS =                        \
42         $(shared_tests)                 \
43         $(weston_tests)
44
45 AM_CFLAGS = $(GCC_CFLAGS)
46 AM_CPPFLAGS =                                   \
47         -I$(top_srcdir)/src                     \
48         -I$(top_srcdir)/shared                  \
49         -I$(top_builddir)/src                   \
50         -DUNIT_TEST                             \
51         $(COMPOSITOR_CFLAGS)
52 AM_LDFLAGS = -module -avoid-version -rpath $(libdir)
53
54 config_parser_test_LDADD =      \
55         ../shared/libshared.la  \
56         $(COMPOSITOR_LIBS)
57 config_parser_test_SOURCES =    \
58         config-parser-test.c
59
60 surface_global_test_la_SOURCES = surface-global-test.c
61 surface_test_la_SOURCES = surface-test.c
62
63 weston_test = weston-test.la
64 weston_test_la_LIBADD = $(COMPOSITOR_LIBS)      \
65         ../shared/libshared.la
66 weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
67 weston_test_la_SOURCES =                \
68         weston-test.c                   \
69         wayland-test-protocol.c         \
70         wayland-test-server-protocol.h
71
72 weston_test_runner_src =                \
73         weston-test-runner.c            \
74         weston-test-runner.h
75 weston_test_client_src =                \
76         weston-test-client-helper.c     \
77         weston-test-client-helper.h     \
78         wayland-test-protocol.c         \
79         wayland-test-client-protocol.h  \
80         subsurface-protocol.c           \
81         subsurface-client-protocol.h    \
82         $(weston_test_runner_src)
83 weston_test_client_libs =               \
84         $(SIMPLE_CLIENT_LIBS)           \
85         ../shared/libshared.la
86
87 keyboard_weston_SOURCES = keyboard-test.c $(weston_test_client_src)
88 keyboard_weston_LDADD = $(weston_test_client_libs)
89
90 event_weston_SOURCES = event-test.c $(weston_test_client_src)
91 event_weston_LDADD = $(weston_test_client_libs)
92
93 button_weston_SOURCES = button-test.c $(weston_test_client_src)
94 button_weston_LDADD = $(weston_test_client_libs)
95
96 text_weston_SOURCES =                           \
97         text-test.c                             \
98         ../clients/text-protocol.c              \
99         $(weston_test_client_src)
100 text_weston_LDADD = $(weston_test_client_libs)
101
102 subsurface_weston_SOURCES = subsurface-test.c $(weston_test_client_src)
103 subsurface_weston_LDADD = $(weston_test_client_libs)
104
105 xwayland_weston_SOURCES = xwayland-test.c       $(weston_test_client_src)
106
107 xwayland_weston_LDADD = $(weston_test_client_libs) $(XWAYLAND_TEST_LIBS)
108
109 if ENABLE_XWAYLAND_TEST
110 xwayland_test = xwayland.weston
111 endif
112
113 matrix_test_SOURCES =                           \
114         matrix-test.c                           \
115         $(top_srcdir)/shared/matrix.c           \
116         $(top_srcdir)/shared/matrix.h
117 matrix_test_LDADD = -lm -lrt
118
119 setbacklight_SOURCES =                          \
120         setbacklight.c                          \
121         $(top_srcdir)/src/libbacklight.c        \
122         $(top_srcdir)/src/libbacklight.h
123
124 setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
125 setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
126
127 if BUILD_SETBACKLIGHT
128 setbacklight = setbacklight
129 endif
130
131 EXTRA_DIST = weston-tests-env
132
133 BUILT_SOURCES =                                 \
134         subsurface-protocol.c                   \
135         subsurface-client-protocol.h            \
136         wayland-test-protocol.c                 \
137         wayland-test-server-protocol.h          \
138         wayland-test-client-protocol.h
139
140 CLEANFILES = $(BUILT_SOURCES)
141
142 wayland_protocoldir = $(top_srcdir)/protocol
143 include $(top_srcdir)/wayland-scanner.mk