[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 |
---|
[134] | 27 | export MORPHEO_LOCALIZATION="labs_network"; |
---|
[132] | 28 | export MORPHEO_TOPLEVEL=${PWD}; |
---|
| 29 | export MORPHEO_SCRIPT=${MORPHEO_TOPLEVEL}/IPs/systemC/processor/Morpheo/Script; |
---|
| 30 | export MORPHEO_HOME=${HOME}/.Morpheo; |
---|
| 31 | MORPHEO_XTTY=${MORPHEO_TOPLEVEL}/IPs/systemC/Environment/TTY/xtty; |
---|
[2] | 32 | |
---|
[132] | 33 | case ${MORPHEO_LOCALIZATION} in |
---|
[134] | 34 | "labs_network") |
---|
[132] | 35 | export MORPHEO_PREFIX=/users/chaos/kane/Morpheo; |
---|
| 36 | export MORPHEO_TMP=${MORPHEO_PREFIX}; |
---|
| 37 | ;; |
---|
[134] | 38 | "labs_local") |
---|
| 39 | export MORPHEO_PREFIX=/dsk/l1/misc/Morpheo; |
---|
| 40 | export MORPHEO_TMP=${MORPHEO_PREFIX}; |
---|
| 41 | ;; |
---|
[132] | 42 | "home") |
---|
| 43 | export MORPHEO_PREFIX=${HOME}/tmp/Morpheo; |
---|
| 44 | export MORPHEO_TMP=${MORPHEO_PREFIX}; |
---|
| 45 | ;; |
---|
| 46 | *) |
---|
| 47 | echo "Bad localization : \"${MORPHEO_LOCALIZATION}\""; |
---|
| 48 | ;; |
---|
| 49 | esac |
---|
| 50 | |
---|
[15] | 51 | echo "" |
---|
[88] | 52 | echo "OS found : ${OS_FOUND}" |
---|
[2] | 53 | echo "" |
---|
[88] | 54 | echo "Modification of environement's variable :" |
---|
[132] | 55 | echo " - MORPHEO_LOCALIZATION is set to ${MORPHEO_LOCALIZATION}" |
---|
| 56 | echo " - MORPHEO_TOPLEVEL is set to ${MORPHEO_TOPLEVEL}" |
---|
| 57 | echo " - MORPHEO_SCRIPT is set to ${MORPHEO_SCRIPT}" |
---|
| 58 | echo " - MORPHEO_HOME is set to ${MORPHEO_HOME}" |
---|
| 59 | echo " - MORPHEO_PREFIX is set to ${MORPHEO_PREFIX}" |
---|
| 60 | echo " - MORPHEO_TMP is set to ${MORPHEO_TMP}" |
---|
[15] | 61 | |
---|
[88] | 62 | #---------- |
---|
| 63 | # Path : add xtty and script directory. |
---|
| 64 | # test if already in path : no multiple addition |
---|
| 65 | #---------- |
---|
[81] | 66 | |
---|
[15] | 67 | echo ${PATH} |grep -q ${MORPHEO_SCRIPT}; |
---|
| 68 | if test $? -eq 1; then |
---|
[79] | 69 | export PATH=${PATH}:${MORPHEO_SCRIPT} |
---|
[88] | 70 | echo " - PATH add ${MORPHEO_SCRIPT}" |
---|
[15] | 71 | fi; |
---|
| 72 | |
---|
[81] | 73 | echo ${PATH} |grep -q ${MORPHEO_XTTY}; |
---|
| 74 | |
---|
| 75 | if test $? -eq 1; then |
---|
| 76 | export PATH=${PATH}:${MORPHEO_XTTY} |
---|
[88] | 77 | echo " - PATH add ${MORPHEO_XTTY}" |
---|
[81] | 78 | fi; |
---|
| 79 | |
---|
[15] | 80 | echo "" |
---|