Makefile.am 16.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
	networkxml2confdata \
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
	storagevolxml2xmlout \
V
Viktor Mihajlovski 已提交
79
	sysinfodata \
E
Eric Blake 已提交
80
	test-lib.sh	\
81
	vmx2xmldata \
E
Eric Blake 已提交
82 83 84
	xencapsdata \
	xmconfigdata \
	xml2sexprdata \
85 86
	xml2vmxdata \
	.valgrind.supp
K
Karel Zak 已提交
87

88 89
test_helpers = commandhelper ssh conftest
test_programs = virshtest sockettest \
E
Eric Blake 已提交
90
	nodeinfotest virbuftest \
91 92
	commandtest seclabeltest \
	virhashtest virnetmessagetest virnetsockettest \
93
	viratomictest \
94
	utiltest virnettlscontexttest shunloadtest \
95
	virtimetest viruritest virkeyfiletest \
H
Hu Tao 已提交
96
	virauthconfigtest \
97 98
	virbitmaptest \
	virlockspacetest \
99
	virstringtest \
V
Viktor Mihajlovski 已提交
100
	sysinfotest \
101
	$(NULL)
102

103 104 105 106
if WITH_SECDRIVER_SELINUX
test_programs += securityselinuxtest
endif

107 108 109 110
if WITH_DRIVER_MODULES
test_programs += virdrivermoduletest
endif

111 112 113
# This is a fake SSH we use from virnetsockettest
ssh_SOURCES = ssh.c
ssh_LDADD = $(COVERAGE_LDFLAGS)
114

115
if WITH_XEN
116
test_programs += xml2sexprtest sexpr2xmltest \
117
	xmconfigtest xencapstest statstest reconnect
118
endif
119
if WITH_QEMU
120
test_programs += qemuxml2argvtest qemuxml2xmltest qemuxmlnstest \
121
	qemuargv2xmltest qemuhelptest domainsnapshotxml2xmltest \
122
	qemumonitortest qemumonitorjsontest
123 124
endif

125
if WITH_LXC
126
test_programs += lxcxml2xmltest
127 128
endif

129
if WITH_OPENVZ
130
test_programs += openvzutilstest
131 132
endif

133
if WITH_ESX
134
test_programs += esxutilstest
135 136 137
endif

if WITH_VMX
138
test_programs += vmx2xmltest xml2vmxtest
139 140
endif

141
if WITH_CIL
142
test_programs += object-locking
143 144
endif

145
if HAVE_YAJL
146
test_programs += jsontest
147 148
endif

149
test_programs += networkxml2xmltest
150

151
if WITH_NETWORK
152
test_programs += networkxml2conftest
153
endif
154

155 156 157 158
if WITH_STORAGE_SHEEPDOG
test_programs += storagebackendsheepdogtest
endif

159
test_programs += nwfilterxml2xmltest
160

161
test_programs += storagevolxml2xmltest storagepoolxml2xmltest
162

163
test_programs += nodedevxml2xmltest
M
Mark McLoughlin 已提交
164

165
test_programs += interfacexml2xmltest
166

167
test_programs += cputest
168

169 170
test_scripts = \
	capabilityschematest \
171
	interfaceschematest \
172 173 174 175
	networkschematest \
	storagepoolschematest \
	storagevolschematest \
	domainschematest \
176
	nodedevschematest \
177 178
	nwfilterschematest \
	domainsnapshotschematest
179

A
Atsushi SAKAI 已提交
180
if WITH_LIBVIRTD
181 182 183 184 185
test_scripts +=				\
	test_conf.sh			\
	cpuset				\
	define-dev-segfault		\
	int-overflow			\
J
Jim Meyering 已提交
186 187
	libvirtd-fail			\
	libvirtd-pool			\
188 189 190 191 192
	read-bufsiz			\
	read-non-seekable		\
	start				\
	vcpupin				\
	virsh-all			\
193
	virsh-optparse			\
194
	virsh-schedinfo			\
195 196 197
	virsh-synopsis			\
	virsh-undefine			\
	$(NULL)
198

199 200 201
test_programs += 			\
	eventtest			\
	libvirtdconftest
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
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			\
217 218 219
	virsh-synopsis			\
	virsh-undefine			\
	$(NULL)
A
Atsushi SAKAI 已提交
220
endif
221

