1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
## Process this file with automake to produce Makefile.in
INCLUDES = \
-I$(top_srcdir)/gnulib/lib -I../gnulib/lib \
-I../include \
-I@top_srcdir@/include \
-I@top_srcdir@/qemud \
$(LIBXML_CFLAGS) \
$(GNUTLS_CFLAGS) \
$(SASL_CFLAGS) \
$(SELINUX_CFLAGS) \
-DBINDIR=\""$(libexecdir)"\" \
-DSBINDIR=\""$(sbindir)"\" \
-DSYSCONF_DIR="\"$(sysconfdir)\"" \
-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
-DLOCAL_STATE_DIR=\""$(localstatedir)"\" \
-DGETTEXT_PACKAGE=\"$(PACKAGE)\" \
$(WARN_CFLAGS) \
$(LIBVIRT_FEATURES)
DEPS = libvirt.la
LDADDS = @STATIC_BINARIES@ $(WARN_CFLAGS) libvirt.la ../gnulib/lib/libgnu.la
VIRSH_LIBS = @VIRSH_LIBS@
confdir = $(sysconfdir)/libvirt/
conf_DATA = qemu.conf
EXTRA_DIST = libvirt_sym.version $(conf_DATA)
lib_LTLIBRARIES = libvirt.la
CLIENT_SOURCES = \
libvirt.c internal.h \
gnutls_1_0_compat.h \
socketcompat.h \
memory.c memory.h \
hash.c hash.h \
test.c test.h \
buf.c buf.h \
qparams.c qparams.h \
capabilities.c capabilities.h \
xml.c xml.h \
event.c event.h \
xen_unified.c xen_unified.h \
xen_internal.c xen_internal.h \
xs_internal.c xs_internal.h \
xend_internal.c xend_internal.h \
stats_linux.c stats_linux.h \
sexpr.c sexpr.h \
virterror.c \
driver.h \
proxy_internal.c proxy_internal.h \
conf.c conf.h \
xm_internal.c xm_internal.h \
remote_internal.c remote_internal.h \
bridge.c bridge.h \
iptables.c iptables.h \
uuid.c uuid.h \
qemu_driver.c qemu_driver.h \
qemu_conf.c qemu_conf.h \
openvz_conf.c openvz_conf.h \
openvz_driver.c openvz_driver.h \
lxc_driver.c lxc_driver.h \
lxc_conf.c lxc_conf.h \
lxc_container.c lxc_container.h \
nodeinfo.h nodeinfo.c \
util.c util.h
SERVER_SOURCES = \
../qemud/remote_protocol.c ../qemud/remote_protocol.h
if WITH_LIBVIRTD
CLIENT_SOURCES += \
storage_conf.h storage_conf.c \
storage_driver.h storage_driver.c \
storage_backend.h storage_backend.c \
storage_backend_fs.h storage_backend_fs.c
if WITH_STORAGE_LVM
CLIENT_SOURCES += storage_backend_logical.h storage_backend_logical.c
else
EXTRA_DIST += storage_backend_logical.h storage_backend_logical.c
endif
if WITH_STORAGE_ISCSI
CLIENT_SOURCES += storage_backend_iscsi.h storage_backend_iscsi.c
else
EXTRA_DIST += storage_backend_iscsi.h storage_backend_iscsi.c
endif
if WITH_STORAGE_DISK
CLIENT_SOURCES += storage_backend_disk.h storage_backend_disk.c
else
EXTRA_DIST += storage_backend_disk.h storage_backend_disk.c
endif
endif
libvirt_la_SOURCES = $(CLIENT_SOURCES) $(SERVER_SOURCES)
libvirt_la_LIBADD = $(LIBXML_LIBS) $(GNUTLS_LIBS) $(SASL_LIBS) $(SELINUX_LIBS) \
@CYGWIN_EXTRA_LIBADD@ ../gnulib/lib/libgnu.la
libvirt_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libvirt_sym.version \
-version-info @LIBVIRT_VERSION_INFO@ \
$(COVERAGE_CFLAGS:-f%=-Wc,-f%) \
@CYGWIN_EXTRA_LDFLAGS@ @MINGW_EXTRA_LDFLAGS@
libvirt_la_CFLAGS = $(COVERAGE_CFLAGS) -DIN_LIBVIRT
# Create an automake "convenience library" version of libvirt_la,
# just for testing, since the test harness requires access to internal
# bits and pieces that we don't want to make publicly accessible.
noinst_LTLIBRARIES = libvirt_test.la
# Convert libvirt_sym.version
# to libvirt_test_sym.version, and
# remove -version-info X.Y.Z (not needed since this is a convenience library.
test_LDFLAGS = \
$$(echo '$(libvirt_la_LDFLAGS)' \
|sed 's!-Wl,--v.*_sym\.version!!' \
|sed 's!-version-info @LIBVIRT_VERSION_INFO@!!')
# Just like the above, but with a slightly different set of public symbols.
libvirt_test_la_SOURCES = $(libvirt_la_SOURCES)
libvirt_test_la_LIBADD = $(libvirt_la_LIBADD)
libvirt_test_la_LDFLAGS = $(test_LDFLAGS)
libvirt_test_la_CFLAGS = $(COVERAGE_CFLAGS)
bin_PROGRAMS = virsh
virsh_SOURCES = virsh.c console.c console.h util-lib.c util-lib.h
virsh_LDFLAGS = $(WARN_CFLAGS) $(COVERAGE_LDFLAGS)
virsh_DEPENDENCIES = $(DEPS)
virsh_LDADD = $(LDADDS) $(VIRSH_LIBS)
virsh_CFLAGS = $(COVERAGE_CFLAGS) $(READLINE_CFLAGS)
if WITH_STORAGE_DISK
if WITH_LIBVIRTD
libexec_PROGRAMS = libvirt_parthelper
libvirt_parthelper_SOURCES = parthelper.c
libvirt_parthelper_LDFLAGS = $(WARN_CFLAGS) $(COVERAGE_LDCFLAGS)
libvirt_parthelper_LDADD = $(LIBPARTED_LIBS)
libvirt_parthelper_CFLAGS = $(LIBPARTED_CFLAGS)
endif
else
EXTRA_DIST += parthelper.c
endif
cov: clean-cov
for i in $(CLIENT_SOURCES); do \
case $$i in *.c) ;; *) continue;; esac; \
b=$$(basename $$i .c); \
o_files=; \
for i in '' _test; do \
g="$(LV_LIBTOOL_OBJDIR)/libvirt$${i}_la-$$b.gcda"; \
o="$(LV_LIBTOOL_OBJDIR)/libvirt$${i}_la-$$b.o"; \
test -f "$$o" -a -f "$$g" \
&& o_files="$$o_files $$o"; \
done; \
test -n "$$o_files" \
&& gcov -o $(LV_LIBTOOL_OBJDIR) -b -f $$o_files > $$b.cov; \
done
clean-cov:
rm -f *.cov *.gcov
CLEANFILES = *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda