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

3
## Copyright (C) 2005-2013 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
# No libraries with the exception of LIBXML should be listed
# here. List them against the individual XXX_la_CFLAGS targets
21
# that actually use them. Also keep GETTEXT_CPPFLAGS at the end.
22 23
INCLUDES =	-I../gnulib/lib					\
		-I$(top_srcdir)/gnulib/lib			\
24
		-I../include					\
25 26
		-I$(top_srcdir)/include				\
		-I$(top_srcdir)/src/util			\
27 28
		-DIN_LIBVIRT					\
		$(GETTEXT_CPPFLAGS)
E
Eric Blake 已提交
29

30
AM_CFLAGS =	$(LIBXML_CFLAGS)				\
31
		$(WARN_CFLAGS)					\
E
Eric Blake 已提交
32 33 34
		$(LOCK_CHECKING_CFLAGS)				\
		$(WIN32_EXTRA_CFLAGS)				\
		$(COVERAGE_CFLAGS)
35
AM_LDFLAGS =	$(DRIVER_MODULE_LDFLAGS)			\
G
Guido Günther 已提交
36 37
		$(COVERAGE_LDFLAGS)				\
		$(RELRO_LDFLAGS)				\
38
		$(NO_INDIRECT_LDFLAGS)				\
G
Guido Günther 已提交
39
		$(NULL)
40

L
Lai Jiangshan 已提交
41
EXTRA_DIST = $(conf_DATA) util/keymaps.csv
42

43
BUILT_SOURCES =
44 45 46
CLEANFILES =
DISTCLEANFILES =
MAINTAINERCLEANFILES =
47
nodist_conf_DATA =
48

E
Eric Blake 已提交
49 50
THREAD_LIBS = $(LIB_PTHREAD) $(LTLIBMULTITHREAD)

51 52 53
SECDRIVER_LIBS =
if WITH_SECDRIVER_SELINUX
SECDRIVER_LIBS += $(SELINUX_LIBS)
54
endif WITH_SECDRIVER_SELINUX
55 56
if WITH_SECDRIVER_APPARMOR
SECDRIVER_LIBS += $(APPARMOR_LIBS)
57
endif WITH_SECDRIVER_APPARMOR
58

59 60
if WITH_NETWORK
UUID=$(shell uuidgen 2>/dev/null)
61
endif WITH_NETWORK
62

63
lib_LTLIBRARIES = libvirt.la libvirt-qemu.la libvirt-lxc.la
64

65
moddir = $(libdir)/libvirt/connection-driver
66 67
mod_LTLIBRARIES =

A
Amy Griffis 已提交
68
confdir = $(sysconfdir)/libvirt
69
conf_DATA = libvirt.conf
70

71 72 73 74 75 76
augeasdir = $(datadir)/augeas/lenses
augeas_DATA =

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

77 78
# These files are not related to driver APIs. Simply generic
# helper APIs for various purposes
79
UTIL_SOURCES =							\
80
		util/viralloc.c util/viralloc.h			\
81
		util/virarch.h util/virarch.c			\
82
		util/viratomic.h util/viratomic.c		\
83
		util/viraudit.c util/viraudit.h			\
84
		util/virauth.c util/virauth.h			\
85
		util/virauthconfig.c util/virauthconfig.h	\
86
		util/virbitmap.c util/virbitmap.h		\
87
		util/virbuffer.c util/virbuffer.h		\
88
		util/vircgroup.c util/vircgroup.h util/vircgrouppriv.h	\
89
		util/virclosecallbacks.c util/virclosecallbacks.h		\
90
		util/vircommand.c util/vircommand.h		\
91
		util/virconf.c util/virconf.h			\
L
Laine Stump 已提交
92
		util/virdbus.c util/virdbus.h util/virdbuspriv.h	\
93
		util/virdnsmasq.c util/virdnsmasq.h		\
94
		util/virebtables.c util/virebtables.h		\
E
Eric Blake 已提交
95
		util/virendian.h				\
96
		util/virerror.c util/virerror.h			\
97
		util/virevent.c util/virevent.h			\
98
		util/vireventpoll.c util/vireventpoll.h		\
E
Eric Blake 已提交
99
		util/virfile.c util/virfile.h			\
100 101
		util/virhash.c util/virhash.h			\
		util/virhashcode.c util/virhashcode.h		\
102
		util/virhook.c util/virhook.h			\
103
		util/viridentity.c util/viridentity.h		\
104
		util/virinitctl.c util/virinitctl.h		\
105
		util/viriptables.c util/viriptables.h		\
106
		util/virjson.c util/virjson.h			\
L
Lai Jiangshan 已提交
107
		util/virkeycode.c util/virkeycode.h		\
108
		util/virkeyfile.c util/virkeyfile.h		\
109
		util/virkeymaps.h				\
110
		util/virlockspace.c util/virlockspace.h		\
111
		util/virlog.c util/virlog.h			\
112
		util/virmacaddr.h util/virmacaddr.c		\
113
		util/virnetdev.h util/virnetdev.c		\
114
		util/virnetdevbandwidth.h util/virnetdevbandwidth.c \
115
		util/virnetdevbridge.h util/virnetdevbridge.c	\
116
		util/virnetdevmacvlan.c util/virnetdevmacvlan.h	\
A
Ansis Atteka 已提交
117
		util/virnetdevopenvswitch.h util/virnetdevopenvswitch.c \
118
		util/virnetdevtap.h util/virnetdevtap.c		\
119 120
		util/virnetdevveth.h util/virnetdevveth.c	\
		util/virnetdevvlan.h util/virnetdevvlan.c	\
121
		util/virnetdevvportprofile.h util/virnetdevvportprofile.c \
122
		util/virnetlink.c util/virnetlink.h		\
123
		util/virnodesuspend.c util/virnodesuspend.h	\
124
		util/virnuma.c util/virnuma.h			\
125 126 127
		util/virobject.c util/virobject.h		\
		util/virpci.c util/virpci.h			\
		util/virpidfile.c util/virpidfile.h		\
D
Daniel P. Berrange 已提交
128
		util/virportallocator.c util/virportallocator.h \
129
		util/virprocess.c util/virprocess.h		\
130
		util/virrandom.h util/virrandom.c		\
131
		util/virscsi.c util/virscsi.h			\
132 133 134 135 136 137
		util/virsexpr.c util/virsexpr.h			\
		util/virsocketaddr.h util/virsocketaddr.c	\
		util/virstatslinux.c util/virstatslinux.h	\
		util/virstoragefile.c util/virstoragefile.h	\
		util/virstring.h util/virstring.c		\
		util/virsysinfo.c util/virsysinfo.h		\
138
		util/virsystemd.c util/virsystemd.h		\
139 140 141 142 143
		util/virthread.c util/virthread.h		\
		util/virthreadpthread.h				\
		util/virthreadwin32.h				\
		util/virthreadpool.c util/virthreadpool.h	\
		util/virtime.h util/virtime.c			\
144
		util/virtpm.h util/virtpm.c			\
145
		util/virtypedparam.c util/virtypedparam.h	\
146
		util/virusb.c util/virusb.h			\
147 148
		util/viruri.h util/viruri.c			\
		util/virutil.c util/virutil.h			\
149
		util/viruuid.c util/viruuid.h			\
150
		util/virxml.c util/virxml.h			\
151
		$(NULL)
L
Lai Jiangshan 已提交
152

153

L
Lai Jiangshan 已提交
154 155 156
EXTRA_DIST += $(srcdir)/util/virkeymaps.h $(srcdir)/util/keymaps.csv \
		$(srcdir)/util/virkeycode-mapgen.py

E
Eric Blake 已提交
157
BUILT_SOURCES += util/virkeymaps.h
158

E
Eric Blake 已提交
159
util/virkeymaps.h: $(srcdir)/util/keymaps.csv	\
L
Lai Jiangshan 已提交
160
		$(srcdir)/util/virkeycode-mapgen.py
161
	$(AM_V_GEN)$(PYTHON) $(srcdir)/util/virkeycode-mapgen.py \
E
Eric Blake 已提交
162
	  <$(srcdir)/util/keymaps.csv >$(srcdir)/util/virkeymaps.h
L
Lai Jiangshan 已提交
163

164
EXTRA_DIST += util/virthreadpthread.c util/virthreadwin32.c
165

166
# Internal generic driver infrastructure
167
NODE_INFO_SOURCES = nodeinfo.h nodeinfo.c
O
Osier Yang 已提交
168 169 170 171 172 173 174 175 176 177 178
DATATYPES_SOURCES = datatypes.h datatypes.c
DRIVER_SOURCES =							\
		driver.c driver.h					\
		internal.h						\
		$(DATATYPES_SOURCES)					\
		fdstream.c fdstream.h					\
		$(NODE_INFO_SOURCES)					\
		libvirt.c libvirt_internal.h				\
		locking/lock_manager.c locking/lock_manager.h		\
		locking/lock_driver.h					\
		locking/lock_driver_nop.h locking/lock_driver_nop.c	\
179
		locking/domain_lock.h locking/domain_lock.c
180

181 182 183
LOCK_DRIVER_SANLOCK_SOURCES = \
		locking/lock_driver_sanlock.c

184 185
LOCK_DRIVER_SANLOCK_HELPER_SOURCES = \
		locking/sanlock_helper.c
186

187
LOCK_PROTOCOL_GENERATED = \
E
Eric Blake 已提交
188 189
		locking/lock_protocol.h \
		locking/lock_protocol.c \
190 191
		$(NULL)

192 193 194
LOCK_PROTOCOL = $(srcdir)/locking/lock_protocol.x
EXTRA_DIST += $(LOCK_PROTOCOL) \
	$(LOCK_PROTOCOL_GENERATED)
195 196 197
BUILT_SOURCES += $(LOCK_PROTOCOL_GENERATED)
MAINTAINERCLEANFILES += $(LOCK_PROTOCOL_GENERATED)

198
LOCK_DAEMON_GENERATED = \
199
		$(srcdir)/locking/lock_daemon_dispatch_stubs.h
200 201 202
		$(NULL)

BUILT_SOURCES += $(LOCK_DAEMON_GENERATED)
203
EXTRA_DIST += $(LOCK_DAEMON_GENERATED)
204 205
MAINTAINERCLEANFILES += $(LOCK_DAEMON_GENERATED)

206 207 208 209
LOCK_DRIVER_LOCKD_SOURCES = \
		locking/lock_driver_lockd.c \
		$(NULL)

210 211 212 213 214
LOCK_DAEMON_SOURCES = \
		locking/lock_daemon.h \
		locking/lock_daemon.c \
		locking/lock_daemon_config.h \
		locking/lock_daemon_config.c \
215 216
		locking/lock_daemon_dispatch.c \
		locking/lock_daemon_dispatch.h \
217 218
		$(NULL)

E
Eric Blake 已提交
219
locking/lock_daemon_dispatch_stubs.h: $(LOCK_PROTOCOL) \
220
		$(srcdir)/rpc/gendispatch.pl Makefile.am
221 222
	$(AM_V_GEN)perl -w $(srcdir)/rpc/gendispatch.pl --mode=server \
	    virLockSpaceProtocol VIR_LOCK_SPACE_PROTOCOL \
E
Eric Blake 已提交
223
	    $(LOCK_PROTOCOL) > $(srcdir)/locking/lock_daemon_dispatch_stubs.h
224 225


226 227
NETDEV_CONF_SOURCES =						\
		conf/netdev_bandwidth_conf.h conf/netdev_bandwidth_conf.c \
228 229
		conf/netdev_vport_profile_conf.h conf/netdev_vport_profile_conf.c \
		conf/netdev_vlan_conf.h conf/netdev_vlan_conf.c
230

231
# XML configuration format handling sources
232 233
# Domain driver generic impl APIs
DOMAIN_CONF_SOURCES =						\
234
		conf/capabilities.c conf/capabilities.h		\
235
		conf/domain_conf.c conf/domain_conf.h		\
236
		conf/domain_audit.c conf/domain_audit.h		\
237 238
		conf/domain_nwfilter.c conf/domain_nwfilter.h	\
		conf/snapshot_conf.c conf/snapshot_conf.h
239 240 241

DOMAIN_EVENT_SOURCES =						\
		conf/domain_event.c conf/domain_event.h
242 243

# Network driver generic impl APIs
244
NETWORK_CONF_SOURCES =						\
245
		conf/network_conf.c conf/network_conf.h
246

247 248
# Network filter driver generic impl APIs
NWFILTER_PARAM_CONF_SOURCES =					\
249
		conf/nwfilter_params.c conf/nwfilter_params.h	\
250 251
		conf/nwfilter_ipaddrmap.c			\
		conf/nwfilter_ipaddrmap.h			\
252
		conf/nwfilter_conf.h
253

254
NWFILTER_CONF_SOURCES =						\
255 256 257
		$(NWFILTER_PARAM_CONF_SOURCES)			\
		conf/nwfilter_conf.c conf/nwfilter_conf.h

258
# Storage driver generic impl APIs
259 260
STORAGE_CONF_SOURCES =                                         \
		conf/storage_conf.h conf/storage_conf.c
261

262
# Interface driver generic impl APIs
263 264
INTERFACE_CONF_SOURCES =                                       \
		conf/interface_conf.c conf/interface_conf.h
265

266
# Secret driver generic impl APIs
267 268 269 270 271 272 273 274 275 276
SECRET_CONF_SOURCES =                                          \
		conf/secret_conf.h conf/secret_conf.c

# Network driver generic impl APIs
NODE_DEVICE_CONF_SOURCES =                                     \
		conf/node_device_conf.c conf/node_device_conf.h

ENCRYPTION_CONF_SOURCES =					\
		conf/storage_encryption_conf.c conf/storage_encryption_conf.h

277 278
CPU_CONF_SOURCES =						\
		conf/cpu_conf.c conf/cpu_conf.h
279

280 281
# Safe character device handling helper APIs
CHRDEV_CONF_SOURCES =						\
282
		conf/virchrdev.c conf/virchrdev.h
283

284 285 286 287
# Device Helper APIs
DEVICE_CONF_SOURCES =                                           \
		conf/device_conf.c conf/device_conf.h

288
CONF_SOURCES =							\
289
		$(NETDEV_CONF_SOURCES)				\
290 291 292
		$(DOMAIN_CONF_SOURCES)				\
		$(DOMAIN_EVENT_SOURCES)				\
		$(NETWORK_CONF_SOURCES)				\
293
		$(NWFILTER_CONF_SOURCES)			\
294 295 296 297
		$(NODE_DEVICE_CONF_SOURCES)			\
		$(STORAGE_CONF_SOURCES)				\
		$(ENCRYPTION_CONF_SOURCES)			\
		$(INTERFACE_CONF_SOURCES)			\
298
		$(SECRET_CONF_SOURCES)				\
299
		$(CPU_CONF_SOURCES)				\
300
		$(CHRDEV_CONF_SOURCES)				\
301
		$(DEVICE_CONF_SOURCES)
302

303
# The remote RPC driver, covering domains, storage, networks, etc
304
REMOTE_DRIVER_GENERATED = \
E
Eric Blake 已提交
305 306 307 308 309 310 311 312 313 314
		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 已提交
315 316

REMOTE_PROTOCOL = $(srcdir)/remote/remote_protocol.x
317
LXC_PROTOCOL = $(srcdir)/remote/lxc_protocol.x
E
Eric Blake 已提交
318
QEMU_PROTOCOL = $(srcdir)/remote/qemu_protocol.x
319
REMOTE_DRIVER_PROTOCOL = $(REMOTE_PROTOCOL) $(QEMU_PROTOCOL) $(LXC_PROTOCOL)
320

E
Eric Blake 已提交
321
remote/remote_client_bodies.h: $(srcdir)/rpc/gendispatch.pl \
322
		$(REMOTE_PROTOCOL) Makefile.am
323
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=client \
E
Eric Blake 已提交
324 325
	  remote REMOTE $(REMOTE_PROTOCOL) \
	  > $(srcdir)/remote/remote_client_bodies.h
326

