Makefile.am 17.3 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 \
O
Osier Yang 已提交
55
	fchostdata \
56
	interfaceschemadata \
57
	lxcxml2xmldata \
E
Eric Blake 已提交
58 59 60
	networkschematest \
	networkxml2xmlin \
	networkxml2xmlout \
61
	networkxml2confdata \
E
Eric Blake 已提交
62 63 64 65 66 67 68 69 70 71
	nodedevschemadata \
	nodedevschematest \
	nodeinfodata     \
	nwfilterschematest \
	nwfilterxml2xmlin \
	nwfilterxml2xmlout \
	oomtrace.pl \
	qemuhelpdata \
	qemuxml2argvdata \
	qemuxml2xmloutdata \
P
Philipp Hahn 已提交
72
	qemuxmlnsdata \
73
	securityselinuxlabeldata \
E
Eric Blake 已提交
74 75
	schematestutils.sh \
	sexpr2xmldata \
76
	storagepoolschemadata \
77
	storagepoolschematest \
78
	storagepoolxml2xmlin \
E
Eric Blake 已提交
79
	storagepoolxml2xmlout \
80
	storagevolxml2argvdata \
81
	storagevolschemadata \
82
	storagevolschematest \
83
	storagevolxml2xmlin \
E
Eric Blake 已提交
84
	storagevolxml2xmlout \
V
Viktor Mihajlovski 已提交
85
	sysinfodata \
E
Eric Blake 已提交
86
	test-lib.sh	\
87
	vmx2xmldata \
E
Eric Blake 已提交
88 89 90
	xencapsdata \
	xmconfigdata \
	xml2sexprdata \
91
	xml2vmxdata \
O
Osier Yang 已提交
92
	.valgrind.supp
K
Karel Zak 已提交
93

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

117
if WITH_GNUTLS
118 119 120
test_programs += virnettlscontexttest
endif

121 122
if WITH_SECDRIVER_SELINUX
test_programs += securityselinuxtest
123
if WITH_QEMU
124 125 126
if WITH_ATTR
test_programs += securityselinuxlabeltest
endif
127
endif
128
endif
129

130 131 132 133
if WITH_DRIVER_MODULES
test_programs += virdrivermoduletest
endif

134 135 136
# This is a fake SSH we use from virnetsockettest
ssh_SOURCES = ssh.c
ssh_LDADD = $(COVERAGE_LDFLAGS)
137

138
if WITH_XEN
139
test_programs += xml2sexprtest sexpr2xmltest \
140
	xmconfigtest xencapstest statstest reconnect
141
endif
142
if WITH_QEMU
143
test_programs += qemuxml2argvtest qemuxml2xmltest qemuxmlnstest \
144
	qemuargv2xmltest qemuhelptest domainsnapshotxml2xmltest \
145
	qemumonitortest qemumonitorjsontest
146 147
endif

148
if WITH_LXC
149
test_programs += lxcxml2xmltest
150 151
endif

152
if WITH_OPENVZ
153
test_programs += openvzutilstest
154 155
endif

156
if WITH_ESX
157
test_programs += esxutilstest
158 159 160
endif

if WITH_VMX
161
test_programs += vmx2xmltest xml2vmxtest
162 163
endif

164
if WITH_CIL
165
test_programs += object-locking
166 167
endif

168
if WITH_YAJL
169
test_programs += jsontest
170 171
endif

172
test_programs += networkxml2xmltest
173

174
if WITH_NETWORK
175
test_programs += networkxml2conftest
176
endif
177

178 179 180 181
if WITH_STORAGE_SHEEPDOG
test_programs += storagebackendsheepdogtest
endif

182
test_programs += nwfilterxml2xmltest
183

184
if WITH_STORAGE
185
test_programs += storagevolxml2argvtest
186
endif
187

188
test_programs += storagevolxml2xmltest storagepoolxml2xmltest
189

190
test_programs += nodedevxml2xmltest
M
Mark McLoughlin 已提交
191

192
test_programs += interfacexml2xmltest
193

194
test_programs += cputest
195

196 197
test_scripts = \
	capabilityschematest \
