Fix UUID handling in secrets/storage encryption APIs
[libvirt-python/ericb.git] / Makefile.am
bloba7c342e7cf74109e3eda624b695b9b0fd7c6ef2d
1 # Makefile for libvirt python library
3 SUBDIRS= . tests
5 INCLUDES = \
6         $(WARN_CFLAGS) \
7         -I$(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 = virConnect.py
18 EXTRA_DIST =            \
19         libvir.c        \
20         types.c         \
21         generator.py    \
22         libvirt_wrap.h  \
23         libvirt.py      \
24         libvir.py       \
25         libvirt-python-api.xml \
26         $(CLASSES_EXTRA) \
27         $(DOCS)
29 if WITH_PYTHON
30 mylibs = $(top_builddir)/src/libvirt.la
32 all-local: libvirt.py
34 python_LTLIBRARIES = libvirtmod.la
36 libvirtmod_la_SOURCES = libvir.c types.c libvirt-py.c libvirt-py.h
37 # Python <= 2.4 header files contain a redundant decl, hence we
38 # need extra flags here
39 libvirtmod_la_CFLAGS = @WARN_PYTHON_CFLAGS@
41 libvirtmod_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/.libs \
42         @CYGWIN_EXTRA_LDFLAGS@
43 libvirtmod_la_LIBADD = $(mylibs) \
44         @CYGWIN_EXTRA_LIBADD@ @CYGWIN_EXTRA_PYTHON_LIBADD@
46 GENERATE = generator.py
47 API_DESC = $(top_srcdir)/docs/libvirt-api.xml $(srcdir)/libvirt-python-api.xml
48 GENERATED= libvirt-export.c \
49            libvirtclass.txt \
50            libvirt-py.c \
51            libvirt-py.h \
52            libvirtclass.py
54 generated.stamp: $(srcdir)/$(GENERATE) $(API_DESC)
55         $(PYTHON) $(srcdir)/$(GENERATE) $(srcdir)
56         touch $@
58 $(GENERATED): generated.stamp
60 libvirt.py: $(srcdir)/libvir.py $(GENERATED) $(CLASSES_EXTRA)
61         cat $(srcdir)/libvir.py libvirtclass.py > $@-t
62         mv $@-t $@
64 $(libvirtmod_la_OBJECTS): $(GENERATED)
66 install-data-local:
67         $(mkinstalldirs) $(DESTDIR)$(pythondir)
68         @INSTALL@ -m 0644 libvirt.py $(DESTDIR)$(pythondir)
69         $(mkinstalldirs) $(DESTDIR)$(DOCS_DIR)
70         @(for doc in $(DOCS) ; \
71            do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
73 uninstall-local:
74         rm -f $(DESTDIR)$(pythondir)/libvirt.py
76 CLEANFILES= $(GENERATED) generated.stamp libvirt.py
78 else
79 all:
80 endif
82 dummy:
84 tests test: all dummy
85         -@(cd tests && $(MAKE) MAKEFLAGS+=--silent tests)