E
Eric Blake 已提交
327
remote/lxc_client_bodies.h: $(srcdir)/rpc/gendispatch.pl \
328
		$(LXC_PROTOCOL) Makefile.am
329
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=client \
E
Eric Blake 已提交
330 331
	  lxc LXC $(LXC_PROTOCOL) \
	  > $(srcdir)/remote/lxc_client_bodies.h
332

E
Eric Blake 已提交
333
remote/qemu_client_bodies.h: $(srcdir)/rpc/gendispatch.pl \
334
		$(QEMU_PROTOCOL) Makefile.am
335
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=client \
E
Eric Blake 已提交
336 337
	  qemu QEMU $(QEMU_PROTOCOL) \
	  > $(srcdir)/remote/qemu_client_bodies.h
338 339 340 341 342

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

344
EXTRA_DIST +=  $(REMOTE_DRIVER_PROTOCOL) \
345
		$(REMOTE_DRIVER_GENERATED)
346

347 348 349 350 351 352 353 354 355 356
# 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
357 358 359 360

# With pdwtags 1.8, --verbose output includes separators like these:
# /* 93 */
# /* <0> (null):0 */
361 362
# with the second line omitted for intrinsic types.
# Whereas with pdwtags 1.3, they look like this:
363
# /* <2d2> /usr/include/libio.h:180 */
364 365
# The alternation of the following regexps matches both cases.
r1 = /\* \d+ \*/
366
r2 = /\* <[[:xdigit:]]+> \S+:\d+ \*/
E
Eric Blake 已提交
367
struct_prefix = (remote_|qemu_|lxc_|keepalive|vir(Net|LockSpace|LXCMonitor))
368

369
# Depending on configure options, libtool creates one or both of
E
Eric Blake 已提交
370 371
# remote/{,.libs/}libvirt_driver_remote_la-remote_protocol.o.  We want
# the newest of the two, in case configure options changed and a stale
372
# file is left around from an earlier build.
373
PDWTAGS = \
374
	$(AM_V_GEN)if (pdwtags --help) > /dev/null 2>&1; then		\
