diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-08-02 12:06:07 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-08-02 12:06:07 +0000 |
commit | 60fe9dfa4a8e268e2f11476c919248c07fc3a0ef (patch) | |
tree | c54e2c00039af6a4d9bc135632793268afdad248 /tools | |
parent | 4f26c288ca839776c24afbe3d323b753f0c394c8 (diff) |
Adjustments to allow generating a Makefile for building win32 simulator
cross-compiled. Based on the excellent patch from Bill Napier.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1517 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/configure | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/tools/configure b/tools/configure index 62a3f1ee3c..b689e2a120 100755 --- a/tools/configure +++ b/tools/configure @@ -17,22 +17,43 @@ input() { } simul () { + +if [ -z "$simver" ]; then + + ################################################################## + # Figure out win32/x11 GUI + # + echo "" + echo "Build (W)in32 or (X)11 GUI version? (X)" + + option=`input`; + + case $option in + [Ww]) + simver="win32" + ;; + *) + simver="x11" + ;; + esac +fi + ################################################################## # Figure out where the firmware code is! # - simfile="x11/lcd-x11.c" # a file to check for in the uisimulator root dir + simfile="$simver/lcd-$simver.c" # a file to check for in the uisimulator root dir for dir in uisimulator . .. ../uisimulator ../../uisimulator; do if [ -f "$dir/$simfile" ]; then - simdir="$dir/x11" + simdir="$dir/$simver" break fi done if [ -z "$simdir" ]; then - echo "This script couldn't find your uisimulator/x11 directory. Please enter the" - echo "full path to your uisimulator/x11 directory here:" + echo "This script couldn't find your uisimulator/$simver directory. Please enter the" + echo "full path to your uisimulator/$simver directory here:" simdir=`input` fi @@ -44,6 +65,7 @@ sed > Makefile \ -e "s,@DISPLAY@,${display},g" \ -e "s,@KEYPAD@,${keypad},g" \ -e "s,@PWD@,${pwd},g" \ + -e "s,@SIMVER@,${simver},g" \ <<EOF ## Automaticly generated. http://bjorn.haxx.se/rockbox/ @@ -53,6 +75,7 @@ TARGET=@TARGET@ DISPLAY=@DISPLAY@ KEYPAD=@KEYPAD@ THISDIR="@PWD@" +SIMVER=@SIMVER@ VERSION=\$(shell date +%y%m%d-%H%M) .PHONY: @@ -103,6 +126,7 @@ if [ "$target" = "update" ]; then simulator="yes" display=`grep "^DISPLAY=" Makefile | cut -d= -f2-` keypad=`grep "^KEYPAD=" Makefile | cut -d= -f2-` + simver=`grep "^SIMVER=" Makefile | cut -d= -f2-` fi fi fi |