C200: Also flip the function of the volume buttons when display flip is enabled....
[kugel-rb.git] / tools / configure
blob728d4d39fd2e558efea2f3fec991befd08e71999
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 # add cross-compiler option(s)
46 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
47 LDOPTS="`sdl-config --libs` -mconsole"
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>`, e.g. `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 if [ "0" != `sdl-config --libs |grep -c mwindows` ]; then
133 # Enable crosscompiling if sdl-config is from Windows SDL
134 crosswincc
135 else
136 GCCOPTS="$GCCOPTS `sdl-config --cflags`"
137 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 GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
164 if test "X$crosscompile" != "Xyes"; then
165 if [ "`uname -m`" = "x86_64" ] || [ "`uname -m`" = "amd64" ]; then
166 # fPIC is needed to make shared objects link
167 # setting visibility to hidden is necessary to avoid strange crashes
168 # due to symbol clashing
169 GCCOPTS="$GCCOPTS -fPIC -fvisibility=hidden"
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 arm940tbecc () {
252 prefixtools arm-elf-
253 GCCOPTS="$CCOPTS -mbig-endian -mcpu=arm940t -mlong-calls"
254 GCCOPTIMIZE="-fomit-frame-pointer"
255 endian="big"
256 gccchoice="4.0.3"
259 arm946cc () {
260 prefixtools arm-elf-
261 GCCOPTS="$CCOPTS -mcpu=arm9e -mlong-calls"
262 GCCOPTIMIZE="-fomit-frame-pointer"
263 endian="little"
264 gccchoice="4.0.3"
267 arm926ejscc () {
268 prefixtools arm-elf-
269 GCCOPTS="$CCOPTS -mcpu=arm926ej-s -mlong-calls"
270 GCCOPTIMIZE="-fomit-frame-pointer"
271 endian="little"
272 gccchoice="4.0.3"
275 arm1136jfscc () {
276 prefixtools arm-elf-
277 GCCOPTS="$CCOPTS -mcpu=arm1136jf-s -mlong-calls"
278 GCCOPTIMIZE="-fomit-frame-pointer"
279 endian="little"
280 gccchoice="4.0.3"
283 mipselcc () {
284 prefixtools mipsel-elf-
285 GCCOPTS="$CCOPTS -mips32 -mno-abicalls"
286 GCCOPTIMIZE="-fomit-frame-pointer"
287 GCCOPTS="$GCCOPTS -fno-pic -fno-builtin -fno-exceptions -ffunction-sections -msoft-float -G 0"
288 endian="little"
289 gccchoice="4.1.2"
292 whichadvanced () {
293 ##################################################################
294 # Prompt for specific developer options
296 echo ""
297 echo "Enter your developer options (press enter when done)"
298 echo -n "(D)EBUG, (L)ogf, (S)imulator, (P)rofiling, (V)oice"
299 if [ "$memory" = "2" ]; then
300 echo -n ", (8)MB MOD"
302 if [ "$modelname" = "h120" ]; then
303 echo -n ", (R)TC MOD"
305 echo ""
307 cont=1
309 while [ $cont = "1" ]; do
311 option=`input`;
313 case $option in
314 [Dd])
315 if [ "yes" = "$profile" ]; then
316 echo "Debug is incompatible with profiling"
317 else
318 echo "define DEBUG"
319 use_debug="yes"
322 [Ll])
323 echo "logf() support enabled"
324 logf="yes"
326 [Ss])
327 echo "Simulator build enabled"
328 simulator="yes"
330 [Pp])
331 if [ "yes" = "$use_debug" ]; then
332 echo "Profiling is incompatible with debug"
333 else
334 echo "Profiling support is enabled"
335 profile="yes"
338 [Vv])
339 echo "Voice build selected"
340 voice="yes"
343 if [ "$memory" = "2" ]; then
344 memory="8"
345 echo "Memory size selected: 8MB"
346 else
347 cont=0
350 [Rr])
351 if [ "$modelname" = "h120" ]; then
352 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
353 have_rtc_alarm="#define HAVE_RTC_ALARM"
354 echo "RTC functions enabled (DS1339/DS3231)"
355 else
356 cont=0
360 cont=0
362 esac
363 done
364 echo "done"
366 if [ "yes" = "$voice" ]; then
367 # Ask about languages to build
368 echo "Select a number for the language to use (default is english)"
369 # The multiple-language feature is currently broken
370 # echo "You may enter a comma-separated list of languages to build"
372 picklang
373 voicelanguage=`whichlang`
375 if [ -z "$voicelanguage" ]; then
376 # pick a default
377 voicelanguage="english"
379 echo "Voice language set to $voicelanguage"
381 # Configure encoder and TTS engine for each language
382 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
383 voiceconfig "$thislang"
384 done
386 if [ "yes" = "$use_debug" ]; then
387 debug="-DDEBUG"
388 GCCOPTS="$GCCOPTS -g -DDEBUG"
390 if [ "yes" = "$logf" ]; then
391 use_logf="#define ROCKBOX_HAS_LOGF 1"
393 if [ "yes" = "$simulator" ]; then
394 debug="-DDEBUG"
395 extradefines="$extradefines -DSIMULATOR"
397 if [ "yes" = "$profile" ]; then
398 extradefines="$extradefines -DRB_PROFILE"
399 PROFILE_OPTS="-finstrument-functions"
403 # Configure voice settings
404 voiceconfig () {
405 thislang=$1
406 echo "Building $thislang voice for $modelname. Select options"
407 echo ""
409 if [ -f "`which flite`" ]; then
410 FLITE="F(l)ite "
411 FLITE_OPTS=""
412 DEFAULT_TTS="flite"
413 DEFAULT_TTS_OPTS=$FLITE_OPTS
414 DEFAULT_NOISEFLOOR="500"
415 DEFAULT_CHOICE="L"
417 if [ -f "`which espeak`" ]; then
418 ESPEAK="(e)Speak "
419 ESPEAK_OPTS=""
420 DEFAULT_TTS="espeak"
421 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
422 DEFAULT_NOISEFLOOR="500"
423 DEFAULT_CHOICE="e"
425 if [ -f "`which festival`" ]; then
426 FESTIVAL="(F)estival "
427 case "$thislang" in
428 "italiano")
429 FESTIVAL_OPTS="--language italian"
431 "espanol")
432 FESTIVAL_OPTS="--language spanish"
434 "finnish")
435 FESTIVAL_OPTS="--language finnish"
437 "czech")
438 FESTIVAL_OPTS="--language czech"
441 FESTIVAL_OPTS=""
443 esac
444 DEFAULT_TTS="festival"
445 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
446 DEFAULT_NOISEFLOOR="500"
447 DEFAULT_CHOICE="F"
449 if [ -f "`which swift`" ]; then
450 SWIFT="S(w)ift "
451 SWIFT_OPTS=""
452 DEFAULT_TTS="swift"
453 DEFAULT_TTS_OPTS=$SWIFT_OPTS
454 DEFAULT_NOISEFLOOR="500"
455 DEFAULT_CHOICE="w"
457 # Allow SAPI if Windows is in use
458 if [ -f "`which winver`" ]; then
459 SAPI="(S)API "
460 SAPI_OPTS=""
461 DEFAULT_TTS="sapi"
462 DEFAULT_TTS_OPTS=$SAPI_OPTS
463 DEFAULT_NOISEFLOOR="500"
464 DEFAULT_CHOICE="S"
467 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
468 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
469 exit
472 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
473 option=`input`
474 case "$option" in
475 [Ll])
476 TTS_ENGINE="flite"
477 NOISEFLOOR="500" # TODO: check this value
478 TTS_OPTS=$FLITE_OPTS
480 [Ee])
481 TTS_ENGINE="espeak"
482 NOISEFLOOR="500"
483 TTS_OPTS=$ESPEAK_OPTS
485 [Ff])
486 TTS_ENGINE="festival"
487 NOISEFLOOR="500"
488 TTS_OPTS=$FESTIVAL_OPTS
490 [Ss])
491 TTS_ENGINE="sapi"
492 NOISEFLOOR="500"
493 TTS_OPTS=$SAPI_OPTS
495 [Ww])
496 TTS_ENGINE="swift"
497 NOISEFLOOR="500"
498 TTS_OPTS=$SWIFT_OPTS
501 TTS_ENGINE=$DEFAULT_TTS
502 TTS_OPTS=$DEFAULT_TTS_OPTS
503 NOISEFLOOR=$DEFAULT_NOISEFLOOR
504 esac
505 echo "Using $TTS_ENGINE for TTS"
507 # Allow the user to input manual commandline options
508 printf "Enter $TTS_ENGINE options (enter for defaults \"$TTS_OPTS\"): "
509 USER_TTS_OPTS=`input`
510 if [ -n "$USER_TTS_OPTS" ]; then
511 TTS_OPTS="$USER_TTS_OPTS"
514 echo ""
516 if [ "$swcodec" = "yes" ]; then
517 ENCODER="rbspeexenc"
518 ENC_CMD="rbspeexenc"
519 ENC_OPTS="-q 4 -c 10"
520 else
521 if [ -f "`which lame`" ]; then
522 ENCODER="lame"
523 ENC_CMD="lame"
524 ENC_OPTS="--resample 12 -t -m m -h -V 9 -S -B 64 --vbr-new"
525 else
526 echo "You need LAME in the system path to build voice files for"
527 echo "HWCODEC targets."
528 exit
532 echo "Using $ENCODER for encoding voice clips"
534 # Allow the user to input manual commandline options
535 printf "Enter $ENCODER options (enter for defaults \"$ENC_OPTS\"): "
536 USER_ENC_OPTS=`input`
537 if [ -n "$USER_ENC_OPTS" ]; then
538 ENC_OPTS=$USER_ENC_OPTS
541 TEMPDIR="${pwd}"
542 if [ -f "`which cygpath`" ]; then
543 TEMPDIR=`cygpath . -a -w`
547 picklang() {
548 # figure out which languages that are around
549 for file in $rootdir/apps/lang/*.lang; do
550 clean=`echo $file | sed -e 's:.*/::g' | cut "-d." -f1`
551 langs="$langs $clean"
552 done
554 num=1
555 for one in $langs; do
556 echo "$num. $one"
557 num=`expr $num + 1`
558 done
560 read pick
563 whichlang() {
564 output=""
565 # Allow the user to pass a comma-separated list of langauges
566 for thispick in `echo $pick | sed 's/,/ /g'`; do
567 num=1
568 for one in $langs; do
569 # Accept both the language number and name
570 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
571 if [ "$output" = "" ]; then
572 output=$one
573 else
574 output=$output,$one
577 num=`expr $num + 1`
578 done
579 done
580 echo $output
583 opt=$1
585 if test "$opt" = "--help"; then
586 echo "Rockbox configure script."
587 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
588 echo "Do *NOT* run this within the tools directory!"
589 echo ""
590 cat <<EOF
591 Usage: configure [OPTION]...
592 Options:
593 --target=TARGET Sets the target, TARGET can be either the target ID or
594 corresponding string. Run without this option to see all
595 available targets.
597 --ram=RAM Sets the RAM for certain targets. Even though any number
598 is accepted, not every number is correct. The default
599 value will be applied, if you entered a wrong number
600 (which depends on the target). Watch the output. Run
601 without this option if you are not sure which the right
602 number is.
604 --type=TYPE Sets the build type. The shortcut is also valid.
605 Run without this option to see available types.
606 --ccache Enable ccache use (done by default these days)
607 --no-ccache Disable ccache use
608 --help Shows this message (must not be used with other options)
612 exit
615 if test -r "configure"; then
616 # this is a check for a configure script in the current directory, it there
617 # is one, try to figure out if it is this one!
619 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
620 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
621 echo "It will only cause you pain and grief. Instead do this:"
622 echo ""
623 echo " cd .."
624 echo " mkdir build-dir"
625 echo " cd build-dir"
626 echo " ../tools/configure"
627 echo ""
628 echo "Much happiness will arise from this. Enjoy"
629 exit
633 # get our current directory
634 pwd=`pwd`;
636 if { echo $pwd | grep " "; } then
637 echo "You're running this script in a path that contains space. The build"
638 echo "system is unfortunately not clever enough to deal with this. Please"
639 echo "run the script from a different path, rename the path or fix the build"
640 echo "system!"
641 exit
644 if [ -z "$rootdir" ]; then
645 ##################################################################
646 # Figure out where the source code root is!
648 rootdir=`dirname $0`/../
650 #####################################################################
651 # Convert the possibly relative directory name to an absolute version
653 now=`pwd`
654 cd $rootdir
655 rootdir=`pwd`
657 # cd back to the build dir
658 cd $now
661 apps="apps"
662 appsdir='\$(ROOTDIR)/apps'
663 firmdir='\$(ROOTDIR)/firmware'
664 toolsdir='\$(ROOTDIR)/tools'
667 ##################################################################
668 # Figure out target platform
671 if [ "1" != `parse_args --target` ]; then
672 buildfor=`parse_args --target`;
673 else
674 echo "Enter target platform:"
675 cat <<EOF
676 ==Archos== ==iriver== ==Apple iPod==
677 0) Player/Studio 10) H120/H140 20) Color/Photo
678 1) Recorder 11) H320/H340 21) Nano
679 2) FM Recorder 12) iHP-100/110/115 22) Video
680 3) Recorder v2 13) iFP-790 23) 3G
681 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
682 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
683 6) AV300 26) Mini 2G
684 27) 1G, 2G
686 ==iAudio== ==Toshiba== ==SanDisk==
687 30) X5/X5V/X5L 40) Gigabeat F 50) Sansa e200
688 31) M5/M5L 41) Gigabeat S 51) Sansa e200R
689 32) 7 52) Sansa c200
690 33) Cowon D2 53) Sansa m200
691 34) M3/M3L 54) Sansa c100
693 ==Tatung== ==Olympus== ==Logik==
694 60) Elio TPJ-1022 70) M:Robe 500 80) DAX 1GB MP3/DAB
695 71) M:Robe 100
696 ==Creative== ==Philips== ==Meizu==
697 90) Zen Vision:M 30GB 100) GoGear SA9200 110) M6SL
698 91) Zen Vision:M 60GB 101) GoGear HDD1630
699 92) Zen Vision
701 ==Onda==
702 120) VX747
705 buildfor=`input`;
708 # Set of tools built for all target platforms:
709 toolset="rdf2binary convbdf codepages"
711 # Toolsets for some target families:
712 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
713 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
714 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
715 ipodbitmaptools="$toolset scramble bmp2rb"
716 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
717 tccbitmaptools="$toolset scramble mktccboot bmp2rb"
718 # generic is used by IFP, H10, Sansa-e200
719 genericbitmaptools="$toolset bmp2rb"
722 # ---- For each target ----
724 # *Variables*
725 # target_id: a unique number identifying this target, IS NOT the menu number.
726 # Just use the currently highest number+1 when you add a new
727 # target.
728 # modelname: short model name used all over to identify this target
729 # memory: number of megabytes of RAM this target has. If the amount can
730 # be selected by the size prompt, let memory be unset here
731 # target: -Ddefine passed to the build commands to make the correct
732 # config-*.h file get included etc
733 # tool: the tool that takes a plain binary and converts that into a
734 # working "firmware" file for your target
735 # output: the final output file name
736 # boottool: the tool that takes a plain binary and generates a bootloader
737 # file for your target (or blank to use $tool)
738 # bootoutput:the final output file name for the bootloader (or blank to use
739 # $output)
740 # appextra: passed to the APPEXTRA variable in the Makefiles.
741 # TODO: add proper explanation
742 # archosrom: used only for Archos targets that build a special flashable .ucl
743 # image.
744 # flash: name of output for flashing, for targets where there's a special
745 # file output for this.
746 # plugins: set to 'yes' to build the plugins. Early development builds can
747 # set this to no in the early stages to have an easier life for a
748 # while
749 # swcodec: set 'yes' on swcodec targets
750 # toolset: lists what particular tools in the tools/ directory that this
751 # target needs to have built prior to building Rockbox
753 # *Functions*
754 # *cc: sets up gcc and compiler options for your target builds. Note
755 # that if you select a simulator build, the compiler selection is
756 # overridden later in the script.
758 case $buildfor in
760 0|player)
761 target_id=1
762 modelname="player"
763 target="-DARCHOS_PLAYER"
764 shcc
765 tool="$rootdir/tools/scramble"
766 output="archos.mod"
767 appextra="player:gui"
768 archosrom="$pwd/rombox.ucl"
769 flash="$pwd/rockbox.ucl"
770 plugins="yes"
771 swcodec=""
773 # toolset is the tools within the tools directory that we build for
774 # this particular target.
775 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
777 # Note: the convbdf is present in the toolset just because: 1) the
778 # firmware/Makefile assumes it is present always, and 2) we will need it when we
779 # build the player simulator
781 t_cpu="sh"
782 t_manufacturer="archos"
783 t_model="player"
786 1|recorder)
787 target_id=2
788 modelname="recorder"
789 target="-DARCHOS_RECORDER"
790 shcc
791 tool="$rootdir/tools/scramble"
792 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
793 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
794 output="ajbrec.ajz"
795 appextra="recorder:gui"
796 #archosrom="$pwd/rombox.ucl"
797 flash="$pwd/rockbox.ucl"
798 plugins="yes"
799 swcodec=""
800 # toolset is the tools within the tools directory that we build for
801 # this particular target.
802 toolset=$archosbitmaptools
803 t_cpu="sh"
804 t_manufacturer="archos"
805 t_model="recorder"
808 2|fmrecorder)
809 target_id=3
810 modelname="fmrecorder"
811 target="-DARCHOS_FMRECORDER"
812 shcc
813 tool="$rootdir/tools/scramble -fm"
814 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
815 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
816 output="ajbrec.ajz"
817 appextra="recorder:gui"
818 #archosrom="$pwd/rombox.ucl"
819 flash="$pwd/rockbox.ucl"
820 plugins="yes"
821 swcodec=""
822 # toolset is the tools within the tools directory that we build for
823 # this particular target.
824 toolset=$archosbitmaptools
825 t_cpu="sh"
826 t_manufacturer="archos"
827 t_model="fm_v2"
830 3|recorderv2)
831 target_id=4
832 modelname="recorderv2"
833 target="-DARCHOS_RECORDERV2"
834 shcc
835 tool="$rootdir/tools/scramble -v2"
836 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
837 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
838 output="ajbrec.ajz"
839 appextra="recorder:gui"
840 #archosrom="$pwd/rombox.ucl"
841 flash="$pwd/rockbox.ucl"
842 plugins="yes"
843 swcodec=""
844 # toolset is the tools within the tools directory that we build for
845 # this particular target.
846 toolset=$archosbitmaptools
847 t_cpu="sh"
848 t_manufacturer="archos"
849 t_model="fm_v2"
852 4|ondiosp)
853 target_id=7
854 modelname="ondiosp"
855 target="-DARCHOS_ONDIOSP"
856 shcc
857 tool="$rootdir/tools/scramble -osp"
858 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
859 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
860 output="ajbrec.ajz"
861 appextra="recorder:gui"
862 archosrom="$pwd/rombox.ucl"
863 flash="$pwd/rockbox.ucl"
864 plugins="yes"
865 swcodec=""
866 # toolset is the tools within the tools directory that we build for
867 # this particular target.
868 toolset=$archosbitmaptools
869 t_cpu="sh"
870 t_manufacturer="archos"
871 t_model="ondio"
874 5|ondiofm)
875 target_id=8
876 modelname="ondiofm"
877 target="-DARCHOS_ONDIOFM"
878 shcc
879 tool="$rootdir/tools/scramble -ofm"
880 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
881 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
882 output="ajbrec.ajz"
883 appextra="recorder:gui"
884 #archosrom="$pwd/rombox.ucl"
885 flash="$pwd/rockbox.ucl"
886 plugins="yes"
887 swcodec=""
888 toolset=$archosbitmaptools
889 t_cpu="sh"
890 t_manufacturer="archos"
891 t_model="ondio"
894 6|av300)
895 target_id=38
896 modelname="av300"
897 target="-DARCHOS_AV300"
898 memory=16 # always
899 arm7tdmicc
900 tool="$rootdir/tools/scramble -mm=C"
901 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
902 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
903 output="cjbm.ajz"
904 appextra="recorder:gui"
905 plugins="yes"
906 swcodec=""
907 # toolset is the tools within the tools directory that we build for
908 # this particular target.
909 toolset="$toolset scramble descramble bmp2rb"
910 # architecture, manufacturer and model for the target-tree build
911 t_cpu="arm"
912 t_manufacturer="archos"
913 t_model="av300"
916 10|h120)
917 target_id=9
918 modelname="h120"
919 target="-DIRIVER_H120"
920 memory=32 # always
921 coldfirecc
922 tool="$rootdir/tools/scramble -add=h120"
923 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
924 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
925 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
926 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
927 output="rockbox.iriver"
928 appextra="recorder:gui"
929 flash="$pwd/rombox.iriver"
930 plugins="yes"
931 swcodec="yes"
932 # toolset is the tools within the tools directory that we build for
933 # this particular target.
934 toolset=$iriverbitmaptools
935 t_cpu="coldfire"
936 t_manufacturer="iriver"
937 t_model="h100"
940 11|h300)
941 target_id=10
942 modelname="h300"
943 target="-DIRIVER_H300"
944 memory=32 # always
945 coldfirecc
946 tool="$rootdir/tools/scramble -add=h300"
947 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
948 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
949 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
950 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
951 output="rockbox.iriver"
952 appextra="recorder:gui"
953 plugins="yes"
954 swcodec="yes"
955 # toolset is the tools within the tools directory that we build for
956 # this particular target.
957 toolset=$iriverbitmaptools
958 t_cpu="coldfire"
959 t_manufacturer="iriver"
960 t_model="h300"
963 12|h100)
964 target_id=11
965 modelname="h100"
966 target="-DIRIVER_H100"
967 memory=16 # always
968 coldfirecc
969 tool="$rootdir/tools/scramble -add=h100"
970 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
971 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
972 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
973 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
974 output="rockbox.iriver"
975 appextra="recorder:gui"
976 flash="$pwd/rombox.iriver"
977 plugins="yes"
978 swcodec="yes"
979 # toolset is the tools within the tools directory that we build for
980 # this particular target.
981 toolset=$iriverbitmaptools
982 t_cpu="coldfire"
983 t_manufacturer="iriver"
984 t_model="h100"
987 13|ifp7xx)
988 target_id=19
989 modelname="ifp7xx"
990 target="-DIRIVER_IFP7XX"
991 memory=1
992 arm7tdmicc short
993 tool="cp"
994 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
995 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
996 output="rockbox.wma"
997 appextra="recorder:gui"
998 plugins="yes"
999 swcodec="yes"
1000 # toolset is the tools within the tools directory that we build for
1001 # this particular target.
1002 toolset=$genericbitmaptools
1003 t_cpu="arm"
1004 t_manufacturer="pnx0101"
1005 t_model="iriver-ifp7xx"
1008 14|h10)
1009 target_id=22
1010 modelname="h10"
1011 target="-DIRIVER_H10"
1012 memory=32 # always
1013 arm7tdmicc
1014 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1015 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1016 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1017 output="rockbox.mi4"
1018 appextra="recorder:gui"
1019 plugins="yes"
1020 swcodec="yes"
1021 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1022 bootoutput="H10_20GC.mi4"
1023 # toolset is the tools within the tools directory that we build for
1024 # this particular target.
1025 toolset="$genericbitmaptools scramble"
1026 # architecture, manufacturer and model for the target-tree build
1027 t_cpu="arm"
1028 t_manufacturer="iriver"
1029 t_model="h10"
1032 15|h10_5gb)
1033 target_id=24
1034 modelname="h10_5gb"
1035 target="-DIRIVER_H10_5GB"
1036 memory=32 # always
1037 arm7tdmicc
1038 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1039 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1040 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1041 output="rockbox.mi4"
1042 appextra="recorder:gui"
1043 plugins="yes"
1044 swcodec="yes"
1045 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1046 bootoutput="H10.mi4"
1047 # toolset is the tools within the tools directory that we build for
1048 # this particular target.
1049 toolset="$genericbitmaptools scramble"
1050 # architecture, manufacturer and model for the target-tree build
1051 t_cpu="arm"
1052 t_manufacturer="iriver"
1053 t_model="h10"
1056 20|ipodcolor)
1057 target_id=13
1058 modelname="ipodcolor"
1059 target="-DIPOD_COLOR"
1060 memory=32 # always
1061 arm7tdmicc
1062 tool="$rootdir/tools/scramble -add=ipco"
1063 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1064 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1065 output="rockbox.ipod"
1066 appextra="recorder:gui"
1067 plugins="yes"
1068 swcodec="yes"
1069 bootoutput="bootloader-$modelname.ipod"
1070 # toolset is the tools within the tools directory that we build for
1071 # this particular target.
1072 toolset=$ipodbitmaptools
1073 # architecture, manufacturer and model for the target-tree build
1074 t_cpu="arm"
1075 t_manufacturer="ipod"
1076 t_model="color"
1079 21|ipodnano)
1080 target_id=14
1081 modelname="ipodnano"
1082 target="-DIPOD_NANO"
1083 memory=32 # always
1084 arm7tdmicc
1085 tool="$rootdir/tools/scramble -add=nano"
1086 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1087 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1088 output="rockbox.ipod"
1089 appextra="recorder:gui"
1090 plugins="yes"
1091 swcodec="yes"
1092 bootoutput="bootloader-$modelname.ipod"
1093 # toolset is the tools within the tools directory that we build for
1094 # this particular target.
1095 toolset=$ipodbitmaptools
1096 # architecture, manufacturer and model for the target-tree build
1097 t_cpu="arm"
1098 t_manufacturer="ipod"
1099 t_model="nano"
1102 22|ipodvideo)
1103 target_id=15
1104 modelname="ipodvideo"
1105 target="-DIPOD_VIDEO"
1106 arm7tdmicc
1107 tool="$rootdir/tools/scramble -add=ipvd"
1108 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1109 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1110 output="rockbox.ipod"
1111 appextra="recorder:gui"
1112 plugins="yes"
1113 swcodec="yes"
1114 bootoutput="bootloader-$modelname.ipod"
1115 # toolset is the tools within the tools directory that we build for
1116 # this particular target.
1117 toolset=$ipodbitmaptools
1118 # architecture, manufacturer and model for the target-tree build
1119 t_cpu="arm"
1120 t_manufacturer="ipod"
1121 t_model="video"
1124 23|ipod3g)
1125 target_id=16
1126 modelname="ipod3g"
1127 target="-DIPOD_3G"
1128 memory=32 # always
1129 arm7tdmicc
1130 tool="$rootdir/tools/scramble -add=ip3g"
1131 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1132 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1133 output="rockbox.ipod"
1134 appextra="recorder:gui"
1135 plugins="yes"
1136 swcodec="yes"
1137 bootoutput="bootloader-$modelname.ipod"
1138 # toolset is the tools within the tools directory that we build for
1139 # this particular target.
1140 toolset=$ipodbitmaptools
1141 # architecture, manufacturer and model for the target-tree build
1142 t_cpu="arm"
1143 t_manufacturer="ipod"
1144 t_model="3g"
1147 24|ipod4g)
1148 target_id=17
1149 modelname="ipod4g"
1150 target="-DIPOD_4G"
1151 memory=32 # always
1152 arm7tdmicc
1153 tool="$rootdir/tools/scramble -add=ip4g"
1154 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1155 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1156 output="rockbox.ipod"
1157 appextra="recorder:gui"
1158 plugins="yes"
1159 swcodec="yes"
1160 bootoutput="bootloader-$modelname.ipod"
1161 # toolset is the tools within the tools directory that we build for
1162 # this particular target.
1163 toolset=$ipodbitmaptools
1164 # architecture, manufacturer and model for the target-tree build
1165 t_cpu="arm"
1166 t_manufacturer="ipod"
1167 t_model="4g"
1170 25|ipodmini)
1171 target_id=18
1172 modelname="ipodmini"
1173 target="-DIPOD_MINI"
1174 memory=32 # always
1175 arm7tdmicc
1176 tool="$rootdir/tools/scramble -add=mini"
1177 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1178 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1179 output="rockbox.ipod"
1180 appextra="recorder:gui"
1181 plugins="yes"
1182 swcodec="yes"
1183 bootoutput="bootloader-$modelname.ipod"
1184 # toolset is the tools within the tools directory that we build for
1185 # this particular target.
1186 toolset=$ipodbitmaptools
1187 # architecture, manufacturer and model for the target-tree build
1188 t_cpu="arm"
1189 t_manufacturer="ipod"
1190 t_model="mini"
1193 26|ipodmini2g)
1194 target_id=21
1195 modelname="ipodmini2g"
1196 target="-DIPOD_MINI2G"
1197 memory=32 # always
1198 arm7tdmicc
1199 tool="$rootdir/tools/scramble -add=mn2g"
1200 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1201 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1202 output="rockbox.ipod"
1203 appextra="recorder:gui"
1204 plugins="yes"
1205 swcodec="yes"
1206 bootoutput="bootloader-$modelname.ipod"
1207 # toolset is the tools within the tools directory that we build for
1208 # this particular target.
1209 toolset=$ipodbitmaptools
1210 # architecture, manufacturer and model for the target-tree build
1211 t_cpu="arm"
1212 t_manufacturer="ipod"
1213 t_model="mini2g"
1216 27|ipod1g2g)
1217 target_id=29
1218 modelname="ipod1g2g"
1219 target="-DIPOD_1G2G"
1220 memory=32 # always
1221 arm7tdmicc
1222 tool="$rootdir/tools/scramble -add=1g2g"
1223 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1224 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1225 output="rockbox.ipod"
1226 appextra="recorder:gui"
1227 plugins="yes"
1228 swcodec="yes"
1229 bootoutput="bootloader-$modelname.ipod"
1230 # toolset is the tools within the tools directory that we build for
1231 # this particular target.
1232 toolset=$ipodbitmaptools
1233 # architecture, manufacturer and model for the target-tree build
1234 t_cpu="arm"
1235 t_manufacturer="ipod"
1236 t_model="1g2g"
1239 30|x5)
1240 target_id=12
1241 modelname="x5"
1242 target="-DIAUDIO_X5"
1243 memory=16 # always
1244 coldfirecc
1245 tool="$rootdir/tools/scramble -add=iax5"
1246 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1247 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1248 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1249 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1250 output="rockbox.iaudio"
1251 appextra="recorder:gui"
1252 plugins="yes"
1253 swcodec="yes"
1254 # toolset is the tools within the tools directory that we build for
1255 # this particular target.
1256 toolset="$iaudiobitmaptools"
1257 # architecture, manufacturer and model for the target-tree build
1258 t_cpu="coldfire"
1259 t_manufacturer="iaudio"
1260 t_model="x5"
1263 31|m5)
1264 target_id=28
1265 modelname="m5"
1266 target="-DIAUDIO_M5"
1267 memory=16 # always
1268 coldfirecc
1269 tool="$rootdir/tools/scramble -add=iam5"
1270 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1271 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1272 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1273 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1274 output="rockbox.iaudio"
1275 appextra="recorder:gui"
1276 plugins="yes"
1277 swcodec="yes"
1278 # toolset is the tools within the tools directory that we build for
1279 # this particular target.
1280 toolset="$iaudiobitmaptools"
1281 # architecture, manufacturer and model for the target-tree build
1282 t_cpu="coldfire"
1283 t_manufacturer="iaudio"
1284 t_model="m5"
1287 32|iaudio7)
1288 target_id=32
1289 modelname="iaudio7"
1290 target="-DIAUDIO_7"
1291 memory=16 # always
1292 arm946cc
1293 tool="$rootdir/tools/scramble -add i7"
1294 boottool="$rootdir/tools/scramble -tcc=crc"
1295 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1296 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1297 output="rockbox.iaudio"
1298 appextra="recorder:gui"
1299 plugins="yes"
1300 swcodec="yes"
1301 bootoutput="I7_FW.BIN"
1302 # toolset is the tools within the tools directory that we build for
1303 # this particular target.
1304 toolset="$tccbitmaptools"
1305 # architecture, manufacturer and model for the target-tree build
1306 t_cpu="arm"
1307 t_manufacturer="tcc77x"
1308 t_model="iaudio7"
1311 33|cowond2)
1312 target_id=34
1313 modelname="cowond2"
1314 target="-DCOWON_D2"
1315 memory=32
1316 arm926ejscc
1317 tool="$rootdir/tools/scramble -add=d2"
1318 boottool="$rootdir/tools/scramble -tcc=crc"
1319 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1320 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1321 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1322 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1323 output="rockbox.iaudio"
1324 appextra="recorder:gui"
1325 plugins="yes"
1326 swcodec="yes"
1327 toolset="$tccbitmaptools"
1328 # architecture, manufacturer and model for the target-tree build
1329 t_cpu="arm"
1330 t_manufacturer="tcc780x"
1331 t_model="cowond2"
1334 34|m3)
1335 target_id=37
1336 modelname="m3"
1337 target="-DIAUDIO_M3"
1338 memory=16 # always
1339 coldfirecc
1340 tool="$rootdir/tools/scramble -add=iam3"
1341 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1342 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1343 output="rockbox.iaudio"
1344 appextra="recorder:gui"
1345 plugins="yes"
1346 swcodec="yes"
1347 # toolset is the tools within the tools directory that we build for
1348 # this particular target.
1349 toolset="$iaudiobitmaptools"
1350 # architecture, manufacturer and model for the target-tree build
1351 t_cpu="coldfire"
1352 t_manufacturer="iaudio"
1353 t_model="m3"
1356 40|gigabeatf)
1357 target_id=20
1358 modelname="gigabeatf"
1359 target="-DGIGABEAT_F"
1360 memory=32 # always
1361 arm9tdmicc
1362 tool="$rootdir/tools/scramble -add=giga"
1363 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1364 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1365 output="rockbox.gigabeat"
1366 appextra="recorder:gui"
1367 plugins="yes"
1368 swcodec="yes"
1369 toolset=$gigabeatbitmaptools
1370 boottool="$rootdir/tools/scramble -gigabeat"
1371 bootoutput="FWIMG01.DAT"
1372 # architecture, manufacturer and model for the target-tree build
1373 t_cpu="arm"
1374 t_manufacturer="s3c2440"
1375 t_model="gigabeat-fx"
1378 41|gigabeats)
1379 target_id=26
1380 modelname="gigabeats"
1381 target="-DGIGABEAT_S"
1382 memory=64
1383 arm1136jfscc
1384 tool="$rootdir/tools/scramble -add=gigs"
1385 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1386 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1387 output="rockbox.gigabeat"
1388 appextra="recorder:gui"
1389 plugins="yes"
1390 swcodec="yes"
1391 toolset="$gigabeatbitmaptools mknkboot"
1392 boottool="$rootdir/tools/scramble -gigabeats"
1393 bootoutput="nk.bin"
1394 # architecture, manufacturer and model for the target-tree build
1395 t_cpu="arm"
1396 t_manufacturer="imx31"
1397 t_model="gigabeat-s"
1400 70|mrobe500)
1401 target_id=36
1402 modelname="mrobe500"
1403 target="-DMROBE_500"
1404 memory=64 # always
1405 arm926ejscc
1406 # tool="$rootdir/tools/scramble -add=m500"
1407 tool="cp "
1408 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1409 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1410 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1411 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1412 output="rockbox.mrobe500"
1413 appextra="recorder:gui"
1414 plugins="yes"
1415 swcodec="yes"
1416 toolset=$gigabeatbitmaptools
1417 boottool="cp "
1418 bootoutput="rockbox.mrboot"
1419 # architecture, manufacturer and model for the target-tree build
1420 t_cpu="arm"
1421 t_manufacturer="tms320dm320"
1422 t_model="mrobe-500"
1425 71|mrobe100)
1426 target_id=33
1427 modelname="mrobe100"
1428 target="-DMROBE_100"
1429 memory=32 # always
1430 arm7tdmicc
1431 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1432 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1433 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1434 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1435 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1436 output="rockbox.mi4"
1437 appextra="recorder:gui"
1438 plugins="yes"
1439 swcodec="yes"
1440 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1441 bootoutput="pp5020.mi4"
1442 # toolset is the tools within the tools directory that we build for
1443 # this particular target.
1444 toolset="$genericbitmaptools scramble"
1445 # architecture, manufacturer and model for the target-tree build
1446 t_cpu="arm"
1447 t_manufacturer="olympus"
1448 t_model="mrobe-100"
1451 80|logikdax)
1452 target_id=31
1453 modelname="logikdax"
1454 target="-DLOGIK_DAX"
1455 memory=2 # always
1456 arm946cc
1457 tool="$rootdir/tools/scramble -add=ldax"
1458 boottool="$rootdir/tools/scramble -tcc=crc"
1459 bootoutput="player.rom"
1460 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1461 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1462 output="rockbox.logik"
1463 appextra="recorder:gui"
1464 plugins=""
1465 swcodec="yes"
1466 # toolset is the tools within the tools directory that we build for
1467 # this particular target.
1468 toolset=$tccbitmaptools
1469 # architecture, manufacturer and model for the target-tree build
1470 t_cpu="arm"
1471 t_manufacturer="tcc77x"
1472 t_model="logikdax"
1475 90|creativezvm30gb)
1476 target_id=35
1477 modelname="creativezvm30"
1478 target="-DCREATIVE_ZVM"
1479 memory=64
1480 arm926ejscc
1481 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1482 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1483 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1484 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1485 tool="$rootdir/tools/scramble -creative=zvm"
1486 USE_ELF="yes"
1487 output="rockbox.zvm"
1488 appextra="recorder:gui"
1489 plugins=""
1490 swcodec="yes"
1491 toolset=$ipodbitmaptools
1492 boottool="$rootdir/tools/scramble -creative=zvm -no-ciff"
1493 bootoutput="rockbox.zvmboot"
1494 # architecture, manufacturer and model for the target-tree build
1495 t_cpu="arm"
1496 t_manufacturer="tms320dm320"
1497 t_model="creative-zvm"
1500 91|creativezvm60gb)
1501 target_id=40
1502 modelname="creativezvm60"
1503 target="-DCREATIVE_ZVM60GB"
1504 memory=64
1505 arm926ejscc
1506 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1507 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1508 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1509 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1510 tool="$rootdir/tools/scramble -creative=zvm60 -no-ciff"
1511 USE_ELF="yes"
1512 output="rockbox.zvm60"
1513 appextra="recorder:gui"
1514 plugins=""
1515 swcodec="yes"
1516 toolset=$ipodbitmaptools
1517 boottool="$rootdir/tools/scramble -creative=zvm60"
1518 bootoutput="rockbox.zvm60boot"
1519 # architecture, manufacturer and model for the target-tree build
1520 t_cpu="arm"
1521 t_manufacturer="tms320dm320"
1522 t_model="creative-zvm"
1525 92|creativezenvision)
1526 target_id=39
1527 modelname="creativezv"
1528 target="-DCREATIVE_ZV"
1529 memory=64
1530 arm926ejscc
1531 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1532 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1533 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1534 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1535 tool="$rootdir/tools/scramble -creative=zenvision -no-ciff"
1536 USE_ELF="yes"
1537 output="rockbox.zv"
1538 appextra="recorder:gui"
1539 plugins=""
1540 swcodec="yes"
1541 toolset=$ipodbitmaptools
1542 boottool="$rootdir/tools/scramble -creative=zenvision"
1543 bootoutput="rockbox.zvboot"
1544 # architecture, manufacturer and model for the target-tree build
1545 t_cpu="arm"
1546 t_manufacturer="tms320dm320"
1547 t_model="creative-zvm"
1550 50|e200)
1551 target_id=23
1552 modelname="e200"
1553 target="-DSANSA_E200"
1554 memory=32 # supposedly
1555 arm7tdmicc
1556 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1557 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1558 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1559 output="rockbox.mi4"
1560 appextra="recorder:gui"
1561 plugins="yes"
1562 swcodec="yes"
1563 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1564 bootoutput="PP5022.mi4"
1565 # toolset is the tools within the tools directory that we build for
1566 # this particular target.
1567 toolset="$genericbitmaptools scramble"
1568 # architecture, manufacturer and model for the target-tree build
1569 t_cpu="arm"
1570 t_manufacturer="sandisk"
1571 t_model="sansa-e200"
1574 51|e200r)
1575 # the e200R model is pretty much identical to the e200, it only has a
1576 # different option to the scramble tool when building a bootloader and
1577 # makes the bootloader output file name in all lower case.
1578 target_id=27
1579 modelname="e200r"
1580 target="-DSANSA_E200"
1581 memory=32 # supposedly
1582 arm7tdmicc
1583 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1584 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1585 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1586 output="rockbox.mi4"
1587 appextra="recorder:gui"
1588 plugins="yes"
1589 swcodec="yes"
1590 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
1591 bootoutput="pp5022.mi4"
1592 # toolset is the tools within the tools directory that we build for
1593 # this particular target.
1594 toolset="$genericbitmaptools scramble"
1595 # architecture, manufacturer and model for the target-tree build
1596 t_cpu="arm"
1597 t_manufacturer="sandisk"
1598 t_model="sansa-e200"
1601 52|c200)
1602 target_id=30
1603 modelname="c200"
1604 target="-DSANSA_C200"
1605 memory=32 # supposedly
1606 arm7tdmicc
1607 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
1608 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1609 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1610 output="rockbox.mi4"
1611 appextra="recorder:gui"
1612 plugins="yes"
1613 swcodec="yes"
1614 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1615 bootoutput="firmware.mi4"
1616 # toolset is the tools within the tools directory that we build for
1617 # this particular target.
1618 toolset="$genericbitmaptools scramble"
1619 # architecture, manufacturer and model for the target-tree build
1620 t_cpu="arm"
1621 t_manufacturer="sandisk"
1622 t_model="sansa-c200"
1625 53|m200)
1626 target_id=31
1627 modelname="m200"
1628 target="-DSANSA_M200"
1629 memory=2 # always
1630 arm946cc
1631 tool="$rootdir/tools/scramble -add=m200"
1632 boottool="$rootdir/tools/scramble -tcc=crc"
1633 bootoutput="player.rom"
1634 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1635 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1636 output="rockbox.m200"
1637 appextra="recorder:gui"
1638 plugins=""
1639 swcodec="yes"
1640 # toolset is the tools within the tools directory that we build for
1641 # this particular target.
1642 toolset=$tccbitmaptools
1643 # architecture, manufacturer and model for the target-tree build
1644 t_cpu="arm"
1645 t_manufacturer="tcc77x"
1646 t_model="m200"
1649 54|c100)
1650 target_id=42
1651 modelname="c100"
1652 target="-DSANSA_C100" # The #define used in firmware/export/config.h for conditional compilation
1653 memory=32 # how many megabytes of RAM
1654 arm946cc # Which compiler to use, see the beginning of the file
1655 tool="$rootdir/tools/scramble -add=c100" # Which command to use for creating a rockbox binary to be loaded by the bootloader
1656 boottool="$rootdir/tools/scramble -tcc=crc"
1657 bootoutput="player.rom"
1658 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" # How to create a monochrome bitmap
1659 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" # How to create a native bitmap
1660 output="rockbox.c100" # The name of the Rockbox binary file
1661 appextra="recorder:gui" # What directories in the apps/ tree to include in compilation
1662 plugins="" # Does it support plugins?
1663 toolset=$tccbitmaptools
1664 t_cpu="arm"
1665 t_manufacturer="tcc77x"
1666 t_model="c100"
1669 60|tpj1022)
1670 target_id=25
1671 modelname="tpj1022"
1672 target="-DELIO_TPJ1022"
1673 memory=32 # always
1674 arm7tdmicc
1675 tool="$rootdir/tools/scramble -add tpj2"
1676 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1677 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1678 output="rockbox.elio"
1679 appextra="recorder:gui"
1680 plugins="yes"
1681 swcodec="yes"
1682 boottool="$rootdir/tools/scramble -mi4v2"
1683 bootoutput="pp5020.mi4"
1684 # toolset is the tools within the tools directory that we build for
1685 # this particular target.
1686 toolset="$genericbitmaptools scramble"
1687 # architecture, manufacturer and model for the target-tree build
1688 t_cpu="arm"
1689 t_manufacturer="tatung"
1690 t_model="tpj1022"
1693 100|sa9200)
1694 target_id=41
1695 modelname="sa9200"
1696 target="-DPHILIPS_SA9200"
1697 memory=32 # supposedly
1698 arm7tdmicc
1699 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
1700 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1701 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1702 output="rockbox.mi4"
1703 appextra="recorder:gui"
1704 plugins=""
1705 swcodec="yes"
1706 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
1707 bootoutput="FWImage.ebn"
1708 # toolset is the tools within the tools directory that we build for
1709 # this particular target.
1710 toolset="$genericbitmaptools scramble"
1711 # architecture, manufacturer and model for the target-tree build
1712 t_cpu="arm"
1713 t_manufacturer="philips"
1714 t_model="sa9200"
1717 101|hdd1630)
1718 target_id=43
1719 modelname="hdd1630"
1720 target="-DPHILIPS_HDD1630"
1721 memory=32 # supposedly
1722 arm7tdmicc
1723 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
1724 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1725 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1726 output="rockbox.mi4"
1727 appextra="recorder:gui"
1728 plugins=""
1729 swcodec="yes"
1730 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
1731 bootoutput="FWImage.ebn"
1732 # toolset is the tools within the tools directory that we build for
1733 # this particular target.
1734 toolset="$genericbitmaptools scramble"
1735 # architecture, manufacturer and model for the target-tree build
1736 t_cpu="arm"
1737 t_manufacturer="philips"
1738 t_model="hdd1630"
1741 110|meizum6sl)
1742 target_id=20
1743 modelname="meizum6sl"
1744 target="-DMEIZU_M6SL"
1745 memory=16 # always
1746 arm940tbecc
1747 tool="cp"
1748 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1749 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1750 output="rockbox.meizu"
1751 appextra="recorder:gui"
1752 plugins="no" #FIXME
1753 swcodec="yes"
1754 toolset=$genericbitmaptools
1755 boottool="cp"
1756 bootoutput="rockboot.ebn"
1757 # architecture, manufacturer and model for the target-tree build
1758 t_cpu="arm"
1759 t_manufacturer="s5l8700"
1760 t_model="meizu-m6sl"
1763 120|ondavx747)
1764 target_id=44
1765 modelname="ondavx747"
1766 target="-DONDA_VX747"
1767 memory=16 #FIXME
1768 mipselcc
1769 tool="cp"
1770 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1771 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1772 output="rockbox.vx747"
1773 appextra="recorder:gui"
1774 plugins="no" #FIXME
1775 swcodec="yes"
1776 toolset=$genericbitmaptools
1777 boottool="cp"
1778 bootoutput="rockboot.vx747"
1779 # architecture, manufacturer and model for the target-tree build
1780 t_cpu="mips"
1781 t_manufacturer="ingenic_jz47xx"
1782 t_model="onda_vx747"
1785 echo "Please select a supported target platform!"
1786 exit
1789 esac
1791 echo "Platform set to $modelname"
1794 #remove start
1795 ############################################################################
1796 # Amount of memory, for those that can differ. They have $memory unset at
1797 # this point.
1800 if [ -z "$memory" ]; then
1801 case $target_id in
1803 echo "Enter size of your RAM (in MB): (Defaults to 32)"
1804 if [ "1" != `parse_args --ram` ]; then
1805 size=`parse_args --ram`;
1806 else
1807 size=`input`;
1809 case $size in
1810 60|64)
1811 memory="64"
1814 memory="32"
1816 esac
1819 echo "Enter size of your RAM (in MB): (Defaults to 2)"
1820 if [ "1" != `parse_args --ram` ]; then
1821 size=`parse_args --ram`;
1822 else
1823 size=`input`;
1825 case $size in
1827 memory="8"
1830 memory="2"
1832 esac
1834 esac
1835 echo "Memory size selected: $memory MB"
1836 echo ""
1838 #remove end
1840 ##################################################################
1841 # Figure out build "type"
1844 # the ifp7x0 is the only platform that supports building a gdb stub like
1845 # this
1846 case $modelname in
1847 ifp7xx)
1848 gdbstub="(G)DB stub, "
1850 e200r|e200)
1851 gdbstub="(I)installer, "
1855 esac
1856 if [ "1" != `parse_args --type` ]; then
1857 option=`parse_args --type`;
1858 else
1859 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, $gdbstub(M)anual: (Defaults to N)"
1860 option=`input`;
1863 case $option in
1864 [Ii])
1865 appsdir='\$(ROOTDIR)/bootloader'
1866 apps="bootloader"
1867 extradefines="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
1868 bootloader="1"
1869 echo "e200R-installer build selected"
1871 [Bb])
1872 if test $t_manufacturer = "archos"; then
1873 # Archos SH-based players do this somewhat differently for
1874 # some reason
1875 appsdir='\$(ROOTDIR)/flash/bootbox'
1876 apps="bootbox"
1877 else
1878 appsdir='\$(ROOTDIR)/bootloader'
1879 apps="bootloader"
1880 flash=""
1881 if test -n "$boottool"; then
1882 tool="$boottool"
1884 if test -n "$bootoutput"; then
1885 output=$bootoutput
1888 extradefines="-DBOOTLOADER -ffunction-sections -fdata-sections"
1889 bootloader="1"
1890 echo "Bootloader build selected"
1892 [Ss])
1893 debug="-DDEBUG"
1894 simulator="yes"
1895 extradefines="-DSIMULATOR"
1896 echo "Simulator build selected"
1898 [Aa])
1899 echo "Advanced build selected"
1900 whichadvanced
1902 [Gg])
1903 extradefines="-DSTUB" # for target makefile symbol EXTRA_DEFINES
1904 appsdir='\$(ROOTDIR)/gdb'
1905 apps="stub"
1906 case $modelname in
1907 ifp7xx)
1908 output="stub.wma"
1912 esac
1913 echo "GDB stub build selected"
1915 [Mm])
1916 toolset='';
1917 apps="manual"
1918 echo "Manual build selected"
1921 if [ "$modelname" = "e200r" ]; then
1922 echo "Do not use the e200R target for regular builds. Use e200 instead."
1923 exit
1925 debug=""
1926 echo "Normal build selected"
1929 esac
1930 # to be able running "make manual" from non-manual configuration
1931 case $modelname in
1932 fmrecorder)
1933 manualdev="recorderv2fm"
1935 recorderv2)
1936 manualdev="recorderv2fm"
1938 h1??)
1939 manualdev="h1xx"
1941 ipodmini2g)
1942 manualdev="ipodmini"
1945 manualdev=$modelname
1947 esac
1949 if [ -z "$debug" ]; then
1950 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
1953 echo "Using source code root directory: $rootdir"
1955 # this was once possible to change at build-time, but no more:
1956 language="english"
1958 uname=`uname`
1960 if [ "yes" = "$simulator" ]; then
1961 # setup compiler and things for simulator
1962 simcc
1964 if [ -d "archos" ]; then
1965 echo "sub directory archos already present"
1966 else
1967 mkdir archos
1968 echo "created an archos subdirectory for simulating the hard disk"
1972 # Now, figure out version number of the (gcc) compiler we are about to use
1973 gccver=`$CC -dumpversion`;
1975 # figure out the binutil version too and display it, mostly for the build
1976 # system etc to be able to see it easier
1977 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
1979 if [ -z "$gccver" ]; then
1980 echo "WARNING: The compiler you must use ($CC) is not in your path!"
1981 echo "WARNING: this may cause your build to fail since we cannot do the"
1982 echo "WARNING: checks we want now."
1983 else
1985 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
1986 # DEPEND on it
1988 num1=`echo $gccver | cut -d . -f1`
1989 num2=`echo $gccver | cut -d . -f2`
1990 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
1992 # This makes:
1993 # 3.3.X => 303
1994 # 3.4.X => 304
1995 # 2.95.3 => 295
1997 echo "Using $CC $gccver ($gccnum)"
1999 if test "$gccnum" -ge "400"; then
2000 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
2001 # so we ignore that warnings for now
2002 # -Wno-pointer-sign
2003 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
2006 if test "$gccnum" -ge "401"; then
2007 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
2008 # will break strict-aliasing rules"
2010 GCCOPTS="$GCCOPTS -fno-strict-aliasing"
2013 if test "$gccnum" -ge "402"; then
2014 # disable warning about "warning: initialized field overwritten" as gcc 4.2
2015 # and later would throw it for several valid cases
2016 GCCOPTS="$GCCOPTS -Wno-override-init"
2019 case $prefix in
2021 # simulator
2023 i586-mingw32msvc-)
2024 # cross-compile for win32
2027 # Verify that the cross-compiler is of a recommended version!
2028 if test "$gccver" != "$gccchoice"; then
2029 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
2030 echo "WARNING: version $gccchoice!"
2031 echo "WARNING: This may cause your build to fail since it may be a version"
2032 echo "WARNING: that isn't functional or known to not be the best choice."
2033 echo "WARNING: If you suffer from build problems, you know that this is"
2034 echo "WARNING: a likely source for them..."
2037 esac
2042 echo "Using $LD $ldver"
2044 # check the compiler for SH platforms
2045 if test "$CC" = "sh-elf-gcc"; then
2046 if test "$gccnum" -lt "400"; then
2047 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
2048 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2049 else
2050 # figure out patch status
2051 gccpatch=`$CC --version`;
2053 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
2054 echo "gcc $gccver is rockbox patched"
2055 # then convert -O to -Os to get smaller binaries!
2056 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2057 else
2058 echo "WARNING: You use an unpatched gcc compiler: $gccver"
2059 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2064 if test "$CC" = "m68k-elf-gcc"; then
2065 # convert -O to -Os to get smaller binaries!
2066 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2069 if [ "1" != `parse_args --ccache` ]; then
2070 echo "Enable ccache for building"
2071 ccache="ccache"
2072 else
2073 if [ "1" = `parse_args --no-ccache` ]; then
2074 ccache=`findtool ccache`
2075 if test -n "$ccache"; then
2076 echo "Found and uses ccache ($ccache)"
2081 if test -n "$ccache"; then
2082 CC="$ccache $CC"
2085 if test "X$endian" = "Xbig"; then
2086 defendian="ROCKBOX_BIG_ENDIAN"
2087 else
2088 defendian="ROCKBOX_LITTLE_ENDIAN"
2091 sed > autoconf.h \
2092 -e "s,@ENDIAN@,${defendian},g" \
2093 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
2094 -e "s,@config_rtc@,$config_rtc,g" \
2095 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
2096 <<EOF
2097 /* This header was made by configure */
2098 #ifndef __BUILD_AUTOCONF_H
2099 #define __BUILD_AUTOCONF_H
2101 /* Define endianess for the target or simulator platform */
2102 #define @ENDIAN@ 1
2104 /* Define this if you build rockbox to support the logf logging and display */
2105 #undef ROCKBOX_HAS_LOGF
2107 /* optional defines for RTC mod for h1x0 */
2108 @config_rtc@
2109 @have_rtc_alarm@
2111 #endif /* __BUILD_AUTOCONF_H */
2114 if test -n "$t_cpu"; then
2115 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
2116 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
2117 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
2118 GCCOPTS="$GCCOPTS"
2121 if test "$simulator" = "yes"; then
2122 # add simul make stuff on the #SIMUL# line
2123 simmagic1="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
2124 simmagic2="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
2125 else
2126 # delete the lines that match
2127 simmagic1='/@SIMUL1@/D'
2128 simmagic2='/@SIMUL2@/D'
2131 if test "$swcodec" = "yes"; then
2132 voicetoolset="rbspeexenc voicefont wavtrim"
2133 else
2134 voicetoolset="voicefont wavtrim"
2137 if test "$apps" = "apps"; then
2138 # only when we build "real" apps we build the .lng files
2139 buildlangs="langs"
2142 sed > Makefile \
2143 -e "s,@ROOTDIR@,${rootdir},g" \
2144 -e "s,@DEBUG@,${debug},g" \
2145 -e "s,@MEMORY@,${memory},g" \
2146 -e "s,@TARGET_ID@,${target_id},g" \
2147 -e "s,@TARGET@,${target},g" \
2148 -e "s,@CPU@,${t_cpu},g" \
2149 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
2150 -e "s,@MODELNAME@,${modelname},g" \
2151 -e "s,@LANGUAGE@,${language},g" \
2152 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
2153 -e "s,@PWD@,${pwd},g" \
2154 -e "s,@CC@,${CC},g" \
2155 -e "s,@LD@,${LD},g" \
2156 -e "s,@AR@,${AR},g" \
2157 -e "s,@AS@,${AS},g" \
2158 -e "s,@OC@,${OC},g" \
2159 -e "s,@WINDRES@,${WINDRES},g" \
2160 -e "s,@DLLTOOL@,${DLLTOOL},g" \
2161 -e "s,@DLLWRAP@,${DLLWRAP},g" \
2162 -e "s,@RANLIB@,${RANLIB},g" \
2163 -e "s,@TOOL@,${tool},g" \
2164 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
2165 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
2166 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
2167 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
2168 -e "s,@OUTPUT@,${output},g" \
2169 -e "s,@APPEXTRA@,${appextra},g" \
2170 -e "s,@ARCHOSROM@,${archosrom},g" \
2171 -e "s,@FLASHFILE@,${flash},g" \
2172 -e "s,@PLUGINS@,${plugins},g" \
2173 -e "s,@CODECS@,${swcodec},g" \
2174 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
2175 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
2176 -e "s,@GCCOPTS@,${GCCOPTS},g" \
2177 -e "s,@TARGET_INC@,${TARGET_INC},g" \
2178 -e "s!@LDOPTS@!${LDOPTS}!g" \
2179 -e "s,@LOADADDRESS@,${loadaddress},g" \
2180 -e "s,@EXTRADEF@,${extradefines},g" \
2181 -e "s,@APPSDIR@,${appsdir},g" \
2182 -e "s,@FIRMDIR@,${firmdir},g" \
2183 -e "s,@TOOLSDIR@,${toolsdir},g" \
2184 -e "s,@APPS@,${apps},g" \
2185 -e "s,@SIMVER@,${simver},g" \
2186 -e "s,@GCCVER@,${gccver},g" \
2187 -e "s,@GCCNUM@,${gccnum},g" \
2188 -e "s,@UNAME@,${uname},g" \
2189 -e "s,@ENDIAN@,${defendian},g" \
2190 -e "s,@TOOLSET@,${toolset},g" \
2191 -e "${simmagic1}" \
2192 -e "${simmagic2}" \
2193 -e "s,@MANUALDEV@,${manualdev},g" \
2194 -e "s,@ENCODER@,${ENC_CMD},g" \
2195 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
2196 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
2197 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
2198 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
2199 -e "s,@LANGS@,${buildlangs},g" \
2200 -e "s,@USE_ELF@,${USE_ELF},g" \
2201 <<EOF
2202 ## Automatically generated. http://www.rockbox.org/
2204 ifndef V
2205 SILENT=@
2206 else
2207 VERBOSEOPT=-v
2208 endif
2210 # old 'make' versions don't have the built-in 'info' function
2211 info=old\$(shell echo >&2 "Consider upgrading to GNU make 3.81+ for optimum build performance.")
2212 ifeq (\$(call info),old)
2213 export info=echo "\$\$(1)";
2214 endif
2216 export ROOTDIR=@ROOTDIR@
2217 export FIRMDIR=@FIRMDIR@
2218 export APPSDIR=@APPSDIR@
2219 export TOOLSDIR=@TOOLSDIR@
2220 export DOCSDIR=\$(ROOTDIR)/docs
2221 export MANUALDIR=\${ROOTDIR}/manual
2222 export DEBUG=@DEBUG@
2223 export MODELNAME=@MODELNAME@
2224 export ARCHOSROM=@ARCHOSROM@
2225 export FLASHFILE=@FLASHFILE@
2226 export TARGET_ID=@TARGET_ID@
2227 export TARGET=@TARGET@
2228 export CPU=@CPU@
2229 export MANUFACTURER=@MANUFACTURER@
2230 export OBJDIR=@PWD@
2231 export BUILDDIR=@PWD@
2232 export LANGUAGE=@LANGUAGE@
2233 export VOICELANGUAGE=@VOICELANGUAGE@
2234 export MEMORYSIZE=@MEMORY@
2235 export VERSION=\$(shell \$(ROOTDIR)/tools/svnversion.sh \$(ROOTDIR))
2236 export BUILDDATE=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
2237 export MKFIRMWARE=@TOOL@
2238 export BMP2RB_MONO=@BMP2RB_MONO@
2239 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
2240 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
2241 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
2242 export BINARY=@OUTPUT@
2243 export APPEXTRA=@APPEXTRA@
2244 export ENABLEDPLUGINS=@PLUGINS@
2245 export SOFTWARECODECS=@CODECS@
2246 export EXTRA_DEFINES=@EXTRADEF@
2247 export HOSTCC=gcc
2248 export HOSTAR=ar
2249 export CC=@CC@
2250 export LD=@LD@
2251 export AR=@AR@
2252 export AS=@AS@
2253 export OC=@OC@
2254 export WINDRES=@WINDRES@
2255 export DLLTOOL=@DLLTOOL@
2256 export DLLWRAP=@DLLWRAP@
2257 export RANLIB=@RANLIB@
2258 export PROFILE_OPTS=@PROFILE_OPTS@
2259 export SIMVER=@SIMVER@
2260 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
2261 export GCCOPTS=@GCCOPTS@
2262 export TARGET_INC=@TARGET_INC@
2263 export LOADADDRESS=@LOADADDRESS@
2264 export SHARED_FLAG=@SHARED_FLAG@
2265 export LDOPTS=@LDOPTS@
2266 export GCCVER=@GCCVER@
2267 export GCCNUM=@GCCNUM@
2268 export UNAME=@UNAME@
2269 export MANUALDEV=@MANUALDEV@
2270 export TTS_OPTS=@TTS_OPTS@
2271 export TTS_ENGINE=@TTS_ENGINE@
2272 export ENC_OPTS=@ENC_OPTS@
2273 export ENCODER=@ENCODER@
2274 export USE_ELF=@USE_ELF@
2276 # Do not print "Entering directory ..."
2277 MAKEFLAGS += --no-print-directory
2279 .PHONY: all clean tags zip tools manual bin build info langs
2281 all: info
2283 info: build
2284 \$(SILENT)\$(TOOLSDIR)/mkinfo.pl \$(BUILDDIR)/rockbox-info.txt
2286 build: tools @LANGS@
2287 @SIMUL1@
2288 @SIMUL2@
2289 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
2290 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@
2292 bin: tools @LANGS@
2293 @SIMUL1@
2294 @SIMUL2@
2295 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
2296 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ \$(BUILDDIR)/\$(BINARY)
2298 rocks: tools
2299 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ rocks
2301 veryclean: clean toolsclean
2303 toolsclean:
2304 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) clean
2306 clean:
2307 \$(SILENT)echo Cleaning build directory
2308 \$(SILENT)rm -rf rockbox.zip rockbox.7z rockbox.tar rockbox.tar.gz \
2309 rockbox.tar.bz2 TAGS @APPS@ firmware comsim sim lang.[ch] \
2310 manual *.pdf *.a credits.raw @OUTPUT@ bitmaps pluginbitmaps \
2311 @ARCHOSROM@ @FLASHFILE@ UI256.bmp rockbox-full.zip \
2312 html txt rockbox-manual*.zip sysfont.h rockbox-info.txt \
2313 voicefontids *.wav *.mp3 *.voice max_language_size.h
2315 tools:
2316 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @TOOLSET@
2318 voicetools:
2319 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @VOICETOOLSET@
2321 tags:
2322 \$(SILENT)rm -f TAGS
2323 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) tags
2324 \$(SILENT)\$(MAKE) -C \$(APPSDIR) tags
2325 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins tags
2326 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins/lib tags
2328 fontzip:
2329 \$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\" -r "\$(ROOTDIR)" -f 1 -o rockbox-fonts.zip \$(TARGET) \$(BINARY)
2331 zip:
2332 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
2333 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
2335 mapzip:
2336 \$(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip
2338 fullzip:
2339 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
2340 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" -f 2 -o rockbox-full.zip \$(TARGET) \$(BINARY)
2342 7zip:
2343 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
2344 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.7z" -z "7za a -mx=9" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
2346 tar:
2347 \$(SILENT)rm -f rockbox.tar
2348 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
2349 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.tar" -z "tar -cf" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
2351 bzip2: tar
2352 \$(SILENT)bzip2 -f9 rockbox.tar
2354 gzip: tar
2355 \$(SILENT)gzip -f9 rockbox.tar
2357 langs: features
2358 \$(SILENT)mkdir -p \$(BUILDDIR)/apps/lang
2359 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/lang OBJDIR=\$(BUILDDIR)/apps/lang
2361 manual: manual-pdf
2362 manual-pdf:
2363 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-pdf
2364 manual-html:
2365 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-html
2366 manual-zhtml: manual-zip
2367 manual-txt:
2368 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt
2369 manual-ztxt:
2370 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt-zip
2371 manual-zip:
2372 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-zip
2374 features: tools
2375 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ features
2377 help:
2378 @echo "A few helpful make targets"
2379 @echo ""
2380 @echo "all - builds a full Rockbox (default), including tools"
2381 @echo "bin - builds only the Rockbox.<target name> file"
2382 @echo "rocks - builds only plugins and codecs"
2383 @echo "clean - cleans a build directory (not tools)"
2384 @echo "veryclean - cleans the build and tools directories"
2385 @echo "manual - builds a manual"
2386 @echo "manual-html - HTML manual"
2387 @echo "manual-zip - HTML manual (zipped)"
2388 @echo "manual-txt - txt manual"
2389 @echo "fullzip - creates a rockbox.zip of your build with fonts"
2390 @echo "zip - creates a rockbox.zip of your build (no fonts)"
2391 @echo "gzip - creates a rockbox.tar.gz of your build (no fonts)"
2392 @echo "bzip2 - creates a rockbox.tar.bz2 of your build (no fonts)"
2393 @echo "7zip - creates a rockbox.7z of your build (no fonts)"
2394 @echo "fontzip - creates rockbox-fonts.zip"
2395 @echo "mapzip - creates rockbox-maps.zip with all .map files"
2396 @echo "tools - builds the tools only"
2397 @echo "voicetools - builds the voice tools only"
2398 @echo "install - installs your build (for simulator builds only)"
2402 if [ "yes" = "$simulator" ]; then
2404 cat >> Makefile <<EOF
2406 install:
2407 @echo "installing a full setup in your archos dir"
2408 @(\$(MAKE) fullzip && cd archos && unzip -oq ../rockbox-full.zip)
2413 if [ "yes" = "$voice" ]; then
2415 cat >> Makefile <<EOF
2417 voice: voicetools features
2418 \$(SILENT)for f in \`cat \$(BUILDDIR)/${apps}/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
2419 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 \\
2424 echo "Created Makefile"