Setting tag plcapi-5.3-11
[plcapi.git] / php / xmlrpc / Makefile
1 #
2 # Build xmlrpc.so PHP extension
3 #
4 # Mark Huang <mlhuang@cs.princeton.edu>
5 # Copyright (C) 2006 The Trustees of Princeton University
6 #
7
8 CC := gcc
9 CFLAGS := -g -O2 -I. -Ilibxmlrpc -fPIC
10 CFLAGS += $(shell php-config --includes)
11 CFLAGS += $(shell xml2-config --cflags)
12
13 LDFLAGS := -shared --export-dynamic
14 LIBS := -lexpat
15
16 # for building on fedora 8
17 ifneq "$(shell ld --help | grep build-id)" ""
18 #not needed# CFLAGS += -Wl,--build-id
19 LD += --build-id
20 endif
21
22 all: xmlrpc.so
23
24 xmlrpc.so: xmlrpc-epi-php.o $(patsubst %.c, %.o, $(wildcard libxmlrpc/*.c))
25         $(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
26
27 clean:
28         rm -f *.o libxmlrpc/*.o *.so
29
30 .PHONY: all clean