Makefile.am 3.0 KB
Newer Older
K
Karel Zak 已提交
1 2
## Process this file with automake to produce Makefile.in

3
SUBDIRS = virshdata confdata sexpr2xmldata xml2sexprdata xmconfigdata xencapsdata
4

5 6 7 8 9 10
# Wierd libtool related juju...
#
# We explicitly want wildcard here instead of just linking
# to the libvirt.a file. This ensures that when coverage
# tests are run, all the output data ends up in the correct
# location. ie, src/ instead of src/.libs.
D
Daniel P. Berrange 已提交
11
LIBVIRT = $(wildcard $(top_builddir)/src/.libs/libvirt_la-*.o)
K
Karel Zak 已提交
12 13 14 15

INCLUDES = \
	-I$(top_builddir)/include \
	-I$(top_builddir)/src \
16 17
	-I$(top_srcdir)/include \
	-I$(top_srcdir)/src \
18 19
	$(LIBXML_CFLAGS) \
	$(GNUTLS_CFLAGS) \
20
	$(SASL_CFLAGS) \
21
        -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199506L \
22
        -DGETTEXT_PACKAGE=\"$(PACKAGE)\" \
23
         $(COVERAGE_CFLAGS) \
24 25
         $(WARN_CFLAGS)	\
	 $(LIBVIRT_FEATURES)
26

K
Karel Zak 已提交
27 28
LDADDS = \
	@STATIC_BINARIES@ \
29 30
	$(LIBXML_LIBS) \
        $(GNUTLS_LIBS) \
31
        $(SASL_LIBS) \
32
        $(WARN_CFLAGS) \
33 34
	$(LIBVIRT) \
        $(COVERAGE_LDFLAGS)
K
Karel Zak 已提交
35

36 37 38 39
EXTRA_DIST =		\
	xmlrpcserver.py	\
	test_conf.sh	\
	qemuxml2argvdata \
J
Jim Meyering 已提交
40
	nodeinfodata
K
Karel Zak 已提交
41

42
noinst_PROGRAMS = xmlrpctest xml2sexprtest sexpr2xmltest virshtest conftest \
43 44
	reconnect xmconfigtest xencapstest qemuxml2argvtest qemuxml2xmltest \
        nodeinfotest
45

46 47 48 49
test_scripts = \
	int-overflow
EXTRA_DIST += $(test_scripts)

50
TESTS = xml2sexprtest sexpr2xmltest virshtest test_conf.sh xmconfigtest \
51
        xencapstest qemuxml2argvtest qemuxml2xmltest nodeinfotest \
52
	$(test_scripts)
53 54 55
if ENABLE_XEN_TESTS
  TESTS += reconnect
endif
K
Karel Zak 已提交
56

57 58 59
# NB, automake < 1.10 does not provide the real
# abs_top_{src/build}dir variables, so don't rely
# on them here. Fake them with 'pwd'
60
TESTS_ENVIRONMENT =				\
61 62
  abs_top_builddir=`pwd`/'$(top_builddir)'	\
  abs_top_srcdir=`pwd`/'$(top_srcdir)'		\
63 64
  $(VG)

65
valgrind:
66
	$(MAKE) check VG="valgrind --quiet --leak-check=full"
67

K
Karel Zak 已提交
68 69 70 71
# Note: xmlrpc.[c|h] is not in libvirt yet
xmlrpctest_SOURCES = \
	xmlrpctest.c \
	testutils.c testutils.h \
72 73
	@top_srcdir@/src/xmlrpc.c \
	@top_srcdir@/src/xmlrpc.h
K
Karel Zak 已提交
74 75 76

xmlrpctest_LDADD = $(LDADDS)

77 78 79 80 81 82 83 84 85 86
xml2sexprtest_SOURCES = \
	xml2sexprtest.c \
	testutils.c testutils.h
xml2sexprtest_LDADD = $(LDADDS)

sexpr2xmltest_SOURCES = \
	sexpr2xmltest.c \
	testutils.c testutils.h
sexpr2xmltest_LDADD = $(LDADDS)

87 88 89 90 91
xmconfigtest_SOURCES = \
	xmconfigtest.c \
	testutils.c testutils.h
xmconfigtest_LDADD = $(LDADDS)

92 93 94 95 96 97 98 99 100 101
qemuxml2argvtest_SOURCES = \
	qemuxml2argvtest.c \
	testutils.c testutils.h
qemuxml2argvtest_LDADD = $(LDADDS)

qemuxml2xmltest_SOURCES = \
	qemuxml2xmltest.c \
	testutils.c testutils.h
qemuxml2xmltest_LDADD = $(LDADDS)

102 103 104 105 106
virshtest_SOURCES = \
	virshtest.c \
	testutils.c testutils.h
virshtest_LDADD = $(LDADDS)

D
Daniel Veillard 已提交
107 108 109 110
conftest_SOURCES = \
	conftest.c
conftest_LDADD = $(LDADDS)

111 112 113 114
xencapstest_SOURCES = \
	xencapstest.c testutils.h testutils.c
xencapstest_LDADD = $(LDADDS)

115 116 117 118
nodeinfotest_SOURCES = \
	nodeinfotest.c testutils.h testutils.c
nodeinfotest_LDADD = $(LDADDS)

119 120 121 122
reconnect_SOURCES = \
	reconnect.c
reconnect_LDADD = $(LDADDS)

K
Karel Zak 已提交
123 124
$(LIBVIRT):
	-@(cd $(top_builddir)/src && $(MAKE) MAKEFLAGS+=--silent)