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

E
Eric Blake 已提交
3
## Copyright (C) 2005-2013 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
	-Dabs_builddir="\"`pwd`\"" \
19 20
	$(LIBXML_CFLAGS) \
	$(GNUTLS_CFLAGS) \
21
	$(SASL_CFLAGS) \
22
	$(SELINUX_CFLAGS) \
J
Jamie Strandboge 已提交
23
	$(APPARMOR_CFLAGS) \
24
	$(YAJL_CFLAGS) \
E
Eric Blake 已提交
25 26
	$(COVERAGE_CFLAGS) \
	$(WARN_CFLAGS)
27

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

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

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

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

G
Gene Czarcinski 已提交
91
test_helpers = commandhelper ssh test_conf
92
test_programs = virshtest sockettest \
E
Eric Blake 已提交
93
	nodeinfotest virbuftest \
94 95
	commandtest seclabeltest \
	virhashtest virnetmessagetest virnetsockettest \
96
	viratomictest \
97
	utiltest shunloadtest \
98
	virtimetest viruritest virkeyfiletest \
H
Hu Tao 已提交
99
	virauthconfigtest \
E
Eric Blake 已提交
100
	virbitmaptest virendiantest \
101
	viridentitytest \
102
	virkeycodetest \
103
	virlockspacetest \
104
	virstringtest \
D
Daniel P. Berrange 已提交
105
        virportallocatortest \
V
Viktor Mihajlovski 已提交
106
	sysinfotest \
107
	virstoragetest \
108
	$(NULL)
109

110
if WITH_GNUTLS
111 112 113
test_programs += virnettlscontexttest
endif

114 115
if WITH_SECDRIVER_SELINUX
test_programs += securityselinuxtest
116
if WITH_QEMU
117 118 119
if WITH_ATTR
test_programs += securityselinuxlabeltest
endif
120
endif
121
endif
122

123 124 125 126
if WITH_DRIVER_MODULES
test_programs += virdrivermoduletest
endif

127 128 129
# This is a fake SSH we use from virnetsockettest
ssh_SOURCES = ssh.c
ssh_LDADD = $(COVERAGE_LDFLAGS)
130

131
if WITH_XEN
132
test_programs += xml2sexprtest sexpr2xmltest \
133
	xmconfigtest xencapstest statstest reconnect
134
endif
135
if WITH_QEMU
136
test_programs += qemuxml2argvtest qemuxml2xmltest qemuxmlnstest \
137
	qemuargv2xmltest qemuhelptest domainsnapshotxml2xmltest \
138
	qemumonitortest qemumonitorjsontest
139 140
endif

141
if WITH_LXC
142
test_programs += lxcxml2xmltest
143 144
endif

145
if WITH_OPENVZ
146
test_programs += openvzutilstest
147 148
endif

149
if WITH_ESX
150
test_programs += esxutilstest
151 152 153
endif

if WITH_VMX
154
test_programs += vmx2xmltest xml2vmxtest
155 156
endif

157
if WITH_CIL
158
test_programs += object-locking
159 160
endif

161
if WITH_YAJL
162
test_programs += jsontest
163 164
endif

165
test_programs += networkxml2xmltest
166

167
if WITH_NETWORK
168
test_programs += networkxml2conftest
169
endif
170

171 172 173 174
if WITH_STORAGE_SHEEPDOG
test_programs += storagebackendsheepdogtest
endif

175
test_programs += nwfilterxml2xmltest
176

177 178
test_programs += storagevolxml2argvtest

179
test_programs += storagevolxml2xmltest storagepoolxml2xmltest
180

181
test_programs += nodedevxml2xmltest
M
Mark McLoughlin 已提交
182

183
test_programs += interfacexml2xmltest
184

185
test_programs += cputest
186

187 188
test_scripts = \
	capabilityschematest \
189
	interfaceschematest \
190 191 192 193
	networkschematest \
	storagepoolschematest \
	storagevolschematest \
	domainschematest \
194
	nodedevschematest \
195 196
	nwfilterschematest \
	domainsnapshotschematest
197

