source: trunk/environment.sh @ 136

Last change on this file since 136 was 134, checked in by rosiere, 15 years ago

1) valgrind fix
2) debug file on/off

  • Property svn:keywords set to Id
File size: 2.1 KB
RevLine 
[2]1#!/bin/sh
2
[15]3declare OS_FOUND=`uname -s`-`uname -m | sed -e 's/i[0-9]/iX/' -e 's/sun4./sun4X/'`
4
5case ${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"
24esac
25
[15]26# Export environement
[134]27export MORPHEO_LOCALIZATION="labs_network";
[132]28export MORPHEO_TOPLEVEL=${PWD};
29export MORPHEO_SCRIPT=${MORPHEO_TOPLEVEL}/IPs/systemC/processor/Morpheo/Script;
30export MORPHEO_HOME=${HOME}/.Morpheo;
31       MORPHEO_XTTY=${MORPHEO_TOPLEVEL}/IPs/systemC/Environment/TTY/xtty;
[2]32
[132]33case ${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        ;;
49esac
50
[15]51echo ""
[88]52echo "OS found : ${OS_FOUND}"
[2]53echo ""
[88]54echo "Modification of environement's variable :"
[132]55echo " - MORPHEO_LOCALIZATION is set to ${MORPHEO_LOCALIZATION}"
56echo " - MORPHEO_TOPLEVEL     is set to ${MORPHEO_TOPLEVEL}"
57echo " - MORPHEO_SCRIPT       is set to ${MORPHEO_SCRIPT}"
58echo " - MORPHEO_HOME         is set to ${MORPHEO_HOME}"
59echo " - MORPHEO_PREFIX       is set to ${MORPHEO_PREFIX}"
60echo " - 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]67echo ${PATH} |grep -q ${MORPHEO_SCRIPT};
68if test $? -eq 1; then
[79]69    export  PATH=${PATH}:${MORPHEO_SCRIPT}
[88]70    echo " - PATH             add       ${MORPHEO_SCRIPT}"
[15]71fi;
72
[81]73echo ${PATH} |grep -q ${MORPHEO_XTTY};
74
75if test $? -eq 1; then
76    export  PATH=${PATH}:${MORPHEO_XTTY}
[88]77    echo " - PATH             add       ${MORPHEO_XTTY}"
[81]78fi;
79
[15]80echo ""
Note: See TracBrowser for help on using the repository browser.