From 376c9f3ad0c257ee97d7eba03962f232e85b36a7 Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Sun, 27 Feb 2011 11:37:39 +0000 Subject: FS#11966 - use separate modelnames and config files for RaaA. This adds an APPLICATION define that can be used in Makefiles, and target-name defines (-DSDLAPP, -DANDROID, -DNOKIAN8XX and -DNOKIAN900) for use elsewhere. LCD size is now hard-coded for the Nokia builds in their config files. A new --app parameter is passed to buildzip.pl to explicitly state that this is an application build - it was previously derived from the model name. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29418 a1c6a512-1295-4272-9138-f99709370657 --- tools/buildzip.pl | 3 +-- tools/configure | 45 +++++++++++++++++++++++---------------------- tools/root.make | 16 ++++++++-------- 3 files changed, 32 insertions(+), 32 deletions(-) (limited to 'tools') diff --git a/tools/buildzip.pl b/tools/buildzip.pl index 0d8f7117a5..2337dbe729 100755 --- a/tools/buildzip.pl +++ b/tools/buildzip.pl @@ -214,6 +214,7 @@ GetOptions ( 'r|root=s' => \$ROOT, 'install=s' => \$install, # install destination 'rbdir:s' => \$rbdir, # If we want to put in a different directory 'l|link' => \$mklinks, # If we want to create links instead of copying files + 'a|app:s' => \$app, # Is this an Application build? ); # GetOptions() doesn't remove the params from @ARGV if their value was "" @@ -681,8 +682,6 @@ $year+=1900; sub runone { my ($target, $fonts)=@_; - $app = ($modelname eq "application"); - # Strip the leading / from $rbdir unless we are installing an application # build - the layout is different (no .rockbox, but bin/lib/share) unless ($app && $install) { diff --git a/tools/configure b/tools/configure index 23fef9c968..904e676e9e 100755 --- a/tools/configure +++ b/tools/configure @@ -26,7 +26,6 @@ libdir= sharedir= thread_support="ASSEMBLER_THREADS" -app_modelname= app_lcd_width= app_lcd_height= # @@ -610,7 +609,6 @@ androidcc () { GLOBAL_LDOPTS="$GLOBAL_LDOPTS -nostdlib -lc -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack \ --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm" LDOPTS="$LDOPTS -shared -nostdlib -ldl -llog" - extradefines="$extradefines -DANDROID" endian="little" SHARED_FLAG="-shared" } @@ -2902,10 +2900,10 @@ fi ;; 200|sdlapp) + application="yes" target_id=73 - modelname="application" - app_modelname="sdlapp" - target="-DAPPLICATION" + modelname="sdlapp" + target="-DSDLAPP" app_set_paths app_set_lcd_size memory=8 @@ -2927,10 +2925,10 @@ fi ;; 201|android) + application="yes" target_id=74 - modelname="application" - app_modelname="android" - target="-DAPPLICATION" + modelname="android" + target="-DANDROID" app_type="android" app_set_lcd_size sharedir="/data/data/org.rockbox/app_rockbox/rockbox" @@ -2945,7 +2943,7 @@ fi bmp2rb_native="$rootdir/tools/bmp2rb -f 4" output="librockbox.so" bootoutput="librockbox.so" - appextra="recorder:gui:radio" + appextra="recorder:gui:radio:hosted" plugins="yes" swcodec="yes" # architecture, manufacturer and model for the target-tree build @@ -2955,12 +2953,11 @@ fi ;; 202|nokian8xx) + application="yes" target_id=75 - modelname="application" - app_modelname="nokian8xx" + modelname="nokian8xx" app_type="sdl-app" - target="-DAPPLICATION" - app_set_lcd_size 800 480 + target="-DNOKIAN8XX" sharedir="/opt/rockbox/share/rockbox" bindir="/opt/rockbox/bin" libdir="/opt/rockbox/lib" @@ -2983,12 +2980,11 @@ fi ;; 203|nokian900) + application="yes" target_id=76 - modelname="application" - app_modelname="nokian900" + modelname="nokian900" app_type="sdl-app" - target="-DAPPLICATION" - app_set_lcd_size 800 480 + target="-DNOKIAN900" sharedir="/opt/rockbox/share/rockbox" bindir="/opt/rockbox/bin" libdir="/opt/rockbox/lib" @@ -3236,6 +3232,11 @@ if [ -z "$debug" ]; then GCCOPTS="$GCCOPTS $GCCOPTIMIZE" fi +if [ "yes" = "$application" ]; then + echo Building Rockbox as an Application + extradefines="$extradefines -DAPPLICATION" +fi + echo "Using source code root directory: $rootdir" # this was once possible to change at build-time, but no more: @@ -3504,13 +3505,11 @@ fi if [ -n "$ARG_PREFIX" ]; then cmdline="$cmdline--prefix=\$(PREFIX) " fi -if [ "$modelname" = "application" ]; then - cmdline="$cmdline--target=$app_modelname --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT " -else - cmdline="$cmdline--target=\$(MODELNAME) " +if [ -n "$ARG_LCDWIDTH" ]; then + cmdline="$cmdline--lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT " fi -cmdline="$cmdline--ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts" +cmdline="$cmdline--target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts" ### end of cmdline @@ -3561,6 +3560,7 @@ sed > Makefile \ -e "s<@TOOLSDIR@<${toolsdir}