blob: 34aed96c28d7df0afd54b8e848ea72353229f510 [file] [log] [blame]
Daniel Veillard5e5c2d02002-02-09 18:03:01 +00001# Makefile for libxml2 python library
2AUTOMAKE_OPTIONS = 1.4 foreign
3
Daniel Richard Gd10a72c2012-08-14 12:50:25 +08004SUBDIRS = . tests
Daniel Veillard253aa2c2002-02-02 09:17:16 +00005
Daniel Veillard5ac88232008-02-19 07:54:52 +00006docsdir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION)
Daniel Veillard5ac88232008-02-19 07:54:52 +00007dist_docs_DATA = TODO
Daniel Veillardc3e39442002-02-01 09:29:41 +00008
Daniel Veillard4cf998a2002-02-02 10:42:43 +00009EXTRA_DIST = \
Daniel Veillarda6d2e9e2002-03-09 10:22:50 +000010 setup.py \
Daniel Veillard4cf998a2002-02-02 10:42:43 +000011 generator.py \
Daniel Veillard4cf998a2002-02-02 10:42:43 +000012 libxml.py \
Daniel Richard Gd10a72c2012-08-14 12:50:25 +080013 libxml2-export.c \
14 libxml2-python-api.xml \
15 libxml2class.py \
16 libxml2class.txt
Daniel Veillardd2379012002-03-15 22:24:56 +000017
Daniel Veillardf1d0e6b2002-01-31 23:42:44 +000018if WITH_PYTHON
Daniel Richard Gd10a72c2012-08-14 12:50:25 +080019AM_CPPFLAGS = \
20 -I$(top_builddir)/include \
21 -I$(top_srcdir)/include \
22 -I$(PYTHON_INCLUDES)
Daniel Veillard5e5c2d02002-02-09 18:03:01 +000023
Daniel Veillardd2379012002-03-15 22:24:56 +000024python_LTLIBRARIES = libxml2mod.la
Daniel Veillard5e5c2d02002-02-09 18:03:01 +000025
Daniel Richard Gd10a72c2012-08-14 12:50:25 +080026libxml2mod_la_SOURCES = libxml.c libxml_wrap.h libxml2-py.h libxml2-py.c types.c
Daniel Veillardc0a8dd12013-04-19 15:02:33 +080027libxml2mod_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) -module -avoid-version \
28 $(top_builddir)/libxml2.la $(CYGWIN_EXTRA_PYTHON_LIBADD) $(WIN32_EXTRA_PYTHON_LIBADD) $(PYTHON_LIBS)
Daniel Veillard96c9af72002-02-01 00:06:44 +000029
Daniel Richard Gd10a72c2012-08-14 12:50:25 +080030BUILT_SOURCES = libxml2-export.c libxml2-py.h libxml2-py.c
Daniel Veillard5ac88232008-02-19 07:54:52 +000031
Daniel Richard Gd10a72c2012-08-14 12:50:25 +080032# libxml.c #includes libxml2-export.c
33libxml.$(OBJEXT): libxml2-export.c
Daniel Veillard5ac88232008-02-19 07:54:52 +000034
William M. Brack106cad62004-12-23 15:56:12 +000035libxml2.py: $(srcdir)/libxml.py libxml2class.py
Daniel Richard Gd10a72c2012-08-14 12:50:25 +080036 cat $(srcdir)/libxml.py `test -f libxml2class.py || echo $(srcdir)/`libxml2class.py > $@
Daniel Veillardf1d0e6b2002-01-31 23:42:44 +000037
Daniel Veillard5ac88232008-02-19 07:54:52 +000038dist_python_DATA = \
Daniel Richard Gd10a72c2012-08-14 12:50:25 +080039 drv_libxml2.py \
40 libxml2.py
Daniel Veillard9ebb6322008-01-11 07:19:24 +000041
Daniel Richard Gd10a72c2012-08-14 12:50:25 +080042CLEANFILES = *.pyc
43
44MAINTAINERCLEANFILES = libxml2.py libxml2class.*
45
Daniel Veillard9589d452002-02-02 10:28:17 +000046API_DESC = $(top_srcdir)/doc/libxml2-api.xml $(srcdir)/libxml2-python-api.xml
Daniel Richard Gd10a72c2012-08-14 12:50:25 +080047GENERATED = libxml2class.py libxml2class.txt $(BUILT_SOURCES)
Daniel Veillardf1d0e6b2002-01-31 23:42:44 +000048
Daniel Richard Gd10a72c2012-08-14 12:50:25 +080049$(GENERATED): $(srcdir)/generator.py $(API_DESC)
50 $(PYTHON) $(srcdir)/generator.py $(srcdir)
Daniel Veillard7db38712002-02-07 16:39:11 +000051endif
Daniel Veillard5ac88232008-02-19 07:54:52 +000052
Daniel Veillard5997aca2002-03-18 18:36:20 +000053tests test: all
Daniel Richard G5706b6d2012-08-06 11:32:54 +080054 cd tests && $(MAKE) tests