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

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


EXTRA_DIST = libvirt_sym.version $(conf_DATA)
25

26
lib_LTLIBRARIES = libvirt.la
27
libvirt_la_LIBADD = $(LIBXML_LIBS) $(GNUTLS_LIBS)
28
libvirt_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libvirt_sym.version \
29 30 31
                    -version-info @LIBVIRT_VERSION_INFO@ \
                    $(COVERAGE_CFLAGS:-f%=-Wc,-f%)
libvirt_la_CFLAGS = $(COVERAGE_CFLAGS)
32 33

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

62 63 64 65 66 67
SERVER_SOURCES = 						\
		../qemud/protocol.h ../qemud/protocol.c		\
		../qemud/remote_protocol.c ../qemud/remote_protocol.h

libvirt_la_SOURCES = $(CLIENT_SOURCES) $(SERVER_SOURCES)

K
Karel Zak 已提交
68
bin_PROGRAMS = virsh
69

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

76 77 78 79
#
# target to ease building test programs
#
tst: tst.c
80
	$(CC) $(CFLAGS) $(INCLUDES) -I../include -o tst tst.c .libs/libvirt.a -lxml2 -lxenstore -lpthread
81

82
COVERAGE_FILES = $(CLIENT_SOURCES:%.c=libvirt_la-%.cov)
83 84 85 86 87 88 89 90 91 92

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