diff options
-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() { | |||
17 | } | 17 | } |
18 | 18 | ||
19 | simul () { | 19 | simul () { |
20 | |||
21 | if [ -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 | ||
39 | fi | ||
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@ | |||
53 | DISPLAY=@DISPLAY@ | 75 | DISPLAY=@DISPLAY@ |
54 | KEYPAD=@KEYPAD@ | 76 | KEYPAD=@KEYPAD@ |
55 | THISDIR="@PWD@" | 77 | THISDIR="@PWD@" |
78 | SIMVER=@SIMVER@ | ||
56 | VERSION=\$(shell date +%y%m%d-%H%M) | 79 | VERSION=\$(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 |