]> git.sesse.net Git - xml-template/blobdiff - php5-swig/Makefile
Start a PHP5-to-C++11 SWIG layer (!).
[xml-template] / php5-swig / Makefile
diff --git a/php5-swig/Makefile b/php5-swig/Makefile
new file mode 100644 (file)
index 0000000..de44312
--- /dev/null
@@ -0,0 +1,15 @@
+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
+       $(CXX) $(LDFLAGS) -o $@ $< $(LIBS)
+
+xml-template_wrap.cpp XML_Template_SWIG.php php_XML_Template_SWIG.h : xml-template.swig
+       swig -c++ -php $<
+
+clean:
+       $(RM) XML_Template_SWIG.so xml-template_wrap.o
+       $(RM) xml-template_wrap.cpp XML_Template_SWIG.php php_XML_Template_SWIG.h 
+