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

3
## Copyright (C) 2005-2012 Red Hat, Inc.
4 5
## See COPYING.LIB for the License of this software

6 7
SHELL = $(PREFERABLY_POSIX_SHELL)

K
Karel Zak 已提交
8
INCLUDES = \
9
	-I$(top_builddir) -I$(top_srcdir) \
10 11 12
	-I$(top_builddir)/gnulib/lib -I$(top_srcdir)/gnulib/lib \
	-I$(top_builddir)/include -I$(top_srcdir)/include \
	-I$(top_builddir)/src -I$(top_srcdir)/src \
13
	-I$(top_srcdir)/src/util \
14 15
	-I$(top_srcdir)/src/conf \
	$(GETTEXT_CPPFLAGS)
E
Eric Blake 已提交
16 17

AM_CFLAGS = \
18 19
	$(LIBXML_CFLAGS) \
	$(GNUTLS_CFLAGS) \
20
	$(SASL_CFLAGS) \
21
	$(SELINUX_CFLAGS) \
J
Jamie Strandboge 已提交
22
	$(APPARMOR_CFLAGS) \
23
	$(YAJL_CFLAGS) \
E
Eric Blake 已提交
24 25
	$(COVERAGE_CFLAGS) \
	$(WARN_CFLAGS)
26

27 28 29 30 31
if WITH_DRIVER_MODULES
INCLUDES += \
	-DTEST_DRIVER_DIR=\"$(top_builddir)/src/.libs\"
endif

32
PROBES_O =
33
if WITH_DTRACE_PROBES
34
PROBES_O += ../src/libvirt_probes.lo
35 36
endif

K
Karel Zak 已提交
37
LDADDS = \
38
        $(WARN_CFLAGS) \
39
	$(PROBES_O) \
40 41
	../src/libvirt.la \
	../gnulib/lib/libgnu.la
K
Karel Zak 已提交
42

43
EXTRA_DIST =		\
44
	capabilityschemadata \
E
Eric Blake 已提交
45 46 47 48
	capabilityschematest \
	commanddata \
	confdata \
	cputestdata \
49
	domainschemadata \
E
Eric Blake 已提交
50 51 52 53
	domainschematest \
	domainsnapshotschematest \
	domainsnapshotxml2xmlin \
	domainsnapshotxml2xmlout \
54
	interfaceschemadata \
55
	lxcxml2xmldata \
E
Eric Blake 已提交
56 57 58
	networkschematest \
	networkxml2xmlin \
	networkxml2xmlout \
59
	networkxml2argvdata \
E
Eric Blake 已提交
60 61 62 63 64 65 66 67 68 69
	nodedevschemadata \
	nodedevschematest \
	nodeinfodata     \
	nwfilterschematest \
	nwfilterxml2xmlin \
	nwfilterxml2xmlout \
	oomtrace.pl \
	qemuhelpdata \
	qemuxml2argvdata \
	qemuxml2xmloutdata \
P
Philipp Hahn 已提交
70
	qemuxmlnsdata \
E
Eric Blake 已提交
71 72
	schematestutils.sh \
	sexpr2xmldata \
73
	storagepoolschematest \
74
	storagepoolxml2xmlin \
E
Eric Blake 已提交
75
	storagepoolxml2xmlout \
76
	storagevolschematest \
77
	storagevolxml2xmlin \
E
Eric Blake 已提交
78 79
	storagevolxml2xmlout \
	test-lib.sh	\
80
	vmx2xmldata \
E
Eric Blake 已提交
81 82 83
	xencapsdata \
	xmconfigdata \
	xml2sexprdata \
84 85
	xml2vmxdata \
	.valgrind.supp
K
Karel Zak 已提交
86

87 88
test_helpers = commandhelper ssh conftest
test_programs = virshtest sockettest \
E
Eric Blake 已提交
89
	nodeinfotest virbuftest \
90 91
	commandtest seclabeltest \
	virhashtest virnetmessagetest virnetsockettest \
92
	viratomictest \
93
	utiltest virnettlscontexttest shunloadtest \
94 95
	virtimetest viruritest virkeyfiletest \
	virauthconfigtest
96

97 98 99 100
if WITH_SECDRIVER_SELINUX
test_programs += securityselinuxtest
endif

101 102 103 104
if WITH_DRIVER_MODULES
test_programs += virdrivermoduletest
endif

