summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/configure94
1 files changed, 83 insertions, 11 deletions
diff --git a/tools/configure b/tools/configure
index db1a2b1896..307f66aa70 100755
--- a/tools/configure
+++ b/tools/configure
@@ -16,9 +16,64 @@ input() {
16 echo $response 16 echo $response
17} 17}
18 18
19echo "Setup your Rockbox build environment." 19simulator() {
20echo "http://bjorn.haxx.se/rockbox/" 20 ##################################################################
21echo "" 21 # Figure out where the firmware code is!
22 #
23
24 simfile="x11/lcd-x11.c" # a file to check for in the uisimulator root dir
25
26 for dir in uisimulator . .. ../uisimulator ../../uisimulator; do
27 if [ -f "$dir/$simfile" ]; then
28 simdir="$dir/x11"
29 break
30 fi
31 done
32
33 if [ -z "$simdir" ]; then
34 echo "This script couldn't find your uisimulator/x11 directory. Please enter the"
35 echo "full path to your uisimulator/x11 directory here:"
36
37 simdir=`input`
38 fi
39
40sed > Makefile \
41 -e "s,@SIMDIR@,${simdir},g" \
42 -e "s,@TARGET@,${target},g" \
43 -e "s,@DEBUG@,${debug},g" \
44 -e "s,@DISPLAY@,${display},g" \
45 -e "s,@KEYPAD@,${keypad},g" \
46 -e "s,@PWD@,${pwd},g" \
47<<EOF
48## Automaticly generated. http://bjorn.haxx.se/rockbox/
49
50SIMDIR=@SIMDIR@
51DEBUG=@DEBUG@
52TARGET=@TARGET@
53DISPLAY=@DISPLAY@
54KEYPAD=@KEYPAD@
55THISDIR="@PWD@"
56
57.PHONE:
58
59all: sim
60
61sim:
62 make -C \$(SIMDIR) DISPLAY=\$(DISPLAY) KEYPAD=\$(KEYPAD) OBJDIR=\$(THISDIR)
63
64clean-sim:
65 make -C \$(SIMDIR) DISPLAY=\$(DISPLAY) KEYPAD=\$(KEYPAD) OBJDIR=\$(THISDIR) clean
66
67clean:
68 make clean-sim
69
70EOF
71
72echo "Created Makefile"
73}
74
75# get our current directory
76pwd=`pwd`;
22 77
23if [ "$target" = "update" ]; then 78if [ "$target" = "update" ]; then
24 target="" 79 target=""
@@ -29,6 +84,12 @@ if [ "$target" = "update" ]; then
29 debug=`grep "^DEBUG=" Makefile | cut -d= -f2-` 84 debug=`grep "^DEBUG=" Makefile | cut -d= -f2-`
30 fi 85 fi
31 fi 86 fi
87else
88
89echo "Setup your Rockbox build environment."
90echo "http://bjorn.haxx.se/rockbox/"
91echo ""
92
32fi 93fi
33 94
34if [ -z "$target" ]; then 95if [ -z "$target" ]; then
@@ -49,18 +110,22 @@ if [ -z "$target" ]; then
49 110
50 1) 111 1)
51 target="-DARCHOS_PLAYER_OLD" 112 target="-DARCHOS_PLAYER_OLD"
113 display="-DHAVE_LCD_CHARCELLS"
114 keypad="-DHAVE_PLAYER_KEYPAD"
52 ;; 115 ;;
116
53 2) 117 2)
54 target="-DARCHOS_PLAYER" 118 target="-DARCHOS_PLAYER"
119 display="-DHAVE_LCD_CHARCELLS"
120 keypad="-DHAVE_PLAYER_KEYPAD"
55 ;; 121 ;;
56 122
57 3) 123 *|3)
58 target="-DARCHOS_RECORDER" 124 target="-DARCHOS_RECORDER"
125 display="-DHAVE_LCD_BITMAP"
126 keypad="-DHAVE_RECORDER_KEYPAD"
59 ;; 127 ;;
60 128
61 *)
62 target="-DARCHOS_RECORDER"
63 ;;
64 esac 129 esac
65fi 130fi
66 131
@@ -70,12 +135,16 @@ if [ -z "$debug" ]; then
70 # Figure out debug on/off 135 # Figure out debug on/off
71 # 136 #
72 echo "" 137 echo ""
73 echo "Build DEBUG version? (y/N)" 138 echo "Build (N)ormal, (D)ebug or (S)imulated version? (N)"
74 139
75 option=`input`; 140 option=`input`;
76 141
77 case $option in 142 case $option in
78 [Yy]) 143 [Ss])
144 debug="SIMULATOR=1"
145 simulator="yes"
146 ;;
147 [Dd])
79 debug="DEBUG=1" 148 debug="DEBUG=1"
80 ;; 149 ;;
81 *) 150 *)
@@ -85,6 +154,11 @@ if [ -z "$debug" ]; then
85 esac 154 esac
86fi 155fi
87 156
157if [ -n "$simulator" ]; then
158 # we deal with the simulator Makefile separately
159 simulator
160 exit
161fi
88 162
89################################################################## 163##################################################################
90# Figure out where the firmware code is! 164# Figure out where the firmware code is!
@@ -126,8 +200,6 @@ if [ -z "$appsdir" ]; then
126 appsdir=`input` 200 appsdir=`input`
127fi 201fi
128 202
129pwd=`pwd`;
130
131sed > Makefile \ 203sed > Makefile \
132 -e "s,@FIRMDIR@,${firmdir},g" \ 204 -e "s,@FIRMDIR@,${firmdir},g" \
133 -e "s,@APPSDIR@,${appsdir},g" \ 205 -e "s,@APPSDIR@,${appsdir},g" \