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

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


EXTRA_DIST = libvirt_sym.version $(conf_DATA)
28

29
lib_LTLIBRARIES = libvirt.la
30 31

CLIENT_SOURCES =						\
32
		libvirt.c internal.h				\
33
		gnutls_1_0_compat.h				\
34
		socketcompat.h					\
35
		hash.c hash.h					\
36
		test.c test.h                                   \
37
                buf.c buf.h					\
38
		qparams.c qparams.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
		stats_linux.c stats_linux.h			\
46
		sexpr.c sexpr.h					\
47
		virterror.c					\
48
		driver.h					\
D
Daniel Veillard 已提交
49
		proxy_internal.c proxy_internal.h		\
50
		conf.c conf.h                                   \
D
Daniel P. Berrange 已提交
51
		xm_internal.c xm_internal.h                     \
52 53 54 55 56
		remote_internal.c remote_internal.h		\
		bridge.c bridge.h 				\
		iptables.c iptables.h 				\
		uuid.c uuid.h 					\
		qemu_driver.c qemu_driver.h 			\
57 58
		qemu_conf.c qemu_conf.h				\
		openvz_conf.c openvz_conf.h			\
59
		openvz_driver.c openvz_driver.h 		\
60
                nodeinfo.h nodeinfo.c                           \
61 62 63
		storage_conf.h storage_conf.c			\
		storage_driver.h storage_driver.c		\
		storage_backend.h storage_backend.c		\
64
		util.c util.h
65

66 67 68 69
SERVER_SOURCES = 						\
		../qemud/remote_protocol.c ../qemud/remote_protocol.h

libvirt_la_SOURCES = $(CLIENT_SOURCES) $(SERVER_SOURCES)
70
libvirt_la_LIBADD = $(LIBXML_LIBS) $(GNUTLS_LIBS) $(SASL_LIBS) \
71
		    @CYGWIN_EXTRA_LIBADD@ ../gnulib/lib/libgnu.la
72 73 74
libvirt_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libvirt_sym.version \
                     -version-info @LIBVIRT_VERSION_INFO@ \
                    $(COVERAGE_CFLAGS:-f%=-Wc,-f%) \
75
		    @CYGWIN_EXTRA_LDFLAGS@ @MINGW_EXTRA_LDFLAGS@
76
libvirt_la_CFLAGS = $(COVERAGE_CFLAGS)
77

K
Karel Zak 已提交
78
bin_PROGRAMS = virsh
79

80
virsh_SOURCES = virsh.c console.c console.h
81
virsh_LDFLAGS = $(WARN_CFLAGS) $(COVERAGE_LDFLAGS)
82
virsh_DEPENDENCIES = $(DEPS)
K
Karel Zak 已提交
83
virsh_LDADD = $(LDADDS) $(VIRSH_LIBS)
84
virsh_CFLAGS = $(COVERAGE_CFLAGS) $(READLINE_CFLAGS)
85

86 87 88 89
#
# target to ease building test programs
#
tst: tst.c
90
	$(CC) $(CFLAGS) $(INCLUDES) -I../include -o tst tst.c .libs/libvirt.a $(LIBXML_LIBS) $(VIRSH_LIBS) $(GNUTLS_LIBS) $(LIBS)
91

92
COVERAGE_FILES = $(CLIENT_SOURCES:%.c=libvirt_la-%.cov)
93 94 95 96 97 98 99 100 101 102

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