Allow http caching to use the old dumb mode again.
[Rockbox.git] / tools / configure
blob7fffcfdb6ab3f95d9dc87234cc1601f541dff04f
1 #!/bin/sh
2 # __________ __ ___.
3 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 # \/ \/ \/ \/ \/
8 # $Id$
11 # global CC options for all platforms
12 CCOPTS="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes"
14 use_logf="#undef ROCKBOX_HAS_LOGF"
16 scriptver=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'`
19 # Begin Function Definitions
21 input() {
22 read response
23 echo $response
26 prefixtools () {
27 prefix="$1"
28 CC=${prefix}gcc
29 WINDRES=${prefix}windres
30 DLLTOOL=${prefix}dlltool
31 DLLWRAP=${prefix}dllwrap
32 RANLIB=${prefix}ranlib
33 LD=${prefix}ld
34 AR=${prefix}ar
35 AS=${prefix}as
36 OC=${prefix}objcopy
39 crosswincc () {
40 # naive approach to selecting a mingw cross-compiler on linux/*nix
41 echo "Enabling win32 crosscompiling"
43 prefixtools i586-mingw32msvc-
45 LDOPTS="-lgdi32 -luser32 -mwindows"
46 # add cross-compiler option(s)
47 GCCOPTS="$GCCOPTS -mno-cygwin"
49 output="rockboxui.exe" # use this as output binary name
50 crosscompile="yes"
51 endian="little" # windows is little endian
54 # scan the $PATH for the given command
55 findtool(){
56 file="$1"
58 IFS=":"
59 for path in $PATH
61 # echo "checks for $file in $path" >&2
62 if test -f "$path/$file"; then
63 echo "$path/$file"
64 return
66 done
69 # parse the argument list, returns the value after the = in case of a
70 # option=value type option, returns 0 in case of --ccache or --no-ccache,
71 # returns 1 if the searched argument type wasn't fount in the argument list
72 # Usage [var = ]`parse_args <argumenttype>`, i.e. `parse_args target`
74 # var definitons below are needed so that parse_args can see the arguments
75 arg1=$1 arg2=$2 arg3=$3 arg4=$4 arg5=$5 arg6=$6 arg7=$7 arg8=$8 arg9=$9
77 parse_args() {
78 ret="1"
79 for i in $arg1 $arg2 $arg3 $arg4 $arg5 $arg6 $arg7 $arg8 $arg9
81 if [ "$1" = "--ccache" ]; then
82 if [ "$i" = "--ccache" ]; then
83 ret="0"
85 elif [ "$1" = "--no-ccache" ]; then
86 if [ "$i" = "--no-ccache" ]; then
87 ret="0"
89 elif [ "$1" = `echo $i|cut -d'=' -f1` ]; then
90 ret=`echo $i|cut -d'=' -f2`
92 done
93 echo "$ret"
96 simcc () {
98 # default tool setup for native building
99 prefixtools ""
101 simver=sdl
102 GCCOPTS='-W -Wall -g -fno-builtin'
104 output="rockboxui" # use this as default output binary name
106 # generic sdl-config checker
107 sdl=`findtool sdl-config`
109 if [ -z "$sdl" ]; then
110 echo "configure didn't find sdl-config, which indicates that you"
111 echo "don't have SDL (properly) installed. Please correct and"
112 echo "re-run configure!"
113 exit
116 # default share option, override below if needed
117 SHARED_FLAG="-shared"
119 case $uname in
120 CYGWIN*)
121 echo "Cygwin host detected"
123 # sdl version
124 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
125 LDOPTS="`sdl-config --libs` -mconsole"
127 output="rockboxui.exe" # use this as output binary name
130 Linux)
131 echo "Linux host detected"
132 GCCOPTS="$GCCOPTS"
133 if [ "0" != `sdl-config --libs |grep -c mwindows` ]; then
134 # Enable crosscompiling if sdl-config is from Windows SDL
135 crosswincc
137 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
138 LDOPTS="`sdl-config --libs`"
141 FreeBSD)
142 echo "FreeBSD host detected"
143 # sdl version
144 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
145 LDOPTS="`sdl-config --libs`"
148 Darwin)
149 echo "Darwin host detected"
150 # sdl version
151 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
152 LDOPTS="`sdl-config --libs`"
153 SHARED_FLAG="-dynamiclib -Wl\,-single_module"
157 echo "Unsupported system: $uname, fix configure and retry"
158 exit
160 esac
162 if [ "`uname -m`" = "x86_64" ] || [ "`uname -m`" = "amd64" ]; then
163 # fPIC is needed to make shared objects link
164 # setting visibility to hidden is necessary to avoid strange crashes
165 # due to symbol clashing
166 GCCOPTS="$GCCOPTS -fPIC -fvisibility=hidden"
169 GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
171 if test "X$crosscompile" != "Xyes"; then
172 id=$$
173 cat >/tmp/conftest-$id.c <<EOF
174 #include <stdio.h>
175 int main(int argc, char **argv)
177 int var=0;
178 char *varp = (char *)&var;
179 *varp=1;
181 printf("%d\n", var);
182 return 0;
186 $CC -o /tmp/conftest-$id /tmp/conftest-$id.c 2>/dev/null
188 if test `/tmp/conftest-$id 2>/dev/null` -gt "1"; then
189 # big endian
190 endian="big"
191 else
192 # little endian
193 endian="little"
195 echo "Simulator environment deemed $endian endian"
197 # use wildcard here to make it work even if it was named *.exe like
198 # on cygwin
199 rm -f /tmp/conftest-$id*
204 # functions for setting up cross-compiler names and options
205 # also set endianess and what the exact recommended gcc version is
206 # the gcc version should most likely match what versions we build with
207 # rockboxdev.sh
209 shcc () {
210 prefixtools sh-elf-
211 GCCOPTS="$CCOPTS -m1"
212 GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
213 endian="big"
214 gccchoice="4.0.3"
217 calmrisccc () {
218 prefixtools calmrisc16-unknown-elf-
219 GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
220 GCCOPTIMIZE="-fomit-frame-pointer"
221 endian="big"
224 coldfirecc () {
225 prefixtools m68k-elf-
226 GCCOPTS="$CCOPTS -m5206e -Wa\,-m5249 -malign-int -mstrict-align"
227 GCCOPTIMIZE="-fomit-frame-pointer"
228 endian="big"
229 gccchoice="3.4.6"
232 arm7tdmicc () {
233 prefixtools arm-elf-
234 GCCOPTS="$CCOPTS -mcpu=arm7tdmi"
235 if test "X$1" != "Xshort"; then
236 GCCOPTS="$GCCOPTS -mlong-calls"
238 GCCOPTIMIZE="-fomit-frame-pointer"
239 endian="little"
240 gccchoice="4.0.3"
243 arm9tdmicc () {
244 prefixtools arm-elf-
245 GCCOPTS="$CCOPTS -mcpu=arm9tdmi -mlong-calls"
246 GCCOPTIMIZE="-fomit-frame-pointer"
247 endian="little"
248 gccchoice="4.0.3"
251 arm946cc () {
252 prefixtools arm-elf-
253 GCCOPTS="$CCOPTS -mcpu=arm9e -mlong-calls"
254 GCCOPTIMIZE="-fomit-frame-pointer"
255 endian="little"
256 gccchoice="4.0.3"
259 arm926ejscc () {
260 prefixtools arm-elf-
261 GCCOPTS="$CCOPTS -mcpu=arm926ej-s -mlong-calls"
262 GCCOPTIMIZE="-fomit-frame-pointer"
263 endian="little"
264 gccchoice="4.0.3"
267 arm1136jfscc () {
268 prefixtools arm-elf-
269 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s -mlong-calls"
270 GCCOPTIMIZE="-fomit-frame-pointer"
271 endian="little"
272 gccchoice="4.0.3"
275 whichadvanced () {
276 ##################################################################
277 # Prompt for specific developer options
279 echo ""
280 echo "Enter your developer options (press enter when done)"
281 echo -n "(D)EBUG, (L)ogf, (S)imulator, (P)rofiling, (V)oice"
282 if [ "$memory" = "2" ]; then
283 echo -n ", (8)MB MOD"
285 if [ "$modelname" = "h120" ]; then
286 echo -n ", (R)TC MOD"
288 echo ""
290 cont=1
292 while [ $cont = "1" ]; do
294 option=`input`;
296 case $option in
297 [Dd])
298 if [ "yes" = "$profile" ]; then
299 echo "Debug is incompatible with profiling"
300 else
301 echo "define DEBUG"
302 use_debug="yes"
305 [Ll])
306 echo "logf() support enabled"
307 logf="yes"
309 [Ss])
310 echo "Simulator build enabled"
311 simulator="yes"
313 [Pp])
314 if [ "yes" = "$use_debug" ]; then
315 echo "Profiling is incompatible with debug"
316 else
317 echo "Profiling support is enabled"
318 profile="yes"
321 [Vv])
322 echo "Voice build selected"
323 voice="yes"
326 if [ "$memory" = "2" ]; then
327 memory="8"
328 echo "Memory size selected: 8MB"
329 else
330 cont=0
333 [Rr])
334 if [ "$modelname" = "h120" ]; then
335 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
336 have_rtc_alarm="#define HAVE_RTC_ALARM"
337 echo "RTC functions enabled (DS1339/DS3231)"
338 else
339 cont=0
343 cont=0
345 esac
346 done
347 echo "done"
349 if [ "yes" = "$voice" ]; then
350 # Ask about languages to build
351 echo "Select a number for the language to use (default is english)"
352 # The multiple-language feature is currently broken
353 # echo "You may enter a comma-separated list of languages to build"
355 picklang
356 voicelanguage=`whichlang`
358 if [ -z "$voicelanguage" ]; then
359 # pick a default
360 voicelanguage="english"
362 echo "Voice language set to $voicelanguage"
364 # Configure encoder and TTS engine for each language
365 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
366 voiceconfig "$thislang"
367 done
369 if [ "yes" = "$use_debug" ]; then
370 debug="-DDEBUG"
371 GCCOPTS="$GCCOPTS -g -DDEBUG"
373 if [ "yes" = "$logf" ]; then
374 use_logf="#define ROCKBOX_HAS_LOGF 1"
376 if [ "yes" = "$simulator" ]; then
377 debug="-DDEBUG"
378 extradefines="$extradefines -DSIMULATOR"
380 if [ "yes" = "$profile" ]; then
381 extradefines="$extradefines -DRB_PROFILE"
382 PROFILE_OPTS="-finstrument-functions"
386 # Configure voice settings
387 voiceconfig () {
388 thislang=$1
389 echo "Building $thislang voice for $modelname. Select options"
390 echo ""
392 if [ -f "`which flite`" ]; then
393 FLITE="F(l)ite "
394 FLITE_OPTS=""
395 DEFAULT_TTS="flite"
396 DEFAULT_TTS_OPTS=$FLITE_OPTS
397 DEFAULT_NOISEFLOOR="500"
398 DEFAULT_CHOICE="L"
400 if [ -f "`which espeak`" ]; then
401 ESPEAK="(e)Speak "
402 ESPEAK_OPTS=""
403 DEFAULT_TTS="espeak"
404 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
405 DEFAULT_NOISEFLOOR="500"
406 DEFAULT_CHOICE="e"
408 if [ -f "`which festival`" ]; then
409 FESTIVAL="(F)estival "
410 case "$thislang" in
411 "italiano")
412 FESTIVAL_OPTS="--language italian"
414 "espanol")
415 FESTIVAL_OPTS="--language spanish"
417 "finnish")
418 FESTIVAL_OPTS="--language finnish"
420 "czech")
421 FESTIVAL_OPTS="--language czech"
424 FESTIVAL_OPTS=""
426 esac
427 DEFAULT_TTS="festival"
428 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
429 DEFAULT_NOISEFLOOR="500"
430 DEFAULT_CHOICE="F"
432 if [ -f "`which swift`" ]; then
433 SWIFT="S(w)ift "
434 SWIFT_OPTS=""
435 DEFAULT_TTS="swift"
436 DEFAULT_TTS_OPTS=$SWIFT_OPTS
437 DEFAULT_NOISEFLOOR="500"
438 DEFAULT_CHOICE="w"
440 # Allow SAPI if Windows is in use
441 if [ -f "`which winver`" ]; then
442 SAPI="(S)API "
443 SAPI_OPTS=""
444 DEFAULT_TTS="sapi"
445 DEFAULT_TTS_OPTS=$SAPI_OPTS
446 DEFAULT_NOISEFLOOR="500"
447 DEFAULT_CHOICE="S"
450 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
451 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
452 exit
455 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
456 option=`input`
457 case "$option" in
458 [Ll])
459 TTS_ENGINE="flite"
460 NOISEFLOOR="500" # TODO: check this value
461 TTS_OPTS=$FLITE_OPTS
463 [Ee])
464 TTS_ENGINE="espeak"
465 NOISEFLOOR="500"
466 TTS_OPTS=$ESPEAK_OPTS
468 [Ff])
469 TTS_ENGINE="festival"
470 NOISEFLOOR="500"
471 TTS_OPTS=$FESTIVAL_OPTS
473 [Ss])
474 TTS_ENGINE="sapi"
475 NOISEFLOOR="500"
476 TTS_OPTS=$SAPI_OPTS
478 [Ww])
479 TTS_ENGINE="swift"
480 NOISEFLOOR="500"
481 TTS_OPTS=$SWIFT_OPTS
484 TTS_ENGINE=$DEFAULT_TTS
485 TTS_OPTS=$DEFAULT_TTS_OPTS
486 NOISEFLOOR=$DEFAULT_NOISEFLOOR
487 esac
488 echo "Using $TTS_ENGINE for TTS"
490 # Allow the user to input manual commandline options
491 printf "Enter $TTS_ENGINE options (enter for defaults \"$TTS_OPTS\"): "
492 USER_TTS_OPTS=`input`
493 if [ -n "$USER_TTS_OPTS" ]; then
494 TTS_OPTS="$USER_TTS_OPTS"
497 echo ""
499 if [ "$swcodec" = "yes" ]; then
500 ENCODER="rbspeexenc"
501 ENC_CMD="rbspeexenc"
502 ENC_OPTS="-q 4 -c 10"
503 else
504 if [ -f "`which lame`" ]; then
505 ENCODER="lame"
506 ENC_CMD="lame"
507 ENC_OPTS="--resample 12 -t -m m -h -V 9 -S -B 64 --vbr-new"
508 else
509 echo "You need LAME in the system path to build voice files for"
510 echo "HWCODEC targets."
511 exit
515 echo "Using $ENCODER for encoding voice clips"
517 # Allow the user to input manual commandline options
518 printf "Enter $ENCODER options (enter for defaults \"$ENC_OPTS\"): "
519 USER_ENC_OPTS=`input`
520 if [ -n "$USER_ENC_OPTS" ]; then
521 ENC_OPTS=$USER_ENC_OPTS
524 TEMPDIR="${pwd}"
525 if [ -f "`which cygpath`" ]; then
526 TEMPDIR=`cygpath . -a -w`
530 picklang() {
531 # figure out which languages that are around
532 for file in $rootdir/apps/lang/*.lang; do
533 clean=`echo $file | sed -e 's:.*/::g' | cut "-d." -f1`
534 langs="$langs $clean"
535 done
537 num=1
538 for one in $langs; do
539 echo "$num. $one"
540 num=`expr $num + 1`
541 done
543 read pick
546 whichlang() {
547 output=""
548 # Allow the user to pass a comma-separated list of langauges
549 for thispick in `echo $pick | sed 's/,/ /g'`; do
550 num=1
551 for one in $langs; do
552 # Accept both the language number and name
553 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
554 if [ "$output" = "" ]; then
555 output=$one
556 else
557 output=$output,$one
560 num=`expr $num + 1`
561 done
562 done
563 echo $output
566 opt=$1
568 if test "$opt" = "--help"; then
569 echo "Rockbox configure script."
570 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
571 echo "Do *NOT* run this within the tools directory!"
572 echo ""
573 cat <<EOF
574 Usage: configure [OPTION]...
575 Options:
576 --target=TARGET Sets the target, TARGET can be either the target ID or
577 corresponding string. Run without this option to see the
578 available targets.
580 --ram=RAM Sets the RAM for certain targets. Even though any number
581 is accepted, not every number is correct. The default
582 value will be applied, if you entered a wrong number
583 (which depends on the target). Watch the output. Run
584 without this option if you are not sure which the right
585 number is.
587 --type=TYPE Sets the build type. The shortcut is valied.
588 Run without this option to see available types.
589 --ccache Enable ccache use (done by default these days)
590 --no-ccache Disable ccache use
591 --help Shows this message (must not be used with other options)
595 exit
598 if test -r "configure"; then
599 # this is a check for a configure script in the current directory, it there
600 # is one, try to figure out if it is this one!
602 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
603 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
604 echo "It will only cause you pain and grief. Instead do this:"
605 echo ""
606 echo " cd .."
607 echo " mkdir build-dir"
608 echo " cd build-dir"
609 echo " ../tools/configure"
610 echo ""
611 echo "Much happiness will arise from this. Enjoy"
612 exit
616 # get our current directory
617 pwd=`pwd`;
619 if { echo $pwd | grep " "; } then
620 echo "You're running this script in a path that contains space. The build"
621 echo "system is unfortunately not clever enough to deal with this. Please"
622 echo "run the script from a different path, rename the path or fix the build"
623 echo "system!"
624 exit
627 if [ -z "$rootdir" ]; then
628 ##################################################################
629 # Figure out where the source code root is!
631 rootdir=`dirname $0`/../
633 #####################################################################
634 # Convert the possibly relative directory name to an absolute version
636 now=`pwd`
637 cd $rootdir
638 rootdir=`pwd`
640 # cd back to the build dir
641 cd $now
644 apps="apps"
645 appsdir='\$(ROOTDIR)/apps'
646 firmdir='\$(ROOTDIR)/firmware'
647 toolsdir='\$(ROOTDIR)/tools'
650 ##################################################################
651 # Figure out target platform
654 if [ "1" != `parse_args --target` ]; then
655 buildfor=`parse_args --target`;
656 else
657 echo "Enter target platform:"
658 cat <<EOF
659 ==Archos== ==iriver== ==Apple iPod==
660 0) Player/Studio 10) H120/H140 20) Color/Photo
661 1) Recorder 11) H320/H340 21) Nano
662 2) FM Recorder 12) iHP-100/110/115 22) Video
663 3) Recorder v2 13) iFP-790 23) 3G
664 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
665 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
666 6) AV300 26) Mini 2G
667 27) 1G, 2G
669 ==iAudio== ==Toshiba== ==SanDisk==
670 30) X5/X5V/X5L 40) Gigabeat F 50) Sansa e200
671 31) M5/M5L 41) Gigabeat S 51) Sansa e200R
672 32) 7 52) Sansa c200
673 33) Cowon D2 53) Sansa m200
674 34) M3/M3L
676 ==Tatung== ==Olympus== ==Logik==
677 60) Elio TPJ-1022 70) M:Robe 500 80) DAX 1GB MP3/DAB
678 71) M:Robe 100
679 ==Creative==
680 90) Zen Vision:M 30GB
681 91) Zen Vision:M 60GB
682 92) Zen Vision
686 buildfor=`input`;
689 # Set of tools built for all target platforms:
690 toolset="rdf2binary convbdf codepages"
692 # Toolsets for some target families:
693 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
694 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
695 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
696 ipodbitmaptools="$toolset scramble bmp2rb"
697 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
698 tccbitmaptools="$toolset scramble mktccboot bmp2rb"
699 # generic is used by IFP, H10, Sansa-e200
700 genericbitmaptools="$toolset bmp2rb"
703 # ---- For each target ----
705 # *Variables*
706 # target_id: a unique number identifying this target, IS NOT the menu number.
707 # Just use the currently highest number+1 when you add a new
708 # target.
709 # modelname: short model name used all over to identify this target
710 # memory: number of megabytes of RAM this target has. If the amount can
711 # be selected by the size prompt, let memory be unset here
712 # target: -Ddefine passed to the build commands to make the correct
713 # config-*.h file get included etc
714 # tool: the tool that takes a plain binary and converts that into a
715 # working "firmware" file for your target
716 # output: the final output file name
717 # boottool: the tool that takes a plain binary and generates a bootloader
718 # file for your target (or blank to use $tool)
719 # bootoutput:the final output file name for the bootloader (or blank to use
720 # $output)
721 # appextra: passed to the APPEXTRA variable in the Makefiles.
722 # TODO: add proper explanation
723 # archosrom: used only for Archos targets that build a special flashable .ucl
724 # image.
725 # flash: name of output for flashing, for targets where there's a special
726 # file output for this.
727 # plugins: set to 'yes' to build the plugins. Early development builds can
728 # set this to no in the early stages to have an easier life for a
729 # while
730 # swcodec: set 'yes' on swcodec targets
731 # toolset: lists what particular tools in the tools/ directory that this
732 # target needs to have built prior to building Rockbox
734 # *Functions*
735 # *cc: sets up gcc and compiler options for your target builds. Note
736 # that if you select a simulator build, the compiler selection is
737 # overridden later in the script.
739 case $buildfor in
741 0|player)
742 target_id=1
743 modelname="player"
744 target="-DARCHOS_PLAYER"
745 shcc
746 tool="$rootdir/tools/scramble"
747 output="archos.mod"
748 appextra="player:gui"
749 archosrom="$pwd/rombox.ucl"
750 flash="$pwd/rockbox.ucl"
751 plugins="yes"
752 swcodec=""
754 # toolset is the tools within the tools directory that we build for
755 # this particular target.
756 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
758 # Note: the convbdf is present in the toolset just because: 1) the
759 # firmware/Makefile assumes it is present always, and 2) we will need it when we
760 # build the player simulator
762 t_cpu="sh"
763 t_manufacturer="archos"
764 t_model="player"
767 1|recorder)
768 target_id=2
769 modelname="recorder"
770 target="-DARCHOS_RECORDER"
771 shcc
772 tool="$rootdir/tools/scramble"
773 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
774 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
775 output="ajbrec.ajz"
776 appextra="recorder:gui"
777 #archosrom="$pwd/rombox.ucl"
778 flash="$pwd/rockbox.ucl"
779 plugins="yes"
780 swcodec=""
781 # toolset is the tools within the tools directory that we build for
782 # this particular target.
783 toolset=$archosbitmaptools
784 t_cpu="sh"
785 t_manufacturer="archos"
786 t_model="recorder"
789 2|fmrecorder)
790 target_id=3
791 modelname="fmrecorder"
792 target="-DARCHOS_FMRECORDER"
793 shcc
794 tool="$rootdir/tools/scramble -fm"
795 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
796 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
797 output="ajbrec.ajz"
798 appextra="recorder:gui"
799 #archosrom="$pwd/rombox.ucl"
800 flash="$pwd/rockbox.ucl"
801 plugins="yes"
802 swcodec=""
803 # toolset is the tools within the tools directory that we build for
804 # this particular target.
805 toolset=$archosbitmaptools
806 t_cpu="sh"
807 t_manufacturer="archos"
808 t_model="fm_v2"
811 3|recorderv2)
812 target_id=4
813 modelname="recorderv2"
814 target="-DARCHOS_RECORDERV2"
815 shcc
816 tool="$rootdir/tools/scramble -v2"
817 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
818 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
819 output="ajbrec.ajz"
820 appextra="recorder:gui"
821 #archosrom="$pwd/rombox.ucl"
822 flash="$pwd/rockbox.ucl"
823 plugins="yes"
824 swcodec=""
825 # toolset is the tools within the tools directory that we build for
826 # this particular target.
827 toolset=$archosbitmaptools
828 t_cpu="sh"
829 t_manufacturer="archos"
830 t_model="fm_v2"
833 4|ondiosp)
834 target_id=7
835 modelname="ondiosp"
836 target="-DARCHOS_ONDIOSP"
837 shcc
838 tool="$rootdir/tools/scramble -osp"
839 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
840 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
841 output="ajbrec.ajz"
842 appextra="recorder:gui"
843 archosrom="$pwd/rombox.ucl"
844 flash="$pwd/rockbox.ucl"
845 plugins="yes"
846 swcodec=""
847 # toolset is the tools within the tools directory that we build for
848 # this particular target.
849 toolset=$archosbitmaptools
850 t_cpu="sh"
851 t_manufacturer="archos"
852 t_model="ondio"
855 5|ondiofm)
856 target_id=8
857 modelname="ondiofm"
858 target="-DARCHOS_ONDIOFM"
859 shcc
860 tool="$rootdir/tools/scramble -ofm"
861 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
862 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
863 output="ajbrec.ajz"
864 appextra="recorder:gui"
865 #archosrom="$pwd/rombox.ucl"
866 flash="$pwd/rockbox.ucl"
867 plugins="yes"
868 swcodec=""
869 toolset=$archosbitmaptools
870 t_cpu="sh"
871 t_manufacturer="archos"
872 t_model="ondio"
875 6|av300)
876 target_id=38
877 modelname="av300"
878 target="-DARCHOS_AV300"
879 memory=16 # always
880 arm7tdmicc
881 tool="$rootdir/tools/scramble -mm=C"
882 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
883 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
884 output="cjbm.ajz"
885 appextra="recorder:gui"
886 plugins="yes"
887 swcodec=""
888 # toolset is the tools within the tools directory that we build for
889 # this particular target.
890 toolset="$toolset scramble descramble bmp2rb"
891 # architecture, manufacturer and model for the target-tree build
892 t_cpu="arm"
893 t_manufacturer="archos"
894 t_model="av300"
897 10|h120)
898 target_id=9
899 modelname="h120"
900 target="-DIRIVER_H120"
901 memory=32 # always
902 coldfirecc
903 tool="$rootdir/tools/scramble -add=h120"
904 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
905 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
906 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
907 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
908 output="rockbox.iriver"
909 appextra="recorder:gui"
910 flash="$pwd/rombox.iriver"
911 plugins="yes"
912 swcodec="yes"
913 # toolset is the tools within the tools directory that we build for
914 # this particular target.
915 toolset=$iriverbitmaptools
916 t_cpu="coldfire"
917 t_manufacturer="iriver"
918 t_model="h100"
921 11|h300)
922 target_id=10
923 modelname="h300"
924 target="-DIRIVER_H300"
925 memory=32 # always
926 coldfirecc
927 tool="$rootdir/tools/scramble -add=h300"
928 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
929 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
930 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
931 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
932 output="rockbox.iriver"
933 appextra="recorder:gui"
934 plugins="yes"
935 swcodec="yes"
936 # toolset is the tools within the tools directory that we build for
937 # this particular target.
938 toolset=$iriverbitmaptools
939 t_cpu="coldfire"
940 t_manufacturer="iriver"
941 t_model="h300"
944 12|h100)
945 target_id=11
946 modelname="h100"
947 target="-DIRIVER_H100"
948 memory=16 # always
949 coldfirecc
950 tool="$rootdir/tools/scramble -add=h100"
951 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
952 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
953 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
954 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
955 output="rockbox.iriver"
956 appextra="recorder:gui"
957 flash="$pwd/rombox.iriver"
958 plugins="yes"
959 swcodec="yes"
960 # toolset is the tools within the tools directory that we build for
961 # this particular target.
962 toolset=$iriverbitmaptools
963 t_cpu="coldfire"
964 t_manufacturer="iriver"
965 t_model="h100"
968 13|ifp7xx)
969 target_id=19
970 modelname="ifp7xx"
971 target="-DIRIVER_IFP7XX"
972 memory=1
973 arm7tdmicc short
974 tool="cp"
975 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
976 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
977 output="rockbox.wma"
978 appextra="recorder:gui"
979 plugins="yes"
980 swcodec="yes"
981 # toolset is the tools within the tools directory that we build for
982 # this particular target.
983 toolset=$genericbitmaptools
984 t_cpu="arm"
985 t_manufacturer="pnx0101"
986 t_model="iriver-ifp7xx"
989 14|h10)
990 target_id=22
991 modelname="h10"
992 target="-DIRIVER_H10"
993 memory=32 # always
994 arm7tdmicc
995 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
996 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
997 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
998 output="rockbox.mi4"
999 appextra="recorder:gui"
1000 plugins="yes"
1001 swcodec="yes"
1002 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1003 bootoutput="H10_20GC.mi4"
1004 # toolset is the tools within the tools directory that we build for
1005 # this particular target.
1006 toolset="$genericbitmaptools scramble"
1007 # architecture, manufacturer and model for the target-tree build
1008 t_cpu="arm"
1009 t_manufacturer="iriver"
1010 t_model="h10"
1013 15|h10_5gb)
1014 target_id=24
1015 modelname="h10_5gb"
1016 target="-DIRIVER_H10_5GB"
1017 memory=32 # always
1018 arm7tdmicc
1019 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1020 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1021 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1022 output="rockbox.mi4"
1023 appextra="recorder:gui"
1024 plugins="yes"
1025 swcodec="yes"
1026 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1027 bootoutput="H10.mi4"
1028 # toolset is the tools within the tools directory that we build for
1029 # this particular target.
1030 toolset="$genericbitmaptools scramble"
1031 # architecture, manufacturer and model for the target-tree build
1032 t_cpu="arm"
1033 t_manufacturer="iriver"
1034 t_model="h10"
1037 20|ipodcolor)
1038 target_id=13
1039 modelname="ipodcolor"
1040 target="-DIPOD_COLOR"
1041 memory=32 # always
1042 arm7tdmicc
1043 tool="$rootdir/tools/scramble -add=ipco"
1044 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1045 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1046 output="rockbox.ipod"
1047 appextra="recorder:gui"
1048 plugins="yes"
1049 swcodec="yes"
1050 bootoutput="bootloader-$modelname.ipod"
1051 # toolset is the tools within the tools directory that we build for
1052 # this particular target.
1053 toolset=$ipodbitmaptools
1054 # architecture, manufacturer and model for the target-tree build
1055 t_cpu="arm"
1056 t_manufacturer="ipod"
1057 t_model="color"
1060 21|ipodnano)
1061 target_id=14
1062 modelname="ipodnano"
1063 target="-DIPOD_NANO"
1064 memory=32 # always
1065 arm7tdmicc
1066 tool="$rootdir/tools/scramble -add=nano"
1067 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1068 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1069 output="rockbox.ipod"
1070 appextra="recorder:gui"
1071 plugins="yes"
1072 swcodec="yes"
1073 bootoutput="bootloader-$modelname.ipod"
1074 # toolset is the tools within the tools directory that we build for
1075 # this particular target.
1076 toolset=$ipodbitmaptools
1077 # architecture, manufacturer and model for the target-tree build
1078 t_cpu="arm"
1079 t_manufacturer="ipod"
1080 t_model="nano"
1083 22|ipodvideo)
1084 target_id=15
1085 modelname="ipodvideo"
1086 target="-DIPOD_VIDEO"
1087 arm7tdmicc
1088 tool="$rootdir/tools/scramble -add=ipvd"
1089 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1090 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1091 output="rockbox.ipod"
1092 appextra="recorder:gui"
1093 plugins="yes"
1094 swcodec="yes"
1095 bootoutput="bootloader-$modelname.ipod"
1096 # toolset is the tools within the tools directory that we build for
1097 # this particular target.
1098 toolset=$ipodbitmaptools
1099 # architecture, manufacturer and model for the target-tree build
1100 t_cpu="arm"
1101 t_manufacturer="ipod"
1102 t_model="video"
1105 23|ipod3g)
1106 target_id=16
1107 modelname="ipod3g"
1108 target="-DIPOD_3G"
1109 memory=32 # always
1110 arm7tdmicc
1111 tool="$rootdir/tools/scramble -add=ip3g"
1112 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1113 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1114 output="rockbox.ipod"
1115 appextra="recorder:gui"
1116 plugins="yes"
1117 swcodec="yes"
1118 bootoutput="bootloader-$modelname.ipod"
1119 # toolset is the tools within the tools directory that we build for
1120 # this particular target.
1121 toolset=$ipodbitmaptools
1122 # architecture, manufacturer and model for the target-tree build
1123 t_cpu="arm"
1124 t_manufacturer="ipod"
1125 t_model="3g"
1128 24|ipod4g)
1129 target_id=17
1130 modelname="ipod4g"
1131 target="-DIPOD_4G"
1132 memory=32 # always
1133 arm7tdmicc
1134 tool="$rootdir/tools/scramble -add=ip4g"
1135 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1136 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1137 output="rockbox.ipod"
1138 appextra="recorder:gui"
1139 plugins="yes"
1140 swcodec="yes"
1141 bootoutput="bootloader-$modelname.ipod"
1142 # toolset is the tools within the tools directory that we build for
1143 # this particular target.
1144 toolset=$ipodbitmaptools
1145 # architecture, manufacturer and model for the target-tree build
1146 t_cpu="arm"
1147 t_manufacturer="ipod"
1148 t_model="4g"
1151 25|ipodmini)
1152 target_id=18
1153 modelname="ipodmini"
1154 target="-DIPOD_MINI"
1155 memory=32 # always
1156 arm7tdmicc
1157 tool="$rootdir/tools/scramble -add=mini"
1158 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1159 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1160 output="rockbox.ipod"
1161 appextra="recorder:gui"
1162 plugins="yes"
1163 swcodec="yes"
1164 bootoutput="bootloader-$modelname.ipod"
1165 # toolset is the tools within the tools directory that we build for
1166 # this particular target.
1167 toolset=$ipodbitmaptools
1168 # architecture, manufacturer and model for the target-tree build
1169 t_cpu="arm"
1170 t_manufacturer="ipod"
1171 t_model="mini"
1174 26|ipodmini2g)
1175 target_id=21
1176 modelname="ipodmini2g"
1177 target="-DIPOD_MINI2G"
1178 memory=32 # always
1179 arm7tdmicc
1180 tool="$rootdir/tools/scramble -add=mn2g"
1181 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1182 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1183 output="rockbox.ipod"
1184 appextra="recorder:gui"
1185 plugins="yes"
1186 swcodec="yes"
1187 bootoutput="bootloader-$modelname.ipod"
1188 # toolset is the tools within the tools directory that we build for
1189 # this particular target.
1190 toolset=$ipodbitmaptools
1191 # architecture, manufacturer and model for the target-tree build
1192 t_cpu="arm"
1193 t_manufacturer="ipod"
1194 t_model="mini2g"
1197 27|ipod1g2g)
1198 target_id=29
1199 modelname="ipod1g2g"
1200 target="-DIPOD_1G2G"
1201 memory=32 # always
1202 arm7tdmicc
1203 tool="$rootdir/tools/scramble -add=1g2g"
1204 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1205 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1206 output="rockbox.ipod"
1207 appextra="recorder:gui"
1208 plugins="yes"
1209 swcodec="yes"
1210 bootoutput="bootloader-$modelname.ipod"
1211 # toolset is the tools within the tools directory that we build for
1212 # this particular target.
1213 toolset=$ipodbitmaptools
1214 # architecture, manufacturer and model for the target-tree build
1215 t_cpu="arm"
1216 t_manufacturer="ipod"
1217 t_model="1g2g"
1220 30|x5)
1221 target_id=12
1222 modelname="x5"
1223 target="-DIAUDIO_X5"
1224 memory=16 # always
1225 coldfirecc
1226 tool="$rootdir/tools/scramble -add=iax5"
1227 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1228 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1229 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1230 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1231 output="rockbox.iaudio"
1232 appextra="recorder:gui"
1233 plugins="yes"
1234 swcodec="yes"
1235 # toolset is the tools within the tools directory that we build for
1236 # this particular target.
1237 toolset="$iaudiobitmaptools"
1238 # architecture, manufacturer and model for the target-tree build
1239 t_cpu="coldfire"
1240 t_manufacturer="iaudio"
1241 t_model="x5"
1244 31|m5)
1245 target_id=28
1246 modelname="m5"
1247 target="-DIAUDIO_M5"
1248 memory=16 # always
1249 coldfirecc
1250 tool="$rootdir/tools/scramble -add=iam5"
1251 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1252 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1253 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1254 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1255 output="rockbox.iaudio"
1256 appextra="recorder:gui"
1257 plugins="yes"
1258 swcodec="yes"
1259 # toolset is the tools within the tools directory that we build for
1260 # this particular target.
1261 toolset="$iaudiobitmaptools"
1262 # architecture, manufacturer and model for the target-tree build
1263 t_cpu="coldfire"
1264 t_manufacturer="iaudio"
1265 t_model="m5"
1268 32|iaudio7)
1269 target_id=32
1270 modelname="iaudio7"
1271 target="-DIAUDIO_7"
1272 memory=16 # always
1273 arm946cc
1274 tool="$rootdir/tools/scramble -add i7"
1275 boottool="$rootdir/tools/scramble -tcc=crc"
1276 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1277 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1278 output="rockbox.iaudio"
1279 appextra="recorder:gui"
1280 plugins="yes"
1281 swcodec="yes"
1282 bootoutput="I7_FW.BIN"
1283 # toolset is the tools within the tools directory that we build for
1284 # this particular target.
1285 toolset="$tccbitmaptools"
1286 # architecture, manufacturer and model for the target-tree build
1287 t_cpu="arm"
1288 t_manufacturer="tcc77x"
1289 t_model="iaudio7"
1292 33|cowond2)
1293 target_id=34
1294 modelname="cowond2"
1295 target="-DCOWON_D2"
1296 memory=32
1297 arm926ejscc
1298 tool="$rootdir/tools/scramble -add=d2"
1299 boottool="$rootdir/tools/scramble -tcc=crc"
1300 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1301 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1302 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1303 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1304 output="rockbox.iaudio"
1305 appextra="recorder:gui"
1306 plugins="yes"
1307 swcodec="yes"
1308 toolset="$tccbitmaptools"
1309 # architecture, manufacturer and model for the target-tree build
1310 t_cpu="arm"
1311 t_manufacturer="tcc780x"
1312 t_model="cowond2"
1315 34|m3)
1316 target_id=37
1317 modelname="m3"
1318 target="-DIAUDIO_M3"
1319 memory=16 # always
1320 coldfirecc
1321 tool="$rootdir/tools/scramble -add=iam3"
1322 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1323 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1324 output="rockbox.iaudio"
1325 appextra="recorder:gui"
1326 plugins="yes"
1327 swcodec="yes"
1328 # toolset is the tools within the tools directory that we build for
1329 # this particular target.
1330 toolset="$iaudiobitmaptools"
1331 # architecture, manufacturer and model for the target-tree build
1332 t_cpu="coldfire"
1333 t_manufacturer="iaudio"
1334 t_model="m3"
1337 40|gigabeatf)
1338 target_id=20
1339 modelname="gigabeatf"
1340 target="-DGIGABEAT_F"
1341 memory=32 # always
1342 arm9tdmicc
1343 tool="$rootdir/tools/scramble -add=giga"
1344 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1345 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1346 output="rockbox.gigabeat"
1347 appextra="recorder:gui"
1348 plugins="yes"
1349 swcodec="yes"
1350 toolset=$gigabeatbitmaptools
1351 boottool="$rootdir/tools/scramble -gigabeat"
1352 bootoutput="FWIMG01.DAT"
1353 # architecture, manufacturer and model for the target-tree build
1354 t_cpu="arm"
1355 t_manufacturer="s3c2440"
1356 t_model="gigabeat-fx"
1359 41|gigabeats)
1360 target_id=26
1361 modelname="gigabeats"
1362 target="-DGIGABEAT_S"
1363 memory=64
1364 arm1136jfscc
1365 tool="$rootdir/tools/scramble -add=gigs"
1366 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1367 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1368 output="rockbox.gigabeat"
1369 appextra="recorder:gui"
1370 plugins="yes"
1371 swcodec="yes"
1372 toolset="$gigabeatbitmaptools mknkboot"
1373 boottool="$rootdir/tools/scramble -gigabeats"
1374 bootoutput="nk.bin"
1375 # architecture, manufacturer and model for the target-tree build
1376 t_cpu="arm"
1377 t_manufacturer="imx31"
1378 t_model="gigabeat-s"
1381 70|mrobe500)
1382 target_id=36
1383 modelname="mrobe500"
1384 target="-DMROBE_500"
1385 memory=64 # always
1386 arm926ejscc
1387 # tool="$rootdir/tools/scramble -add=m500"
1388 tool="cp "
1389 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1390 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1391 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1392 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1393 output="rockbox.mrobe500"
1394 appextra="recorder:gui"
1395 plugins="yes"
1396 swcodec="yes"
1397 toolset=$gigabeatbitmaptools
1398 boottool="cp "
1399 bootoutput="rockbox.mrboot"
1400 # architecture, manufacturer and model for the target-tree build
1401 t_cpu="arm"
1402 t_manufacturer="tms320dm320"
1403 t_model="mrobe-500"
1406 71|mrobe100)
1407 target_id=33
1408 modelname="mrobe100"
1409 target="-DMROBE_100"
1410 memory=32 # always
1411 arm7tdmicc
1412 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1413 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1414 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1415 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1416 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1417 output="rockbox.mi4"
1418 appextra="recorder:gui"
1419 plugins="yes"
1420 swcodec="yes"
1421 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1422 bootoutput="pp5020.mi4"
1423 # toolset is the tools within the tools directory that we build for
1424 # this particular target.
1425 toolset="$genericbitmaptools scramble"
1426 # architecture, manufacturer and model for the target-tree build
1427 t_cpu="arm"
1428 t_manufacturer="olympus"
1429 t_model="mrobe-100"
1432 80|logikdax)
1433 target_id=31
1434 modelname="logikdax"
1435 target="-DLOGIK_DAX"
1436 memory=2 # always
1437 arm946cc
1438 tool="$rootdir/tools/scramble -add=ldax"
1439 boottool="$rootdir/tools/scramble -tcc=crc"
1440 bootoutput="player.rom"
1441 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1442 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1443 output="rockbox.logik"
1444 appextra="recorder:gui"
1445 plugins=""
1446 swcodec="yes"
1447 # toolset is the tools within the tools directory that we build for
1448 # this particular target.
1449 toolset=$tccbitmaptools
1450 # architecture, manufacturer and model for the target-tree build
1451 t_cpu="arm"
1452 t_manufacturer="tcc77x"
1453 t_model="logikdax"
1456 90|creativezvm30gb)
1457 target_id=35
1458 modelname="creativezvm30"
1459 target="-DCREATIVE_ZVM"
1460 memory=64
1461 arm926ejscc
1462 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1463 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1464 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1465 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1466 tool="$rootdir/tools/scramble -creative=zvm"
1467 USE_ELF="yes"
1468 output="rockbox.zvm"
1469 appextra="recorder:gui"
1470 plugins=""
1471 swcodec="yes"
1472 toolset=$ipodbitmaptools
1473 boottool="$rootdir/tools/scramble -creative=zvm"
1474 bootoutput="rockbox.zvmboot"
1475 # architecture, manufacturer and model for the target-tree build
1476 t_cpu="arm"
1477 t_manufacturer="tms320dm320"
1478 t_model="creative-zvm"
1481 91|creativezvm60gb)
1482 target_id=40
1483 modelname="creativezvm60"
1484 target="-DCREATIVE_ZVM60GB"
1485 memory=64
1486 arm926ejscc
1487 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1488 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1489 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1490 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1491 tool="$rootdir/tools/scramble -creative=zvm60"
1492 USE_ELF="yes"
1493 output="rockbox.zvm60"
1494 appextra="recorder:gui"
1495 plugins=""
1496 swcodec="yes"
1497 toolset=$ipodbitmaptools
1498 boottool="$rootdir/tools/scramble -creative=zvm60"
1499 bootoutput="rockbox.zvm60boot"
1500 # architecture, manufacturer and model for the target-tree build
1501 t_cpu="arm"
1502 t_manufacturer="tms320dm320"
1503 t_model="creative-zvm"
1506 92|creativezenvision)
1507 target_id=39
1508 modelname="creativezv"
1509 target="-DCREATIVE_ZV"
1510 memory=64
1511 arm926ejscc
1512 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1513 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1514 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1515 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1516 tool="$rootdir/tools/scramble -creative=zenvision"
1517 USE_ELF="yes"
1518 output="rockbox.zv"
1519 appextra="recorder:gui"
1520 plugins=""
1521 swcodec="yes"
1522 toolset=$ipodbitmaptools
1523 boottool="$rootdir/tools/scramble -creative=zenvision"
1524 bootoutput="rockbox.zvboot"
1525 # architecture, manufacturer and model for the target-tree build
1526 t_cpu="arm"
1527 t_manufacturer="tms320dm320"
1528 t_model="creative-zvm"
1531 50|e200)
1532 target_id=23
1533 modelname="e200"
1534 target="-DSANSA_E200"
1535 memory=32 # supposedly
1536 arm7tdmicc
1537 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1538 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1539 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1540 output="rockbox.mi4"
1541 appextra="recorder:gui"
1542 plugins="yes"
1543 swcodec="yes"
1544 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1545 bootoutput="PP5022.mi4"
1546 # toolset is the tools within the tools directory that we build for
1547 # this particular target.
1548 toolset="$genericbitmaptools scramble"
1549 # architecture, manufacturer and model for the target-tree build
1550 t_cpu="arm"
1551 t_manufacturer="sandisk"
1552 t_model="sansa-e200"
1555 51|e200r)
1556 # the e200R model is pretty much identical to the e200, it only has a
1557 # different option to the scramble tool when building a bootloader and
1558 # makes the bootloader output file name in all lower case.
1559 target_id=27
1560 modelname="e200r"
1561 target="-DSANSA_E200"
1562 memory=32 # supposedly
1563 arm7tdmicc
1564 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1565 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1566 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1567 output="rockbox.mi4"
1568 appextra="recorder:gui"
1569 plugins="yes"
1570 swcodec="yes"
1571 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
1572 bootoutput="pp5022.mi4"
1573 # toolset is the tools within the tools directory that we build for
1574 # this particular target.
1575 toolset="$genericbitmaptools scramble"
1576 # architecture, manufacturer and model for the target-tree build
1577 t_cpu="arm"
1578 t_manufacturer="sandisk"
1579 t_model="sansa-e200"
1582 52|c200)
1583 target_id=30
1584 modelname="c200"
1585 target="-DSANSA_C200"
1586 memory=32 # supposedly
1587 arm7tdmicc
1588 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
1589 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1590 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1591 output="rockbox.mi4"
1592 appextra="recorder:gui"
1593 plugins="yes"
1594 swcodec="yes"
1595 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1596 bootoutput="firmware.mi4"
1597 # toolset is the tools within the tools directory that we build for
1598 # this particular target.
1599 toolset="$genericbitmaptools scramble"
1600 # architecture, manufacturer and model for the target-tree build
1601 t_cpu="arm"
1602 t_manufacturer="sandisk"
1603 t_model="sansa-c200"
1606 53|m200)
1607 target_id=31
1608 modelname="m200"
1609 target="-DSANSA_M200"
1610 memory=2 # always
1611 arm946cc
1612 tool="$rootdir/tools/scramble -add=m200"
1613 boottool="$rootdir/tools/scramble -tcc=crc"
1614 bootoutput="player.rom"
1615 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1616 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1617 output="rockbox.m200"
1618 appextra="recorder:gui"
1619 plugins=""
1620 swcodec="yes"
1621 # toolset is the tools within the tools directory that we build for
1622 # this particular target.
1623 toolset=$tccbitmaptools
1624 # architecture, manufacturer and model for the target-tree build
1625 t_cpu="arm"
1626 t_manufacturer="tcc77x"
1627 t_model="m200"
1630 60|tpj1022)
1631 target_id=25
1632 modelname="tpj1022"
1633 target="-DELIO_TPJ1022"
1634 memory=32 # always
1635 arm7tdmicc
1636 tool="$rootdir/tools/scramble -add tpj2"
1637 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1638 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1639 output="rockbox.elio"
1640 appextra="recorder:gui"
1641 plugins="yes"
1642 swcodec="yes"
1643 boottool="$rootdir/tools/scramble -mi4v2"
1644 bootoutput="pp5020.mi4"
1645 # toolset is the tools within the tools directory that we build for
1646 # this particular target.
1647 toolset="$genericbitmaptools scramble"
1648 # architecture, manufacturer and model for the target-tree build
1649 t_cpu="arm"
1650 t_manufacturer="tatung"
1651 t_model="tpj1022"
1655 echo "Please select a supported target platform!"
1656 exit
1659 esac
1661 echo "Platform set to $modelname"
1664 #remove start
1665 ############################################################################
1666 # Amount of memory, for those that can differ. They have $memory unset at
1667 # this point.
1670 if [ -z "$memory" ]; then
1671 case $target_id in
1673 echo "Enter size of your RAM (in MB): (Defaults to 32)"
1674 if [ "1" != `parse_args --ram` ]; then
1675 size=`parse_args --ram`;
1676 else
1677 size=`input`;
1679 case $size in
1680 60|64)
1681 memory="64"
1684 memory="32"
1686 esac
1689 echo "Enter size of your RAM (in MB): (Defaults to 2)"
1690 if [ "1" != `parse_args --ram` ]; then
1691 size=`parse_args --ram`;
1692 else
1693 size=`input`;
1695 case $size in
1697 memory="8"
1700 memory="2"
1702 esac
1704 esac
1705 echo "Memory size selected: $memory MB"
1706 echo ""
1708 #remove end
1710 ##################################################################
1711 # Figure out build "type"
1714 # the ifp7x0 is the only platform that supports building a gdb stub like
1715 # this
1716 case $modelname in
1717 ifp7xx)
1718 gdbstub="(G)DB stub, "
1720 e200r|e200)
1721 gdbstub="(I)installer, "
1725 esac
1726 if [ "1" != `parse_args --type` ]; then
1727 option=`parse_args --type`;
1728 else
1729 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, $gdbstub(M)anual: (Defaults to N)"
1730 option=`input`;
1733 case $option in
1734 [Ii])
1735 appsdir='\$(ROOTDIR)/bootloader'
1736 apps="bootloader"
1737 extradefines="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
1738 bootloader="1"
1739 echo "e200R-installer build selected"
1741 [Bb])
1742 if test $t_manufacturer = "archos"; then
1743 # Archos SH-based players do this somewhat differently for
1744 # some reason
1745 appsdir='\$(ROOTDIR)/flash/bootbox'
1746 apps="bootbox"
1747 else
1748 appsdir='\$(ROOTDIR)/bootloader'
1749 apps="bootloader"
1750 flash=""
1751 if test -n "$boottool"; then
1752 tool="$boottool"
1754 if test -n "$bootoutput"; then
1755 output=$bootoutput
1758 extradefines="-DBOOTLOADER -ffunction-sections -fdata-sections"
1759 bootloader="1"
1760 echo "Bootloader build selected"
1762 [Ss])
1763 debug="-DDEBUG"
1764 simulator="yes"
1765 extradefines="-DSIMULATOR"
1766 echo "Simulator build selected"
1768 [Aa])
1769 echo "Advanced build selected"
1770 whichadvanced
1772 [Gg])
1773 extradefines="-DSTUB" # for target makefile symbol EXTRA_DEFINES
1774 appsdir='\$(ROOTDIR)/gdb'
1775 apps="stub"
1776 case $modelname in
1777 ifp7xx)
1778 output="stub.wma"
1782 esac
1783 echo "GDB stub build selected"
1785 [Mm])
1786 toolset='';
1787 apps="manual"
1788 echo "Manual build selected"
1791 if [ "$modelname" = "e200r" ]; then
1792 echo "Do not use the e200R target for regular builds. Use e200 instead."
1793 exit
1795 debug=""
1796 echo "Normal build selected"
1799 esac
1800 # to be able running "make manual" from non-manual configuration
1801 case $modelname in
1802 fmrecorder)
1803 manualdev="recorderv2fm"
1805 recorderv2)
1806 manualdev="recorderv2fm"
1808 h1??)
1809 manualdev="h1xx"
1811 ipodmini2g)
1812 manualdev="ipodmini"
1815 manualdev=$modelname
1817 esac
1819 if [ -z "$debug" ]; then
1820 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
1823 echo "Using source code root directory: $rootdir"
1825 # this was once possible to change at build-time, but no more:
1826 language="english"
1828 uname=`uname`
1830 if [ "yes" = "$simulator" ]; then
1831 # setup compiler and things for simulator
1832 simcc
1834 if [ -d "archos" ]; then
1835 echo "sub directory archos already present"
1836 else
1837 mkdir archos
1838 echo "created an archos subdirectory for simulating the hard disk"
1842 # Now, figure out version number of the (gcc) compiler we are about to use
1843 gccver=`$CC -dumpversion`;
1845 # figure out the binutil version too and display it, mostly for the build
1846 # system etc to be able to see it easier
1847 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
1849 if [ -z "$gccver" ]; then
1850 echo "WARNING: The compiler you must use ($CC) is not in your path!"
1851 echo "WARNING: this may cause your build to fail since we cannot do the"
1852 echo "WARNING: checks we want now."
1853 else
1855 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
1856 # DEPEND on it
1858 num1=`echo $gccver | cut -d . -f1`
1859 num2=`echo $gccver | cut -d . -f2`
1860 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
1862 # This makes:
1863 # 3.3.X => 303
1864 # 3.4.X => 304
1865 # 2.95.3 => 295
1867 echo "Using $CC $gccver ($gccnum)"
1869 if test "$gccnum" -ge "400"; then
1870 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
1871 # so we ignore that warnings for now
1872 # -Wno-pointer-sign
1873 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
1876 if test "$gccnum" -ge "401"; then
1877 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
1878 # will break strict-aliasing rules"
1880 GCCOPTS="$GCCOPTS -fno-strict-aliasing"
1883 if test "$gccnum" -ge "402"; then
1884 # disable warning about "warning: initialized field overwritten" as gcc 4.2
1885 # and later would throw it for several valid cases
1886 GCCOPTS="$GCCOPTS -Wno-override-init"
1889 case $prefix in
1891 # simulator
1893 i586-mingw32msvc-)
1894 # cross-compile for win32
1897 # Verify that the cross-compiler is of a recommended version!
1898 if test "$gccver" != "$gccchoice"; then
1899 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
1900 echo "WARNING: version $gccchoice!"
1901 echo "WARNING: This may cause your build to fail since it may be a version"
1902 echo "WARNING: that isn't functional or known to not be the best choice."
1903 echo "WARNING: If you suffer from build problems, you know that this is"
1904 echo "WARNING: a likely source for them..."
1907 esac
1912 echo "Using $LD $ldver"
1914 # check the compiler for SH platforms
1915 if test "$CC" = "sh-elf-gcc"; then
1916 if test "$gccnum" -lt "400"; then
1917 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
1918 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
1919 else
1920 # figure out patch status
1921 gccpatch=`$CC --version`;
1923 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
1924 echo "gcc $gccver is rockbox patched"
1925 # then convert -O to -Os to get smaller binaries!
1926 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
1927 else
1928 echo "WARNING: You use an unpatched gcc compiler: $gccver"
1929 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
1934 if test "$CC" = "m68k-elf-gcc"; then
1935 # convert -O to -Os to get smaller binaries!
1936 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
1938 for path in $PATH
1940 # echo "checks for $file in $path" >&2
1941 if test -f "$path/$file"; then
1942 echo "$path/$file"
1943 return
1945 done
1947 if [ "1" != `parse_args --ccache` ]; then
1948 echo "Enable ccache for building"
1949 ccache="ccache"
1950 else
1951 if [ "1" = `parse_args --no-ccache` ]; then
1952 ccache=`findtool ccache`
1953 if test -n "$ccache"; then
1954 echo "Found and uses ccache ($ccache)"
1959 if test -n "$ccache"; then
1960 CC="$ccache $CC"
1963 if test "X$endian" = "Xbig"; then
1964 defendian="ROCKBOX_BIG_ENDIAN"
1965 else
1966 defendian="ROCKBOX_LITTLE_ENDIAN"
1969 sed > autoconf.h \
1970 -e "s,@ENDIAN@,${defendian},g" \
1971 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
1972 -e "s,@config_rtc@,$config_rtc,g" \
1973 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
1974 <<EOF
1975 /* This header was made by configure */
1976 #ifndef __BUILD_AUTOCONF_H
1977 #define __BUILD_AUTOCONF_H
1979 /* Define endianess for the target or simulator platform */
1980 #define @ENDIAN@ 1
1982 /* Define this if you build rockbox to support the logf logging and display */
1983 #undef ROCKBOX_HAS_LOGF
1985 /* optional defines for RTC mod for h1x0 */
1986 @config_rtc@
1987 @have_rtc_alarm@
1989 #endif /* __BUILD_AUTOCONF_H */
1992 if test -n "$t_cpu"; then
1993 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
1994 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
1995 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
1996 GCCOPTS="$GCCOPTS"
1999 if test "$simulator" = "yes"; then
2000 # add simul make stuff on the #SIMUL# line
2001 simmagic1="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
2002 simmagic2="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
2003 else
2004 # delete the lines that match
2005 simmagic1='/@SIMUL1@/D'
2006 simmagic2='/@SIMUL2@/D'
2009 if test "$swcodec" = "yes"; then
2010 voicetoolset="rbspeexenc voicefont wavtrim"
2011 else
2012 voicetoolset="voicefont wavtrim"
2015 if test "$apps" = "apps"; then
2016 # only when we build "real" apps we build the .lng files
2017 buildlangs="langs"
2020 sed > Makefile \
2021 -e "s,@ROOTDIR@,${rootdir},g" \
2022 -e "s,@DEBUG@,${debug},g" \
2023 -e "s,@MEMORY@,${memory},g" \
2024 -e "s,@TARGET_ID@,${target_id},g" \
2025 -e "s,@TARGET@,${target},g" \
2026 -e "s,@CPU@,${t_cpu},g" \
2027 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
2028 -e "s,@MODELNAME@,${modelname},g" \
2029 -e "s,@LANGUAGE@,${language},g" \
2030 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
2031 -e "s,@PWD@,${pwd},g" \
2032 -e "s,@CC@,${CC},g" \
2033 -e "s,@LD@,${LD},g" \
2034 -e "s,@AR@,${AR},g" \
2035 -e "s,@AS@,${AS},g" \
2036 -e "s,@OC@,${OC},g" \
2037 -e "s,@WINDRES@,${WINDRES},g" \
2038 -e "s,@DLLTOOL@,${DLLTOOL},g" \
2039 -e "s,@DLLWRAP@,${DLLWRAP},g" \
2040 -e "s,@RANLIB@,${RANLIB},g" \
2041 -e "s,@TOOL@,${tool},g" \
2042 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
2043 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
2044 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
2045 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
2046 -e "s,@OUTPUT@,${output},g" \
2047 -e "s,@APPEXTRA@,${appextra},g" \
2048 -e "s,@ARCHOSROM@,${archosrom},g" \
2049 -e "s,@FLASHFILE@,${flash},g" \
2050 -e "s,@PLUGINS@,${plugins},g" \
2051 -e "s,@CODECS@,${swcodec},g" \
2052 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
2053 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
2054 -e "s,@GCCOPTS@,${GCCOPTS},g" \
2055 -e "s,@TARGET_INC@,${TARGET_INC},g" \
2056 -e "s!@LDOPTS@!${LDOPTS}!g" \
2057 -e "s,@LOADADDRESS@,${loadaddress},g" \
2058 -e "s,@EXTRADEF@,${extradefines},g" \
2059 -e "s,@APPSDIR@,${appsdir},g" \
2060 -e "s,@FIRMDIR@,${firmdir},g" \
2061 -e "s,@TOOLSDIR@,${toolsdir},g" \
2062 -e "s,@APPS@,${apps},g" \
2063 -e "s,@SIMVER@,${simver},g" \
2064 -e "s,@GCCVER@,${gccver},g" \
2065 -e "s,@GCCNUM@,${gccnum},g" \
2066 -e "s,@UNAME@,${uname},g" \
2067 -e "s,@ENDIAN@,${defendian},g" \
2068 -e "s,@TOOLSET@,${toolset},g" \
2069 -e "${simmagic1}" \
2070 -e "${simmagic2}" \
2071 -e "s,@MANUALDEV@,${manualdev},g" \
2072 -e "s,@ENCODER@,${ENC_CMD},g" \
2073 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
2074 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
2075 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
2076 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
2077 -e "s,@LANGS@,${buildlangs},g" \
2078 -e "s,@USE_ELF@,${USE_ELF},g" \
2079 <<EOF
2080 ## Automatically generated. http://www.rockbox.org/
2082 ifndef V
2083 SILENT=@
2084 else
2085 VERBOSEOPT=-v
2086 endif
2088 # old 'make' versions don't have the built-in 'info' function
2089 info=old\$(shell echo >&2 "Consider upgrading to GNU make 3.81+ for optimum build performance.")
2090 ifeq (\$(call info),old)
2091 export info=echo "\$\$(1)";
2092 endif
2094 export ROOTDIR=@ROOTDIR@
2095 export FIRMDIR=@FIRMDIR@
2096 export APPSDIR=@APPSDIR@
2097 export TOOLSDIR=@TOOLSDIR@
2098 export DOCSDIR=\$(ROOTDIR)/docs
2099 export MANUALDIR=\${ROOTDIR}/manual
2100 export DEBUG=@DEBUG@
2101 export MODELNAME=@MODELNAME@
2102 export ARCHOSROM=@ARCHOSROM@
2103 export FLASHFILE=@FLASHFILE@
2104 export TARGET_ID=@TARGET_ID@
2105 export TARGET=@TARGET@
2106 export CPU=@CPU@
2107 export MANUFACTURER=@MANUFACTURER@
2108 export OBJDIR=@PWD@
2109 export BUILDDIR=@PWD@
2110 export LANGUAGE=@LANGUAGE@
2111 export VOICELANGUAGE=@VOICELANGUAGE@
2112 export MEMORYSIZE=@MEMORY@
2113 export VERSION=\$(shell \$(ROOTDIR)/tools/svnversion.sh \$(ROOTDIR))
2114 export BUILDDATE=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
2115 export MKFIRMWARE=@TOOL@
2116 export BMP2RB_MONO=@BMP2RB_MONO@
2117 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
2118 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
2119 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
2120 export BINARY=@OUTPUT@
2121 export APPEXTRA=@APPEXTRA@
2122 export ENABLEDPLUGINS=@PLUGINS@
2123 export SOFTWARECODECS=@CODECS@
2124 export EXTRA_DEFINES=@EXTRADEF@
2125 export HOSTCC=gcc
2126 export HOSTAR=ar
2127 export CC=@CC@
2128 export LD=@LD@
2129 export AR=@AR@
2130 export AS=@AS@
2131 export OC=@OC@
2132 export WINDRES=@WINDRES@
2133 export DLLTOOL=@DLLTOOL@
2134 export DLLWRAP=@DLLWRAP@
2135 export RANLIB=@RANLIB@
2136 export PROFILE_OPTS=@PROFILE_OPTS@
2137 export SIMVER=@SIMVER@
2138 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
2139 export GCCOPTS=@GCCOPTS@
2140 export TARGET_INC=@TARGET_INC@
2141 export LOADADDRESS=@LOADADDRESS@
2142 export SHARED_FLAG=@SHARED_FLAG@
2143 export LDOPTS=@LDOPTS@
2144 export GCCVER=@GCCVER@
2145 export GCCNUM=@GCCNUM@
2146 export UNAME=@UNAME@
2147 export MANUALDEV=@MANUALDEV@
2148 export TTS_OPTS=@TTS_OPTS@
2149 export TTS_ENGINE=@TTS_ENGINE@
2150 export ENC_OPTS=@ENC_OPTS@
2151 export ENCODER=@ENCODER@
2152 export USE_ELF=@USE_ELF@
2154 # Do not print "Entering directory ..."
2155 MAKEFLAGS += --no-print-directory
2157 .PHONY: all clean tags zip tools manual bin build info langs
2159 all: info
2161 info: build
2162 \$(SILENT)\$(TOOLSDIR)/mkinfo.pl \$(BUILDDIR)/rockbox-info.txt
2164 build: tools @LANGS@
2165 @SIMUL1@
2166 @SIMUL2@
2167 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
2168 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@
2170 bin: tools @LANGS@
2171 @SIMUL1@
2172 @SIMUL2@
2173 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
2174 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ \$(BUILDDIR)/\$(BINARY)
2176 rocks: tools
2177 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ rocks
2179 veryclean: clean toolsclean
2181 toolsclean:
2182 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) clean
2184 clean:
2185 \$(SILENT)echo Cleaning build directory
2186 \$(SILENT)rm -rf rockbox.zip TAGS @APPS@ firmware comsim sim lang.[ch]\
2187 manual *.pdf *.a credits.raw @OUTPUT@ bitmaps pluginbitmaps \
2188 @ARCHOSROM@ @FLASHFILE@ UI256.bmp rockbox-full.zip \
2189 html txt rockbox-manual*.zip sysfont.h rockbox-info.txt \
2190 voicefontids *.wav *.mp3 *.voice max_language_size.h
2192 tools:
2193 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @TOOLSET@
2195 voicetools:
2196 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @VOICETOOLSET@
2198 tags:
2199 \$(SILENT)rm -f TAGS
2200 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) tags
2201 \$(SILENT)\$(MAKE) -C \$(APPSDIR) tags
2202 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins tags
2203 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins/lib tags
2205 fontzip:
2206 \$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\" -r "\$(ROOTDIR)" -f 1 -o rockbox-fonts.zip \$(TARGET) \$(BINARY)
2208 zip:
2209 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
2210 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
2212 mapzip:
2213 \$(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip
2215 fullzip:
2216 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
2217 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" -f 2 -o rockbox-full.zip \$(TARGET) \$(BINARY)
2219 7zip:
2220 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
2221 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.7z" -z "7za a" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
2223 tar:
2224 \$(SILENT)rm -f rockbox.tar
2225 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
2226 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.tar" -z "tar --no-recursion -uf" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
2228 bzip2: tar
2229 \$(SILENT)bzip2 -f9 rockbox.tar
2231 gzip: tar
2232 \$(SILENT)gzip -f9 rockbox.tar
2234 langs: features
2235 \$(SILENT)mkdir -p \$(BUILDDIR)/apps/lang
2236 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/lang OBJDIR=\$(BUILDDIR)/apps/lang
2238 manual: manual-pdf
2239 manual-pdf:
2240 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-pdf
2241 manual-html:
2242 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-html
2243 manual-zhtml: manual-zip
2244 manual-txt:
2245 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt
2246 manual-ztxt:
2247 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt-zip
2248 manual-zip:
2249 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-zip
2251 features: tools
2252 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ features
2254 help:
2255 @echo "A few helpful make targets"
2256 @echo ""
2257 @echo "all - builds a full Rockbox (default), including tools"
2258 @echo "bin - builds only the Rockbox.<target name> file"
2259 @echo "rocks - builds only plugins and codecs"
2260 @echo "clean - cleans a build directory (not tools)"
2261 @echo "veryclean - cleans the build and tools directories"
2262 @echo "manual - builds a manual"
2263 @echo "manual-html - HTML manual"
2264 @echo "manual-zip - HTML manual (zipped)"
2265 @echo "manual-txt - txt manual"
2266 @echo "fullzip - creates a rockbox.zip of your build with fonts"
2267 @echo "zip - creates a rockbox.zip of your build (no fonts)"
2268 @echo "gzip - creates a rockbox.tar.gz of your build (no fonts)"
2269 @echo "bzip2 - creates a rockbox.tar.bz2 of your build (no fonts)"
2270 @echo "7zip - creates a rockbox.7z of your build (no fonts)"
2271 @echo "fontzip - creates rockbox-fonts.zip"
2272 @echo "mapzip - creates rockbox-maps.zip with all .map files"
2273 @echo "tools - builds the tools only"
2274 @echo "voicetools - builds the voice tools only"
2275 @echo "install - installs your build (for simulator builds only)"
2279 if [ "yes" = "$simulator" ]; then
2281 cat >> Makefile <<EOF
2283 install:
2284 @echo "installing a full setup in your archos dir"
2285 @(\$(MAKE) fullzip && cd archos && unzip -oq ../rockbox-full.zip)
2290 if [ "yes" = "$voice" ]; then
2292 cat >> Makefile <<EOF
2294 voice: voicetools features
2295 \$(SILENT)for f in \`cat \$(BUILDDIR)/${apps}/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
2296 for lang in \`echo \$(VOICELANGUAGE) |sed "s/,/ /g"\`; do \$(TOOLSDIR)/voice.pl -V -l=\$\$lang -t=\$(MODELNAME)\$\$feat -i=\$(TARGET_ID) -e="\$(ENCODER)" -E="\$(ENC_OPTS)" -s=\$(TTS_ENGINE) -S="\$(TTS_OPTS)"; done \\
2301 echo "Created Makefile"