[2] | 1 | #!/bin/sh |
---|
| 2 | |
---|
[15] | 3 | declare OS_FOUND=`uname -s`-`uname -m | sed -e 's/i[0-9]/iX/' -e 's/sun4./sun4X/'` |
---|
| 4 | |
---|
| 5 | case ${OS_FOUND} in |
---|
[59] | 6 | # "SunOS-sun4X") |
---|
| 7 | # export TARGET_ARCH=gccsparcOS5 |
---|
| 8 | # export EXE_SUFFIX= |
---|
| 9 | # ;; |
---|
[2] | 10 | "Linux-iX86") |
---|
| 11 | export TARGET_ARCH=linux |
---|
| 12 | export EXE_SUFFIX= |
---|
| 13 | ;; |
---|
[59] | 14 | # "FreeBSD-iX86") |
---|
| 15 | # export TARGET_ARCH=freebsd |
---|
| 16 | # export EXE_SUFFIX= |
---|
| 17 | # ;; |
---|
| 18 | # "CYGWIN_NT-5.1-iX86") |
---|
| 19 | # export TARGET_ARCH=cygwin |
---|
| 20 | # export EXE_SUFFIX=.exe |
---|
| 21 | # ;; |
---|
[2] | 22 | *) |
---|
| 23 | echo "Unknown OS found" |
---|
| 24 | esac |
---|
| 25 | |
---|
[15] | 26 | # Export environement |
---|
[79] | 27 | export MORPHEO_TOPLEVEL=${PWD} |
---|
[82] | 28 | export MORPHEO_SCRIPT=${MORPHEO_TOPLEVEL}/IPs/systemC/processor/Morpheo/Script |
---|
[88] | 29 | export MORPHEO_HOME=${HOME}/.Morpheo |
---|
[130] | 30 | export MORPHEO_PREFIX=/users/chaos/kane/Morpheo |
---|
[123] | 31 | #export MORPHEO_TMP=${HOME}/tmp/Morpheo |
---|
[130] | 32 | #export MORPHEO_TMP=/dsk/l1/misc/Morpheo |
---|
| 33 | export MORPHEO_TMP=${MORPHEO_PREFIX} |
---|
[88] | 34 | MORPHEO_XTTY=${MORPHEO_TOPLEVEL}/IPs/systemC/Environment/TTY/xtty |
---|
[2] | 35 | |
---|
[15] | 36 | echo "" |
---|
[88] | 37 | echo "OS found : ${OS_FOUND}" |
---|
[2] | 38 | echo "" |
---|
[88] | 39 | echo "Modification of environement's variable :" |
---|
| 40 | echo " - MORPHEO_TOPLEVEL is set to ${MORPHEO_TOPLEVEL}" |
---|
| 41 | echo " - MORPHEO_SCRIPT is set to ${MORPHEO_SCRIPT}" |
---|
| 42 | echo " - MORPHEO_HOME is set to ${MORPHEO_HOME}" |
---|
[130] | 43 | echo " - MORPHEO_PREFIX is set to ${MORPHEO_PREFIX}" |
---|
[88] | 44 | echo " - MORPHEO_TMP is set to ${MORPHEO_TMP}" |
---|
[15] | 45 | |
---|
[88] | 46 | #---------- |
---|
| 47 | # Path : add xtty and script directory. |
---|
| 48 | # test if already in path : no multiple addition |
---|
| 49 | #---------- |
---|
[81] | 50 | |
---|
[15] | 51 | echo ${PATH} |grep -q ${MORPHEO_SCRIPT}; |
---|
| 52 | if test $? -eq 1; then |
---|
[79] | 53 | export PATH=${PATH}:${MORPHEO_SCRIPT} |
---|
[88] | 54 | echo " - PATH add ${MORPHEO_SCRIPT}" |
---|
[15] | 55 | fi; |
---|
| 56 | |
---|
[81] | 57 | echo ${PATH} |grep -q ${MORPHEO_XTTY}; |
---|
| 58 | |
---|
| 59 | if test $? -eq 1; then |
---|
| 60 | export PATH=${PATH}:${MORPHEO_XTTY} |
---|
[88] | 61 | echo " - PATH add ${MORPHEO_XTTY}" |
---|
[81] | 62 | fi; |
---|
| 63 | |
---|
[15] | 64 | echo "" |
---|