blob: 9152129b896e8546de87dde56629dd51686441dc [file] [log] [blame]
Inaky Perez-Gonzalez8ddf82c2015-04-10 16:44:37 -07001
2if [ "X$(basename -- "$0")" == "Xvxmicro-env.bash" ]; then
3 echo "Source this file (do NOT execute it!) to set the VxMicro environment."
4 exit
5fi
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 Minchevbaa96592015-03-30 19:13:20 +010012export VXMICRO_BASE=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
Inaky Perez-Gonzalez8ddf82c2015-04-10 16:44:37 -070013
14# prepend VxMicro build system tools to PATH, if not already present
15vxmicro_linux_bin=${VXMICRO_BASE}/host/x86-linux2/bin
16echo "${PATH}" | grep -q "${vxmicro_linux_bin}"
17[ $? != 0 ] && export PATH=${vxmicro_linux_bin}:${PATH}
18unset vxmicro_linux_bin
19
20# enable custom environment settings
21vxmicro_answer_file=~/vxmicro-env_install.bash
22[ -f ${vxmicro_answer_file} ] && . ${vxmicro_answer_file}
23unset 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 Mitsis033957c2015-04-15 10:49:02 -040033# declare -x VXMICRO_GCC_DIR="<path to installation directory>"
Inaky Perez-Gonzalez8ddf82c2015-04-10 16:44:37 -070034# declare -x VXMICRO_ICC_DIR="<path>/icc/composer_xe_2013.1.117"