setupenvLnx.sh: search more places for cgt
[keystone-rtos/ibl.git] / src / make / setupenvLnx.sh
1 #!/bin/bash
2 export OS="Linux"
4 if [ -z $C6X_CGT_VERSION ]; then
5     C6X_CGT_VERSION=7.2.1
6 fi
8 if [ -z "$C6X_BASE_DIR" ]; then
9         for dir in {~,}{,/opt}/{ti,TI,texas_instruments}/TI_CGT_C6000_${C6X_CGT_VERSION} {~,}{,/opt}/{ti,texas_instruments}/ccsv5/tools/compiler/c6000 ; do
10                 if [ -x $dir/bin/cl6x ]; then
11                         C6X_BASE_DIR=$dir
12                         break
13                 fi
14         done
15 fi
17 if [ ! -x $C6X_BASE_DIR/bin/cl6x ] ; then
18         echo "You must define the C6X_BASE_DIR to point to TI CGT compiler for C6000"
19         exit 2
20 fi
22 #make sure its exported
23 export C6X_BASE_DIR
25 export PATH=$C6X_BASE_DIR/bin:$PATH
26 export TOOLSC6X=$C6X_BASE_DIR
27 export TOOLSC6XDOS=$C6X_BASE_DIR
28 export TOOLSBIOSC6XDOS=$C6X_BASE_DIR