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

3 4 5
INCLUDES = \
	   -I$(top_srcdir)/gnulib/lib -I../gnulib/lib \
	   -I../include \
6 7
	   -I@top_srcdir@/include \
	   -I@top_srcdir@/qemud \
8 9
	   $(LIBXML_CFLAGS) \
	   $(GNUTLS_CFLAGS) \
10
	   $(SASL_CFLAGS) \
11
	   $(SELINUX_CFLAGS) \
12
	   $(NUMACTL_CFLAGS) \
13 14 15 16
	   -DBINDIR=\""$(libexecdir)"\" \
	   -DSBINDIR=\""$(sbindir)"\" \
	   -DSYSCONF_DIR="\"$(sysconfdir)\"" \
	   -DLOCALEBASEDIR=\""$(datadir)/locale"\" \
D
Daniel P. Berrange 已提交
17
           -DLOCAL_STATE_DIR=\""$(localstatedir)"\" \
18 19 20
           -DGETTEXT_PACKAGE=\"$(PACKAGE)\" \
	   $(WARN_CFLAGS) \
	   $(LIBVIRT_FEATURES)
21
DEPS = libvirt.la
22
LDADDS = @STATIC_BINARIES@ $(WARN_CFLAGS) libvirt.la ../gnulib/lib/libgnu.la
K
Karel Zak 已提交
23
VIRSH_LIBS = @VIRSH_LIBS@
D
Daniel Veillard 已提交
24

25 26 27 28 29
confdir = $(sysconfdir)/libvirt/
conf_DATA = qemu.conf


EXTRA_DIST = libvirt_sym.version $(conf_DATA)
30

31
lib_LTLIBRARIES = libvirt.la
32 33

CLIENT_SOURCES =						\
34
		libvirt.c internal.h				\
35
		gnutls_1_0_compat.h				\
36
		socketcompat.h					\
37
                memory.c memory.h				\
38
		hash.c hash.h					\
39
		test.c test.h                                   \
40
                buf.c buf.h					\
41
		qparams.c qparams.h				\
42
                capabilities.c capabilities.h			\
43
		xml.c xml.h					\
44
		event.c event.h					\
45
		xen_unified.c xen_unified.h			\
46
		xen_internal.c xen_internal.h			\
47
		xs_internal.c xs_internal.h			\
48
		xend_internal.c xend_internal.h			\
49
		stats_linux.c stats_linux.h			\
50
		sexpr.c sexpr.h					\
51
		virterror.c					\
52
		driver.h					\
D
Daniel Veillard 已提交
53
		proxy_internal.c proxy_internal.h		\
54
		conf.c conf.h                                   \
D
Daniel P. Berrange 已提交
55
		xm_internal.c xm_internal.h                     \
56
		remote_internal.c remote_internal.h		\
57 58 59 60
		bridge.c bridge.h				\
		iptables.c iptables.h				\
		uuid.c uuid.h					\
		qemu_driver.c qemu_driver.h			\
61 62
		qemu_conf.c qemu_conf.h				\
		openvz_conf.c openvz_conf.h			\
63
		openvz_driver.c openvz_driver.h			\
D
Daniel Veillard 已提交
64 65
		lxc_driver.c lxc_driver.h			\
		lxc_conf.c lxc_conf.h				\
R
Richard W.M. Jones 已提交
66
		lxc_container.c lxc_container.h			\
67
		veth.c veth.h			\
68
                nodeinfo.h nodeinfo.c                           \
69
		util.c util.h
70

71
SERVER_SOURCES =						\
72 73
		../qemud/remote_protocol.c ../qemud/remote_protocol.h

R
Richard W.M. Jones 已提交
74 75 76 77 78 79 80 81
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

82 83 84 85 86 87
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

88 89 90 91 92 93
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

94 95 96 97 98 99
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

R
Richard W.M. Jones 已提交
100
endif
101 102


103
libvirt_la_SOURCES = $(CLIENT_SOURCES) $(SERVER_SOURCES)
104
libvirt_la_LIBADD = $(LIBXML_LIBS) $(GNUTLS_LIBS) $(SASL_LIBS) $(SELINUX_LIBS) \
105
                    $(NUMACTL_LIBS) \
106
		    @CYGWIN_EXTRA_LIBADD@ ../gnulib/lib/libgnu.la
107 108 109
libvirt_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libvirt_sym.version \
                     -version-info @LIBVIRT_VERSION_INFO@ \
                    $(COVERAGE_CFLAGS:-f%=-Wc,-f%) \
110
		    @CYGWIN_EXTRA_LDFLAGS@ @MINGW_EXTRA_LDFLAGS@
111
libvirt_la_CFLAGS = $(COVERAGE_CFLAGS) -DIN_LIBVIRT
112

113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
# 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)

K
Karel Zak 已提交
132
bin_PROGRAMS = virsh
133

J
Jim Meyering 已提交
134
virsh_SOURCES = virsh.c console.c console.h util-lib.c util-lib.h
135
virsh_LDFLAGS = $(WARN_CFLAGS) $(COVERAGE_LDFLAGS)
136
virsh_DEPENDENCIES = $(DEPS)
K
Karel Zak 已提交
137
virsh_LDADD = $(LDADDS) $(VIRSH_LIBS)
138
virsh_CFLAGS = $(COVERAGE_CFLAGS) $(READLINE_CFLAGS)
139

140
if WITH_STORAGE_DISK
R
Richard W.M. Jones 已提交
141
if WITH_LIBVIRTD
142 143 144 145 146 147
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)
R
Richard W.M. Jones 已提交
148
endif
149 150 151 152
else
EXTRA_DIST += parthelper.c
endif

R
Richard W.M. Jones 已提交
153 154
# Create the /var/cache/libvirt directory when installing.
install-exec-local:
D
Daniel P. Berrange 已提交
155
	$(MKDIR_P) $(DESTDIR)$(localstatedir)/cache/libvirt
R
Richard W.M. Jones 已提交
156

157
CLEANFILES = *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda