Makefile.am 107.8 KB
Newer Older
D
Daniel Veillard 已提交
1 2
## Process this file with automake to produce Makefile.in

3
## Copyright (C) 2005-2016 Red Hat, Inc.
E
Eric Blake 已提交
4 5 6 7 8 9 10 11 12 13 14 15 16 17
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
## Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public
## License along with this library.  If not, see
## <http://www.gnu.org/licenses/>.
18

19 20
# old automake does not provide abs_{src,build}dir variables
abs_builddir = $(shell pwd)
21
abs_topbuilddir = $(shell cd .. && pwd)
22
abs_srcdir = $(shell cd $(srcdir) && pwd)
M
Michal Privoznik 已提交
23
abs_topsrcdir = $(shell cd $(top_srcdir) && pwd)
24

25 26
# No libraries with the exception of LIBXML should be listed
# here. List them against the individual XXX_la_CFLAGS targets
27
# that actually use them. Also keep GETTEXT_CPPFLAGS at the end.
28 29
INCLUDES =	-I../gnulib/lib					\
		-I$(top_srcdir)/gnulib/lib			\
30
		-I$(top_srcdir)					\
31
		-I../include					\
32
		-I$(top_srcdir)/include				\
33
		-I$(srcdir)/util				\
A
Andrea Bolognani 已提交
34
		-I./util					\
35
		-DIN_LIBVIRT					\
36
		-Dabs_topbuilddir="\"$(abs_topbuilddir)\""	\
37
		-Dabs_topsrcdir="\"$(abs_topsrcdir)\""		\
38
		$(GETTEXT_CPPFLAGS)
E
Eric Blake 已提交
39

40 41
WARN_CFLAGS += $(STRICT_FRAME_LIMIT_CFLAGS)

42
AM_CFLAGS =	$(LIBXML_CFLAGS)				\
43
		$(WARN_CFLAGS)					\
E
Eric Blake 已提交
44 45 46
		$(LOCK_CHECKING_CFLAGS)				\
		$(WIN32_EXTRA_CFLAGS)				\
		$(COVERAGE_CFLAGS)
47
AM_LDFLAGS =	$(DRIVER_MODULES_LDFLAGS)			\
G
Guido Günther 已提交
48 49
		$(COVERAGE_LDFLAGS)				\
		$(RELRO_LDFLAGS)				\
50
		$(NO_INDIRECT_LDFLAGS)				\
51 52
		$(CYGWIN_EXTRA_LDFLAGS) 			\
		$(MINGW_EXTRA_LDFLAGS)				\
G
Guido Günther 已提交
53
		$(NULL)
54

55 56
POD2MAN = pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)"

57
EXTRA_DIST = $(conf_DATA)
58

59
BUILT_SOURCES =
60 61 62
CLEANFILES =
DISTCLEANFILES =
MAINTAINERCLEANFILES =
63
nodist_conf_DATA =
64

E
Eric Blake 已提交
65 66
THREAD_LIBS = $(LIB_PTHREAD) $(LTLIBMULTITHREAD)

J
Jim Fehlig 已提交
67
SECDRIVER_CFLAGS =
68 69
SECDRIVER_LIBS =
if WITH_SECDRIVER_SELINUX
J
Jim Fehlig 已提交
70
SECDRIVER_CFLAGS += $(SELINUX_CFLAGS)
71
SECDRIVER_LIBS += $(SELINUX_LIBS)
72
endif WITH_SECDRIVER_SELINUX
73
if WITH_SECDRIVER_APPARMOR
J
Jim Fehlig 已提交
74
SECDRIVER_CFLAGS += $(APPARMOR_CFLAGS)
75
SECDRIVER_LIBS += $(APPARMOR_LIBS)
76
endif WITH_SECDRIVER_APPARMOR
77

78 79
if WITH_NETWORK
UUID=$(shell uuidgen 2>/dev/null)
80
endif WITH_NETWORK
81

82
lib_LTLIBRARIES = libvirt.la libvirt-qemu.la libvirt-lxc.la
83

84
moddir = $(libdir)/libvirt/connection-driver
85 86
mod_LTLIBRARIES =

A
Amy Griffis 已提交
87
confdir = $(sysconfdir)/libvirt
88
conf_DATA = libvirt.conf libvirt-admin.conf
89

90 91 92 93 94 95
augeasdir = $(datadir)/augeas/lenses
augeas_DATA =

augeastestdir = $(datadir)/augeas/lenses/tests
augeastest_DATA =

96 97
# These files are not related to driver APIs. Simply generic
# helper APIs for various purposes
98
UTIL_SOURCES =							\
99
		util/viralloc.c util/viralloc.h			\
100
		util/virarch.h util/virarch.c			\
101
		util/viratomic.h util/viratomic.c		\
102
		util/viraudit.c util/viraudit.h			\
103
		util/virauth.c util/virauth.h			\
104
		util/virauthconfig.c util/virauthconfig.h	\
105
		util/virbitmap.c util/virbitmap.h		\
106
		util/virbuffer.c util/virbuffer.h		\
107
		util/virperf.c util/virperf.h			\
108
		util/vircgroup.c util/vircgroup.h util/vircgrouppriv.h	\
109
		util/virclosecallbacks.c util/virclosecallbacks.h		\
110
		util/vircommand.c util/vircommand.h util/vircommandpriv.h \
111
		util/virconf.c util/virconf.h			\
112
		util/vircrypto.c util/vircrypto.h		\
L
Laine Stump 已提交
113
		util/virdbus.c util/virdbus.h util/virdbuspriv.h	\
114
		util/virdnsmasq.c util/virdnsmasq.h		\
115
		util/virebtables.c util/virebtables.h		\
E
Eric Blake 已提交
116
		util/virendian.h				\
117
		util/virerror.c util/virerror.h			\
118
		util/virevent.c util/virevent.h			\
119
		util/vireventpoll.c util/vireventpoll.h		\
120
		util/virfcp.c util/virfcp.h			\
121
		util/virfdstream.c util/virfdstream.h		\
E
Eric Blake 已提交
122
		util/virfile.c util/virfile.h			\
123 124
		util/virfirewall.c util/virfirewall.h		\
		util/virfirewallpriv.h				\
125
		util/virfirmware.c util/virfirmware.h		\
126
		util/virgettext.c util/virgettext.h		\
127
		util/virgic.c util/virgic.h			\
128 129
		util/virhash.c util/virhash.h			\
		util/virhashcode.c util/virhashcode.h		\
130
		util/virhook.c util/virhook.h			\
131
		util/virhostcpu.c util/virhostcpu.h util/virhostcpupriv.h \
132
		util/virhostdev.c util/virhostdev.h		\
133
		util/virhostmem.c util/virhostmem.h		\
134
		util/viridentity.c util/viridentity.h		\
135
		util/virinitctl.c util/virinitctl.h		\
136
		util/viriptables.c util/viriptables.h		\
137
		util/viriscsi.c util/viriscsi.h			\
138
		util/virjson.c util/virjson.h			\
L
Lai Jiangshan 已提交
139
		util/virkeycode.c util/virkeycode.h		\
140
		util/virkeyfile.c util/virkeyfile.h		\
141
		util/virlease.c util/virlease.h			\
142
		util/virlockspace.c util/virlockspace.h		\
143
		util/virlog.c util/virlog.h			\
144
		util/virmacaddr.h util/virmacaddr.c		\
145
		util/virmacmap.h util/virmacmap.c		\
146
		util/virnetdev.h util/virnetdev.c		\
147
		util/virnetdevbandwidth.h util/virnetdevbandwidth.c \
148
		util/virnetdevbridge.h util/virnetdevbridge.c	\
149
		util/virnetdevip.h util/virnetdevip.c		\
150
		util/virnetdevmacvlan.c util/virnetdevmacvlan.h	\
151
		util/virnetdevmidonet.h util/virnetdevmidonet.c \
A
Ansis Atteka 已提交
152
		util/virnetdevopenvswitch.h util/virnetdevopenvswitch.c \
153
		util/virnetdevtap.h util/virnetdevtap.c		\
154 155
		util/virnetdevveth.h util/virnetdevveth.c	\
		util/virnetdevvlan.h util/virnetdevvlan.c	\
156
		util/virnetdevvportprofile.h util/virnetdevvportprofile.c \
157
		util/virnetlink.c util/virnetlink.h		\
158
		util/virnodesuspend.c util/virnodesuspend.h	\
159
		util/virkmod.c util/virkmod.h                   \
160
		util/virnuma.c util/virnuma.h			\
161 162 163
		util/virobject.c util/virobject.h		\
		util/virpci.c util/virpci.h			\
		util/virpidfile.c util/virpidfile.h		\
164
		util/virpolkit.c util/virpolkit.h               \
D
Daniel P. Berrange 已提交
165
		util/virportallocator.c util/virportallocator.h \
166
		util/virprobe.h					\
167
		util/virprocess.c util/virprocess.h		\
168
		util/virqemu.c util/virqemu.h			\
169
		util/virrandom.h util/virrandom.c		\
170
		util/virrotatingfile.h util/virrotatingfile.c   \
171
		util/virscsi.c util/virscsi.h			\
172
		util/virscsihost.c util/virscsihost.h		\
173
		util/virscsivhost.c util/virscsivhost.h		\
174
		util/virseclabel.c util/virseclabel.h		\
175
		util/virsecret.c util/virsecret.h		\
176 177
		util/virsexpr.c util/virsexpr.h			\
		util/virsocketaddr.h util/virsocketaddr.c	\
178
		util/virstorageencryption.c util/virstorageencryption.h \
179 180
		util/virstoragefile.c util/virstoragefile.h	\
		util/virstring.h util/virstring.c		\
181
		util/virsysinfo.c util/virsysinfo.h util/virsysinfopriv.h		\
182
		util/virsystemd.c util/virsystemd.h util/virsystemdpriv.h \
183
		util/virthread.c util/virthread.h		\
P
Pavel Hrdina 已提交
184
		util/virthreadjob.c util/virthreadjob.h		\
185 186
		util/virthreadpool.c util/virthreadpool.h	\
		util/virtime.h util/virtime.c			\
187
		util/virtpm.h util/virtpm.c			\
188
		util/virtypedparam.c util/virtypedparam.h	\
189
		util/virusb.c util/virusb.h			\
190 191
		util/viruri.h util/viruri.c			\
		util/virutil.c util/virutil.h			\
192
		util/viruuid.c util/viruuid.h			\
193
		util/virvhba.c util/virvhba.h			\
194
		util/virxdrdefs.h                               \
195
		util/virxml.c util/virxml.h			\
196
		util/virmdev.c util/virmdev.h			\
197
		$(NULL)
L
Lai Jiangshan 已提交
198

199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
EXTRA_DIST += \
	$(srcdir)/keycodemapdb/data/keymaps.csv \
	$(srcdir)/keycodemapdb/tools/keymap-gen \
	$(NULL)

util/virkeycodetable_%.h: $(srcdir)/keycodemapdb/data/keymaps.csv \
			$(srcdir)/keycodemapdb/tools/keymap-gen Makefile.am
	$(AM_V_GEN)export NAME=`echo $@ | sed -e 's,util/virkeycodetable_,,' \
					      -e 's,\.h,,'` && \
		$(MKDIR_P) util/ && \
		$(PYTHON) $(srcdir)/keycodemapdb/tools/keymap-gen \
			--lang stdc --varname virKeyCodeTable_$$NAME code-table \
			$(srcdir)/keycodemapdb/data/keymaps.csv $$NAME > $@-tmp && \
		mv $@-tmp $@ || rm -f $@-tmp

util/virkeynametable_%.h: $(srcdir)/keycodemapdb/data/keymaps.csv \
			$(srcdir)/keycodemapdb/tools/keymap-gen Makefile.am
	$(AM_V_GEN)export NAME=`echo $@ | sed -e 's,util/virkeynametable_,,' \
					      -e 's,\.h,,'` && \
		$(MKDIR_P) util/ && \
		$(PYTHON) $(srcdir)/keycodemapdb/tools/keymap-gen \
			--lang stdc --varname virKeyNameTable_$$NAME name-table \
			$(srcdir)/keycodemapdb/data/keymaps.csv $$NAME > $@-tmp && \
		mv $@-tmp $@ || rm -f $@-tmp

224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253
util/virkeycode-%.pod: $(srcdir)/keycodemapdb/data/keymaps.csv \
			$(srcdir)/keycodemapdb/tools/keymap-gen Makefile.am
	$(AM_V_GEN)export NAME=`echo $@ | sed -e 's,util/virkeycode-,,' \
					      -e 's,\.pod,,'` && \
		$(MKDIR_P) util/ && \
		$(PYTHON) $(srcdir)/keycodemapdb/tools/keymap-gen \
		--lang pod --varname "Key code values for $$NAME" code-docs \
		$(srcdir)/keycodemapdb/data/keymaps.csv $$NAME > \
			$@-tmp && mv $@-tmp $@ || rm $@-tmp

util/virkeyname-%.pod: $(srcdir)/keycodemapdb/data/keymaps.csv \
			$(srcdir)/keycodemapdb/tools/keymap-gen Makefile.am
	$(AM_V_GEN)export NAME=`echo $@ | sed -e 's,util/virkeyname-,,' \
					      -e 's,\.pod,,'` && \
		$(MKDIR_P) util/ && \
		$(PYTHON) $(srcdir)/keycodemapdb/tools/keymap-gen \
		--lang pod --varname "Key name values for $$NAME" name-docs \
		$(srcdir)/keycodemapdb/data/keymaps.csv $$NAME > \
			$@-tmp && mv $@-tmp $@ || rm $@-tmp

util/virkey%.7: util/virkey%.pod
	$(AM_V_GEN)$(POD2MAN) --section=7 $< $@-t1 && \
	if grep 'POD ERROR' $@-t1; then rm $@-t1; exit 1; fi && \
	sed \
		-e 's|SYSCONFDIR|\@sysconfdir\@|g' \
		-e 's|LOCALSTATEDIR|\@localstatedir\@|g' \
		< $@-t1 > $@-t2 && \
	rm -f $@-t1 && \
	mv $@-t2 $@

254 255 256 257 258 259 260 261
KEYCODES = linux osx atset1 atset2 atset3 xt xtkbd usb win32 rfb
KEYNAMES = linux osx win32

KEYTABLES = \
	$(KEYCODES:%=util/virkeycodetable_%.h) \
	$(KEYNAMES:%=util/virkeynametable_%.h) \
	$(NULL)

262 263 264 265 266 267
KEYPODS = $(KEYCODES:%=util/virkeycode-%.pod) \
	  $(KEYNAMES:%=util/virkeyname-%.pod)
KEYMANS = $(KEYPODS:%.pod=%.7)

man7_MANS = $(KEYMANS)

268 269 270
UTIL_SOURCES += $(KEYTABLES)
BUILT_SOURCES += $(KEYTABLES)
MAINTAINERCLEANFILES += $(KEYTABLES)
271
CLEANFILES += $(KEYMANS) $(KEYPODS)
L
Lai Jiangshan 已提交
272

273
# Internal generic driver infrastructure
O
Osier Yang 已提交
274 275 276
DATATYPES_SOURCES = datatypes.h datatypes.c
DRIVER_SOURCES =							\
		driver.c driver.h					\
277 278 279 280 281 282 283 284 285
		driver-hypervisor.h					\
		driver-interface.h					\
		driver-network.h					\
		driver-nodedev.h					\
		driver-nwfilter.h					\
		driver-secret.h						\
		driver-state.h						\
		driver-storage.h					\
		driver-stream.h						\
O
Osier Yang 已提交
286 287 288
		internal.h						\
		$(DATATYPES_SOURCES)					\
		libvirt.c libvirt_internal.h				\
289
		libvirt-domain.c 					\
290
		libvirt-domain-snapshot.c 				\
291
		libvirt-host.c 						\
292
		libvirt-interface.c	 				\
293
		libvirt-network.c	 				\
294
		libvirt-nodedev.c	 				\
295
		libvirt-nwfilter.c	 				\
296
		libvirt-secret.c	 				\
297
		libvirt-storage.c	 				\
298
		libvirt-stream.c	 				\
O
Osier Yang 已提交
299 300 301
		locking/lock_manager.c locking/lock_manager.h		\
		locking/lock_driver.h					\
		locking/lock_driver_nop.h locking/lock_driver_nop.c	\
302 303 304
		locking/domain_lock.h locking/domain_lock.c		\
		logging/log_manager.c logging/log_manager.h		\
		$(NULL)
305

306 307 308
LOCK_DRIVER_SANLOCK_SOURCES = \
		locking/lock_driver_sanlock.c

309 310
LOCK_DRIVER_SANLOCK_HELPER_SOURCES = \
		locking/sanlock_helper.c
311

312
LOCK_PROTOCOL_GENERATED = \
E
Eric Blake 已提交
313 314
		locking/lock_protocol.h \
		locking/lock_protocol.c \
315 316
		$(NULL)

317 318 319
LOCK_PROTOCOL = $(srcdir)/locking/lock_protocol.x
EXTRA_DIST += $(LOCK_PROTOCOL) \
	$(LOCK_PROTOCOL_GENERATED)
320 321 322
BUILT_SOURCES += $(LOCK_PROTOCOL_GENERATED)
MAINTAINERCLEANFILES += $(LOCK_PROTOCOL_GENERATED)

323
LOCK_DAEMON_GENERATED = \
324
		locking/lock_daemon_dispatch_stubs.h
325 326 327
		$(NULL)

BUILT_SOURCES += $(LOCK_DAEMON_GENERATED)
328
EXTRA_DIST += $(LOCK_DAEMON_GENERATED)
329 330
MAINTAINERCLEANFILES += $(LOCK_DAEMON_GENERATED)

331 332
LOCK_DRIVER_LOCKD_SOURCES = \
		locking/lock_driver_lockd.c \
333
		locking/lock_driver_lockd.h \
334 335
		$(NULL)

336 337 338 339 340
LOCK_DAEMON_SOURCES = \
		locking/lock_daemon.h \
		locking/lock_daemon.c \
		locking/lock_daemon_config.h \
		locking/lock_daemon_config.c \
341 342
		locking/lock_daemon_dispatch.c \
		locking/lock_daemon_dispatch.h \
343 344
		$(NULL)

E
Eric Blake 已提交
345
locking/lock_daemon_dispatch_stubs.h: $(LOCK_PROTOCOL) \
346
		$(srcdir)/rpc/gendispatch.pl Makefile.am
347 348
	$(AM_V_GEN)perl -w $(srcdir)/rpc/gendispatch.pl --mode=server \
	    virLockSpaceProtocol VIR_LOCK_SPACE_PROTOCOL \
E
Eric Blake 已提交
349
	    $(LOCK_PROTOCOL) > $(srcdir)/locking/lock_daemon_dispatch_stubs.h
350 351


352 353 354 355 356
LOG_PROTOCOL_GENERATED = \
		logging/log_protocol.h \
		logging/log_protocol.c \
		$(NULL)

357 358
DRIVER_SOURCES += $(LOG_PROTOCOL_GENERATED)

359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379
LOG_PROTOCOL = $(srcdir)/logging/log_protocol.x
EXTRA_DIST += $(LOG_PROTOCOL) \
	$(LOG_PROTOCOL_GENERATED)
BUILT_SOURCES += $(LOG_PROTOCOL_GENERATED)
MAINTAINERCLEANFILES += $(LOG_PROTOCOL_GENERATED)

LOG_DAEMON_GENERATED = \
		logging/log_daemon_dispatch_stubs.h
		$(NULL)

BUILT_SOURCES += $(LOG_DAEMON_GENERATED)
EXTRA_DIST += $(LOG_DAEMON_GENERATED)
MAINTAINERCLEANFILES += $(LOG_DAEMON_GENERATED)

LOG_DAEMON_SOURCES = \
		logging/log_daemon.h \
		logging/log_daemon.c \
		logging/log_daemon_config.h \
		logging/log_daemon_config.c \
		logging/log_daemon_dispatch.c \
		logging/log_daemon_dispatch.h \
380 381
		logging/log_handler.c \
		logging/log_handler.h \
382 383 384 385 386 387 388 389 390
		$(NULL)

logging/log_daemon_dispatch_stubs.h: $(LOG_PROTOCOL) \
		$(srcdir)/rpc/gendispatch.pl Makefile.am
	$(AM_V_GEN)perl -w $(srcdir)/rpc/gendispatch.pl --mode=server \
	    virLogManagerProtocol VIR_LOG_MANAGER_PROTOCOL \
	    $(LOG_PROTOCOL) > $(srcdir)/logging/log_daemon_dispatch_stubs.h


391 392
NETDEV_CONF_SOURCES =						\
		conf/netdev_bandwidth_conf.h conf/netdev_bandwidth_conf.c \
393 394
		conf/netdev_vport_profile_conf.h conf/netdev_vport_profile_conf.c \
		conf/netdev_vlan_conf.h conf/netdev_vlan_conf.c
395

396
# XML configuration format handling sources
397 398
# Domain driver generic impl APIs
DOMAIN_CONF_SOURCES =						\
399
		conf/capabilities.c conf/capabilities.h		\
400
		conf/domain_addr.c conf/domain_addr.h		\
M
Michal Privoznik 已提交
401
		conf/domain_capabilities.c conf/domain_capabilities.h	\
402
		conf/domain_conf.c conf/domain_conf.h		\
403
		conf/domain_audit.c conf/domain_audit.h		\
404
		conf/domain_nwfilter.c conf/domain_nwfilter.h	\
405
		conf/snapshot_conf.c conf/snapshot_conf.h	\
406 407
		conf/numa_conf.c conf/numa_conf.h	\
		conf/virdomainobjlist.c conf/virdomainobjlist.h
408

409 410 411 412
OBJECT_EVENT_SOURCES =						\
		conf/object_event.c conf/object_event.h \
		conf/object_event_private.h

413 414
DOMAIN_EVENT_SOURCES =						\
		conf/domain_event.c conf/domain_event.h
415

416 417 418
NETWORK_EVENT_SOURCES =						\
		conf/network_event.c conf/network_event.h

419 420 421
STORAGE_EVENT_SOURCES =						\
                conf/storage_event.c conf/storage_event.h

422 423 424
NODE_DEVICE_EVENT_SOURCES =					\
                conf/node_device_event.c conf/node_device_event.h

425 426 427
SECRET_EVENT_SOURCES =					\
                conf/secret_event.c conf/secret_event.h

428
# Network driver generic impl APIs
429
NETWORK_CONF_SOURCES =						\
J
John Ferlan 已提交
430 431
		conf/network_conf.c conf/network_conf.h		\
		conf/virnetworkobj.c conf/virnetworkobj.h	\
432
		conf/networkcommon_conf.c conf/networkcommon_conf.h
433

434 435
# Network filter driver generic impl APIs
NWFILTER_PARAM_CONF_SOURCES =					\
436
		conf/nwfilter_params.c conf/nwfilter_params.h	\
437 438
		conf/nwfilter_ipaddrmap.c			\
		conf/nwfilter_ipaddrmap.h			\
J
John Ferlan 已提交
439 440
		conf/nwfilter_conf.h                            \
		conf/virnwfilterobj.h
441

442
NWFILTER_CONF_SOURCES =						\
443
		$(NWFILTER_PARAM_CONF_SOURCES)			\
J
John Ferlan 已提交
444 445
		conf/nwfilter_conf.c conf/nwfilter_conf.h	\
		conf/virnwfilterobj.c conf/virnwfilterobj.h
446

447
# Storage driver generic impl APIs
448
STORAGE_CONF_SOURCES =                                         \
449
		conf/storage_adapter_conf.h conf/storage_adapter_conf.c \
J
John Ferlan 已提交
450 451
		conf/storage_conf.h conf/storage_conf.c        \
		conf/virstorageobj.h conf/virstorageobj.c
452

