Makefile.am 2.6 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
EXTRA_DIST = libvirt_sym.version
21

22
lib_LTLIBRARIES = libvirt.la
23
libvirt_la_LIBADD = $(LIBXML_LIBS) $(GNUTLS_LIBS)
24
libvirt_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libvirt_sym.version \
25 26 27
                    -version-info @LIBVIRT_VERSION_INFO@ \
                    $(COVERAGE_CFLAGS:-f%=-Wc,-f%)
libvirt_la_CFLAGS = $(COVERAGE_CFLAGS)
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
		sexpr.c sexpr.h					\
42
		virterror.c					\
43
		driver.h					\
D
Daniel Veillard 已提交
44
		proxy_internal.c proxy_internal.h		\
45
		conf.c conf.h                                   \
D
Daniel P. Berrange 已提交
46
		xm_internal.c xm_internal.h                     \
47 48 49 50 51
		remote_internal.c remote_internal.h		\
		bridge.c bridge.h 				\
		iptables.c iptables.h 				\
		uuid.c uuid.h 					\
		qemu_driver.c qemu_driver.h 			\
52 53
		qemu_conf.c qemu_conf.h					\
		openvz_conf.c openvz_conf.h				\
54
		openvz_driver.c openvz_driver.h 		\
55
                nodeinfo.h nodeinfo.c                           \
56
		util.c util.h
57

58 59 60 61 62 63
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 已提交
64
bin_PROGRAMS = virsh
65

66
virsh_SOURCES = virsh.c console.c console.h
67
virsh_LDFLAGS = $(WARN_CFLAGS) $(COVERAGE_LDFLAGS)
68
virsh_DEPENDENCIES = $(DEPS)
K
Karel Zak 已提交
69
virsh_LDADD = $(LDADDS) $(VIRSH_LIBS)
70
virsh_CFLAGS = $(COVERAGE_CFLAGS)
71

72 73 74 75 76
#
# target to ease building test programs
#
tst: tst.c
	$(CC) $(CFLAGS) -I../include -o tst tst.c .libs/libvirt.a -lxml2 -lxenstore -lpthread
77

78
COVERAGE_FILES = $(CLIENT_SOURCES:%.c=libvirt_la-%.cov)
79 80 81 82 83 84 85 86 87 88

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