E
Eric Blake 已提交
375 376
	  o=`ls -t $(<:.lo=.$(OBJEXT))					\
	     $(subst /,/.libs/,$(<:.lo=.$(OBJEXT)))			\
377 378 379
	    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 已提交
380
	  if test ! -s $(@F)-t1 && test -s $(@F)-t2; then		\
381 382 383
	    rm -rf $(@F)-t?;						\
	    echo 'WARNING: pdwtags appears broken; skipping the $@ test' >&2;\
	  else								\
384
	    $(PERL) -0777 -n						\
385
		-e 'foreach my $$p (split m!\n*(?:$(r1)|$(r2))\n!) {'	\
386 387
		-e '  if ($$p =~ /^(struct|enum) $(struct_prefix)/ ||'	\
		-e '      $$p =~ /^enum {/) {'				\
388 389 390
		-e '    $$p =~ s!\t*/\*.*?\*/!!sg;'			\
		-e '    $$p =~ s!\s+\n!\n!sg;'				\
		-e '    $$p =~ s!\s+$$!!;'				\
391
		-e '    $$p =~ s!\t!        !g;'			\
392 393 394 395
		-e '    print "$$p\n";'					\
		-e '    $$n++;'						\
		-e '  }'						\
		-e '}'							\
396 397 398
		-e 'BEGIN {'						\
		-e '  print "/* -*- c -*- */\n";'			\
		-e '}'							\
399
		-e 'END {'						\
400
		-e '  if ($$n < 1) {'					\
401 402 403 404 405 406
		-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 '}'							\
407 408
		< $(@F)-t1 > $(@F)-t3;					\
	    case $$? in 8) rm -f $(@F)-t?; exit 0;; 0) ;; *) exit 1;; esac;\
409
	    diff -u $(@)s $(@F)-t3; st=$$?; rm -f $(@F)-t?; exit $$st;	\
410
	  fi;								\
411
	else								\
412 413
	  echo 'WARNING: you lack pdwtags; skipping the $@ test' >&2;	\
	  echo 'WARNING: install the dwarves package to get pdwtags' >&2; \
414
	fi
415

416
# .libs/libvirt.so is built by libtool as a side-effect of the Makefile
417 418
# rule for libvirt.la.  However, checking symbols relies on Linux ELF layout
if WITH_LINUX
419 420 421
check-symfile: libvirt.syms libvirt.la
	$(AM_V_GEN)$(PERL) $(srcdir)/check-symfile.pl libvirt.syms \
	  .libs/libvirt.so
422
else ! WITH_LINUX
423
check-symfile:
424
endif ! WITH_LINUX
425
check-symsorting:
426
	$(AM_V_GEN)$(PERL) $(srcdir)/check-symsorting.pl \
427
		$(srcdir) $(SYM_FILES)
J
Jiri Denemark 已提交
428
EXTRA_DIST += check-symfile.pl check-symsorting.pl
429

E
Eric Blake 已提交
430
# Keep this list synced with RPC_PROBE_FILES
431 432
PROTOCOL_STRUCTS = \
	$(srcdir)/remote_protocol-structs \
433
	$(srcdir)/lxc_protocol-structs \
434
	$(srcdir)/qemu_protocol-structs \
J
Jiri Denemark 已提交
435
	$(srcdir)/virnetprotocol-structs \
E
Eric Blake 已提交
436 437 438 439 440
	$(srcdir)/virkeepaliveprotocol-structs \
	$(srcdir)/lxc_monitor_protocol-structs \
	$(srcdir)/lock_protocol-structs \
	$(NULL)

441
if WITH_REMOTE
442 443
check-protocol: $(PROTOCOL_STRUCTS) $(PROTOCOL_STRUCTS:structs=struct)

444 445
# 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.
446 447 448
$(srcdir)/remote_protocol-struct \
	$(srcdir)/qemu_protocol-struct \
	$(srcdir)/lxc_protocol-struct: \
E
Eric Blake 已提交
449
		$(srcdir)/%-struct: remote/libvirt_driver_remote_la-%.lo
450
	$(PDWTAGS)
451
$(srcdir)/virnetprotocol-struct $(srcdir)/virkeepaliveprotocol-struct: \
E
Eric Blake 已提交
452
		$(srcdir)/%-struct: rpc/libvirt_net_rpc_la-%.lo
453
	$(PDWTAGS)
E
Eric Blake 已提交
454
$(srcdir)/lxc_monitor_protocol-struct: \
E
Eric Blake 已提交
455
		$(srcdir)/%-struct: lxc/libvirt_driver_lxc_impl_la-%.lo
E
Eric Blake 已提交
456 457
	$(PDWTAGS)
$(srcdir)/lock_protocol-struct: \
E
Eric Blake 已提交
458
		$(srcdir)/%-struct: locking/lockd_la-%.lo
E
Eric Blake 已提交
459 460
	$(PDWTAGS)

461
else !WITH_REMOTE
462 463 464
# The $(PROTOCOL_STRUCTS) files must live in git, because they cannot be
# re-generated when configured --without-remote.
check-protocol:
465
endif !WITH_REMOTE
J
Jiri Denemark 已提交
466
EXTRA_DIST += $(PROTOCOL_STRUCTS)
467 468 469 470 471 472 473 474 475 476

check-drivername:
	$(AM_V_GEN)$(PERL) $(srcdir)/check-drivername.pl \
		$(srcdir)/driver.h \
		$(srcdir)/libvirt_public.syms \
		$(srcdir)/libvirt_qemu.syms \
		$(srcdir)/libvirt_lxc.syms

EXTRA_DIST += check-drivername.pl

477
DRIVER_SOURCE_FILES = \
478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497
	$(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) \
	$(PARALLELS_DRIVER_SOURCES) \
	$(PHYP_DRIVER_SOURCES) \
	$(QEMU_DRIVER_SOURCES) \
	$(REMOTE_DRIVER_SOURCES) \
	$(SECRET_DRIVER_SOURCES) \
	$(STORAGE_DRIVER_SOURCES) \
	$(TEST_DRIVER_SOURCES) \
	$(UML_DRIVER_SOURCES) \
	$(VBOX_DRIVER_SOURCES) \
498
	vbox/vbox_tmpl.c \
499 500 501
	$(VMWARE_DRIVER_SOURCES) \
	$(XEN_DRIVER_SOURCES) \
	$(XENAPI_DRIVER_SOURCES) \
502 503
	$(NULL)

504 505 506 507 508 509 510 511 512 513 514 515 516 517
STATEFUL_DRIVER_SOURCE_FILES = \
	$(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) \
	$(NULL)

518 519 520

check-driverimpls:
	$(AM_V_GEN)$(PERL) $(srcdir)/check-driverimpls.pl \
521
		$(filter /%,$(DRIVER_SOURCE_FILES)) \
E
Eric Blake 已提交
522 523 524
		$(filter $(srcdir)/%,$(DRIVER_SOURCE_FILES)) \
		$(addprefix $(srcdir)/,$(filter-out $(srcdir)/%, \
			$(filter-out /%,$(DRIVER_SOURCE_FILES))))
525

526 527
check-aclrules:
	$(AM_V_GEN)$(PERL) $(srcdir)/check-aclrules.pl \
E
Eric Blake 已提交
528
		$(REMOTE_PROTOCOL) \
529
		$(addprefix $(srcdir)/,$(filter-out /%,$(STATEFUL_DRIVER_SOURCE_FILES)))
530 531

EXTRA_DIST += check-driverimpls.pl check-aclrules.pl
532

533
check-local: check-protocol check-symfile check-symsorting \
534
	check-drivername check-driverimpls check-aclrules
535
.PHONY: check-protocol $(PROTOCOL_STRUCTS:structs=struct)
536

537 538
# Mock driver, covering domains, storage, networks, etc
TEST_DRIVER_SOURCES =						\
539
		test/test_driver.c test/test_driver.h
540 541 542

# Now the Hypervisor specific drivers
XEN_DRIVER_SOURCES =						\
543 544 545 546 547 548
		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
549
if WITH_XEN_INOTIFY
550
XEN_DRIVER_SOURCES += xen/xen_inotify.c xen/xen_inotify.h
551
endif WITH_XEN_INOTIFY
552

553
LXC_MONITOR_PROTOCOL_GENERATED = \
E
Eric Blake 已提交
554 555
	lxc/lxc_monitor_protocol.h \
	lxc/lxc_monitor_protocol.c \
556 557 558
	$(NULL)

LXC_MONITOR_GENERATED = \
E
Eric Blake 已提交
559
	lxc/lxc_monitor_dispatch.h \
560 561 562
	$(NULL)

LXC_CONTROLLER_GENERATED = \
E
Eric Blake 已提交
563
	lxc/lxc_controller_dispatch.h \
564 565 566
	$(NULL)

LXC_GENERATED = \
567
	$(LXC_MONITOR_PROTOCOL_GENERATED) \
568 569 570 571
	$(LXC_MONITOR_GENERATED) \
	$(LXC_CONTROLLER_GENERATED) \
	$(NULL)

572
LXC_MONITOR_PROTOCOL = $(srcdir)/lxc/lxc_monitor_protocol.x
573

E
Eric Blake 已提交
574
lxc/lxc_monitor_dispatch.h: $(srcdir)/rpc/gendispatch.pl \
575
		$(LXC_MONITOR_PROTOCOL) Makefile.am
576
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=client \
E
Eric Blake 已提交
577 578
	  virLXCMonitor VIR_LXC_MONITOR $(LXC_MONITOR_PROTOCOL) > \
	  $(srcdir)/lxc/lxc_monitor_dispatch.h
579

E
Eric Blake 已提交
580
lxc/lxc_controller_dispatch.h: $(srcdir)/rpc/gendispatch.pl \
581
		$(REMOTE_PROTOCOL) Makefile.am
582
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=server \
E
Eric Blake 已提交
583 584
	  virLXCMonitor VIR_LXC_MONITOR $(LXC_MONITOR_PROTOCOL) > \
	  $(srcdir)/lxc/lxc_controller_dispatch.h
585 586

EXTRA_DIST += \
587
	$(LXC_MONITOR_PROTOCOL) \
588 589 590 591 592
	$(LXC_GENERATED) \
	$(NULL)

BUILT_SOURCES += $(LXC_GENERATED)

593 594
CLEANFILES += $(LXC_GENERATED)

595
LXC_DRIVER_SOURCES =						\
596
		$(LXC_MONITOR_PROTOCOL_GENERATED)		\
597
		$(LXC_MONITOR_GENERATED)			\
598 599
		lxc/lxc_conf.c lxc/lxc_conf.h			\
		lxc/lxc_container.c lxc/lxc_container.h		\
600
		lxc/lxc_cgroup.c lxc/lxc_cgroup.h		\
601
		lxc/lxc_domain.c lxc/lxc_domain.h		\
602
		lxc/lxc_hostdev.c lxc/lxc_hostdev.h		\
603
		lxc/lxc_monitor.c lxc/lxc_monitor.h		\
604
		lxc/lxc_process.c lxc/lxc_process.h		\
G
Gao feng 已提交
605
		lxc/lxc_fuse.c lxc/lxc_fuse.h			\
606
		lxc/lxc_driver.c lxc/lxc_driver.h
607

608
LXC_CONTROLLER_SOURCES =					\
609
		$(LXC_MONITOR_PROTOCOL_GENERATED)		\
610
		$(LXC_CONTROLLER_GENERATED)			\
611 612
		lxc/lxc_conf.c lxc/lxc_conf.h			\
		lxc/lxc_container.c lxc/lxc_container.h		\
613
		lxc/lxc_cgroup.c lxc/lxc_cgroup.h		\
614
		lxc/lxc_domain.c lxc/lxc_domain.h		\
G
Gao feng 已提交
615
		lxc/lxc_fuse.c lxc/lxc_fuse.h			\
616
		lxc/lxc_controller.c
617

J
Jamie Strandboge 已提交
618
SECURITY_DRIVER_APPARMOR_HELPER_SOURCES =			\
E
Eric Blake 已提交
619
		$(DATATYPES_SOURCES)				\
J
Jamie Strandboge 已提交
620 621
		security/virt-aa-helper.c

622 623 624
PHYP_DRIVER_SOURCES =						\
		phyp/phyp_driver.c phyp/phyp_driver.h

625
OPENVZ_DRIVER_SOURCES =						\
626
		openvz/openvz_conf.c openvz/openvz_conf.h	\
627 628
		openvz/openvz_driver.c openvz/openvz_driver.h   \
		openvz/openvz_util.c openvz/openvz_util.h
629

E
Eric Blake 已提交
630
VMWARE_DRIVER_SOURCES =						\
631
		vmware/vmware_driver.c vmware/vmware_driver.h	\
632 633
		vmware/vmware_conf.c vmware/vmware_conf.h

634
VBOX_DRIVER_SOURCES =						\
E
Eric Blake 已提交
635 636 637 638 639 640
	vbox/vbox_glue.c vbox/vbox_glue.h			\
	vbox/vbox_driver.c vbox/vbox_driver.h			\
	vbox/vbox_V2_2.c vbox/vbox_CAPI_v2_2.h			\
	vbox/vbox_V3_0.c vbox/vbox_CAPI_v3_0.h			\
	vbox/vbox_V3_1.c vbox/vbox_CAPI_v3_1.h			\
	vbox/vbox_V3_2.c vbox/vbox_CAPI_v3_2.h			\
641
	vbox/vbox_V4_0.c vbox/vbox_CAPI_v4_0.h			\
642 643
	vbox/vbox_V4_1.c vbox/vbox_CAPI_v4_1.h			\
	vbox/vbox_V4_2.c vbox/vbox_CAPI_v4_2.h
644

E
Eric Blake 已提交
645
VBOX_DRIVER_EXTRA_DIST =					\
646 647 648
		vbox/vbox_tmpl.c vbox/README			\
		vbox/vbox_MSCOMGlue.c vbox/vbox_MSCOMGlue.h	\
		vbox/vbox_XPCOMCGlue.c vbox/vbox_XPCOMCGlue.h
649

O
Osier Yang 已提交
650 651 652 653 654 655 656 657
QEMU_DRIVER_SOURCES =							\
		qemu/qemu_agent.c qemu/qemu_agent.h			\
		qemu/qemu_capabilities.c qemu/qemu_capabilities.h	\
		qemu/qemu_command.c qemu/qemu_command.h			\
		qemu/qemu_domain.c qemu/qemu_domain.h			\
		qemu/qemu_cgroup.c qemu/qemu_cgroup.h			\
		qemu/qemu_hostdev.c qemu/qemu_hostdev.h			\
		qemu/qemu_hotplug.c qemu/qemu_hotplug.h			\
658
		qemu/qemu_hotplugpriv.h					\
O
Osier Yang 已提交
659 660
		qemu/qemu_conf.c qemu/qemu_conf.h			\
		qemu/qemu_process.c qemu/qemu_process.h			\
661
		qemu/qemu_processpriv.h					\
O
Osier Yang 已提交
662 663 664 665 666 667 668 669
		qemu/qemu_migration.c qemu/qemu_migration.h		\
		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				\
		qemu/qemu_driver.c qemu/qemu_driver.h			\
		qemu/qemu_bridge_filter.c				\
670
		qemu/qemu_bridge_filter.h
R
Richard W.M. Jones 已提交
671

O
Osier Yang 已提交
672
XENAPI_DRIVER_SOURCES =						\
673
		xenapi/xenapi_driver.c xenapi/xenapi_driver.h	\
O
Osier Yang 已提交
674
		xenapi/xenapi_driver_private.h			\
675 676
		xenapi/xenapi_utils.c xenapi/xenapi_utils.h

J
Jim Fehlig 已提交
677 678
LIBXL_DRIVER_SOURCES =						\
		libxl/libxl_conf.c libxl/libxl_conf.h		\
J
Jim Fehlig 已提交
679
		libxl/libxl_domain.c libxl/libxl_domain.h       \
J
Jim Fehlig 已提交
680 681
		libxl/libxl_driver.c libxl/libxl_driver.h

682
UML_DRIVER_SOURCES =						\
D
Daniel P. Berrange 已提交
683 684
		uml/uml_conf.c uml/uml_conf.h			\
		uml/uml_driver.c uml/uml_driver.h
685

O
Osier Yang 已提交
686 687 688 689 690 691
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	\
692
		esx/esx_storage_backend_vmfs.c esx/esx_storage_backend_vmfs.h	\
693
		esx/esx_storage_backend_iscsi.c esx/esx_storage_backend_iscsi.h	\
O
Osier Yang 已提交
694
		esx/esx_device_monitor.c esx/esx_device_monitor.h	\
695
		esx/esx_secret_driver.c esx/esx_secret_driver.h		\
O
Osier Yang 已提交
696 697 698 699
		esx/esx_nwfilter_driver.c esx/esx_nwfilter_driver.h	\
		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		\
700
		esx/esx_vi_types.c esx/esx_vi_types.h
701

702
ESX_DRIVER_GENERATED =							\
703 704
		esx/esx_vi_methods.generated.c				\
		esx/esx_vi_methods.generated.h				\
705
		esx/esx_vi_methods.generated.macro			\
706 707 708 709 710
		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			\
711 712 713
		esx/esx_vi_types.generated.typefromstring		\
		esx/esx_vi.generated.c					\
		esx/esx_vi.generated.h
714

O
Osier Yang 已提交
715
ESX_DRIVER_EXTRA_DIST =							\
716 717 718 719 720
		esx/README						\
		esx/esx_vi_generator.input				\
		esx/esx_vi_generator.py					\
		$(ESX_DRIVER_GENERATED)

O
Osier Yang 已提交
721
HYPERV_DRIVER_SOURCES =									\
M
Matthias Bolte 已提交
722 723 724 725 726 727 728
		hyperv/hyperv_private.h							\
		hyperv/hyperv_driver.c hyperv/hyperv_driver.h				\
		hyperv/hyperv_interface_driver.c hyperv/hyperv_interface_driver.h	\
		hyperv/hyperv_network_driver.c hyperv/hyperv_network_driver.h		\
		hyperv/hyperv_storage_driver.c hyperv/hyperv_storage_driver.h		\
		hyperv/hyperv_device_monitor.c hyperv/hyperv_device_monitor.h		\
		hyperv/hyperv_secret_driver.c hyperv/hyperv_secret_driver.h		\
729
		hyperv/hyperv_nwfilter_driver.c hyperv/hyperv_nwfilter_driver.h		\
730
		hyperv/hyperv_util.c hyperv/hyperv_util.h				\
731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746
		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.generated.c					\
		hyperv/hyperv_wmi.generated.h					\
		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)

D
Dmitry Guryanov 已提交
747 748
PARALLELS_DRIVER_SOURCES =					\
		parallels/parallels_driver.h			\
749
		parallels/parallels_driver.c			\
750 751
		parallels/parallels_utils.c			\
		parallels/parallels_utils.h			\
D
Dmitry Guryanov 已提交
752 753
		parallels/parallels_storage.c		\
		parallels/parallels_network.c
D
Dmitry Guryanov 已提交
754

755
NETWORK_DRIVER_SOURCES =					\
756 757 758 759 760
		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
761

762 763 764 765
INTERFACE_DRIVER_SOURCES =

if WITH_INTERFACE
INTERFACE_DRIVER_SOURCES +=					\
766 767
		interface/interface_driver.h        \
		interface/interface_driver.c
768 769 770 771

if WITH_NETCF
INTERFACE_DRIVER_SOURCES +=					\
		interface/interface_backend_netcf.c
772
endif WITH_NETCF
773
if WITH_UDEV
774 775
INTERFACE_DRIVER_SOURCES +=					\
		interface/interface_backend_udev.c
776 777
endif WITH_UDEV
endif WITH_INTERFACE
778

779
SECRET_DRIVER_SOURCES =						\
780
		secret/secret_driver.h secret/secret_driver.c
781

782
# Storage backend specific impls
O
Osier Yang 已提交
783 784
STORAGE_DRIVER_SOURCES =						\
		storage/storage_driver.h storage/storage_driver.c	\
785
		storage/storage_backend.h storage/storage_backend.c
786 787

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

790
STORAGE_DRIVER_LVM_SOURCES =					\
O
Osier Yang 已提交
791
		storage/storage_backend_logical.h		\
792
		storage/storage_backend_logical.c
793 794

STORAGE_DRIVER_ISCSI_SOURCES =					\
795
		storage/storage_backend_iscsi.h storage/storage_backend_iscsi.c
796

797
STORAGE_DRIVER_SCSI_SOURCES =					\
798
		storage/storage_backend_scsi.h storage/storage_backend_scsi.c
799

D
Dave Allan 已提交
800
STORAGE_DRIVER_MPATH_SOURCES =					\
801
		storage/storage_backend_mpath.h storage/storage_backend_mpath.c
D
Dave Allan 已提交
802

803
STORAGE_DRIVER_DISK_SOURCES =					\
804
		storage/storage_backend_disk.h storage/storage_backend_disk.c
805

806 807 808
STORAGE_DRIVER_RBD_SOURCES =					\
		storage/storage_backend_rbd.h storage/storage_backend_rbd.c

809 810 811
STORAGE_DRIVER_SHEEPDOG_SOURCES =				\
		storage/storage_backend_sheepdog.h storage/storage_backend_sheepdog.c

812
STORAGE_HELPER_DISK_SOURCES =					\
813
		storage/parthelper.c
814

815 816 817
UTIL_IO_HELPER_SOURCES =					\
		util/iohelper.c

818
# Network filters
O
Osier Yang 已提交
819
NWFILTER_DRIVER_SOURCES =						\
820
		nwfilter/nwfilter_driver.h nwfilter/nwfilter_driver.c	\
821 822
		nwfilter/nwfilter_gentech_driver.c			\
		nwfilter/nwfilter_gentech_driver.h			\
S
Stefan Berger 已提交
823 824
		nwfilter/nwfilter_dhcpsnoop.c				\
		nwfilter/nwfilter_dhcpsnoop.h				\
825
		nwfilter/nwfilter_ebiptables_driver.c			\
826 827 828
		nwfilter/nwfilter_ebiptables_driver.h			\
		nwfilter/nwfilter_learnipaddr.c				\
		nwfilter/nwfilter_learnipaddr.h
829

830

831
# Security framework and drivers for various models
O
Osier Yang 已提交
832 833 834 835 836
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		\
837
		security/security_manager.h security/security_manager.c
838

839
SECURITY_DRIVER_SELINUX_SOURCES =				\
840
		security/security_selinux.h security/security_selinux.c
841

J
Jamie Strandboge 已提交
842 843 844
SECURITY_DRIVER_APPARMOR_SOURCES =				\
		security/security_apparmor.h security/security_apparmor.c

845
ACCESS_DRIVER_GENERATED = \
E
Eric Blake 已提交
846 847 848 849 850 851 852
		access/viraccessapicheck.h \
		access/viraccessapicheck.c \
		access/viraccessapicheckqemu.h \
		access/viraccessapicheckqemu.c \
		access/viraccessapichecklxc.h \
		access/viraccessapichecklxc.c \
		$(NULL)
853

854
ACCESS_DRIVER_SYM_FILES = \
855 856 857
		libvirt_access.syms \
		libvirt_access_qemu.syms \
		libvirt_access_lxc.syms
858

859 860 861 862 863
ACCESS_DRIVER_API_FILES = \
		libvirt_access.xml \
		libvirt_access_qemu.xml \
		libvirt_access_lxc.xml

864 865 866 867 868 869 870
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

871 872 873 874
ACCESS_DRIVER_POLKIT_SOURCES = \
		access/viraccessdriverpolkit.h access/viraccessdriverpolkit.c

ACCESS_DRIVER_POLKIT_POLICY = \
875
		$(srcdir)/access/org.libvirt.api.policy
876 877


878
NODE_DEVICE_DRIVER_SOURCES =					\
O
Osier Yang 已提交
879 880
		node_device/node_device_driver.c		\
		node_device/node_device_driver.h		\
881
		node_device/node_device_linux_sysfs.c
882 883

NODE_DEVICE_DRIVER_HAL_SOURCES =				\
884
		node_device/node_device_hal.c			\
885
		node_device/node_device_hal.h
886

887
NODE_DEVICE_DRIVER_UDEV_SOURCES =				\
D
Daniel Veillard 已提交
888 889
		node_device/node_device_udev.c			\
		node_device/node_device_udev.h
890

J
Jiri Denemark 已提交
891 892 893 894
CPU_SOURCES =							\
		cpu/cpu.h cpu/cpu.c				\
		cpu/cpu_generic.h cpu/cpu_generic.c		\
		cpu/cpu_x86.h cpu/cpu_x86.c cpu/cpu_x86_data.h	\
T
Thang Pham 已提交
895
		cpu/cpu_s390.h cpu/cpu_s390.c			\
C
Chuck Short 已提交
896
		cpu/cpu_arm.h cpu/cpu_arm.c			\
P
Prerna Saxena 已提交
897
		cpu/cpu_map.h cpu/cpu_map.c cpu/cpu_powerpc.h	\
898
		cpu/cpu_powerpc.c cpu/cpu_ppc_data.h
899

900 901 902
VMX_SOURCES =							\
		vmx/vmx.c vmx/vmx.h

903 904
XENXS_SOURCES =							\
		xenxs/xenxs_private.h				\
905 906
		xenxs/xen_sxpr.c xenxs/xen_sxpr.h		\
		xenxs/xen_xm.c xenxs/xen_xm.h
907

J
Jiri Denemark 已提交
908 909
pkgdata_DATA =	cpu/cpu_map.xml

E
Eric Blake 已提交
910
EXTRA_DIST +=	$(pkgdata_DATA)
911

912 913 914 915 916 917
#########################
#
# Build up list of libvirt.la source files based on configure conditions
#
# First deal with sources usable in non-daemon context

918
noinst_LTLIBRARIES = libvirt_util.la
919 920
libvirt_la_LIBADD = $(libvirt_la_BUILT_LIBADD)
libvirt_la_BUILT_LIBADD = libvirt_util.la
921 922
libvirt_util_la_SOURCES =					\
		$(UTIL_SOURCES)
923
libvirt_util_la_CFLAGS = $(CAPNG_CFLAGS) $(YAJL_CFLAGS) $(LIBNL_CFLAGS) \
924
		$(AM_CFLAGS) $(AUDIT_CFLAGS) $(DEVMAPPER_CFLAGS) \
925 926
		$(DBUS_CFLAGS) $(LDEXP_LIBM) $(NUMACTL_CFLAGS)	\
		-I$(top_srcdir)/src/conf
927
libvirt_util_la_LIBADD = $(CAPNG_LIBS) $(YAJL_LIBS) $(LIBNL_LIBS) \
928
		$(THREAD_LIBS) $(AUDIT_LIBS) $(DEVMAPPER_LIBS) \
929
		$(LIB_CLOCK_GETTIME) $(DBUS_LIBS) $(MSCOM_LIBS) $(LIBXML_LIBS) \
930
		$(SECDRIVER_LIBS) $(NUMACTL_LIBS)
931

932 933

noinst_LTLIBRARIES += libvirt_conf.la
934
libvirt_la_BUILT_LIBADD += libvirt_conf.la
935
libvirt_conf_la_SOURCES = $(CONF_SOURCES)
936 937
libvirt_conf_la_CFLAGS = $(AM_CFLAGS)
libvirt_conf_la_LDFLAGS = $(AM_LDFLAGS)
938

J
Jiri Denemark 已提交
939
noinst_LTLIBRARIES += libvirt_cpu.la
940
libvirt_la_BUILT_LIBADD += libvirt_cpu.la
J
Jiri Denemark 已提交
941
libvirt_cpu_la_CFLAGS = \
942
		-I$(top_srcdir)/src/conf $(AM_CFLAGS)
J
Jiri Denemark 已提交
943 944
libvirt_cpu_la_SOURCES = $(CPU_SOURCES)

945 946 947 948
if WITH_VMX
noinst_LTLIBRARIES += libvirt_vmx.la
libvirt_la_BUILT_LIBADD += libvirt_vmx.la
libvirt_vmx_la_CFLAGS = \
949
		-I$(top_srcdir)/src/conf $(AM_CFLAGS)
950
libvirt_vmx_la_SOURCES = $(VMX_SOURCES)
951
endif WITH_VMX
952

953
if WITH_XENXS
954 955 956
noinst_LTLIBRARIES += libvirt_xenxs.la
libvirt_la_BUILT_LIBADD += libvirt_xenxs.la
libvirt_xenxs_la_CFLAGS = \
957
		-I$(top_srcdir)/src/conf $(AM_CFLAGS)
958
libvirt_xenxs_la_SOURCES = $(XENXS_SOURCES)
959
endif WITH_XENXS
960

961

962
noinst_LTLIBRARIES += libvirt_driver.la
963
libvirt_la_BUILT_LIBADD += libvirt_driver.la
964
libvirt_driver_la_SOURCES = $(DRIVER_SOURCES)
965

966
libvirt_driver_la_CFLAGS = \
967
		$(GNUTLS_CFLAGS) $(CURL_CFLAGS) \
968
		-I$(top_srcdir)/src/conf $(AM_CFLAGS)
969
libvirt_driver_la_LIBADD = \
970
		$(GNUTLS_LIBS) $(CURL_LIBS) $(DLOPEN_LIBS)
971

972 973
# 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.
974
SYM_FILES = $(USED_SYM_FILES)
975
USED_SYM_FILES = $(srcdir)/libvirt_private.syms
976 977 978 979
GENERATED_SYM_FILES = \
	$(ACCESS_DRIVER_SYM_FILES) \
	libvirt.syms libvirt.def libvirt_qemu.def libvirt_lxc.def \
	$(NULL)
980

981
if WITH_TEST
982
noinst_LTLIBRARIES += libvirt_driver_test.la
983
libvirt_la_BUILT_LIBADD += libvirt_driver_test.la
984
libvirt_driver_test_la_CFLAGS = \
985
		-I$(top_srcdir)/src/conf $(AM_CFLAGS)
986
libvirt_driver_test_la_SOURCES = $(TEST_DRIVER_SOURCES)
987
endif WITH_TEST
988 989

if WITH_REMOTE
990
noinst_LTLIBRARIES += libvirt_driver_remote.la
991
libvirt_la_BUILT_LIBADD += libvirt_driver_remote.la
992 993
libvirt_driver_remote_la_CFLAGS =				\
		$(GNUTLS_CFLAGS)				\
E
Eric Blake 已提交
994
		$(XDR_CFLAGS)					\
995 996
		-I$(top_srcdir)/src/conf			\
		-I$(top_srcdir)/src/rpc				\
997 998
		$(AM_CFLAGS)
libvirt_driver_remote_la_LDFLAGS = $(AM_LDFLAGS)
999 1000 1001 1002
libvirt_driver_remote_la_LIBADD = $(GNUTLS_LIBS) \
                libvirt-net-rpc-client.la \
                libvirt-net-rpc-server.la \
                libvirt-net-rpc.la
1003
libvirt_driver_remote_la_SOURCES = $(REMOTE_DRIVER_SOURCES)
1004

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

1007 1008
endif WITH_REMOTE

1009
%protocol.c: %protocol.x %protocol.h $(srcdir)/rpc/genprotocol.pl
1010
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -c \
E
Eric Blake 已提交
1011
	       $< $@
1012

1013
%protocol.h: %protocol.x $(srcdir)/rpc/genprotocol.pl
1014
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -h \
E
Eric Blake 已提交
1015
	       $< $@
1016

1017
if WITH_XEN
E
Eric Blake 已提交
1018 1019 1020
noinst_LTLIBRARIES += libvirt_driver_xen_impl.la
libvirt_driver_xen_la_SOURCES =
libvirt_driver_xen_la_LIBADD = libvirt_driver_xen_impl.la
1021 1022
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_xen.la
E
Eric Blake 已提交
1023
libvirt_driver_xen_la_LIBADD += ../gnulib/lib/libgnu.la
1024
libvirt_driver_xen_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
1025
else ! WITH_DRIVER_MODULES
1026
noinst_LTLIBRARIES += libvirt_driver_xen.la
1027 1028
# Stateful, so linked to daemon instead
#libvirt_la_BUILT_LIBADD += libvirt_driver_xen.la
1029
endif ! WITH_DRIVER_MODULES
E
Eric Blake 已提交
1030 1031

libvirt_driver_xen_impl_la_CFLAGS =					\
1032
		$(XEN_CFLAGS)					\
1033
		-I$(top_srcdir)/src/access			\
1034 1035
		-I$(top_srcdir)/src/conf			\
		-I$(top_srcdir)/src/xenxs			\
1036
		$(AM_CFLAGS)
E
Eric Blake 已提交
1037 1038 1039
libvirt_driver_xen_impl_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_xen_impl_la_LIBADD = $(XEN_LIBS)
libvirt_driver_xen_impl_la_SOURCES = $(XEN_DRIVER_SOURCES)
1040
endif WITH_XEN
1041

1042 1043
if WITH_PHYP
noinst_LTLIBRARIES += libvirt_driver_phyp.la
1044
libvirt_la_BUILT_LIBADD += libvirt_driver_phyp.la
1045 1046
libvirt_driver_phyp_la_LIBADD = $(SSH2_LIBS)
libvirt_driver_phyp_la_CFLAGS = $(SSH2_CFLAGS) \
1047
		-I$(top_srcdir)/src/conf $(AM_CFLAGS)
1048
libvirt_driver_phyp_la_SOURCES = $(PHYP_DRIVER_SOURCES)
1049
endif WITH_PHYP
1050

1051
if WITH_OPENVZ
1052
noinst_LTLIBRARIES += libvirt_driver_openvz.la
1053
libvirt_la_BUILT_LIBADD += libvirt_driver_openvz.la
1054
libvirt_driver_openvz_la_CFLAGS = \
1055
		-I$(top_srcdir)/src/conf $(AM_CFLAGS)
1056
libvirt_driver_openvz_la_SOURCES = $(OPENVZ_DRIVER_SOURCES)
1057
endif WITH_OPENVZ
1058

1059 1060 1061 1062
if WITH_VMWARE
noinst_LTLIBRARIES += libvirt_driver_vmware.la
libvirt_la_BUILT_LIBADD += libvirt_driver_vmware.la
libvirt_driver_vmware_la_CFLAGS = \
1063
		-I$(top_srcdir)/src/conf -I$(top_srcdir)/src/vmx $(AM_CFLAGS)
1064
libvirt_driver_vmware_la_SOURCES = $(VMWARE_DRIVER_SOURCES)
1065
endif WITH_VMWARE
1066

1067
if WITH_VBOX
1068 1069 1070 1071 1072 1073
noinst_LTLIBRARIES += libvirt_driver_vbox_impl.la
libvirt_driver_vbox_la_SOURCES =
libvirt_driver_vbox_la_LIBADD = libvirt_driver_vbox_impl.la
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_vbox.la
libvirt_driver_vbox_la_LIBADD += ../gnulib/lib/libgnu.la
1074
libvirt_driver_vbox_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
1075
else ! WITH_DRIVER_MODULES
1076
noinst_LTLIBRARIES += libvirt_driver_vbox.la
1077 1078 1079
# GPLv2-only license requries that it be linked into
# libvirtd and *not* libvirt.so
#libvirt_la_BUILT_LIBADD += libvirt_driver_vbox.la
1080
endif ! WITH_DRIVER_MODULES
1081 1082 1083 1084 1085 1086 1087

libvirt_driver_vbox_impl_la_CFLAGS =				\
		-I$(top_srcdir)/src/conf			\
		$(AM_CFLAGS)
libvirt_driver_vbox_impl_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_vbox_impl_la_LIBADD =  $(DLOPEN_LIBS) $(MSCOM_LIBS)
libvirt_driver_vbox_impl_la_SOURCES = $(VBOX_DRIVER_SOURCES)
1088
endif WITH_VBOX
1089

1090 1091
if WITH_XENAPI
noinst_LTLIBRARIES += libvirt_driver_xenapi.la
1092
libvirt_la_BUILT_LIBADD += libvirt_driver_xenapi.la
1093
libvirt_driver_xenapi_la_CFLAGS = $(LIBXENSERVER_CFLAGS) $(CURL_CFLAGS) \
1094
		-I$(top_srcdir)/src/conf $(AM_CFLAGS)
1095
libvirt_driver_xenapi_la_LDFLAGS = $(AM_LDFLAGS)
1096
libvirt_driver_xenapi_la_LIBADD = $(LIBXENSERVER_LIBS) $(CURL_LIBS)
1097
libvirt_driver_xenapi_la_SOURCES = $(XENAPI_DRIVER_SOURCES)
1098
endif WITH_XENAPI
1099

J
Jim Fehlig 已提交
1100
if WITH_LIBXL
E
Eric Blake 已提交
1101 1102 1103
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 已提交
1104 1105
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_libxl.la
E
Eric Blake 已提交
1106
libvirt_driver_libxl_la_LIBADD += ../gnulib/lib/libgnu.la
1107
libvirt_driver_libxl_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
1108
else ! WITH_DRIVER_MODULES
J
Jim Fehlig 已提交
1109 1110 1111
noinst_LTLIBRARIES += libvirt_driver_libxl.la
# Stateful, so linked to daemon instead
#libvirt_la_BUILT_LIBADD += libvirt_driver_libxl.la
1112
endif ! WITH_DRIVER_MODULES
E
Eric Blake 已提交
1113

1114 1115 1116 1117 1118
libvirt_driver_libxl_impl_la_CFLAGS = 		\
		$(LIBXL_CFLAGS)			\
		-I$(top_srcdir)/src/access	\
		-I$(top_srcdir)/src/conf	\
		-I$(top_srcdir)/src/xenxs	\
1119
		$(AM_CFLAGS)
E
Eric Blake 已提交
1120 1121 1122
libvirt_driver_libxl_impl_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_libxl_impl_la_LIBADD = $(LIBXL_LIBS) libvirt_xenxs.la
libvirt_driver_libxl_impl_la_SOURCES = $(LIBXL_DRIVER_SOURCES)
1123
endif WITH_LIBXL
J
Jim Fehlig 已提交
1124

1125
if WITH_QEMU
E
Eric Blake 已提交
1126 1127 1128
noinst_LTLIBRARIES += libvirt_driver_qemu_impl.la
libvirt_driver_qemu_la_SOURCES =
libvirt_driver_qemu_la_LIBADD = libvirt_driver_qemu_impl.la
1129 1130
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_qemu.la
E
Eric Blake 已提交
1131
libvirt_driver_qemu_la_LIBADD += ../gnulib/lib/libgnu.la
1132
libvirt_driver_qemu_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
1133
else ! WITH_DRIVER_MODULES
1134
noinst_LTLIBRARIES += libvirt_driver_qemu.la
1135
# Stateful, so linked to daemon instead
1136
#libvirt_la_BUILT_LIBADD += libvirt_driver_qemu.la
1137
endif ! WITH_DRIVER_MODULES
E
Eric Blake 已提交
1138

1139 1140 1141 1142 1143 1144
libvirt_driver_qemu_impl_la_CFLAGS = \
		$(GNUTLS_CFLAGS) \
		$(LIBNL_CFLAGS) \
		-I$(top_srcdir)/src/access \
		-I$(top_srcdir)/src/conf \
		$(AM_CFLAGS)
E
Eric Blake 已提交
1145
libvirt_driver_qemu_impl_la_LDFLAGS = $(AM_LDFLAGS)
1146
libvirt_driver_qemu_impl_la_LIBADD = $(CAPNG_LIBS) \
1147
                                $(GNUTLS_LIBS) \
1148 1149 1150
				$(LIBNL_LIBS) \
				$(LIBXML_LIBS) \
				$(NULL)
E
Eric Blake 已提交
1151
libvirt_driver_qemu_impl_la_SOURCES = $(QEMU_DRIVER_SOURCES)
1152

A
Amy Griffis 已提交
1153
conf_DATA += qemu/qemu.conf
1154

1155
augeas_DATA += qemu/libvirtd_qemu.aug
1156 1157
augeastest_DATA += test_libvirtd_qemu.aug
CLEANFILES += test_libvirtd_qemu.aug
1158

1159
endif WITH_QEMU
1160
EXTRA_DIST += qemu/qemu.conf qemu/libvirtd_qemu.aug \
1161
		qemu/test_libvirtd_qemu.aug.in qemu/THREADS.txt
1162

1163 1164

if WITH_LXC
E
Eric Blake 已提交
1165 1166 1167
noinst_LTLIBRARIES += libvirt_driver_lxc_impl.la
libvirt_driver_lxc_la_SOURCES =
libvirt_driver_lxc_la_LIBADD = libvirt_driver_lxc_impl.la
1168 1169
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_lxc.la
E
Eric Blake 已提交
1170 1171
libvirt_driver_lxc_la_LIBADD += ../gnulib/lib/libgnu.la
libvirt_driver_lxc_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
1172
else ! WITH_DRIVER_MODULES
1173
noinst_LTLIBRARIES += libvirt_driver_lxc.la
1174
# Stateful, so linked to daemon instead
1175
#libvirt_la_BUILT_LIBADD += libvirt_driver_lxc.la
1176
endif ! WITH_DRIVER_MODULES
E
Eric Blake 已提交
1177 1178

libvirt_driver_lxc_impl_la_CFLAGS = \
S
Serge Hallyn 已提交
1179
		$(LIBNL_CFLAGS) \
G
Gao feng 已提交
1180
		$(FUSE_CFLAGS) \
1181 1182 1183
		-I$(top_srcdir)/src/access \
		-I$(top_srcdir)/src/conf \
		$(AM_CFLAGS)
G
Gao feng 已提交
1184
libvirt_driver_lxc_impl_la_LIBADD = $(CAPNG_LIBS) $(LIBNL_LIBS) $(FUSE_LIBS)
1185
if WITH_BLKID
E
Eric Blake 已提交
1186 1187
libvirt_driver_lxc_impl_la_CFLAGS += $(BLKID_CFLAGS)
libvirt_driver_lxc_impl_la_LIBADD += $(BLKID_LIBS)
1188
endif WITH_BLKID
1189
libvirt_driver_lxc_impl_la_LIBADD += $(SECDRIVER_LIBS)
E
Eric Blake 已提交
1190
libvirt_driver_lxc_impl_la_SOURCES = $(LXC_DRIVER_SOURCES)
A
Amy Griffis 已提交
1191 1192 1193

conf_DATA += lxc/lxc.conf

1194
augeas_DATA += lxc/libvirtd_lxc.aug
1195 1196
augeastest_DATA += test_libvirtd_lxc.aug
CLEANFILES += test_libvirtd_lxc.aug
1197

1198
endif WITH_LXC
1199
EXTRA_DIST += lxc/lxc.conf lxc/libvirtd_lxc.aug lxc/test_libvirtd_lxc.aug.in
1200

1201
if WITH_UML
E
Eric Blake 已提交
1202 1203 1204
noinst_LTLIBRARIES += libvirt_driver_uml_impl.la
libvirt_driver_uml_la_SOURCES =
libvirt_driver_uml_la_LIBADD = libvirt_driver_uml_impl.la
1205 1206
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_uml.la
E
Eric Blake 已提交
1207
libvirt_driver_uml_la_LIBADD += ../gnulib/lib/libgnu.la
1208
libvirt_driver_uml_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
1209
else ! WITH_DRIVER_MODULES
1210 1211
noinst_LTLIBRARIES += libvirt_driver_uml.la
# Stateful, so linked to daemon instead
1212
#libvirt_la_BUILT_LIBADD += libvirt_driver_uml.la
1213
endif ! WITH_DRIVER_MODULES
E
Eric Blake 已提交
1214

1215
libvirt_driver_uml_impl_la_CFLAGS = \
1216 1217 1218
		-I$(top_srcdir)/src/access \
		-I$(top_srcdir)/src/conf \
		$(AM_CFLAGS)
E
Eric Blake 已提交
1219
libvirt_driver_uml_impl_la_LDFLAGS = $(AM_LDFLAGS)
1220
# libvirt_driver_uml_impl_la_LIBADD =
E
Eric Blake 已提交
1221
libvirt_driver_uml_impl_la_SOURCES = $(UML_DRIVER_SOURCES)
1222
endif WITH_UML
1223

D
Daniel Veillard 已提交
1224

1225
BUILT_SOURCES += $(ESX_DRIVER_GENERATED)
D
Daniel Veillard 已提交
1226

1227 1228
ESX_GENERATED_STAMP = .esx_vi_generator.stamp

E
Eric Blake 已提交
1229 1230
EXTRA_DIST += $(ESX_GENERATED_STAMP)

1231 1232 1233
$(ESX_DRIVER_GENERATED): $(ESX_GENERATED_STAMP)

$(ESX_GENERATED_STAMP): $(srcdir)/esx/esx_vi_generator.input \
1234
                         $(srcdir)/esx/esx_vi_generator.py
1235 1236 1237 1238 1239
	$(AM_V_GEN)srcdir=$(srcdir) $(PYTHON) $(srcdir)/esx/esx_vi_generator.py \
	  && touch $@

MAINTAINERCLEANFILES += $(ESX_DRIVER_GENERATED) $(ESX_GENERATED_STAMP)

D
Daniel Veillard 已提交
1240

1241 1242
if WITH_ESX
noinst_LTLIBRARIES += libvirt_driver_esx.la
1243
libvirt_la_BUILT_LIBADD += libvirt_driver_esx.la
1244
libvirt_driver_esx_la_CFLAGS = $(CURL_CFLAGS) \
1245
		-I$(top_srcdir)/src/conf -I$(top_srcdir)/src/vmx $(AM_CFLAGS)
1246
libvirt_driver_esx_la_LDFLAGS = $(AM_LDFLAGS)
1247
libvirt_driver_esx_la_LIBADD = $(CURL_LIBS)
1248
libvirt_driver_esx_la_SOURCES = $(ESX_DRIVER_SOURCES)
1249
libvirt_driver_esx_la_DEPENDENCIES = $(ESX_DRIVER_GENERATED)
1250
endif WITH_ESX
1251

M
Matthias Bolte 已提交
1252

1253 1254
BUILT_SOURCES += $(HYPERV_DRIVER_GENERATED)

1255 1256
HYPERV_GENERATED_STAMP = .hyperv_wmi_generator.stamp

E
Eric Blake 已提交
1257 1258
EXTRA_DIST += $(HYPERV_GENERATED_STAMP)

1259 1260 1261
$(HYPERV_DRIVER_GENERATED): $(HYPERV_GENERATED_STAMP)

$(HYPERV_GENERATED_STAMP): $(srcdir)/hyperv/hyperv_wmi_generator.input \
1262
                            $(srcdir)/hyperv/hyperv_wmi_generator.py
1263 1264
	$(AM_V_GEN)srcdir=$(srcdir) $(PYTHON) \
	  $(srcdir)/hyperv/hyperv_wmi_generator.py \
1265 1266 1267
	  && touch $@

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

M
Matthias Bolte 已提交
1269 1270 1271 1272
if WITH_HYPERV
noinst_LTLIBRARIES += libvirt_driver_hyperv.la
libvirt_la_BUILT_LIBADD += libvirt_driver_hyperv.la
libvirt_driver_hyperv_la_CFLAGS = $(OPENWSMAN_CFLAGS) \
1273
		-I$(top_srcdir)/src/conf $(AM_CFLAGS)
M
Matthias Bolte 已提交
1274 1275 1276
libvirt_driver_hyperv_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_hyperv_la_LIBADD = $(OPENWSMAN_LIBS)
libvirt_driver_hyperv_la_SOURCES = $(HYPERV_DRIVER_SOURCES)
1277
endif WITH_HYPERV
M
Matthias Bolte 已提交
1278

D
Dmitry Guryanov 已提交
1279 1280 1281 1282 1283 1284
if WITH_PARALLELS
noinst_LTLIBRARIES += libvirt_driver_parallels.la
libvirt_la_BUILT_LIBADD += libvirt_driver_parallels.la
libvirt_driver_parallels_la_CFLAGS = \
		-I$(top_srcdir)/src/conf $(AM_CFLAGS)
libvirt_driver_parallels_la_SOURCES = $(PARALLELS_DRIVER_SOURCES)
1285
endif WITH_PARALLELS
D
Dmitry Guryanov 已提交
1286

1287
if WITH_NETWORK
E
Eric Blake 已提交
1288 1289 1290
noinst_LTLIBRARIES += libvirt_driver_network_impl.la
libvirt_driver_network_la_SOURCES =
libvirt_driver_network_la_LIBADD = libvirt_driver_network_impl.la
1291 1292
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_network.la
1293 1294 1295 1296
libvirt_driver_network_la_LIBADD += ../gnulib/lib/libgnu.la \
	$(LIBNL_LIBS) \
	$(DBUS_LIBS) \
	$(NULL)
E
Eric Blake 已提交
1297
libvirt_driver_network_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
1298
else ! WITH_DRIVER_MODULES
1299
noinst_LTLIBRARIES += libvirt_driver_network.la
1300
# Stateful, so linked to daemon instead
1301
#libvirt_la_BUILT_LIBADD += libvirt_driver_network.la
1302
endif ! WITH_DRIVER_MODULES
E
Eric Blake 已提交
1303 1304

libvirt_driver_network_impl_la_CFLAGS = \
1305 1306 1307 1308 1309
		$(LIBNL_CFLAGS) \
		$(DBUS_CFLAGS) \
		-I$(top_srcdir)/src/access \
		-I$(top_srcdir)/src/conf \
		$(AM_CFLAGS)
E
Eric Blake 已提交
1310
libvirt_driver_network_impl_la_SOURCES = $(NETWORK_DRIVER_SOURCES)
1311
libvirt_driver_network_impl_la_LIBADD  = $(DBUS_LIBS)
1312
endif WITH_NETWORK
1313 1314 1315
EXTRA_DIST += network/default.xml


1316
if WITH_INTERFACE
1317 1318
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_interface.la
1319
else ! WITH_DRIVER_MODULES
1320
noinst_LTLIBRARIES += libvirt_driver_interface.la
1321 1322
# Stateful, so linked to daemon instead
#libvirt_la_BUILT_LIBADD += libvirt_driver_interface.la
1323
endif ! WITH_DRIVER_MODULES
1324 1325 1326 1327
libvirt_driver_interface_la_CFLAGS = \
		-I$(top_srcdir)/src/access \
		-I$(top_srcdir)/src/conf \
		$(AM_CFLAGS)
1328
libvirt_driver_interface_la_LDFLAGS = $(AM_LDFLAGS)
1329 1330 1331 1332
libvirt_driver_interface_la_LIBADD =
if WITH_NETCF
libvirt_driver_interface_la_CFLAGS += $(NETCF_CFLAGS)
libvirt_driver_interface_la_LIBADD += $(NETCF_LIBS)
1333
else ! WITH_NETCF
1334
if WITH_UDEV
1335 1336
libvirt_driver_interface_la_CFLAGS += $(UDEV_CFLAGS)
libvirt_driver_interface_la_LIBADD += $(UDEV_LIBS)
1337 1338
endif WITH_UDEV
endif ! WITH_NETCF
1339
if WITH_DRIVER_MODULES
1340
libvirt_driver_interface_la_LIBADD += ../gnulib/lib/libgnu.la
1341
libvirt_driver_interface_la_LDFLAGS += -module -avoid-version
1342
endif WITH_DRIVER_MODULES
1343
libvirt_driver_interface_la_SOURCES = $(INTERFACE_DRIVER_SOURCES)
1344
endif WITH_INTERFACE
D
Daniel Veillard 已提交
1345

D
Daniel P. Berrange 已提交
1346
if WITH_SECRETS
1347 1348
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_secret.la
1349
else ! WITH_DRIVER_MODULES
1350
noinst_LTLIBRARIES += libvirt_driver_secret.la
1351
# Stateful, so linked to daemon instead
1352
#libvirt_la_BUILT_LIBADD += libvirt_driver_secret.la
1353
endif ! WITH_DRIVER_MODULES
1354
libvirt_driver_secret_la_CFLAGS = \
1355 1356 1357
		-I$(top_srcdir)/src/access \
		-I$(top_srcdir)/src/conf \
		$(AM_CFLAGS)
1358
if WITH_DRIVER_MODULES
1359
libvirt_driver_secret_la_LIBADD = ../gnulib/lib/libgnu.la
1360
libvirt_driver_secret_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
1361
endif WITH_DRIVER_MODULES
1362
libvirt_driver_secret_la_SOURCES = $(SECRET_DRIVER_SOURCES)
1363
endif WITH_SECRETS
1364

1365
# Needed to keep automake quiet about conditionals
1366 1367
libvirt_driver_storage_impl_la_SOURCES =
libvirt_driver_storage_impl_la_CFLAGS = \
1368 1369 1370
		-I$(top_srcdir)/src/access \
		-I$(top_srcdir)/src/conf \
		$(AM_CFLAGS)
1371 1372
libvirt_driver_storage_impl_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_storage_impl_la_LIBADD =
1373
libvirt_driver_storage_impl_la_LIBADD += $(SECDRIVER_LIBS)
1374
if WITH_BLKID
1375 1376
libvirt_driver_storage_impl_la_CFLAGS += $(BLKID_CFLAGS)
libvirt_driver_storage_impl_la_LIBADD += $(BLKID_LIBS)
1377
endif WITH_BLKID
1378
if WITH_STORAGE
1379 1380 1381
noinst_LTLIBRARIES += libvirt_driver_storage_impl.la
libvirt_driver_storage_la_SOURCES =
libvirt_driver_storage_la_LIBADD = libvirt_driver_storage_impl.la
1382 1383
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_storage.la
1384
libvirt_driver_storage_la_LIBADD += ../gnulib/lib/libgnu.la
1385
libvirt_driver_storage_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
1386
else ! WITH_DRIVER_MODULES
1387
noinst_LTLIBRARIES += libvirt_driver_storage.la
1388
# Stateful, so linked to daemon instead
1389
#libvirt_la_BUILT_LIBADD += libvirt_driver_storage.la
1390
endif ! WITH_DRIVER_MODULES
1391 1392
libvirt_driver_storage_impl_la_SOURCES += $(STORAGE_DRIVER_SOURCES)
libvirt_driver_storage_impl_la_SOURCES += $(STORAGE_DRIVER_FS_SOURCES)
1393
endif WITH_STORAGE
1394

1395
if WITH_STORAGE_LVM
1396
libvirt_driver_storage_impl_la_SOURCES += $(STORAGE_DRIVER_LVM_SOURCES)
1397
endif WITH_STORAGE_LVM
1398

1399
if WITH_STORAGE_ISCSI
1400
libvirt_driver_storage_impl_la_SOURCES += $(STORAGE_DRIVER_ISCSI_SOURCES)
1401
endif WITH_STORAGE_ISCSI
1402

1403
if WITH_STORAGE_SCSI
1404
libvirt_driver_storage_impl_la_SOURCES += $(STORAGE_DRIVER_SCSI_SOURCES)
1405
endif WITH_STORAGE_SCSI
1406

D
Dave Allan 已提交
1407
if WITH_STORAGE_MPATH
1408 1409 1410
libvirt_driver_storage_impl_la_SOURCES += $(STORAGE_DRIVER_MPATH_SOURCES)
libvirt_driver_storage_impl_la_CFLAGS += $(DEVMAPPER_CFLAGS)
libvirt_driver_storage_impl_la_LIBADD += $(DEVMAPPER_LIBS)
1411
endif WITH_STORAGE_MPATH
D
Dave Allan 已提交
1412

1413
if WITH_STORAGE_DISK
1414
libvirt_driver_storage_impl_la_SOURCES += $(STORAGE_DRIVER_DISK_SOURCES)
1415
endif WITH_STORAGE_DISK
1416

1417
if WITH_STORAGE_RBD
1418 1419
libvirt_driver_storage_impl_la_SOURCES += $(STORAGE_DRIVER_RBD_SOURCES)
libvirt_driver_storage_impl_la_LIBADD += $(LIBRBD_LIBS)
1420
endif WITH_STORAGE_RBD
1421

1422
if WITH_STORAGE_SHEEPDOG
1423
libvirt_driver_storage_impl_la_SOURCES += $(STORAGE_DRIVER_SHEEPDOG_SOURCES)
1424
endif WITH_STORAGE_SHEEPDOG
1425

1426 1427 1428 1429
if WITH_NODE_DEVICES
# Needed to keep automake quiet about conditionals
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_nodedev.la
1430
else ! WITH_DRIVER_MODULES
1431 1432
noinst_LTLIBRARIES += libvirt_driver_nodedev.la
# Stateful, so linked to daemon instead
1433
#libvirt_la_BUILT_LIBADD += libvirt_driver_nodedev.la
1434
endif ! WITH_DRIVER_MODULES
1435 1436
libvirt_driver_nodedev_la_SOURCES = $(NODE_DEVICE_DRIVER_SOURCES)

1437
libvirt_driver_nodedev_la_CFLAGS = \
1438 1439 1440
		-I$(top_srcdir)/src/access \
		-I$(top_srcdir)/src/conf \
		$(AM_CFLAGS)
1441
libvirt_driver_nodedev_la_LDFLAGS = $(AM_LDFLAGS)
1442
libvirt_driver_nodedev_la_LIBADD =
1443

D
Doug Goldstein 已提交
1444
if WITH_LIBVIRTD
1445
if WITH_HAL
1446 1447
libvirt_driver_nodedev_la_SOURCES += $(NODE_DEVICE_DRIVER_HAL_SOURCES)
libvirt_driver_nodedev_la_CFLAGS += $(HAL_CFLAGS)
1448
libvirt_driver_nodedev_la_LIBADD += $(HAL_LIBS)
1449
endif WITH_HAL
1450
if WITH_UDEV
1451
libvirt_driver_nodedev_la_SOURCES += $(NODE_DEVICE_DRIVER_UDEV_SOURCES)
1452
libvirt_driver_nodedev_la_CFLAGS += $(UDEV_CFLAGS) $(PCIACCESS_CFLAGS)
1453
libvirt_driver_nodedev_la_LIBADD += $(UDEV_LIBS) $(PCIACCESS_LIBS)
1454 1455
endif WITH_UDEV
endif WITH_LIBVIRTD
1456 1457

if WITH_DRIVER_MODULES
1458
libvirt_driver_nodedev_la_LIBADD += ../gnulib/lib/libgnu.la
1459
libvirt_driver_nodedev_la_LDFLAGS += -module -avoid-version
1460 1461
endif WITH_DRIVER_MODULES
endif WITH_NODE_DEVICES
1462 1463


1464 1465 1466
if WITH_NWFILTER
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_nwfilter.la
1467
else ! WITH_DRIVER_MODULES
1468
noinst_LTLIBRARIES += libvirt_driver_nwfilter.la
1469 1470
# Stateful, so linked to daemon instead
#libvirt_la_BUILT_LIBADD += libvirt_driver_nwfilter.la
1471
endif ! WITH_DRIVER_MODULES
1472 1473 1474 1475 1476 1477 1478
libvirt_driver_nwfilter_la_CFLAGS = \
		$(LIBPCAP_CFLAGS) \
		$(LIBNL_CFLAGS) \
		$(DBUS_CFLAGS) \
		-I$(top_srcdir)/src/access \
		-I$(top_srcdir)/src/conf \
		$(AM_CFLAGS)
G
Guido Günther 已提交
1479
libvirt_driver_nwfilter_la_LDFLAGS = $(AM_LDFLAGS)
1480
libvirt_driver_nwfilter_la_LIBADD = $(LIBPCAP_LIBS) $(LIBNL_LIBS) $(DBUS_LIBS)
1481
if WITH_DRIVER_MODULES
1482
libvirt_driver_nwfilter_la_LIBADD += ../gnulib/lib/libgnu.la
1483
libvirt_driver_nwfilter_la_LDFLAGS += -module -avoid-version
1484
endif WITH_DRIVER_MODULES
1485
libvirt_driver_nwfilter_la_SOURCES = $(NWFILTER_DRIVER_SOURCES)
1486
endif WITH_NWFILTER
1487 1488


1489 1490 1491 1492
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 = \
1493
		-I$(top_srcdir)/src/conf $(AM_CFLAGS)
1494
libvirt_security_manager_la_LDFLAGS = $(AM_LDFLAGS)
1495
libvirt_security_manager_la_LIBADD = $(SECDRIVER_LIBS)
1496
if WITH_SECDRIVER_SELINUX
1497 1498
libvirt_security_manager_la_SOURCES += $(SECURITY_DRIVER_SELINUX_SOURCES)
libvirt_security_manager_la_CFLAGS += $(SELINUX_CFLAGS)
1499
endif WITH_SECDRIVER_SELINUX
J
Jamie Strandboge 已提交
1500
if WITH_SECDRIVER_APPARMOR
1501 1502
libvirt_security_manager_la_SOURCES += $(SECURITY_DRIVER_APPARMOR_SOURCES)
libvirt_security_manager_la_CFLAGS += $(APPARMOR_CFLAGS)
1503
endif WITH_SECDRIVER_APPARMOR
1504

1505 1506
libvirt_driver_access_la_SOURCES = \
	$(ACCESS_DRIVER_SOURCES) $(ACCESS_DRIVER_GENERATED)
1507 1508 1509 1510 1511 1512 1513
noinst_LTLIBRARIES += libvirt_driver_access.la
libvirt_la_BUILT_LIBADD += libvirt_driver_access.la
libvirt_driver_access_la_CFLAGS = \
		-I$(top_srcdir)/src/conf $(AM_CFLAGS)
libvirt_driver_access_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_access_la_LIBADD =

1514 1515 1516 1517 1518 1519
EXTRA_DIST += access/genpolkit.pl

if WITH_POLKIT1
libvirt_driver_access_la_SOURCES += $(ACCESS_DRIVER_POLKIT_SOURCES)

polkitactiondir = $(datadir)/polkit-1/actions
1520
if WITH_LIBVIRTD
1521
polkitaction_DATA = $(ACCESS_DRIVER_POLKIT_POLICY)
1522
endif WITH_LIBVIRTD
1523 1524 1525 1526 1527 1528 1529

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

CLEANFILES += $(ACCESS_DRIVER_POLKIT_POLICY)
BUILT_SOURCES += $(ACCESS_DRIVER_POLKIT_POLICY)
1530
else ! WITH_POLKIT1
1531
EXTRA_DIST += $(ACCESS_DRIVER_POLKIT_SOURCES)
1532
endif ! WITH_POLKIT1
1533

1534

1535 1536
BUILT_SOURCES += $(ACCESS_DRIVER_GENERATED) $(ACCESS_DRIVER_API_FILES)
CLEANFILES += $(ACCESS_DRIVER_GENERATED) $(ACCESS_DRIVER_API_FILES)
1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550

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) > $@

1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563
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 已提交
1564
access/viraccessapicheck.h: $(srcdir)/rpc/gendispatch.pl \
1565 1566
			$(REMOTE_PROTOCOL) Makefile.am
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclheader \
E
Eric Blake 已提交
1567 1568 1569
	  remote REMOTE $(REMOTE_PROTOCOL) \
	  > $(srcdir)/access/viraccessapicheck.h
access/viraccessapicheck.c: $(srcdir)/rpc/gendispatch.pl \
1570 1571
			$(REMOTE_PROTOCOL) Makefile.am
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclbody \
E
Eric Blake 已提交
1572 1573
	  remote REMOTE $(REMOTE_PROTOCOL) access/viraccessapicheck.h \
	  > $(srcdir)/access/viraccessapicheck.c
1574

E
Eric Blake 已提交
1575
access/viraccessapicheckqemu.h: $(srcdir)/rpc/gendispatch.pl \
1576 1577
			$(QEMU_PROTOCOL) Makefile.am
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclheader \
E
Eric Blake 已提交
1578 1579 1580
	  qemu QEMU $(QEMU_PROTOCOL) \
	  > $(srcdir)/access/viraccessapicheckqemu.h
access/viraccessapicheckqemu.c: $(srcdir)/rpc/gendispatch.pl \
1581 1582
			$(QEMU_PROTOCOL) Makefile.am
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclbody \
E
Eric Blake 已提交
1583 1584
	  qemu QEMU $(QEMU_PROTOCOL) access/viraccessapicheckqemu.h \
	  > $(srcdir)/access/viraccessapicheckqemu.c
1585

E
Eric Blake 已提交
1586
access/viraccessapichecklxc.h: $(srcdir)/rpc/gendispatch.pl \
1587 1588
			$(LXC_PROTOCOL) Makefile.am
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclheader \
E
Eric Blake 已提交
1589 1590 1591
	  lxc LXC $(LXC_PROTOCOL) \
	  > $(srcdir)/access/viraccessapichecklxc.h
access/viraccessapichecklxc.c: $(srcdir)/rpc/gendispatch.pl \
1592 1593
			$(LXC_PROTOCOL) Makefile.am
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclbody \
E
Eric Blake 已提交
1594 1595
	  lxc LXC $(LXC_PROTOCOL) access/viraccessapichecklxc.h \
	  > $(srcdir)/access/viraccessapichecklxc.c
1596

1597 1598 1599 1600 1601 1602 1603
# Add all conditional sources just in case...
EXTRA_DIST +=							\
		$(TEST_DRIVER_SOURCES)				\
		$(REMOTE_DRIVER_SOURCES)			\
		$(XEN_DRIVER_SOURCES)				\
		$(QEMU_DRIVER_SOURCES)				\
		$(LXC_DRIVER_SOURCES)				\
1604
		$(UML_DRIVER_SOURCES)				\
1605
		$(OPENVZ_DRIVER_SOURCES)			\
1606
		$(PHYP_DRIVER_SOURCES)				\
1607
		$(VBOX_DRIVER_SOURCES)				\
1608
		$(XENAPI_DRIVER_SOURCES)			\
O
Osier Yang 已提交
1609
		$(LIBXL_DRIVER_SOURCES)				\
1610
		$(ESX_DRIVER_SOURCES)				\
1611
		$(ESX_DRIVER_EXTRA_DIST)			\
M
Matthias Bolte 已提交
1612
		$(HYPERV_DRIVER_SOURCES)			\
1613
		$(HYPERV_DRIVER_EXTRA_DIST)			\
O
Osier Yang 已提交
1614
		$(PARALLELS_DRIVER_SOURCES)			\
1615
		$(NETWORK_DRIVER_SOURCES)			\
1616
		$(INTERFACE_DRIVER_SOURCES)			\
1617 1618 1619 1620
		$(STORAGE_DRIVER_SOURCES)			\
		$(STORAGE_DRIVER_FS_SOURCES)			\
		$(STORAGE_DRIVER_LVM_SOURCES)			\
		$(STORAGE_DRIVER_ISCSI_SOURCES)			\
1621
		$(STORAGE_DRIVER_SCSI_SOURCES)			\
D
Dave Allan 已提交
1622
		$(STORAGE_DRIVER_MPATH_SOURCES)			\
1623
		$(STORAGE_DRIVER_DISK_SOURCES)			\
1624
		$(STORAGE_DRIVER_RBD_SOURCES)			\
1625
		$(STORAGE_DRIVER_SHEEPDOG_SOURCES)		\
1626 1627
		$(NODE_DEVICE_DRIVER_SOURCES)			\
		$(NODE_DEVICE_DRIVER_HAL_SOURCES)		\
1628
		$(NODE_DEVICE_DRIVER_UDEV_SOURCES)		\
1629
		$(NWFILTER_DRIVER_SOURCES)			\
1630
		$(SECURITY_DRIVER_SELINUX_SOURCES)		\
J
Jamie Strandboge 已提交
1631
		$(SECURITY_DRIVER_APPARMOR_SOURCES)		\
D
Daniel P. Berrange 已提交
1632
		$(SECRET_DRIVER_SOURCES)			\
1633
		$(VBOX_DRIVER_EXTRA_DIST)			\
1634
		$(VMWARE_DRIVER_SOURCES)			\
1635 1636
		$(XENXS_SOURCES)				\
		$(ACCESS_DRIVER_POLKIT_POLICY)
1637

1638 1639
check-local: check-augeas

1640 1641 1642 1643 1644 1645
.PHONY: check-augeas \
	check-augeas-qemu \
	check-augeas-lxc \
	check-augeas-sanlock \
	check-augeas-lockd \
	$(NULL)
1646

1647
check-augeas: check-augeas-qemu check-augeas-lxc check-augeas-sanlock \
1648
	check-augeas-lockd check-augeas-virtlockd
1649

1650
AUG_GENTEST = $(PERL) $(top_srcdir)/build-aux/augeas-gentest.pl
1651
EXTRA_DIST += $(top_srcdir)/build-aux/augeas-gentest.pl
1652

1653
if WITH_QEMU
1654 1655
test_libvirtd_qemu.aug: qemu/test_libvirtd_qemu.aug.in \
		$(srcdir)/qemu/qemu.conf $(AUG_GENTEST)
E
Eric Blake 已提交
1656
	$(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/qemu/qemu.conf $< $@
1657

1658
check-augeas-qemu: test_libvirtd_qemu.aug
1659
	$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
1660
	    '$(AUGPARSE)' -I $(srcdir)/qemu test_libvirtd_qemu.aug; \
1661
	fi
1662
else ! WITH_QEMU
1663
check-augeas-qemu:
1664
endif ! WITH_QEMU
1665

1666
if WITH_LXC
1667 1668
test_libvirtd_lxc.aug: lxc/test_libvirtd_lxc.aug.in \
		$(srcdir)/lxc/lxc.conf $(AUG_GENTEST)
E
Eric Blake 已提交
1669
	$(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/lxc/lxc.conf $< $@
1670

1671
check-augeas-lxc: test_libvirtd_lxc.aug
1672
	$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
1673
	    '$(AUGPARSE)' -I $(srcdir)/lxc test_libvirtd_lxc.aug; \
1674
	fi
1675
else ! WITH_LXC
1676
check-augeas-lxc:
1677
endif ! WITH_LXC
1678

1679
if WITH_SANLOCK
1680 1681
test_libvirt_sanlock.aug: locking/test_libvirt_sanlock.aug.in \
		locking/qemu-sanlock.conf $(AUG_GENTEST)
E
Eric Blake 已提交
1682
	$(AM_V_GEN)$(AUG_GENTEST) locking/qemu-sanlock.conf $< $@
1683

1684
check-augeas-sanlock: test_libvirt_sanlock.aug
1685
	$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
1686
	    '$(AUGPARSE)' -I $(srcdir)/locking test_libvirt_sanlock.aug; \
1687
	fi
1688
else ! WITH_SANLOCK
1689
check-augeas-sanlock:
1690
endif ! WITH_SANLOCK
1691

1692 1693 1694 1695
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 $< $@

1696 1697
test_virtlockd.aug: locking/test_virtlockd.aug.in \
		locking/virtlockd.conf $(AUG_GENTEST)
1698
	$(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/locking/virtlockd.conf $< $@
1699

1700 1701 1702 1703 1704
check-augeas-lockd: test_libvirt_lockd.aug
	$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
	    '$(AUGPARSE)' -I $(srcdir)/locking test_libvirt_lockd.aug; \
	fi

1705 1706 1707 1708 1709
check-augeas-virtlockd: test_virtlockd.aug
	$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
	    '$(AUGPARSE)' -I $(srcdir)/locking test_virtlockd.aug; \
	fi

1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728
#
# 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.
#

1729
if WITH_DRIVER_MODULES
1730
USED_SYM_FILES += $(srcdir)/libvirt_driver_modules.syms
1731
else ! WITH_DRIVER_MODULES
1732
SYM_FILES += $(srcdir)/libvirt_driver_modules.syms
1733
endif ! WITH_DRIVER_MODULES
1734

1735
if WITH_LINUX
1736
USED_SYM_FILES += $(srcdir)/libvirt_linux.syms
1737
else ! WITH_LINUX
1738
SYM_FILES += $(srcdir)/libvirt_linux.syms
1739
endif ! WITH_LINUX
1740

1741
if WITH_ESX
1742
USED_SYM_FILES += $(srcdir)/libvirt_esx.syms
1743
else ! WITH_ESX
1744
SYM_FILES += $(srcdir)/libvirt_esx.syms
1745
endif ! WITH_ESX
1746

1747
if WITH_LIBVIRTD
1748
USED_SYM_FILES += $(srcdir)/libvirt_daemon.syms
1749
else ! WITH_LIBVIRTD
1750
SYM_FILES += $(srcdir)/libvirt_daemon.syms
1751
endif ! WITH_LIBVIRTD
1752

1753
if WITH_OPENVZ
1754
USED_SYM_FILES += $(srcdir)/libvirt_openvz.syms
1755
else ! WITH_OPENVZ
1756
SYM_FILES += $(srcdir)/libvirt_openvz.syms
1757
endif ! WITH_OPENVZ
1758

1759
if WITH_VMX
1760
USED_SYM_FILES += $(srcdir)/libvirt_vmx.syms
1761
else ! WITH_VMX
1762
SYM_FILES += $(srcdir)/libvirt_vmx.syms
1763
endif ! WITH_VMX
1764

1765
if WITH_XENXS
1766
USED_SYM_FILES += $(srcdir)/libvirt_xenxs.syms
1767
else ! WITH_XENXS
1768
SYM_FILES += $(srcdir)/libvirt_xenxs.syms
1769
endif ! WITH_XENXS
1770

1771
if WITH_SASL
1772
USED_SYM_FILES += $(srcdir)/libvirt_sasl.syms
1773
else ! WITH_SASL
1774
SYM_FILES += $(srcdir)/libvirt_sasl.syms
1775
endif ! WITH_SASL
E
Eric Blake 已提交
1776

1777 1778
if WITH_GNUTLS
USED_SYM_FILES += $(srcdir)/libvirt_gnutls.syms
1779
else ! WITH_GNUTLS
1780
SYM_FILES += $(srcdir)/libvirt_gnutls.syms
1781
endif ! WITH_GNUTLS
1782

1783
if WITH_SSH2
1784
USED_SYM_FILES += $(srcdir)/libvirt_libssh2.syms
1785
else ! WITH_SSH2
1786
SYM_FILES += $(srcdir)/libvirt_libssh2.syms
1787
endif ! WITH_SSH2
1788

1789
if WITH_ATOMIC_OPS_PTHREAD
1790
USED_SYM_FILES += $(srcdir)/libvirt_atomic.syms
1791
else ! WITH_ATOMIC_OPS_PTHREAD
1792
SYM_FILES += $(srcdir)/libvirt_atomic.syms
1793
endif ! WITH_ATOMIC_OPS_PTHREAD
1794

1795
EXTRA_DIST += \
1796 1797 1798 1799 1800
	libvirt_public.syms		\
	libvirt_lxc.syms		\
	libvirt_qemu.syms		\
	$(SYM_FILES)			\
	$(NULL)
1801

1802
BUILT_SOURCES += $(GENERATED_SYM_FILES)
1803

1804 1805
libvirt.syms: libvirt_public.syms $(USED_SYM_FILES) \
		$(ACCESS_DRIVER_SYM_FILES) \
1806
		$(top_builddir)/config.status
1807 1808 1809 1810 1811 1812
	$(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 && \
1813
	cat $(USED_SYM_FILES) $(ACCESS_DRIVER_SYM_FILES) >>$@-tmp && \
1814 1815
	printf '\n\nlocal:\n*;\n\n};' >>$@-tmp && \
	chmod a-w $@-tmp && \
1816
	mv $@-tmp libvirt.syms
1817

1818 1819 1820
libvirt.def: libvirt.syms
	$(AM_V_GEN)rm -f -- $@-tmp $@ ; \
	printf 'EXPORTS\n' > $@-tmp && \
1821 1822
	sed -e '/^$$/d; /#/d; /:/d; /}/d; /\*/d; /LIBVIRT_/d'	\
	    -e 's/[	 ]*\(.*\)\;/    \1/g' $^ >> $@-tmp && \
1823 1824 1825
	chmod a-w $@-tmp && \
	mv $@-tmp libvirt.def

1826 1827 1828
libvirt_qemu.def: $(srcdir)/libvirt_qemu.syms
	$(AM_V_GEN)rm -f -- $@-tmp $@ ; \
	printf 'EXPORTS\n' > $@-tmp && \
1829 1830
	sed -e '/^$$/d; /#/d; /:/d; /}/d; /\*/d; /LIBVIRT_/d'	\
	    -e 's/[	 ]*\(.*\)\;/    \1/g' $^ >> $@-tmp && \
1831 1832 1833
	chmod a-w $@-tmp && \
	mv $@-tmp libvirt_qemu.def

1834 1835 1836
libvirt_lxc.def: $(srcdir)/libvirt_lxc.syms
	$(AM_V_GEN)rm -f -- $@-tmp $@ ; \
	printf 'EXPORTS\n' > $@-tmp && \
1837 1838
	sed -e '/^$$/d; /#/d; /:/d; /}/d; /\*/d; /LIBVIRT_/d'	\
	    -e 's/[	 ]*\(.*\)\;/    \1/g' $^ >> $@-tmp && \
1839 1840 1841
	chmod a-w $@-tmp && \
	mv $@-tmp libvirt_lxc.def

1842 1843
# Empty source list - it merely links a bunch of convenience libs together
libvirt_la_SOURCES =
D
Daniel P. Berrange 已提交
1844 1845 1846 1847 1848 1849 1850 1851
libvirt_la_LDFLAGS = \
		$(VERSION_SCRIPT_FLAGS)$(LIBVIRT_SYMBOL_FILE) \
		-version-info $(LIBVIRT_VERSION_INFO) \
		$(LIBVIRT_NODELETE) \
		$(AM_LDFLAGS) \
		$(CYGWIN_EXTRA_LDFLAGS) \
		$(MINGW_EXTRA_LDFLAGS) \
		$(NULL)
1852
libvirt_la_BUILT_LIBADD += ../gnulib/lib/libgnu.la
1853
libvirt_la_LIBADD += \
1854
		    $(DRIVER_MODULE_LIBS) \
1855
		    $(CYGWIN_EXTRA_LIBADD)
1856
libvirt_la_CFLAGS = -DIN_LIBVIRT $(AM_CFLAGS)
1857 1858 1859 1860 1861 1862
# 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)
1863

1864
if WITH_DTRACE_PROBES
1865
libvirt_la_BUILT_LIBADD += libvirt_probes.lo
1866
libvirt_la_DEPENDENCIES += libvirt_probes.lo libvirt_probes.o
1867
nodist_libvirt_la_SOURCES = libvirt_probes.h
E
Eric Blake 已提交
1868
if WITH_REMOTE
E
Eric Blake 已提交
1869
nodist_libvirt_driver_remote_la_SOURCES = libvirt_probes.h
E
Eric Blake 已提交
1870
endif WITH_REMOTE
1871 1872
if WITH_DRIVER_MODULES
DTRACE2SYSTEMTAP_FLAGS = --with-modules
1873
endif WITH_DRIVER_MODULES
1874

1875 1876 1877
BUILT_SOURCES += libvirt_probes.h libvirt_probes.stp libvirt_functions.stp

if WITH_QEMU
1878
libvirt_driver_qemu_la_LIBADD += libvirt_qemu_probes.lo
1879
nodist_libvirt_driver_qemu_la_SOURCES = libvirt_qemu_probes.h
1880
BUILT_SOURCES += libvirt_qemu_probes.h
1881
endif WITH_QEMU
1882 1883

tapsetdir = $(datadir)/systemtap/tapset
1884
tapset_DATA = libvirt_probes.stp libvirt_qemu_probes.stp libvirt_functions.stp
1885

1886
%_probes.h: %_probes.d
1887 1888
	$(AM_V_GEN)$(DTRACE) -o $@ -h -s $<

E
Eric Blake 已提交
1889
.PRECIOUS: %_probes.o
1890
%_probes.o: %_probes.d
1891 1892
	$(AM_V_GEN)$(DTRACE) -o $@ -G -s $<

1893 1894 1895 1896 1897 1898 1899 1900 1901
%_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 已提交
1902
# Keep this list synced with PROTOCOL_STRUCTS
J
Jiri Denemark 已提交
1903 1904 1905
RPC_PROBE_FILES = $(srcdir)/rpc/virnetprotocol.x \
		  $(srcdir)/rpc/virkeepaliveprotocol.x \
		  $(srcdir)/remote/remote_protocol.x \
1906
		  $(srcdir)/remote/lxc_protocol.x \
1907 1908 1909
		  $(srcdir)/remote/qemu_protocol.x \
		  $(srcdir)/lxc/lxc_monitor_protocol.x \
		  $(srcdir)/locking/lock_protocol.x
1910 1911

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

1914 1915
%_probes.stp: %_probes.d $(srcdir)/dtrace2systemtap.pl \
		$(top_builddir)/config.status
1916
	$(AM_V_GEN)$(PERL) -w $(srcdir)/dtrace2systemtap.pl \
1917
	  $(DTRACE2SYSTEMTAP_FLAGS) $(bindir) $(sbindir) $(libdir) $< > $@
1918

1919
CLEANFILES += libvirt_probes.h libvirt_probes.o libvirt_probes.lo \
1920
              libvirt_qemu_probes.h libvirt_qemu_probes.o \
1921
              libvirt_qemu_probes.lo\
1922 1923
              libvirt_functions.stp libvirt_probes.stp \
              libvirt_qemu_probes.stp
1924
endif WITH_DTRACE_PROBES
1925

1926
EXTRA_DIST += libvirt_probes.d libvirt_qemu_probes.d
1927

C
Chris Lalancette 已提交
1928
libvirt_qemu_la_SOURCES = libvirt-qemu.c
D
Daniel P. Berrange 已提交
1929 1930 1931 1932 1933 1934 1935
libvirt_qemu_la_LDFLAGS = \
		$(VERSION_SCRIPT_FLAGS)$(LIBVIRT_QEMU_SYMBOL_FILE) \
		-version-info $(LIBVIRT_VERSION_INFO) \
		$(AM_LDFLAGS) \
		$(CYGWIN_EXTRA_LDFLAGS) \
		$(MINGW_EXTRA_LDFLAGS) \
		$(NULL)
1936
libvirt_qemu_la_CFLAGS = $(AM_CFLAGS)
C
Chris Lalancette 已提交
1937
libvirt_qemu_la_LIBADD = libvirt.la $(CYGWIN_EXTRA_LIBADD)
1938

1939
libvirt_lxc_la_SOURCES = libvirt-lxc.c
D
Daniel P. Berrange 已提交
1940 1941 1942 1943 1944 1945 1946
libvirt_lxc_la_LDFLAGS = \
		$(VERSION_SCRIPT_FLAGS)$(LIBVIRT_LXC_SYMBOL_FILE) \
		-version-info $(LIBVIRT_VERSION_INFO) \
		$(AM_LDFLAGS) \
		$(CYGWIN_EXTRA_LDFLAGS) \
		$(MINGW_EXTRA_LDFLAGS) \
		$(NULL)
1947 1948 1949
libvirt_lxc_la_CFLAGS = $(AM_CFLAGS)
libvirt_lxc_la_LIBADD = libvirt.la $(CYGWIN_EXTRA_LIBADD)

1950 1951 1952
lockdriverdir = $(libdir)/libvirt/lock-driver
lockdriver_LTLIBRARIES =

1953
if WITH_LIBVIRTD
1954 1955 1956 1957 1958
lockdriver_LTLIBRARIES += lockd.la
lockd_la_SOURCES = \
		$(LOCK_DRIVER_LOCKD_SOURCES) \
		$(LOCK_PROTOCOL_GENERATED) \
		$(NULL)
E
Eric Blake 已提交
1959 1960 1961
lockd_la_CFLAGS = -I$(top_srcdir)/src/conf \
		$(XDR_CFLAGS) \
		$(AM_CFLAGS)
1962
lockd_la_LDFLAGS = -module -avoid-version
1963 1964 1965 1966
lockd_la_LIBADD = ../gnulib/lib/libgnu.la \
	libvirt-net-rpc.la \
	libvirt-net-rpc-client.la \
	$(NULL)
J
Jiri Denemark 已提交
1967 1968 1969
augeas_DATA += locking/libvirt_lockd.aug
augeastest_DATA += test_libvirt_lockd.aug
CLEANFILES += test_libvirt_lockd.aug
1970 1971
if WITH_DTRACE_PROBES
lockd_la_LIBADD += libvirt_probes.lo
1972
endif WITH_DTRACE_PROBES
1973
if WITH_QEMU
1974
nodist_conf_DATA += locking/qemu-lockd.conf
1975 1976
BUILT_SOURCES += locking/qemu-lockd.conf
DISTCLEANFILES += locking/qemu-lockd.conf
1977
endif WITH_QEMU
1978 1979 1980 1981 1982 1983

locking/%-lockd.conf: $(srcdir)/locking/lockd.conf
	$(AM_V_GEN)$(MKDIR_P) locking ; \
	cp $< $@


1984 1985
sbin_PROGRAMS = virtlockd

1986 1987 1988
virtlockd_SOURCES = \
		$(LOCK_DAEMON_SOURCES) \
		$(LOCK_PROTOCOL_GENERATED) \
1989
		$(LOCK_DAEMON_GENERATED) \
1990
		$(NULL)
1991 1992
virtlockd_CFLAGS = \
		$(AM_CFLAGS) \
D
Daniel P. Berrange 已提交
1993
		$(PIE_CFLAGS) \
1994
		$(XDR_CFLAGS) \
1995 1996 1997
		$(NULL)
virtlockd_LDFLAGS = \
		$(AM_LDFLAGS) \
D
Daniel P. Berrange 已提交
1998
		$(PIE_LDFLAGS) \
1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010
		$(CYGWIN_EXTRA_LDFLAGS) \
		$(MINGW_EXTRA_LDFLAGS) \
		$(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
2011
endif WITH_DTRACE_PROBES
2012

2013
else ! WITH_LIBVIRTD
2014 2015
EXTRA_DIST += $(LOCK_DAEMON_SOURCES) \
              $(LOCK_DRIVER_LOCKD_SOURCES)
2016
endif ! WITH_LIBVIRTD
2017

J
Jiri Denemark 已提交
2018 2019 2020 2021
EXTRA_DIST += locking/virtlockd.sysconf \
	locking/lockd.conf \
	locking/libvirt_lockd.aug \
	locking/test_libvirt_lockd.aug.in
2022 2023

install-sysconfig:
E
Eric Blake 已提交
2024
	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
2025 2026 2027 2028 2029
	$(INSTALL_DATA) $(srcdir)/locking/virtlockd.sysconf \
	  $(DESTDIR)$(sysconfdir)/sysconfig/virtlockd

uninstall-sysconfig:
	rm -f $(DESTDIR)$(sysconfdir)/sysconfig/virtlockd
E
Eric Blake 已提交
2030
	rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
2031 2032 2033 2034 2035 2036

EXTRA_DIST += locking/virtlockd.init.in

if WITH_LIBVIRTD
if LIBVIRT_INIT_SCRIPT_RED_HAT
install-init:: virtlockd.init install-sysconfig
E
Eric Blake 已提交
2037
	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d
2038 2039 2040 2041
	$(INSTALL_SCRIPT) virtlockd.init \
	  $(DESTDIR)$(sysconfdir)/rc.d/init.d/virtlockd

uninstall-init:: uninstall-sysconfig
E
Eric Blake 已提交
2042 2043
	rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/virtlockd
	rmdir $(DESTDIR)$(sysconfdir)/rc.d/init.d || :
2044 2045

BUILT_SOURCES += virtlockd.init
E
Eric Blake 已提交
2046
DISTCLEANFILES += virtlockd.init
2047
else ! LIBVIRT_INIT_SCRIPT_RED_HAT
2048 2049
install-init::
uninstall-init::
2050 2051
endif ! LIBVIRT_INIT_SCRIPT_RED_HAT
else ! WITH_LIBVIRTD
2052 2053
install-init::
uninstall-init::
2054
endif ! WITH_LIBVIRTD
2055 2056

virtlockd.init: locking/virtlockd.init.in $(top_builddir)/config.status
2057 2058 2059 2060 2061 2062
	$(AM_V_GEN)sed						\
	    -e 's|[@]localstatedir[@]|$(localstatedir)|g'	\
	    -e 's|[@]sbindir[@]|$(sbindir)|g'			\
	    -e 's|[@]sysconfdir[@]|$(sysconfdir)|g'		\
	    < $< > $@-t &&					\
	    chmod a+x $@-t &&					\
2063 2064
	    mv $@-t $@

2065 2066
POD2MAN = pod2man -c "Virtualization Support" \
			-r "$(PACKAGE)-$(VERSION)" -s 8
2067

2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078
$(srcdir)/virtlockd.8.in: locking/virtlockd.pod.in $(top_srcdir)/configure.ac
	$(AM_V_GEN)$(POD2MAN) --name VIRTLOCKD $< $@ \
	    && if grep 'POD ERROR' $@ ; then rm $@; exit 1; fi

virtlockd.8: $(srcdir)/virtlockd.8.in
	$(AM_V_GEN)sed \
	    -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
	    -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
	    < $< > $@-t && \
	mv $@-t $@

2079
if WITH_LIBVIRTD
2080 2081
man8_MANS = virtlockd.8

2082 2083 2084 2085
conf_DATA += locking/virtlockd.conf

augeas_DATA += locking/virtlockd.aug
augeastest_DATA += test_virtlockd.aug
2086
endif WITH_LIBVIRTD
2087

2088
CLEANFILES += test_virtlockd.aug virtlockd.8
2089 2090 2091 2092 2093 2094 2095
MAINTAINERCLEANFILES += $(srcdir)/virtlockd.8.in

EXTRA_DIST += \
        locking/virtlockd.service.in \
        locking/virtlockd.socket.in \
        locking/virtlockd.pod.in \
        virtlockd.8.in \
2096 2097 2098
        locking/virtlockd.aug \
        locking/virtlockd.conf \
        locking/test_virtlockd.aug.in \
2099
        $(NULL)
2100

2101 2102 2103 2104 2105 2106 2107

if WITH_LIBVIRTD
if LIBVIRT_INIT_SCRIPT_SYSTEMD

SYSTEMD_UNIT_DIR = /lib/systemd/system

BUILT_SOURCES += virtlockd.service virtlockd.socket
E
Eric Blake 已提交
2108
DISTCLEANFILES += virtlockd.service virtlockd.socket
2109

E
Eric Blake 已提交
2110 2111
install-systemd: virtlockd.service virtlockd.socket install-sysconfig
	$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
2112
	$(INSTALL_DATA) virtlockd.service \
2113
	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/
2114
	$(INSTALL_DATA) virtlockd.socket \
2115 2116 2117
	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/

uninstall-systemd: uninstall-sysconfig
E
Eric Blake 已提交
2118 2119 2120
	rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlockd.service \
	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlockd.socket
	rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || :
2121
else ! LIBVIRT_INIT_SCRIPT_SYSTEMD
2122 2123
install-systemd:
uninstall-systemd:
2124 2125
endif ! LIBVIRT_INIT_SCRIPT_SYSTEMD
else ! WITH_LIBVIRTD
2126 2127
install-systemd:
uninstall-systemd:
2128
endif ! WITH_LIBVIRTD
2129 2130

virtlockd.service: locking/virtlockd.service.in $(top_builddir)/config.status
2131 2132 2133
	$(AM_V_GEN)sed						\
	    -e 's|[@]sbindir[@]|$(sbindir)|g'			\
	    < $< > $@-t &&					\
2134 2135 2136
	    mv $@-t $@

virtlockd.socket: locking/virtlockd.socket.in $(top_builddir)/config.status
2137 2138 2139
	$(AM_V_GEN)sed						\
	    -e 's|[@]localstatedir[@]|$(localstatedir)|g'	\
	    < $< > $@-t &&					\
2140 2141 2142
	    mv $@-t $@


2143
if WITH_SANLOCK
2144
lockdriver_LTLIBRARIES += sanlock.la
2145
sanlock_la_SOURCES = $(LOCK_DRIVER_SANLOCK_SOURCES)
2146
sanlock_la_CFLAGS = -I$(top_srcdir)/src/conf $(AM_CFLAGS)
2147
sanlock_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
2148
sanlock_la_LIBADD = -lsanlock_client \
2149 2150 2151
		../gnulib/lib/libgnu.la

augeas_DATA += locking/libvirt_sanlock.aug
2152 2153
augeastest_DATA += test_libvirt_sanlock.aug
CLEANFILES += test_libvirt_sanlock.aug
2154

E
Eric Blake 已提交
2155
locking/%-sanlock.conf: $(srcdir)/locking/sanlock.conf
2156
	$(AM_V_GEN)$(MKDIR_P) locking ; \
2157 2158 2159
	cp $< $@

if WITH_QEMU
2160
nodist_conf_DATA += locking/qemu-sanlock.conf
2161
BUILT_SOURCES += locking/qemu-sanlock.conf
E
Eric Blake 已提交
2162
DISTCLEANFILES += locking/qemu-sanlock.conf
2163 2164
endif WITH_QEMU
else ! WITH_SANLOCK
2165
EXTRA_DIST += $(LOCK_DRIVER_SANLOCK_SOURCES)
2166
endif ! WITH_SANLOCK
2167 2168
EXTRA_DIST += locking/sanlock.conf \
	locking/libvirt_sanlock.aug \
2169
	locking/test_libvirt_sanlock.aug.in
2170

2171 2172 2173 2174
noinst_LTLIBRARIES += \
	libvirt-net-rpc.la \
	libvirt-net-rpc-server.la \
	libvirt-net-rpc-client.la
2175

2176
EXTRA_DIST += \
E
Eric Blake 已提交
2177 2178 2179 2180
	dtrace2systemtap.pl \
	rpc/gendispatch.pl \
	rpc/genprotocol.pl \
	rpc/gensystemtap.pl \
J
Jiri Denemark 已提交
2181 2182
	rpc/virnetprotocol.x \
	rpc/virkeepaliveprotocol.x
2183

E
Eric Blake 已提交
2184 2185
VIR_NET_RPC_GENERATED = \
	$(srcdir)/rpc/virnetprotocol.h \
J
Jiri Denemark 已提交
2186 2187 2188
	$(srcdir)/rpc/virnetprotocol.c \
	$(srcdir)/rpc/virkeepaliveprotocol.h \
	$(srcdir)/rpc/virkeepaliveprotocol.c
2189

2190
BUILT_SOURCES += $(VIR_NET_RPC_GENERATED)
2191

2192
libvirt_net_rpc_la_SOURCES = \
2193
	rpc/virnetmessage.h rpc/virnetmessage.c \
2194
	rpc/virnetprotocol.h rpc/virnetprotocol.c \
2195
	rpc/virnetsocket.h rpc/virnetsocket.c \
2196 2197
	rpc/virkeepaliveprotocol.h rpc/virkeepaliveprotocol.c \
	rpc/virkeepalive.h rpc/virkeepalive.c
2198
if WITH_SSH2
2199 2200
libvirt_net_rpc_la_SOURCES += \
	rpc/virnetsshsession.h rpc/virnetsshsession.c
2201
else ! WITH_SSH2
2202 2203
EXTRA_DIST += \
	rpc/virnetsshsession.h rpc/virnetsshsession.c
2204
endif ! WITH_SSH2
2205
if WITH_GNUTLS
2206 2207
libvirt_net_rpc_la_SOURCES += \
	rpc/virnettlscontext.h rpc/virnettlscontext.c
2208
else ! WITH_GNUTLS
2209 2210
EXTRA_DIST += \
	rpc/virnettlscontext.h rpc/virnettlscontext.c
2211
endif ! WITH_GNUTLS
2212
if WITH_SASL
2213 2214
libvirt_net_rpc_la_SOURCES += \
	rpc/virnetsaslcontext.h rpc/virnetsaslcontext.c
2215
else ! WITH_SASL
2216 2217
EXTRA_DIST += \
	rpc/virnetsaslcontext.h rpc/virnetsaslcontext.c
2218
endif ! WITH_SASL
2219
libvirt_net_rpc_la_CFLAGS = \
2220
			$(GNUTLS_CFLAGS) \
2221
			$(SASL_CFLAGS) \
2222
			$(SSH2_CFLAGS) \
2223
			$(XDR_CFLAGS) \
2224 2225
			$(AM_CFLAGS)
libvirt_net_rpc_la_LDFLAGS = \
2226
			$(GNUTLS_LIBS) \
2227
			$(SASL_LIBS) \
2228
			$(SSH2_LIBS)\
2229 2230 2231 2232 2233 2234
			$(AM_LDFLAGS) \
			$(CYGWIN_EXTRA_LDFLAGS) \
			$(MINGW_EXTRA_LDFLAGS)
libvirt_net_rpc_la_LIBADD = \
			$(CYGWIN_EXTRA_LIBADD)

2235 2236 2237 2238
libvirt_net_rpc_server_la_SOURCES = \
	rpc/virnetserverprogram.h rpc/virnetserverprogram.c \
	rpc/virnetserverservice.h rpc/virnetserverservice.c \
	rpc/virnetserverclient.h rpc/virnetserverclient.c \
2239
	rpc/virnetservermdns.h rpc/virnetservermdns.c \
2240 2241
	rpc/virnetserver.h rpc/virnetserver.c
libvirt_net_rpc_server_la_CFLAGS = \
2242
			$(AVAHI_CFLAGS) \
2243
			$(DBUS_CFLAGS) \
E
Eric Blake 已提交
2244
			$(XDR_CFLAGS) \
J
Jim Fehlig 已提交
2245 2246
			$(AM_CFLAGS) \
			$(POLKIT_CFLAGS)
2247 2248
libvirt_net_rpc_server_la_LDFLAGS = \
			$(AM_LDFLAGS) \
2249
			$(AVAHI_LIBS) \
2250
			$(DBUS_LIBS) \
J
Jim Fehlig 已提交
2251
			$(POLKIT_LIBS) \
2252 2253 2254 2255 2256
			$(CYGWIN_EXTRA_LDFLAGS) \
			$(MINGW_EXTRA_LDFLAGS)
libvirt_net_rpc_server_la_LIBADD = \
			$(CYGWIN_EXTRA_LIBADD)

2257 2258 2259 2260 2261
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 已提交
2262 2263
			$(AM_CFLAGS) \
			$(XDR_CFLAGS)
2264 2265 2266 2267 2268 2269
libvirt_net_rpc_client_la_LDFLAGS = \
			$(AM_LDFLAGS) \
			$(CYGWIN_EXTRA_LDFLAGS) \
			$(MINGW_EXTRA_LDFLAGS)
libvirt_net_rpc_client_la_LIBADD = \
			$(CYGWIN_EXTRA_LIBADD)
2270

2271 2272
libexec_PROGRAMS =

2273
if WITH_LIBVIRTD
2274 2275
libexec_PROGRAMS += libvirt_iohelper
libvirt_iohelper_SOURCES = $(UTIL_IO_HELPER_SOURCES)
D
Daniel P. Berrange 已提交
2276 2277 2278 2279
libvirt_iohelper_LDFLAGS = \
		$(AM_LDFLAGS) \
		$(PIE_LDFLAGS) \
		$(NULL)
2280 2281 2282
libvirt_iohelper_LDADD =		\
		libvirt_util.la		\
		../gnulib/lib/libgnu.la
2283 2284
if WITH_DTRACE_PROBES
libvirt_iohelper_LDADD += libvirt_probes.lo
2285
endif WITH_DTRACE_PROBES
2286

D
Daniel P. Berrange 已提交
2287 2288 2289 2290
libvirt_iohelper_CFLAGS = \
		$(AM_CFLAGS) \
		$(PIE_CFLAGS) \
		$(NULL)
2291
endif WITH_LIBVIRTD
2292

2293
if WITH_STORAGE_DISK
R
Richard W.M. Jones 已提交
2294
if WITH_LIBVIRTD
2295
libexec_PROGRAMS += libvirt_parthelper
2296

2297
libvirt_parthelper_SOURCES = $(STORAGE_HELPER_DISK_SOURCES)
D
Daniel P. Berrange 已提交
2298 2299 2300 2301
libvirt_parthelper_LDFLAGS = \
		$(AM_LDFLAGS) \
		$(PIE_LDFLAGS) \
		$(NULL)
2302 2303 2304 2305
libvirt_parthelper_LDADD =		\
		$(LIBPARTED_LIBS)	\
		libvirt_util.la		\
		../gnulib/lib/libgnu.la
2306 2307
if WITH_DTRACE_PROBES
libvirt_parthelper_LDADD += libvirt_probes.lo
2308
endif WITH_DTRACE_PROBES
2309

D
Daniel P. Berrange 已提交
2310 2311 2312 2313 2314
libvirt_parthelper_CFLAGS = \
		$(LIBPARTED_CFLAGS) \
		$(AM_CFLAGS) \
		$(PIE_CFLAGS) \
		$(NULL)
2315 2316
endif WITH_LIBVIRTD
endif WITH_STORAGE_DISK
2317 2318
EXTRA_DIST += $(STORAGE_HELPER_DISK_SOURCES)

2319

2320
if WITH_SANLOCK
2321 2322 2323
libexec_PROGRAMS += libvirt_sanlock_helper

libvirt_sanlock_helper_SOURCES = $(LOCK_DRIVER_SANLOCK_HELPER_SOURCES)
D
Daniel P. Berrange 已提交
2324 2325 2326 2327 2328 2329 2330 2331 2332
libvirt_sanlock_helper_CFLAGS = \
		-I$(top_srcdir)/src/conf \
		$(AM_CFLAGS) \
		$(PIE_CFLAGS) \
		$(NULL)
libvirt_sanlock_helper_LDFLAGS = \
		$(AM_LDFLAGS) \
		$(PIE_LDFLAGS) \
		$(NULL)
2333
libvirt_sanlock_helper_LDADD = libvirt.la
2334
endif WITH_SANLOCK
2335

2336 2337 2338 2339 2340 2341
if WITH_LXC
if WITH_LIBVIRTD
libexec_PROGRAMS += libvirt_lxc

libvirt_lxc_SOURCES =						\
		$(LXC_CONTROLLER_SOURCES)			\
O
Osier Yang 已提交
2342 2343
		$(NODE_INFO_SOURCES)				\
		$(DATATYPES_SOURCES)
D
Daniel P. Berrange 已提交
2344 2345 2346 2347
libvirt_lxc_LDFLAGS = \
		$(AM_LDFLAGS) \
		$(PIE_LDFLAGS) \
		$(NULL)
2348
libvirt_lxc_LDADD =			\
G
Gao feng 已提交
2349
		$(FUSE_LIBS) \
2350 2351
		libvirt-net-rpc-server.la \
		libvirt-net-rpc.la \
2352
		libvirt_security_manager.la \
2353 2354
		libvirt_conf.la \
		libvirt_util.la \
2355
		../gnulib/lib/libgnu.la
2356
if WITH_DTRACE_PROBES
2357
libvirt_lxc_LDADD += libvirt_probes.lo
2358
endif WITH_DTRACE_PROBES
2359
libvirt_lxc_LDADD += $(SECDRIVER_LIBS)
2360
libvirt_lxc_CFLAGS =				\
2361
		-I$(top_srcdir)/src/conf	\
2362
		$(AM_CFLAGS)                    \
D
Daniel P. Berrange 已提交
2363
		$(PIE_CFLAGS)			\
G
Gao feng 已提交
2364
		$(LIBNL_CFLAGS)			\
D
Daniel P. Berrange 已提交
2365 2366
		$(FUSE_CFLAGS)			\
		$(NULL)
2367
if WITH_BLKID
2368 2369
libvirt_lxc_CFLAGS += $(BLKID_CFLAGS)
libvirt_lxc_LDADD += $(BLKID_LIBS)
2370
endif WITH_BLKID
2371 2372
if WITH_SECDRIVER_SELINUX
libvirt_lxc_CFLAGS += $(SELINUX_CFLAGS)
2373
endif WITH_SECDRIVER_SELINUX
J
Jiri Denemark 已提交
2374 2375
if WITH_SECDRIVER_APPARMOR
libvirt_lxc_CFLAGS += $(APPARMOR_CFLAGS)
2376 2377 2378
endif WITH_SECDRIVER_APPARMOR
endif WITH_LIBVIRTD
endif WITH_LXC
2379 2380
EXTRA_DIST += $(LXC_CONTROLLER_SOURCES)

J
Jamie Strandboge 已提交
2381 2382 2383 2384 2385 2386
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 已提交
2387 2388 2389 2390
virt_aa_helper_LDFLAGS = \
		$(AM_LDFLAGS) \
		$(PIE_LDFLAGS) \
		$(NULL)
J
Jamie Strandboge 已提交
2391
virt_aa_helper_LDADD =						\
C
Chris Lalancette 已提交
2392 2393 2394
		libvirt_conf.la					\
		libvirt_util.la					\
		../gnulib/lib/libgnu.la
2395
if WITH_DTRACE_PROBES
2396
virt_aa_helper_LDADD += libvirt_probes.lo
2397
endif WITH_DTRACE_PROBES
J
Jamie Strandboge 已提交
2398
virt_aa_helper_CFLAGS =						\
2399 2400
		-I$(top_srcdir)/src/conf			\
		-I$(top_srcdir)/src/security			\
D
Daniel P. Berrange 已提交
2401 2402 2403
		$(AM_CFLAGS) \
		$(PIE_CFLAGS) \
		$(NULL)
2404 2405
endif WITH_LIBVIRTD
endif WITH_SECDRIVER_APPARMOR
J
Jamie Strandboge 已提交
2406 2407
EXTRA_DIST += $(SECURITY_DRIVER_APPARMOR_HELPER_SOURCES)

2408
install-data-local: install-init install-systemd
2409 2410
if WITH_LIBVIRTD
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd"
2411
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd/files"
2412
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/lockd"
2413
endif WITH_LIBVIRTD
2414 2415
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/cache/libvirt"
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/images"
2416
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/filesystems"
2417
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/boot"
2418
if WITH_SANLOCK
2419
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/sanlock"
2420
endif WITH_SANLOCK
2421 2422
if WITH_QEMU
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/qemu"
2423
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/qemu/channel/target"
2424
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/qemu"
2425
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/cache/libvirt/qemu"
2426
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/log/libvirt/qemu"
2427
endif WITH_QEMU
2428 2429 2430
if WITH_LXC
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/lxc"
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/lxc"
2431
endif WITH_LXC
J
Jim Fehlig 已提交
2432 2433 2434
if WITH_LIBXL
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/libxl"
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/libxl"
J
Jim Fehlig 已提交
2435
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/log/libvirt/libxl"
2436
endif WITH_LIBXL
2437 2438 2439
if WITH_UML
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/uml"
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/uml"
2440
endif WITH_UML
2441 2442
if WITH_XEN
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/xen"
2443
endif WITH_XEN
2444 2445
if WITH_NETWORK
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/network"
2446
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/dnsmasq"
2447
	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/network"
2448
	$(MKDIR_P) "$(DESTDIR)$(confdir)/qemu/networks/autostart"
2449
	$(INSTALL_DATA) $(srcdir)/network/default.xml \
2450
	  $(DESTDIR)$(confdir)/qemu/networks/default.xml
2451
	test -z "$(UUID)" || \
E
Eric Blake 已提交
2452
	  { sed -e "s,</name>,</name>\n  <uuid>$(UUID)</uuid>," \
2453 2454 2455 2456 2457 2458
	      $(DESTDIR)$(confdir)/qemu/networks/default.xml > \
	      $(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; }
	test -e $(DESTDIR)$(confdir)/qemu/networks/autostart/default.xml || \
E
Eric Blake 已提交
2459
	   ln -s ../default.xml \
2460
	    $(DESTDIR)$(confdir)/qemu/networks/autostart/default.xml
2461
endif WITH_NETWORK
2462

2463
uninstall-local:: uninstall-init uninstall-systemd
2464
if WITH_LIBVIRTD
2465
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd/files" ||:
2466 2467
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/lockd" ||:
	rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/lockd" ||:
2468
endif WITH_LIBVIRTD
2469 2470
	rmdir "$(DESTDIR)$(localstatedir)/cache/libvirt" ||:
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/images" ||:
2471
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/filesystems" ||:
2472
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/boot" ||:
2473
if WITH_SANLOCK
2474
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/sanlock" ||:
2475
endif WITH_SANLOCK
2476 2477 2478 2479 2480
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" ||:
2481
endif WITH_QEMU
2482 2483 2484
if WITH_LXC
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/lxc" ||:
	rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/lxc" ||:
2485
endif WITH_LXC
J
Jim Fehlig 已提交
2486 2487 2488
if WITH_LIBXL
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/libxl" ||:
	rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/libxl" ||:
J
Jim Fehlig 已提交
2489
	rmdir "$(DESTDIR)$(localstatedir)/log/libvirt/libxl" ||:
2490
endif WITH_LIBXL
2491 2492 2493
if WITH_UML
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/uml" ||:
	rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/uml" ||:
2494
endif WITH_UML
2495 2496
if WITH_XEN
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/xen" ||:
2497
endif WITH_XEN
2498
if WITH_NETWORK
2499 2500 2501 2502
	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" || :
2503 2504
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/network" ||:
	rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/network" ||:
2505
endif WITH_NETWORK
2506
	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt" ||:
R
Richard W.M. Jones 已提交
2507

2508 2509
CLEANFILES += *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.i *.s
DISTCLEANFILES += $(GENERATED_SYM_FILES)
2510
MAINTAINERCLEANFILES += $(REMOTE_DRIVER_GENERATED) $(VIR_NET_RPC_GENERATED)