105 106 107
# This is a fake SSH we use from virnetsockettest
ssh_SOURCES = ssh.c
ssh_LDADD = $(COVERAGE_LDFLAGS)
108

109
if WITH_XEN
110
test_programs += xml2sexprtest sexpr2xmltest \
111
	xmconfigtest xencapstest statstest reconnect
112
endif
113
if WITH_QEMU
114
test_programs += qemuxml2argvtest qemuxml2xmltest qemuxmlnstest \
115 116
	qemuargv2xmltest qemuhelptest domainsnapshotxml2xmltest \
	qemumonitortest
117 118
endif

119
if WITH_LXC
120
test_programs += lxcxml2xmltest
121 122
endif

123
if WITH_OPENVZ
124
test_programs += openvzutilstest
125 126
endif

127
if WITH_ESX
128
test_programs += esxutilstest
129 130 131
endif

if WITH_VMX
132
test_programs += vmx2xmltest xml2vmxtest
133 134
endif

135
if WITH_CIL
136
test_programs += object-locking
137 138
endif

139
if HAVE_YAJL
140
test_programs += jsontest
141 142
endif

143
test_programs += networkxml2xmltest
144

145
if WITH_NETWORK
146
test_programs += networkxml2argvtest
147
endif
148

149 150 151 152
if WITH_STORAGE_SHEEPDOG
test_programs += storagebackendsheepdogtest
endif

153
test_programs += nwfilterxml2xmltest
154

155
test_programs += storagevolxml2xmltest storagepoolxml2xmltest
156

157
test_programs += nodedevxml2xmltest
M
Mark McLoughlin 已提交
158

159
test_programs += interfacexml2xmltest
160

161
test_programs += cputest
162

163 164
test_scripts = \
	capabilityschematest \
165
	interfaceschematest \
166 167 168 169
	networkschematest \
	storagepoolschematest \
	storagevolschematest \
	domainschematest \
170
	nodedevschematest \
171 172
	nwfilterschematest \
	domainsnapshotschematest
173

A
Atsushi SAKAI 已提交
174
if WITH_LIBVIRTD
175 176 177 178 179
test_scripts +=				\
	test_conf.sh			\
	cpuset				\
	define-dev-segfault		\
	int-overflow			\
J
Jim Meyering 已提交
180 181
	libvirtd-fail			\
	libvirtd-pool			\
182 183 184 185 186 187
	read-bufsiz			\
	read-non-seekable		\
	start				\
	undefine			\
	vcpupin				\
	virsh-all			\
188
	virsh-optparse			\
189
	virsh-schedinfo			\
J
Jim Meyering 已提交
190
	virsh-synopsis
191

192 193 194
test_programs += 			\
	eventtest			\
	libvirtdconftest
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211
else
EXTRA_DIST += 				\
	test_conf.sh			\
	cpuset				\
	define-dev-segfault		\
	int-overflow			\
	libvirtd-fail			\
	libvirtd-pool			\
	read-bufsiz			\
	read-non-seekable		\
	start				\
	undefine			\
	vcpupin				\
	virsh-all			\
	virsh-optparse			\
	virsh-schedinfo			\
	virsh-synopsis
A
Atsushi SAKAI 已提交
212
endif
213

J
Jamie Strandboge 已提交
214 215
if WITH_SECDRIVER_APPARMOR
test_scripts += virt-aa-helper-test
216 217
else
EXTRA_DIST += virt-aa-helper-test
J
Jamie Strandboge 已提交
218
endif
219

220 221
EXTRA_DIST += $(test_scripts)

222 223 224 225 226
test_libraries = libshunload.la
if WITH_QEMU
test_libraries += libqemumonitortestutils.la
endif

227 228
if WITH_TESTS
noinst_PROGRAMS = $(test_programs) $(test_helpers)
229
noinst_LTLIBRARIES = $(test_libraries)
230 231
else
check_PROGRAMS = $(test_programs) $(test_helpers)
232
check_LTLIBRARIES = $(test_libraries)
233
endif
234

235 236
TESTS = $(test_programs) \
	$(test_scripts)
237

238
# NB, automake < 1.10 does not provide the real
239
# abs_top_{src/build}dir or builddir variables, so don't rely
240
# on them here. Fake them with 'pwd'
241 242 243 244 245 246
# Also, BSD sh doesn't like 'a=b b=$$a', so we can't use an
# intermediate shell variable, but must do all the expansion in make