A
Atsushi SAKAI 已提交
198
if WITH_LIBVIRTD
199 200 201 202 203
test_scripts +=				\
	test_conf.sh			\
	cpuset				\
	define-dev-segfault		\
	int-overflow			\
J
Jim Meyering 已提交
204 205
	libvirtd-fail			\
	libvirtd-pool			\
206 207 208 209 210
	read-bufsiz			\
	read-non-seekable		\
	start				\
	vcpupin				\
	virsh-all			\
211
	virsh-optparse			\
212
	virsh-schedinfo			\
213 214 215
	virsh-synopsis			\
	virsh-undefine			\
	$(NULL)
216

217 218 219
test_programs += 			\
	eventtest			\
	libvirtdconftest
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234
else
EXTRA_DIST += 				\
	test_conf.sh			\
	cpuset				\
	define-dev-segfault		\
	int-overflow			\
	libvirtd-fail			\
	libvirtd-pool			\
	read-bufsiz			\
	read-non-seekable		\
	start				\
	vcpupin				\
	virsh-all			\
	virsh-optparse			\
	virsh-schedinfo			\
235 236 237
	virsh-synopsis			\
	virsh-undefine			\
	$(NULL)
A
Atsushi SAKAI 已提交
238
endif
239

J
Jamie Strandboge 已提交
240 241
if WITH_SECDRIVER_APPARMOR
test_scripts += virt-aa-helper-test
242 243
else
EXTRA_DIST += virt-aa-helper-test
J
Jamie Strandboge 已提交
244
endif
245

246 247
EXTRA_DIST += $(test_scripts)

D
Daniel P. Berrange 已提交
248 249 250
test_libraries = libshunload.la \
		libvirportallocatormock.la \
		$(NULL)
251 252 253 254
if WITH_QEMU
test_libraries += libqemumonitortestutils.la
endif

255 256
if WITH_TESTS
noinst_PROGRAMS = $(test_programs) $(test_helpers)
257
noinst_LTLIBRARIES = $(test_libraries)
258 259
else
check_PROGRAMS = $(test_programs) $(test_helpers)
260
check_LTLIBRARIES = $(test_libraries)
261
endif
262

263 264
TESTS = $(test_programs) \
	$(test_scripts)
265

266
# NB, automake < 1.10 does not provide the real
267
# abs_top_{src/build}dir or builddir variables, so don't rely
268
# on them here. Fake them with 'pwd'
269 270 271 272 273 274
# 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

275
TESTS_ENVIRONMENT =				\
276
  abs_top_builddir=$(lv_abs_top_builddir)	\
J
Jim Meyering 已提交
277
  abs_top_srcdir=`cd '$(top_srcdir)'; pwd`	\
278
  abs_builddir=`pwd`				\
279
  abs_srcdir=`cd '$(srcdir)'; pwd`		\
280
  CONFIG_HEADER="`cd '$(top_builddir)'; pwd`/config.h"	\
J
Jim Meyering 已提交
281
  PATH="$(path_add)$(PATH_SEPARATOR)$$PATH"	\
282
  SHELL="$(SHELL)"				\
283
  LIBVIRT_DRIVER_DIR="$(abs_top_builddir)/src/.libs" \
284
  LIBVIRT_AUTOSTART=0				\
285
  LC_ALL=C					\
286 287
  $(VG)

288

289
valgrind:
290
	$(MAKE) check VG="libtool --mode=execute valgrind --quiet --leak-check=full --suppressions=$(srcdir)/.valgrind.supp"
291

292 293 294
sockettest_SOURCES = \
	sockettest.c \
	testutils.c testutils.h
295
sockettest_LDADD = $(LDADDS)
296

297
if WITH_XEN
E
Eric Blake 已提交
298
xen_LDADDS = ../src/libvirt_driver_xen_impl.la
299 300
xen_LDADDS += $(LDADDS)

301
xml2sexprtest_SOURCES = \
302
	xml2sexprtest.c testutilsxen.c testutilsxen.h \
303
	testutils.c testutils.h
304
xml2sexprtest_LDADD = $(xen_LDADDS)
305 306

sexpr2xmltest_SOURCES = \
307
	sexpr2xmltest.c testutilsxen.c testutilsxen.h \
