source: mainline/build.ia32@ 6e259d5

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 6e259d5 was 389f41e, checked in by Martin Decky <martin@…>, 20 years ago

new build system almost finished

  • Property mode set to 100755
File size: 954 bytes
Line 
1#! /bin/sh
2
3function syntax {
4 echo "Syntax:"
5 echo " build.<arch> [-compiler <compiler>] [-cpu <cpu>] [-machine <machine>]"
6 echo
7 echo "<arch> ... amd64, *ia32, ia64, mips32, ppc32, sparc64"
8 echo "<compiler> ... native, *cross"
9 echo "<cpu> ... for ia32: athlon-xp, athlon-mp, pentium3, *pentium4, prescott"
10 echo "<machine> ... for mips32: *msim, msim4kc, simics, lgxemul, bgxemul, indy"
11 echo
12}
13
14ARCH="`basename "$0" | awk -F. '{ if (NF > 1) print \$NF }'`"
15if [ -z "$ARCH" ]; then
16 syntax
17 exit 1
18fi
19
20ARGS=""
21while [ "$#" -gt 0 ]; do
22 case "$1" in
23 -compiler)
24 if [ -z "$2" ]; then
25 syntax
26 exit 1
27 fi
28 ARGS="$ARGS COMPILER=$2"
29 shift
30 ;;
31 -cpu)
32 if [ -z "$2" ]; then
33 syntax
34 exit 1
35 fi
36 ARGS="$ARGS CPU=$2"
37 shift
38 ;;
39 -machine)
40 if [ -z "$2" ]; then
41 syntax
42 exit 1
43 fi
44 ARGS="$ARGS MACHINE=$2"
45 shift
46 ;;
47 *)
48 syntax
49 exit 1
50 ;;
51 esac
52 shift
53done
54
55make all "ARCH=$ARCH" $ARGS
Note: See TracBrowser for help on using the repository browser.