]> git.sesse.net Git - xml-template/blobdiff - php7-swig/Makefile
Update the PHP SWIG version to PHP 7, with various crash fixes, too.
[xml-template] / php7-swig / Makefile
diff --git a/php7-swig/Makefile b/php7-swig/Makefile
new file mode 100644 (file)
index 0000000..5bf3c01
--- /dev/null
@@ -0,0 +1,17 @@
+CPPFLAGS=$(shell php-config --includes)
+CXXFLAGS=-std=gnu++0x $(shell xml2-config --cflags) -fPIC -g
+LDFLAGS=-shared
+LIBS=../c++11/xml-template.o
+
+XML_Template_SWIG.so: xml-template_wrap.o $(LIBS)
+       $(CXX) $(LDFLAGS) -o $@ $< $(LIBS)
+
+xml-template_wrap.cxx XML_Template_SWIG.php php_XML_Template_SWIG.h : xml-template.swig
+       swig -c++ -php7 $<
+
+clean:
+       $(RM) XML_Template_SWIG.so xml-template_wrap.o
+       $(RM) xml-template_wrap.cxx xml-template_wrap.cpp XML_Template_SWIG.php php_XML_Template_SWIG.h 
+
+xml-template_wrap.cpp: xml-template_wrap.cxx
+       cp xml-template_wrap.cxx xml-template_wrap.cpp