198
	interfaceschematest \
199 200 201 202
	networkschematest \
	storagepoolschematest \
	storagevolschematest \
	domainschematest \
203
	nodedevschematest \
204 205
	nwfilterschematest \
	domainsnapshotschematest
206

A
Atsushi SAKAI 已提交
207
if WITH_LIBVIRTD
208 209 210 211 212
test_scripts +=				\
	test_conf.sh			\
	cpuset				\
	define-dev-segfault		\
	int-overflow			\
J
Jim Meyering 已提交
213 214
	libvirtd-fail			\
	libvirtd-pool			\
215 216 217 218 219
	read-bufsiz			\
	read-non-seekable		\
	start				\
	vcpupin				\
	virsh-all			\
220
	virsh-optparse			\
221
	virsh-schedinfo			\
222 223 224
	virsh-synopsis			\
	virsh-undefine			\
	$(NULL)
225

226 227 228
test_programs += 			\
	eventtest			\
	libvirtdconftest
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243
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			\
244 245 246
	virsh-synopsis			\
	virsh-undefine			\
	$(NULL)
A
Atsushi SAKAI 已提交
247
endif
248

J
Jamie Strandboge 已提交
249 250
if WITH_SECDRIVER_APPARMOR
test_scripts += virt-aa-helper-test
251 252
else
EXTRA_DIST += virt-aa-helper-test
J
Jamie Strandboge 已提交
253
endif
254

255 256
EXTRA_DIST += $(test_scripts)

D
Daniel P. Berrange 已提交
257 258
test_libraries = libshunload.la \
		libvirportallocatormock.la \
259
		vircgroupmock.la \
D
Daniel P. Berrange 已提交
260
		$(NULL)
261 262 263 264
if WITH_QEMU
test_libraries += libqemumonitortestutils.la
endif

265 266
if WITH_TESTS
noinst_PROGRAMS = $(test_programs) $(test_helpers)
267
noinst_LTLIBRARIES = $(test_libraries)
268 269
else
check_PROGRAMS = $(test_programs) $(test_helpers)
270
check_LTLIBRARIES = $(test_libraries)
271
endif
272

273 274
TESTS = $(test_programs) \
	$(test_scripts)
275

276
# NB, automake < 1.10 does not provide the real
277
# abs_top_{src/build}dir or builddir variables, so don't rely
278
# on them here. Fake them with 'pwd'
279 280 281 282 283 284
# 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

285
TESTS_ENVIRONMENT =				\
286
  abs_top_builddir=$(lv_abs_top_builddir)	\
J
Jim Meyering 已提交
287
  abs_top_srcdir=`cd '$(top_srcdir)'; pwd`	\
288
  abs_builddir=`pwd`				\
289
  abs_srcdir=`cd '$(srcdir)'; pwd`		\
290
  CONFIG_HEADER="`cd '$(top_builddir)'; pwd`/config.h"	\
J
Jim Meyering 已提交
291
  PATH="$(path_add)$(PATH_SEPARATOR)$$PATH"	\
292
  SHELL="$(SHELL)"				\
293
  LIBVIRT_DRIVER_DIR="$(abs_top_builddir)/src/.libs" \
294
  LIBVIRT_AUTOSTART=0				\
295
  LC_ALL=C					\
296 297
  $(VG)

298

299
valgrind:
300
	$(MAKE) check VG="libtool --mode=execute valgrind --quiet --leak-check=full --suppressions=$(srcdir)/.valgrind.supp"
301

302 303 304
sockettest_SOURCES = \
	sockettest.c \
	testutils.c testutils.h
305
sockettest_LDADD = $(LDADDS)
306

307
if WITH_XEN
E
Eric Blake 已提交
308
xen_LDADDS = ../src/libvirt_driver_xen_impl.la
309 310
xen_LDADDS += $(LDADDS)

311
xml2sexprtest_SOURCES = \
312
	xml2sexprtest.c testutilsxen.c testutilsxen.h \
313
	testutils.c testutils.h
314
xml2sexprtest_LDADD = $(xen_LDADDS)
315 316

