summaryrefslogtreecommitdiffstats
path: root/tools/checkwps
diff options
context:
space:
mode:
Diffstat (limited to 'tools/checkwps')
-rw-r--r--tools/checkwps/Makefile36
-rwxr-xr-xtools/checkwps/buildall.sh46
-rwxr-xr-xtools/checkwps/cleanall.sh7
-rw-r--r--tools/checkwps/targets.txt6
4 files changed, 52 insertions, 43 deletions
diff --git a/tools/checkwps/Makefile b/tools/checkwps/Makefile
deleted file mode 100644
index faa75efac3..0000000000
--- a/tools/checkwps/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-# __________ __ ___.
-# Open \______ \ ____ ____ | | _\_ |__ _______ ___
-# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
-# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
-# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
-# \/ \/ \/ \/ \/
-# $Id$
-#
-
-ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
-CFLAGS+=-mno-cygwin
-EXT = .exe
-else
-ifeq ($(findstring MINGW,$(shell uname)),MINGW)
-EXT = .exe
-CC = mingw32-gcc
-endif
-endif
-
-# This is a wrapper for checkwps.make
-APPSDIR=.
-ROOTDIR=../..
-BUILDDIR=.
-BINARY=checkwps.$(MODELNAME)$(EXT)
-HOSTCC=$(CC)
-TARGET=-D$(TARGETNAME)
-include checkwps.make
-
-all:
- @echo To build, run the buildall.sh script
-
-checkwps: $(BUILDDIR)/$(BINARY)
- @echo foo > /dev/null
-
-clean:
- rm -f checkwps.$(MODELNAME)$(EXT)
diff --git a/tools/checkwps/buildall.sh b/tools/checkwps/buildall.sh
index b66bee224c..9bc937fa56 100755
--- a/tools/checkwps/buildall.sh
+++ b/tools/checkwps/buildall.sh
@@ -1,11 +1,51 @@
#!/bin/sh
rootdir=`dirname $0`
+toolsdir=$rootdir/..
+outdir=$rootdir/output
+jobs="1"
+err="0"
+
+mkdir -p $outdir
+
+print_help() {
+ echo "Build Checkwps for every target in targets.txt."
+ echo "The binaries are put into in '$outdir'"
+ echo ""
+ cat <<EOF
+ Usage: build-all.sh [OPTION]...
+ Options:
+ --jobs=NUMBER Let make use NUMBER jobs (default is 1)
+
+EOF
+exit
+}
+
+for arg in "$@"; do
+ case "$arg" in
+ --jobs=*) jobs=`echo "$arg" | cut -d = -f 2`;;
+ -h|--help) print_help;;
+ *) err="1"; echo "[ERROR] Option '$arg' unsupported";;
+ esac
+done
+
+if [ -z $jobs ] || [ $jobs -le "0" ]
+then
+ echo "[ERROR] jobs must be a positive number"
+ err="1"
+fi
+
+if [ $err -ge "1" ]
+then
+ echo "An error occured. Aborting"
+ exit
+fi
cat $rootdir/targets.txt | (
while read target model
do
- rm -f checkwps.$model
- make -s -C $rootdir MODELNAME=$model TARGETNAME=$target checkwps
- mv $rootdir/checkwps.$model ./checkwps.$model > /dev/null 2>&1
+ make -j $jobs clean
+ $toolsdir/configure --target=$model --type=C --ram=32 # 32 should always give default RAM
+ make -j $jobs
+ mv checkwps.$model $outdir
done
)
diff --git a/tools/checkwps/cleanall.sh b/tools/checkwps/cleanall.sh
index 860c3afae2..19a3aec6fb 100755
--- a/tools/checkwps/cleanall.sh
+++ b/tools/checkwps/cleanall.sh
@@ -1,9 +1,14 @@
#!/bin/sh
rootdir=`dirname $0`
+outdir=$rootdir/output
+make clean # make clean the build dir first
+rm -f autoconf.h
+rm -f Makefile
cat $rootdir/targets.txt | (
while read target model
do
- rm -f checkwps.$model
+ rm -f $outdir/checkwps.$model # then delete any output/checkwps.*
+ rmdir $outdir > /dev/null 2>&1
done
)
diff --git a/tools/checkwps/targets.txt b/tools/checkwps/targets.txt
index d14cff93b8..33684b75a7 100644
--- a/tools/checkwps/targets.txt
+++ b/tools/checkwps/targets.txt
@@ -26,9 +26,9 @@ GIGABEAT_S gigabeats
MROBE_500 mrobe500
MROBE_100 mrobe100
LOGIK_DAX logikdax
-CREATIVE_ZVM creativezvm
-CREATIVE_ZVM60GB creativezvm60
-CREATIVE_ZV creativezv
+CREATIVE_ZVM creativezvm30gb
+CREATIVE_ZVM60GB creativezvm60gb
+CREATIVE_ZV creativezenvision
SANSA_E200 e200
SANSA_E200 e200r
SANSA_C200 c200