J
Jamie Strandboge 已提交
222 223
if WITH_SECDRIVER_APPARMOR
test_scripts += virt-aa-helper-test
224 225
else
EXTRA_DIST += virt-aa-helper-test
J
Jamie Strandboge 已提交
226
endif
227

228 229
EXTRA_DIST += $(test_scripts)

230 231 232 233 234
test_libraries = libshunload.la
if WITH_QEMU
test_libraries += libqemumonitortestutils.la
endif

235 236
if WITH_TESTS
noinst_PROGRAMS = $(test_programs) $(test_helpers)
237
noinst_LTLIBRARIES = $(test_libraries)
238 239
else
check_PROGRAMS = $(test_programs) $(test_helpers)
240
check_LTLIBRARIES = $(test_libraries)
241
endif
242

243 244
TESTS = $(test_programs) \
	$(test_scripts)
245

246
# NB, automake < 1.10 does not provide the real
247
# abs_top_{src/build}dir or builddir variables, so don't rely
248
# on them here. Fake them with 'pwd'
249 250 251 252 253 254
# 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

255
TESTS_ENVIRONMENT =				\
256
  abs_top_builddir=$(lv_abs_top_builddir)	\
J
Jim Meyering 已提交
257
  abs_top_srcdir=`cd '$(top_srcdir)'; pwd`	\
258
  abs_builddir=`pwd`				\
259
  abs_srcdir=`cd '$(srcdir)'; pwd`		\
260
  CONFIG_HEADER="`cd '$(top_builddir)'; pwd`/config.h"	\
J
Jim Meyering 已提交
261
  PATH="$(path_add)$(PATH_SEPARATOR)$$PATH"	\
262
  SHELL="$(SHELL)"				\
263
  LIBVIRT_DRIVER_DIR="$(abs_top_builddir)/src/.libs" \
264
  LIBVIRT_AUTOSTART=0				\
265
  LC_ALL=C					\
266 267
  $(VG)

268

269
valgrind:
270
	$(MAKE) check VG="libtool --mode=execute valgrind --quiet --leak-check=full --suppressions=$(srcdir)/.valgrind.supp"
271

272 273 274
sockettest_SOURCES = \
	sockettest.c \
	testutils.c testutils.h
275
sockettest_LDADD = $(LDADDS)
276

277
if WITH_XEN
E
Eric Blake 已提交
278
xen_LDADDS = ../src/libvirt_driver_xen_impl.la
279 280
xen_LDADDS += $(LDADDS)

281
xml2sexprtest_SOURCES = \
282
	xml2sexprtest.c testutilsxen.c testutilsxen.h \
283
	testutils.c testutils.h
284
xml2sexprtest_LDADD = $(xen_LDADDS)
285 286

sexpr2xmltest_SOURCES = \
287
	sexpr2xmltest.c testutilsxen.c testutilsxen.h \
288
	testutils.c testutils.h
289
sexpr2xmltest_LDADD = $(xen_LDADDS)
290

291
xmconfigtest_SOURCES = \
292
	xmconfigtest.c testutilsxen.c testutilsxen.h \
293
	testutils.c testutils.h
294
xmconfigtest_LDADD = $(xen_LDADDS)
295

296 297
xencapstest_SOURCES = \
	xencapstest.c testutils.h testutils.c
298
xencapstest_LDADD = $(xen_LDADDS)
299 300

reconnect_SOURCES = \
301
	reconnect.c testutils.h testutils.c
302 303
reconnect_LDADD = $(LDADDS)

304 305
statstest_SOURCES = \
	statstest.c testutils.h testutils.c
306
statstest_LDADD = $(xen_LDADDS)
307

308 309 310 311 312 313
else
EXTRA_DIST += xml2sexprtest.c sexpr2xmltest.c xmconfigtest.c \
	xencapstest.c reconnect.c \
	testutilsxen.c testutilsxen.h
endif

314 315 316 317 318
QEMUMONITORTESTUTILS_SOURCES = \
	qemumonitortestutils.c \
	qemumonitortestutils.h \
	$(NULL)

319
if WITH_QEMU
320

321 322 323 324 325
libqemumonitortestutils_la_SOURCES = $(QEMUMONITORTESTUTILS_SOURCES)
libqemumonitortestutils_la_CFLAGS = \
	-Dabs_builddir="\"`pwd`\"" $(AM_CFLAGS)