453
# Interface driver generic impl APIs
454
INTERFACE_CONF_SOURCES =                                       \
J
John Ferlan 已提交
455 456
		conf/interface_conf.c conf/interface_conf.h    \
		conf/virinterfaceobj.c conf/virinterfaceobj.h
457

458
# Secret driver generic impl APIs
459
SECRET_CONF_SOURCES =                                          \
460 461
		conf/secret_conf.h conf/secret_conf.c          \
		conf/virsecretobj.h conf/virsecretobj.c
462 463 464

# Network driver generic impl APIs
NODE_DEVICE_CONF_SOURCES =                                     \
J
John Ferlan 已提交
465 466
		conf/node_device_conf.c conf/node_device_conf.h \
		conf/virnodedeviceobj.c conf/virnodedeviceobj.h
467

468 469
CPU_CONF_SOURCES =						\
		conf/cpu_conf.c conf/cpu_conf.h
470

471 472
# Safe character device handling helper APIs
CHRDEV_CONF_SOURCES =						\
473
		conf/virchrdev.c conf/virchrdev.h
474

475 476 477 478
# Device Helper APIs
DEVICE_CONF_SOURCES =                                           \
		conf/device_conf.c conf/device_conf.h

479
CONF_SOURCES =							\
480
		$(NETDEV_CONF_SOURCES)				\
481
		$(DOMAIN_CONF_SOURCES)				\
482
		$(OBJECT_EVENT_SOURCES)				\
483
		$(DOMAIN_EVENT_SOURCES)				\
484
		$(NETWORK_EVENT_SOURCES)			\
485
		$(STORAGE_EVENT_SOURCES)			\
486
		$(NODE_DEVICE_EVENT_SOURCES)			\
487
		$(SECRET_EVENT_SOURCES)				\
488
		$(NETWORK_CONF_SOURCES)				\
489
		$(NWFILTER_CONF_SOURCES)			\
490 491 492
		$(NODE_DEVICE_CONF_SOURCES)			\
		$(STORAGE_CONF_SOURCES)				\
		$(INTERFACE_CONF_SOURCES)			\
493
		$(SECRET_CONF_SOURCES)				\
494
		$(CPU_CONF_SOURCES)				\
495
		$(CHRDEV_CONF_SOURCES)				\
496
		$(DEVICE_CONF_SOURCES)
497

498
# The remote RPC driver, covering domains, storage, networks, etc
499
REMOTE_DRIVER_GENERATED = \
E
Eric Blake 已提交
500 501 502 503 504 505 506 507 508 509
		remote/remote_protocol.c		\
		remote/remote_protocol.h		\
		remote/remote_client_bodies.h		\
		remote/lxc_protocol.c			\
		remote/lxc_protocol.h			\
		remote/lxc_client_bodies.h		\
		remote/qemu_protocol.c			\
		remote/qemu_protocol.h			\
		remote/qemu_client_bodies.h		\
		$(NULL)
E
Eric Blake 已提交
510 511

REMOTE_PROTOCOL = $(srcdir)/remote/remote_protocol.x
512
LXC_PROTOCOL = $(srcdir)/remote/lxc_protocol.x
E
Eric Blake 已提交
513
QEMU_PROTOCOL = $(srcdir)/remote/qemu_protocol.x
514
REMOTE_DRIVER_PROTOCOL = $(REMOTE_PROTOCOL) $(QEMU_PROTOCOL) $(LXC_PROTOCOL)
515

E
Eric Blake 已提交
516
remote/remote_client_bodies.h: $(srcdir)/rpc/gendispatch.pl \
517
		$(REMOTE_PROTOCOL) Makefile.am
518
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=client \
E
Eric Blake 已提交
519 520
	  remote REMOTE $(REMOTE_PROTOCOL) \
	  > $(srcdir)/remote/remote_client_bodies.h
521

E
Eric Blake 已提交
522
remote/lxc_client_bodies.h: $(srcdir)/rpc/gendispatch.pl \
523
		$(LXC_PROTOCOL) Makefile.am
524
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=client \
E
Eric Blake 已提交
525 526
	  lxc LXC $(LXC_PROTOCOL) \
	  > $(srcdir)/remote/lxc_client_bodies.h
527

E
Eric Blake 已提交
528
remote/qemu_client_bodies.h: $(srcdir)/rpc/gendispatch.pl \
529
		$(QEMU_PROTOCOL) Makefile.am
530
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=client \
E
Eric Blake 已提交
531 532
	  qemu QEMU $(QEMU_PROTOCOL) \
	  > $(srcdir)/remote/qemu_client_bodies.h
533 534 535 536

REMOTE_DRIVER_SOURCES =						\
		remote/remote_driver.c remote/remote_driver.h	\
		$(REMOTE_DRIVER_GENERATED)
537

538
EXTRA_DIST +=  $(REMOTE_DRIVER_PROTOCOL) \
539
		$(REMOTE_DRIVER_GENERATED)
540

M
Martin Kletzander 已提交
541 542 543 544
ADMIN_PROTOCOL = $(srcdir)/admin/admin_protocol.x

ADMIN_PROTOCOL_GENERATED = \
		admin/admin_protocol.c	\
545 546 547 548 549 550 551 552
		admin/admin_protocol.h	\
		admin/admin_client.h

admin/admin_client.h: $(srcdir)/rpc/gendispatch.pl \
		$(ADMIN_PROTOCOL) Makefile.am
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=client \
	  admin ADMIN $(ADMIN_PROTOCOL) \
	  > $(srcdir)/admin/admin_client.h
M
Martin Kletzander 已提交
553 554 555 556 557

EXTRA_DIST += $(ADMIN_PROTOCOL) $(ADMIN_PROTOCOL_GENERATED)
BUILT_SOURCES += $(ADMIN_PROTOCOL_GENERATED)
MAINTAINERCLEANFILES += $(ADMIN_PROTOCOL_GENERATED)

558 559 560 561 562 563 564 565 566 567
# Ensure that we don't change the struct or member names or member ordering
# in remote_protocol.x  The embedded perl below needs a few comments, and
# presumes you know what pdwtags output looks like:
# * use -0777 -n to slurp the entire file into $_.
# * the "split" splits on the /* DD */ comments, so that $p iterates
#     through the struct definitions.
# * process only "struct remote_..." entries
# * remove comments and preceding TAB throughout
# * remove empty lines throughout
# * remove white space at end of buffer
568 569 570 571

# With pdwtags 1.8, --verbose output includes separators like these:
# /* 93 */
# /* <0> (null):0 */
572 573
# with the second line omitted for intrinsic types.
# Whereas with pdwtags 1.3, they look like this:
574
# /* <2d2> /usr/include/libio.h:180 */
575 576
# The alternation of the following regexps matches both cases.
r1 = /\* \d+ \*/
577
r2 = /\* <[[:xdigit:]]+> \S+:\d+ \*/
M
Martin Kletzander 已提交
578 579 580
libs_prefix = remote_|qemu_|lxc_|admin_
other_prefix = keepalive|vir(Net|LockSpace|LXCMonitor)
struct_prefix = ($(libs_prefix)|$(other_prefix))
581

582
# Depending on configure options, libtool creates one or both of
E
Eric Blake 已提交
583 584
# remote/{,.libs/}libvirt_driver_remote_la-remote_protocol.o.  We want
# the newest of the two, in case configure options changed and a stale
585
# file is left around from an earlier build.
586
PDWTAGS = \
587
	$(AM_V_GEN)if (pdwtags --help) > /dev/null 2>&1; then		\
E
Eric Blake 已提交
588 589
	  o=`ls -t $(<:.lo=.$(OBJEXT))					\
	     $(subst /,/.libs/,$(<:.lo=.$(OBJEXT)))			\
590 591 592
	    2>/dev/null | sed -n 1p`;					\
	  test -f "$$o" || { echo ".o for $< not found" >&2; exit 1; };	\
	  pdwtags --verbose $$o > $(@F)-t1 2> $(@F)-t2;			\
E
Eric Blake 已提交
593
	  if test ! -s $(@F)-t1 && test -s $(@F)-t2; then		\
594 595 596
	    rm -rf $(@F)-t?;						\
	    echo 'WARNING: pdwtags appears broken; skipping the $@ test' >&2;\
	  else								\
597
	    $(PERL) -0777 -n						\
598
		-e 'foreach my $$p (split m!\n*(?:$(r1)|$(r2))\n!) {'	\
599
		-e '  if ($$p =~ /^(struct|enum) $(struct_prefix)/ ||'	\
600
		-e '      $$p =~ /^enum \{/) {'				\
601 602 603
		-e '    $$p =~ s!\t*/\*.*?\*/!!sg;'			\
		-e '    $$p =~ s!\s+\n!\n!sg;'				\
		-e '    $$p =~ s!\s+$$!!;'				\
604
		-e '    $$p =~ s!\t!        !g;'			\
605 606 607 608
		-e '    print "$$p\n";'					\
		-e '    $$n++;'						\
		-e '  }'						\
		-e '}'							\
609 610 611
		-e 'BEGIN {'						\
		-e '  print "/* -*- c -*- */\n";'			\
		-e '}'							\
612
		-e 'END {'						\
613
		-e '  if ($$n < 1) {'					\
614 615 616 617 618 619
		-e '    warn "WARNING: your pdwtags program is too old\n";' \
		-e '    warn "WARNING: skipping the $@ test\n";'	\
		-e '    warn "WARNING: install dwarves-1.3 or newer\n";' \
		-e '    exit 8;'					\
		-e '  }'						\
		-e '}'							\
620 621
		< $(@F)-t1 > $(@F)-t3;					\
	    case $$? in 8) rm -f $(@F)-t?; exit 0;; 0) ;; *) exit 1;; esac;\
622
	    diff -u $(@)s $(@F)-t3; st=$$?; rm -f $(@F)-t?; exit $$st;	\
623
	  fi;								\
624
	else								\
625 626
	  echo 'WARNING: you lack pdwtags; skipping the $@ test' >&2;	\
	  echo 'WARNING: install the dwarves package to get pdwtags' >&2; \
627
	fi
628

629
# .libs/libvirt.so is built by libtool as a side-effect of the Makefile
630 631
# rule for libvirt.la.  However, checking symbols relies on Linux ELF layout
if WITH_LINUX
632 633 634
check-symfile: libvirt.syms libvirt.la
	$(AM_V_GEN)$(PERL) $(srcdir)/check-symfile.pl libvirt.syms \
	  .libs/libvirt.so
635 636 637
check-admin-symfile: libvirt_admin.syms libvirt-admin.la
	$(AM_V_GEN)$(PERL) $(srcdir)/check-symfile.pl libvirt_admin.syms \
	  .libs/libvirt-admin.so
638
else ! WITH_LINUX
639
check-symfile:
640
check-admin-symfile:
641
endif ! WITH_LINUX
642
check-symsorting:
643
	$(AM_V_GEN)$(PERL) $(srcdir)/check-symsorting.pl \
644
		$(srcdir) $(SYM_FILES)
645 646 647
check-admin-symsorting:
	$(AM_V_GEN)$(PERL) $(srcdir)/check-symsorting.pl \
		$(srcdir) $(ADMIN_SYM_FILES)
J
Jiri Denemark 已提交
648
EXTRA_DIST += check-symfile.pl check-symsorting.pl
649

E
Eric Blake 已提交
650
# Keep this list synced with RPC_PROBE_FILES
651 652
PROTOCOL_STRUCTS = \
	$(srcdir)/remote_protocol-structs \
653
	$(srcdir)/lxc_protocol-structs \
654
	$(srcdir)/qemu_protocol-structs \
J
Jiri Denemark 已提交
655
	$(srcdir)/virnetprotocol-structs \
E
Eric Blake 已提交
656 657 658
	$(srcdir)/virkeepaliveprotocol-structs \
	$(srcdir)/lxc_monitor_protocol-structs \
	$(srcdir)/lock_protocol-structs \
M
Martin Kletzander 已提交
659
	$(srcdir)/admin_protocol-structs \
E
Eric Blake 已提交
660 661
	$(NULL)

662
if WITH_REMOTE
663 664
check-protocol: $(PROTOCOL_STRUCTS) $(PROTOCOL_STRUCTS:structs=struct)

665 666
# The .o file that pdwtags parses is created as a side effect of running
# libtool; but from make's perspective we depend on the .lo file.
667 668 669
$(srcdir)/remote_protocol-struct \
	$(srcdir)/qemu_protocol-struct \
	$(srcdir)/lxc_protocol-struct: \
E
Eric Blake 已提交
670
		$(srcdir)/%-struct: remote/libvirt_driver_remote_la-%.lo
671
	$(PDWTAGS)
672
$(srcdir)/virnetprotocol-struct $(srcdir)/virkeepaliveprotocol-struct: \
E
Eric Blake 已提交
673
		$(srcdir)/%-struct: rpc/libvirt_net_rpc_la-%.lo
674
	$(PDWTAGS)
E
Eric Blake 已提交
675
$(srcdir)/lxc_monitor_protocol-struct: \
E
Eric Blake 已提交
676
		$(srcdir)/%-struct: lxc/libvirt_driver_lxc_impl_la-%.lo
E
Eric Blake 已提交
677 678
	$(PDWTAGS)
$(srcdir)/lock_protocol-struct: \
E
Eric Blake 已提交
679
		$(srcdir)/%-struct: locking/lockd_la-%.lo
E
Eric Blake 已提交
680
	$(PDWTAGS)
M
Martin Kletzander 已提交
681 682 683
$(srcdir)/admin_protocol-struct: \
		$(srcdir)/%-struct: admin/libvirt_admin_la-%.lo
	$(PDWTAGS)
E
Eric Blake 已提交
684

685
else !WITH_REMOTE
686 687 688
# The $(PROTOCOL_STRUCTS) files must live in git, because they cannot be
# re-generated when configured --without-remote.
check-protocol:
689
endif !WITH_REMOTE
J
Jiri Denemark 已提交
690
EXTRA_DIST += $(PROTOCOL_STRUCTS)
691 692 693 694 695

check-drivername:
	$(AM_V_GEN)$(PERL) $(srcdir)/check-drivername.pl \
		$(srcdir)/driver.h \
		$(srcdir)/libvirt_public.syms \
696
		$(srcdir)/libvirt_admin_public.syms \
697 698 699 700 701
		$(srcdir)/libvirt_qemu.syms \
		$(srcdir)/libvirt_lxc.syms

EXTRA_DIST += check-drivername.pl

702
DRIVER_SOURCE_FILES = \
703 704 705 706 707 708 709 710 711 712 713
	$(ESX_DRIVER_SOURCES) \
	$(HYPERV_DRIVER_SORUCES) \
	$(INTERFACE_DRIVER_SOURCES) \
	$(LIBXL_DRIVER_SOURCES) \
	$(LXC_DRIVER_SOURCES) \
	$(NETWORK_DRIVER_SOURCES) \
	$(NODE_DEVICE_DRIVER_SOURCES) \
	$(NODE_DEVICE_DRIVER_HAL_SOURCES) \
	$(NODE_DEVICE_DRIVER_UDEV_SOURCES) \
	$(NWFILTER_DRIVER_SOURCES) \
	$(OPENVZ_DRIVER_SOURCES) \
714
	$(VZ_DRIVER_SOURCES) \
715 716 717 718 719 720 721 722
	$(PHYP_DRIVER_SOURCES) \
	$(QEMU_DRIVER_SOURCES) \
	$(REMOTE_DRIVER_SOURCES) \
	$(SECRET_DRIVER_SOURCES) \
	$(STORAGE_DRIVER_SOURCES) \
	$(TEST_DRIVER_SOURCES) \
	$(UML_DRIVER_SOURCES) \
	$(VBOX_DRIVER_SOURCES) \
723
	vbox/vbox_tmpl.c \
724 725 726
	$(VMWARE_DRIVER_SOURCES) \
	$(XEN_DRIVER_SOURCES) \
	$(XENAPI_DRIVER_SOURCES) \
727 728
	$(NULL)

729
STATEFUL_DRIVER_SOURCE_FILES = \
R
Roman Bogorodskiy 已提交
730
	$(BHYVE_DRIVER_SOURCES) \
731 732 733 734 735 736 737 738 739 740 741
	$(INTERFACE_DRIVER_SOURCES) \
	$(LIBXL_DRIVER_SOURCES) \
	$(LXC_DRIVER_SOURCES) \
	$(NETWORK_DRIVER_SOURCES) \
	$(NODE_DEVICE_DRIVER_SOURCES) \
	$(NWFILTER_DRIVER_SOURCES) \
	$(QEMU_DRIVER_SOURCES) \
	$(SECRET_DRIVER_SOURCES) \
	$(STORAGE_DRIVER_SOURCES) \
	$(UML_DRIVER_SOURCES) \
	$(XEN_DRIVER_SOURCES) \
742
	$(VZ_DRIVER_SOURCES) \
743 744
	$(NULL)

745 746 747

check-driverimpls:
	$(AM_V_GEN)$(PERL) $(srcdir)/check-driverimpls.pl \
748
		$(filter /%,$(DRIVER_SOURCE_FILES)) \
E
Eric Blake 已提交
749 750 751
		$(filter $(srcdir)/%,$(DRIVER_SOURCE_FILES)) \
		$(addprefix $(srcdir)/,$(filter-out $(srcdir)/%, \
			$(filter-out /%,$(DRIVER_SOURCE_FILES))))
752

753 754
check-aclrules:
	$(AM_V_GEN)$(PERL) $(srcdir)/check-aclrules.pl \
E
Eric Blake 已提交
755
		$(REMOTE_PROTOCOL) \
756
		$(addprefix $(srcdir)/,$(filter-out /%,$(STATEFUL_DRIVER_SOURCE_FILES)))
757

758 759 760 761 762
check-aclperms:
	$(AM_V_GEN)$(PERL) $(srcdir)/check-aclperms.pl \
		$(srcdir)/access/viraccessperm.h \
		$(srcdir)/access/viraccessperm.c

G
Guido Günther 已提交
763
EXTRA_DIST += check-driverimpls.pl check-aclrules.pl check-aclperms.pl
764

765
check-local: check-protocol check-symfile check-symsorting \
766
	check-drivername check-driverimpls check-aclrules \
767
	check-aclperms check-admin-symfile check-admin-symsorting
768
.PHONY: check-protocol $(PROTOCOL_STRUCTS:structs=struct)
769

770 771
# Mock driver, covering domains, storage, networks, etc
TEST_DRIVER_SOURCES =						\
772
		test/test_driver.c test/test_driver.h
D
Daniel P. Berrange 已提交
773
TEST_DRIVER_ASSETS = test/test-screenshot.png
774 775 776

# Now the Hypervisor specific drivers
XEN_DRIVER_SOURCES =						\
777 778 779 780 781 782
		xen/block_stats.c xen/block_stats.h		\
		xen/xen_hypervisor.c xen/xen_hypervisor.h	\
		xen/xen_driver.c xen/xen_driver.h		\
		xen/xend_internal.c xen/xend_internal.h		\
		xen/xm_internal.c xen/xm_internal.h		\
		xen/xs_internal.c xen/xs_internal.h
783
if WITH_XEN_INOTIFY
784
XEN_DRIVER_SOURCES += xen/xen_inotify.c xen/xen_inotify.h
785
endif WITH_XEN_INOTIFY
786

787
LXC_MONITOR_PROTOCOL_GENERATED = \
E
Eric Blake 已提交
788 789
	lxc/lxc_monitor_protocol.h \
	lxc/lxc_monitor_protocol.c \
790 791 792
	$(NULL)

LXC_MONITOR_GENERATED = \
E
Eric Blake 已提交
793
	lxc/lxc_monitor_dispatch.h \
794 795 796
	$(NULL)

LXC_CONTROLLER_GENERATED = \
E
Eric Blake 已提交
797
	lxc/lxc_controller_dispatch.h \
798 799 800
	$(NULL)

LXC_GENERATED = \
801
	$(LXC_MONITOR_PROTOCOL_GENERATED) \
802 803 804 805
	$(LXC_MONITOR_GENERATED) \
	$(LXC_CONTROLLER_GENERATED) \
	$(NULL)

806
LXC_MONITOR_PROTOCOL = $(srcdir)/lxc/lxc_monitor_protocol.x
807

E
Eric Blake 已提交
808
lxc/lxc_monitor_dispatch.h: $(srcdir)/rpc/gendispatch.pl \
809
		$(LXC_MONITOR_PROTOCOL) Makefile.am
810
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=client \
E
Eric Blake 已提交
811 812
	  virLXCMonitor VIR_LXC_MONITOR $(LXC_MONITOR_PROTOCOL) > \
	  $(srcdir)/lxc/lxc_monitor_dispatch.h
813

E
Eric Blake 已提交
814
lxc/lxc_controller_dispatch.h: $(srcdir)/rpc/gendispatch.pl \
815
		$(REMOTE_PROTOCOL) Makefile.am
816
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=server \
E
Eric Blake 已提交
817 818
	  virLXCMonitor VIR_LXC_MONITOR $(LXC_MONITOR_PROTOCOL) > \
	  $(srcdir)/lxc/lxc_controller_dispatch.h
819 820

EXTRA_DIST += \
821
	$(LXC_MONITOR_PROTOCOL) \
822 823 824 825 826
	$(LXC_GENERATED) \
	$(NULL)

BUILT_SOURCES += $(LXC_GENERATED)

827 828
CLEANFILES += $(LXC_GENERATED)

829
LXC_DRIVER_SOURCES =						\
830
		$(LXC_MONITOR_PROTOCOL_GENERATED)		\
831
		$(LXC_MONITOR_GENERATED)			\
832 833
		lxc/lxc_conf.c lxc/lxc_conf.h			\
		lxc/lxc_container.c lxc/lxc_container.h		\
834
		lxc/lxc_cgroup.c lxc/lxc_cgroup.h		\
835
		lxc/lxc_domain.c lxc/lxc_domain.h		\
836
		lxc/lxc_hostdev.c lxc/lxc_hostdev.h		\
837
		lxc/lxc_monitor.c lxc/lxc_monitor.h		\
838
		lxc/lxc_process.c lxc/lxc_process.h		\
G
Gao feng 已提交
839
		lxc/lxc_fuse.c lxc/lxc_fuse.h			\
840
		lxc/lxc_native.c lxc/lxc_native.h		\
841
		lxc/lxc_driver.c lxc/lxc_driver.h
842

843
LXC_CONTROLLER_SOURCES =					\
844
		$(LXC_MONITOR_PROTOCOL_GENERATED)		\
845
		$(LXC_CONTROLLER_GENERATED)			\
846 847
		lxc/lxc_conf.c lxc/lxc_conf.h			\
		lxc/lxc_container.c lxc/lxc_container.h		\
848
		lxc/lxc_cgroup.c lxc/lxc_cgroup.h		\
849
		lxc/lxc_domain.c lxc/lxc_domain.h		\
G
Gao feng 已提交
850
		lxc/lxc_fuse.c lxc/lxc_fuse.h			\
851
		lxc/lxc_controller.c
852

J
Jamie Strandboge 已提交
853
SECURITY_DRIVER_APPARMOR_HELPER_SOURCES =			\
E
Eric Blake 已提交
854
		$(DATATYPES_SOURCES)				\
J
Jamie Strandboge 已提交
855 856
		security/virt-aa-helper.c

857 858 859
PHYP_DRIVER_SOURCES =						\
		phyp/phyp_driver.c phyp/phyp_driver.h

860
OPENVZ_DRIVER_SOURCES =						\
861
		openvz/openvz_conf.c openvz/openvz_conf.h	\
862 863
		openvz/openvz_driver.c openvz/openvz_driver.h   \
		openvz/openvz_util.c openvz/openvz_util.h
864

E
Eric Blake 已提交
865
VMWARE_DRIVER_SOURCES =						\
866
		vmware/vmware_driver.c vmware/vmware_driver.h	\
