summaryrefslogtreecommitdiff
path: root/tools/configure
diff options
context:
space:
mode:
Diffstat (limited to 'tools/configure')
-rwxr-xr-xtools/configure79
1 files changed, 62 insertions, 17 deletions
diff --git a/tools/configure b/tools/configure
index 2f4c83581d..1af5d2a54e 100755
--- a/tools/configure
+++ b/tools/configure
@@ -11,6 +11,8 @@
11# global CC options for all platforms 11# global CC options for all platforms
12CCOPTS="-W -Wall -O -nostdlib -ffreestanding -Wstrict-prototypes" 12CCOPTS="-W -Wall -O -nostdlib -ffreestanding -Wstrict-prototypes"
13 13
14use_logf="#undef ROCKBOX_HAS_LOGF"
15
14# 16#
15# Begin Function Definitions 17# Begin Function Definitions
16# 18#
@@ -171,6 +173,48 @@ whichaddr () {
171 esac 173 esac
172} 174}
173 175
176whichdevel () {
177 ##################################################################
178 # Prompt for specific developer options
179 #
180 echo ""
181 echo "Enter your developer options (press enter when done)"
182 echo "(D)EBUG, (L)ogf, (S)imulator"
183 cont=1
184
185 while [ $cont = "1" ]; do
186
187 option=`input`;
188
189 case $option in
190 [Dd])
191 echo "define DEBUG"
192 debug="1"
193 GCCOPTS="$GCCOPTS -g -DDEBUG"
194 ;;
195 [Ll])
196 logf="yes"
197 echo "logf() support enabled"
198 use_logf="#define ROCKBOX_HAS_LOGF 1"
199 ;;
200 [Ss])
201 echo "Simulator build enabled"
202 simulator="yes"
203 ;;
204 *)
205 echo "done"
206 cont=0
207 ;;
208 esac
209 done
210
211 if [ "yes" = "$simulator" ]; then
212 debug="1"
213 extradefines="-DSIMULATOR"
214 whichsim
215 fi
216}
217
174whichsim () { 218whichsim () {
175 219
176if [ -z "$simver" ]; then 220if [ -z "$simver" ]; then
@@ -230,9 +274,6 @@ whichlang() {
230 done 274 done
231} 275}
232 276
233target=$1
234debug=$2
235
236if test "$1" = "--help"; then 277if test "$1" = "--help"; then
237 echo "Rockbox configure script." 278 echo "Rockbox configure script."
238 echo "Invoke this in a directory to generate a Makefile to build Rockbox" 279 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
@@ -318,8 +359,6 @@ fi
318apps="apps" 359apps="apps"
319appsdir='\$(ROOTDIR)/apps' 360appsdir='\$(ROOTDIR)/apps'
320 361
321if [ -z "$archos" ]; then
322
323################################################################## 362##################################################################
324# Figure out target platform 363# Figure out target platform
325# 364#
@@ -469,7 +508,10 @@ if [ -z "$archos" ]; then
469 508
470 echo "Platform set to $archos" 509 echo "Platform set to $archos"
471 510
472fi 511
512############################################################################
513# Amount of memory, for those that can differ.
514#
473 515
474if [ -z "$memory" ]; then 516if [ -z "$memory" ]; then
475 size="2" 517 size="2"
@@ -490,11 +532,11 @@ if [ -z "$memory" ]; then
490 echo "Memory size selected: $memory MB" 532 echo "Memory size selected: $memory MB"
491fi 533fi
492 534
493if [ -z "$debug" ]; then 535##################################################################
494 ################################################################## 536# Figure out build "type"
495 # Figure out debug on/off 537#
496 # 538 echo ""
497 echo "Build (N)ormal, (D)ebug, (S)imulator, (B)ootloader? (N)" 539 echo "Build (N)ormal, (D)evel, (S)imulator, (B)ootloader? (N)"
498 540
499 option=`input`; 541 option=`input`;
500 542
@@ -518,9 +560,8 @@ if [ -z "$debug" ]; then
518 whichsim 560 whichsim
519 ;; 561 ;;
520 [Dd]) 562 [Dd])
521 debug="1" 563 echo "Devel build selected"
522 echo "Debug build selected" 564 whichdevel
523 GCCOPTS="$GCCOPTS -g -DDEBUG"
524 ;; 565 ;;
525 *) 566 *)
526 debug="" 567 debug=""
@@ -529,11 +570,12 @@ if [ -z "$debug" ]; then
529 ;; 570 ;;
530 571
531 esac 572 esac
532fi 573
533 574
534whichaddr 575whichaddr
535 576
536if [ -z "$language" ]; then 577############################################################################
578# language
537 579
538 echo "Select a number for the language to use (default is english)" 580 echo "Select a number for the language to use (default is english)"
539 581
@@ -545,7 +587,6 @@ if [ -z "$language" ]; then
545 language="english" 587 language="english"
546 fi 588 fi
547 echo "Language set to $language" 589 echo "Language set to $language"
548fi
549 590
550uname=`uname` 591uname=`uname`
551 592
@@ -594,6 +635,7 @@ fi
594 635
595sed > autoconf.h \ 636sed > autoconf.h \
596 -e "s,@ENDIAN@,${defendian},g" \ 637 -e "s,@ENDIAN@,${defendian},g" \
638 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
597<<EOF 639<<EOF
598/* This header was made by configure */ 640/* This header was made by configure */
599#ifndef __BUILD_AUTOCONF_H 641#ifndef __BUILD_AUTOCONF_H
@@ -602,6 +644,9 @@ sed > autoconf.h \
602/* Define endianess for the target or simulator platform */ 644/* Define endianess for the target or simulator platform */
603#define @ENDIAN@ 1 645#define @ENDIAN@ 1
604 646
647/* Define this if you build rockbox to support the logf logging and display */
648#undef ROCKBOX_HAS_LOGF
649
605#endif /* __BUILD_AUTOCONF_H */ 650#endif /* __BUILD_AUTOCONF_H */
606EOF 651EOF
607 652