summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-05-30 13:00:43 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-05-30 13:00:43 +0000
commitedc07922eb9e179e7cada5bae60828d72f71c207 (patch)
tree81c6c560b1b2bbe39e6c229ffa4d6f248f28c295 /tools
parentc3b1eceff1daae7fdb7348bb70b309c37d3f6376 (diff)
downloadrockbox-edc07922eb9e179e7cada5bae60828d72f71c207.tar.gz
rockbox-edc07922eb9e179e7cada5bae60828d72f71c207.zip
(Optional) logf support
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6538 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-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 @@
# global CC options for all platforms
CCOPTS="-W -Wall -O -nostdlib -ffreestanding -Wstrict-prototypes"
+use_logf="#undef ROCKBOX_HAS_LOGF"
+
#
# Begin Function Definitions
#
@@ -171,6 +173,48 @@ whichaddr () {
esac
}
+whichdevel () {
+ ##################################################################
+ # Prompt for specific developer options
+ #
+ echo ""
+ echo "Enter your developer options (press enter when done)"
+ echo "(D)EBUG, (L)ogf, (S)imulator"
+ cont=1
+
+ while [ $cont = "1" ]; do
+
+ option=`input`;
+
+ case $option in
+ [Dd])
+ echo "define DEBUG"
+ debug="1"
+ GCCOPTS="$GCCOPTS -g -DDEBUG"
+ ;;
+ [Ll])
+ logf="yes"
+ echo "logf() support enabled"
+ use_logf="#define ROCKBOX_HAS_LOGF 1"
+ ;;
+ [Ss])
+ echo "Simulator build enabled"
+ simulator="yes"
+ ;;
+ *)
+ echo "done"
+ cont=0
+ ;;
+ esac
+ done
+
+ if [ "yes" = "$simulator" ]; then
+ debug="1"
+ extradefines="-DSIMULATOR"
+ whichsim
+ fi
+}
+
whichsim () {
if [ -z "$simver" ]; then
@@ -230,9 +274,6 @@ whichlang() {
done
}
-target=$1
-debug=$2
-
if test "$1" = "--help"; then
echo "Rockbox configure script."
echo "Invoke this in a directory to generate a Makefile to build Rockbox"
@@ -318,8 +359,6 @@ fi
apps="apps"
appsdir='\$(ROOTDIR)/apps'
-if [ -z "$archos" ]; then
-
##################################################################
# Figure out target platform
#
@@ -469,7 +508,10 @@ if [ -z "$archos" ]; then
echo "Platform set to $archos"
-fi
+
+############################################################################
+# Amount of memory, for those that can differ.
+#
if [ -z "$memory" ]; then
size="2"
@@ -490,11 +532,11 @@ if [ -z "$memory" ]; then
echo "Memory size selected: $memory MB"
fi
-if [ -z "$debug" ]; then
- ##################################################################
- # Figure out debug on/off
- #
- echo "Build (N)ormal, (D)ebug, (S)imulator, (B)ootloader? (N)"
+##################################################################
+# Figure out build "type"
+#
+ echo ""
+ echo "Build (N)ormal, (D)evel, (S)imulator, (B)ootloader? (N)"
option=`input`;
@@ -518,9 +560,8 @@ if [ -z "$debug" ]; then
whichsim
;;
[Dd])
- debug="1"
- echo "Debug build selected"
- GCCOPTS="$GCCOPTS -g -DDEBUG"
+ echo "Devel build selected"
+ whichdevel
;;
*)
debug=""
@@ -529,11 +570,12 @@ if [ -z "$debug" ]; then
;;
esac
-fi
+
whichaddr
-if [ -z "$language" ]; then
+############################################################################
+# language
echo "Select a number for the language to use (default is english)"
@@ -545,7 +587,6 @@ if [ -z "$language" ]; then
language="english"
fi
echo "Language set to $language"
-fi
uname=`uname`
@@ -594,6 +635,7 @@ fi
sed > autoconf.h \
-e "s,@ENDIAN@,${defendian},g" \
+ -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
<<EOF
/* This header was made by configure */
#ifndef __BUILD_AUTOCONF_H
@@ -602,6 +644,9 @@ sed > autoconf.h \
/* Define endianess for the target or simulator platform */
#define @ENDIAN@ 1
+/* Define this if you build rockbox to support the logf logging and display */
+#undef ROCKBOX_HAS_LOGF
+
#endif /* __BUILD_AUTOCONF_H */
EOF