867 868
		vmware/vmware_conf.c vmware/vmware_conf.h

869
VBOX_DRIVER_SOURCES =						\
E
Eric Blake 已提交
870 871
	vbox/vbox_glue.c vbox/vbox_glue.h			\
	vbox/vbox_driver.c vbox/vbox_driver.h			\
T
Taowei 已提交
872
	vbox/vbox_snapshot_conf.c vbox/vbox_snapshot_conf.h     \
873
	vbox/vbox_V4_0.c vbox/vbox_CAPI_v4_0.h			\
874
	vbox/vbox_V4_1.c vbox/vbox_CAPI_v4_1.h			\
R
Ryota Ozaki 已提交
875
	vbox/vbox_V4_2.c vbox/vbox_CAPI_v4_2.h			\
T
Taowei 已提交
876
	vbox/vbox_V4_2_20.c vbox/vbox_CAPI_v4_2_20.h		\
877
	vbox/vbox_V4_3.c vbox/vbox_CAPI_v4_3.h			\
T
Taowei 已提交
878
	vbox/vbox_V4_3_4.c vbox/vbox_CAPI_v4_3_4.h              \
M
Martin Pietsch 已提交
879
	vbox/vbox_V5_0.c vbox/vbox_CAPI_v5_0.h			\
880
	vbox/vbox_V5_1.c vbox/vbox_CAPI_v5_1.h			\
T
Taowei 已提交
881 882
	vbox/vbox_common.c vbox/vbox_common.h                   \
	vbox/vbox_uniformed_api.h                               \
883 884 885
	vbox/vbox_get_driver.h					\
	vbox/vbox_network.c					\
	vbox/vbox_storage.c
T
Taowei Luo 已提交
886

E
Eric Blake 已提交
887
VBOX_DRIVER_EXTRA_DIST =					\
888 889 890
		vbox/vbox_tmpl.c vbox/README			\
		vbox/vbox_MSCOMGlue.c vbox/vbox_MSCOMGlue.h	\
		vbox/vbox_XPCOMCGlue.c vbox/vbox_XPCOMCGlue.h
891

O
Osier Yang 已提交
892 893
QEMU_DRIVER_SOURCES =							\
		qemu/qemu_agent.c qemu/qemu_agent.h			\
894
		qemu/qemu_alias.c qemu/qemu_alias.h			\
895
		qemu/qemu_block.c qemu/qemu_block.h			\
896
		qemu/qemu_blockjob.c qemu/qemu_blockjob.h		\
O
Osier Yang 已提交
897 898
		qemu/qemu_capabilities.c qemu/qemu_capabilities.h	\
		qemu/qemu_command.c qemu/qemu_command.h			\
899
		qemu/qemu_parse_command.c qemu/qemu_parse_command.h	\
O
Osier Yang 已提交
900
		qemu/qemu_domain.c qemu/qemu_domain.h			\
901
		qemu/qemu_domain_address.c qemu/qemu_domain_address.h	\
O
Osier Yang 已提交
902 903 904
		qemu/qemu_cgroup.c qemu/qemu_cgroup.h			\
		qemu/qemu_hostdev.c qemu/qemu_hostdev.h			\
		qemu/qemu_hotplug.c qemu/qemu_hotplug.h			\
905
		qemu/qemu_hotplugpriv.h					\
O
Osier Yang 已提交
906 907
		qemu/qemu_conf.c qemu/qemu_conf.h			\
		qemu/qemu_process.c qemu/qemu_process.h			\
908
		qemu/qemu_processpriv.h					\
O
Osier Yang 已提交
909
		qemu/qemu_migration.c qemu/qemu_migration.h		\
910
		qemu/qemu_migration_cookie.c qemu/qemu_migration_cookie.h \
O
Osier Yang 已提交
911 912 913 914 915
		qemu/qemu_monitor.c qemu/qemu_monitor.h			\
		qemu/qemu_monitor_text.c				\
		qemu/qemu_monitor_text.h				\
		qemu/qemu_monitor_json.c				\
		qemu/qemu_monitor_json.h				\
916
		qemu/qemu_driver.c qemu/qemu_driver.h	\
917
		qemu/qemu_interface.c qemu/qemu_interface.h		\
918 919
		qemu/qemu_capspriv.h					\
		qemu/qemu_security.c qemu/qemu_security.h
R
Richard W.M. Jones 已提交
920

O
Osier Yang 已提交
921
XENAPI_DRIVER_SOURCES =						\
922
		xenapi/xenapi_driver.c xenapi/xenapi_driver.h	\
O
Osier Yang 已提交
923
		xenapi/xenapi_driver_private.h			\
924 925
		xenapi/xenapi_utils.c xenapi/xenapi_utils.h

926 927 928 929 930
LIBXL_DRIVER_SOURCES =							\
		libxl/libxl_conf.c libxl/libxl_conf.h			\
		libxl/libxl_capabilities.c libxl/libxl_capabilities.h	\
		libxl/libxl_domain.c libxl/libxl_domain.h       	\
		libxl/libxl_driver.c libxl/libxl_driver.h       	\
931
		libxl/libxl_logger.c libxl/libxl_logger.h           \
J
Jim Fehlig 已提交
932
		libxl/libxl_migration.c libxl/libxl_migration.h
J
Jim Fehlig 已提交
933

934
UML_DRIVER_SOURCES =						\
D
Daniel P. Berrange 已提交
935 936
		uml/uml_conf.c uml/uml_conf.h			\
		uml/uml_driver.c uml/uml_driver.h
937

O
Osier Yang 已提交
938 939 940 941 942 943
ESX_DRIVER_SOURCES =							\
		esx/esx_private.h					\
		esx/esx_driver.c esx/esx_driver.h			\
		esx/esx_interface_driver.c esx/esx_interface_driver.h	\
		esx/esx_network_driver.c esx/esx_network_driver.h	\
		esx/esx_storage_driver.c esx/esx_storage_driver.h	\
944
		esx/esx_storage_backend_vmfs.c esx/esx_storage_backend_vmfs.h	\
945
		esx/esx_storage_backend_iscsi.c esx/esx_storage_backend_iscsi.h	\
946
		esx/esx_stream.c esx/esx_stream.h			\
O
Osier Yang 已提交
947 948 949
		esx/esx_util.c esx/esx_util.h				\
		esx/esx_vi.c esx/esx_vi.h				\
		esx/esx_vi_methods.c esx/esx_vi_methods.h		\
950
		esx/esx_vi_types.c esx/esx_vi_types.h
951

952
ESX_DRIVER_GENERATED =							\
953 954
		esx/esx_vi_methods.generated.c				\
		esx/esx_vi_methods.generated.h				\
955
		esx/esx_vi_methods.generated.macro			\
956 957 958 959 960
		esx/esx_vi_types.generated.c				\
		esx/esx_vi_types.generated.h				\
		esx/esx_vi_types.generated.typedef			\
		esx/esx_vi_types.generated.typeenum			\
		esx/esx_vi_types.generated.typetostring			\
961 962 963
		esx/esx_vi_types.generated.typefromstring		\
		esx/esx_vi.generated.c					\
		esx/esx_vi.generated.h
964

O
Osier Yang 已提交
965
ESX_DRIVER_EXTRA_DIST =							\
966 967 968 969 970
		esx/README						\
		esx/esx_vi_generator.input				\
		esx/esx_vi_generator.py					\
		$(ESX_DRIVER_GENERATED)

O
Osier Yang 已提交
971
HYPERV_DRIVER_SOURCES =									\
M
Matthias Bolte 已提交
972 973
		hyperv/hyperv_private.h							\
		hyperv/hyperv_driver.c hyperv/hyperv_driver.h				\
974
		hyperv/hyperv_util.c hyperv/hyperv_util.h				\
975 976 977 978 979 980 981 982 983 984 985 986 987 988
		hyperv/hyperv_wmi.c hyperv/hyperv_wmi.h					\
		hyperv/hyperv_wmi_classes.c hyperv/hyperv_wmi_classes.h			\
		hyperv/openwsman.h

HYPERV_DRIVER_GENERATED =							\
		hyperv/hyperv_wmi_classes.generated.c				\
		hyperv/hyperv_wmi_classes.generated.h				\
		hyperv/hyperv_wmi_classes.generated.typedef

HYPERV_DRIVER_EXTRA_DIST =							\
		hyperv/hyperv_wmi_generator.input				\
		hyperv/hyperv_wmi_generator.py					\
		$(HYPERV_DRIVER_GENERATED)

989
VZ_DRIVER_SOURCES =				\
990 991 992 993 994 995
		vz/vz_driver.h			\
		vz/vz_driver.c			\
		vz/vz_utils.c			\
		vz/vz_utils.h			\
		vz/vz_sdk.h			\
		vz/vz_sdk.c
D
Dmitry Guryanov 已提交
996

R
Roman Bogorodskiy 已提交
997
BHYVE_DRIVER_SOURCES =						\
998 999
		bhyve/bhyve_capabilities.c			\
		bhyve/bhyve_capabilities.h			\
R
Roman Bogorodskiy 已提交
1000 1001
		bhyve/bhyve_command.c				\
		bhyve/bhyve_command.h				\
1002 1003
		bhyve/bhyve_conf.c				\
		bhyve/bhyve_conf.h				\
1004 1005
		bhyve/bhyve_parse_command.c			\
		bhyve/bhyve_parse_command.h			\
1006 1007 1008 1009
		bhyve/bhyve_device.c				\
		bhyve/bhyve_device.h				\
		bhyve/bhyve_domain.c				\
		bhyve/bhyve_domain.h				\
R
Roman Bogorodskiy 已提交
1010 1011
		bhyve/bhyve_driver.h				\
		bhyve/bhyve_driver.c				\
1012 1013
		bhyve/bhyve_monitor.c				\
		bhyve/bhyve_monitor.h				\
R
Roman Bogorodskiy 已提交
1014 1015 1016 1017 1018
		bhyve/bhyve_process.c				\
		bhyve/bhyve_process.h				\
		bhyve/bhyve_utils.h				\
		$(NULL)

1019
NETWORK_DRIVER_SOURCES =					\
1020 1021 1022 1023 1024
		network/bridge_driver.h network/bridge_driver.c \
		network/bridge_driver_platform.h 		\
		network/bridge_driver_platform.c		\
		$(NULL)
EXTRA_DIST += network/bridge_driver_linux.c network/bridge_driver_nop.c
1025

1026 1027 1028 1029
INTERFACE_DRIVER_SOURCES =

if WITH_INTERFACE
INTERFACE_DRIVER_SOURCES +=					\
1030 1031
		interface/interface_driver.h        \
		interface/interface_driver.c
1032 1033 1034 1035

if WITH_NETCF
INTERFACE_DRIVER_SOURCES +=					\
		interface/interface_backend_netcf.c
1036
endif WITH_NETCF
1037
if WITH_UDEV
1038 1039
INTERFACE_DRIVER_SOURCES +=					\
		interface/interface_backend_udev.c
1040 1041
endif WITH_UDEV
endif WITH_INTERFACE
1042

1043 1044 1045
SECRET_UTIL_SOURCES =						\
		secret/secret_util.h secret/secret_util.c

1046
SECRET_DRIVER_SOURCES =						\
1047
		secret/secret_driver.h secret/secret_driver.c
1048

1049
# Storage backend specific impls
1050 1051 1052
STORAGE_DRIVER_BACKEND_SOURCES = \
		storage/storage_backend.h storage/storage_backend.c

O
Osier Yang 已提交
1053 1054
STORAGE_DRIVER_SOURCES =						\
		storage/storage_driver.h storage/storage_driver.c	\
1055
		$(STORAGE_DRIVER_BACKEND_SOURCES) \
1056
		storage/storage_util.h storage/storage_util.c
1057 1058

STORAGE_DRIVER_FS_SOURCES =					\
1059
		storage/storage_backend_fs.h storage/storage_backend_fs.c
R
Richard W.M. Jones 已提交
1060

1061
STORAGE_DRIVER_LVM_SOURCES =					\
O
Osier Yang 已提交
1062
		storage/storage_backend_logical.h		\
1063
		storage/storage_backend_logical.c
1064 1065

STORAGE_DRIVER_ISCSI_SOURCES =					\
1066
		storage/storage_backend_iscsi.h storage/storage_backend_iscsi.c
1067

1068
STORAGE_DRIVER_SCSI_SOURCES =					\
1069
		storage/storage_backend_scsi.h storage/storage_backend_scsi.c
1070

D
Dave Allan 已提交
1071
STORAGE_DRIVER_MPATH_SOURCES =					\
1072
		storage/storage_backend_mpath.h storage/storage_backend_mpath.c
D
Dave Allan 已提交
1073

1074
STORAGE_DRIVER_DISK_SOURCES =					\
1075
		storage/storage_backend_disk.h storage/storage_backend_disk.c
1076

1077 1078 1079
STORAGE_DRIVER_RBD_SOURCES =					\
		storage/storage_backend_rbd.h storage/storage_backend_rbd.c

1080
STORAGE_DRIVER_SHEEPDOG_SOURCES =				\
1081 1082
		storage/storage_backend_sheepdog.h storage/storage_backend_sheepdog.c \
		storage/storage_backend_sheepdog_priv.h
1083

1084 1085 1086
STORAGE_DRIVER_GLUSTER_SOURCES =				\
		storage/storage_backend_gluster.h storage/storage_backend_gluster.c

R
Roman Bogorodskiy 已提交
1087 1088 1089
STORAGE_DRIVER_ZFS_SOURCES =					\
                storage/storage_backend_zfs.h storage/storage_backend_zfs.c

1090 1091 1092 1093
STORAGE_DRIVER_VSTORAGE_SOURCES =				\
                storage/storage_backend_vstorage.h		\
                storage/storage_backend_vstorage.c

1094
STORAGE_HELPER_DISK_SOURCES =					\
1095
		storage/parthelper.c
1096

1097 1098 1099
UTIL_IO_HELPER_SOURCES =					\
		util/iohelper.c

1100 1101 1102
NETWORK_LEASES_HELPER_SOURCES =                                 \
               network/leaseshelper.c

1103
# Network filters
O
Osier Yang 已提交
1104
NWFILTER_DRIVER_SOURCES =						\
1105
		nwfilter/nwfilter_driver.h nwfilter/nwfilter_driver.c	\
1106
		nwfilter/nwfilter_tech_driver.h				\
1107 1108
		nwfilter/nwfilter_gentech_driver.c			\
		nwfilter/nwfilter_gentech_driver.h			\
S
Stefan Berger 已提交
1109 1110
		nwfilter/nwfilter_dhcpsnoop.c				\
		nwfilter/nwfilter_dhcpsnoop.h				\
1111
		nwfilter/nwfilter_ebiptables_driver.c			\
1112 1113 1114
		nwfilter/nwfilter_ebiptables_driver.h			\
		nwfilter/nwfilter_learnipaddr.c				\
		nwfilter/nwfilter_learnipaddr.h
1115

1116

1117
# Security framework and drivers for various models
O
Osier Yang 已提交
1118 1119 1120 1121 1122
SECURITY_DRIVER_SOURCES =						\
		security/security_driver.h security/security_driver.c	\
		security/security_nop.h security/security_nop.c		\
		security/security_stack.h security/security_stack.c	\
		security/security_dac.h security/security_dac.c		\
1123
		security/security_manager.h security/security_manager.c
1124

1125
SECURITY_DRIVER_SELINUX_SOURCES =				\
1126
		security/security_selinux.h security/security_selinux.c
1127

J
Jamie Strandboge 已提交
1128 1129 1130
SECURITY_DRIVER_APPARMOR_SOURCES =				\
		security/security_apparmor.h security/security_apparmor.c

1131
ACCESS_DRIVER_GENERATED = \
E
Eric Blake 已提交
1132 1133 1134 1135 1136 1137 1138
		access/viraccessapicheck.h \
		access/viraccessapicheck.c \
		access/viraccessapicheckqemu.h \
		access/viraccessapicheckqemu.c \
		access/viraccessapichecklxc.h \
		access/viraccessapichecklxc.c \
		$(NULL)
1139

1140
ACCESS_DRIVER_SYM_FILES = \
1141 1142 1143
		libvirt_access.syms \
		libvirt_access_qemu.syms \
		libvirt_access_lxc.syms
1144

1145 1146 1147 1148 1149
ACCESS_DRIVER_API_FILES = \
		libvirt_access.xml \
		libvirt_access_qemu.xml \
		libvirt_access_lxc.xml

1150 1151 1152 1153 1154 1155 1156
ACCESS_DRIVER_SOURCES = \
		access/viraccessperm.h access/viraccessperm.c \
		access/viraccessmanager.h access/viraccessmanager.c \
		access/viraccessdriver.h \
		access/viraccessdrivernop.h access/viraccessdrivernop.c \
		access/viraccessdriverstack.h access/viraccessdriverstack.c

1157 1158 1159 1160
ACCESS_DRIVER_POLKIT_SOURCES = \
		access/viraccessdriverpolkit.h access/viraccessdriverpolkit.c

ACCESS_DRIVER_POLKIT_POLICY = \
1161
		$(srcdir)/access/org.libvirt.api.policy
1162 1163


1164
NODE_DEVICE_DRIVER_SOURCES =					\
O
Osier Yang 已提交
1165 1166
		node_device/node_device_driver.c		\
		node_device/node_device_driver.h		\
1167 1168
		node_device/node_device_linux_sysfs.c           \
		node_device/node_device_linux_sysfs.h
1169 1170

NODE_DEVICE_DRIVER_HAL_SOURCES =				\
1171
		node_device/node_device_hal.c			\
1172
		node_device/node_device_hal.h
1173

1174
NODE_DEVICE_DRIVER_UDEV_SOURCES =				\
D
Daniel Veillard 已提交
1175 1176
		node_device/node_device_udev.c			\
		node_device/node_device_udev.h
1177

J
Jiri Denemark 已提交
1178 1179 1180
CPU_SOURCES =							\
		cpu/cpu.h cpu/cpu.c				\
		cpu/cpu_x86.h cpu/cpu_x86.c cpu/cpu_x86_data.h	\
T
Thang Pham 已提交
1181
		cpu/cpu_s390.h cpu/cpu_s390.c			\
C
Chuck Short 已提交
1182
		cpu/cpu_arm.h cpu/cpu_arm.c			\
1183 1184 1185
		cpu/cpu_ppc64.h cpu/cpu_ppc64.c			\
		cpu/cpu_ppc64_data.h				\
		cpu/cpu_map.h cpu/cpu_map.c
1186

1187 1188 1189
VMX_SOURCES =							\
		vmx/vmx.c vmx/vmx.h

1190 1191
XENCONFIG_SOURCES =						\
		xenconfig/xenxs_private.h			\
1192
		xenconfig/xen_common.c xenconfig/xen_common.h   \
1193
		xenconfig/xen_sxpr.c xenconfig/xen_sxpr.h	\
1194
		xenconfig/xen_xm.c xenconfig/xen_xm.h
1195 1196 1197 1198
if WITH_LIBXL
XENCONFIG_SOURCES +=						\
		xenconfig/xen_xl.c xenconfig/xen_xl.h
endif WITH_LIBXL
1199

J
Jiri Denemark 已提交
1200 1201
pkgdata_DATA =	cpu/cpu_map.xml

E
Eric Blake 已提交
1202
EXTRA_DIST +=	$(pkgdata_DATA)
1203

1204 1205 1206 1207 1208 1209
#########################
#
# Build up list of libvirt.la source files based on configure conditions
#
# First deal with sources usable in non-daemon context

1210
noinst_LTLIBRARIES = libvirt_util.la
1211 1212
libvirt_la_LIBADD = $(libvirt_la_BUILT_LIBADD)
libvirt_la_BUILT_LIBADD = libvirt_util.la
1213 1214
libvirt_util_la_SOURCES =					\
		$(UTIL_SOURCES)
1215
libvirt_util_la_CFLAGS = $(CAPNG_CFLAGS) $(YAJL_CFLAGS) $(LIBNL_CFLAGS) \
1216
		$(AM_CFLAGS) $(AUDIT_CFLAGS) $(DEVMAPPER_CFLAGS) \
1217
		$(DBUS_CFLAGS) $(LDEXP_LIBM) $(NUMACTL_CFLAGS)	\
1218
		$(POLKIT_CFLAGS) $(GNUTLS_CFLAGS) $(ACL_CFLAGS)
1219
libvirt_util_la_LIBADD = $(CAPNG_LIBS) $(YAJL_LIBS) $(LIBNL_LIBS) \
1220
		$(THREAD_LIBS) $(AUDIT_LIBS) $(DEVMAPPER_LIBS) \
1221
		$(LIB_CLOCK_GETTIME) $(DBUS_LIBS) $(WIN32_EXTRA_LIBS) $(LIBXML_LIBS) \
M
Michal Privoznik 已提交
1222
		$(SECDRIVER_LIBS) $(NUMACTL_LIBS) $(ACL_LIBS) \
1223
		$(POLKIT_LIBS)
1224

1225 1226

noinst_LTLIBRARIES += libvirt_conf.la
1227
libvirt_la_BUILT_LIBADD += libvirt_conf.la
1228
libvirt_conf_la_SOURCES = $(CONF_SOURCES)
1229 1230
libvirt_conf_la_CFLAGS = \
		-I$(srcdir)/conf $(AM_CFLAGS)
1231
libvirt_conf_la_LDFLAGS = $(AM_LDFLAGS)
1232
libvirt_conf_la_LIBADD = $(LIBXML_LIBS)
1233

J
Jiri Denemark 已提交
1234
noinst_LTLIBRARIES += libvirt_cpu.la
1235
libvirt_la_BUILT_LIBADD += libvirt_cpu.la
J
Jiri Denemark 已提交
1236
libvirt_cpu_la_CFLAGS = \
1237
		-I$(srcdir)/conf $(AM_CFLAGS)
J
Jiri Denemark 已提交
1238 1239
libvirt_cpu_la_SOURCES = $(CPU_SOURCES)

1240 1241 1242 1243 1244 1245
noinst_LTLIBRARIES += libvirt_secret.la
libvirt_la_BUILT_LIBADD += libvirt_secret.la
libvirt_secret_la_CFLAGS = $(AM_CFLAGS)
libvirt_secret_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_secret_la_SOURCES = $(SECRET_UTIL_SOURCES)

1246 1247 1248 1249
if WITH_VMX
noinst_LTLIBRARIES += libvirt_vmx.la
libvirt_la_BUILT_LIBADD += libvirt_vmx.la
libvirt_vmx_la_CFLAGS = \
1250
		-I$(srcdir)/conf $(AM_CFLAGS)
1251
libvirt_vmx_la_SOURCES = $(VMX_SOURCES)
1252
endif WITH_VMX
1253

J
Jim Fehlig 已提交
1254 1255 1256
if WITH_XENCONFIG
noinst_LTLIBRARIES += libvirt_xenconfig.la
libvirt_la_BUILT_LIBADD += libvirt_xenconfig.la
1257
libvirt_xenconfig_la_LIBADD = $(LIBXL_LIBS)
J
Jim Fehlig 已提交
1258
libvirt_xenconfig_la_CFLAGS = \
J
Jim Fehlig 已提交
1259
		-I$(srcdir)/conf -I$(srcdir)/libxl $(AM_CFLAGS)
J
Jim Fehlig 已提交
1260 1261
libvirt_xenconfig_la_SOURCES = $(XENCONFIG_SOURCES)
endif WITH_XENCONFIG
1262

1263

1264
noinst_LTLIBRARIES += libvirt_driver.la
1265
libvirt_la_BUILT_LIBADD += libvirt_driver.la
1266
libvirt_driver_la_SOURCES = $(DRIVER_SOURCES)
1267

1268
libvirt_driver_la_CFLAGS = \
1269
		$(GNUTLS_CFLAGS) $(CURL_CFLAGS) $(XDR_CFLAGS) \
