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

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

11
EXTRA_DIST = libvirt_sym.version
12

13
lib_LTLIBRARIES = libvirt.la
14
libvirt_la_LIBADD = @LIBXML_LIBS@
15
libvirt_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libvirt_sym.version \
16 17 18
                    -version-info @LIBVIRT_VERSION_INFO@ \
                    $(COVERAGE_CFLAGS:-f%=-Wc,-f%)
libvirt_la_CFLAGS = $(COVERAGE_CFLAGS)
19 20
libvirt_la_SOURCES =						\
		libvirt.c internal.h				\
21
		hash.c hash.h					\
22
		test.c test.h                                   \
23
		xml.c xml.h					\
24
		xen_unified.c xen_unified.h			\
25
		xen_internal.c xen_internal.h			\
26
		xs_internal.c xs_internal.h			\
27
		xend_internal.c xend_internal.h			\
28
		sexpr.c sexpr.h					\
29
		virterror.c					\
30
		driver.h					\
D
Daniel Veillard 已提交
31
		proxy_internal.c proxy_internal.h		\
32
		conf.c conf.h                                   \
D
Daniel P. Berrange 已提交
33 34
		xm_internal.c xm_internal.h                     \
		qemu_internal.c qemu_internal.h
35

K
Karel Zak 已提交
36
bin_PROGRAMS = virsh
37

38
virsh_SOURCES = virsh.c console.c console.h
39
virsh_LDFLAGS = $(COVERAGE_LDFLAGS)
40
virsh_DEPENDENCIES = $(DEPS)
K
Karel Zak 已提交
41
virsh_LDADD = $(LDADDS) $(VIRSH_LIBS)
42
virsh_CFLAGS = $(COVERAGE_CFLAGS)
43

44 45 46 47 48
#
# target to ease building test programs
#
tst: tst.c
	$(CC) $(CFLAGS) -I../include -o tst tst.c .libs/libvirt.a -lxml2 -lxenstore -lpthread
49 50 51 52 53 54 55 56 57 58 59 60

COVERAGE_FILES = $(libvirt_la_SOURCES:%.c=libvirt_la-%.cov)

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