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

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

19
EXTRA_DIST = libvirt_sym.version
20

21
lib_LTLIBRARIES = libvirt.la
22
libvirt_la_LIBADD = @LIBXML_LIBS@
23
libvirt_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libvirt_sym.version \
24 25 26
                    -version-info @LIBVIRT_VERSION_INFO@ \
                    $(COVERAGE_CFLAGS:-f%=-Wc,-f%)
libvirt_la_CFLAGS = $(COVERAGE_CFLAGS)
27 28

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

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

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

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

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

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