diff options
author | Brandon Low <lostlogic@rockbox.org> | 2006-01-18 20:54:13 +0000 |
---|---|---|
committer | Brandon Low <lostlogic@rockbox.org> | 2006-01-18 20:54:13 +0000 |
commit | 05dccc355144dc717b3cb9ef0074a9ab38a520f4 (patch) | |
tree | 0a36425cf1321817480a82ed05564a2790e2fca9 /tools/configure | |
parent | 1060e447f83128a78dfaa8d59ba0baa642d15a4d (diff) |
Profiling support, tools and documentation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8375 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/configure')
-rwxr-xr-x | tools/configure | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/tools/configure b/tools/configure index 2cd855e0c5..2bea201324 100755 --- a/tools/configure +++ b/tools/configure @@ -240,7 +240,7 @@ whichdevel () { # echo "" echo "Enter your developer options (press enter when done)" - echo "(D)EBUG, (L)ogf, (S)imulator" + echo "(D)EBUG, (L)ogf, (S)imulator, (P)rofiling" cont=1 while [ $cont = "1" ]; do @@ -249,19 +249,29 @@ whichdevel () { case $option in [Dd]) - echo "define DEBUG" - debug="-DDEBUG" - GCCOPTS="$GCCOPTS -g -DDEBUG" + if [ "yes" = "$profile" ]; then + echo "Debug is incompatible with profiling" + else + echo "define DEBUG" + use_debug="yes" + fi ;; [Ll]) - logf="yes" echo "logf() support enabled" - use_logf="#define ROCKBOX_HAS_LOGF 1" + logf="yes" ;; [Ss]) echo "Simulator build enabled" simulator="yes" ;; + [Pp]) + if [ "yes" = "$use_debug" ]; then + echo "Profiling is incompatible with debug" + else + echo "Profiling support is enabled" + profile="yes" + fi + ;; *) echo "done" cont=0 @@ -269,11 +279,23 @@ whichdevel () { esac done + if [ "yes" = "$use_debug" ]; then + debug="-DDEBUG" + GCCOPTS="$GCCOPTS -g -DDEBUG" + fi + if [ "yes" = "$logf" ]; then + use_logf="#define ROCKBOX_HAS_LOGF 1" + fi if [ "yes" = "$simulator" ]; then debug="-DDEBUG" - extradefines="-DSIMULATOR" + extradefines="$extradefines -DSIMULATOR" whichsim fi + if [ "yes" = "$profile" ]; then + extradefines="$extradefines -DRB_PROFILE" + PROFILE_OPTS="-finstrument-functions" + GCCOPTS="$GCCOPTS $GCCOPTIMIZE" + fi } whichsim () { @@ -902,6 +924,7 @@ sed > Makefile \ -e "s,@FLASHFILE@,${flash},g" \ -e "s,@PLUGINS@,${plugins},g" \ -e "s,@CODECS@,${codecs},g" \ + -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \ -e "s,@GCCOPTS@,${GCCOPTS},g" \ -e "s!@LDOPTS@!${LDOPTS}!g" \ -e "s,@LOADADDRESS@,${loadaddress},g" \ @@ -952,6 +975,7 @@ export WINDRES=@WINDRES@ export DLLTOOL=@DLLTOOL@ export DLLWRAP=@DLLWRAP@ export RANLIB=@RANLIB@ +export PROFILE_OPTS=@PROFILE_OPTS@ export GCCOPTS=@GCCOPTS@ export LOADADDRESS=@LOADADDRESS@ export SIMVER=@SIMVER@ |