1 | #!/bin/sh |
---|
2 | |
---|
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 |
---|
6 | # "SunOS-sun4X") |
---|
7 | # export TARGET_ARCH=gccsparcOS5 |
---|
8 | # export EXE_SUFFIX= |
---|
9 | # ;; |
---|
10 | "Linux-iX86") |
---|
11 | export TARGET_ARCH=linux |
---|
12 | export EXE_SUFFIX= |
---|
13 | ;; |
---|
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 | # ;; |
---|
22 | *) |
---|
23 | echo "Unknown OS found" |
---|
24 | esac |
---|
25 | |
---|
26 | # Export environement |
---|
27 | export MORPHEO_LOCALIZATION="labs_network"; |
---|
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; |
---|
32 | |
---|
33 | case ${MORPHEO_LOCALIZATION} in |
---|
34 | "labs_network") |
---|
35 | export MORPHEO_PREFIX=/users/chaos/kane/Morpheo; |
---|
36 | export MORPHEO_TMP=${MORPHEO_PREFIX}; |
---|
37 | ;; |
---|
38 | "labs_local") |
---|
39 | export MORPHEO_PREFIX=/dsk/l1/misc/Morpheo; |
---|
40 | export MORPHEO_TMP=${MORPHEO_PREFIX}; |
---|
41 | ;; |
---|
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 | |
---|
51 | echo "" |
---|
52 | echo "OS found : ${OS_FOUND}" |
---|
53 | echo "" |
---|
54 | echo "Modification of environement's variable :" |
---|
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}" |
---|
61 | |
---|
62 | #---------- |
---|
63 | # Path : add xtty and script directory. |
---|
64 | # test if already in path : no multiple addition |
---|
65 | #---------- |
---|
66 | |
---|
67 | echo ${PATH} |grep -q ${MORPHEO_SCRIPT}; |
---|
68 | if test $? -eq 1; then |
---|
69 | export PATH=${PATH}:${MORPHEO_SCRIPT} |
---|
70 | echo " - PATH add ${MORPHEO_SCRIPT}" |
---|
71 | fi; |
---|
72 | |
---|
73 | echo ${PATH} |grep -q ${MORPHEO_XTTY}; |
---|
74 | |
---|
75 | if test $? -eq 1; then |
---|
76 | export PATH=${PATH}:${MORPHEO_XTTY} |
---|
77 | echo " - PATH add ${MORPHEO_XTTY}" |
---|
78 | fi; |
---|
79 | |
---|
80 | echo "" |
---|