326
qemu_LDADDS = ../src/libvirt_driver_qemu_impl.la
327
if WITH_NETWORK
E
Eric Blake 已提交
328
qemu_LDADDS += ../src/libvirt_driver_network_impl.la
329
endif
330
if WITH_DTRACE_PROBES
331
qemu_LDADDS += ../src/libvirt_qemu_probes.lo
332
endif
333
qemu_LDADDS += $(LDADDS)
334

335
qemuxml2argvtest_SOURCES = \
336
	qemuxml2argvtest.c testutilsqemu.c testutilsqemu.h \
337
	testutils.c testutils.h
338
qemuxml2argvtest_LDADD = $(qemu_LDADDS)
339 340

qemuxml2xmltest_SOURCES = \
341
	qemuxml2xmltest.c testutilsqemu.c testutilsqemu.h \
342
	testutils.c testutils.h
343
qemuxml2xmltest_LDADD = $(qemu_LDADDS)
344

P
Philipp Hahn 已提交
345 346 347
qemuxmlnstest_SOURCES = \
	qemuxmlnstest.c testutilsqemu.c testutilsqemu.h \
	testutils.c testutils.h
348
qemuxmlnstest_LDADD = $(qemu_LDADDS)
P
Philipp Hahn 已提交
349

350 351 352
qemuargv2xmltest_SOURCES = \
	qemuargv2xmltest.c testutilsqemu.c testutilsqemu.h \
	testutils.c testutils.h
353
qemuargv2xmltest_LDADD = $(qemu_LDADDS)
354 355

qemuhelptest_SOURCES = qemuhelptest.c testutils.c testutils.h
356
qemuhelptest_LDADD = $(qemu_LDADDS)
357

358
qemumonitortest_SOURCES = qemumonitortest.c testutils.c testutils.h
359
qemumonitortest_LDADD = $(qemu_LDADDS)
360

361 362 363 364 365 366 367 368
qemumonitorjsontest_SOURCES = \
	qemumonitorjsontest.c \
	testutils.c testutils.h \
	testutilsqemu.c testutilsqemu.h \
	$(NULL)
qemumonitorjsontest_LDADD = $(qemu_LDADDS) libqemumonitortestutils.la
qemumonitorjsontest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\""  $(AM_CFLAGS)

369 370 371
domainsnapshotxml2xmltest_SOURCES = \
	domainsnapshotxml2xmltest.c testutilsqemu.c testutilsqemu.h \
	testutils.c testutils.h
372
domainsnapshotxml2xmltest_LDADD = $(qemu_LDADDS)
373
else
374 375
EXTRA_DIST += qemuxml2argvtest.c qemuxml2xmltest.c qemuargv2xmltest.c \
	qemuxmlnstest.c qemuhelptest.c domainsnapshotxml2xmltest.c \
376
	qemumonitortest.c testutilsqemu.c testutilsqemu.h \
377
	qemumonitorjsontest.c \
378
	$(QEMUMONITORTESTUTILS_SOURCES)
379
endif
380

381 382
if WITH_LXC

E
Eric Blake 已提交
383
lxc_LDADDS = ../src/libvirt_driver_lxc_impl.la
384
if WITH_NETWORK
E
Eric Blake 已提交
385
lxc_LDADDS += ../src/libvirt_driver_network_impl.la
386 387
endif
lxc_LDADDS += $(LDADDS)
388 389 390 391

lxcxml2xmltest_SOURCES = \
	lxcxml2xmltest.c testutilslxc.c testutilslxc.h \
	testutils.c testutils.h
392
lxcxml2xmltest_LDADD = $(lxc_LDADDS)
393 394 395 396
else
EXTRA_DIST += lxcxml2xmltest.c testutilslxc.c testutilslxc.h
endif

397 398 399 400
if WITH_OPENVZ
openvzutilstest_SOURCES = \
	openvzutilstest.c \
	testutils.c testutils.h
401
openvzutilstest_LDADD = $(LDADDS)
402 403 404 405 406
else
EXTRA_DIST += openvzutilstest.c
endif
EXTRA_DIST += openvzutilstest.conf

407 408 409 410
if WITH_ESX
esxutilstest_SOURCES = \
	esxutilstest.c \
	testutils.c testutils.h
