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