summaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@redhat.com>2005-12-19 16:34:11 +0000
committerDaniel Veillard <veillard@redhat.com>2005-12-19 16:34:11 +0000
commit30f666b9f47f36348e0cbb6a3bca011d9cd0bc76 (patch)
treefb79a83e8d784ef1fb1d6a248084a4c04a593c65 /Makefile.am
downloadlibvirt-python-split-30f666b9f47f36348e0cbb6a3bca011d9cd0bc76.tar.gz
libvirt-python-split-30f666b9f47f36348e0cbb6a3bca011d9cd0bc76.tar.xz
libvirt-python-split-30f666b9f47f36348e0cbb6a3bca011d9cd0bc76.zip
* Makefile.am configure.in libvir.spec.in python/*: added a firstv0.0.1
version for python bindings, heavilly based on libxml2/libxslt way of doing things, maybe this need to be revisited. Added packaging too. * src/hash.h: fixed the Copyright notice. Daniel
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am62
1 files changed, 62 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..0921e32
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,62 @@
+# Makefile for libvir python library
+
+INCLUDES = \
+ -I$(PYTHON_INCLUDES) \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
+ -I$(top_builddir)/$(subdir)
+
+DOCS_DIR = $(datadir)/doc/libvir-python-$(LIBVIR_VERSION)
+
+DOCS = ${srcdir}/TODO
+
+EXTRA_DIST = \
+ libvir.c \
+ types.c \
+ generator.py \
+ libvir_wrap.h \
+ libvir.py \
+ libvir-python-api.xml \
+ $(DOCS)
+
+libvirmod_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/.libs
+
+if WITH_PYTHON
+mylibs = $(top_builddir)/src/libvir.la
+
+all-local: libvir.py
+
+python_LTLIBRARIES = libvirmod.la
+
+libvirmod_la_SOURCES = libvir.c types.c libvir-py.c
+libvirmod_la_LIBADD = $(mylibs)
+
+
+install-data-local:
+ $(mkinstalldirs) $(DESTDIR)$(pythondir)
+ @INSTALL@ -m 0644 libvir.py $(DESTDIR)$(pythondir)
+ $(mkinstalldirs) $(DESTDIR)$(DOCS_DIR)
+ @(for doc in $(DOCS) ; \
+ do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
+
+GENERATE = generator.py
+API_DESC = $(top_srcdir)/docs/libvir-api.xml $(srcdir)/libvir-python-api.xml
+GENERATED= libvir.py \
+ libvir-export.c \
+ libvirclass.txt \
+ libvir-py.c \
+ libvir-py.h
+
+CLEANFILES= $(GENERATED) gen_prog libvir.py
+
+$(GENERATED): gen_prog
+
+gen_prog: $(srcdir)/$(GENERATE) $(API_DESC)
+ $(PYTHON) $(srcdir)/$(GENERATE) $(srcdir)
+ touch gen_prog
+
+$(libvirmod_la_OBJECTS): $(GENERATED)
+
+else
+all:
+endif