1 # Makefile for libvirt python library
7 -I$(top_srcdir)/include \
8 -I$(top_builddir)/include \
9 -I$(top_builddir)/$(subdir)
11 DOCS_DIR = $(datadir)/doc/libvirt-python-$(LIBVIRT_VERSION)
22 libvirt-python-api.xml \
25 libvirtmod_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/.libs
28 mylibs = $(top_builddir)/src/libvirt.la
32 python_LTLIBRARIES = libvirtmod.la
34 libvirtmod_la_SOURCES = libvir.c types.c libvirt-py.c libvirt-py.h
35 libvirtmod_la_LIBADD = $(mylibs)
37 libvirt.py: $(srcdir)/libvir.py libvirtclass.py
38 cat $(srcdir)/libvir.py libvirtclass.py > libvirt.py
41 $(mkinstalldirs) $(DESTDIR)$(pythondir)
42 @INSTALL@ -m 0644 libvirt.py $(DESTDIR)$(pythondir)
43 $(mkinstalldirs) $(DESTDIR)$(DOCS_DIR)
44 @(for doc in $(DOCS) ; \
45 do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
47 GENERATE = generator.py
48 API_DESC = $(top_srcdir)/docs/libvirt-api.xml $(srcdir)/libvirt-python-api.xml
49 GENERATED= libvirt.py \
56 CLEANFILES= $(GENERATED) gen_prog libvirt.py
58 $(GENERATED): gen_prog
60 gen_prog: $(srcdir)/$(GENERATE) $(API_DESC)
61 $(PYTHON) $(srcdir)/$(GENERATE) $(srcdir)
64 $(libvirtmod_la_OBJECTS): $(GENERATED)
73 -@(cd tests && $(MAKE) MAKEFLAGS+=--silent tests)