| 1 | #!/bin/csh -f |
| 2 | # ========== Copyright Header Begin ========================================== |
| 3 | # |
| 4 | # OpenSPARC T2 Processor File: build_obp.sh |
| 5 | # Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved. |
| 6 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES. |
| 7 | # |
| 8 | # The above named program is free software; you can redistribute it and/or |
| 9 | # modify it under the terms of the GNU General Public |
| 10 | # License version 2 as published by the Free Software Foundation. |
| 11 | # |
| 12 | # The above named program is distributed in the hope that it will be |
| 13 | # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | # General Public License for more details. |
| 16 | # |
| 17 | # You should have received a copy of the GNU General Public |
| 18 | # License along with this work; if not, write to the Free Software |
| 19 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. |
| 20 | # |
| 21 | # ========== Copyright Header End ============================================ |
| 22 | |
| 23 | if ($1 == "") then |
| 24 | setenv TARG |
| 25 | else if (($1 != "install") && ($1 != "clean")) then |
| 26 | echo "Usage: $0 type" |
| 27 | echo "Where type = install or clean" |
| 28 | echo "e.g. $0 install" |
| 29 | exit |
| 30 | else |
| 31 | setenv TARG $1 |
| 32 | endif |
| 33 | |
| 34 | if ("`env | grep SIM_ROOT`" == "" ) then |
| 35 | echo "$0 : SIM_ROOT not defined." |
| 36 | echo " Please define SIM_ROOT and then re-run $0" |
| 37 | exit |
| 38 | endif |
| 39 | |
| 40 | setenv OS `uname -s` |
| 41 | setenv CPU `uname -p` |
| 42 | |
| 43 | if ($OS == "SunOS") then |
| 44 | if ("`env | grep SUN_STUDIO`" == "" ) then |
| 45 | echo "$0 : SUN_STUDIO not defined." |
| 46 | echo " Please define SUN_STUDIO and then re-run $0" |
| 47 | exit |
| 48 | endif |
| 49 | endif |
| 50 | |
| 51 | setenv SRC_DIR $SIM_ROOT/obp/obp/arch/sun4v/niagara2/release |
| 52 | |
| 53 | cd $SRC_DIR |
| 54 | make $TARG |
| 55 | |