2009-02-17 15:54:36 +00:00
|
|
|
LOCAL_CFLAGS=$(shell php-config --includes)
|
2009-03-26 17:02:30 +00:00
|
|
|
PHP_LDFLAGS=$(shell php-config --ldflags)
|
2009-06-25 20:39:18 +00:00
|
|
|
PHP_LIBS=$(shell php-config --libs | sed -r 's/ ?-l(bz2|pcre|xml2|gssapi_krb5|krb5|k5crypto|com_err|history|z|readline|gmp|ssl|crypto)//g')
|
2009-03-26 17:02:30 +00:00
|
|
|
LOCAL_LDFLAGS=$(PHP_LDFLAGS) $(PHP_LIBS)
|
2009-03-11 20:51:44 +00:00
|
|
|
WRAP_GCC_WARNING_SILENCE=-Wno-unused-label -Wno-unused-function
|
2009-02-17 15:54:36 +00:00
|
|
|
|
|
|
|
all: ESL.so
|
|
|
|
|
|
|
|
esl_wrap.cpp:
|
|
|
|
swig -module ESL -php5 -c++ -DMULTIPLICITY -I../src/include -o esl_wrap.cpp ../ESL.i
|
|
|
|
|
|
|
|
esl_wrap.o: esl_wrap.cpp
|
2009-03-11 20:51:44 +00:00
|
|
|
$(CXX) $(CXX_CFLAGS) $(CXXFLAGS) $(LOCAL_CFLAGS) $(WRAP_GCC_WARNING_SILENCE) -c esl_wrap.cpp -o esl_wrap.o
|
2009-02-17 15:54:36 +00:00
|
|
|
|
|
|
|
ESL.so: esl_wrap.o
|
|
|
|
$(CXX) $(SOLINK) esl_wrap.o $(MYLIB) $(LOCAL_LDFLAGS) -o ESL.so -L. $(LIBS)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.o *.so *~
|
|
|
|
|
|
|
|
swigclean:
|
2009-02-17 21:41:06 +00:00
|
|
|
rm -f esl_wrap.* ESL.so php_ESL.* ESL.php
|
2009-02-17 15:54:36 +00:00
|
|
|
|
|
|
|
reswig: swigclean esl_wrap.cpp
|
|
|
|
|
2009-02-17 23:32:18 +00:00
|
|
|
install: ESL.so
|
2009-02-17 21:41:06 +00:00
|
|
|
cp ESL.so $(shell php-config --extension-dir)
|
|
|
|
cp ESL.php $(shell php -r 'phpinfo();' | grep include_path | cut -d: -f2)
|