308
	testutils.c testutils.h
309
sexpr2xmltest_LDADD = $(xen_LDADDS)
310

311
xmconfigtest_SOURCES = \
312
	xmconfigtest.c testutilsxen.c testutilsxen.h \
313
	testutils.c testutils.h
314
xmconfigtest_LDADD = $(xen_LDADDS)
315

316 317
xencapstest_SOURCES = \
	xencapstest.c testutils.h testutils.c
318
xencapstest_LDADD = $(xen_LDADDS)
319 320

reconnect_SOURCES = \
321
	reconnect.c testutils.h testutils.c
322 323
reconnect_LDADD = $(LDADDS)

324 325
statstest_SOURCES = \
	statstest.c testutils.h testutils.c
326
statstest_LDADD = $(xen_LDADDS)
327

328 329 330 331 332 333
else
EXTRA_DIST += xml2sexprtest.c sexpr2xmltest.c xmconfigtest.c \
	xencapstest.c reconnect.c \
	testutilsxen.c testutilsxen.h
endif

334 335 336 337 338
QEMUMONITORTESTUTILS_SOURCES = \
	qemumonitortestutils.c \
	qemumonitortestutils.h \
	$(NULL)

339
if WITH_QEMU
340

341 342
libqemumonitortestutils_la_SOURCES = $(QEMUMONITORTESTUTILS_SOURCES)

343
qemu_LDADDS = ../src/libvirt_driver_qemu_impl.la
344
if WITH_NETWORK
E
Eric Blake 已提交
345
qemu_LDADDS += ../src/libvirt_driver_network_impl.la
346
endif
347
if WITH_DTRACE_PROBES
348
qemu_LDADDS += ../src/libvirt_qemu_probes.lo
349
endif
350
qemu_LDADDS += $(LDADDS)
351

352
qemuxml2argvtest_SOURCES = \
353
	qemuxml2argvtest.c testutilsqemu.c testutilsqemu.h \
354
	testutils.c testutils.h
355
qemuxml2argvtest_LDADD = $(qemu_LDADDS)
356 357

qemuxml2xmltest_SOURCES = \
358
	qemuxml2xmltest.c testutilsqemu.c testutilsqemu.h \
359
	testutils.c testutils.h
360
qemuxml2xmltest_LDADD = $(qemu_LDADDS)
361

P
Philipp Hahn 已提交
362 363 364
qemuxmlnstest_SOURCES = \
	qemuxmlnstest.c testutilsqemu.c testutilsqemu.h \
	testutils.c testutils.h
365
qemuxmlnstest_LDADD = $(qemu_LDADDS)
P
Philipp Hahn 已提交
366

367 368 369
qemuargv2xmltest_SOURCES = \
	qemuargv2xmltest.c testutilsqemu.c testutilsqemu.h \
	testutils.c testutils.h
370
qemuargv2xmltest_LDADD = $(qemu_LDADDS)
371 372

qemuhelptest_SOURCES = qemuhelptest.c testutils.c testutils.h
373
qemuhelptest_LDADD = $(qemu_LDADDS)
374

375
qemumonitortest_SOURCES = qemumonitortest.c testutils.c testutils.h
376
qemumonitortest_LDADD = $(qemu_LDADDS)
377

378 379 380 381 382 383 384
qemumonitorjsontest_SOURCES = \
	qemumonitorjsontest.c \
	testutils.c testutils.h \
	testutilsqemu.c testutilsqemu.h \
	$(NULL)
qemumonitorjsontest_LDADD = $(qemu_LDADDS) libqemumonitortestutils.la

385 386 387
domainsnapshotxml2xmltest_SOURCES = \
	domainsnapshotxml2xmltest.c testutilsqemu.c testutilsqemu.h \
	testutils.c testutils.h
388
domainsnapshotxml2xmltest_LDADD = $(qemu_LDADDS)
389
else
390 391
EXTRA_DIST += qemuxml2argvtest.c qemuxml2xmltest.c qemuargv2xmltest.c \
	qemuxmlnstest.c qemuhelptest.c domainsnapshotxml2xmltest.c \
392
	qemumonitortest.c testutilsqemu.c testutilsqemu.h \
