diff options
-rwxr-xr-x | tools/configure | 44 |
1 files changed, 40 insertions, 4 deletions
diff --git a/tools/configure b/tools/configure index 7e7dbcb570..23050e8c3c 100755 --- a/tools/configure +++ b/tools/configure | |||
@@ -37,6 +37,7 @@ if [ -z "$simver" ]; then | |||
37 | simver="x11" | 37 | simver="x11" |
38 | ;; | 38 | ;; |
39 | esac | 39 | esac |
40 | echo "Selected $simver simulator" | ||
40 | fi | 41 | fi |
41 | } | 42 | } |
42 | 43 | ||
@@ -189,6 +190,7 @@ fi | |||
189 | pwd=`pwd`; | 190 | pwd=`pwd`; |
190 | 191 | ||
191 | if [ "$target" = "update" ]; then | 192 | if [ "$target" = "update" ]; then |
193 | update="1" | ||
192 | target="" | 194 | target="" |
193 | if [ -f Makefile ]; then | 195 | if [ -f Makefile ]; then |
194 | if { grep "^## Auto" Makefile >/dev/null 2>&1 ; } then | 196 | if { grep "^## Auto" Makefile >/dev/null 2>&1 ; } then |
@@ -197,6 +199,7 @@ if [ "$target" = "update" ]; then | |||
197 | target=`grep "^TARGET=" Makefile | cut -d= -f2-` | 199 | target=`grep "^TARGET=" Makefile | cut -d= -f2-` |
198 | debug=`grep "^DEBUG=" Makefile | cut -d= -f2-` | 200 | debug=`grep "^DEBUG=" Makefile | cut -d= -f2-` |
199 | language=`grep "^LANGUAGE=" Makefile | cut -d= -f2-` | 201 | language=`grep "^LANGUAGE=" Makefile | cut -d= -f2-` |
202 | memory=`grep "^MEMORYSIZE=" Makefile | cut -d= -f2-` | ||
200 | extra_defines=`grep "^EXTRA_DEFINES=" Makefile | cut -d= -f2-` | 203 | extra_defines=`grep "^EXTRA_DEFINES=" Makefile | cut -d= -f2-` |
201 | 204 | ||
202 | if [ "$debug" = "SIMULATOR=1" ]; then | 205 | if [ "$debug" = "SIMULATOR=1" ]; then |
@@ -209,8 +212,8 @@ if [ "$target" = "update" ]; then | |||
209 | fi | 212 | fi |
210 | else | 213 | else |
211 | 214 | ||
212 | echo "Setup your Rockbox build environment." | 215 | echo "This script will setup your Rockbox build environment." |
213 | echo "http://rockbox.haxx.se/" | 216 | echo "Further docs here: http://rockbox.haxx.se/docs/" |
214 | echo "" | 217 | echo "" |
215 | 218 | ||
216 | fi | 219 | fi |
@@ -253,6 +256,28 @@ if [ -z "$archos" ]; then | |||
253 | ;; | 256 | ;; |
254 | 257 | ||
255 | esac | 258 | esac |
259 | |||
260 | echo "Platform set to $archos" | ||
261 | |||
262 | fi | ||
263 | |||
264 | if [ -z "$memory" ]; then | ||
265 | size="2" | ||
266 | if [ -z "$update" ]; then | ||
267 | echo "Enter size of your RAM (in MB): (defaults to 2)" | ||
268 | size=`input`; | ||
269 | fi | ||
270 | |||
271 | case $size in | ||
272 | 8) | ||
273 | memory="8" | ||
274 | ;; | ||
275 | *) | ||
276 | memory="2" | ||
277 | ;; | ||
278 | |||
279 | esac | ||
280 | echo "Memory size selected: $memory MB" | ||
256 | fi | 281 | fi |
257 | 282 | ||
258 | if [ -z "$extra_defines" ]; then | 283 | if [ -z "$extra_defines" ]; then |
@@ -264,12 +289,18 @@ if [ -z "$extra_defines" ]; then | |||
264 | getit=`input`; | 289 | getit=`input`; |
265 | if [ "n" = "$getit" -o "N" = "$getit" ] ; then | 290 | if [ "n" = "$getit" -o "N" = "$getit" ] ; then |
266 | disable_demos="-DDISABLE_DEMOS" | 291 | disable_demos="-DDISABLE_DEMOS" |
292 | echo "Demos disabled" | ||
293 | else | ||
294 | echo "Demos enabled" | ||
267 | fi | 295 | fi |
268 | 296 | ||
269 | echo "Do you want to play Games? (Y)" | 297 | echo "Do you want to play Games? (Y)" |
270 | getit=`input`; | 298 | getit=`input`; |
271 | if [ "n" = "$getit" -o "N" = "$getit" ] ; then | 299 | if [ "n" = "$getit" -o "N" = "$getit" ] ; then |
272 | disable_games=" -DDISABLE_GAMES" | 300 | disable_games=" -DDISABLE_GAMES" |
301 | echo "Games disabled" | ||
302 | else | ||
303 | echo "Games enabled" | ||
273 | fi | 304 | fi |
274 | 305 | ||
275 | extra_defines="$disable_demos$disable_games" | 306 | extra_defines="$disable_demos$disable_games" |
@@ -281,7 +312,6 @@ if [ -z "$debug" ]; then | |||
281 | ################################################################## | 312 | ################################################################## |
282 | # Figure out debug on/off | 313 | # Figure out debug on/off |
283 | # | 314 | # |
284 | echo "" | ||
285 | echo "Build (N)ormal, (D)ebug or (S)imulated version? (N)" | 315 | echo "Build (N)ormal, (D)ebug or (S)imulated version? (N)" |
286 | 316 | ||
287 | option=`input`; | 317 | option=`input`; |
@@ -290,13 +320,16 @@ if [ -z "$debug" ]; then | |||
290 | [Ss]) | 320 | [Ss]) |
291 | debug="SIMULATOR=1" | 321 | debug="SIMULATOR=1" |
292 | simulator="yes" | 322 | simulator="yes" |
323 | echo "Simulator build selected" | ||
293 | whichsim | 324 | whichsim |
294 | ;; | 325 | ;; |
295 | [Dd]) | 326 | [Dd]) |
296 | debug="DEBUG=1" | 327 | debug="DEBUG=1" |
328 | echo "Debug build selected" | ||
297 | ;; | 329 | ;; |
298 | *) | 330 | *) |
299 | debug="NODEBUG=1" | 331 | debug="NODEBUG=1" |
332 | echo "Normal build selected" | ||
300 | ;; | 333 | ;; |
301 | 334 | ||
302 | esac | 335 | esac |
@@ -353,6 +386,7 @@ if [ -z "$language" ]; then | |||
353 | # pick a default | 386 | # pick a default |
354 | language="english" | 387 | language="english" |
355 | fi | 388 | fi |
389 | echo "Language set to $language" | ||
356 | fi | 390 | fi |
357 | 391 | ||
358 | if [ "yes" = "$simulator" ]; then | 392 | if [ "yes" = "$simulator" ]; then |
@@ -365,6 +399,7 @@ sed > Makefile \ | |||
365 | -e "s,@FIRMDIR@,${firmdir},g" \ | 399 | -e "s,@FIRMDIR@,${firmdir},g" \ |
366 | -e "s,@APPSDIR@,${appsdir},g" \ | 400 | -e "s,@APPSDIR@,${appsdir},g" \ |
367 | -e "s,@DEBUG@,${debug},g" \ | 401 | -e "s,@DEBUG@,${debug},g" \ |
402 | -e "s,@MEMORY@,${memory},g" \ | ||
368 | -e "s,@TARGET@,${target},g" \ | 403 | -e "s,@TARGET@,${target},g" \ |
369 | -e "s,@ARCHOS@,${archos},g" \ | 404 | -e "s,@ARCHOS@,${archos},g" \ |
370 | -e "s,@LANGUAGE@,${language},g" \ | 405 | -e "s,@LANGUAGE@,${language},g" \ |
@@ -380,6 +415,7 @@ ARCHOS=@ARCHOS@ | |||
380 | TARGET=@TARGET@ | 415 | TARGET=@TARGET@ |
381 | THISDIR="@PWD@" | 416 | THISDIR="@PWD@" |
382 | LANGUAGE=@LANGUAGE@ | 417 | LANGUAGE=@LANGUAGE@ |
418 | MEMORYSIZE=@MEMORY@ | ||
383 | VERSION=\$(shell date +%y%m%d-%H%M) | 419 | VERSION=\$(shell date +%y%m%d-%H%M) |
384 | 420 | ||
385 | EXTRA_DEFINES=@EXTRA_DEFINES@ | 421 | EXTRA_DEFINES=@EXTRA_DEFINES@ |
@@ -391,7 +427,7 @@ firmware: | |||
391 | \$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) \$(DEBUG) OBJDIR=\$(THISDIR) EXTRA_DEFINES="\$(EXTRA_DEFINES)" | 427 | \$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) \$(DEBUG) OBJDIR=\$(THISDIR) EXTRA_DEFINES="\$(EXTRA_DEFINES)" |
392 | 428 | ||
393 | apps: | 429 | apps: |
394 | \$(MAKE) -C \$(APPSDIR) TARGET=\$(TARGET) \$(DEBUG) OBJDIR=\$(THISDIR) VERSION=\$(VERSION) LANGUAGE=\$(LANGUAGE) EXTRA_DEFINES="\$(EXTRA_DEFINES)" | 430 | \$(MAKE) -C \$(APPSDIR) TARGET=\$(TARGET) \$(DEBUG) OBJDIR=\$(THISDIR) VERSION=\$(VERSION) LANGUAGE=\$(LANGUAGE) EXTRA_DEFINES="\$(EXTRA_DEFINES)" MEM=\$(MEMORYSIZE) |
395 | 431 | ||
396 | clean-firmware: | 432 | clean-firmware: |
397 | \$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) OBJDIR=\$(THISDIR) clean | 433 | \$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) OBJDIR=\$(THISDIR) clean |