Makefile.am 2.2 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 16
DEPS = libvirt.la
LDADDS = @STATIC_BINARIES@ 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
		hash.c hash.h					\
31
		test.c test.h                                   \
32
		xml.c xml.h					\
33
		xen_unified.c xen_unified.h			\
34
		xen_internal.c xen_internal.h			\
35
		xs_internal.c xs_internal.h			\
36
		xend_internal.c xend_internal.h			\
37
		sexpr.c sexpr.h					\
38
		virterror.c					\
39
		driver.h					\
D
Daniel Veillard 已提交
40
		proxy_internal.c proxy_internal.h		\
41
		conf.c conf.h                                   \
D
Daniel P. Berrange 已提交
42
		xm_internal.c xm_internal.h                     \
43 44
		qemu_internal.c qemu_internal.h			\
		remote_internal.c remote_internal.h
45

46 47 48 49 50 51
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 已提交
52
bin_PROGRAMS = virsh
53

54
virsh_SOURCES = virsh.c console.c console.h
55
virsh_LDFLAGS = $(WARN_CFLAGS) $(COVERAGE_LDFLAGS)
56
virsh_DEPENDENCIES = $(DEPS)
K
Karel Zak 已提交
57
virsh_LDADD = $(LDADDS) $(VIRSH_LIBS)
58
virsh_CFLAGS = $(COVERAGE_CFLAGS)
59

60 61 62 63 64
#
# target to ease building test programs
#
tst: tst.c
	$(CC) $(CFLAGS) -I../include -o tst tst.c .libs/libvirt.a -lxml2 -lxenstore -lpthread
65

66
COVERAGE_FILES = $(CLIENT_SOURCES:%.c=libvirt_la-%.cov)
67 68 69 70 71 72 73 74 75 76

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