Subversion Repositories HelenOS-historic

Rev

Rev 446 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
43 jermar 1
#! /bin/sh
2
 
455 decky 3
function syntax {
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
}
328 jermar 12
 
455 decky 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=""
423 decky 20
while [ "$#" -gt 0 ]; do
21
	case "$1" in
455 decky 22
		-compiler)
23
			ARGS="$ARGS COMPILER=$2"
24
			shift
423 decky 25
			;;
455 decky 26
		-cpu)
27
			ARGS="$ARGS CPU=$2"
28
			shift
423 decky 29
			;;
30
		*)
455 decky 31
			syntax
423 decky 32
			exit 1
33
			;;
34
	esac
35
	shift
36
done
328 jermar 37
 
455 decky 38
make all "ARCH=$ARCH" $ARGS