1270
		-I$(srcdir)/conf $(AM_CFLAGS)
1271
libvirt_driver_la_LIBADD = \
1272
		$(GNUTLS_LIBS) $(CURL_LIBS) $(DLOPEN_LIBS)
1273

1274 1275
# All .syms files should be placed in exactly one of these three lists,
# depending on whether they are stored in git and/or used in the build.
1276
SYM_FILES = $(USED_SYM_FILES)
1277
USED_SYM_FILES = $(srcdir)/libvirt_private.syms
1278 1279 1280
GENERATED_SYM_FILES = \
	$(ACCESS_DRIVER_SYM_FILES) \
	libvirt.syms libvirt.def libvirt_qemu.def libvirt_lxc.def \
1281
	libvirt_admin.syms libvirt_admin.def \
1282
	$(NULL)
1283

1284
if WITH_TEST
D
Daniel P. Berrange 已提交
1285 1286 1287 1288

driver_test_asset_DATA = $(TEST_DRIVER_ASSETS)
driver_test_assetdir = $(pkgdatadir)

1289
noinst_LTLIBRARIES += libvirt_driver_test.la
1290
libvirt_la_BUILT_LIBADD += libvirt_driver_test.la
1291
libvirt_driver_test_la_CFLAGS = \
1292
		-I$(srcdir)/conf $(AM_CFLAGS)
1293
libvirt_driver_test_la_SOURCES = $(TEST_DRIVER_SOURCES)
1294
endif WITH_TEST
1295 1296

if WITH_REMOTE
1297
noinst_LTLIBRARIES += libvirt_driver_remote.la
1298
libvirt_la_BUILT_LIBADD += libvirt_driver_remote.la
1299 1300
libvirt_driver_remote_la_CFLAGS =				\
		$(GNUTLS_CFLAGS)				\
E
Eric Blake 已提交
1301
		$(XDR_CFLAGS)					\
1302 1303
		-I$(srcdir)/conf				\
		-I$(srcdir)/rpc					\
1304 1305
		$(AM_CFLAGS)
libvirt_driver_remote_la_LDFLAGS = $(AM_LDFLAGS)
1306 1307 1308 1309
libvirt_driver_remote_la_LIBADD = $(GNUTLS_LIBS) \
                libvirt-net-rpc-client.la \
                libvirt-net-rpc-server.la \
                libvirt-net-rpc.la
1310
libvirt_driver_remote_la_SOURCES = $(REMOTE_DRIVER_SOURCES)
1311

E
Eric Blake 已提交
1312
BUILT_SOURCES += $(REMOTE_DRIVER_GENERATED)
C
Chris Lalancette 已提交
1313

1314 1315
endif WITH_REMOTE

1316
%protocol.c: %protocol.x %protocol.h $(srcdir)/rpc/genprotocol.pl
1317
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -c \
1318
	       $< $(srcdir)/$(subst $(srcdir)/,,$@)
1319

1320
%protocol.h: %protocol.x $(srcdir)/rpc/genprotocol.pl
1321
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -h \
1322
	       $< $(srcdir)/$(subst $(srcdir)/,,$@)
1323

1324
if WITH_XEN
E
Eric Blake 已提交
1325 1326 1327
noinst_LTLIBRARIES += libvirt_driver_xen_impl.la
libvirt_driver_xen_la_SOURCES =
libvirt_driver_xen_la_LIBADD = libvirt_driver_xen_impl.la
1328 1329
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_xen.la
E
Eric Blake 已提交
1330
libvirt_driver_xen_la_LIBADD += ../gnulib/lib/libgnu.la
1331
libvirt_driver_xen_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
1332
else ! WITH_DRIVER_MODULES
1333
noinst_LTLIBRARIES += libvirt_driver_xen.la
1334 1335
# Stateful, so linked to daemon instead
#libvirt_la_BUILT_LIBADD += libvirt_driver_xen.la
1336
endif ! WITH_DRIVER_MODULES
E
Eric Blake 已提交
1337

1338
libvirt_driver_xen_impl_la_CFLAGS =				\
1339
		$(XEN_CFLAGS)					\
1340 1341 1342
		-I$(srcdir)/access				\
		-I$(srcdir)/conf				\
		-I$(srcdir)/xenconfig				\
1343
		$(AM_CFLAGS)
E
Eric Blake 已提交
1344
libvirt_driver_xen_impl_la_LDFLAGS = $(AM_LDFLAGS)
P
Pavel Hrdina 已提交
1345
libvirt_driver_xen_impl_la_LIBADD = $(XEN_LIBS) libvirt_xenconfig.la
E
Eric Blake 已提交
1346
libvirt_driver_xen_impl_la_SOURCES = $(XEN_DRIVER_SOURCES)
1347
endif WITH_XEN
1348

1349 1350
if WITH_PHYP
noinst_LTLIBRARIES += libvirt_driver_phyp.la
1351
libvirt_la_BUILT_LIBADD += libvirt_driver_phyp.la
1352 1353
libvirt_driver_phyp_la_LIBADD = $(SSH2_LIBS)
libvirt_driver_phyp_la_CFLAGS = $(SSH2_CFLAGS) \
1354
		-I$(srcdir)/conf $(AM_CFLAGS)
1355
libvirt_driver_phyp_la_SOURCES = $(PHYP_DRIVER_SOURCES)
1356
endif WITH_PHYP
1357

1358
if WITH_OPENVZ
1359
noinst_LTLIBRARIES += libvirt_driver_openvz.la
1360
libvirt_la_BUILT_LIBADD += libvirt_driver_openvz.la
1361
libvirt_driver_openvz_la_CFLAGS = \
1362
		-I$(srcdir)/conf $(AM_CFLAGS)
1363
libvirt_driver_openvz_la_SOURCES = $(OPENVZ_DRIVER_SOURCES)
1364
endif WITH_OPENVZ
1365

1366 1367 1368 1369
if WITH_VMWARE
noinst_LTLIBRARIES += libvirt_driver_vmware.la
libvirt_la_BUILT_LIBADD += libvirt_driver_vmware.la
libvirt_driver_vmware_la_CFLAGS = \
1370
		-I$(srcdir)/conf -I$(srcdir)/vmx $(AM_CFLAGS)
1371
libvirt_driver_vmware_la_SOURCES = $(VMWARE_DRIVER_SOURCES)
1372
endif WITH_VMWARE
1373

1374
if WITH_VBOX
M
Michal Privoznik 已提交
1375
noinst_LTLIBRARIES += \
1376
		libvirt_driver_vbox_impl.la
1377 1378 1379
libvirt_driver_vbox_la_SOURCES =
libvirt_driver_vbox_la_LIBADD = libvirt_driver_vbox_impl.la
if WITH_DRIVER_MODULES
M
Michal Privoznik 已提交
1380
mod_LTLIBRARIES += \
1381
		libvirt_driver_vbox.la
1382
libvirt_driver_vbox_la_LIBADD += ../gnulib/lib/libgnu.la
1383
libvirt_driver_vbox_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
1384
else ! WITH_DRIVER_MODULES
1385
noinst_LTLIBRARIES += libvirt_driver_vbox.la
1386 1387 1388
# GPLv2-only license requries that it be linked into
# libvirtd and *not* libvirt.so
#libvirt_la_BUILT_LIBADD += libvirt_driver_vbox.la
1389
endif ! WITH_DRIVER_MODULES
1390 1391

libvirt_driver_vbox_impl_la_CFLAGS =				\
1392 1393
		-I$(srcdir)/conf				\
		$(AM_CFLAGS)					\
M
Michal Privoznik 已提交
1394
		-DVBOX_DRIVER
1395
libvirt_driver_vbox_impl_la_LDFLAGS = $(AM_LDFLAGS)
1396
libvirt_driver_vbox_impl_la_LIBADD =  $(DLOPEN_LIBS)		\
1397
		$(WIN32_EXTRA_LIBS)				\
1398
		$(LIBXML_LIBS)
1399
libvirt_driver_vbox_impl_la_SOURCES = $(VBOX_DRIVER_SOURCES)
1400
endif WITH_VBOX
1401

1402 1403
if WITH_XENAPI
noinst_LTLIBRARIES += libvirt_driver_xenapi.la
1404
libvirt_la_BUILT_LIBADD += libvirt_driver_xenapi.la
1405
libvirt_driver_xenapi_la_CFLAGS = $(XENAPI_CFLAGS) $(CURL_CFLAGS) \
P
Pavel Hrdina 已提交
1406
		-I$(srcdir)/conf -I$(srcdir)/xenconfig $(AM_CFLAGS)
1407
libvirt_driver_xenapi_la_LDFLAGS = $(AM_LDFLAGS)
1408
libvirt_driver_xenapi_la_LIBADD = $(XENAPI_LIBS) $(CURL_LIBS)
1409
libvirt_driver_xenapi_la_SOURCES = $(XENAPI_DRIVER_SOURCES)
1410
endif WITH_XENAPI
1411

J
Jim Fehlig 已提交
1412
if WITH_LIBXL
E
Eric Blake 已提交
1413 1414 1415
noinst_LTLIBRARIES += libvirt_driver_libxl_impl.la
libvirt_driver_libxl_la_SOURCES =
libvirt_driver_libxl_la_LIBADD = libvirt_driver_libxl_impl.la
J
Jim Fehlig 已提交
1416 1417
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_libxl.la
E
Eric Blake 已提交
1418
libvirt_driver_libxl_la_LIBADD += ../gnulib/lib/libgnu.la
1419
libvirt_driver_libxl_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
1420
else ! WITH_DRIVER_MODULES
J
Jim Fehlig 已提交
1421 1422 1423
noinst_LTLIBRARIES += libvirt_driver_libxl.la
# Stateful, so linked to daemon instead
#libvirt_la_BUILT_LIBADD += libvirt_driver_libxl.la
1424
endif ! WITH_DRIVER_MODULES
E
Eric Blake 已提交
1425

1426 1427
libvirt_driver_libxl_impl_la_CFLAGS = 		\
		$(LIBXL_CFLAGS)			\
1428 1429
		-I$(srcdir)/access	\
		-I$(srcdir)/conf	\
1430
		-I$(srcdir)/secret      \
1431
		-I$(srcdir)/xenconfig	\
1432
		$(AM_CFLAGS)
E
Eric Blake 已提交
1433
libvirt_driver_libxl_impl_la_LDFLAGS = $(AM_LDFLAGS)
1434 1435 1436
libvirt_driver_libxl_impl_la_LIBADD = $(LIBXL_LIBS) \
				      libvirt_xenconfig.la \
				      libvirt_secret.la
E
Eric Blake 已提交
1437
libvirt_driver_libxl_impl_la_SOURCES = $(LIBXL_DRIVER_SOURCES)
1438 1439 1440 1441 1442 1443

conf_DATA += libxl/libxl.conf
augeas_DATA += libxl/libvirtd_libxl.aug
augeastest_DATA += test_libvirtd_libxl.aug
CLEANFILES += test_libvirtd_libxl.aug

1444
endif WITH_LIBXL
1445 1446
EXTRA_DIST += libxl/libxl.conf libxl/libvirtd_libxl.aug \
		libxl/test_libvirtd_libxl.aug.in
J
Jim Fehlig 已提交
1447

1448
if WITH_QEMU
E
Eric Blake 已提交
1449 1450 1451
noinst_LTLIBRARIES += libvirt_driver_qemu_impl.la
libvirt_driver_qemu_la_SOURCES =
libvirt_driver_qemu_la_LIBADD = libvirt_driver_qemu_impl.la
1452 1453
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_qemu.la
E
Eric Blake 已提交
1454
libvirt_driver_qemu_la_LIBADD += ../gnulib/lib/libgnu.la
1455
libvirt_driver_qemu_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
1456
else ! WITH_DRIVER_MODULES
1457
noinst_LTLIBRARIES += libvirt_driver_qemu.la
1458
# Stateful, so linked to daemon instead
1459
#libvirt_la_BUILT_LIBADD += libvirt_driver_qemu.la
1460
endif ! WITH_DRIVER_MODULES
E
Eric Blake 已提交
1461

1462 1463 1464
libvirt_driver_qemu_impl_la_CFLAGS = \
		$(GNUTLS_CFLAGS) \
		$(LIBNL_CFLAGS) \
1465
		$(XDR_CFLAGS) \
1466 1467
		-I$(srcdir)/access \
		-I$(srcdir)/conf \
1468
		-I$(srcdir)/secret \
1469
		$(AM_CFLAGS)
E
Eric Blake 已提交
1470
libvirt_driver_qemu_impl_la_LDFLAGS = $(AM_LDFLAGS)
1471
libvirt_driver_qemu_impl_la_LIBADD = $(CAPNG_LIBS) \
1472
                                $(GNUTLS_LIBS) \
1473 1474
				$(LIBNL_LIBS) \
				$(LIBXML_LIBS) \
1475
				libvirt_secret.la \
1476
				$(NULL)
E
Eric Blake 已提交
1477
libvirt_driver_qemu_impl_la_SOURCES = $(QEMU_DRIVER_SOURCES)
1478

A
Amy Griffis 已提交
1479
conf_DATA += qemu/qemu.conf
1480

1481
augeas_DATA += qemu/libvirtd_qemu.aug
1482 1483
augeastest_DATA += test_libvirtd_qemu.aug
CLEANFILES += test_libvirtd_qemu.aug
1484

1485
endif WITH_QEMU
1486
EXTRA_DIST += qemu/qemu.conf qemu/libvirtd_qemu.aug \
1487
		qemu/test_libvirtd_qemu.aug.in qemu/THREADS.txt
1488

1489 1490

if WITH_LXC
E
Eric Blake 已提交
1491 1492 1493
noinst_LTLIBRARIES += libvirt_driver_lxc_impl.la
libvirt_driver_lxc_la_SOURCES =
libvirt_driver_lxc_la_LIBADD = libvirt_driver_lxc_impl.la
1494 1495
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_lxc.la
E
Eric Blake 已提交
1496 1497
libvirt_driver_lxc_la_LIBADD += ../gnulib/lib/libgnu.la
libvirt_driver_lxc_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
1498
else ! WITH_DRIVER_MODULES
1499
noinst_LTLIBRARIES += libvirt_driver_lxc.la
1500
# Stateful, so linked to daemon instead
1501
#libvirt_la_BUILT_LIBADD += libvirt_driver_lxc.la
1502
endif ! WITH_DRIVER_MODULES
E
Eric Blake 已提交
1503 1504

libvirt_driver_lxc_impl_la_CFLAGS = \
S
Serge Hallyn 已提交
1505
		$(LIBNL_CFLAGS) \
G
Gao feng 已提交
1506
		$(FUSE_CFLAGS) \
P
Pavel Fedin 已提交
1507
		$(XDR_CFLAGS) \
1508 1509
		-I$(srcdir)/access \
		-I$(srcdir)/conf \
1510
		$(AM_CFLAGS)
I
ik.nitk 已提交
1511 1512 1513 1514 1515 1516
libvirt_driver_lxc_impl_la_LIBADD = \
               $(CAPNG_LIBS) \
               $(LIBNL_LIBS) \
               $(LIBXML_LIBS) \
               $(FUSE_LIBS)

1517
if WITH_BLKID
E
Eric Blake 已提交
1518 1519
libvirt_driver_lxc_impl_la_CFLAGS += $(BLKID_CFLAGS)
libvirt_driver_lxc_impl_la_LIBADD += $(BLKID_LIBS)
1520
endif WITH_BLKID
1521
libvirt_driver_lxc_impl_la_LIBADD += $(SECDRIVER_LIBS)
E
Eric Blake 已提交
1522
libvirt_driver_lxc_impl_la_SOURCES = $(LXC_DRIVER_SOURCES)
A
Amy Griffis 已提交
1523 1524 1525

conf_DATA += lxc/lxc.conf

1526
augeas_DATA += lxc/libvirtd_lxc.aug
1527 1528
augeastest_DATA += test_libvirtd_lxc.aug
CLEANFILES += test_libvirtd_lxc.aug
1529

1530
endif WITH_LXC
1531
EXTRA_DIST += lxc/lxc.conf lxc/libvirtd_lxc.aug lxc/test_libvirtd_lxc.aug.in
1532

1533
if WITH_UML
E
Eric Blake 已提交
1534 1535 1536
noinst_LTLIBRARIES += libvirt_driver_uml_impl.la
libvirt_driver_uml_la_SOURCES =
libvirt_driver_uml_la_LIBADD = libvirt_driver_uml_impl.la
1537 1538
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_uml.la
E
Eric Blake 已提交
1539
libvirt_driver_uml_la_LIBADD += ../gnulib/lib/libgnu.la
1540
libvirt_driver_uml_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
1541
else ! WITH_DRIVER_MODULES
1542 1543
noinst_LTLIBRARIES += libvirt_driver_uml.la
# Stateful, so linked to daemon instead
1544
#libvirt_la_BUILT_LIBADD += libvirt_driver_uml.la
1545
endif ! WITH_DRIVER_MODULES
E
Eric Blake 已提交
1546

1547
libvirt_driver_uml_impl_la_CFLAGS = \
1548 1549
		-I$(srcdir)/access \
		-I$(srcdir)/conf \
1550
		$(AM_CFLAGS)
E
Eric Blake 已提交
1551
libvirt_driver_uml_impl_la_LDFLAGS = $(AM_LDFLAGS)
1552
# libvirt_driver_uml_impl_la_LIBADD =
E
Eric Blake 已提交
1553
libvirt_driver_uml_impl_la_SOURCES = $(UML_DRIVER_SOURCES)
1554
endif WITH_UML
1555

D
Daniel Veillard 已提交
1556

1557
BUILT_SOURCES += $(ESX_DRIVER_GENERATED)
D
Daniel Veillard 已提交
1558

1559 1560
ESX_GENERATED_STAMP = .esx_vi_generator.stamp

E
Eric Blake 已提交
1561 1562
EXTRA_DIST += $(ESX_GENERATED_STAMP)

1563 1564 1565
$(ESX_DRIVER_GENERATED): $(ESX_GENERATED_STAMP)

$(ESX_GENERATED_STAMP): $(srcdir)/esx/esx_vi_generator.input \
1566
                         $(srcdir)/esx/esx_vi_generator.py
1567 1568 1569 1570 1571
	$(AM_V_GEN)srcdir=$(srcdir) $(PYTHON) $(srcdir)/esx/esx_vi_generator.py \
	  && touch $@

MAINTAINERCLEANFILES += $(ESX_DRIVER_GENERATED) $(ESX_GENERATED_STAMP)

D
Daniel Veillard 已提交
1572

1573 1574
if WITH_ESX
noinst_LTLIBRARIES += libvirt_driver_esx.la
1575
libvirt_la_BUILT_LIBADD += libvirt_driver_esx.la
1576
libvirt_driver_esx_la_CFLAGS = $(CURL_CFLAGS) \
1577
		-I$(srcdir)/conf -I$(srcdir)/vmx $(AM_CFLAGS)
1578
libvirt_driver_esx_la_LDFLAGS = $(AM_LDFLAGS)
1579
libvirt_driver_esx_la_LIBADD = $(CURL_LIBS)
1580
libvirt_driver_esx_la_SOURCES = $(ESX_DRIVER_SOURCES)
1581
libvirt_driver_esx_la_DEPENDENCIES = $(ESX_DRIVER_GENERATED)
1582
endif WITH_ESX
1583

M
Matthias Bolte 已提交
1584

1585 1586
BUILT_SOURCES += $(HYPERV_DRIVER_GENERATED)

1587 1588
HYPERV_GENERATED_STAMP = .hyperv_wmi_generator.stamp

E
Eric Blake 已提交
1589 1590
EXTRA_DIST += $(HYPERV_GENERATED_STAMP)

1591 1592 1593
$(HYPERV_DRIVER_GENERATED): $(HYPERV_GENERATED_STAMP)

$(HYPERV_GENERATED_STAMP): $(srcdir)/hyperv/hyperv_wmi_generator.input \
1594
                            $(srcdir)/hyperv/hyperv_wmi_generator.py
1595 1596
	$(AM_V_GEN)srcdir=$(srcdir) $(PYTHON) \
	  $(srcdir)/hyperv/hyperv_wmi_generator.py \
1597 1598 1599
	  && touch $@

MAINTAINERCLEANFILES += $(HYPERV_DRIVER_GENERATED) $(HYPERV_GENERATED_STAMP)
1600

M
Matthias Bolte 已提交
1601 1602 1603 1604
if WITH_HYPERV
noinst_LTLIBRARIES += libvirt_driver_hyperv.la
libvirt_la_BUILT_LIBADD += libvirt_driver_hyperv.la
libvirt_driver_hyperv_la_CFLAGS = $(OPENWSMAN_CFLAGS) \
1605
		-I$(srcdir)/conf $(AM_CFLAGS)
M
Matthias Bolte 已提交
1606 1607 1608
libvirt_driver_hyperv_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_hyperv_la_LIBADD = $(OPENWSMAN_LIBS)
libvirt_driver_hyperv_la_SOURCES = $(HYPERV_DRIVER_SOURCES)
1609
endif WITH_HYPERV
M
Matthias Bolte 已提交
1610

1611
if WITH_VZ
1612 1613 1614 1615 1616 1617 1618 1619
noinst_LTLIBRARIES += libvirt_driver_vz_impl.la
libvirt_driver_vz_la_SOURCES =
libvirt_driver_vz_la_LIBADD = libvirt_driver_vz_impl.la
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_vz.la
libvirt_driver_vz_la_LIBADD += ../gnulib/lib/libgnu.la
libvirt_driver_vz_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
else ! WITH_DRIVER_MODULES
1620
noinst_LTLIBRARIES += libvirt_driver_vz.la
1621 1622
endif ! WITH_DRIVER_MODULES
libvirt_driver_vz_impl_la_CFLAGS = \
1623 1624 1625
		-I$(srcdir)/conf \
		-I$(srcdir)/access \
		$(AM_CFLAGS) \
1626
		$(PARALLELS_SDK_CFLAGS) $(LIBNL_CFLAGS)
1627 1628
libvirt_driver_vz_impl_la_SOURCES = $(VZ_DRIVER_SOURCES)
libvirt_driver_vz_impl_la_LIBADD =  $(PARALLELS_SDK_LIBS) $(LIBNL_LIBS)
1629
endif WITH_VZ
D
Dmitry Guryanov 已提交
1630

R
Roman Bogorodskiy 已提交
1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643
if WITH_BHYVE
noinst_LTLIBRARIES += libvirt_driver_bhyve_impl.la
libvirt_driver_bhyve_la_SOURCES =
libvirt_driver_bhyve_la_LIBADD = libvirt_driver_bhyve_impl.la
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_bhyve.la
libvirt_driver_bhyve_la_LIBADD += ../gnulib/lib/libgnu.la
libvirt_driver_bhyve_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
else ! WITH_DRIVER_MODULES
noinst_LTLIBRARIES += libvirt_driver_bhyve.la
endif ! WITH_DRIVER_MODULES

libvirt_driver_bhyve_impl_la_CFLAGS = \
1644 1645
	-I$(srcdir)/access \
	-I$(srcdir)/conf \
R
Roman Bogorodskiy 已提交
1646 1647 1648
	$(AM_CFLAGS)
libvirt_driver_bhyve_impl_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_bhyve_impl_la_SOURCES = $(BHYVE_DRIVER_SOURCES)
1649 1650 1651 1652

conf_DATA += bhyve/bhyve.conf
augeas_DATA += bhyve/libvirtd_bhyve.aug
augeastest_DATA += test_libvirtd_bhyve.aug
R
Roman Bogorodskiy 已提交
1653
endif WITH_BHYVE
1654 1655 1656
EXTRA_DIST += bhyve/bhyve.conf \
	bhyve/libvirtd_bhyve.aug \
	bhyve/test_libvirtd_bhyve.aug.in
