pkgpython_PYTHON = bindings/python/mega.py
nodist_pkgpython_PYTHON = bindings/python/__init__.py
pkgpyexec_LTLIBRARIES = bindings/python/_mega.la
dist_noinst_PYTHON = bindings/python/test_libmega.py

CLEANFILES += bindings/python/megaapi_wrap.cpp
CLEANFILES += bindings/python/megaapi_wrap.h
CLEANFILES += bindings/python/mega.py
CLEANFILES += bindings/python/mega.pyc

nodist_bindings_python__mega_la_SOURCES = bindings/python/megaapi_wrap.cpp
bindings_python__mega_la_SOURCES = $(top_srcdir)/bindings/megaapi.i
bindings_python__mega_la_CPPFLAGS = $(PYTHON_CPPFLAGS) -I$(top_srcdir)/include
bindings_python__mega_la_LDFLAGS = -module $(PYTHON_LDFLAGS) $(PYTHON_EXTRA_LDFLAGS)
bindings_python__mega_la_LIBADD = $(top_builddir)/src/libmega.la $(PYTHON_EXTRA_LDFLAGS)

bindings/python/megaapi_wrap.cpp: $(top_srcdir)/bindings/megaapi.i
	$(SWIG) -threads -python $(SWIG_FLAGS) -I$(top_srcdir)/include -o $@ $(top_srcdir)/bindings/megaapi.i

bindings/python/__init__.py: bindings/python/megaapi_wrap.cpp
	touch $@
