Support.Linux.runBuild Maven / Gradle / Ivy
#jdkdir=/usr/lib/jvm/java-7-openjdk-amd64
jdkdir=#jdkdir#
opencvinclude=
#opencvlib=/usr/lib/x86_64-linux-gnu
#opencvcore=$opencvlib/libopencv_core.so.2.4
opencvcore=#opencvcore#
#opencvimgproc=$opencvlib/libopencv_imgproc.so.2.4
opencvimgproc=#opencvimgproc#
#opencvhighgui=$opencvlib/libopencv_highgui.so.2.4
opencvhighgui=#opencvhighgui#
tesseractinclude=
#tesseractlib=/usr/lib/libtesseract.so.3
tesseractlib=#tesseractlib#
#work=`pwd`
work=#work#
source=$work/Source
buildinclude=$work/Include
build=$work/Target
stuff=$build/Stuff
rm -R -f $build
mkdir $build
mkdir $stuff
if [ "$opencvinclude" != "" ]; then
includeplus="-I$opencvinclude "
fi
if [ "$tesseractinclude" != "" ]; then
includeplus="$includeplus -I$tesseractinclude "
fi
includefinal="-I/usr/include -I/usr/local/include $includeplus -I$buildinclude"
echo ----------- COMPILING
for mod in cvgui.cpp finder.cpp pyramid-template-matcher.cpp sikuli-debug.cpp \
tessocr.cpp vision.cpp visionJAVA_wrap.cxx
do
echo ----- $mod
g++ -c -O3 -fPIC -MMD -MP \
-I$jdkdir/include \
-I$jdkdir/include/linux \
$includefinal \
-MF $stuff/$mod.o.d \
-o $stuff/$mod.o \
$source/$mod
mods="$mods $stuff/$mod.o "
done
echo ----------- LINKING
g++ -shared -s -fPIC -dynamic $mods \
$opencvcore \
$opencvimgproc \
$opencvhighgui \
$tesseractlib \
-o $build/libVisionProxy.so
© 2015 - 2025 Weber Informatics LLC | Privacy Policy