php_LTLIBRARIES = bindings/php/libmegaphp.la
phpdir = @PHPLIBDIR@

bindings_php_libmegaphp_la_LIBADD = $(top_builddir)/src/libmega.la
bindings_php_libmegaphp_la_DEPENDENCIES = $(top_builddir)/src/libmega.la
bindings_php_libmegaphp_la_CPPFLAGS = @PHPINC@ -I$(top_srcdir)/include
bindings_php_libmegaphp_la_LDFLAGS = -shared -shrext .so
nodist_bindings_php_libmegaphp_la_SOURCES = bindings/php/megaapi_wrap.cpp
bindings_php_libmegaphp_la_SOURCES = $(top_srcdir)/bindings/megaapi.i

CLEANFILES += bindings/php/megaapi_wrap.cpp
CLEANFILES += bindings/php/megaapi_wrap.h
CLEANFILES += bindings/php/php_mega.h
CLEANFILES += bindings/php/mega.php

bindings/php/megaapi_wrap.cpp: $(top_srcdir)/bindings/megaapi.i
	$(SWIG) $(SWIG_FLAGS_PHP) -I$(top_srcdir)/include -o $@ $(top_srcdir)/bindings/megaapi.i
