2006-02-09 11:45:11 -06:00
|
|
|
# Makefile for libvirt python library
|
2005-12-19 10:34:11 -06:00
|
|
|
|
2006-02-15 07:21:17 -06:00
|
|
|
SUBDIRS= . tests
|
2006-02-14 08:30:42 -06:00
|
|
|
|
2005-12-19 10:34:11 -06:00
|
|
|
INCLUDES = \
|
2007-03-01 10:18:55 -06:00
|
|
|
$(WARN_CFLAGS) \
|
2009-12-06 09:05:33 -06:00
|
|
|
$(PYTHON_INCLUDES) \
|
2005-12-19 10:34:11 -06:00
|
|
|
-I$(top_srcdir)/include \
|
|
|
|
-I$(top_builddir)/include \
|
|
|
|
-I$(top_builddir)/$(subdir)
|
|
|
|
|
2006-02-15 07:21:17 -06:00
|
|
|
DOCS_DIR = $(datadir)/doc/libvirt-python-$(LIBVIRT_VERSION)
|
2005-12-19 10:34:11 -06:00
|
|
|
|
|
|
|
DOCS = ${srcdir}/TODO
|
|
|
|
|
2009-07-10 06:18:12 -05:00
|
|
|
CLASSES_EXTRA = \
|
|
|
|
libvirt-override-virConnect.py \
|
|
|
|
libvirt-override-virStream.py
|
2009-09-16 08:03:53 -05:00
|
|
|
|
|
|
|
EXTRA_DIST = \
|
|
|
|
generator.py \
|
|
|
|
typewrappers.c \
|
|
|
|
typewrappers.h \
|
|
|
|
libvirt-override.c \
|
|
|
|
libvirt-override.py \
|
|
|
|
libvirt-override-api.xml \
|
2008-10-31 05:13:45 -05:00
|
|
|
$(CLASSES_EXTRA) \
|
2005-12-19 10:34:11 -06:00
|
|
|
$(DOCS)
|
|
|
|
|
|
|
|
if WITH_PYTHON
|
2006-02-09 11:45:11 -06:00
|
|
|
mylibs = $(top_builddir)/src/libvirt.la
|
2005-12-19 10:34:11 -06:00
|
|
|
|
2006-02-09 11:45:11 -06:00
|
|
|
all-local: libvirt.py
|
2005-12-19 10:34:11 -06:00
|
|
|
|
2009-12-11 17:11:31 -06:00
|
|
|
pyexec_LTLIBRARIES = libvirtmod.la
|
2005-12-19 10:34:11 -06:00
|
|
|
|
2010-04-15 05:49:33 -05:00
|
|
|
libvirtmod_la_SOURCES = libvirt-override.c typewrappers.c
|
|
|
|
nodist_libvirtmod_la_SOURCES = libvirt.c libvirt.h
|
2008-12-18 06:20:00 -06:00
|
|
|
# Python <= 2.4 header files contain a redundant decl, hence we
|
|
|
|
# need extra flags here
|
2010-01-15 04:09:01 -06:00
|
|
|
libvirtmod_la_CFLAGS = $(WARN_PYTHON_CFLAGS)
|
2005-12-19 10:34:11 -06:00
|
|
|
|
2010-01-06 10:33:41 -06:00
|
|
|
libvirtmod_la_LDFLAGS = -module -avoid-version -shared -L$(top_builddir)/src/.libs \
|
2010-01-15 04:09:01 -06:00
|
|
|
$(CYGWIN_EXTRA_LDFLAGS)
|
2007-11-29 11:44:01 -06:00
|
|
|
libvirtmod_la_LIBADD = $(mylibs) \
|
2010-01-15 04:09:01 -06:00
|
|
|
$(CYGWIN_EXTRA_LIBADD) $(CYGWIN_EXTRA_PYTHON_LIBADD)
|
2007-11-29 11:44:01 -06:00
|
|
|
|
2005-12-19 10:34:11 -06:00
|
|
|
GENERATE = generator.py
|
2009-09-16 08:03:53 -05:00
|
|
|
API_DESC = $(top_srcdir)/docs/libvirt-api.xml $(srcdir)/libvirt-override-api.xml
|
2007-06-26 08:47:04 -05:00
|
|
|
GENERATED= libvirt-export.c \
|
2009-09-16 08:03:53 -05:00
|
|
|
libvirt.c \
|
|
|
|
libvirt.h \
|
|
|
|
libvirt.py
|
2005-12-19 10:34:11 -06:00
|
|
|
|
2009-02-26 07:58:35 -06:00
|
|
|
generated.stamp: $(srcdir)/$(GENERATE) $(API_DESC)
|
2005-12-19 10:34:11 -06:00
|
|
|
$(PYTHON) $(srcdir)/$(GENERATE) $(srcdir)
|
2009-02-26 07:58:35 -06:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(GENERATED): generated.stamp
|
2007-06-26 08:47:04 -05:00
|
|
|
|
2006-02-09 11:45:11 -06:00
|
|
|
$(libvirtmod_la_OBJECTS): $(GENERATED)
|
2005-12-19 10:34:11 -06:00
|
|
|
|
2007-06-26 08:47:04 -05:00
|
|
|
install-data-local:
|
2009-12-11 17:11:31 -06:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(pyexecdir)
|
2010-01-15 04:09:01 -06:00
|
|
|
$(INSTALL) -m 0644 libvirt.py $(DESTDIR)$(pyexecdir)
|
2007-06-26 08:47:04 -05:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(DOCS_DIR)
|
|
|
|
@(for doc in $(DOCS) ; \
|
2010-01-15 04:09:01 -06:00
|
|
|
do $(INSTALL) -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
|
2007-06-26 08:47:04 -05:00
|
|
|
|
2007-11-15 07:04:28 -06:00
|
|
|
uninstall-local:
|
2009-12-11 17:11:31 -06:00
|
|
|
rm -f $(DESTDIR)$(pyexecdir)/libvirt.py
|
2007-11-15 07:04:28 -06:00
|
|
|
|
2009-09-16 08:03:53 -05:00
|
|
|
CLEANFILES= $(GENERATED) generated.stamp
|
2007-06-26 08:47:04 -05:00
|
|
|
|
2005-12-19 10:34:11 -06:00
|
|
|
else
|
2008-02-05 13:27:37 -06:00
|
|
|
all:
|
2005-12-19 10:34:11 -06:00
|
|
|
endif
|
2006-02-14 08:30:42 -06:00
|
|
|
|
|
|
|
dummy:
|
|
|
|
|
|
|
|
tests test: all dummy
|
|
|
|
-@(cd tests && $(MAKE) MAKEFLAGS+=--silent tests)
|