reduce firmware and sun audio codec.
[kugel-rb.git] / tools / checkwps / buildall.sh
blobcb01ad9036c9af47e6d530511c4789e08c5a5290
1 #!/bin/sh
2 rootdir=`dirname $0`
3 toolsdir=$rootdir/..
4 outdir=$rootdir/output
5 jobs="1"
6 err="0"
8 mkdir -p $outdir
10 print_help() {
11 echo "Build Checkwps for every target in targets.txt."
12 echo "The binaries are put into in '$outdir'"
13 echo ""
14 cat <<EOF
15 Usage: build-all.sh [OPTION]...
16 Options:
17 --jobs=NUMBER Let make use NUMBER jobs (default is 1)
19 EOF
20 exit
23 for arg in "$@"; do
24 case "$arg" in
25 --jobs=*) jobs=`echo "$arg" | cut -d = -f 2`;;
26 -h|--help) print_help;;
27 *) err="1"; echo "[ERROR] Option '$arg' unsupported";;
28 esac
29 done
31 if [ -z $jobs ] || [ $jobs -le "0" ]
32 then
33 echo "[ERROR] jobs must be a positive number"
34 err="1"
37 if [ $err -ge "1" ]
38 then
39 echo "An error occured. Aborting"
40 exit
43 awk -f $rootdir/parse_configure.awk $rootdir/../configure | (
44 while read target model
46 make -j $jobs clean
47 $toolsdir/configure --target=$model --type=C --ram=32 # 32 should always give default RAM
48 make -j $jobs
49 mv checkwps.$model $outdir
50 done