Inaky Perez-Gonzalez | 8ddf82c | 2015-04-10 16:44:37 -0700 | [diff] [blame] | 1 | |
| 2 | if [ "X$(basename -- "$0")" == "Xvxmicro-env.bash" ]; then |
| 3 | echo "Source this file (do NOT execute it!) to set the VxMicro environment." |
| 4 | exit |
| 5 | fi |
| 6 | |
| 7 | # You can further customize your environment by creating a bash script called |
| 8 | # vxmicro-env_install.bash in your home directory. It will be automatically |
| 9 | # run (if it exists) by this script. |
| 10 | |
| 11 | # identify OS source tree root directory |
Todor Minchev | baa9659 | 2015-03-30 19:13:20 +0100 | [diff] [blame] | 12 | export VXMICRO_BASE=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
Inaky Perez-Gonzalez | 8ddf82c | 2015-04-10 16:44:37 -0700 | [diff] [blame] | 13 | |
| 14 | # prepend VxMicro build system tools to PATH, if not already present |
| 15 | vxmicro_linux_bin=${VXMICRO_BASE}/host/x86-linux2/bin |
| 16 | echo "${PATH}" | grep -q "${vxmicro_linux_bin}" |
| 17 | [ $? != 0 ] && export PATH=${vxmicro_linux_bin}:${PATH} |
| 18 | unset vxmicro_linux_bin |
| 19 | |
| 20 | # enable custom environment settings |
| 21 | vxmicro_answer_file=~/vxmicro-env_install.bash |
| 22 | [ -f ${vxmicro_answer_file} ] && . ${vxmicro_answer_file} |
| 23 | unset vxmicro_answer_file |
| 24 | |
| 25 | # examples of custom settings to place in vxmicro-env_install.bash |
| 26 | # |
| 27 | # 1) create useful aliases |
| 28 | # alias GCC='export VXMICRO_TOOL=gcc' |
| 29 | # alias ICC='export VXMICRO_TOOL=icc' |
| 30 | # alias VIP='export | grep VXMICRO' |
| 31 | # |
| 32 | # 2) specify toolchain location |
Peter Mitsis | 033957c | 2015-04-15 10:49:02 -0400 | [diff] [blame] | 33 | # declare -x VXMICRO_GCC_DIR="<path to installation directory>" |
Inaky Perez-Gonzalez | 8ddf82c | 2015-04-10 16:44:37 -0700 | [diff] [blame] | 34 | # declare -x VXMICRO_ICC_DIR="<path>/icc/composer_xe_2013.1.117" |