sexpr2xmltest_SOURCES = \
317
	sexpr2xmltest.c testutilsxen.c testutilsxen.h \
318
	testutils.c testutils.h
319
sexpr2xmltest_LDADD = $(xen_LDADDS)
320

321
xmconfigtest_SOURCES = \
322
	xmconfigtest.c testutilsxen.c testutilsxen.h \
323
	testutils.c testutils.h
324
xmconfigtest_LDADD = $(xen_LDADDS)
325

326 327
xencapstest_SOURCES = \
	xencapstest.c testutils.h testutils.c
328
xencapstest_LDADD = $(xen_LDADDS)
329 330

reconnect_SOURCES = \
331
	reconnect.c testutils.h testutils.c
332 333
reconnect_LDADD = $(LDADDS)

334 335
statstest_SOURCES = \
	statstest.c testutils.h testutils.c
336
statstest_LDADD = $(xen_LDADDS)
337

338 339 340 341 342 343
else
EXTRA_DIST += xml2sexprtest.c sexpr2xmltest.c xmconfigtest.c \
	xencapstest.c reconnect.c \
	testutilsxen.c testutilsxen.h
endif

344 345 346 347 348
QEMUMONITORTESTUTILS_SOURCES = \
	qemumonitortestutils.c \
	qemumonitortestutils.h \
	$(NULL)

349
if WITH_QEMU
350

351 352
libqemumonitortestutils_la_SOURCES = $(QEMUMONITORTESTUTILS_SOURCES)

353
qemu_LDADDS = ../src/libvirt_driver_qemu_impl.la
354
if WITH_NETWORK
E
Eric Blake 已提交
355
qemu_LDADDS += ../src/libvirt_driver_network_impl.la
356
endif
357
if WITH_DTRACE_PROBES
358
qemu_LDADDS += ../src/libvirt_qemu_probes.lo
359
endif
360
qemu_LDADDS += $(LDADDS)
361

362
qemuxml2argvtest_SOURCES = \
363
	qemuxml2argvtest.c testutilsqemu.c testutilsqemu.h \
364
	testutils.c testutils.h
365
qemuxml2argvtest_LDADD = $(qemu_LDADDS)
366 367

qemuxml2xmltest_SOURCES = \
368
	qemuxml2xmltest.c testutilsqemu.c testutilsqemu.h \
369
	testutils.c testutils.h
370
qemuxml2xmltest_LDADD = $(qemu_LDADDS)
371

P
Philipp Hahn 已提交
372 373 374
qemuxmlnstest_SOURCES = \
	qemuxmlnstest.c testutilsqemu.c testutilsqemu.h \
	testutils.c testutils.h
375
qemuxmlnstest_LDADD = $(qemu_LDADDS)
P
Philipp Hahn 已提交
376

377 378 379
qemuargv2xmltest_SOURCES = \
	qemuargv2xmltest.c testutilsqemu.c testutilsqemu.h \
	testutils.c testutils.h
380
qemuargv2xmltest_LDADD = $(qemu_LDADDS)
381 382

qemuhelptest_SOURCES = qemuhelptest.c testutils.c testutils.h
383
qemuhelptest_LDADD = $(qemu_LDADDS)
384

385
qemumonitortest_SOURCES = qemumonitortest.c testutils.c testutils.h
386
qemumonitortest_LDADD = $(qemu_LDADDS)
387

388 389 390 391 392 393 394
qemumonitorjsontest_SOURCES = \
	qemumonitorjsontest.c \
	testutils.c testutils.h \
	testutilsqemu.c testutilsqemu.h \
	$(NULL)
qemumonitorjsontest_LDADD = $(qemu_LDADDS) libqemumonitortestutils.la

395 396 397
domainsnapshotxml2xmltest_SOURCES = \
	domainsnapshotxml2xmltest.c testutilsqemu.c testutilsqemu.h \
	testutils.c testutils.h
398
domainsnapshotxml2xmltest_LDADD = $(qemu_LDADDS)
399
else
400 401
EXTRA_DIST += qemuxml2argvtest.c qemuxml2xmltest.c qemuargv2xmltest.c \
	qemuxmlnstest.c qemuhelptest.c domainsnapshotxml2xmltest.c \
