2006-02-10 01:45:11 +08:00
|
|
|
# Makefile for libvirt python library
|
2005-12-20 00:34:11 +08:00
|
|
|
|
2006-02-15 21:21:17 +08:00
|
|
|
SUBDIRS= . tests
|
2006-02-14 22:30:42 +08:00
|
|
|
|
2005-12-20 00:34:11 +08:00
|
|
|
INCLUDES = \
|
2007-03-02 00:18:55 +08:00
|
|
|
$(WARN_CFLAGS) \
|
2005-12-20 00:34:11 +08:00
|
|
|
-I$(PYTHON_INCLUDES) \
|
|
|
|
-I$(top_srcdir)/include \
|
|
|
|
-I$(top_builddir)/include \
|
|
|
|
-I$(top_builddir)/$(subdir)
|
|
|
|
|
2006-02-15 21:21:17 +08:00
|
|
|
DOCS_DIR = $(datadir)/doc/libvirt-python-$(LIBVIRT_VERSION)
|
2005-12-20 00:34:11 +08:00
|
|
|
|
|
|
|
DOCS = ${srcdir}/TODO
|
|
|
|
|
2009-09-16 21:03:53 +08:00
|
|
|
CLASSES_EXTRA = libvirt-override-virConnect.py
|
|
|
|
|
|
|
|
EXTRA_DIST = \
|
|
|
|
generator.py \
|
|
|
|
typewrappers.c \
|
|
|
|
typewrappers.h \
|
|
|
|
libvirt-override.c \
|
|
|
|
libvirt-override.py \
|
|
|
|
libvirt-override-api.xml \
|
2008-10-31 18:13:45 +08:00
|
|
|
$(CLASSES_EXTRA) \
|
2005-12-20 00:34:11 +08:00
|
|
|
$(DOCS)
|
|
|
|
|
|
|
|
if WITH_PYTHON
|
2006-02-10 01:45:11 +08:00
|
|
|
mylibs = $(top_builddir)/src/libvirt.la
|
2005-12-20 00:34:11 +08:00
|
|
|
|
2006-02-10 01:45:11 +08:00
|
|
|
all-local: libvirt.py
|
2005-12-20 00:34:11 +08:00
|
|
|
|
2006-02-10 01:45:11 +08:00
|
|
|
python_LTLIBRARIES = libvirtmod.la
|
2005-12-20 00:34:11 +08:00
|
|
|
|
2009-09-16 21:03:53 +08:00
|
|
|
libvirtmod_la_SOURCES = libvirt-override.c typewrappers.c libvirt.c libvirt.h
|
2008-12-18 20:20:00 +08:00
|
|
|
# Python <= 2.4 header files contain a redundant decl, hence we
|
|
|
|
# need extra flags here
|
|
|
|
libvirtmod_la_CFLAGS = @WARN_PYTHON_CFLAGS@
|
2005-12-20 00:34:11 +08:00
|
|
|
|
2007-11-30 01:44:01 +08: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-20 00:34:11 +08:00
|
|
|
GENERATE = generator.py
|
2009-09-16 21:03:53 +08:00
|
|
|
API_DESC = $(top_srcdir)/docs/libvirt-api.xml $(srcdir)/libvirt-override-api.xml
|
2007-06-26 21:47:04 +08:00
|
|
|
GENERATED= libvirt-export.c \
|
2009-09-16 21:03:53 +08:00
|
|
|
libvirt.c \
|
|
|
|
libvirt.h \
|
|
|
|
libvirt.py
|
2005-12-20 00:34:11 +08:00
|
|
|
|
2009-02-26 21:58:35 +08:00
|
|
|
generated.stamp: $(srcdir)/$(GENERATE) $(API_DESC)
|
2005-12-20 00:34:11 +08:00
|
|
|
$(PYTHON) $(srcdir)/$(GENERATE) $(srcdir)
|
2009-02-26 21:58:35 +08:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(GENERATED): generated.stamp
|
2007-06-26 21:47:04 +08:00
|
|
|
|
2006-02-10 01:45:11 +08:00
|
|
|
$(libvirtmod_la_OBJECTS): $(GENERATED)
|
2005-12-20 00:34:11 +08:00
|
|
|
|
2007-06-26 21:47:04 +08: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 21:04:28 +08:00
|
|
|
uninstall-local:
|
|
|
|
rm -f $(DESTDIR)$(pythondir)/libvirt.py
|
|
|
|
|
2009-09-16 21:03:53 +08:00
|
|
|
CLEANFILES= $(GENERATED) generated.stamp
|
2007-06-26 21:47:04 +08:00
|
|
|
|
2005-12-20 00:34:11 +08:00
|
|
|
else
|
2008-02-06 03:27:37 +08:00
|
|
|
all:
|
2005-12-20 00:34:11 +08:00
|
|
|
endif
|
2006-02-14 22:30:42 +08:00
|
|
|
|
|
|
|
dummy:
|
|
|
|
|
|
|
|
tests test: all dummy
|
|
|
|
-@(cd tests && $(MAKE) MAKEFLAGS+=--silent tests)
|