393
	qemumonitorjsontest.c \
394
	$(QEMUMONITORTESTUTILS_SOURCES)
395
endif
396

397 398
if WITH_LXC

E
Eric Blake 已提交
399
lxc_LDADDS = ../src/libvirt_driver_lxc_impl.la
400
if WITH_NETWORK
E
Eric Blake 已提交
401
lxc_LDADDS += ../src/libvirt_driver_network_impl.la
402 403
endif
lxc_LDADDS += $(LDADDS)
404 405 406 407

lxcxml2xmltest_SOURCES = \
	lxcxml2xmltest.c testutilslxc.c testutilslxc.h \
	testutils.c testutils.h
408
lxcxml2xmltest_LDADD = $(lxc_LDADDS)
409 410 411 412
else
EXTRA_DIST += lxcxml2xmltest.c testutilslxc.c testutilslxc.h
endif

413 414 415 416
if WITH_OPENVZ
openvzutilstest_SOURCES = \
	openvzutilstest.c \
	testutils.c testutils.h
417
openvzutilstest_LDADD = $(LDADDS)
418 419 420 421 422
else
EXTRA_DIST += openvzutilstest.c
endif
EXTRA_DIST += openvzutilstest.conf

423 424 425 426
if WITH_ESX
esxutilstest_SOURCES = \
	esxutilstest.c \
	testutils.c testutils.h
427
esxutilstest_LDADD = $(LDADDS)
428 429 430
else
EXTRA_DIST += esxutilstest.c
endif
431

432
if WITH_VMX
433 434 435
vmx2xmltest_SOURCES = \
	vmx2xmltest.c \
	testutils.c testutils.h
436
vmx2xmltest_LDADD = $(LDADDS)
437 438 439 440

xml2vmxtest_SOURCES = \
	xml2vmxtest.c \
	testutils.c testutils.h
441
xml2vmxtest_LDADD = $(LDADDS)
442
else
443
EXTRA_DIST += vmx2xmltest.c xml2vmxtest.c
444 445
endif

446 447 448 449 450
networkxml2xmltest_SOURCES = \
	networkxml2xmltest.c \
	testutils.c testutils.h
networkxml2xmltest_LDADD = $(LDADDS)

451
if WITH_NETWORK
452 453
networkxml2conftest_SOURCES = \
	networkxml2conftest.c \
454
	testutils.c testutils.h
455
networkxml2conftest_LDADD = ../src/libvirt_driver_network_impl.la $(LDADDS)
456
else
457
EXTRA_DIST += networkxml2conftest.c
458
endif
459

460 461 462 463
if WITH_STORAGE_SHEEPDOG
storagebackendsheepdogtest_SOURCES = \
	storagebackendsheepdogtest.c \
	testutils.c testutils.h
464 465
storagebackendsheepdogtest_LDADD = \
	../src/libvirt_driver_storage_impl.la $(LDADDS)
466 467 468 469
else
EXTRA_DIST += storagebackendsheepdogtest.c
endif

470 471 472 473
nwfilterxml2xmltest_SOURCES = \
	nwfilterxml2xmltest.c \
	testutils.c testutils.h
nwfilterxml2xmltest_LDADD = $(LDADDS)
474 475 476 477 478 479

storagevolxml2argvtest_SOURCES = \
    storagevolxml2argvtest.c \
    testutils.c testutils.h
storagevolxml2argvtest_LDADD = \
	../src/libvirt_driver_storage_impl.la $(LDADDS)
480

481 482 483 484 485
storagevolxml2xmltest_SOURCES = \
	storagevolxml2xmltest.c \
	testutils.c testutils.h
storagevolxml2xmltest_LDADD = $(LDADDS)

486 487 488 489 490
storagepoolxml2xmltest_SOURCES = \
	storagepoolxml2xmltest.c \
	testutils.c testutils.h
storagepoolxml2xmltest_LDADD = $(LDADDS)

M
Mark McLoughlin 已提交
491 492 493
nodedevxml2xmltest_SOURCES = \
	nodedevxml2xmltest.c \
	testutils.c testutils.h
