summaryrefslogtreecommitdiff
path: root/test/xi1/Makefile.am
blob: 7a054dd80966ade9b1e2f9d8fd4a593a1af645ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
if ENABLE_UNIT_TESTS
if HAVE_LD_WRAP
noinst_PROGRAMS = tests

TESTS = tests

TESTS_ENVIRONMENT = $(XORG_MALLOC_DEBUG_ENV)

tests_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@
tests_CPPFLAGS = \
	@XORG_INCS@ \
	-I$(srcdir)/.. \
	-I$(srcdir)/../xi2 \
	$()

tests_LDFLAGS = \
	-Wl,-wrap,dixLookupWindow \
	-Wl,-wrap,dixLookupClient \
	-Wl,-wrap,WriteToClient \
	$()

tests_LDADD =../libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLX_SYS_LIBS)

tests_SOURCES = \
	$(srcdir)/../tests-common.c \
	$(srcdir)/../xi2/protocol-common.c \
	protocol-xchangedevicecontrol.c \
	tests.c

if SPECIAL_DTRACE_OBJECTS
tests_LDADD += $(OS_LIB) $(DIX_LIB)
endif

else
# Print that xi1-tests were skipped (exit code 77 for automake test harness)
TESTS = xi1-tests
CLEANFILES = $(TESTS)

xi1-tests:
	@echo 'echo "ld -wrap support required for xi1 unit tests, skipping"' > $@
	@echo 'exit 77' >> $@
	$(AM_V_GEN)chmod +x $@
endif
endif