diff options
author | Dave Chapman <dave@dchapman.com> | 2011-02-27 11:37:39 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2011-02-27 11:37:39 +0000 |
commit | 376c9f3ad0c257ee97d7eba03962f232e85b36a7 (patch) | |
tree | 3323dfd60b82814af115b4c436ea8680ca9da978 /tools | |
parent | 9501986047056c9f6ca954817ae597e302028f2e (diff) | |
download | rockbox-376c9f3ad0c257ee97d7eba03962f232e85b36a7.tar.gz rockbox-376c9f3ad0c257ee97d7eba03962f232e85b36a7.zip |
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
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/buildzip.pl | 3 | ||||
-rwxr-xr-x | tools/configure | 45 | ||||
-rw-r--r-- | tools/root.make | 16 |
3 files changed, 32 insertions, 32 deletions
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, | |||
214 | 'install=s' => \$install, # install destination | 214 | 'install=s' => \$install, # install destination |
215 | 'rbdir:s' => \$rbdir, # If we want to put in a different directory | 215 | 'rbdir:s' => \$rbdir, # If we want to put in a different directory |
216 | 'l|link' => \$mklinks, # If we want to create links instead of copying files | 216 | 'l|link' => \$mklinks, # If we want to create links instead of copying files |
217 | 'a|app:s' => \$app, # Is this an Application build? | ||
217 | ); | 218 | ); |
218 | 219 | ||
219 | # GetOptions() doesn't remove the params from @ARGV if their value was "" | 220 | # GetOptions() doesn't remove the params from @ARGV if their value was "" |
@@ -681,8 +682,6 @@ $year+=1900; | |||
681 | sub runone { | 682 | sub runone { |
682 | my ($target, $fonts)=@_; | 683 | my ($target, $fonts)=@_; |
683 | 684 | ||
684 | $app = ($modelname eq "application"); | ||
685 | |||
686 | # Strip the leading / from $rbdir unless we are installing an application | 685 | # Strip the leading / from $rbdir unless we are installing an application |
687 | # build - the layout is different (no .rockbox, but bin/lib/share) | 686 | # build - the layout is different (no .rockbox, but bin/lib/share) |
688 | unless ($app && $install) { | 687 | 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= | |||
26 | sharedir= | 26 | sharedir= |
27 | 27 | ||
28 | thread_support="ASSEMBLER_THREADS" | 28 | thread_support="ASSEMBLER_THREADS" |
29 | app_modelname= | ||
30 | app_lcd_width= | 29 | app_lcd_width= |
31 | app_lcd_height= | 30 | app_lcd_height= |
32 | # | 31 | # |
@@ -610,7 +609,6 @@ androidcc () { | |||
610 | GLOBAL_LDOPTS="$GLOBAL_LDOPTS -nostdlib -lc -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack \ | 609 | GLOBAL_LDOPTS="$GLOBAL_LDOPTS -nostdlib -lc -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack \ |
611 | --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm" | 610 | --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm" |
612 | LDOPTS="$LDOPTS -shared -nostdlib -ldl -llog" | 611 | LDOPTS="$LDOPTS -shared -nostdlib -ldl -llog" |
613 | extradefines="$extradefines -DANDROID" | ||
614 | endian="little" | 612 | endian="little" |
615 | SHARED_FLAG="-shared" | 613 | SHARED_FLAG="-shared" |
616 | } | 614 | } |
@@ -2902,10 +2900,10 @@ fi | |||
2902 | ;; | 2900 | ;; |
2903 | 2901 | ||
2904 | 200|sdlapp) | 2902 | 200|sdlapp) |
2903 | application="yes" | ||
2905 | target_id=73 | 2904 | target_id=73 |
2906 | modelname="application" | 2905 | modelname="sdlapp" |
2907 | app_modelname="sdlapp" | 2906 | target="-DSDLAPP" |
2908 | target="-DAPPLICATION" | ||
2909 | app_set_paths | 2907 | app_set_paths |
2910 | app_set_lcd_size | 2908 | app_set_lcd_size |
2911 | memory=8 | 2909 | memory=8 |
@@ -2927,10 +2925,10 @@ fi | |||
2927 | ;; | 2925 | ;; |
2928 | 2926 | ||
2929 | 201|android) | 2927 | 201|android) |
2928 | application="yes" | ||
2930 | target_id=74 | 2929 | target_id=74 |
2931 | modelname="application" | 2930 | modelname="android" |
2932 | app_modelname="android" | 2931 | target="-DANDROID" |
2933 | target="-DAPPLICATION" | ||
2934 | app_type="android" | 2932 | app_type="android" |
2935 | app_set_lcd_size | 2933 | app_set_lcd_size |
2936 | sharedir="/data/data/org.rockbox/app_rockbox/rockbox" | 2934 | sharedir="/data/data/org.rockbox/app_rockbox/rockbox" |
@@ -2945,7 +2943,7 @@ fi | |||
2945 | bmp2rb_native="$rootdir/tools/bmp2rb -f 4" | 2943 | bmp2rb_native="$rootdir/tools/bmp2rb -f 4" |
2946 | output="librockbox.so" | 2944 | output="librockbox.so" |
2947 | bootoutput="librockbox.so" | 2945 | bootoutput="librockbox.so" |
2948 | appextra="recorder:gui:radio" | 2946 | appextra="recorder:gui:radio:hosted" |
2949 | plugins="yes" | 2947 | plugins="yes" |
2950 | swcodec="yes" | 2948 | swcodec="yes" |
2951 | # architecture, manufacturer and model for the target-tree build | 2949 | # architecture, manufacturer and model for the target-tree build |
@@ -2955,12 +2953,11 @@ fi | |||
2955 | ;; | 2953 | ;; |
2956 | 2954 | ||
2957 | 202|nokian8xx) | 2955 | 202|nokian8xx) |
2956 | application="yes" | ||
2958 | target_id=75 | 2957 | target_id=75 |
2959 | modelname="application" | 2958 | modelname="nokian8xx" |
2960 | app_modelname="nokian8xx" | ||
2961 | app_type="sdl-app" | 2959 | app_type="sdl-app" |
2962 | target="-DAPPLICATION" | 2960 | target="-DNOKIAN8XX" |
2963 | app_set_lcd_size 800 480 | ||
2964 | sharedir="/opt/rockbox/share/rockbox" | 2961 | sharedir="/opt/rockbox/share/rockbox" |
2965 | bindir="/opt/rockbox/bin" | 2962 | bindir="/opt/rockbox/bin" |
2966 | libdir="/opt/rockbox/lib" | 2963 | libdir="/opt/rockbox/lib" |
@@ -2983,12 +2980,11 @@ fi | |||
2983 | ;; | 2980 | ;; |
2984 | 2981 | ||
2985 | 203|nokian900) | 2982 | 203|nokian900) |
2983 | application="yes" | ||
2986 | target_id=76 | 2984 | target_id=76 |
2987 | modelname="application" | 2985 | modelname="nokian900" |
2988 | app_modelname="nokian900" | ||
2989 | app_type="sdl-app" | 2986 | app_type="sdl-app" |
2990 | target="-DAPPLICATION" | 2987 | target="-DNOKIAN900" |
2991 | app_set_lcd_size 800 480 | ||
2992 | sharedir="/opt/rockbox/share/rockbox" | 2988 | sharedir="/opt/rockbox/share/rockbox" |
2993 | bindir="/opt/rockbox/bin" | 2989 | bindir="/opt/rockbox/bin" |
2994 | libdir="/opt/rockbox/lib" | 2990 | libdir="/opt/rockbox/lib" |
@@ -3236,6 +3232,11 @@ if [ -z "$debug" ]; then | |||
3236 | GCCOPTS="$GCCOPTS $GCCOPTIMIZE" | 3232 | GCCOPTS="$GCCOPTS $GCCOPTIMIZE" |
3237 | fi | 3233 | fi |
3238 | 3234 | ||
3235 | if [ "yes" = "$application" ]; then | ||
3236 | echo Building Rockbox as an Application | ||
3237 | extradefines="$extradefines -DAPPLICATION" | ||
3238 | fi | ||
3239 | |||
3239 | echo "Using source code root directory: $rootdir" | 3240 | echo "Using source code root directory: $rootdir" |
3240 | 3241 | ||
3241 | # this was once possible to change at build-time, but no more: | 3242 | # this was once possible to change at build-time, but no more: |
@@ -3504,13 +3505,11 @@ fi | |||
3504 | if [ -n "$ARG_PREFIX" ]; then | 3505 | if [ -n "$ARG_PREFIX" ]; then |
3505 | cmdline="$cmdline--prefix=\$(PREFIX) " | 3506 | cmdline="$cmdline--prefix=\$(PREFIX) " |
3506 | fi | 3507 | fi |
3507 | if [ "$modelname" = "application" ]; then | 3508 | if [ -n "$ARG_LCDWIDTH" ]; then |
3508 | cmdline="$cmdline--target=$app_modelname --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT " | 3509 | cmdline="$cmdline--lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT " |
3509 | else | ||
3510 | cmdline="$cmdline--target=\$(MODELNAME) " | ||
3511 | fi | 3510 | fi |
3512 | 3511 | ||
3513 | cmdline="$cmdline--ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts" | 3512 | cmdline="$cmdline--target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts" |
3514 | 3513 | ||
3515 | ### end of cmdline | 3514 | ### end of cmdline |
3516 | 3515 | ||
@@ -3561,6 +3560,7 @@ sed > Makefile \ | |||
3561 | -e "s<@TOOLSDIR@<${toolsdir}<g" \ | 3560 | -e "s<@TOOLSDIR@<${toolsdir}<g" \ |
3562 | -e "s<@APPS@<${apps}<g" \ | 3561 | -e "s<@APPS@<${apps}<g" \ |
3563 | -e "s<@APP_TYPE@<${app_type}<g" \ | 3562 | -e "s<@APP_TYPE@<${app_type}<g" \ |
3563 | -e "s<@APPLICATION@<${application}<g" \ | ||
3564 | -e "s<@GCCVER@<${gccver}<g" \ | 3564 | -e "s<@GCCVER@<${gccver}<g" \ |
3565 | -e "s<@GCCNUM@<${gccnum}<g" \ | 3565 | -e "s<@GCCNUM@<${gccnum}<g" \ |
3566 | -e "s<@UNAME@<${uname}<g" \ | 3566 | -e "s<@UNAME@<${uname}<g" \ |
@@ -3630,6 +3630,7 @@ export RANLIB=@RANLIB@ | |||
3630 | export PREFIX=@PREFIX@ | 3630 | export PREFIX=@PREFIX@ |
3631 | export PROFILE_OPTS=@PROFILE_OPTS@ | 3631 | export PROFILE_OPTS=@PROFILE_OPTS@ |
3632 | export APP_TYPE=@APP_TYPE@ | 3632 | export APP_TYPE=@APP_TYPE@ |
3633 | export APPLICATION=@APPLICATION@ | ||
3633 | export SIMDIR=\$(ROOTDIR)/uisimulator/sdl | 3634 | export SIMDIR=\$(ROOTDIR)/uisimulator/sdl |
3634 | export GCCOPTS=@GCCOPTS@ | 3635 | export GCCOPTS=@GCCOPTS@ |
3635 | export TARGET_INC=@TARGET_INC@ | 3636 | export TARGET_INC=@TARGET_INC@ |
diff --git a/tools/root.make b/tools/root.make index 0640ba5656..85a996fc62 100644 --- a/tools/root.make +++ b/tools/root.make | |||
@@ -251,10 +251,10 @@ tags: | |||
251 | $(SILENT)etags -o $(BUILDDIR)/TAGS $(filter-out %.o,$(SRC) $(OTHER_SRC)) | 251 | $(SILENT)etags -o $(BUILDDIR)/TAGS $(filter-out %.o,$(SRC) $(OTHER_SRC)) |
252 | 252 | ||
253 | fontzip: | 253 | fontzip: |
254 | $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -m \"$(MODELNAME)\" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 1 -o rockbox-fonts.zip $(TARGET) $(BINARY) | 254 | $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m \"$(MODELNAME)\" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 1 -o rockbox-fonts.zip $(TARGET) $(BINARY) |
255 | 255 | ||
256 | zip: | 256 | zip: |
257 | $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -m \"$(MODELNAME)\" -i \"$(TARGET_ID)\" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" $(TARGET) $(BINARY) | 257 | $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m \"$(MODELNAME)\" -i \"$(TARGET_ID)\" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" $(TARGET) $(BINARY) |
258 | 258 | ||
259 | mapzip: | 259 | mapzip: |
260 | $(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip | 260 | $(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip |
@@ -263,14 +263,14 @@ elfzip: | |||
263 | $(SILENT)find . -name "*.elf" | xargs zip rockbox-elfs.zip | 263 | $(SILENT)find . -name "*.elf" | xargs zip rockbox-elfs.zip |
264 | 264 | ||
265 | fullzip: | 265 | fullzip: |
266 | $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -m \"$(MODELNAME)\" -i \"$(TARGET_ID)\" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 2 -o rockbox-full.zip $(TARGET) $(BINARY) | 266 | $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m \"$(MODELNAME)\" -i \"$(TARGET_ID)\" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 2 -o rockbox-full.zip $(TARGET) $(BINARY) |
267 | 267 | ||
268 | 7zip: | 268 | 7zip: |
269 | $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -m \"$(MODELNAME)\" -i \"$(TARGET_ID)\" -o "rockbox.7z" -z "7za a -mx=9" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" $(TARGET) $(BINARY) | 269 | $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m \"$(MODELNAME)\" -i \"$(TARGET_ID)\" -o "rockbox.7z" -z "7za a -mx=9" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" $(TARGET) $(BINARY) |
270 | 270 | ||
271 | tar: | 271 | tar: |
272 | $(SILENT)rm -f rockbox.tar | 272 | $(SILENT)rm -f rockbox.tar |
273 | $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -m \"$(MODELNAME)\" -i \"$(TARGET_ID)\" -o "rockbox.tar" -z "tar -cf" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" $(TARGET) $(BINARY) | 273 | $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m \"$(MODELNAME)\" -i \"$(TARGET_ID)\" -o "rockbox.tar" -z "tar -cf" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" $(TARGET) $(BINARY) |
274 | 274 | ||
275 | bzip2: tar | 275 | bzip2: tar |
276 | $(SILENT)bzip2 -f9 rockbox.tar | 276 | $(SILENT)bzip2 -f9 rockbox.tar |
@@ -305,15 +305,15 @@ bininstall: $(BUILDDIR)/$(BINARY) | |||
305 | 305 | ||
306 | install: | 306 | install: |
307 | @echo "Installing your build in your '$(RBPREFIX)' dir" | 307 | @echo "Installing your build in your '$(RBPREFIX)' dir" |
308 | $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -m "$(MODELNAME)" -i "$(TARGET_ID)" $(INSTALL) -z "zip -r0" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 0 $(TARGET) $(BINARY) | 308 | $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m "$(MODELNAME)" -i "$(TARGET_ID)" $(INSTALL) -z "zip -r0" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 0 $(TARGET) $(BINARY) |
309 | 309 | ||
310 | fullinstall: | 310 | fullinstall: |
311 | @echo "Installing a full setup in your '$(RBPREFIX)' dir" | 311 | @echo "Installing a full setup in your '$(RBPREFIX)' dir" |
312 | $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -m "$(MODELNAME)" -i "$(TARGET_ID)" $(INSTALL) -z "zip -r0" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 2 $(TARGET) $(BINARY) | 312 | $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m "$(MODELNAME)" -i "$(TARGET_ID)" $(INSTALL) -z "zip -r0" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 2 $(TARGET) $(BINARY) |
313 | 313 | ||
314 | symlinkinstall: | 314 | symlinkinstall: |
315 | @echo "Installing a full setup with links in your '$(RBPREFIX)' dir" | 315 | @echo "Installing a full setup with links in your '$(RBPREFIX)' dir" |
316 | $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -m "$(MODELNAME)" -i "$(TARGET_ID)" $(INSTALL) -z "zip -r0" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 2 $(TARGET) $(BINARY) -l | 316 | $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m "$(MODELNAME)" -i "$(TARGET_ID)" $(INSTALL) -z "zip -r0" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 2 $(TARGET) $(BINARY) -l |
317 | endif | 317 | endif |
318 | 318 | ||
319 | help: | 319 | help: |