lv_abs_top_builddir=`cd '$(top_builddir)'; pwd`
path_add = $(lv_abs_top_builddir)/daemon$(PATH_SEPARATOR)$(lv_abs_top_builddir)/tools$(PATH_SEPARATOR)$(lv_abs_top_builddir)/tests

247
TESTS_ENVIRONMENT =				\
248
  abs_top_builddir=$(lv_abs_top_builddir)	\
J
Jim Meyering 已提交
249
  abs_top_srcdir=`cd '$(top_srcdir)'; pwd`	\
250
  abs_builddir=`pwd`				\
251
  abs_srcdir=`cd '$(srcdir)'; pwd`		\
252
  CONFIG_HEADER="`cd '$(top_builddir)'; pwd`/config.h"	\
J
Jim Meyering 已提交
253
  PATH="$(path_add)$(PATH_SEPARATOR)$$PATH"	\
254
  SHELL="$(SHELL)"				\
255
  LIBVIRT_DRIVER_DIR="$(abs_top_builddir)/src/.libs" \
256
  LIBVIRT_AUTOSTART=0				\
257
  LC_ALL=C					\
258 259
  $(VG)

260

261
valgrind:
262
	$(MAKE) check VG="libtool --mode=execute valgrind --quiet --leak-check=full --suppressions=$(srcdir)/.valgrind.supp"
263

264 265 266
sockettest_SOURCES = \
	sockettest.c \
	testutils.c testutils.h
267
sockettest_LDADD = $(LDADDS)
268

269
if WITH_XEN
E
Eric Blake 已提交
270
xen_LDADDS = ../src/libvirt_driver_xen_impl.la
271 272
xen_LDADDS += $(LDADDS)

273
xml2sexprtest_SOURCES = \
274
	xml2sexprtest.c testutilsxen.c testutilsxen.h \
275
	testutils.c testutils.h
276
xml2sexprtest_LDADD = $(xen_LDADDS)
277 278

sexpr2xmltest_SOURCES = \
279
	sexpr2xmltest.c testutilsxen.c testutilsxen.h \
280
	testutils.c testutils.h
281
sexpr2xmltest_LDADD = $(xen_LDADDS)
282

283
xmconfigtest_SOURCES = \
284
	xmconfigtest.c testutilsxen.c testutilsxen.h \
285
	testutils.c testutils.h
286
xmconfigtest_LDADD = $(xen_LDADDS)
287

288 289
xencapstest_SOURCES = \
	xencapstest.c testutils.h testutils.c
290
xencapstest_LDADD = $(xen_LDADDS)
291 292

reconnect_SOURCES = \
293
	reconnect.c testutils.h testutils.c
294 295
reconnect_LDADD = $(LDADDS)

296 297
statstest_SOURCES = \
	statstest.c testutils.h testutils.c
298
statstest_LDADD = $(xen_LDADDS)
299

300 301 302 303 304 305
else
EXTRA_DIST += xml2sexprtest.c sexpr2xmltest.c xmconfigtest.c \
	xencapstest.c reconnect.c \
	testutilsxen.c testutilsxen.h
endif

306 307 308 309 310
QEMUMONITORTESTUTILS_SOURCES = \
	qemumonitortestutils.c \
	qemumonitortestutils.h \
	$(NULL)

311
if WITH_QEMU
312

313 314 315 316 317
libqemumonitortestutils_la_SOURCES = $(QEMUMONITORTESTUTILS_SOURCES)
libqemumonitortestutils_la_CFLAGS = \
	-Dabs_builddir="\"`pwd`\"" $(AM_CFLAGS)


318
qemu_LDADDS = ../src/libvirt_driver_qemu_impl.la
319
if WITH_NETWORK
E
Eric Blake 已提交
320
qemu_LDADDS += ../src/libvirt_driver_network_impl.la
321
endif
322
if WITH_DTRACE_PROBES
323
qemu_LDADDS += ../src/libvirt_qemu_probes.lo
324
endif
325
qemu_LDADDS += $(LDADDS)
326

327
qemuxml2argvtest_SOURCES = \
328
	qemuxml2argvtest.c testutilsqemu.c testutilsqemu.h \
329
	testutils.c testutils.h
330
qemuxml2argvtest_LDADD = $(qemu_LDADDS)
331 332

qemuxml2xmltest_SOURCES = \
333
	qemuxml2xmltest.c testutilsqemu.c testutilsqemu.h \
