2010-02-16 07:44:02 +00:00
|
|
|
LOCAL_CFLAGS=`python ./python-config --includes`
|
|
|
|
LOCAL_LDFLAGS=`python ./python-config --ldflags`
|
2011-02-16 19:54:57 +00:00
|
|
|
SITE_DIR=$(DESTDIR)/`python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"`
|
2009-02-17 16:12:48 +00:00
|
|
|
|
2009-02-20 18:07:35 +00:00
|
|
|
all: _ESL.so
|
2009-02-17 16:12:48 +00:00
|
|
|
|
|
|
|
esl_wrap.cpp:
|
2015-06-16 17:43:53 +00:00
|
|
|
swig2.0 -module ESL -classic -python -c++ -DMULTIPLICITY -threads -I../src/include -o esl_wrap.cpp ../ESL.i
|
2009-02-17 16:12:48 +00:00
|
|
|
|
|
|
|
esl_wrap.o: esl_wrap.cpp
|
|
|
|
$(CXX) $(CXX_CFLAGS) $(CXXFLAGS) $(LOCAL_CFLAGS) -c esl_wrap.cpp -o esl_wrap.o
|
|
|
|
|
2009-02-20 18:07:35 +00:00
|
|
|
_ESL.so: esl_wrap.o
|
|
|
|
$(CXX) $(SOLINK) esl_wrap.o $(MYLIB) $(LOCAL_LDFLAGS) -o _ESL.so -L. $(LIBS)
|
2009-02-17 16:12:48 +00:00
|
|
|
|
2011-02-16 19:35:11 +00:00
|
|
|
install: _ESL.so
|
2011-02-16 23:02:37 +00:00
|
|
|
install -m 755 _ESL.so $(SITE_DIR)
|
2011-02-17 09:09:26 +00:00
|
|
|
install -m 755 ESL.py $(SITE_DIR)
|
2011-02-16 19:35:11 +00:00
|
|
|
|
2009-02-17 16:12:48 +00:00
|
|
|
clean:
|
|
|
|
rm -f *.o *.so *~
|
|
|
|
|
|
|
|
swigclean:
|
|
|
|
rm -f esl_wrap.* ESL.so
|
|
|
|
|
|
|
|
reswig: swigclean esl_wrap.cpp
|
|
|
|
|