2015-06-20 21:18:41 +02:00
|
|
|
#!/usr/bin/env bash
|
2012-10-10 14:30:27 +02:00
|
|
|
|
|
|
|
|
export LC_ALL=C
|
|
|
|
|
|
|
|
|
|
ARCH=$(uname -m)
|
|
|
|
|
if [ "$ARCH" = "x86_64" ]; then
|
|
|
|
|
LIBSPATH=linux64
|
|
|
|
|
else
|
|
|
|
|
LIBSPATH=linux
|
|
|
|
|
fi
|
|
|
|
|
|
2015-07-03 09:48:16 +02:00
|
|
|
pushd `dirname $0` > /dev/null
|
2023-11-28 02:45:42 -03:00
|
|
|
SCRIPTPATH="$(pwd)"
|
2015-07-03 09:48:16 +02:00
|
|
|
popd > /dev/null
|
|
|
|
|
|
2015-07-03 14:54:09 +02:00
|
|
|
BUILD="install"
|
2015-10-12 09:31:34 +02:00
|
|
|
JOBS=1
|
|
|
|
|
while getopts tj: opt ; do
|
2015-07-03 14:54:09 +02:00
|
|
|
case "$opt" in
|
2015-10-12 09:31:34 +02:00
|
|
|
t) # testing, only build Debug
|
|
|
|
|
BUILD="test" ;;
|
|
|
|
|
j) # make job count for parallel build
|
|
|
|
|
JOBS="$OPTARG"
|
2015-07-03 14:54:09 +02:00
|
|
|
esac
|
|
|
|
|
done
|
|
|
|
|
|
2023-11-28 02:45:42 -03:00
|
|
|
cd "${SCRIPTPATH}/../../libs/openFrameworksCompiled/project"
|
2015-10-12 09:31:34 +02:00
|
|
|
make -j$JOBS Debug
|
2012-10-10 14:30:27 +02:00
|
|
|
exit_code=$?
|
|
|
|
|
if [ $exit_code != 0 ]; then
|
|
|
|
|
echo "there has been a problem compiling Debug OF library"
|
|
|
|
|
echo "please report this problem in the forums"
|
|
|
|
|
exit $exit_code
|
|
|
|
|
fi
|
|
|
|
|
|
2015-07-03 14:54:09 +02:00
|
|
|
if [ "$BUILD" == "install" ]; then
|
2015-10-12 09:31:34 +02:00
|
|
|
make -j$JOBS Release
|
2015-07-03 14:54:09 +02:00
|
|
|
exit_code=$?
|
|
|
|
|
if [ $exit_code != 0 ]; then
|
|
|
|
|
echo "there has been a problem compiling Release OF library"
|
|
|
|
|
echo "please report this problem in the forums"
|
|
|
|
|
exit $exit_code
|
|
|
|
|
fi
|
2012-10-10 14:30:27 +02:00
|
|
|
fi
|