2006-02-09 20:45:11 +03:00
# Makefile for libvirt python library
2005-12-19 19:34:11 +03:00
2006-02-15 16:21:17 +03:00
SUBDIRS = . tests
2006-02-14 17:30:42 +03:00
2005-12-19 19:34:11 +03:00
INCLUDES = \
-I$( PYTHON_INCLUDES) \
-I$( top_srcdir) /include \
-I$( top_builddir) /include \
-I$( top_builddir) /$( subdir)
2006-02-15 16:21:17 +03:00
DOCS_DIR = $( datadir) /doc/libvirt-python-$( LIBVIRT_VERSION)
2005-12-19 19:34:11 +03:00
DOCS = ${ srcdir } /TODO
EXTRA_DIST = \
libvir.c \
types.c \
generator.py \
2006-02-09 20:45:11 +03:00
libvirt_wrap.h \
libvirt.py \
libvirt-python-api.xml \
2005-12-19 19:34:11 +03:00
$( DOCS)
2006-02-09 20:45:11 +03:00
libvirtmod_la_LDFLAGS = -module -avoid-version -L$( top_builddir) /src/.libs
2005-12-19 19:34:11 +03:00
i f W I T H _ P Y T H O N
2006-02-09 20:45:11 +03:00
mylibs = $( top_builddir) /src/libvirt.la
2005-12-19 19:34:11 +03:00
2006-02-09 20:45:11 +03:00
all-local : libvirt .py
2005-12-19 19:34:11 +03:00
2006-02-09 20:45:11 +03:00
python_LTLIBRARIES = libvirtmod.la
2005-12-19 19:34:11 +03:00
2006-02-09 20:45:11 +03:00
libvirtmod_la_SOURCES = libvir.c types.c libvirt-py.c libvirt-py.h
libvirtmod_la_LIBADD = $( mylibs)
2005-12-19 19:34:11 +03:00
install-data-local :
$( mkinstalldirs) $( DESTDIR) $( pythondir)
2006-02-09 20:45:11 +03:00
@INSTALL@ -m 0644 libvirt.py $( DESTDIR) $( pythondir)
2005-12-19 19:34:11 +03:00
$( mkinstalldirs) $( DESTDIR) $( DOCS_DIR)
@( for doc in $( DOCS) ; \
do @INSTALL@ -m 0644 $$ doc $( DESTDIR) $( DOCS_DIR) ; done )
GENERATE = generator.py
2006-02-09 20:45:11 +03:00
API_DESC = $( top_srcdir) /docs/libvirt-api.xml $( srcdir) /libvirt-python-api.xml
GENERATED = libvirt.py \
libvirt-export.c \
libvirtclass.txt \
libvirt-py.c \
libvirt-py.h
2005-12-19 19:34:11 +03:00
2006-02-09 20:45:11 +03:00
CLEANFILES = $( GENERATED) gen_prog libvirt.py
2005-12-19 19:34:11 +03:00
$(GENERATED) : gen_prog
gen_prog : $( srcdir ) /$( GENERATE ) $( API_DESC )
$( PYTHON) $( srcdir) /$( GENERATE) $( srcdir)
touch gen_prog
2006-02-09 20:45:11 +03:00
$(libvirtmod_la_OBJECTS) : $( GENERATED )
2005-12-19 19:34:11 +03:00
e l s e
all :
e n d i f
2006-02-14 17:30:42 +03:00
dummy :
tests test : all dummy
-@( cd tests && $( MAKE) MAKEFLAGS += --silent tests)