1 # Makefile for libvirt python library
8 -I$(top_srcdir)/include \
9 -I$(top_builddir)/include \
10 -I$(top_builddir)/$(subdir)
12 DOCS_DIR = $(datadir)/doc/libvirt-python-$(LIBVIRT_VERSION)
17 libvirt-override-virConnect.py \
18 libvirt-override-virStream.py
26 libvirt-override-api.xml \
31 mylibs = $(top_builddir)/src/libvirt.la
35 pyexec_LTLIBRARIES = libvirtmod.la
37 libvirtmod_la_SOURCES = libvirt-override.c typewrappers.c libvirt.c libvirt.h
38 # Python <= 2.4 header files contain a redundant decl, hence we
39 # need extra flags here
40 libvirtmod_la_CFLAGS = $(WARN_PYTHON_CFLAGS)
42 libvirtmod_la_LDFLAGS = -module -avoid-version -shared -L$(top_builddir)/src/.libs \
43 $(CYGWIN_EXTRA_LDFLAGS)
44 libvirtmod_la_LIBADD = $(mylibs) \
45 $(CYGWIN_EXTRA_LIBADD) $(CYGWIN_EXTRA_PYTHON_LIBADD)
47 GENERATE = generator.py
48 API_DESC = $(top_srcdir)/docs/libvirt-api.xml $(srcdir)/libvirt-override-api.xml
49 GENERATED= libvirt-export.c \
54 generated.stamp: $(srcdir)/$(GENERATE) $(API_DESC)
55 $(PYTHON) $(srcdir)/$(GENERATE) $(srcdir)
58 $(GENERATED): generated.stamp
60 $(libvirtmod_la_OBJECTS): $(GENERATED)
63 $(mkinstalldirs) $(DESTDIR)$(pyexecdir)
64 $(INSTALL) -m 0644 libvirt.py $(DESTDIR)$(pyexecdir)
65 $(mkinstalldirs) $(DESTDIR)$(DOCS_DIR)
66 @(for doc in $(DOCS) ; \
67 do $(INSTALL) -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
70 rm -f $(DESTDIR)$(pyexecdir)/libvirt.py
72 CLEANFILES= $(GENERATED) generated.stamp
81 -@(cd tests && $(MAKE) MAKEFLAGS+=--silent tests)