1
0
Fork 0
forked from len0rd/rockbox

Added a ram size question

Made the script more informative about what selection that takes effect
Passes MEM to the apps Makefile for memorysize


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3344 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Daniel Stenberg 2003-02-26 09:13:47 +00:00
parent b2b376539a
commit ea9c5bb167

44
tools/configure vendored
View file

@ -37,6 +37,7 @@ if [ -z "$simver" ]; then
simver="x11" simver="x11"
;; ;;
esac esac
echo "Selected $simver simulator"
fi fi
} }
@ -189,6 +190,7 @@ fi
pwd=`pwd`; pwd=`pwd`;
if [ "$target" = "update" ]; then if [ "$target" = "update" ]; then
update="1"
target="" target=""
if [ -f Makefile ]; then if [ -f Makefile ]; then
if { grep "^## Auto" Makefile >/dev/null 2>&1 ; } then if { grep "^## Auto" Makefile >/dev/null 2>&1 ; } then
@ -197,6 +199,7 @@ if [ "$target" = "update" ]; then
target=`grep "^TARGET=" Makefile | cut -d= -f2-` target=`grep "^TARGET=" Makefile | cut -d= -f2-`
debug=`grep "^DEBUG=" Makefile | cut -d= -f2-` debug=`grep "^DEBUG=" Makefile | cut -d= -f2-`
language=`grep "^LANGUAGE=" Makefile | cut -d= -f2-` language=`grep "^LANGUAGE=" Makefile | cut -d= -f2-`
memory=`grep "^MEMORYSIZE=" Makefile | cut -d= -f2-`
extra_defines=`grep "^EXTRA_DEFINES=" Makefile | cut -d= -f2-` extra_defines=`grep "^EXTRA_DEFINES=" Makefile | cut -d= -f2-`
if [ "$debug" = "SIMULATOR=1" ]; then if [ "$debug" = "SIMULATOR=1" ]; then
@ -209,8 +212,8 @@ if [ "$target" = "update" ]; then
fi fi
else else
echo "Setup your Rockbox build environment." echo "This script will setup your Rockbox build environment."
echo "http://rockbox.haxx.se/" echo "Further docs here: http://rockbox.haxx.se/docs/"
echo "" echo ""
fi fi
@ -253,6 +256,28 @@ if [ -z "$archos" ]; then
;; ;;
esac esac
echo "Platform set to $archos"
fi
if [ -z "$memory" ]; then
size="2"
if [ -z "$update" ]; then
echo "Enter size of your RAM (in MB): (defaults to 2)"
size=`input`;
fi
case $size in
8)
memory="8"
;;
*)
memory="2"
;;
esac
echo "Memory size selected: $memory MB"
fi fi
if [ -z "$extra_defines" ]; then if [ -z "$extra_defines" ]; then
@ -264,12 +289,18 @@ if [ -z "$extra_defines" ]; then
getit=`input`; getit=`input`;
if [ "n" = "$getit" -o "N" = "$getit" ] ; then if [ "n" = "$getit" -o "N" = "$getit" ] ; then
disable_demos="-DDISABLE_DEMOS" disable_demos="-DDISABLE_DEMOS"
echo "Demos disabled"
else
echo "Demos enabled"
fi fi
echo "Do you want to play Games? (Y)" echo "Do you want to play Games? (Y)"
getit=`input`; getit=`input`;
if [ "n" = "$getit" -o "N" = "$getit" ] ; then if [ "n" = "$getit" -o "N" = "$getit" ] ; then
disable_games=" -DDISABLE_GAMES" disable_games=" -DDISABLE_GAMES"
echo "Games disabled"
else
echo "Games enabled"
fi fi
extra_defines="$disable_demos$disable_games" extra_defines="$disable_demos$disable_games"
@ -281,7 +312,6 @@ if [ -z "$debug" ]; then
################################################################## ##################################################################
# Figure out debug on/off # Figure out debug on/off
# #
echo ""
echo "Build (N)ormal, (D)ebug or (S)imulated version? (N)" echo "Build (N)ormal, (D)ebug or (S)imulated version? (N)"
option=`input`; option=`input`;
@ -290,13 +320,16 @@ if [ -z "$debug" ]; then
[Ss]) [Ss])
debug="SIMULATOR=1" debug="SIMULATOR=1"
simulator="yes" simulator="yes"
echo "Simulator build selected"
whichsim whichsim
;; ;;
[Dd]) [Dd])
debug="DEBUG=1" debug="DEBUG=1"
echo "Debug build selected"
;; ;;
*) *)
debug="NODEBUG=1" debug="NODEBUG=1"
echo "Normal build selected"
;; ;;
esac esac
@ -353,6 +386,7 @@ if [ -z "$language" ]; then
# pick a default # pick a default
language="english" language="english"
fi fi
echo "Language set to $language"
fi fi
if [ "yes" = "$simulator" ]; then if [ "yes" = "$simulator" ]; then
@ -365,6 +399,7 @@ sed > Makefile \
-e "s,@FIRMDIR@,${firmdir},g" \ -e "s,@FIRMDIR@,${firmdir},g" \
-e "s,@APPSDIR@,${appsdir},g" \ -e "s,@APPSDIR@,${appsdir},g" \
-e "s,@DEBUG@,${debug},g" \ -e "s,@DEBUG@,${debug},g" \
-e "s,@MEMORY@,${memory},g" \
-e "s,@TARGET@,${target},g" \ -e "s,@TARGET@,${target},g" \
-e "s,@ARCHOS@,${archos},g" \ -e "s,@ARCHOS@,${archos},g" \
-e "s,@LANGUAGE@,${language},g" \ -e "s,@LANGUAGE@,${language},g" \
@ -380,6 +415,7 @@ ARCHOS=@ARCHOS@
TARGET=@TARGET@ TARGET=@TARGET@
THISDIR="@PWD@" THISDIR="@PWD@"
LANGUAGE=@LANGUAGE@ LANGUAGE=@LANGUAGE@
MEMORYSIZE=@MEMORY@
VERSION=\$(shell date +%y%m%d-%H%M) VERSION=\$(shell date +%y%m%d-%H%M)
EXTRA_DEFINES=@EXTRA_DEFINES@ EXTRA_DEFINES=@EXTRA_DEFINES@
@ -391,7 +427,7 @@ firmware:
\$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) \$(DEBUG) OBJDIR=\$(THISDIR) EXTRA_DEFINES="\$(EXTRA_DEFINES)" \$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) \$(DEBUG) OBJDIR=\$(THISDIR) EXTRA_DEFINES="\$(EXTRA_DEFINES)"
apps: apps:
\$(MAKE) -C \$(APPSDIR) TARGET=\$(TARGET) \$(DEBUG) OBJDIR=\$(THISDIR) VERSION=\$(VERSION) LANGUAGE=\$(LANGUAGE) EXTRA_DEFINES="\$(EXTRA_DEFINES)" \$(MAKE) -C \$(APPSDIR) TARGET=\$(TARGET) \$(DEBUG) OBJDIR=\$(THISDIR) VERSION=\$(VERSION) LANGUAGE=\$(LANGUAGE) EXTRA_DEFINES="\$(EXTRA_DEFINES)" MEM=\$(MEMORYSIZE)
clean-firmware: clean-firmware:
\$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) OBJDIR=\$(THISDIR) clean \$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) OBJDIR=\$(THISDIR) clean