2006-02-09 17:45:11 +00:00
|
|
|
# Makefile for libvirt python library
|
2005-12-19 16:34:11 +00:00
|
|
|
|
2006-02-15 13:21:17 +00:00
|
|
|
SUBDIRS= . tests
|
2006-02-14 14:30:42 +00:00
|
|
|
|
2005-12-19 16:34:11 +00:00
|
|
|
INCLUDES = \
|
2007-03-01 16:18:55 +00:00
|
|
|
$(WARN_CFLAGS) \
|
2005-12-19 16:34:11 +00:00
|
|
|
-I$(PYTHON_INCLUDES) \
|
|
|
|
-I$(top_srcdir)/include \
|
|
|
|
-I$(top_builddir)/include \
|
|
|
|
-I$(top_builddir)/$(subdir)
|
|
|
|
|
2006-02-15 13:21:17 +00:00
|
|
|
DOCS_DIR = $(datadir)/doc/libvirt-python-$(LIBVIRT_VERSION)
|
2005-12-19 16:34:11 +00:00
|
|
|
|
|
|
|
DOCS = ${srcdir}/TODO
|
|
|
|
|
|
|
|
EXTRA_DIST = \
|
|
|
|
libvir.c \
|
|
|
|
types.c \
|
|
|
|
generator.py \
|
2006-02-09 17:45:11 +00:00
|
|
|
libvirt_wrap.h \
|
|
|
|
libvirt.py \
|
2006-02-28 12:17:00 +00:00
|
|
|
libvir.py \
|
2006-02-09 17:45:11 +00:00
|
|
|
libvirt-python-api.xml \
|
2005-12-19 16:34:11 +00:00
|
|
|
$(DOCS)
|
|
|
|
|
|
|
|
if WITH_PYTHON
|
2006-02-09 17:45:11 +00:00
|
|
|
mylibs = $(top_builddir)/src/libvirt.la
|
2005-12-19 16:34:11 +00:00
|
|
|
|
2006-02-09 17:45:11 +00:00
|
|
|
all-local: libvirt.py
|
2005-12-19 16:34:11 +00:00
|
|
|
|
2006-02-09 17:45:11 +00:00
|
|
|
python_LTLIBRARIES = libvirtmod.la
|
2005-12-19 16:34:11 +00:00
|
|
|
|
2006-02-09 17:45:11 +00:00
|
|
|
libvirtmod_la_SOURCES = libvir.c types.c libvirt-py.c libvirt-py.h
|
2007-03-06 21:55:44 +00:00
|
|
|
# Python header files contain a redundant decl, hence:
|
|
|
|
libvirtmod_la_CFLAGS = -Wno-redundant-decls
|
2005-12-19 16:34:11 +00:00
|
|
|
|
2007-11-29 17:44:01 +00:00
|
|
|
libvirtmod_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/.libs \
|
|
|
|
@CYGWIN_EXTRA_LDFLAGS@
|
|
|
|
libvirtmod_la_LIBADD = $(mylibs) \
|
|
|
|
@CYGWIN_EXTRA_LIBADD@ @CYGWIN_EXTRA_PYTHON_LIBADD@
|
|
|
|
|
2005-12-19 16:34:11 +00:00
|
|
|
GENERATE = generator.py
|
2006-02-09 17:45:11 +00:00
|
|
|
API_DESC = $(top_srcdir)/docs/libvirt-api.xml $(srcdir)/libvirt-python-api.xml
|
2007-06-26 13:47:04 +00:00
|
|
|
GENERATED= libvirt-export.c \
|
2006-02-09 17:45:11 +00:00
|
|
|
libvirtclass.txt \
|
|
|
|
libvirt-py.c \
|
2006-02-28 14:22:33 +00:00
|
|
|
libvirt-py.h \
|
|
|
|
libvirtclass.py
|
2005-12-19 16:34:11 +00:00
|
|
|
|
2007-06-26 13:47:04 +00:00
|
|
|
$(GENERATED): $(srcdir)/$(GENERATE) $(API_DESC)
|
2005-12-19 16:34:11 +00:00
|
|
|
$(PYTHON) $(srcdir)/$(GENERATE) $(srcdir)
|
2007-06-26 13:47:04 +00:00
|
|
|
|
2008-10-01 15:31:02 +00:00
|
|
|
libvirt.py: $(srcdir)/libvir.py $(GENERATED)
|
2007-11-15 13:04:28 +00:00
|
|
|
cat $(srcdir)/libvir.py libvirtclass.py > $@-t
|
|
|
|
mv $@-t $@
|
2005-12-19 16:34:11 +00:00
|
|
|
|
2006-02-09 17:45:11 +00:00
|
|
|
$(libvirtmod_la_OBJECTS): $(GENERATED)
|
2005-12-19 16:34:11 +00:00
|
|
|
|
2007-06-26 13:47:04 +00:00
|
|
|
install-data-local:
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(pythondir)
|
|
|
|
@INSTALL@ -m 0644 libvirt.py $(DESTDIR)$(pythondir)
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(DOCS_DIR)
|
|
|
|
@(for doc in $(DOCS) ; \
|
|
|
|
do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
|
|
|
|
|
2007-11-15 13:04:28 +00:00
|
|
|
uninstall-local:
|
|
|
|
rm -f $(DESTDIR)$(pythondir)/libvirt.py
|
|
|
|
|
2007-06-26 13:47:04 +00:00
|
|
|
CLEANFILES= $(GENERATED) libvirt.py
|
|
|
|
|
2005-12-19 16:34:11 +00:00
|
|
|
else
|
2008-02-05 19:27:37 +00:00
|
|
|
all:
|
2005-12-19 16:34:11 +00:00
|
|
|
endif
|
2006-02-14 14:30:42 +00:00
|
|
|
|
|
|
|
dummy:
|
|
|
|
|
|
|
|
tests test: all dummy
|
|
|
|
-@(cd tests && $(MAKE) MAKEFLAGS+=--silent tests)
|