add an example using swig to interface opencv

This commit is contained in:
neingeist 2014-05-05 20:41:52 +02:00
parent f56ff3c1bc
commit 12573e4da6
9 changed files with 2143 additions and 1 deletions

View file

@ -2,7 +2,7 @@
default: all test
.PHONY: all
all: _test_swig.so
all: _test_swig.so _test_swig_opencv.so
.PHONY: test
test:
@ -17,6 +17,11 @@ test_swig.o: test_swig_wrap.c
test_swig_wrap.c: test_swig.i
swig -python $<
_test_swig_opencv.so: test_swig_opencv.cpp test_swig_opencv.i okapi-typemaps.i numpy.i
swig -python -c++ test_swig_opencv.i
g++ -fpic -c test_swig_opencv.cpp test_swig_opencv_wrap.cxx -I/usr/include/python2.7
g++ -shared test_swig_opencv.o test_swig_opencv_wrap.o -lopencv_core -o _test_swig_opencv.so
.PHONY: clean
clean:
rm -f *.o *.so test_swig_wrap.c *.pyc test_swig.py