334
	testutils.c testutils.h
335
qemuxml2xmltest_LDADD = $(qemu_LDADDS)
336

P
Philipp Hahn 已提交
337 338 339
qemuxmlnstest_SOURCES = \
	qemuxmlnstest.c testutilsqemu.c testutilsqemu.h \
	testutils.c testutils.h
340
qemuxmlnstest_LDADD = $(qemu_LDADDS)
P
Philipp Hahn 已提交
341

342 343 344
qemuargv2xmltest_SOURCES = \
	qemuargv2xmltest.c testutilsqemu.c testutilsqemu.h \
	testutils.c testutils.h
345
qemuargv2xmltest_LDADD = $(qemu_LDADDS)
346 347

qemuhelptest_SOURCES = qemuhelptest.c testutils.c testutils.h
348
qemuhelptest_LDADD = $(qemu_LDADDS)
349

350
qemumonitortest_SOURCES = qemumonitortest.c testutils.c testutils.h
351
qemumonitortest_LDADD = $(qemu_LDADDS)
352

353 354 355
domainsnapshotxml2xmltest_SOURCES = \
	domainsnapshotxml2xmltest.c testutilsqemu.c testutilsqemu.h \
	testutils.c testutils.h
356
domainsnapshotxml2xmltest_LDADD = $(qemu_LDADDS)
357
else
358 359
EXTRA_DIST += qemuxml2argvtest.c qemuxml2xmltest.c qemuargv2xmltest.c \
	qemuxmlnstest.c qemuhelptest.c domainsnapshotxml2xmltest.c \
360 361
	qemumonitortest.c testutilsqemu.c testutilsqemu.h \
	$(QEMUMONITORTESTUTILS_SOURCES)
362
endif
363

364 365
if WITH_LXC

E
Eric Blake 已提交
366
lxc_LDADDS = ../src/libvirt_driver_lxc_impl.la
367
if WITH_NETWORK
E
Eric Blake 已提交
368
lxc_LDADDS += ../src/libvirt_driver_network_impl.la
369 370
endif
lxc_LDADDS += $(LDADDS)
371 372 373 374

lxcxml2xmltest_SOURCES = \
	lxcxml2xmltest.c testutilslxc.c testutilslxc.h \
	testutils.c testutils.h
375
lxcxml2xmltest_LDADD = $(lxc_LDADDS)
376 377 378 379
else
EXTRA_DIST += lxcxml2xmltest.c testutilslxc.c testutilslxc.h
endif

380 381 382 383
if WITH_OPENVZ
openvzutilstest_SOURCES = \
	openvzutilstest.c \
	testutils.c testutils.h
384
openvzutilstest_LDADD = $(LDADDS)
385 386 387 388 389
else
EXTRA_DIST += openvzutilstest.c
endif
EXTRA_DIST += openvzutilstest.conf

390 391 392 393
if WITH_ESX
esxutilstest_SOURCES = \
	esxutilstest.c \
	testutils.c testutils.h
394
esxutilstest_LDADD = $(LDADDS)
395 396 397
else
EXTRA_DIST += esxutilstest.c
endif
398

399
if WITH_VMX
400 401 402
vmx2xmltest_SOURCES = \
	vmx2xmltest.c \
	testutils.c testutils.h
403
vmx2xmltest_LDADD = $(LDADDS)
404 405 406 407

xml2vmxtest_SOURCES = \
	xml2vmxtest.c \
	testutils.c testutils.h
408
xml2vmxtest_LDADD = $(LDADDS)
409
else
410
EXTRA_DIST += vmx2xmltest.c xml2vmxtest.c
411 412
endif

413 414 415 416 417
networkxml2xmltest_SOURCES = \
	networkxml2xmltest.c \
	testutils.c testutils.h
networkxml2xmltest_LDADD = $(LDADDS)

418
if WITH_NETWORK
419 420 421
networkxml2argvtest_SOURCES = \
	networkxml2argvtest.c \
	testutils.c testutils.h
E
Eric Blake 已提交
422
networkxml2argvtest_LDADD = ../src/libvirt_driver_network_impl.la $(LDADDS)
423 424 425
else
EXTRA_DIST += networkxml2argvtest.c
endif
426

427 428 429 430
if WITH_STORAGE_SHEEPDOG
storagebackendsheepdogtest_SOURCES = \
	storagebackendsheepdogtest.c \
	testutils.c testutils.h
