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

3 4
SUBDIRS = virshdata confdata sexpr2xmldata \
  xml2sexprdata xmconfigdata xencapsdata
5

6 7 8 9 10 11
# 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 已提交
12
LIBVIRT = $(wildcard $(top_builddir)/src/.libs/libvirt_la-*.o)
K
Karel Zak 已提交
13 14

INCLUDES = \
15
	-I$(top_srcdir)/gnulib/lib -I../gnulib/lib \
K
Karel Zak 已提交
16 17
	-I$(top_builddir)/include \
	-I$(top_builddir)/src \
18 19
	-I$(top_srcdir)/include \
	-I$(top_srcdir)/src \
20 21
	$(LIBXML_CFLAGS) \
	$(GNUTLS_CFLAGS) \
22
	$(SASL_CFLAGS) \
23
        -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199506L \
24
        -DGETTEXT_PACKAGE=\"$(PACKAGE)\" \
25
         $(COVERAGE_CFLAGS) \
26 27
         $(WARN_CFLAGS)	\
	 $(LIBVIRT_FEATURES)
28

K
Karel Zak 已提交
29 30
LDADDS = \
	@STATIC_BINARIES@ \
31 32
	$(LIBXML_LIBS) \
        $(GNUTLS_LIBS) \
33
        $(SASL_LIBS) \
34
        $(WARN_CFLAGS) \
35
	$(LIBVIRT) \
36
	../gnulib/lib/libgnu.la \
37
        $(COVERAGE_LDFLAGS)
K
Karel Zak 已提交
38

39 40 41 42
EXTRA_DIST =		\
	xmlrpcserver.py	\
	test_conf.sh	\
	qemuxml2argvdata \
J
Jim Meyering 已提交
43
	nodeinfodata
K
Karel Zak 已提交
44

45
noinst_PROGRAMS = xmlrpctest xml2sexprtest sexpr2xmltest virshtest conftest \
46 47
	reconnect xmconfigtest xencapstest qemuxml2argvtest qemuxml2xmltest \
        nodeinfotest
48

49 50 51 52
test_scripts = \
	int-overflow
EXTRA_DIST += $(test_scripts)

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

60 61 62
# 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'
63
TESTS_ENVIRONMENT =				\
64 65
  abs_top_builddir=`pwd`/'$(top_builddir)'	\
  abs_top_srcdir=`pwd`/'$(top_srcdir)'		\
66 67
  $(VG)

68
valgrind:
69
	$(MAKE) check VG="valgrind --quiet --leak-check=full"
70

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

xmlrpctest_LDADD = $(LDADDS)

80 81 82 83 84 85 86 87 88 89
xml2sexprtest_SOURCES = \
	xml2sexprtest.c \
	testutils.c testutils.h
xml2sexprtest_LDADD = $(LDADDS)

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

90 91 92 93 94
xmconfigtest_SOURCES = \
	xmconfigtest.c \
	testutils.c testutils.h
xmconfigtest_LDADD = $(LDADDS)

95 96 97 98 99 100 101 102 103 104
qemuxml2argvtest_SOURCES = \
	qemuxml2argvtest.c \
	testutils.c testutils.h
qemuxml2argvtest_LDADD = $(LDADDS)

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

105 106 107 108 109
virshtest_SOURCES = \
	virshtest.c \
	testutils.c testutils.h
virshtest_LDADD = $(LDADDS)

D
Daniel Veillard 已提交
110 111 112 113
conftest_SOURCES = \
	conftest.c
conftest_LDADD = $(LDADDS)

114 115 116 117
xencapstest_SOURCES = \
	xencapstest.c testutils.h testutils.c
xencapstest_LDADD = $(LDADDS)

118 119 120 121
nodeinfotest_SOURCES = \
	nodeinfotest.c testutils.h testutils.c
nodeinfotest_LDADD = $(LDADDS)

122 123 124 125
reconnect_SOURCES = \
	reconnect.c
reconnect_LDADD = $(LDADDS)

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