R
Roman Bogorodskiy 已提交
1657

1658
if WITH_NETWORK
E
Eric Blake 已提交
1659 1660 1661
noinst_LTLIBRARIES += libvirt_driver_network_impl.la
libvirt_driver_network_la_SOURCES =
libvirt_driver_network_la_LIBADD = libvirt_driver_network_impl.la
1662 1663
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_network.la
1664 1665 1666 1667
libvirt_driver_network_la_LIBADD += ../gnulib/lib/libgnu.la \
	$(LIBNL_LIBS) \
	$(DBUS_LIBS) \
	$(NULL)
E
Eric Blake 已提交
1668
libvirt_driver_network_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
1669
else ! WITH_DRIVER_MODULES
1670
noinst_LTLIBRARIES += libvirt_driver_network.la
1671
# Stateful, so linked to daemon instead
1672
#libvirt_la_BUILT_LIBADD += libvirt_driver_network.la
1673
endif ! WITH_DRIVER_MODULES
E
Eric Blake 已提交
1674 1675

libvirt_driver_network_impl_la_CFLAGS = \
1676 1677
		$(LIBNL_CFLAGS) \
		$(DBUS_CFLAGS) \
1678 1679
		-I$(srcdir)/access \
		-I$(srcdir)/conf \
1680
		$(AM_CFLAGS)
E
Eric Blake 已提交
1681
libvirt_driver_network_impl_la_SOURCES = $(NETWORK_DRIVER_SOURCES)
1682
libvirt_driver_network_impl_la_LIBADD  = $(DBUS_LIBS)
1683
endif WITH_NETWORK
1684 1685 1686
EXTRA_DIST += network/default.xml


1687
if WITH_INTERFACE
1688 1689
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_interface.la
1690
else ! WITH_DRIVER_MODULES
1691
noinst_LTLIBRARIES += libvirt_driver_interface.la
1692 1693
# Stateful, so linked to daemon instead
#libvirt_la_BUILT_LIBADD += libvirt_driver_interface.la
1694
endif ! WITH_DRIVER_MODULES
1695
libvirt_driver_interface_la_CFLAGS = \
1696 1697
		-I$(srcdir)/access \
		-I$(srcdir)/conf \
1698
		$(AM_CFLAGS) $(LIBNL_CFLAGS)
1699
libvirt_driver_interface_la_LDFLAGS = $(AM_LDFLAGS)
1700 1701 1702 1703
libvirt_driver_interface_la_LIBADD =
if WITH_NETCF
libvirt_driver_interface_la_CFLAGS += $(NETCF_CFLAGS)
libvirt_driver_interface_la_LIBADD += $(NETCF_LIBS)
1704
endif WITH_NETCF
1705
if WITH_UDEV
1706 1707
libvirt_driver_interface_la_CFLAGS += $(UDEV_CFLAGS)
libvirt_driver_interface_la_LIBADD += $(UDEV_LIBS)
1708
endif WITH_UDEV
1709
if WITH_DRIVER_MODULES
1710
libvirt_driver_interface_la_LIBADD += ../gnulib/lib/libgnu.la
1711
libvirt_driver_interface_la_LDFLAGS += -module -avoid-version
1712
endif WITH_DRIVER_MODULES
1713
libvirt_driver_interface_la_SOURCES = $(INTERFACE_DRIVER_SOURCES)
1714
endif WITH_INTERFACE
D
Daniel Veillard 已提交
1715

D
Daniel P. Berrange 已提交
1716
if WITH_SECRETS
1717 1718
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_secret.la
1719
else ! WITH_DRIVER_MODULES
1720
noinst_LTLIBRARIES += libvirt_driver_secret.la
1721
# Stateful, so linked to daemon instead
1722
#libvirt_la_BUILT_LIBADD += libvirt_driver_secret.la
1723
endif ! WITH_DRIVER_MODULES
1724
libvirt_driver_secret_la_CFLAGS = \
1725 1726
		-I$(srcdir)/access \
		-I$(srcdir)/conf \
1727
		$(AM_CFLAGS)
1728
if WITH_DRIVER_MODULES
1729
libvirt_driver_secret_la_LIBADD = ../gnulib/lib/libgnu.la
1730
libvirt_driver_secret_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
1731
endif WITH_DRIVER_MODULES
1732
libvirt_driver_secret_la_SOURCES = $(SECRET_DRIVER_SOURCES)
1733
endif WITH_SECRETS
1734

1735
# Needed to keep automake quiet about conditionals
1736 1737
libvirt_driver_storage_impl_la_SOURCES =
libvirt_driver_storage_impl_la_CFLAGS = \
1738 1739
		-I$(srcdir)/access \
		-I$(srcdir)/conf \
1740
		-I$(srcdir)/secret \
1741
		$(AM_CFLAGS)
1742 1743
libvirt_driver_storage_impl_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_storage_impl_la_LIBADD =
1744
libvirt_driver_storage_impl_la_LIBADD += $(SECDRIVER_LIBS) $(LIBXML_LIBS)
1745
if WITH_BLKID
1746 1747
libvirt_driver_storage_impl_la_CFLAGS += $(BLKID_CFLAGS)
libvirt_driver_storage_impl_la_LIBADD += $(BLKID_LIBS)
1748
endif WITH_BLKID
1749 1750 1751 1752 1753 1754

if WITH_DRIVER_MODULES
storagebackenddir = $(libdir)/libvirt/storage-backend
storagebackend_LTLIBRARIES =
endif WITH_DRIVER_MODULES

1755
if WITH_STORAGE
1756 1757 1758
noinst_LTLIBRARIES += libvirt_driver_storage_impl.la
libvirt_driver_storage_la_SOURCES =
libvirt_driver_storage_la_LIBADD = libvirt_driver_storage_impl.la
1759 1760
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_storage.la
1761
libvirt_driver_storage_la_LIBADD += ../gnulib/lib/libgnu.la
1762
libvirt_driver_storage_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
1763
else ! WITH_DRIVER_MODULES
1764
noinst_LTLIBRARIES += libvirt_driver_storage.la
1765
# Stateful, so linked to daemon instead
1766
#libvirt_la_BUILT_LIBADD += libvirt_driver_storage.la
1767
endif ! WITH_DRIVER_MODULES
1768
libvirt_driver_storage_impl_la_SOURCES += $(STORAGE_DRIVER_SOURCES)
1769 1770 1771 1772 1773 1774 1775


libvirt_storage_backend_fs_la_SOURCES = $(STORAGE_DRIVER_FS_SOURCES)
libvirt_storage_backend_fs_la_CFLAGS =	\
	-I$(srcdir)/conf \
	$(AM_CFLAGS)

1776 1777 1778 1779 1780
if WITH_DRIVER_MODULES
storagebackend_LTLIBRARIES += libvirt_storage_backend_fs.la
libvirt_storage_backend_fs_la_LDFLAGS = \
	-module -avoid-version $(AM_LDFLAGS)
else ! WITH_DRIVER_MODULES
1781 1782
noinst_LTLIBRARIES += libvirt_storage_backend_fs.la
libvirt_driver_storage_impl_la_LIBADD += libvirt_storage_backend_fs.la
1783
endif ! WITH_DRIVER_MODULES
1784
endif WITH_STORAGE
1785

1786
if WITH_STORAGE_LVM
1787 1788 1789 1790 1791 1792
libvirt_storage_backend_logical_la_SOURCES = \
	$(STORAGE_DRIVER_LVM_SOURCES)
libvirt_storage_backend_logical_la_CFLAGS = \
	-I$(srcdir)/conf \
	$(AM_CFLAGS)

1793 1794 1795 1796 1797
if WITH_DRIVER_MODULES
storagebackend_LTLIBRARIES += libvirt_storage_backend_logical.la
libvirt_storage_backend_logical_la_LDFLAGS = \
	-module -avoid-version $(AM_LDFLAGS)
else ! WITH_DRIVER_MODULES
1798 1799 1800
noinst_LTLIBRARIES += libvirt_storage_backend_logical.la
libvirt_driver_storage_impl_la_LIBADD += \
	libvirt_storage_backend_logical.la
1801
endif ! WITH_DRIVER_MODULES
1802
endif WITH_STORAGE_LVM
1803

1804
if WITH_STORAGE_ISCSI
1805 1806 1807 1808 1809 1810 1811
libvirt_storage_backend_iscsi_la_SOURCES = \
	$(STORAGE_DRIVER_ISCSI_SOURCES)
libvirt_storage_backend_iscsi_la_CFLAGS = \
	-I$(srcdir)/conf \
	-I$(srcdir)/secret \
	$(AM_CFLAGS)

1812 1813 1814 1815 1816
if WITH_DRIVER_MODULES
storagebackend_LTLIBRARIES += libvirt_storage_backend_iscsi.la
libvirt_storage_backend_iscsi_la_LDFLAGS = \
	-module -avoid-version $(AM_LDFLAGS)
else ! WITH_DRIVER_MODULES
1817 1818 1819
noinst_LTLIBRARIES += libvirt_storage_backend_iscsi.la
libvirt_driver_storage_impl_la_LIBADD += \
	libvirt_storage_backend_iscsi.la
1820
endif ! WITH_DRIVER_MODULES
1821
endif WITH_STORAGE_ISCSI
1822

1823
if WITH_STORAGE_SCSI
1824 1825 1826 1827 1828
libvirt_storage_backend_scsi_la_SOURCES = $(STORAGE_DRIVER_SCSI_SOURCES)
libvirt_storage_backend_scsi_la_CFLAGS = \
	-I$(srcdir)/conf \
	$(AM_CFLAGS)

1829 1830 1831 1832 1833
if WITH_DRIVER_MODULES
storagebackend_LTLIBRARIES += libvirt_storage_backend_scsi.la
libvirt_storage_backend_scsi_la_LDFLAGS = \
	-module -avoid-version $(AM_LDFLAGS)
else ! WITH_DRIVER_MODULES
1834 1835
noinst_LTLIBRARIES += libvirt_storage_backend_scsi.la
libvirt_driver_storage_impl_la_LIBADD += libvirt_storage_backend_scsi.la
1836
endif ! WITH_DRIVER_MODULES
1837
endif WITH_STORAGE_SCSI
1838

D
Dave Allan 已提交
1839
if WITH_STORAGE_MPATH
1840 1841 1842 1843 1844 1845 1846 1847
libvirt_storage_backend_mpath_la_SOURCES = \
	$(STORAGE_DRIVER_MPATH_SOURCES)
libvirt_storage_backend_mpath_la_LIBADD = $(DEVMAPPER_LIBS)
libvirt_storage_backend_mpath_la_CFLAGS =	\
	-I$(srcdir)/conf \
	$(DEVMAPPER_CFLAGS) \
	$(AM_CFLAGS)

1848 1849 1850 1851 1852
if WITH_DRIVER_MODULES
storagebackend_LTLIBRARIES += libvirt_storage_backend_mpath.la
libvirt_storage_backend_mpath_la_LDFLAGS = \
	-module -avoid-version $(AM_LDFLAGS)
else ! WITH_DRIVER_MODULES
1853 1854 1855
noinst_LTLIBRARIES += libvirt_storage_backend_mpath.la
libvirt_driver_storage_impl_la_LIBADD += \
	libvirt_storage_backend_mpath.la
1856
endif ! WITH_DRIVER_MODULES
1857
endif WITH_STORAGE_MPATH
D
Dave Allan 已提交
1858

1859
if WITH_STORAGE_DISK
1860 1861 1862 1863 1864
libvirt_storage_backend_disk_la_SOURCES = $(STORAGE_DRIVER_DISK_SOURCES)
libvirt_storage_backend_disk_la_CFLAGS =	\
	-I$(srcdir)/conf \
	$(AM_CFLAGS)

1865 1866 1867 1868 1869
if WITH_DRIVER_MODULES
storagebackend_LTLIBRARIES += libvirt_storage_backend_disk.la
libvirt_storage_backend_disk_la_LDFLAGS = \
	-module -avoid-version $(AM_LDFLAGS)
else ! WITH_DRIVER_MODULES
1870 1871
noinst_LTLIBRARIES += libvirt_storage_backend_disk.la
libvirt_driver_storage_impl_la_LIBADD += libvirt_storage_backend_disk.la
1872
endif ! WITH_DRIVER_MODULES
1873
endif WITH_STORAGE_DISK
1874

1875
if WITH_STORAGE_RBD
1876 1877 1878 1879 1880 1881 1882
libvirt_storage_backend_rbd_la_SOURCES = $(STORAGE_DRIVER_RBD_SOURCES)
libvirt_storage_backend_rbd_la_LIBADD = $(LIBRBD_LIBS)
libvirt_storage_backend_rbd_la_CFLAGS = \
	-I$(srcdir)/conf \
	-I$(srcdir)/secret \
	$(AM_CFLAGS)

1883 1884 1885 1886 1887
if WITH_DRIVER_MODULES
storagebackend_LTLIBRARIES += libvirt_storage_backend_rbd.la
libvirt_storage_backend_rbd_la_LDFLAGS = \
	-module -avoid-version $(AM_LDFLAGS)
else ! WITH_DRIVER_MODULES
1888 1889
noinst_LTLIBRARIES += libvirt_storage_backend_rbd.la
libvirt_driver_storage_impl_la_LIBADD += libvirt_storage_backend_rbd.la
1890
endif ! WITH_DRIVER_MODULES
1891
endif WITH_STORAGE_RBD
1892

1893
if WITH_STORAGE_SHEEPDOG
1894 1895 1896 1897 1898 1899
libvirt_storage_backend_sheepdog_la_SOURCES = \
	$(STORAGE_DRIVER_SHEEPDOG_SOURCES)
libvirt_storage_backend_sheepdog_la_CFLAGS = \
	-I$(srcdir)/conf \
	$(AM_CFLAGS)

1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912
libvirt_storage_backend_sheepdog_priv_la_SOURCES = \
	$(STORAGE_DRIVER_SHEEPDOG_SOURCES) \
	$(STORAGE_DRIVER_BACKEND_SOURCES)
libvirt_storage_backend_sheepdog_priv_la_CFLAGS = \
	-I$(srcdir)/conf \
	$(AM_CFLAGS)
noinst_LTLIBRARIES += libvirt_storage_backend_sheepdog_priv.la

if WITH_DRIVER_MODULES
storagebackend_LTLIBRARIES += libvirt_storage_backend_sheepdog.la
libvirt_storage_backend_sheepdog_la_LDFLAGS = \
	-module -avoid-version $(AM_LDFLAGS)
else ! WITH_DRIVER_MODULES
1913 1914 1915
noinst_LTLIBRARIES += libvirt_storage_backend_sheepdog.la
libvirt_driver_storage_impl_la_LIBADD += \
	libvirt_storage_backend_sheepdog.la
1916
endif ! WITH_DRIVER_MODULES
1917
endif WITH_STORAGE_SHEEPDOG
1918

1919
if WITH_STORAGE_GLUSTER
1920 1921 1922 1923 1924 1925 1926 1927
libvirt_storage_backend_gluster_la_SOURCES = \
	$(STORAGE_DRIVER_GLUSTER_SOURCES)
libvirt_storage_backend_gluster_la_LIBADD = $(GLUSTERFS_LIBS)
libvirt_storage_backend_gluster_la_CFLAGS = \
	-I$(srcdir)/conf \
	$(GLUSTERFS_CFLAGS) \
	$(AM_CFLAGS)

1928 1929 1930 1931 1932
if WITH_DRIVER_MODULES
storagebackend_LTLIBRARIES += libvirt_storage_backend_gluster.la
libvirt_storage_backend_gluster_la_LDFLAGS = \
	-module -avoid-version $(AM_LDFLAGS)
else ! WITH_DRIVER_MODULES
1933 1934 1935
noinst_LTLIBRARIES += libvirt_storage_backend_gluster.la
libvirt_driver_storage_impl_la_LIBADD += \
	libvirt_storage_backend_gluster.la
1936
endif ! WITH_DRIVER_MODULES
1937 1938
endif WITH_STORAGE_GLUSTER

R
Roman Bogorodskiy 已提交
1939
if WITH_STORAGE_ZFS
1940 1941 1942 1943 1944
libvirt_storage_backend_zfs_la_SOURCES = $(STORAGE_DRIVER_ZFS_SOURCES)
libvirt_storage_backend_zfs_la_CFLAGS =	\
	-I$(srcdir)/conf \
	$(AM_CFLAGS)

1945 1946 1947 1948 1949
if WITH_DRIVER_MODULES
storagebackend_LTLIBRARIES += libvirt_storage_backend_zfs.la
libvirt_storage_backend_zfs_la_LDFLAGS = \
	-module -avoid-version $(AM_LDFLAGS)
else ! WITH_DRIVER_MODULES
1950 1951
noinst_LTLIBRARIES += libvirt_storage_backend_zfs.la
libvirt_driver_storage_impl_la_LIBADD += libvirt_storage_backend_zfs.la
1952
endif ! WITH_DRIVER_MODULES
R
Roman Bogorodskiy 已提交
1953 1954
endif WITH_STORAGE_ZFS

1955
if WITH_STORAGE_VSTORAGE
1956 1957 1958 1959 1960 1961
libvirt_storage_backend_vstorage_la_SOURCES = \
	$(STORAGE_DRIVER_VSTORAGE_SOURCES)
libvirt_storage_backend_vstorage_la_CFLAGS =	\
	-I$(srcdir)/conf \
	$(AM_CFLAGS)

1962 1963 1964 1965 1966
if WITH_DRIVER_MODULES
storagebackend_LTLIBRARIES += libvirt_storage_backend_vstorage.la
libvirt_storage_backend_vstorage_la_LDFLAGS = \
	-module -avoid-version $(AM_LDFLAGS)
else ! WITH_DRIVER_MODULES
1967 1968 1969
noinst_LTLIBRARIES += libvirt_storage_backend_vstorage.la
libvirt_driver_storage_impl_la_LIBADD += \
	libvirt_storage_backend_vstorage.la
1970
endif ! WITH_DRIVER_MODULES
1971 1972
endif WITH_STORAGE_VSTORAGE

1973 1974 1975 1976
if WITH_NODE_DEVICES
# Needed to keep automake quiet about conditionals
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_nodedev.la
1977
else ! WITH_DRIVER_MODULES
1978 1979
noinst_LTLIBRARIES += libvirt_driver_nodedev.la
# Stateful, so linked to daemon instead
1980
#libvirt_la_BUILT_LIBADD += libvirt_driver_nodedev.la
1981
endif ! WITH_DRIVER_MODULES
1982 1983
libvirt_driver_nodedev_la_SOURCES = $(NODE_DEVICE_DRIVER_SOURCES)

1984
libvirt_driver_nodedev_la_CFLAGS = \
1985 1986
		-I$(srcdir)/access \
		-I$(srcdir)/conf \
1987
		$(AM_CFLAGS) $(LIBNL_CFLAGS)
1988
libvirt_driver_nodedev_la_LDFLAGS = $(AM_LDFLAGS)
1989
libvirt_driver_nodedev_la_LIBADD =
1990

D
Doug Goldstein 已提交
1991
if WITH_LIBVIRTD
1992
if WITH_HAL
1993 1994
libvirt_driver_nodedev_la_SOURCES += $(NODE_DEVICE_DRIVER_HAL_SOURCES)
libvirt_driver_nodedev_la_CFLAGS += $(HAL_CFLAGS)
1995
libvirt_driver_nodedev_la_LIBADD += $(HAL_LIBS)
1996
endif WITH_HAL
1997
if WITH_UDEV
1998
libvirt_driver_nodedev_la_SOURCES += $(NODE_DEVICE_DRIVER_UDEV_SOURCES)
1999
libvirt_driver_nodedev_la_CFLAGS += $(UDEV_CFLAGS) $(PCIACCESS_CFLAGS)
2000
libvirt_driver_nodedev_la_LIBADD += $(UDEV_LIBS) $(PCIACCESS_LIBS)
2001 2002
endif WITH_UDEV
endif WITH_LIBVIRTD
2003 2004

if WITH_DRIVER_MODULES
2005
libvirt_driver_nodedev_la_LIBADD += ../gnulib/lib/libgnu.la
2006
libvirt_driver_nodedev_la_LDFLAGS += -module -avoid-version
2007 2008
endif WITH_DRIVER_MODULES
endif WITH_NODE_DEVICES
2009 2010


2011
if WITH_NWFILTER
2012 2013 2014
noinst_LTLIBRARIES += libvirt_driver_nwfilter_impl.la
libvirt_driver_nwfilter_la_SOURCES =
libvirt_driver_nwfilter_la_LIBADD = libvirt_driver_nwfilter_impl.la
2015 2016
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_nwfilter.la
2017
libvirt_driver_nwfilter_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
2018
else ! WITH_DRIVER_MODULES
2019
noinst_LTLIBRARIES += libvirt_driver_nwfilter.la
2020 2021
# Stateful, so linked to daemon instead
#libvirt_la_BUILT_LIBADD += libvirt_driver_nwfilter.la
2022
endif ! WITH_DRIVER_MODULES
2023
libvirt_driver_nwfilter_impl_la_CFLAGS = \
2024 2025 2026
		$(LIBPCAP_CFLAGS) \
		$(LIBNL_CFLAGS) \
		$(DBUS_CFLAGS) \
2027 2028
		-I$(srcdir)/access \
		-I$(srcdir)/conf \
2029
		$(AM_CFLAGS)
2030 2031 2032 2033 2034
libvirt_driver_nwfilter_impl_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_nwfilter_impl_la_LIBADD = \
		$(LIBPCAP_LIBS) \
		$(LIBNL_LIBS) \
		$(DBUS_LIBS)
2035
if WITH_DRIVER_MODULES
2036 2037
libvirt_driver_nwfilter_impl_la_LIBADD += ../gnulib/lib/libgnu.la
libvirt_driver_nwfilter_impl_la_LDFLAGS += -module -avoid-version
2038
endif WITH_DRIVER_MODULES
2039
libvirt_driver_nwfilter_impl_la_SOURCES = $(NWFILTER_DRIVER_SOURCES)
2040
endif WITH_NWFILTER
2041 2042


2043 2044 2045 2046
libvirt_security_manager_la_SOURCES = $(SECURITY_DRIVER_SOURCES)
noinst_LTLIBRARIES += libvirt_security_manager.la
libvirt_la_BUILT_LIBADD += libvirt_security_manager.la
libvirt_security_manager_la_CFLAGS = \
2047
		-I$(srcdir)/conf $(AM_CFLAGS)
2048
libvirt_security_manager_la_LDFLAGS = $(AM_LDFLAGS)
2049
libvirt_security_manager_la_LIBADD = $(SECDRIVER_LIBS)
2050
if WITH_SECDRIVER_SELINUX
2051 2052
libvirt_security_manager_la_SOURCES += $(SECURITY_DRIVER_SELINUX_SOURCES)
libvirt_security_manager_la_CFLAGS += $(SELINUX_CFLAGS)
2053
endif WITH_SECDRIVER_SELINUX
J
Jamie Strandboge 已提交
2054
if WITH_SECDRIVER_APPARMOR
2055 2056
libvirt_security_manager_la_SOURCES += $(SECURITY_DRIVER_APPARMOR_SOURCES)
libvirt_security_manager_la_CFLAGS += $(APPARMOR_CFLAGS)
2057
endif WITH_SECDRIVER_APPARMOR
2058

2059 2060
libvirt_driver_access_la_SOURCES = \
	$(ACCESS_DRIVER_SOURCES) $(ACCESS_DRIVER_GENERATED)
2061 2062 2063
noinst_LTLIBRARIES += libvirt_driver_access.la
libvirt_la_BUILT_LIBADD += libvirt_driver_access.la
libvirt_driver_access_la_CFLAGS = \
2064
		-I$(srcdir)/conf $(AM_CFLAGS)
2065 2066 2067
libvirt_driver_access_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_access_la_LIBADD =