431 432
storagebackendsheepdogtest_LDADD = \
	../src/libvirt_driver_storage_impl.la $(LDADDS)
433 434 435 436
else
EXTRA_DIST += storagebackendsheepdogtest.c
endif

437 438 439 440 441
nwfilterxml2xmltest_SOURCES = \
	nwfilterxml2xmltest.c \
	testutils.c testutils.h
nwfilterxml2xmltest_LDADD = $(LDADDS)

442 443 444 445 446
storagevolxml2xmltest_SOURCES = \
	storagevolxml2xmltest.c \
	testutils.c testutils.h
storagevolxml2xmltest_LDADD = $(LDADDS)

447 448 449 450 451
storagepoolxml2xmltest_SOURCES = \
	storagepoolxml2xmltest.c \
	testutils.c testutils.h
storagepoolxml2xmltest_LDADD = $(LDADDS)

M
Mark McLoughlin 已提交
452 453 454
nodedevxml2xmltest_SOURCES = \
	nodedevxml2xmltest.c \
	testutils.c testutils.h
455
nodedevxml2xmltest_LDADD = $(LDADDS)
M
Mark McLoughlin 已提交
456

457 458 459 460 461
interfacexml2xmltest_SOURCES = \
	interfacexml2xmltest.c \
	testutils.c testutils.h
interfacexml2xmltest_LDADD = $(LDADDS)

462 463 464 465 466
cputest_SOURCES = \
	cputest.c \
	testutils.c testutils.h
cputest_LDADD = $(LDADDS)

467 468 469 470 471
virshtest_SOURCES = \
	virshtest.c \
	testutils.c testutils.h
virshtest_LDADD = $(LDADDS)

D
Daniel Veillard 已提交
472 473 474 475
conftest_SOURCES = \
	conftest.c
conftest_LDADD = $(LDADDS)

476 477 478 479
nodeinfotest_SOURCES = \
	nodeinfotest.c testutils.h testutils.c
nodeinfotest_LDADD = $(LDADDS)

480 481
commandtest_SOURCES = \
	commandtest.c testutils.h testutils.c
E
Eric Blake 已提交
482
commandtest_CFLAGS = -Dabs_builddir="\"`pwd`\"" $(AM_CFLAGS)
483 484 485 486
commandtest_LDADD = $(LDADDS)

commandhelper_SOURCES = \
	commandhelper.c
E
Eric Blake 已提交
487
commandhelper_CFLAGS = -Dabs_builddir="\"`pwd`\"" $(AM_CFLAGS)
488
commandhelper_LDADD = $(LDADDS)
489
commandhelper_LDFLAGS = -static
490

491 492 493 494 495 496 497 498 499 500
if WITH_LIBVIRTD
libvirtdconftest_SOURCES = \
	libvirtdconftest.c testutils.h testutils.c \
	../daemon/libvirtd-config.c
libvirtdconftest_CFLAGS = $(AM_CFLAGS)
libvirtdconftest_LDADD = $(LDADDS)
else
EXTRA_DIST += libvirtdconftest.c
endif

501 502
virnetmessagetest_SOURCES = \
	virnetmessagetest.c testutils.h testutils.c
E
Eric Blake 已提交
503 504
virnetmessagetest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" \
		$(XDR_CFLAGS) $(AM_CFLAGS)
505
virnetmessagetest_LDADD = $(LDADDS)
506

507 508
virnetsockettest_SOURCES = \
	virnetsockettest.c testutils.h testutils.c
E
Eric Blake 已提交
509
virnetsockettest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
510
virnetsockettest_LDADD = $(LDADDS)
511

512
virnettlscontexttest_SOURCES = \
E
Eric Blake 已提交
513
	virnettlscontexttest.c testutils.h testutils.c
514
virnettlscontexttest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
515
virnettlscontexttest_LDADD = $(LDADDS)
E
Eric Blake 已提交
516 517 518 519 520 521
if HAVE_LIBTASN1
virnettlscontexttest_SOURCES += pkix_asn1_tab.c
virnettlscontexttest_LDADD += -ltasn1
else
EXTRA_DIST += pkix_asn1_tab.c
endif
522

523 524 525
virtimetest_SOURCES = \
	virtimetest.c testutils.h testutils.c
virtimetest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
526
virtimetest_LDADD = $(LDADDS)
527

