Imported Upstream version 1.15.1
[deb_xorg-server.git] / test / xi2 / Makefile.am
CommitLineData
a09e091a
JB
1if ENABLE_UNIT_TESTS
2if HAVE_LD_WRAP
3noinst_PROGRAMS = \
4 protocol-xiqueryversion \
5 protocol-xiquerydevice \
6 protocol-xiselectevents \
7 protocol-xigetselectedevents \
8 protocol-xisetclientpointer \
9 protocol-xigetclientpointer \
10 protocol-xipassivegrabdevice \
11 protocol-xiquerypointer \
12 protocol-xiwarppointer \
13 protocol-eventconvert \
14 xi2
15
16TESTS=$(noinst_PROGRAMS)
17TESTS_ENVIRONMENT = $(XORG_MALLOC_DEBUG_ENV)
18
19AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@
20AM_CPPFLAGS = @XORG_INCS@
21TEST_LDADD=../libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLX_SYS_LIBS)
22COMMON_SOURCES=protocol-common.h protocol-common.c
23
24if SPECIAL_DTRACE_OBJECTS
25TEST_LDADD += $(OS_LIB) $(DIX_LIB)
26endif
27
28protocol_xiqueryversion_LDADD=$(TEST_LDADD)
29protocol_xiquerydevice_LDADD=$(TEST_LDADD)
30protocol_xiselectevents_LDADD=$(TEST_LDADD)
31protocol_xigetselectedevents_LDADD=$(TEST_LDADD)
32protocol_xisetclientpointer_LDADD=$(TEST_LDADD)
33protocol_xigetclientpointer_LDADD=$(TEST_LDADD)
34protocol_xiquerypointer_LDADD=$(TEST_LDADD)
35protocol_xipassivegrabdevice_LDADD=$(TEST_LDADD)
36protocol_xiwarppointer_LDADD=$(TEST_LDADD)
37protocol_eventconvert_LDADD=$(TEST_LDADD)
38xi2_LDADD=$(TEST_LDADD)
39
40protocol_xiqueryversion_LDFLAGS=$(AM_LDFLAGS) -Wl,-wrap,WriteToClient
41protocol_xiquerydevice_LDFLAGS=$(AM_LDFLAGS) -Wl,-wrap,WriteToClient
42protocol_xiselectevents_LDFLAGS=$(AM_LDFLAGS) -Wl,-wrap,dixLookupWindow -Wl,-wrap,XISetEventMask
43protocol_xigetselectedevents_LDFLAGS=$(AM_LDFLAGS) -Wl,-wrap,WriteToClient -Wl,-wrap,dixLookupWindow -Wl,-wrap,AddResource
44protocol_xisetclientpointer_LDFLAGS=$(AM_LDFLAGS) -Wl,-wrap,dixLookupClient
45protocol_xigetclientpointer_LDFLAGS=$(AM_LDFLAGS) -Wl,-wrap,WriteToClient -Wl,-wrap,dixLookupClient
46protocol_xipassivegrabdevice_LDFLAGS=$(AM_LDFLAGS) -Wl,-wrap,GrabButton -Wl,-wrap,dixLookupWindow -Wl,-wrap,WriteToClient
47protocol_xiquerypointer_LDFLAGS=$(AM_LDFLAGS) -Wl,-wrap,WriteToClient -Wl,-wrap,dixLookupWindow
48protocol_xiwarppointer_LDFLAGS=$(AM_LDFLAGS) -Wl,-wrap,WriteToClient -Wl,-wrap,dixLookupWindow
49xi2_LDFLAGS=$(AM_LDFLAGS)
50
51protocol_xiqueryversion_SOURCES=$(COMMON_SOURCES) protocol-xiqueryversion.c
52protocol_xiquerydevice_SOURCES=$(COMMON_SOURCES) protocol-xiquerydevice.c
53protocol_xiselectevents_SOURCES=$(COMMON_SOURCES) protocol-xiselectevents.c
54protocol_xigetselectedevents_SOURCES=$(COMMON_SOURCES) protocol-xigetselectedevents.c
55protocol_xisetclientpointer_SOURCES=$(COMMON_SOURCES) protocol-xisetclientpointer.c
56protocol_xigetclientpointer_SOURCES=$(COMMON_SOURCES) protocol-xigetclientpointer.c
57protocol_xiquerypointer_SOURCES=$(COMMON_SOURCES) protocol-xiquerypointer.c
58protocol_xipassivegrabdevice_SOURCES=$(COMMON_SOURCES) protocol-xipassivegrabdevice.c
59protocol_xiwarppointer_SOURCES=$(COMMON_SOURCES) protocol-xiwarppointer.c
60else
61# Print that xi2-tests were skipped (exit code 77 for automake test harness)
62TESTS = xi2-tests
63CLEANFILES = $(TESTS)
64
65xi2-tests:
66 @echo 'echo "ld -wrap support required for xi2 unit tests, skipping"' > $@
67 @echo 'exit 77' >> $@
68 $(AM_V_GEN)chmod +x $@
69endif
70endif