summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-08-02 12:06:07 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-08-02 12:06:07 +0000
commit60fe9dfa4a8e268e2f11476c919248c07fc3a0ef (patch)
treec54e2c00039af6a4d9bc135632793268afdad248
parent4f26c288ca839776c24afbe3d323b753f0c394c8 (diff)
downloadrockbox-60fe9dfa4a8e268e2f11476c919248c07fc3a0ef.tar.gz
rockbox-60fe9dfa4a8e268e2f11476c919248c07fc3a0ef.zip
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
-rwxr-xr-xtools/configure32
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() {
17} 17}
18 18
19simul () { 19simul () {
20
21if [ -z "$simver" ]; then
22
23 ##################################################################
24 # Figure out win32/x11 GUI
25 #
26 echo ""
27 echo "Build (W)in32 or (X)11 GUI version? (X)"
28
29 option=`input`;
30
31 case $option in
32 [Ww])
33 simver="win32"
34 ;;
35 *)
36 simver="x11"
37 ;;
38 esac
39fi
40
20 ################################################################## 41 ##################################################################
21 # Figure out where the firmware code is! 42 # Figure out where the firmware code is!
22 # 43 #
23 44
24 simfile="x11/lcd-x11.c" # a file to check for in the uisimulator root dir 45 simfile="$simver/lcd-$simver.c" # a file to check for in the uisimulator root dir
25 46
26 for dir in uisimulator . .. ../uisimulator ../../uisimulator; do 47 for dir in uisimulator . .. ../uisimulator ../../uisimulator; do
27 if [ -f "$dir/$simfile" ]; then 48 if [ -f "$dir/$simfile" ]; then
28 simdir="$dir/x11" 49 simdir="$dir/$simver"
29 break 50 break
30 fi 51 fi
31 done 52 done
32 53
33 if [ -z "$simdir" ]; then 54 if [ -z "$simdir" ]; then
34 echo "This script couldn't find your uisimulator/x11 directory. Please enter the" 55 echo "This script couldn't find your uisimulator/$simver directory. Please enter the"
35 echo "full path to your uisimulator/x11 directory here:" 56 echo "full path to your uisimulator/$simver directory here:"
36 57
37 simdir=`input` 58 simdir=`input`
38 fi 59 fi
@@ -44,6 +65,7 @@ sed > Makefile \
44 -e "s,@DISPLAY@,${display},g" \ 65 -e "s,@DISPLAY@,${display},g" \
45 -e "s,@KEYPAD@,${keypad},g" \ 66 -e "s,@KEYPAD@,${keypad},g" \
46 -e "s,@PWD@,${pwd},g" \ 67 -e "s,@PWD@,${pwd},g" \
68 -e "s,@SIMVER@,${simver},g" \
47<<EOF 69<<EOF
48## Automaticly generated. http://bjorn.haxx.se/rockbox/ 70## Automaticly generated. http://bjorn.haxx.se/rockbox/
49 71
@@ -53,6 +75,7 @@ TARGET=@TARGET@
53DISPLAY=@DISPLAY@ 75DISPLAY=@DISPLAY@
54KEYPAD=@KEYPAD@ 76KEYPAD=@KEYPAD@
55THISDIR="@PWD@" 77THISDIR="@PWD@"
78SIMVER=@SIMVER@
56VERSION=\$(shell date +%y%m%d-%H%M) 79VERSION=\$(shell date +%y%m%d-%H%M)
57 80
58.PHONY: 81.PHONY:
@@ -103,6 +126,7 @@ if [ "$target" = "update" ]; then
103 simulator="yes" 126 simulator="yes"
104 display=`grep "^DISPLAY=" Makefile | cut -d= -f2-` 127 display=`grep "^DISPLAY=" Makefile | cut -d= -f2-`
105 keypad=`grep "^KEYPAD=" Makefile | cut -d= -f2-` 128 keypad=`grep "^KEYPAD=" Makefile | cut -d= -f2-`
129 simver=`grep "^SIMVER=" Makefile | cut -d= -f2-`
106 fi 130 fi
107 fi 131 fi
108 fi 132 fi