402
	qemumonitortest.c testutilsqemu.c testutilsqemu.h \
403
	qemumonitorjsontest.c \
404
	$(QEMUMONITORTESTUTILS_SOURCES)
405
endif
406

407 408
if WITH_LXC

E
Eric Blake 已提交
409
lxc_LDADDS = ../src/libvirt_driver_lxc_impl.la
410
if WITH_NETWORK
E
Eric Blake 已提交
411
lxc_LDADDS += ../src/libvirt_driver_network_impl.la
412 413
endif
lxc_LDADDS += $(LDADDS)
414 415 416 417

lxcxml2xmltest_SOURCES = \
	lxcxml2xmltest.c testutilslxc.c testutilslxc.h \
	testutils.c testutils.h
418
lxcxml2xmltest_LDADD = $(lxc_LDADDS)
419 420 421 422
else
EXTRA_DIST += lxcxml2xmltest.c testutilslxc.c testutilslxc.h
endif

423 424 425 426
if WITH_OPENVZ
openvzutilstest_SOURCES = \
	openvzutilstest.c \
	testutils.c testutils.h
427
openvzutilstest_LDADD = $(LDADDS)
428 429 430 431 432
else
EXTRA_DIST += openvzutilstest.c
endif
EXTRA_DIST += openvzutilstest.conf

433 434 435 436
if WITH_ESX
esxutilstest_SOURCES = \
	esxutilstest.c \
	testutils.c testutils.h
437
esxutilstest_LDADD = $(LDADDS)
438 439 440
else
EXTRA_DIST += esxutilstest.c
endif
441

442
if WITH_VMX
443 444 445
vmx2xmltest_SOURCES = \
	vmx2xmltest.c \
	testutils.c testutils.h
446
vmx2xmltest_LDADD = $(LDADDS)
447 448 449 450

xml2vmxtest_SOURCES = \
	xml2vmxtest.c \
	testutils.c testutils.h
451
xml2vmxtest_LDADD = $(LDADDS)
452
else
453
EXTRA_DIST += vmx2xmltest.c xml2vmxtest.c
454 455
endif

456 457 458 459 460
networkxml2xmltest_SOURCES = \
	networkxml2xmltest.c \
	testutils.c testutils.h
networkxml2xmltest_LDADD = $(LDADDS)

461
if WITH_NETWORK
462 463
networkxml2conftest_SOURCES = \
	networkxml2conftest.c \
464
	testutils.c testutils.h
465
networkxml2conftest_LDADD = ../src/libvirt_driver_network_impl.la $(LDADDS)
466
else
467
EXTRA_DIST += networkxml2conftest.c
468
endif
469

470 471 472 473
if WITH_STORAGE_SHEEPDOG
storagebackendsheepdogtest_SOURCES = \
	storagebackendsheepdogtest.c \
	testutils.c testutils.h
474 475
storagebackendsheepdogtest_LDADD = \
	../src/libvirt_driver_storage_impl.la $(LDADDS)
476 477 478 479
else
EXTRA_DIST += storagebackendsheepdogtest.c
endif

480 481 482 483
nwfilterxml2xmltest_SOURCES = \
	nwfilterxml2xmltest.c \
	testutils.c testutils.h
nwfilterxml2xmltest_LDADD = $(LDADDS)
484

485
if WITH_STORAGE
486 487 488 489 490
storagevolxml2argvtest_SOURCES = \
    storagevolxml2argvtest.c \
    testutils.c testutils.h
storagevolxml2argvtest_LDADD = \
	../src/libvirt_driver_storage_impl.la $(LDADDS)
491 492 493
else
EXTRA_DIST += storagevolxml2argvtest.c
endif
494

495 496 497 498 499
storagevolxml2xmltest_SOURCES = \
	storagevolxml2xmltest.c \
	testutils.c testutils.h
storagevolxml2xmltest_LDADD = $(LDADDS)

