Makefile.am 3.5 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 13 14 15
	   -DBINDIR=\""$(libexecdir)"\" \
	   -DSBINDIR=\""$(sbindir)"\" \
	   -DSYSCONF_DIR="\"$(sysconfdir)\"" \
	   -DLOCALEBASEDIR=\""$(datadir)/locale"\" \
D
Daniel P. Berrange 已提交
16
           -DLOCAL_STATE_DIR=\""$(localstatedir)"\" \
17 18 19
           -DGETTEXT_PACKAGE=\"$(PACKAGE)\" \
	   $(WARN_CFLAGS) \
	   $(LIBVIRT_FEATURES)
20
DEPS = libvirt.la
21
LDADDS = @STATIC_BINARIES@ $(WARN_CFLAGS) libvirt.la ../gnulib/lib/libgnu.la
K
Karel Zak 已提交
22
VIRSH_LIBS = @VIRSH_LIBS@
D
Daniel Veillard 已提交
23

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


EXTRA_DIST = libvirt_sym.version $(conf_DATA)
29

30
lib_LTLIBRARIES = libvirt.la
31 32

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

68 69 70
SERVER_SOURCES = 						\
		../qemud/remote_protocol.c ../qemud/remote_protocol.h

71 72 73 74 75 76
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

77 78 79 80 81 82
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

83 84


85
libvirt_la_SOURCES = $(CLIENT_SOURCES) $(SERVER_SOURCES)
86
libvirt_la_LIBADD = $(LIBXML_LIBS) $(GNUTLS_LIBS) $(SASL_LIBS) $(SELINUX_LIBS) \
87
		    @CYGWIN_EXTRA_LIBADD@ ../gnulib/lib/libgnu.la
88 89 90
libvirt_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libvirt_sym.version \
                     -version-info @LIBVIRT_VERSION_INFO@ \
                    $(COVERAGE_CFLAGS:-f%=-Wc,-f%) \
91
		    @CYGWIN_EXTRA_LDFLAGS@ @MINGW_EXTRA_LDFLAGS@
92
libvirt_la_CFLAGS = $(COVERAGE_CFLAGS)
93

K
Karel Zak 已提交
94
bin_PROGRAMS = virsh
95

96
virsh_SOURCES = virsh.c console.c console.h
97
virsh_LDFLAGS = $(WARN_CFLAGS) $(COVERAGE_LDFLAGS)
98
virsh_DEPENDENCIES = $(DEPS)
K
Karel Zak 已提交
99
virsh_LDADD = $(LDADDS) $(VIRSH_LIBS)
100
virsh_CFLAGS = $(COVERAGE_CFLAGS) $(READLINE_CFLAGS)
101

102 103 104 105
#
# target to ease building test programs
#
tst: tst.c
106
	$(CC) $(CFLAGS) $(INCLUDES) -I../include -o tst tst.c .libs/libvirt.a $(LIBXML_LIBS) $(VIRSH_LIBS) $(GNUTLS_LIBS) $(LIBS)
107

108
COVERAGE_FILES = $(CLIENT_SOURCES:%.c=libvirt_la-%.cov)
109 110 111 112 113 114 115 116 117 118

cov: clean-cov $(COVERAGE_FILES)

clean-cov:
	rm -f *.cov *.gcov

%.cov: .libs/%.o
	gcov -b -f -o .libs $< > $@

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