Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 36ec71cd6d
Fetching contributors…

Cannot retrieve contributors at this time

executable file 109 lines (96 sloc) 2.809 kb
#!/bin/bash
CPU="$1$2"
if [ "$2" == "v7le" ]; then
CPUDIR="$1le-v7"
BUSUFFIX="$1v7"
elif [ "$2" == "a9" ]; then
CPUDIR="$1le-v7"
CPU="$1v7le"
BUSUFFIX="$1v7"
CPUGEN="a9"
else
CPUDIR="$CPU"
BUSUFFIX="$1"
fi
if [ "$QCONF_OVERRIDE" != "" ]; then
cp -p $QCONF_OVERRIDE /tmp/owbqsk$$.mk
echo "all:" >>/tmp/owbqsk$$.mk
echo ' echo $(INSTALL_ROOT_nto)' >>/tmp/owbqsk$$.mk
STAGE_DIR=`make -s -f /tmp/owbqsk$$.mk`
rm /tmp/owbqsk$$.mk
fi
if [ "$STAGE_DIR" == "" ]; then
STAGE_DIR="$HOME/stage/nto"
echo Staging directory could not be determined. Using: $STAGE_DIR
else
echo Using staging directory: $STAGE_DIR
fi
if [ ! -z "$USE_ICECC" ] ; then
CC_COMMAND=icecc
echo "Using icecream for distributed compiling"
else
CC_COMMAND=$QNX_HOST/usr/bin/qcc
fi
if [ -z "$BUILDTYPE" ] ; then
BUILDTYPE="Release"
fi
if [ ! -z "$PROFILE" ] ; then
PROFILER_FLAGS="-p"
else
PROFILER_FLAGS=""
fi
STAGE_LIB="$STAGE_DIR/$CPUDIR/lib"
STAGE_USR_LIB="$STAGE_DIR/$CPUDIR/usr/lib"
STAGE_INC="$STAGE_DIR/usr/include"
TARGET_LIB="$QNX_TARGET/lib"
TARGET_USR_LIB="$QNX_TARGET/usr/lib"
TARGET_INC="$QNX_TARGET/usr/include"
COMP_PATHS=" \
-Wl,-rpath-link,$STAGE_LIB \
-Wl,-rpath-link,$STAGE_USR_LIB \
-L$STAGE_LIB \
-L$STAGE_USR_LIB \
-L$TARGET_LIB \
-L$TARGET_USR_LIB \
-I$STAGE_INC \
-I$STAGE_INC/freetype2 \
-I$TARGET_INC"
if [ "$CCWRAP" ] ; then
CMAKE_EXTRA_OPTIONS=" \
-DCMAKE_C_COMPILER_ARG1=qcc \
-DCMAKE_CXX_COMPILER_ARG1=qcc"
CC_COMMAND="$CCWRAP"
fi
if [ "$CPUGEN" == "a9" ] ; then
CMAKE_EXTRA_OPTIONS=" \
-DTARGET_IS_WINCHESTER=1 \
$CMAKE_EXTRA_OPTIONS"
fi
if [ `uname` == "Darwin" ] ; then
CMAKE_EXTRA_OPTIONS=" \
-DCMAKE_SKIP_RPATH='ON' \
$CMAKE_EXTRA_OPTIONS"
fi
cmake \
-DCMAKE_SYSTEM_PROCESSOR="$CPUDIR" \
-DCMAKE_SYSTEM_NAME="QNX" \
-DCMAKE_SYSTEM_VERSION="1" \
-DCMAKE_BUILD_TYPE="$BUILDTYPE" \
-DCMAKE_C_COMPILER="$CC_COMMAND" \
-DCMAKE_CXX_COMPILER="$CC_COMMAND" \
-DCMAKE_C_FLAGS="-Vgcc_nto$CPU -fpic -g $COMP_PATHS $PROFILER_FLAGS" \
-DCMAKE_CXX_FLAGS="-Vgcc_nto${CPU} -Y_gpp -fpic -g -lang-c++ $COMP_PATHS $PROFILER_FLAGS" \
-DCMAKE_INCLUDE_PATH="$STAGE_INC;$STAGE_INC/skia" \
-DCMAKE_LIBRARY_PATH="$STAGE_LIB;$STAGE_USR_LIB" \
-DCMAKE_INSTALL_PREFIX="$STAGE_DIR" \
-DCMAKE_OPENCV_GCC_VERSION="42" \
-DCMAKE_OPENCV_GCC_VERSION_NUM="402" \
-DCMAKE_AR="$QNX_HOST/usr/bin/nto$BUSUFFIX-ar" \
-DCMAKE_RANLIB="$QNX_HOST/usr/bin/nto$BUSUFFIX-ranlib" \
-DCMAKE_LD="$QNX_HOST/usr/bin/nto$BUSUFFIX-ld" \
-DCMAKE_LINKER="$QNX_HOST/usr/bin/nto$BUSUFFIX-ld" \
-DECLIPSE_CDT4_GENERATE_SOURCE_PROJECT=TRUE \
-DQNX=1 \
-G"Eclipse CDT4 - Unix Makefiles" \
$CMAKE_EXTRA_OPTIONS \
$3 ../
Jump to Line
Something went wrong with that request. Please try again.