From 061f1884648484b4d5c0551bffc5ec08d58b0a04 Mon Sep 17 00:00:00 2001 From: neingeist Date: Fri, 10 Jan 2020 14:27:43 +0100 Subject: [PATCH] =?UTF-8?q?=E2=86=92=20test-swig/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 28 ------------------ test-swig/Makefile | 27 +++++++++++++++++ numpy.i => test-swig/numpy.i | 0 .../okapi-typemaps.i | 0 test_swig.c => test-swig/test_swig.c | 0 test_swig.i => test-swig/test_swig.i | 0 .../test_swig_opencv.cpp | 0 .../test_swig_opencv.hpp | 0 .../test_swig_opencv.i | 0 .../test_swig_opencv.jpg | Bin .../test_swig_opencv_test.py | 0 .../test_swig_test.py | 0 12 files changed, 27 insertions(+), 28 deletions(-) create mode 100644 test-swig/Makefile rename numpy.i => test-swig/numpy.i (100%) rename okapi-typemaps.i => test-swig/okapi-typemaps.i (100%) rename test_swig.c => test-swig/test_swig.c (100%) rename test_swig.i => test-swig/test_swig.i (100%) rename test_swig_opencv.cpp => test-swig/test_swig_opencv.cpp (100%) rename test_swig_opencv.hpp => test-swig/test_swig_opencv.hpp (100%) rename test_swig_opencv.i => test-swig/test_swig_opencv.i (100%) rename test_swig_opencv.jpg => test-swig/test_swig_opencv.jpg (100%) rename test_swig_opencv_test.py => test-swig/test_swig_opencv_test.py (100%) rename test_swig_test.py => test-swig/test_swig_test.py (100%) diff --git a/Makefile b/Makefile index 7db5197..21dce05 100644 --- a/Makefile +++ b/Makefile @@ -1,32 +1,4 @@ -.PHONY: default -default: all test - -.PHONY: all -all: _test_swig.so _test_swig_opencv.so - -.PHONY: test -test: - python2.7 test_swig_test.py - .PHONY: pep8 pep8: find . -name "*.py" -not -name test_swig.py -not -name test_swig_opencv.py \ | xargs pep8 - -_test_swig.so: test_swig.o - ld -shared test_swig.o test_swig_wrap.o -o _test_swig.so - -test_swig.o: test_swig_wrap.c - gcc -fpic -c test_swig.c test_swig_wrap.c -I/usr/include/python2.7 - -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 test_swig_opencv_wrap.cxx *.pyc test_swig.py test_swig_opencv.py diff --git a/test-swig/Makefile b/test-swig/Makefile new file mode 100644 index 0000000..d033bf5 --- /dev/null +++ b/test-swig/Makefile @@ -0,0 +1,27 @@ +.PHONY: default +default: all test + +.PHONY: all +all: _test_swig.so _test_swig_opencv.so + +.PHONY: test +test: + python2.7 test_swig_test.py + +_test_swig.so: test_swig.o + ld -shared test_swig.o test_swig_wrap.o -o _test_swig.so + +test_swig.o: test_swig_wrap.c + gcc -fpic -c test_swig.c test_swig_wrap.c -I/usr/include/python2.7 + +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 test_swig_opencv_wrap.cxx *.pyc test_swig.py test_swig_opencv.py diff --git a/numpy.i b/test-swig/numpy.i similarity index 100% rename from numpy.i rename to test-swig/numpy.i diff --git a/okapi-typemaps.i b/test-swig/okapi-typemaps.i similarity index 100% rename from okapi-typemaps.i rename to test-swig/okapi-typemaps.i diff --git a/test_swig.c b/test-swig/test_swig.c similarity index 100% rename from test_swig.c rename to test-swig/test_swig.c diff --git a/test_swig.i b/test-swig/test_swig.i similarity index 100% rename from test_swig.i rename to test-swig/test_swig.i diff --git a/test_swig_opencv.cpp b/test-swig/test_swig_opencv.cpp similarity index 100% rename from test_swig_opencv.cpp rename to test-swig/test_swig_opencv.cpp diff --git a/test_swig_opencv.hpp b/test-swig/test_swig_opencv.hpp similarity index 100% rename from test_swig_opencv.hpp rename to test-swig/test_swig_opencv.hpp diff --git a/test_swig_opencv.i b/test-swig/test_swig_opencv.i similarity index 100% rename from test_swig_opencv.i rename to test-swig/test_swig_opencv.i diff --git a/test_swig_opencv.jpg b/test-swig/test_swig_opencv.jpg similarity index 100% rename from test_swig_opencv.jpg rename to test-swig/test_swig_opencv.jpg diff --git a/test_swig_opencv_test.py b/test-swig/test_swig_opencv_test.py similarity index 100% rename from test_swig_opencv_test.py rename to test-swig/test_swig_opencv_test.py diff --git a/test_swig_test.py b/test-swig/test_swig_test.py similarity index 100% rename from test_swig_test.py rename to test-swig/test_swig_test.py