2068 2069
EXTRA_DIST += access/genpolkit.pl

2070 2071 2072 2073
$(ACCESS_DRIVER_POLKIT_POLICY): $(srcdir)/access/viraccessperm.h \
    $(srcdir)/access/genpolkit.pl Makefile.am
	$(AM_V_GEN)$(PERL) $(srcdir)/access/genpolkit.pl < $< > $@ || rm -f $@

2074 2075 2076 2077
if WITH_POLKIT1
libvirt_driver_access_la_SOURCES += $(ACCESS_DRIVER_POLKIT_SOURCES)

polkitactiondir = $(datadir)/polkit-1/actions
2078
if WITH_LIBVIRTD
2079
polkitaction_DATA = $(ACCESS_DRIVER_POLKIT_POLICY)
2080
endif WITH_LIBVIRTD
2081 2082 2083

CLEANFILES += $(ACCESS_DRIVER_POLKIT_POLICY)
BUILT_SOURCES += $(ACCESS_DRIVER_POLKIT_POLICY)
2084
else ! WITH_POLKIT1
2085
EXTRA_DIST += $(ACCESS_DRIVER_POLKIT_SOURCES)
2086
endif ! WITH_POLKIT1
2087

2088

2089 2090
BUILT_SOURCES += $(ACCESS_DRIVER_GENERATED) $(ACCESS_DRIVER_API_FILES)
CLEANFILES += $(ACCESS_DRIVER_GENERATED) $(ACCESS_DRIVER_API_FILES)
2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104

libvirt_access.syms: $(srcdir)/rpc/gendispatch.pl \
			$(REMOTE_PROTOCOL) Makefile.am
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclsym \
	  remote REMOTE $(REMOTE_PROTOCOL) > $@
libvirt_access_qemu.syms: $(srcdir)/rpc/gendispatch.pl \
			$(QEMU_PROTOCOL) Makefile.am
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclsym \
	  qemu QEMU $(QEMU_PROTOCOL) > $@
libvirt_access_lxc.syms: $(srcdir)/rpc/gendispatch.pl \
			$(LXC_PROTOCOL) Makefile.am
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclsym \
	  lxc LXC $(LXC_PROTOCOL) > $@

2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117
libvirt_access.xml: $(srcdir)/rpc/gendispatch.pl \
			$(REMOTE_PROTOCOL) Makefile.am
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclapi \
	  remote REMOTE $(REMOTE_PROTOCOL) > $@
libvirt_access_qemu.xml: $(srcdir)/rpc/gendispatch.pl \
			$(QEMU_PROTOCOL) Makefile.am
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclapi \
	  qemu QEMU $(QEMU_PROTOCOL) > $@
libvirt_access_lxc.xml: $(srcdir)/rpc/gendispatch.pl \
			$(LXC_PROTOCOL) Makefile.am
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclapi \
	  lxc LXC $(LXC_PROTOCOL) > $@

E
Eric Blake 已提交
2118
access/viraccessapicheck.h: $(srcdir)/rpc/gendispatch.pl \
2119 2120
			$(REMOTE_PROTOCOL) Makefile.am
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclheader \
E
Eric Blake 已提交
2121 2122 2123
	  remote REMOTE $(REMOTE_PROTOCOL) \
	  > $(srcdir)/access/viraccessapicheck.h
access/viraccessapicheck.c: $(srcdir)/rpc/gendispatch.pl \
2124 2125
			$(REMOTE_PROTOCOL) Makefile.am
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclbody \
E
Eric Blake 已提交
2126 2127
	  remote REMOTE $(REMOTE_PROTOCOL) access/viraccessapicheck.h \
	  > $(srcdir)/access/viraccessapicheck.c
2128

E
Eric Blake 已提交
2129
access/viraccessapicheckqemu.h: $(srcdir)/rpc/gendispatch.pl \
2130 2131
			$(QEMU_PROTOCOL) Makefile.am
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclheader \
E
Eric Blake 已提交
2132 2133 2134
	  qemu QEMU $(QEMU_PROTOCOL) \
	  > $(srcdir)/access/viraccessapicheckqemu.h
access/viraccessapicheckqemu.c: $(srcdir)/rpc/gendispatch.pl \
2135 2136
			$(QEMU_PROTOCOL) Makefile.am
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclbody \
E
Eric Blake 已提交
2137 2138
	  qemu QEMU $(QEMU_PROTOCOL) access/viraccessapicheckqemu.h \
	  > $(srcdir)/access/viraccessapicheckqemu.c
2139

E
Eric Blake 已提交
2140
access/viraccessapichecklxc.h: $(srcdir)/rpc/gendispatch.pl \
2141 2142
			$(LXC_PROTOCOL) Makefile.am
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclheader \
E
Eric Blake 已提交
2143 2144 2145
	  lxc LXC $(LXC_PROTOCOL) \
	  > $(srcdir)/access/viraccessapichecklxc.h
access/viraccessapichecklxc.c: $(srcdir)/rpc/gendispatch.pl \
2146 2147
			$(LXC_PROTOCOL) Makefile.am
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclbody \
E
Eric Blake 已提交
2148 2149
	  lxc LXC $(LXC_PROTOCOL) access/viraccessapichecklxc.h \
	  > $(srcdir)/access/viraccessapichecklxc.c
2150

2151 2152 2153
# Add all conditional sources just in case...
EXTRA_DIST +=							\
		$(TEST_DRIVER_SOURCES)				\
D
Daniel P. Berrange 已提交
2154
		$(TEST_DRIVER_ASSETS)				\
2155 2156 2157 2158
		$(REMOTE_DRIVER_SOURCES)			\
		$(XEN_DRIVER_SOURCES)				\
		$(QEMU_DRIVER_SOURCES)				\
		$(LXC_DRIVER_SOURCES)				\
2159
		$(UML_DRIVER_SOURCES)				\
2160
		$(OPENVZ_DRIVER_SOURCES)			\
2161
		$(PHYP_DRIVER_SOURCES)				\
2162
		$(VBOX_DRIVER_SOURCES)				\
2163
		$(XENAPI_DRIVER_SOURCES)			\
O
Osier Yang 已提交
2164
		$(LIBXL_DRIVER_SOURCES)				\
2165
		$(ESX_DRIVER_SOURCES)				\
2166
		$(ESX_DRIVER_EXTRA_DIST)			\
M
Matthias Bolte 已提交
2167
		$(HYPERV_DRIVER_SOURCES)			\
2168
		$(HYPERV_DRIVER_EXTRA_DIST)			\
2169
		$(VZ_DRIVER_SOURCES)				\
R
Roman Bogorodskiy 已提交
2170
		$(BHYVE_DRIVER_SOURCES)				\
2171
		$(NETWORK_DRIVER_SOURCES)			\
2172
		$(INTERFACE_DRIVER_SOURCES)			\
2173 2174 2175 2176
		$(STORAGE_DRIVER_SOURCES)			\
		$(STORAGE_DRIVER_FS_SOURCES)			\
		$(STORAGE_DRIVER_LVM_SOURCES)			\
		$(STORAGE_DRIVER_ISCSI_SOURCES)			\
2177
		$(STORAGE_DRIVER_SCSI_SOURCES)			\
D
Dave Allan 已提交
2178
		$(STORAGE_DRIVER_MPATH_SOURCES)			\
2179
		$(STORAGE_DRIVER_DISK_SOURCES)			\
2180
		$(STORAGE_DRIVER_RBD_SOURCES)			\
2181
		$(STORAGE_DRIVER_SHEEPDOG_SOURCES)		\
2182
		$(STORAGE_DRIVER_GLUSTER_SOURCES)		\
R
Roman Bogorodskiy 已提交
2183
		$(STORAGE_DRIVER_ZFS_SOURCES)			\
2184
		$(STORAGE_DRIVER_VSTORAGE_SOURCES)		\
2185 2186
		$(NODE_DEVICE_DRIVER_SOURCES)			\
		$(NODE_DEVICE_DRIVER_HAL_SOURCES)		\
2187
		$(NODE_DEVICE_DRIVER_UDEV_SOURCES)		\
2188
		$(NWFILTER_DRIVER_SOURCES)			\
2189
		$(SECURITY_DRIVER_SELINUX_SOURCES)		\
J
Jamie Strandboge 已提交
2190
		$(SECURITY_DRIVER_APPARMOR_SOURCES)		\
D
Daniel P. Berrange 已提交
2191
		$(SECRET_DRIVER_SOURCES)			\
2192
		$(SECRET_UTIL_SOURCES)				\
2193
		$(VBOX_DRIVER_EXTRA_DIST)			\
2194
		$(VMWARE_DRIVER_SOURCES)			\
J
Jim Fehlig 已提交
2195
		$(XENCONFIG_SOURCES)				\
2196
		$(ACCESS_DRIVER_POLKIT_POLICY)
2197

2198 2199
check-local: check-augeas

2200 2201 2202 2203 2204
.PHONY: check-augeas \
	check-augeas-qemu \
	check-augeas-lxc \
	check-augeas-sanlock \
	check-augeas-lockd \
2205
	check-augeas-libxl \
2206
	check-augeas-bhyve \
2207
	$(NULL)
2208

2209
check-augeas: check-augeas-qemu check-augeas-lxc check-augeas-sanlock \
2210
	check-augeas-lockd check-augeas-virtlockd check-augeas-libxl \
2211
	check-augeas-bhyve check-augeas-virtlogd
2212

2213
AUG_GENTEST = $(PERL) $(top_srcdir)/build-aux/augeas-gentest.pl
2214
EXTRA_DIST += $(top_srcdir)/build-aux/augeas-gentest.pl
2215

2216
if WITH_QEMU
2217 2218
test_libvirtd_qemu.aug: qemu/test_libvirtd_qemu.aug.in \
		$(srcdir)/qemu/qemu.conf $(AUG_GENTEST)
