Subversion Repositories HelenOS-historic

Rev

Rev 446 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 446 Rev 455
Line 1... Line 1...
1
#! /bin/sh
1
#! /bin/sh
2
 
2
 
-
 
3
function syntax {
3
COMPILER=""
4
	echo "Syntax:"
-
 
5
	echo " build.<arch> [-compiler <compiler>] [-cpu <cpu>]"
-
 
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"
-
 
10
	echo
-
 
11
}
4
 
12
 
-
 
13
ARCH="`basename "$0" | awk -F. '{ if (NF > 1) print \$NF }'`"
-
 
14
if [ -z "$ARCH" ]; then
-
 
15
	syntax
-
 
16
	exit 1
-
 
17
fi
-
 
18
 
-
 
19
ARGS=""
5
while [ "$#" -gt 0 ]; do
20
while [ "$#" -gt 0 ]; do
6
	case "$1" in
21
	case "$1" in
7
		native)
22
		-compiler)
8
			COMPILER="$COMPILER NATIVE_COMPILER=yes"
23
			ARGS="$ARGS COMPILER=$2"
-
 
24
			shift
9
			;;
25
			;;
10
		strong)
26
		-cpu)
11
			COMPILER="$COMPILER STRONG_ORDERING=yes"
27
			ARGS="$ARGS CPU=$2"
-
 
28
			shift
12
			;;
29
			;;
13
		*)
30
		*)
14
			echo "Supported arguments: native strong"
31
			syntax
15
			exit 1
32
			exit 1
16
			;;
33
			;;
17
	esac
34
	esac
18
	shift
35
	shift
19
done
36
done
20
 
37
 
21
make all ARCH=ia32 $COMPILER
38
make all "ARCH=$ARCH" $ARGS
22
( cd uspace/libc && make all ARCH=ia32 $COMPILER )
-
 
23
( cd uspace && make all ARCH=ia32 $COMPILER )
-