summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/configure44
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"
40fi 41fi
41} 42}
42 43
@@ -189,6 +190,7 @@ fi
189pwd=`pwd`; 190pwd=`pwd`;
190 191
191if [ "$target" = "update" ]; then 192if [ "$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
210else 213else
211 214
212echo "Setup your Rockbox build environment." 215echo "This script will setup your Rockbox build environment."
213echo "http://rockbox.haxx.se/" 216echo "Further docs here: http://rockbox.haxx.se/docs/"
214echo "" 217echo ""
215 218
216fi 219fi
@@ -253,6 +256,28 @@ if [ -z "$archos" ]; then
253 ;; 256 ;;
254 257
255 esac 258 esac
259
260 echo "Platform set to $archos"
261
262fi
263
264if [ -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"
256fi 281fi
257 282
258if [ -z "$extra_defines" ]; then 283if [ -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"
356fi 390fi
357 391
358if [ "yes" = "$simulator" ]; then 392if [ "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@
380TARGET=@TARGET@ 415TARGET=@TARGET@
381THISDIR="@PWD@" 416THISDIR="@PWD@"
382LANGUAGE=@LANGUAGE@ 417LANGUAGE=@LANGUAGE@
418MEMORYSIZE=@MEMORY@
383VERSION=\$(shell date +%y%m%d-%H%M) 419VERSION=\$(shell date +%y%m%d-%H%M)
384 420
385EXTRA_DEFINES=@EXTRA_DEFINES@ 421EXTRA_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
393apps: 429apps:
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
396clean-firmware: 432clean-firmware:
397 \$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) OBJDIR=\$(THISDIR) clean 433 \$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) OBJDIR=\$(THISDIR) clean