494
nodedevxml2xmltest_LDADD = $(LDADDS)
M
Mark McLoughlin 已提交
495

496 497 498 499 500
interfacexml2xmltest_SOURCES = \
	interfacexml2xmltest.c \
	testutils.c testutils.h
interfacexml2xmltest_LDADD = $(LDADDS)

501 502 503 504 505
cputest_SOURCES = \
	cputest.c \
	testutils.c testutils.h
cputest_LDADD = $(LDADDS)

506 507 508 509 510
virshtest_SOURCES = \
	virshtest.c \
	testutils.c testutils.h
virshtest_LDADD = $(LDADDS)

G
Gene Czarcinski 已提交
511 512 513
test_conf_SOURCES = \
	test_conf.c
test_conf_LDADD = $(LDADDS)
D
Daniel Veillard 已提交
514

515 516 517 518
nodeinfotest_SOURCES = \
	nodeinfotest.c testutils.h testutils.c
nodeinfotest_LDADD = $(LDADDS)

519 520 521 522 523 524 525
commandtest_SOURCES = \
	commandtest.c testutils.h testutils.c
commandtest_LDADD = $(LDADDS)

commandhelper_SOURCES = \
	commandhelper.c
commandhelper_LDADD = $(LDADDS)
526
commandhelper_LDFLAGS = -static
527

528 529 530 531 532 533 534 535 536
if WITH_LIBVIRTD
libvirtdconftest_SOURCES = \
	libvirtdconftest.c testutils.h testutils.c \
	../daemon/libvirtd-config.c
libvirtdconftest_LDADD = $(LDADDS)
else
EXTRA_DIST += libvirtdconftest.c
endif

537 538
virnetmessagetest_SOURCES = \
	virnetmessagetest.c testutils.h testutils.c
539
virnetmessagetest_CFLAGS = $(XDR_CFLAGS) $(AM_CFLAGS)
540
virnetmessagetest_LDADD = $(LDADDS)
541

542 543
virnetsockettest_SOURCES = \
	virnetsockettest.c testutils.h testutils.c
544
virnetsockettest_LDADD = $(LDADDS)
545

546
if WITH_GNUTLS
547
virnettlscontexttest_SOURCES = \
E
Eric Blake 已提交
548
	virnettlscontexttest.c testutils.h testutils.c
549
virnettlscontexttest_LDADD = $(LDADDS)
E
Eric Blake 已提交
550 551 552 553 554 555
if HAVE_LIBTASN1
virnettlscontexttest_SOURCES += pkix_asn1_tab.c
virnettlscontexttest_LDADD += -ltasn1
else
EXTRA_DIST += pkix_asn1_tab.c
endif
556 557 558 559
else
EXTRA_DIST += \
	virnettlscontexttest.c testutils.h testutils.c pkix_asn1_tab.c
endif
560

561 562
virtimetest_SOURCES = \
	virtimetest.c testutils.h testutils.c
563
virtimetest_LDADD = $(LDADDS)
564

565 566 567 568
virstringtest_SOURCES = \
	virstringtest.c testutils.h testutils.c
virstringtest_LDADD = $(LDADDS)

569 570 571 572
virstoragetest_SOURCES = \
	virstoragetest.c testutils.h testutils.c
virstoragetest_LDADD = $(LDADDS)

573 574 575 576
viridentitytest_SOURCES = \
	viridentitytest.c testutils.h testutils.c
viridentitytest_LDADD = $(LDADDS)

577 578 579 580
virkeycodetest_SOURCES = \
	virkeycodetest.c testutils.h testutils.c
virkeycodetest_LDADD = $(LDADDS)

581 582 583 584
virlockspacetest_SOURCES = \
	virlockspacetest.c testutils.h testutils.c
virlockspacetest_LDADD = $(LDADDS)

D
Daniel P. Berrange 已提交
585 586 587 588 589 590 591 592 593 594 595
virportallocatortest_SOURCES = \
	virportallocatortest.c testutils.h testutils.c
virportallocatortest_LDADD = $(LDADDS)

libvirportallocatormock_la_SOURCES = \
	virportallocatortest.c