E
Eric Blake 已提交
2219
	$(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/qemu/qemu.conf $< $@
2220

2221
check-augeas-qemu: test_libvirtd_qemu.aug
2222
	$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
2223
	    '$(AUGPARSE)' -I $(srcdir)/qemu test_libvirtd_qemu.aug; \
2224
	fi
2225
else ! WITH_QEMU
2226
check-augeas-qemu:
2227
endif ! WITH_QEMU
2228

2229
if WITH_LXC
2230 2231
test_libvirtd_lxc.aug: lxc/test_libvirtd_lxc.aug.in \
		$(srcdir)/lxc/lxc.conf $(AUG_GENTEST)
E
Eric Blake 已提交
2232
	$(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/lxc/lxc.conf $< $@
2233

2234
check-augeas-lxc: test_libvirtd_lxc.aug
2235
	$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
2236
	    '$(AUGPARSE)' -I $(srcdir)/lxc test_libvirtd_lxc.aug; \
2237
	fi
2238
else ! WITH_LXC
2239
check-augeas-lxc:
2240
endif ! WITH_LXC
2241

2242
if WITH_SANLOCK
2243 2244
test_libvirt_sanlock.aug: locking/test_libvirt_sanlock.aug.in \
		locking/qemu-sanlock.conf $(AUG_GENTEST)
E
Eric Blake 已提交
2245
	$(AM_V_GEN)$(AUG_GENTEST) locking/qemu-sanlock.conf $< $@
2246

2247
check-augeas-sanlock: test_libvirt_sanlock.aug
2248
	$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
2249
	    '$(AUGPARSE)' -I $(srcdir)/locking test_libvirt_sanlock.aug; \
2250
	fi
2251
else ! WITH_SANLOCK
2252
check-augeas-sanlock:
2253
endif ! WITH_SANLOCK
2254

2255
if WITH_QEMU
2256 2257 2258
test_libvirt_lockd.aug: locking/test_libvirt_lockd.aug.in \
		locking/qemu-lockd.conf $(AUG_GENTEST)
	$(AM_V_GEN)$(AUG_GENTEST) locking/qemu-lockd.conf $< $@
2259 2260 2261
else ! WITH_QEMU
test_libvirt_lockd.aug:
endif ! WITH_QEMU
2262

2263 2264
test_virtlockd.aug: locking/test_virtlockd.aug.in \
		locking/virtlockd.conf $(AUG_GENTEST)
2265
	$(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/locking/virtlockd.conf $< $@
2266

2267
if WITH_QEMU
2268 2269 2270 2271
check-augeas-lockd: test_libvirt_lockd.aug
	$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
	    '$(AUGPARSE)' -I $(srcdir)/locking test_libvirt_lockd.aug; \
	fi
2272 2273 2274
else ! WITH_QEMU
check-augeas-lockd:
endif ! WITH_QEMU
2275

2276 2277 2278 2279 2280
check-augeas-virtlockd: test_virtlockd.aug
	$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
	    '$(AUGPARSE)' -I $(srcdir)/locking test_virtlockd.aug; \
	fi

2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293
if WITH_LIBXL
test_libvirtd_libxl.aug: libxl/test_libvirtd_libxl.aug.in \
		$(srcdir)/libxl/libxl.conf $(AUG_GENTEST)
	$(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/libxl/libxl.conf $< $@

check-augeas-libxl: test_libvirtd_libxl.aug
	$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
	    '$(AUGPARSE)' -I $(srcdir)/libxl test_libvirtd_libxl.aug; \
	fi
else ! WITH_LIBXL
check-augeas-libxl:
endif ! WITH_LIBXL

2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306
if WITH_BHYVE
test_libvirtd_bhyve.aug: bhyve/test_libvirtd_bhyve.aug.in \
		$(srcdir)/bhyve/bhyve.conf $(AUG_GENTEST)
	$(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/bhyve/bhyve.conf $< $@

check-augeas-bhyve: test_libvirtd_bhyve.aug
	$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
	    '$(AUGPARSE)' -I $(srcdir)/bhyve test_libvirtd_bhyve.aug; \
	fi
else ! WITH_BHYVE
check-augeas-bhyve:
endif ! WITH_BHYVE

2307 2308 2309 2310 2311 2312 2313 2314 2315
test_virtlogd.aug: logging/test_virtlogd.aug.in \
		logging/virtlogd.conf $(AUG_GENTEST)
	$(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/logging/virtlogd.conf $< $@

check-augeas-virtlogd: test_virtlogd.aug
	$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
	    '$(AUGPARSE)' -I $(srcdir)/logging test_virtlogd.aug; \
	fi

2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334
#
# Build our version script.  This is composed of three parts:
#
# 1. libvirt_public.syms - public API.  These functions are always
# present in the library and should never change incompatibly.
#
# 2. libvirt_private.syms - private API.  These symbols are private and
# semantics may change on every release, hence the version number is
# spliced in at build time. This ensures that if libvirtd, virsh, or a
# driver module was built against one libvirt release, it will refuse to
# load with another where symbols may have same names but different
# semantics. Such symbols should never be visible in an (installed)
# public header file.
#
# 3. libvirt_*.syms - dynamic private API.  Like libvirt_private.syms,
# except that build options (such as --enable-debug) can mean these
# symbols aren't present at all.
#

2335
if WITH_DRIVER_MODULES
2336
USED_SYM_FILES += $(srcdir)/libvirt_driver_modules.syms
2337
else ! WITH_DRIVER_MODULES
2338
SYM_FILES += $(srcdir)/libvirt_driver_modules.syms
2339
endif ! WITH_DRIVER_MODULES
2340

2341
if WITH_LINUX
2342
USED_SYM_FILES += $(srcdir)/libvirt_linux.syms
2343
else ! WITH_LINUX
2344
SYM_FILES += $(srcdir)/libvirt_linux.syms
2345
endif ! WITH_LINUX
2346

2347
if WITH_ESX
2348
USED_SYM_FILES += $(srcdir)/libvirt_esx.syms
2349
else ! WITH_ESX
2350
SYM_FILES += $(srcdir)/libvirt_esx.syms
2351
endif ! WITH_ESX
2352

E
Eric Blake 已提交
2353 2354 2355 2356 2357 2358
if WITH_REMOTE
USED_SYM_FILES += $(srcdir)/libvirt_remote.syms
else ! WITH_REMOTE
SYM_FILES += $(srcdir)/libvirt_remote.syms
endif ! WITH_REMOTE

2359
if WITH_OPENVZ
2360
USED_SYM_FILES += $(srcdir)/libvirt_openvz.syms
2361
else ! WITH_OPENVZ
2362
SYM_FILES += $(srcdir)/libvirt_openvz.syms
2363
endif ! WITH_OPENVZ
2364

2365
if WITH_VMX
2366
USED_SYM_FILES += $(srcdir)/libvirt_vmx.syms
2367
else ! WITH_VMX
2368
SYM_FILES += $(srcdir)/libvirt_vmx.syms
2369
endif ! WITH_VMX
2370

2371 2372 2373 2374 2375 2376
if WITH_VMWARE
USED_SYM_FILES += $(srcdir)/libvirt_vmware.syms
else ! WITH_VMWARE
SYM_FILES += $(srcdir)/libvirt_vmware.syms
endif ! WITH_VMWARE

J
Jim Fehlig 已提交
2377 2378 2379 2380 2381
if WITH_XENCONFIG
USED_SYM_FILES += $(srcdir)/libvirt_xenconfig.syms
else ! WITH_XENCONFIG
SYM_FILES += $(srcdir)/libvirt_xenconfig.syms
endif ! WITH_XENCONFIG
2382

2383 2384 2385 2386 2387 2388
if WITH_LIBXL
USED_SYM_FILES += $(srcdir)/libvirt_xenxlconfig.syms
else ! WITH_LIBXL
SYM_FILES += $(srcdir)/libvirt_xenxlconfig.syms
endif ! WITH_LIBXL

2389
if WITH_SASL
2390
USED_SYM_FILES += $(srcdir)/libvirt_sasl.syms
2391
else ! WITH_SASL
2392
SYM_FILES += $(srcdir)/libvirt_sasl.syms
2393
endif ! WITH_SASL
E
Eric Blake 已提交
2394

2395 2396
if WITH_GNUTLS
USED_SYM_FILES += $(srcdir)/libvirt_gnutls.syms
2397
else ! WITH_GNUTLS
2398
SYM_FILES += $(srcdir)/libvirt_gnutls.syms
2399
endif ! WITH_GNUTLS
2400

2401
if WITH_SSH2
2402
USED_SYM_FILES += $(srcdir)/libvirt_libssh2.syms
2403
else ! WITH_SSH2
2404
SYM_FILES += $(srcdir)/libvirt_libssh2.syms
2405
endif ! WITH_SSH2
2406

2407
if WITH_ATOMIC_OPS_PTHREAD
2408
USED_SYM_FILES += $(srcdir)/libvirt_atomic.syms
2409
else ! WITH_ATOMIC_OPS_PTHREAD
2410
SYM_FILES += $(srcdir)/libvirt_atomic.syms
2411
endif ! WITH_ATOMIC_OPS_PTHREAD
2412

2413 2414 2415 2416 2417 2418
if WITH_LIBSSH
USED_SYM_FILES += $(srcdir)/libvirt_libssh.syms
else ! WITH_LIBSSH
SYM_FILES += $(srcdir)/libvirt_libssh.syms
endif ! WITH_LIBSSH

2419
EXTRA_DIST += \
2420 2421 2422
	libvirt_public.syms		\
	libvirt_lxc.syms		\
	libvirt_qemu.syms		\
2423
	libvirt_admin_public.syms	\
2424
	$(SYM_FILES)			\
2425
	$(ADMIN_SYM_FILES)		\
2426
	$(NULL)
2427

2428
BUILT_SOURCES += $(GENERATED_SYM_FILES)
2429

2430 2431
libvirt.syms: libvirt_public.syms $(USED_SYM_FILES) \
		$(ACCESS_DRIVER_SYM_FILES) \
2432
		$(top_builddir)/config.status
2433 2434 2435 2436 2437 2438
	$(AM_V_GEN)rm -f $@-tmp $@ ; \
	printf '# WARNING: generated from the following:\n# $^\n\n' >$@-tmp && \
	cat $(srcdir)/libvirt_public.syms >>$@-tmp && \
	printf '\n\n# Private symbols\n\n' >>$@-tmp && \
	printf 'LIBVIRT_PRIVATE_$(VERSION) {\n\n'  >>$@-tmp && \
	printf 'global:\n\n' >>$@-tmp && \
2439
	cat $(USED_SYM_FILES) $(ACCESS_DRIVER_SYM_FILES) >>$@-tmp && \
2440 2441
	printf '\n\nlocal:\n*;\n\n};' >>$@-tmp && \
	chmod a-w $@-tmp && \
2442
	mv $@-tmp libvirt.syms
2443

2444
%.def: %.syms
2445 2446
	$(AM_V_GEN)rm -f -- $@-tmp $@ ; \
	printf 'EXPORTS\n' > $@-tmp && \
2447 2448
	sed -e '/^$$/d; /#/d; /:/d; /}/d; /\*/d; /LIBVIRT_/d'	\
	    -e 's/[	 ]*\(.*\)\;/    \1/g' $^ >> $@-tmp && \
2449
	chmod a-w $@-tmp && \
2450
	mv $@-tmp $@
2451

2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464
libvirt_admin.syms: libvirt_admin_public.syms $(ADMIN_SYM_FILES) \
		$(top_builddir)/config.status
	$(AM_V_GEN)rm -f $@-tmp $@ ; \
	printf '# WARNING: generated from the following:\n# $^\n\n' >$@-tmp && \
	cat $(srcdir)/libvirt_admin_public.syms >>$@-tmp && \
	printf '\n\n# Private symbols\n\n' >>$@-tmp && \
	printf 'LIBVIRT_ADMIN_PRIVATE_$(VERSION) {\n\n'  >>$@-tmp && \
	printf 'global:\n\n' >>$@-tmp && \
	cat $(ADMIN_SYM_FILES) >>$@-tmp && \
	printf '\n\nlocal:\n*;\n\n};' >>$@-tmp && \
	chmod a-w $@-tmp && \
	mv $@-tmp libvirt_admin.syms

2465 2466 2467 2468
# admin/admin_remote.c is being included in libvirt-admin.c, so we
# need to include it in the dist
EXTRA_DIST += admin/admin_remote.c

M
Martin Kletzander 已提交
2469 2470 2471 2472 2473 2474 2475 2476 2477
lib_LTLIBRARIES += libvirt-admin.la
libvirt_admin_la_SOURCES = \
		libvirt-admin.c			\
		$(ADMIN_PROTOCOL_GENERATED)	\
		$(DATATYPES_SOURCES)

libvirt_admin_la_LDFLAGS = \
		$(VERSION_SCRIPT_FLAGS)$(LIBVIRT_ADMIN_SYMBOL_FILE)	\
		-version-info $(LIBVIRT_VERSION_INFO)			\
2478
		$(AM_LDFLAGS)
M
Martin Kletzander 已提交
2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490

libvirt_admin_la_LIBADD = \
		libvirt.la		\
		$(CYGWIN_EXTRA_LIBADD)

libvirt_admin_la_CFLAGS = \
		$(AM_CFLAGS)		\
		-I$(srcdir)/remote	\
		-I$(srcdir)/rpc		\
		-I$(srcdir)/admin

libvirt_admin_la_CFLAGS += \
2491
		$(XDR_CFLAGS)			\
M
Martin Kletzander 已提交
2492 2493 2494 2495
		$(CAPNG_CFLAGS)			\
		$(YAJL_CFLAGS)			\
		$(SSH2_CFLAGS)			\
		$(SASL_CFLAGS)			\
2496 2497
		$(GNUTLS_CFLAGS)		\
		$(LIBSSH_CFLAGS)
M
Martin Kletzander 已提交
2498 2499 2500 2501 2502 2503 2504 2505

libvirt_admin_la_LIBADD += \
		$(CAPNG_LIBS)			\
		$(YAJL_LIBS)			\
		$(DEVMAPPER_LIBS)		\
		$(LIBXML_LIBS)			\
		$(SSH2_LIBS)			\
		$(SASL_LIBS)			\
2506 2507
		$(GNUTLS_LIBS)			\
		$(LIBSSH_LIBS)
M
Martin Kletzander 已提交
2508

2509 2510
ADMIN_SYM_FILES = $(srcdir)/libvirt_admin_private.syms

M
Martin Kletzander 已提交
2511 2512 2513 2514
if WITH_DTRACE_PROBES
libvirt_admin_la_LIBADD += libvirt_probes.lo
endif WITH_DTRACE_PROBES

2515 2516
# Empty source list - it merely links a bunch of convenience libs together
libvirt_la_SOURCES =
D
Daniel P. Berrange 已提交
2517 2518 2519 2520 2521 2522
libvirt_la_LDFLAGS = \
		$(VERSION_SCRIPT_FLAGS)$(LIBVIRT_SYMBOL_FILE) \
		-version-info $(LIBVIRT_VERSION_INFO) \
		$(LIBVIRT_NODELETE) \
		$(AM_LDFLAGS) \
		$(NULL)
2523
libvirt_la_BUILT_LIBADD += ../gnulib/lib/libgnu.la
2524
libvirt_la_LIBADD += \
2525
		    $(DRIVER_MODULES_LIBS) \
2526
		    $(CYGWIN_EXTRA_LIBADD)
2527
libvirt_la_CFLAGS = -DIN_LIBVIRT $(AM_CFLAGS)
2528 2529 2530 2531 2532 2533
# Because we specify libvirt_la_DEPENDENCIES for $(LIBVIRT_SYMBOL_FILE), we
# lose automake's automatic dependencies on an appropriate subset of
# $(libvirt_la_LIBADD).  But we were careful to create
# $(libvirt_la_BUILT_LIBADD) as the subset that automake would have
# picked out for us.
libvirt_la_DEPENDENCIES = $(libvirt_la_BUILT_LIBADD) $(LIBVIRT_SYMBOL_FILE)
2534

2535
if WITH_DTRACE_PROBES
2536
libvirt_la_BUILT_LIBADD += libvirt_probes.lo
2537
libvirt_la_DEPENDENCIES += libvirt_probes.lo libvirt_probes.o
2538
nodist_libvirt_la_SOURCES = libvirt_probes.h
E
Eric Blake 已提交
2539
if WITH_REMOTE
E
Eric Blake 已提交
2540
nodist_libvirt_driver_remote_la_SOURCES = libvirt_probes.h
E
Eric Blake 已提交
2541
endif WITH_REMOTE
2542 2543
if WITH_DRIVER_MODULES
DTRACE2SYSTEMTAP_FLAGS = --with-modules
2544
endif WITH_DRIVER_MODULES
2545

2546 2547 2548
BUILT_SOURCES += libvirt_probes.h libvirt_probes.stp libvirt_functions.stp

if WITH_QEMU
2549
libvirt_driver_qemu_la_LIBADD += libvirt_qemu_probes.lo
2550
nodist_libvirt_driver_qemu_la_SOURCES = libvirt_qemu_probes.h
2551
BUILT_SOURCES += libvirt_qemu_probes.h
2552
endif WITH_QEMU
2553 2554

tapsetdir = $(datadir)/systemtap/tapset
2555
tapset_DATA = libvirt_probes.stp libvirt_qemu_probes.stp libvirt_functions.stp
2556

2557
%_probes.h: %_probes.d
2558 2559
	$(AM_V_GEN)$(DTRACE) -o $@ -h -s $<

E
Eric Blake 已提交
2560
.PRECIOUS: %_probes.o
2561
%_probes.o: %_probes.d
2562 2563
	$(AM_V_GEN)$(DTRACE) -o $@ -G -s $<

2564 2565 2566 2567 2568 2569 2570 2571 2572
%_probes.lo: %_probes.o
	$(AM_V_GEN)printf %s\\n \
	  '# $@ - a libtool object file' \
	  '# Generated by libtool (GNU libtool) 2.4' \
	  '# Actually generated by Makefile.am, in order to shut up libtool' \
	  "pic_object='$<'" \
	  "non_pic_object='$<'" \
	> $@

E
Eric Blake 已提交
2573
# Keep this list synced with PROTOCOL_STRUCTS
J
Jiri Denemark 已提交
2574 2575 2576
RPC_PROBE_FILES = $(srcdir)/rpc/virnetprotocol.x \
		  $(srcdir)/rpc/virkeepaliveprotocol.x \
		  $(srcdir)/remote/remote_protocol.x \
2577
		  $(srcdir)/remote/lxc_protocol.x \
2578 2579
		  $(srcdir)/remote/qemu_protocol.x \
		  $(srcdir)/lxc/lxc_monitor_protocol.x \
M
Martin Kletzander 已提交
2580 2581
		  $(srcdir)/locking/lock_protocol.x \
		  $(srcdir)/admin/admin_protocol.x
2582 2583

libvirt_functions.stp: $(RPC_PROBE_FILES) $(srcdir)/rpc/gensystemtap.pl
2584
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gensystemtap.pl $(RPC_PROBE_FILES) > $@
2585

2586 2587
%_probes.stp: %_probes.d $(srcdir)/dtrace2systemtap.pl \
		$(top_builddir)/config.status
2588
	$(AM_V_GEN)$(PERL) -w $(srcdir)/dtrace2systemtap.pl \
2589
	  $(DTRACE2SYSTEMTAP_FLAGS) $(bindir) $(sbindir) $(libdir) $< > $@
2590

2591
CLEANFILES += libvirt_probes.h libvirt_probes.o libvirt_probes.lo \
2592
              libvirt_qemu_probes.h libvirt_qemu_probes.o \
2593
              libvirt_qemu_probes.lo\
2594 2595
              libvirt_functions.stp libvirt_probes.stp \
              libvirt_qemu_probes.stp
2596
endif WITH_DTRACE_PROBES
2597

2598
EXTRA_DIST += libvirt_probes.d libvirt_qemu_probes.d
2599

C
Chris Lalancette 已提交
2600
libvirt_qemu_la_SOURCES = libvirt-qemu.c
D
Daniel P. Berrange 已提交
2601 2602 2603 2604 2605
libvirt_qemu_la_LDFLAGS = \
		$(VERSION_SCRIPT_FLAGS)$(LIBVIRT_QEMU_SYMBOL_FILE) \
		-version-info $(LIBVIRT_VERSION_INFO) \
		$(AM_LDFLAGS) \
		$(NULL)
2606
libvirt_qemu_la_CFLAGS = $(AM_CFLAGS)
C
Chris Lalancette 已提交
2607
libvirt_qemu_la_LIBADD = libvirt.la $(CYGWIN_EXTRA_LIBADD)
2608

2609
libvirt_lxc_la_SOURCES = libvirt-lxc.c
D
Daniel P. Berrange 已提交
2610 2611 2612 2613 2614
libvirt_lxc_la_LDFLAGS = \
		$(VERSION_SCRIPT_FLAGS)$(LIBVIRT_LXC_SYMBOL_FILE) \
		-version-info $(LIBVIRT_VERSION_INFO) \
		$(AM_LDFLAGS) \
		$(NULL)
2615 2616 2617
libvirt_lxc_la_CFLAGS = $(AM_CFLAGS)
libvirt_lxc_la_LIBADD = libvirt.la $(CYGWIN_EXTRA_LIBADD)

2618 2619 2620 2621 2622 2623 2624
# Since virt-login-shell will be setuid, we must do everything
# we can to avoid linking to other libraries. Many of them do
# unsafe things in functions marked __atttribute__((constructor)).
# This library is built to include the bare minimum required to
# have a RPC client for local UNIX socket access only. We use
# the ../config-post.h header to disable all external deps that
# we don't want
2625
if WITH_SETUID_RPC_CLIENT
2626 2627 2628 2629
noinst_LTLIBRARIES += libvirt-setuid-rpc-client.la

libvirt_setuid_rpc_client_la_SOURCES = 		\
		util/viralloc.c			\
2630 2631
		util/viratomic.c		\
		util/viratomic.h		\
2632 2633
		util/virbitmap.c		\
		util/virbuffer.c		\
2634
		util/vircgroup.c		\
2635 2636
		util/vircommand.c		\
		util/virconf.c			\
2637
		util/virdbus.c			\
2638 2639 2640 2641
		util/virerror.c			\
		util/virevent.c			\
		util/vireventpoll.c		\
		util/virfile.c			\
2642
		util/virgettext.c		\
2643 2644
		util/virhash.c			\
		util/virhashcode.c		\
2645
		util/virhostcpu.c		\
2646 2647 2648 2649 2650 2651 2652 2653
		util/virjson.c			\
		util/virlog.c			\
		util/virobject.c		\
		util/virpidfile.c		\
		util/virprocess.c		\
		util/virrandom.c		\
		util/virsocketaddr.c		\
		util/virstring.c		\
2654
		util/virsystemd.c		\
2655 2656
		util/virtime.c			\
		util/virthread.c		\
2657
		util/virthreadjob.c		\
2658 2659 2660 2661 2662
		util/virtypedparam.c		\
		util/viruri.c			\
		util/virutil.c			\
		util/viruuid.c			\
		conf/domain_event.c		\
2663
		conf/network_event.c		\
2664
		conf/object_event.c		\
2665
		conf/storage_event.c            \
2666
		conf/node_device_event.c	\
2667
		conf/secret_event.c		\
2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683
		rpc/virnetsocket.c		\
		rpc/virnetsocket.h		\
		rpc/virnetmessage.h		\
		rpc/virnetmessage.c		\
		rpc/virkeepalive.c		\
		rpc/virkeepalive.h		\
		rpc/virnetclient.c		\
		rpc/virnetclientprogram.c	\
		rpc/virnetclientstream.c	\
		rpc/virnetprotocol.c		\
		remote/remote_driver.c		\
		remote/remote_protocol.c	\
		remote/qemu_protocol.c		\
		remote/lxc_protocol.c		\
		datatypes.c			\
		libvirt.c			\
2684
		libvirt-domain.c		\
2685
		libvirt-domain-snapshot.c	\
2686
		libvirt-host.c			\
2687
		libvirt-interface.c		\
2688
		libvirt-network.c		\
2689
		libvirt-nodedev.c		\
2690
		libvirt-nwfilter.c		\
2691
		libvirt-secret.c		\
2692
		libvirt-storage.c		\
2693
		libvirt-stream.c		\
2694 2695 2696 2697 2698 2699
		libvirt-lxc.c			\
		$(NULL)

libvirt_setuid_rpc_client_la_LDFLAGS =		\
		$(AM_LDFLAGS)			\
		$(LIBXML_LIBS)			\
J
Jim Fehlig 已提交
2700
		$(SECDRIVER_LIBS)		\
2701 2702 2703
		$(NULL)
libvirt_setuid_rpc_client_la_CFLAGS =		\
		-DLIBVIRT_SETUID_RPC_CLIENT	\
2704 2705
		-I$(srcdir)/conf		\
		-I$(srcdir)/rpc			\
2706
		$(AM_CFLAGS)			\
J
Jim Fehlig 已提交
2707
		$(SECDRIVER_CFLAGS)		\
P
Pavel Fedin 已提交
2708
		$(XDR_CFLAGS)			\
2709
		$(NULL)
2710
endif WITH_SETUID_RPC_CLIENT
2711

2712 2713 2714
lockdriverdir = $(libdir)/libvirt/lock-driver
lockdriver_LTLIBRARIES =

2715
if WITH_LIBVIRTD
2716 2717 2718 2719 2720
lockdriver_LTLIBRARIES += lockd.la
lockd_la_SOURCES = \
		$(LOCK_DRIVER_LOCKD_SOURCES) \
		$(LOCK_PROTOCOL_GENERATED) \
		$(NULL)
2721
lockd_la_CFLAGS = -I$(srcdir)/conf \
E
Eric Blake 已提交
2722 2723
		$(XDR_CFLAGS) \
		$(AM_CFLAGS)
2724
lockd_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
2725 2726 2727 2728
lockd_la_LIBADD = ../gnulib/lib/libgnu.la \
	libvirt-net-rpc.la \
	libvirt-net-rpc-client.la \
	$(NULL)
J
Jiri Denemark 已提交
2729
augeas_DATA += locking/libvirt_lockd.aug
2730 2731
if WITH_DTRACE_PROBES
lockd_la_LIBADD += libvirt_probes.lo
2732
endif WITH_DTRACE_PROBES
2733
if WITH_QEMU
2734 2735
augeastest_DATA += test_libvirt_lockd.aug
CLEANFILES += test_libvirt_lockd.aug
2736
nodist_conf_DATA += locking/qemu-lockd.conf
2737 2738
BUILT_SOURCES += locking/qemu-lockd.conf
DISTCLEANFILES += locking/qemu-lockd.conf
2739
endif WITH_QEMU
2740

2741 2742 2743 2744 2745 2746
if WITH_LIBXL
nodist_conf_DATA += locking/libxl-lockd.conf
BUILT_SOURCES += locking/libxl-lockd.conf
DISTCLEANFILES += locking/libxl-lockd.conf
endif WITH_LIBXL

2747 2748 2749 2750 2751
locking/%-lockd.conf: $(srcdir)/locking/lockd.conf
	$(AM_V_GEN)$(MKDIR_P) locking ; \
	cp $< $@


2752
sbin_PROGRAMS = virtlockd virtlogd
2753

2754 2755 2756
virtlockd_SOURCES = \
		$(LOCK_DAEMON_SOURCES) \
		$(LOCK_PROTOCOL_GENERATED) \
2757
		$(LOCK_DAEMON_GENERATED) \
2758
		$(NULL)
2759 2760
virtlockd_CFLAGS = \
		$(AM_CFLAGS) \
D
Daniel P. Berrange 已提交
2761
		$(PIE_CFLAGS) \
2762
		$(XDR_CFLAGS) \
2763 2764 2765
		$(NULL)
virtlockd_LDFLAGS = \
		$(AM_LDFLAGS) \
D
Daniel P. Berrange 已提交
2766
		$(PIE_LDFLAGS) \
2767 2768 2769 2770 2771 2772 2773 2774 2775 2776
		$(NULL)
virtlockd_LDADD = \
		libvirt-net-rpc-server.la \
		libvirt-net-rpc.la \
		libvirt_util.la \
		../gnulib/lib/libgnu.la \
		$(CYGWIN_EXTRA_LIBADD) \
		$(NULL)
if WITH_DTRACE_PROBES
virtlockd_LDADD += libvirt_probes.lo
2777
endif WITH_DTRACE_PROBES
2778

2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804

virtlogd_SOURCES = \
		$(LOG_DAEMON_SOURCES) \
		$(LOG_PROTOCOL_GENERATED) \
		$(LOG_DAEMON_GENERATED) \
		$(NULL)
virtlogd_CFLAGS = \
		$(AM_CFLAGS) \
		$(PIE_CFLAGS) \
		$(XDR_CFLAGS) \
		$(NULL)
virtlogd_LDFLAGS = \
		$(AM_LDFLAGS) \
		$(PIE_LDFLAGS) \
		$(NULL)
virtlogd_LDADD = \
		libvirt-net-rpc-server.la \
		libvirt-net-rpc.la \
		libvirt_util.la \
		../gnulib/lib/libgnu.la \
		$(CYGWIN_EXTRA_LIBADD) \
		$(NULL)
if WITH_DTRACE_PROBES
virtlogd_LDADD += libvirt_probes.lo
endif WITH_DTRACE_PROBES

2805
else ! WITH_LIBVIRTD
2806
EXTRA_DIST += $(LOCK_DAEMON_SOURCES) \
2807 2808
              $(LOCK_DRIVER_LOCKD_SOURCES) \
	      $(LOG_DAEMON_SOURCES)
2809
endif ! WITH_LIBVIRTD
2810

2811 2812
EXTRA_DIST += \
	locking/virtlockd.sysconf \
J
Jiri Denemark 已提交
2813 2814
	locking/lockd.conf \
	locking/libvirt_lockd.aug \
2815
	locking/test_libvirt_lockd.aug.in \
2816
	logging/virtlogd.sysconf
2817 2818

install-sysconfig:
E
Eric Blake 已提交
2819
	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
2820 2821
	$(INSTALL_DATA) $(srcdir)/locking/virtlockd.sysconf \
	  $(DESTDIR)$(sysconfdir)/sysconfig/virtlockd
2822 2823
	$(INSTALL_DATA) $(srcdir)/logging/virtlogd.sysconf \
	  $(DESTDIR)$(sysconfdir)/sysconfig/virtlogd
2824 2825

uninstall-sysconfig:
2826
	rm -f $(DESTDIR)$(sysconfdir)/sysconfig/virtlogd
2827
	rm -f $(DESTDIR)$(sysconfdir)/sysconfig/virtlockd
E
Eric Blake 已提交
2828
	rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
2829

2830
EXTRA_DIST += locking/virtlockd.init.in logging/virtlogd.init.in
2831 2832 2833

if WITH_LIBVIRTD
if LIBVIRT_INIT_SCRIPT_RED_HAT
2834
install-init:: virtlockd.init virtlogd.init install-sysconfig
E
Eric Blake 已提交
2835
	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d
2836 2837
	$(INSTALL_SCRIPT) virtlockd.init \
	  $(DESTDIR)$(sysconfdir)/rc.d/init.d/virtlockd
2838 2839
	$(INSTALL_SCRIPT) virtlogd.init \
	  $(DESTDIR)$(sysconfdir)/rc.d/init.d/virtlogd
2840 2841

uninstall-init:: uninstall-sysconfig
E
Eric Blake 已提交
2842
	rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/virtlockd
2843
	rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/virtlogd
E
Eric Blake 已提交
2844
	rmdir $(DESTDIR)$(sysconfdir)/rc.d/init.d || :
2845

2846 2847
BUILT_SOURCES += virtlockd.init virtlogd.init
DISTCLEANFILES += virtlockd.init virtlogd.init
2848
else ! LIBVIRT_INIT_SCRIPT_RED_HAT
2849 2850
install-init::
uninstall-init::
2851 2852
endif ! LIBVIRT_INIT_SCRIPT_RED_HAT
else ! WITH_LIBVIRTD
2853 2854
install-init::
uninstall-init::
2855
endif ! WITH_LIBVIRTD
2856 2857

virtlockd.init: locking/virtlockd.init.in $(top_builddir)/config.status
2858 2859 2860 2861 2862 2863
	$(AM_V_GEN)sed						\
	    -e 's|[@]localstatedir[@]|$(localstatedir)|g'	\
	    -e 's|[@]sbindir[@]|$(sbindir)|g'			\
	    -e 's|[@]sysconfdir[@]|$(sysconfdir)|g'		\
	    < $< > $@-t &&					\
	    chmod a+x $@-t &&					\
2864 2865
	    mv $@-t $@

2866 2867 2868 2869 2870 2871 2872 2873 2874
virtlogd.init: logging/virtlogd.init.in $(top_builddir)/config.status
	$(AM_V_GEN)sed						\
	    -e 's|[@]localstatedir[@]|$(localstatedir)|g'	\
	    -e 's|[@]sbindir[@]|$(sbindir)|g'			\
	    -e 's|[@]sysconfdir[@]|$(sysconfdir)|g'		\
	    < $< > $@-t &&					\
	    chmod a+x $@-t &&					\
	    mv $@-t $@

2875
virtlockd.8.in: locking/virtlockd.pod
2876 2877 2878 2879 2880 2881 2882 2883
	$(AM_V_GEN)$(POD2MAN) --section=8 $< $@-t1 && \
	if grep 'POD ERROR' $@-t1; then rm $@-t1; exit 1; fi && \
	sed \
		-e 's|SYSCONFDIR|\@sysconfdir\@|g' \
		-e 's|LOCALSTATEDIR|\@localstatedir\@|g' \
		< $@-t1 > $@-t2 && \
	rm -f $@-t1 && \
	mv $@-t2 $@
2884

2885
virtlogd.8.in: logging/virtlogd.pod
2886 2887 2888 2889 2890 2891 2892 2893
	$(AM_V_GEN)$(POD2MAN) --section=8 $< $@-t1 && \
	if grep 'POD ERROR' $@-t1; then rm $@-t1; exit 1; fi && \
	sed \
		-e 's|SYSCONFDIR|\@sysconfdir\@|g' \
		-e 's|LOCALSTATEDIR|\@localstatedir\@|g' \
		< $@-t1 > $@-t2 && \
	rm -f $@-t1 && \
	mv $@-t2 $@
2894

2895
%.8: %.8.in $(top_srcdir)/configure.ac
2896
	$(AM_V_GEN)sed \
2897 2898 2899
		-e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
		-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
		< $< > $@-t && \
2900 2901
	mv $@-t $@

2902
if WITH_LIBVIRTD
2903
man8_MANS = virtlockd.8 virtlogd.8
2904

2905
conf_DATA += locking/virtlockd.conf logging/virtlogd.conf
2906

2907 2908
augeas_DATA += locking/virtlockd.aug logging/virtlogd.aug
augeastest_DATA += test_virtlockd.aug test_virtlogd.aug
2909
endif WITH_LIBVIRTD
2910

A
Andrea Bolognani 已提交
2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922
PODFILES = \
	locking/virtlockd.pod \
	logging/virtlogd.pod \
	$(NULL)

MANINFILES = \
	virtlockd.8.in \
	virtlogd.8.in \
	$(NULL)

CLEANFILES += test_virtlockd.aug test_virtlogd.aug $(man8_MANS)
MAINTAINERCLEANFILES += $(MANINFILES)
2923 2924 2925 2926

EXTRA_DIST += \
        locking/virtlockd.service.in \
        locking/virtlockd.socket.in \
2927 2928 2929
        locking/virtlockd.aug \
        locking/virtlockd.conf \
        locking/test_virtlockd.aug.in \
2930 2931 2932 2933 2934
        logging/virtlogd.service.in \
        logging/virtlogd.socket.in \
        logging/virtlogd.aug \
        logging/virtlogd.conf \
        logging/test_virtlogd.aug.in \
A
Andrea Bolognani 已提交
2935 2936
        $(PODFILES) \
        $(MANINFILES) \
2937
        $(NULL)
2938

2939 2940 2941 2942

if WITH_LIBVIRTD
if LIBVIRT_INIT_SCRIPT_SYSTEMD

2943
SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
2944

2945 2946 2947 2948
BUILT_SOURCES += virtlockd.service virtlockd.socket \
		 virtlogd.service virtlogd.socket
DISTCLEANFILES += virtlockd.service virtlockd.socket \
		  virtlogd.service virtlogd.socket
2949

2950 2951
install-systemd: virtlockd.service virtlockd.socket \
                 virtlogd.service virtlogd.socket install-sysconfig
E
Eric Blake 已提交
2952
	$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
2953
	$(INSTALL_DATA) virtlockd.service \
2954
	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/
2955
	$(INSTALL_DATA) virtlockd.socket \
2956
	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/
2957 2958 2959 2960
	$(INSTALL_DATA) virtlogd.service \
	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/
	$(INSTALL_DATA) virtlogd.socket \
	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/
2961 2962

uninstall-systemd: uninstall-sysconfig
E
Eric Blake 已提交
2963 2964
	rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlockd.service \
	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlockd.socket
2965 2966
	rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlogd.service \
	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlogd.socket
E
Eric Blake 已提交
2967
	rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || :
2968
else ! LIBVIRT_INIT_SCRIPT_SYSTEMD
2969 2970
install-systemd:
uninstall-systemd:
2971 2972
endif ! LIBVIRT_INIT_SCRIPT_SYSTEMD
else ! WITH_LIBVIRTD
2973 2974
install-systemd:
uninstall-systemd:
2975
endif ! WITH_LIBVIRTD
2976 2977

virtlockd.service: locking/virtlockd.service.in $(top_builddir)/config.status
2978 2979 2980
	$(AM_V_GEN)sed						\
	    -e 's|[@]sbindir[@]|$(sbindir)|g'			\
	    < $< > $@-t &&					\
2981 2982 2983
	    mv $@-t $@

virtlockd.socket: locking/virtlockd.socket.in $(top_builddir)/config.status
2984 2985 2986
	$(AM_V_GEN)sed						\
	    -e 's|[@]localstatedir[@]|$(localstatedir)|g'	\
	    < $< > $@-t &&					\
2987 2988
	    mv $@-t $@

2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000
virtlogd.service: logging/virtlogd.service.in $(top_builddir)/config.status
	$(AM_V_GEN)sed						\
	    -e 's|[@]sbindir[@]|$(sbindir)|g'			\
	    < $< > $@-t &&					\
	    mv $@-t $@

virtlogd.socket: logging/virtlogd.socket.in $(top_builddir)/config.status
	$(AM_V_GEN)sed						\
	    -e 's|[@]localstatedir[@]|$(localstatedir)|g'	\
	    < $< > $@-t &&					\
	    mv $@-t $@

3001

3002
if WITH_SANLOCK
3003
lockdriver_LTLIBRARIES += sanlock.la
3004
sanlock_la_SOURCES = $(LOCK_DRIVER_SANLOCK_SOURCES)
3005
sanlock_la_CFLAGS = -I$(srcdir)/conf $(AM_CFLAGS)
3006
sanlock_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
3007
sanlock_la_LIBADD = -lsanlock_client \
3008 3009 3010
		../gnulib/lib/libgnu.la

augeas_DATA += locking/libvirt_sanlock.aug
3011 3012
augeastest_DATA += test_libvirt_sanlock.aug
CLEANFILES += test_libvirt_sanlock.aug
3013

E
Eric Blake 已提交
3014
locking/%-sanlock.conf: $(srcdir)/locking/sanlock.conf
3015
	$(AM_V_GEN)$(MKDIR_P) locking ; \
3016 3017 3018
	cp $< $@

if WITH_QEMU
3019
nodist_conf_DATA += locking/qemu-sanlock.conf
3020
BUILT_SOURCES += locking/qemu-sanlock.conf
E
Eric Blake 已提交
3021
DISTCLEANFILES += locking/qemu-sanlock.conf
3022
endif WITH_QEMU
3023 3024 3025 3026 3027 3028

if WITH_LIBXL
nodist_conf_DATA += locking/libxl-sanlock.conf
BUILT_SOURCES += locking/libxl-sanlock.conf
DISTCLEANFILES += locking/libxl-sanlock.conf
endif WITH_LIBXL
3029
else ! WITH_SANLOCK
3030
EXTRA_DIST += $(LOCK_DRIVER_SANLOCK_SOURCES)
3031
endif ! WITH_SANLOCK
3032 3033
EXTRA_DIST += locking/sanlock.conf \
	locking/libvirt_sanlock.aug \
3034
	locking/test_libvirt_sanlock.aug.in
3035

3036 3037 3038 3039
noinst_LTLIBRARIES += \
	libvirt-net-rpc.la \
	libvirt-net-rpc-server.la \
	libvirt-net-rpc-client.la
3040

3041
EXTRA_DIST += \
E
Eric Blake 已提交
3042 3043 3044 3045
	dtrace2systemtap.pl \
	rpc/gendispatch.pl \
	rpc/genprotocol.pl \
	rpc/gensystemtap.pl \
J
Jiri Denemark 已提交
3046 3047
	rpc/virnetprotocol.x \
	rpc/virkeepaliveprotocol.x
3048

E
Eric Blake 已提交
3049
VIR_NET_RPC_GENERATED = \
3050 3051 3052 3053
	rpc/virnetprotocol.h \
	rpc/virnetprotocol.c \
	rpc/virkeepaliveprotocol.h \
	rpc/virkeepaliveprotocol.c
3054

3055
BUILT_SOURCES += $(VIR_NET_RPC_GENERATED)
3056

3057
libvirt_net_rpc_la_SOURCES = \
3058
	rpc/virnetmessage.h rpc/virnetmessage.c \
3059
	rpc/virnetsocket.h rpc/virnetsocket.c \
3060 3061
	rpc/virkeepalive.h rpc/virkeepalive.c \
	$(VIR_NET_RPC_GENERATED)
3062
if WITH_SSH2
3063 3064
libvirt_net_rpc_la_SOURCES += \
	rpc/virnetsshsession.h rpc/virnetsshsession.c
3065
else ! WITH_SSH2
3066 3067
EXTRA_DIST += \
	rpc/virnetsshsession.h rpc/virnetsshsession.c
3068
endif ! WITH_SSH2
3069
if WITH_GNUTLS
3070 3071
libvirt_net_rpc_la_SOURCES += \
	rpc/virnettlscontext.h rpc/virnettlscontext.c
3072
else ! WITH_GNUTLS
3073 3074
EXTRA_DIST += \
	rpc/virnettlscontext.h rpc/virnettlscontext.c
3075
endif ! WITH_GNUTLS
3076
if WITH_SASL
3077 3078
libvirt_net_rpc_la_SOURCES += \
	rpc/virnetsaslcontext.h rpc/virnetsaslcontext.c
3079
else ! WITH_SASL
3080 3081
EXTRA_DIST += \
	rpc/virnetsaslcontext.h rpc/virnetsaslcontext.c
3082
endif ! WITH_SASL
3083 3084 3085 3086 3087 3088 3089
if WITH_LIBSSH
libvirt_net_rpc_la_SOURCES += \
	rpc/virnetlibsshsession.h rpc/virnetlibsshsession.c
else ! WITH_LIBSSH
EXTRA_DIST += \
	rpc/virnetlibsshsession.h rpc/virnetlibsshsession.c
endif ! WITH_LIBSSH
3090
libvirt_net_rpc_la_CFLAGS = \
3091
			$(GNUTLS_CFLAGS) \
3092
			$(SASL_CFLAGS) \
3093
			$(SSH2_CFLAGS) \
3094
			$(LIBSSH_CFLAGS) \
3095
			$(XDR_CFLAGS) \
3096 3097
			$(AM_CFLAGS)
libvirt_net_rpc_la_LDFLAGS = \
3098
			$(GNUTLS_LIBS) \
3099
			$(SASL_LIBS) \
3100
			$(SSH2_LIBS)\
3101
			$(LIBSSH_LIBS) \
J
Jim Fehlig 已提交
3102
			$(SECDRIVER_LIBS) \
3103
			$(AM_LDFLAGS) \
3104
			$(NULL)
3105 3106 3107
libvirt_net_rpc_la_LIBADD = \
			$(CYGWIN_EXTRA_LIBADD)

3108 3109 3110 3111
libvirt_net_rpc_server_la_SOURCES = \
	rpc/virnetserverprogram.h rpc/virnetserverprogram.c \
	rpc/virnetserverservice.h rpc/virnetserverservice.c \
	rpc/virnetserverclient.h rpc/virnetserverclient.c \
3112
	rpc/virnetservermdns.h rpc/virnetservermdns.c \
3113
	rpc/virnetdaemon.h rpc/virnetdaemon.c \
3114 3115
	rpc/virnetserver.h rpc/virnetserver.c
libvirt_net_rpc_server_la_CFLAGS = \
3116
			$(AVAHI_CFLAGS) \
3117
			$(DBUS_CFLAGS) \
E
Eric Blake 已提交
3118
			$(XDR_CFLAGS) \
3119
			$(AM_CFLAGS)
3120 3121
libvirt_net_rpc_server_la_LDFLAGS = \
			$(AM_LDFLAGS) \
3122
			$(AVAHI_LIBS) \
3123
			$(DBUS_LIBS) \
3124
			$(NULL)
3125 3126 3127
libvirt_net_rpc_server_la_LIBADD = \
			$(CYGWIN_EXTRA_LIBADD)

3128 3129 3130 3131 3132
libvirt_net_rpc_client_la_SOURCES = \
	rpc/virnetclientprogram.h rpc/virnetclientprogram.c \
	rpc/virnetclientstream.h rpc/virnetclientstream.c \
	rpc/virnetclient.h rpc/virnetclient.c
libvirt_net_rpc_client_la_CFLAGS = \
E
Eric Blake 已提交
3133 3134
			$(AM_CFLAGS) \
			$(XDR_CFLAGS)
3135
libvirt_net_rpc_client_la_LDFLAGS = $(AM_LDFLAGS)
3136 3137
libvirt_net_rpc_client_la_LIBADD = \
			$(CYGWIN_EXTRA_LIBADD)
3138

3139 3140
libexec_PROGRAMS =

3141
if WITH_LIBVIRTD
3142 3143
libexec_PROGRAMS += libvirt_iohelper
libvirt_iohelper_SOURCES = $(UTIL_IO_HELPER_SOURCES)
D
Daniel P. Berrange 已提交
3144 3145 3146 3147
libvirt_iohelper_LDFLAGS = \
		$(AM_LDFLAGS) \
		$(PIE_LDFLAGS) \
		$(NULL)
3148 3149 3150
libvirt_iohelper_LDADD =		\
		libvirt_util.la		\
		../gnulib/lib/libgnu.la
3151 3152
if WITH_DTRACE_PROBES
libvirt_iohelper_LDADD += libvirt_probes.lo
3153
endif WITH_DTRACE_PROBES
3154

D
Daniel P. Berrange 已提交
3155 3156 3157 3158
libvirt_iohelper_CFLAGS = \
		$(AM_CFLAGS) \
		$(PIE_CFLAGS) \
		$(NULL)
3159 3160 3161 3162

if WITH_NETWORK
libexec_PROGRAMS += libvirt_leaseshelper
libvirt_leaseshelper_SOURCES = $(NETWORK_LEASES_HELPER_SOURCES)
3163 3164 3165 3166
libvirt_leaseshelper_LDFLAGS = \
		$(AM_LDFLAGS) \
		$(PIE_LDFLAGS) \
		$(NULL)
3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181
libvirt_leaseshelper_LDADD =           \
               libvirt_util.la         \
               ../gnulib/lib/libgnu.la
if WITH_DTRACE_PROBES
libvirt_leaseshelper_LDADD += libvirt_probes.lo
endif WITH_DTRACE_PROBES

libvirt_leaseshelper_CFLAGS = \
	       $(AM_CFLAGS) \
               $(PIE_CFLAGS) \
               $(NULL)
else ! WITH_NETWORK
EXTRA_DIST += $(NETWORK_LEASES_HELPER_SOURCES)
endif ! WITH_NETWORK

3182
endif WITH_LIBVIRTD
3183

3184
if WITH_STORAGE_DISK
R
Richard W.M. Jones 已提交
3185
if WITH_LIBVIRTD
3186
libexec_PROGRAMS += libvirt_parthelper
3187

3188
libvirt_parthelper_SOURCES = $(STORAGE_HELPER_DISK_SOURCES)
D
Daniel P. Berrange 已提交
3189 3190 3191 3192
libvirt_parthelper_LDFLAGS = \
		$(AM_LDFLAGS) \
		$(PIE_LDFLAGS) \
		$(NULL)
3193 3194 3195 3196
libvirt_parthelper_LDADD =		\
		$(LIBPARTED_LIBS)	\
		libvirt_util.la		\
		../gnulib/lib/libgnu.la
3197 3198
if WITH_DTRACE_PROBES
libvirt_parthelper_LDADD += libvirt_probes.lo
3199
endif WITH_DTRACE_PROBES
3200

D
Daniel P. Berrange 已提交
3201 3202 3203 3204 3205
libvirt_parthelper_CFLAGS = \
		$(LIBPARTED_CFLAGS) \
		$(AM_CFLAGS) \
		$(PIE_CFLAGS) \
		$(NULL)
3206 3207
endif WITH_LIBVIRTD
endif WITH_STORAGE_DISK
3208 3209
EXTRA_DIST += $(STORAGE_HELPER_DISK_SOURCES)

3210

3211
if WITH_SANLOCK
3212 3213 3214
libexec_PROGRAMS += libvirt_sanlock_helper

libvirt_sanlock_helper_SOURCES = $(LOCK_DRIVER_SANLOCK_HELPER_SOURCES)
D
Daniel P. Berrange 已提交
3215
libvirt_sanlock_helper_CFLAGS = \
3216
		-I$(srcdir)/conf \
D
Daniel P. Berrange 已提交
3217 3218 3219 3220 3221 3222 3223
		$(AM_CFLAGS) \
		$(PIE_CFLAGS) \
		$(NULL)
libvirt_sanlock_helper_LDFLAGS = \
		$(AM_LDFLAGS) \
		$(PIE_LDFLAGS) \
		$(NULL)
3224
libvirt_sanlock_helper_LDADD = libvirt.la
3225
endif WITH_SANLOCK
3226

3227 3228 3229 3230 3231 3232
if WITH_LXC
if WITH_LIBVIRTD
libexec_PROGRAMS += libvirt_lxc

libvirt_lxc_SOURCES =						\
		$(LXC_CONTROLLER_SOURCES)			\
O
Osier Yang 已提交
3233
		$(DATATYPES_SOURCES)
D
Daniel P. Berrange 已提交
3234 3235 3236 3237
libvirt_lxc_LDFLAGS = \
		$(AM_LDFLAGS) \
		$(PIE_LDFLAGS) \
		$(NULL)
3238
libvirt_lxc_LDADD =			\
G
Gao feng 已提交
3239
		$(FUSE_LIBS) \
3240 3241
		libvirt-net-rpc-server.la \
		libvirt-net-rpc.la \
3242
		libvirt_security_manager.la \
3243 3244
		libvirt_conf.la \
		libvirt_util.la \
3245
		../gnulib/lib/libgnu.la
3246
if WITH_DTRACE_PROBES
3247
libvirt_lxc_LDADD += libvirt_probes.lo
3248
endif WITH_DTRACE_PROBES
3249
libvirt_lxc_LDADD += $(SECDRIVER_LIBS)
3250
libvirt_lxc_CFLAGS =				\
3251
		-I$(srcdir)/conf	\
3252
		$(AM_CFLAGS)                    \
D
Daniel P. Berrange 已提交
3253
		$(PIE_CFLAGS)			\
G
Gao feng 已提交
3254
		$(LIBNL_CFLAGS)			\
D
Daniel P. Berrange 已提交
3255
		$(FUSE_CFLAGS)			\
3256
		$(DBUS_CFLAGS)			\
P
Pavel Fedin 已提交
3257
		$(XDR_CFLAGS)			\
D
Daniel P. Berrange 已提交
3258
		$(NULL)
3259
if WITH_BLKID
3260 3261
libvirt_lxc_CFLAGS += $(BLKID_CFLAGS)
libvirt_lxc_LDADD += $(BLKID_LIBS)
3262
endif WITH_BLKID
J
Jim Fehlig 已提交
3263
libvirt_lxc_CFLAGS += $(SECDRIVER_CFLAGS)
3264 3265
endif WITH_LIBVIRTD
endif WITH_LXC
3266 3267
EXTRA_DIST += $(LXC_CONTROLLER_SOURCES)

J
Jamie Strandboge 已提交
3268 3269 3270 3271 3272 3273
if WITH_SECDRIVER_APPARMOR
if WITH_LIBVIRTD
libexec_PROGRAMS += virt-aa-helper

virt_aa_helper_SOURCES = $(SECURITY_DRIVER_APPARMOR_HELPER_SOURCES)

D
Daniel P. Berrange 已提交
3274 3275 3276 3277
virt_aa_helper_LDFLAGS = \
		$(AM_LDFLAGS) \
		$(PIE_LDFLAGS) \
		$(NULL)
J
Jamie Strandboge 已提交
3278
virt_aa_helper_LDADD =						\
3279
		libvirt.la					\
C
Chris Lalancette 已提交
3280 3281
		libvirt_conf.la					\
		libvirt_util.la					\
3282
		libvirt_driver_storage_impl.la			\
C
Chris Lalancette 已提交
3283
		../gnulib/lib/libgnu.la
3284
if WITH_DTRACE_PROBES
3285
virt_aa_helper_LDADD += libvirt_probes.lo
3286
endif WITH_DTRACE_PROBES
J
Jamie Strandboge 已提交
3287
virt_aa_helper_CFLAGS =						\
3288 3289 3290 3291
		-I$(srcdir)/conf				\
		-I$(srcdir)/security				\
		$(AM_CFLAGS) 					\
		$(PIE_CFLAGS) 					\
D
Daniel P. Berrange 已提交
3292
		$(NULL)
3293 3294
endif WITH_LIBVIRTD
endif WITH_SECDRIVER_APPARMOR
J
Jamie Strandboge 已提交
3295 3296
EXTRA_DIST += $(SECURITY_DRIVER_APPARMOR_HELPER_SOURCES)

3297
if WITH_NSS
3298 3299 3300 3301 3302
noinst_LTLIBRARIES += libvirt-nss.la

libvirt_nss_la_SOURCES =		\
		util/viralloc.c			\
		util/viralloc.h			\
K
Kai Kang 已提交
3303 3304
		util/viratomic.c		\
		util/viratomic.h		\
3305 3306 3307 3308 3309 3310 3311 3312 3313 3314
		util/virbitmap.c		\
		util/virbitmap.h		\
		util/virbuffer.c		\
		util/virbuffer.h		\
		util/vircommand.c		\
		util/vircommand.h		\
		util/virerror.c			\
		util/virerror.h			\
		util/virfile.c			\
		util/virfile.h			\
3315 3316 3317 3318
		util/virhash.c			\
		util/virhash.h			\
		util/virhashcode.c		\
		util/virhashcode.h		\
3319 3320 3321 3322 3323 3324 3325 3326
		util/virjson.c			\
		util/virjson.h			\
		util/virkmod.c			\
		util/virkmod.h			\
		util/virlease.c			\
		util/virlease.h			\
		util/virlog.c			\
		util/virlog.h			\
3327 3328
		util/virmacmap.c		\
		util/virmacmap.h		\
3329 3330 3331 3332 3333 3334
		util/virobject.c		\
		util/virobject.h		\
		util/virpidfile.c		\
		util/virpidfile.h		\
		util/virprocess.c		\
		util/virprocess.h		\
3335 3336
		util/virrandom.c		\
		util/virrandom.h		\
3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362
		util/virsocketaddr.c	\
		util/virsocketaddr.h	\
		util/virstring.c		\
		util/virstring.h		\
		util/virthread.c		\
		util/virthread.h		\
		util/virthreadjob.c		\
		util/virthreadjob.h		\
		util/virtime.c			\
		util/virtime.h			\
		util/virutil.c			\
		util/virutil.h			\
		$(NULL)

libvirt_nss_la_CFLAGS =			\
		-DLIBVIRT_NSS			\
		$(AM_CFLAGS)			\
		$(YAJL_CFLAGS)			\
		$(NULL)
libvirt_nss_la_LDFLAGS =		\
		$(AM_LDFLAGS)			\
		$(NULL)

libvirt_nss_la_LIBADD =			\
		$(YAJL_LIBS)			\
		$(NULL)
3363
endif WITH_NSS
3364 3365


3366
install-data-local: install-init install-systemd
3367 3368
if WITH_LIBVIRTD
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd"
3369
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd/files"
3370
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/lockd"
3371
endif WITH_LIBVIRTD
3372 3373
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/cache/libvirt"
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/images"
3374
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/filesystems"
3375
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/boot"
3376
if WITH_SANLOCK
3377
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/sanlock"
3378
endif WITH_SANLOCK
3379
if WITH_QEMU
3380
	$(MKDIR_P) -m 0751 "$(DESTDIR)$(localstatedir)/lib/libvirt/qemu"
3381
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/qemu"
3382
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/cache/libvirt/qemu"
3383
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/log/libvirt/qemu"
3384
endif WITH_QEMU
3385 3386 3387
if WITH_LXC
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/lxc"
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/lxc"
3388
endif WITH_LXC
J
Jim Fehlig 已提交
3389 3390 3391
if WITH_LIBXL
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/libxl"
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/libxl"
J
Jim Fehlig 已提交
3392
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/log/libvirt/libxl"
3393
endif WITH_LIBXL
3394 3395 3396
if WITH_UML
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/uml"
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/uml"
3397
endif WITH_UML
3398 3399
if WITH_XEN
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/xen"
3400
endif WITH_XEN
3401 3402
if WITH_NETWORK
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/network"
3403
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/dnsmasq"
3404
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/network"
3405
	$(MKDIR_P) "$(DESTDIR)$(confdir)/qemu/networks/autostart"
3406
	$(INSTALL_DATA) $(srcdir)/network/default.xml \
3407
	  $(DESTDIR)$(confdir)/qemu/networks/default.xml
3408
	test -z "$(UUID)" || \
3409 3410 3411
	  { sed -e "s,</name>,</name>;  <uuid>$(UUID)</uuid>," \
	      $(DESTDIR)$(confdir)/qemu/networks/default.xml | \
	      tr ";" "\n" > \
3412 3413 3414 3415
	      $(DESTDIR)$(confdir)/qemu/networks/default.xml.t && \
	    cp $(DESTDIR)$(confdir)/qemu/networks/default.xml.t \
	      $(DESTDIR)$(confdir)/qemu/networks/default.xml && \
	    rm $(DESTDIR)$(confdir)/qemu/networks/default.xml.t; }
A
Andrea Bolognani 已提交
3416
	( cd $(DESTDIR)$(confdir)/qemu/networks/autostart && \
3417 3418
	  rm -f default.xml && \
	  $(LN_S) ../default.xml default.xml )
3419
endif WITH_NETWORK
3420

3421
uninstall-local:: uninstall-init uninstall-systemd
3422
if WITH_LIBVIRTD
3423
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd/files" ||:
3424 3425
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd" ||:
	rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/lockd" ||:
3426
endif WITH_LIBVIRTD
3427 3428
	rmdir "$(DESTDIR)$(localstatedir)/cache/libvirt" ||:
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/images" ||:
3429
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/filesystems" ||:
3430
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/boot" ||:
3431
if WITH_SANLOCK
3432
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/sanlock" ||:
3433
endif WITH_SANLOCK
3434 3435 3436 3437 3438
if WITH_QEMU
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/qemu" ||:
	rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/qemu" ||:
	rmdir "$(DESTDIR)$(localstatedir)/cache/libvirt/qemu" ||:
	rmdir "$(DESTDIR)$(localstatedir)/log/libvirt/qemu" ||:
3439
endif WITH_QEMU
3440 3441 3442
if WITH_LXC
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/lxc" ||:
	rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/lxc" ||:
3443
endif WITH_LXC
J
Jim Fehlig 已提交
3444 3445 3446
if WITH_LIBXL
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/libxl" ||:
	rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/libxl" ||:
J
Jim Fehlig 已提交
3447
	rmdir "$(DESTDIR)$(localstatedir)/log/libvirt/libxl" ||:
3448
endif WITH_LIBXL
3449 3450 3451
if WITH_UML
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/uml" ||:
	rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/uml" ||:
3452
endif WITH_UML
3453 3454
if WITH_XEN
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/xen" ||:
3455
endif WITH_XEN
3456
if WITH_NETWORK
3457 3458 3459 3460
	rm -f $(DESTDIR)$(confdir)/qemu/networks/autostart/default.xml
	rm -f $(DESTDIR)$(confdir)/qemu/networks/default.xml
	rmdir "$(DESTDIR)$(confdir)/qemu/networks/autostart" || :
	rmdir "$(DESTDIR)$(confdir)/qemu/networks" || :
3461 3462
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/network" ||:
	rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/network" ||:
3463
endif WITH_NETWORK
3464
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt" ||:
R
Richard W.M. Jones 已提交
3465

3466 3467
CLEANFILES += *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.i *.s
DISTCLEANFILES += $(GENERATED_SYM_FILES)
3468
MAINTAINERCLEANFILES += $(REMOTE_DRIVER_GENERATED) $(VIR_NET_RPC_GENERATED)