Merge from trunk
[plcapi.git] / trunk / php / xmlrpc / Makefile
diff --git a/trunk/php/xmlrpc/Makefile b/trunk/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