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

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

21 22 23 24 25
confdir = $(sysconfdir)/libvirt/
conf_DATA = qemu.conf


EXTRA_DIST = libvirt_sym.version $(conf_DATA)
26

27
lib_LTLIBRARIES = libvirt.la
28 29

CLIENT_SOURCES =						\
30
		libvirt.c internal.h				\
31
		gnutls_1_0_compat.h				\
32
		hash.c hash.h					\
33
		test.c test.h                                   \
34
                buf.c buf.h					\
35
		xml.c xml.h					\
36
		event.c event.h					\
37
		xen_unified.c xen_unified.h			\
38
		xen_internal.c xen_internal.h			\
39
		xs_internal.c xs_internal.h			\
40
		xend_internal.c xend_internal.h			\
41
		stats_linux.c stats_linux.h			\
42
		sexpr.c sexpr.h					\
43
		virterror.c					\
44
		driver.h					\
D
Daniel Veillard 已提交
45
		proxy_internal.c proxy_internal.h		\
46
		conf.c conf.h                                   \
D
Daniel P. Berrange 已提交
47
		xm_internal.c xm_internal.h                     \
48 49 50 51 52
		remote_internal.c remote_internal.h		\
		bridge.c bridge.h 				\
		iptables.c iptables.h 				\
		uuid.c uuid.h 					\
		qemu_driver.c qemu_driver.h 			\
53 54
		qemu_conf.c qemu_conf.h				\
		openvz_conf.c openvz_conf.h			\
55
		openvz_driver.c openvz_driver.h 		\
56
                nodeinfo.h nodeinfo.c                           \
57
		util.c util.h
58

59 60 61 62
SERVER_SOURCES = 						\
		../qemud/remote_protocol.c ../qemud/remote_protocol.h

libvirt_la_SOURCES = $(CLIENT_SOURCES) $(SERVER_SOURCES)
63
libvirt_la_LIBADD = $(LIBXML_LIBS) $(GNUTLS_LIBS) $(SASL_LIBS) \
64 65 66 67 68 69
		    @CYGWIN_EXTRA_LIBADD@
libvirt_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libvirt_sym.version \
                     -version-info @LIBVIRT_VERSION_INFO@ \
                    $(COVERAGE_CFLAGS:-f%=-Wc,-f%) \
		    @CYGWIN_EXTRA_LDFLAGS@
libvirt_la_CFLAGS = $(COVERAGE_CFLAGS)
70

K
Karel Zak 已提交
71
bin_PROGRAMS = virsh
72

73
virsh_SOURCES = virsh.c console.c console.h
74
virsh_LDFLAGS = $(WARN_CFLAGS) $(COVERAGE_LDFLAGS)
75
virsh_DEPENDENCIES = $(DEPS)
K
Karel Zak 已提交
76
virsh_LDADD = $(LDADDS) $(VIRSH_LIBS)
77
virsh_CFLAGS = $(COVERAGE_CFLAGS)
78

79 80 81 82
#
# target to ease building test programs
#
tst: tst.c
83
	$(CC) $(CFLAGS) $(INCLUDES) -I../include -o tst tst.c .libs/libvirt.a $(LIBXML_LIBS) $(VIRSH_LIBS) $(GNUTLS_LIBS) $(LIBS)
84

85
COVERAGE_FILES = $(CLIENT_SOURCES:%.c=libvirt_la-%.cov)
86 87 88 89 90 91 92 93 94 95

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