Environment variables:
BUILD_NCPUS number of parallel make jobs (default: auto)
CROSS_COMPILE cross-compiler toolchain prefix (default: "")
+ CROSS_COMPILE_<ARCH> cross-compiler toolchain prefix for
+ architecture "ARCH". Substitute "ARCH" for any
+ supported architecture (default: "")
MAKEALL_LOGDIR output all logs to here (default: ./LOG/)
BUILD_DIR output build directory (default: ./)
BUILD_NBUILDS number of parallel targets (default: 1)
JOBS=""
fi
-
-if [ "${CROSS_COMPILE}" ] ; then
- MAKE="make CROSS_COMPILE=${CROSS_COMPILE}"
-else
- MAKE=make
-fi
-
if [ "${MAKEALL_LOGDIR}" ] ; then
LOG_DIR=${MAKEALL_LOGDIR}
else
echo "$mail"
}
+get_target_arch() {
+ local target=$1
+
+ # Automatic mode
+ local line=`egrep -i "^[[:space:]]*${target}[[:space:]]" boards.cfg`
+
+ if [ -z "${line}" ] ; then echo "" ; return ; fi
+
+ set ${line}
+ echo "$2"
+}
+
list_target() {
if [ "$PRINT_MAINTS" != 'y' ] ; then
echo "$1"
export BUILD_DIR="${output_dir}"
+ target_arch=$(get_target_arch ${target})
+ eval cross_toolchain=\$CROSS_COMPILE_${target_arch^^}
+ if [ "${cross_toolchain}" ] ; then
+ MAKE="make CROSS_COMPILE=${cross_toolchain}"
+ elif [ "${CROSS_COMPILE}" ] ; then
+ MAKE="make CROSS_COMPILE=${CROSS_COMPILE}"
+ else
+ MAKE=make
+ fi
+
${MAKE} distclean >/dev/null
${MAKE} -s ${target}_config