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:
|
2019-10-02 18:05:58 +00:00
|
|
|
swig3.0 -module ESL -php7 -c++ -DMULTIPLICITY -I../src/include -o esl_wrap.cpp ../ESL.i
|
2013-09-20 19:58:44 +00:00
|
|
|
sed -e 's/ char \*type_name;/ const char \*type_name;/' -i esl_wrap.cpp
|
2009-02-17 15:54:36 +00:00
|
|
|
|
|
|
|
esl_wrap.o: esl_wrap.cpp
|
2014-03-21 21:01:35 +00:00
|
|
|
$(CXX) -I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CXXFLAGS) $(CXXFLAGS) $(PHP_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
|
2014-03-21 21:01:35 +00:00
|
|
|
$(CXX) $(SOLINK) esl_wrap.o $(MYLIB) $(PHP_LDFLAGS) $(PHP_LIBS) -lpthread -o ESL.so -L. $(LIBS)
|
2009-02-17 15:54:36 +00:00
|
|
|
|
|
|
|
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
|
2012-07-14 12:01:18 +00:00
|
|
|
test -d "$(DESTDIR)$(PHP_EXT_DIR)" || mkdir -p "$(DESTDIR)$(PHP_EXT_DIR)"
|
|
|
|
cp ESL.so "$(DESTDIR)$(PHP_EXT_DIR)"
|
|
|
|
test -d "$(DESTDIR)$(PHP_INC_DIR)" || mkdir -p "$(DESTDIR)$(PHP_INC_DIR)"
|
|
|
|
cp ESL.php "$(DESTDIR)$(PHP_INC_DIR)"
|
|
|
|
test -d "$(DESTDIR)$(PHP_INI_DIR)" || mkdir -p "$(DESTDIR)$(PHP_INI_DIR)"
|
|
|
|
test -f "$(DESTDIR)$(PHP_INI_DIR)/esl.ini" || echo 'extension=ESL.so' > "$(DESTDIR)$(PHP_INI_DIR)/esl.ini"
|