528 529 530
viruritest_SOURCES = \
	viruritest.c testutils.h testutils.c
viruritest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
531
viruritest_LDADD = $(LDADDS)
532

533 534 535
virkeyfiletest_SOURCES = \
	virkeyfiletest.c testutils.h testutils.c
virkeyfiletest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
536
virkeyfiletest_LDADD = $(LDADDS)
537

538 539 540
virauthconfigtest_SOURCES = \
	virauthconfigtest.c testutils.h testutils.c
virauthconfigtest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
541
virauthconfigtest_LDADD = $(LDADDS)
542

543 544
seclabeltest_SOURCES = \
	seclabeltest.c
545
seclabeltest_LDADD = $(LDADDS)
J
Jamie Strandboge 已提交
546

547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568
if WITH_SECDRIVER_SELINUX
if WITH_TESTS
noinst_LTLIBRARIES += libsecurityselinuxhelper.la
else
check_LTLIBRARIES += libsecurityselinuxhelper.la
endif

libsecurityselinuxhelper_la_SOURCES = \
	securityselinuxhelper.c
libsecurityselinuxhelper_la_CFLAGS = $(AM_CFLAGS)
libsecurityselinuxhelper_la_LDFLAGS = -module -avoid-version \
        -rpath /evil/libtool/hack/to/force/shared/lib/creation

securityselinuxtest_SOURCES = \
	securityselinuxtest.c testutils.h testutils.c
securityselinuxtest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
securityselinuxtest_LDADD = $(LDADDS)
securityselinuxtest_DEPENDENCIES = libsecurityselinuxhelper.la
else
EXTRA_DIST += securityselinuxtest.c securityselinuxhelper.c
endif

569 570 571 572
virbuftest_SOURCES = \
	virbuftest.c testutils.h testutils.c
virbuftest_LDADD = $(LDADDS)

573 574 575
virhashtest_SOURCES = \
	virhashtest.c virhashdata.h testutils.h testutils.c
virhashtest_LDADD = $(LDADDS)
576

577
viratomictest_SOURCES = \
L
Laine Stump 已提交
578
	viratomictest.c testutils.h testutils.c
579 580
viratomictest_LDADD = $(LDADDS)

581
jsontest_SOURCES = \
582
	jsontest.c testutils.h testutils.c
583 584
jsontest_LDADD = $(LDADDS)

M
Matthias Bolte 已提交
585 586 587 588
utiltest_SOURCES = \
	utiltest.c testutils.h testutils.c
utiltest_LDADD = $(LDADDS)

589 590 591 592 593 594 595
if WITH_DRIVER_MODULES
virdrivermoduletest_SOURCES = \
	virdrivermoduletest.c testutils.h testutils.c
virdrivermoduletest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
virdrivermoduletest_LDADD = $(LDADDS)
endif

596 597
if WITH_LIBVIRTD
eventtest_SOURCES = \
598
	eventtest.c testutils.h testutils.c
599 600 601
eventtest_LDADD = -lrt $(LDADDS)
endif

602 603 604 605 606 607
libshunload_la_SOURCES = shunloadhelper.c
libshunload_la_LIBADD = ../src/libvirt.la
libshunload_la_LDFLAGS = -module -avoid-version -rpath /evil/libtool/hack/to/force/shared/lib/creation

shunloadtest_SOURCES = \
	shunloadtest.c
608
shunloadtest_LDADD = $(LIB_PTHREAD)
609 610
shunloadtest_DEPENDENCIES = libshunload.la

611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631
if WITH_CIL
CILOPTFLAGS =
CILOPTINCS =
CILOPTPACKAGES = -package unix,str,cil
CILOPTLIBS = -linkpkg

object_locking_SOURCES = object-locking.ml

%.cmx: %.ml
	ocamlfind ocamlopt $(CILOPTFLAGS) $(CILOPTINCS) $(CILOPTPACKAGES) -c $<

object-locking: object-locking.cmx object-locking-files.txt
	ocamlfind ocamlopt $(CILOPTFLAGS) $(CILOPTINCS) $(CILOPTPACKAGES) $(CILOPTLIBS) $< -o $@

object-locking-files.txt:
	find $(top_builddir)/src/ -name '*.i' > $@

else
EXTRA_DIST += object-locking.ml
endif

632
CLEANFILES = *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.cmi *.cmx object-locking-files.txt