Introduce public API for domain async job handling
[libvirt-python/ericb.git] / Makefile.am
blob6b67e382c653ded2409ec0f18dd1e0b41ddd3f19
1 # Makefile for libvirt python library
3 SUBDIRS= . tests
5 INCLUDES = \
6         $(WARN_CFLAGS) \
7         $(PYTHON_INCLUDES) \
8         -I$(top_srcdir)/include \
9         -I$(top_builddir)/include \
10         -I$(top_builddir)/$(subdir)
12 DOCS_DIR = $(datadir)/doc/libvirt-python-$(LIBVIRT_VERSION)
14 DOCS = ${srcdir}/TODO
16 CLASSES_EXTRA = \
17         libvirt-override-virConnect.py \
18         libvirt-override-virStream.py
20 EXTRA_DIST =                    \
21         generator.py            \
22         typewrappers.c          \
23         typewrappers.h          \
24         libvirt-override.c      \
25         libvirt-override.py     \
26         libvirt-override-api.xml \
27         $(CLASSES_EXTRA) \
28         $(DOCS)
30 if WITH_PYTHON
31 mylibs = $(top_builddir)/src/libvirt.la
33 all-local: libvirt.py
35 pyexec_LTLIBRARIES = libvirtmod.la
37 libvirtmod_la_SOURCES = libvirt-override.c typewrappers.c libvirt.c libvirt.h
38 # Python <= 2.4 header files contain a redundant decl, hence we
39 # need extra flags here
40 libvirtmod_la_CFLAGS = $(WARN_PYTHON_CFLAGS)
42 libvirtmod_la_LDFLAGS = -module -avoid-version -shared -L$(top_builddir)/src/.libs \
43         $(CYGWIN_EXTRA_LDFLAGS)
44 libvirtmod_la_LIBADD = $(mylibs) \
45         $(CYGWIN_EXTRA_LIBADD) $(CYGWIN_EXTRA_PYTHON_LIBADD)
47 GENERATE = generator.py
48 API_DESC = $(top_srcdir)/docs/libvirt-api.xml $(srcdir)/libvirt-override-api.xml
49 GENERATED= libvirt-export.c \
50            libvirt.c \
51            libvirt.h \
52            libvirt.py
54 generated.stamp: $(srcdir)/$(GENERATE) $(API_DESC)
55         $(PYTHON) $(srcdir)/$(GENERATE) $(srcdir)
56         touch $@
58 $(GENERATED): generated.stamp
60 $(libvirtmod_la_OBJECTS): $(GENERATED)
62 install-data-local:
63         $(mkinstalldirs) $(DESTDIR)$(pyexecdir)
64         $(INSTALL) -m 0644 libvirt.py $(DESTDIR)$(pyexecdir)
65         $(mkinstalldirs) $(DESTDIR)$(DOCS_DIR)
66         @(for doc in $(DOCS) ; \
67            do $(INSTALL) -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
69 uninstall-local:
70         rm -f $(DESTDIR)$(pyexecdir)/libvirt.py
72 CLEANFILES= $(GENERATED) generated.stamp
74 else
75 all:
76 endif
78 dummy:
80 tests test: all dummy
81         -@(cd tests && $(MAKE) MAKEFLAGS+=--silent tests)