#! /bin/bash
if [ -z "${CROSS}" ]; then
echo 'Error: Environment variable CROSS is empty/unset. Aborting.' >&2
exit 1
fi
CCROOT="${HOME}/root/cross-compilers/${CROSS}"
CCROOTBIN="${CCROOT}/bin"
PATH="$(pwd)/build/fake-bin:${CCROOT}/${CROSS}/bin:${PATH}:${CCROOTBIN}"
AR="${CCROOTBIN}/${CROSS}-ar"
CC="${CCROOTBIN}/${CROSS}-gcc ${CC_ADD}"
CXX="${CCROOTBIN}/${CROSS}-g++ ${CC_ADD}"
RANLIB="${CCROOTBIN}/${CROSS}-ranlib"
STRIP="${CCROOTBIN}/${CROSS}-strip"
export PATH AR CC CXX RANLIB STRIP
./kitcreator "$@" --host="${CROSS}"