500 501 502 503 504
storagepoolxml2xmltest_SOURCES = \
	storagepoolxml2xmltest.c \
	testutils.c testutils.h
storagepoolxml2xmltest_LDADD = $(LDADDS)

M
Mark McLoughlin 已提交
505 506 507
nodedevxml2xmltest_SOURCES = \
	nodedevxml2xmltest.c \
	testutils.c testutils.h
508
nodedevxml2xmltest_LDADD = $(LDADDS)
M
Mark McLoughlin 已提交
509

510 511 512 513 514
interfacexml2xmltest_SOURCES = \
	interfacexml2xmltest.c \
	testutils.c testutils.h
interfacexml2xmltest_LDADD = $(LDADDS)

515 516 517 518 519
cputest_SOURCES = \
	cputest.c \
	testutils.c testutils.h
cputest_LDADD = $(LDADDS)

520 521 522 523 524
virshtest_SOURCES = \
	virshtest.c \
	testutils.c testutils.h
virshtest_LDADD = $(LDADDS)

G
Gene Czarcinski 已提交
525 526 527
test_conf_SOURCES = \
	test_conf.c
test_conf_LDADD = $(LDADDS)
D
Daniel Veillard 已提交
528

529 530 531 532
nodeinfotest_SOURCES = \
	nodeinfotest.c testutils.h testutils.c
nodeinfotest_LDADD = $(LDADDS)

533 534 535 536 537 538 539
commandtest_SOURCES = \
	commandtest.c testutils.h testutils.c
commandtest_LDADD = $(LDADDS)

commandhelper_SOURCES = \
	commandhelper.c
commandhelper_LDADD = $(LDADDS)
540
commandhelper_LDFLAGS = -static
541

542 543 544 545 546 547 548 549 550
if WITH_LIBVIRTD
libvirtdconftest_SOURCES = \
	libvirtdconftest.c testutils.h testutils.c \
	../daemon/libvirtd-config.c
libvirtdconftest_LDADD = $(LDADDS)
else
EXTRA_DIST += libvirtdconftest.c
endif

551 552
virnetmessagetest_SOURCES = \
	virnetmessagetest.c testutils.h testutils.c
553
virnetmessagetest_CFLAGS = $(XDR_CFLAGS) $(AM_CFLAGS)
554
virnetmessagetest_LDADD = $(LDADDS)
555

556 557
virnetsockettest_SOURCES = \
	virnetsockettest.c testutils.h testutils.c
558
virnetsockettest_LDADD = $(LDADDS)
559

560
if WITH_GNUTLS
561
virnettlscontexttest_SOURCES = \
E
Eric Blake 已提交
562
	virnettlscontexttest.c testutils.h testutils.c
563
virnettlscontexttest_LDADD = $(LDADDS)
E
Eric Blake 已提交
564 565 566 567 568 569
if HAVE_LIBTASN1
virnettlscontexttest_SOURCES += pkix_asn1_tab.c
virnettlscontexttest_LDADD += -ltasn1
else
EXTRA_DIST += pkix_asn1_tab.c
endif
570 571 572 573
else
EXTRA_DIST += \
	virnettlscontexttest.c testutils.h testutils.c pkix_asn1_tab.c
endif
574

575 576
virtimetest_SOURCES = \
	virtimetest.c testutils.h testutils.c
577
virtimetest_LDADD = $(LDADDS)
578

579 580 581 582
virstringtest_SOURCES = \
	virstringtest.c testutils.h testutils.c
virstringtest_LDADD = $(LDADDS)

583 584 585 586
virstoragetest_SOURCES = \
	virstoragetest.c testutils.h testutils.c
virstoragetest_LDADD = $(LDADDS)

587 588 589 590
viridentitytest_SOURCES = \
	viridentitytest.c testutils.h testutils.c
viridentitytest_LDADD = $(LDADDS)

591 592 593 594
virkeycodetest_SOURCES = \
	virkeycodetest.c testutils.h testutils.c
virkeycodetest_LDADD = $(LDADDS)

595 596 597 598
virlockspacetest_SOURCES = \
	virlockspacetest.c testutils.h testutils.c