libvirportallocatormock_la_CFLAGS = $(AM_CFLAGS) -DMOCK_HELPER=1
libvirportallocatormock_la_LDFLAGS = -module -avoid-version \
        -rpath /evil/libtool/hack/to/force/shared/lib/creation


596 597
viruritest_SOURCES = \
	viruritest.c testutils.h testutils.c
598
viruritest_LDADD = $(LDADDS)
599

600 601
virkeyfiletest_SOURCES = \
	virkeyfiletest.c testutils.h testutils.c
602
virkeyfiletest_LDADD = $(LDADDS)
603

604 605
virauthconfigtest_SOURCES = \
	virauthconfigtest.c testutils.h testutils.c
606
virauthconfigtest_LDADD = $(LDADDS)
607

608 609
seclabeltest_SOURCES = \
	seclabeltest.c
610
seclabeltest_LDADD = $(LDADDS)
J
Jamie Strandboge 已提交
611

612 613 614 615 616 617 618 619 620 621 622 623 624 625 626
if WITH_SECDRIVER_SELINUX
if WITH_TESTS
noinst_LTLIBRARIES += libsecurityselinuxhelper.la
else
check_LTLIBRARIES += libsecurityselinuxhelper.la
endif

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

securityselinuxtest_SOURCES = \
	securityselinuxtest.c testutils.h testutils.c
securityselinuxtest_LDADD = $(LDADDS)
627 628 629 630 631 632 633 634 635 636 637
securityselinuxtest_DEPENDENCIES = libsecurityselinuxhelper.la ../src/libvirt.la

if WITH_QEMU
if WITH_ATTR
securityselinuxlabeltest_SOURCES = \
	securityselinuxlabeltest.c testutils.h testutils.c \
        testutilsqemu.h testutilsqemu.c
securityselinuxlabeltest_LDADD = $(qemu_LDADDS)
securityselinuxlabeltest_DEPENDENCIES = libsecurityselinuxhelper.la ../src/libvirt.la
endif
endif
638
endif
639
EXTRA_DIST += securityselinuxtest.c securityselinuxlabeltest.c securityselinuxhelper.c
640

641 642 643 644
virbuftest_SOURCES = \
	virbuftest.c testutils.h testutils.c
virbuftest_LDADD = $(LDADDS)

645 646 647
virhashtest_SOURCES = \
	virhashtest.c virhashdata.h testutils.h testutils.c
virhashtest_LDADD = $(LDADDS)
648

649
viratomictest_SOURCES = \
L
Laine Stump 已提交
650
	viratomictest.c testutils.h testutils.c
651 652
viratomictest_LDADD = $(LDADDS)

H
Hu Tao 已提交
653 654 655 656
virbitmaptest_SOURCES = \
	virbitmaptest.c testutils.h testutils.c
virbitmaptest_LDADD = $(LDADDS)

E
Eric Blake 已提交
657 658 659 660
virendiantest_SOURCES = \
	virendiantest.c testutils.h testutils.c
virendiantest_LDADD = $(LDADDS)

661
jsontest_SOURCES = \
662
	jsontest.c testutils.h testutils.c
663 664
jsontest_LDADD = $(LDADDS)

M
Matthias Bolte 已提交
665 666 667 668
utiltest_SOURCES = \
	utiltest.c testutils.h testutils.c
utiltest_LDADD = $(LDADDS)

669 670 671 672 673 674
if WITH_DRIVER_MODULES
virdrivermoduletest_SOURCES = \
	virdrivermoduletest.c testutils.h testutils.c
virdrivermoduletest_LDADD = $(LDADDS)
endif

675 676
if WITH_LIBVIRTD
eventtest_SOURCES = \
677
	eventtest.c testutils.h testutils.c
678 679 680
eventtest_LDADD = -lrt $(LDADDS)
endif

681 682 683 684 685 686
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
687
shunloadtest_LDADD = $(LIB_PTHREAD)
688 689
shunloadtest_DEPENDENCIES = libshunload.la

V
Viktor Mihajlovski 已提交
690 691 692 693
sysinfotest_SOURCES = \
	sysinfotest.c testutils.h testutils.c
sysinfotest_LDADD = $(LDADDS)

694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714
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

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