411
esxutilstest_LDADD = $(LDADDS)
412 413 414
else
EXTRA_DIST += esxutilstest.c
endif
415

416
if WITH_VMX
417 418 419
vmx2xmltest_SOURCES = \
	vmx2xmltest.c \
	testutils.c testutils.h
420
vmx2xmltest_LDADD = $(LDADDS)
421 422 423 424

xml2vmxtest_SOURCES = \
	xml2vmxtest.c \
	testutils.c testutils.h
425
xml2vmxtest_LDADD = $(LDADDS)
426
else
427
EXTRA_DIST += vmx2xmltest.c xml2vmxtest.c
428 429
endif

430 431 432 433 434
networkxml2xmltest_SOURCES = \
	networkxml2xmltest.c \
	testutils.c testutils.h
networkxml2xmltest_LDADD = $(LDADDS)

435
if WITH_NETWORK
436 437
networkxml2conftest_SOURCES = \
	networkxml2conftest.c \
438
	testutils.c testutils.h
439
networkxml2conftest_LDADD = ../src/libvirt_driver_network_impl.la $(LDADDS)
440
else
441
EXTRA_DIST += networkxml2conftest.c
442
endif
443

444 445 446 447
if WITH_STORAGE_SHEEPDOG
storagebackendsheepdogtest_SOURCES = \
	storagebackendsheepdogtest.c \
	testutils.c testutils.h
448 449
storagebackendsheepdogtest_LDADD = \
	../src/libvirt_driver_storage_impl.la $(LDADDS)
450 451 452 453
else
EXTRA_DIST += storagebackendsheepdogtest.c
endif

454 455 456 457 458
nwfilterxml2xmltest_SOURCES = \
	nwfilterxml2xmltest.c \
	testutils.c testutils.h
nwfilterxml2xmltest_LDADD = $(LDADDS)

459 460 461 462 463
storagevolxml2xmltest_SOURCES = \
	storagevolxml2xmltest.c \
	testutils.c testutils.h
storagevolxml2xmltest_LDADD = $(LDADDS)

464 465 466 467 468
storagepoolxml2xmltest_SOURCES = \
	storagepoolxml2xmltest.c \
	testutils.c testutils.h
storagepoolxml2xmltest_LDADD = $(LDADDS)

M
Mark McLoughlin 已提交
469 470 471
nodedevxml2xmltest_SOURCES = \
	nodedevxml2xmltest.c \
	testutils.c testutils.h
472
nodedevxml2xmltest_LDADD = $(LDADDS)
M
Mark McLoughlin 已提交
473

474 475 476 477 478
interfacexml2xmltest_SOURCES = \
	interfacexml2xmltest.c \
	testutils.c testutils.h
interfacexml2xmltest_LDADD = $(LDADDS)

479 480 481 482 483
cputest_SOURCES = \
	cputest.c \
	testutils.c testutils.h
cputest_LDADD = $(LDADDS)

484 485 486 487 488
virshtest_SOURCES = \
	virshtest.c \
	testutils.c testutils.h
virshtest_LDADD = $(LDADDS)

D
Daniel Veillard 已提交
489 490 491 492
conftest_SOURCES = \
	conftest.c
conftest_LDADD = $(LDADDS)

493 494 495 496
nodeinfotest_SOURCES = \
	nodeinfotest.c testutils.h testutils.c
nodeinfotest_LDADD = $(LDADDS)

497 498
commandtest_SOURCES = \
	commandtest.c testutils.h testutils.c
E
Eric Blake 已提交
499
commandtest_CFLAGS = -Dabs_builddir="\"`pwd`\"" $(AM_CFLAGS)
500 501 502 503
commandtest_LDADD = $(LDADDS)

commandhelper_SOURCES = \
	commandhelper.c
E
Eric Blake 已提交
504
commandhelper_CFLAGS = -Dabs_builddir="\"`pwd`\"" $(AM_CFLAGS)
505
commandhelper_LDADD = $(LDADDS)
506
commandhelper_LDFLAGS = -static
507

508 509 510 511 512 513 514 515 516 517
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

518 519
virnetmessagetest_SOURCES = \
	virnetmessagetest.c testutils.h testutils.c
