build xmlrpc.so PHP extension
authorMark Huang <mlhuang@cs.princeton.edu>
Fri, 10 Nov 2006 06:30:44 +0000 (06:30 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Fri, 10 Nov 2006 06:30:44 +0000 (06:30 +0000)
php/xmlrpc/Makefile [new file with mode: 0644]

diff --git a/php/xmlrpc/Makefile b/php/xmlrpc/Makefile
new file mode 100644 (file)
index 0000000..40c6887
--- /dev/null
@@ -0,0 +1,26 @@
+#
+# Build xmlrpc.so PHP extension
+#
+# Mark Huang <mlhuang@cs.princeton.edu>
+# Copyright (C) 2006 The Trustees of Princeton University
+#
+# $Id$
+#
+
+CC := gcc
+CFLAGS := -g -O2 -I. -Ilibxmlrpc -fPIC
+CFLAGS += $(shell php-config --includes)
+CFLAGS += $(shell xml2-config --cflags)
+
+LDFLAGS := -shared --export-dynamic
+LIBS := -lexpat
+
+all: xmlrpc.so
+
+xmlrpc.so: xmlrpc-epi-php.o $(patsubst %.c, %.o, $(wildcard libxmlrpc/*.c))
+       $(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+clean:
+       rm -f *.o libxmlrpc/*.o *.so
+
+.PHONY: all clean