virlockspacetest_LDADD = $(LDADDS)

D
Daniel P. Berrange 已提交
599 600 601 602 603 604 605 606 607 608
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

609 610 611 612 613 614 615 616 617 618
vircgrouptest_SOURCES = \
	vircgrouptest.c testutils.h testutils.c
vircgrouptest_LDADD = $(LDADDS)

vircgroupmock_la_SOURCES = \
	vircgroupmock.c
vircgroupmock_la_CFLAGS = $(AM_CFLAGS)
vircgroupmock_la_LDFLAGS = -module -avoid-version \
        -rpath /evil/libtool/hack/to/force/shared/lib/creation

D
Daniel P. Berrange 已提交
619

620 621
viruritest_SOURCES = \
	viruritest.c testutils.h testutils.c
622
viruritest_LDADD = $(LDADDS)
623

624 625
virkeyfiletest_SOURCES = \
	virkeyfiletest.c testutils.h testutils.c
626
virkeyfiletest_LDADD = $(LDADDS)
627

628 629
virauthconfigtest_SOURCES = \
	virauthconfigtest.c testutils.h testutils.c
630
virauthconfigtest_LDADD = $(LDADDS)
631

632 633
seclabeltest_SOURCES = \
	seclabeltest.c
634
seclabeltest_LDADD = $(LDADDS)
J
Jamie Strandboge 已提交
635

636 637 638 639 640 641 642 643 644 645 646 647 648 649 650
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)
651 652 653 654 655 656 657 658 659 660 661
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
662
endif
663
EXTRA_DIST += securityselinuxtest.c securityselinuxlabeltest.c securityselinuxhelper.c
664

665 666 667 668
virbuftest_SOURCES = \
	virbuftest.c testutils.h testutils.c
virbuftest_LDADD = $(LDADDS)

669 670 671
virhashtest_SOURCES = \
	virhashtest.c virhashdata.h testutils.h testutils.c
virhashtest_LDADD = $(LDADDS)
672

673
viratomictest_SOURCES = \
L
Laine Stump 已提交
674
	viratomictest.c testutils.h testutils.c
675 676
viratomictest_LDADD = $(LDADDS)

H
Hu Tao 已提交
677 678 679 680
virbitmaptest_SOURCES = \
	virbitmaptest.c testutils.h testutils.c
virbitmaptest_LDADD = $(LDADDS)

E
Eric Blake 已提交
681 682 683 684
virendiantest_SOURCES = \
	virendiantest.c testutils.h testutils.c
virendiantest_LDADD = $(LDADDS)

685
jsontest_SOURCES = \
686
	jsontest.c testutils.h testutils.c
687 688
jsontest_LDADD = $(LDADDS)

M
Matthias Bolte 已提交
689 690 691 692
utiltest_SOURCES = \
	utiltest.c testutils.h testutils.c
utiltest_LDADD = $(LDADDS)

693 694 695 696 697 698
if WITH_DRIVER_MODULES
virdrivermoduletest_SOURCES = \
	virdrivermoduletest.c testutils.h testutils.c
virdrivermoduletest_LDADD = $(LDADDS)
endif

699 700
if WITH_LIBVIRTD
eventtest_SOURCES = \
701
	eventtest.c testutils.h testutils.c
702 703 704
eventtest_LDADD = -lrt $(LDADDS)
endif

705 706 707 708 709 710
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
711
shunloadtest_LDADD = $(LIB_PTHREAD)
712 713
shunloadtest_DEPENDENCIES = libshunload.la

V
Viktor Mihajlovski 已提交
714 715 716 717
sysinfotest_SOURCES = \
	sysinfotest.c testutils.h testutils.c
sysinfotest_LDADD = $(LDADDS)

718 719 720 721
fdstreamtest_SOURCES = \
	fdstreamtest.c testutils.h testutils.c
fdstreamtest_LDADD = $(LDADDS)

O
Osier Yang 已提交
722 723 724 725
fchosttest_SOURCES = \
       fchosttest.c testutils.h testutils.c
fchosttest_LDADD = $(LDADDS)

726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746
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

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