E
Eric Blake 已提交
520 521
virnetmessagetest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" \
		$(XDR_CFLAGS) $(AM_CFLAGS)
522
virnetmessagetest_LDADD = $(LDADDS)
523

524 525
virnetsockettest_SOURCES = \
	virnetsockettest.c testutils.h testutils.c
E
Eric Blake 已提交
526
virnetsockettest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
527
virnetsockettest_LDADD = $(LDADDS)
528

529
virnettlscontexttest_SOURCES = \
E
Eric Blake 已提交
530
	virnettlscontexttest.c testutils.h testutils.c
531
virnettlscontexttest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
532
virnettlscontexttest_LDADD = $(LDADDS)
E
Eric Blake 已提交
533 534 535 536 537 538
if HAVE_LIBTASN1
virnettlscontexttest_SOURCES += pkix_asn1_tab.c
virnettlscontexttest_LDADD += -ltasn1
else
EXTRA_DIST += pkix_asn1_tab.c
endif
539

540 541 542
virtimetest_SOURCES = \
	virtimetest.c testutils.h testutils.c
virtimetest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
543
virtimetest_LDADD = $(LDADDS)
544

545 546 547 548 549
virstringtest_SOURCES = \
	virstringtest.c testutils.h testutils.c
virstringtest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
virstringtest_LDADD = $(LDADDS)

550 551 552 553 554
virlockspacetest_SOURCES = \
	virlockspacetest.c testutils.h testutils.c
virlockspacetest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
virlockspacetest_LDADD = $(LDADDS)

555 556 557
viruritest_SOURCES = \
	viruritest.c testutils.h testutils.c
viruritest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
558
viruritest_LDADD = $(LDADDS)
559

560 561 562
virkeyfiletest_SOURCES = \
	virkeyfiletest.c testutils.h testutils.c
virkeyfiletest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
563
virkeyfiletest_LDADD = $(LDADDS)
564

565 566 567
virauthconfigtest_SOURCES = \
	virauthconfigtest.c testutils.h testutils.c
virauthconfigtest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
568
virauthconfigtest_LDADD = $(LDADDS)
569

570 571
seclabeltest_SOURCES = \
	seclabeltest.c
572
seclabeltest_LDADD = $(LDADDS)
J
Jamie Strandboge 已提交
573

574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595
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

596 597 598 599
virbuftest_SOURCES = \
	virbuftest.c testutils.h testutils.c
virbuftest_LDADD = $(LDADDS)

600 601 602
virhashtest_SOURCES = \
	virhashtest.c virhashdata.h testutils.h testutils.c
virhashtest_LDADD = $(LDADDS)
603

604
viratomictest_SOURCES = \
L
Laine Stump 已提交
605
	viratomictest.c testutils.h testutils.c
606 607
viratomictest_LDADD = $(LDADDS)

H
Hu Tao 已提交
608 609 610 611
virbitmaptest_SOURCES = \
	virbitmaptest.c testutils.h testutils.c
virbitmaptest_LDADD = $(LDADDS)

612
jsontest_SOURCES = \
613
	jsontest.c testutils.h testutils.c
614 615
jsontest_LDADD = $(LDADDS)

M
Matthias Bolte 已提交
616 617 618 619
utiltest_SOURCES = \
	utiltest.c testutils.h testutils.c
utiltest_LDADD = $(LDADDS)

620 621 622 623 624 625 626
if WITH_DRIVER_MODULES
virdrivermoduletest_SOURCES = \
	virdrivermoduletest.c testutils.h testutils.c
virdrivermoduletest_CFLAGS = -Dabs_builddir="\"$(abs_builddir)\"" $(AM_CFLAGS)
virdrivermoduletest_LDADD = $(LDADDS)
endif

627 628
if WITH_LIBVIRTD
eventtest_SOURCES = \
629
	eventtest.c testutils.h testutils.c
630 631 632
eventtest_LDADD = -lrt $(LDADDS)
endif

633 634 635 636 637 638
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
639
shunloadtest_LDADD = $(LIB_PTHREAD)
640 641
shunloadtest_DEPENDENCIES = libshunload.la

V
Viktor Mihajlovski 已提交
642 643 644 645
sysinfotest_SOURCES = \
	sysinfotest.c testutils.h testutils.c
sysinfotest_LDADD = $(LDADDS)

646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666
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

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