Colour targets: Revert an optimisation from almost 18 months ago that actually turned...
[Rockbox.git] / tools / configure
blob6410f9043f059ffae0f2e4ca37cbfb6153fb9e97
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>`, 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 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 whichadvanced () {
284 ##################################################################
285 # Prompt for specific developer options
287 echo ""
288 echo "Enter your developer options (press enter when done)"
289 echo -n "(D)EBUG, (L)ogf, (S)imulator, (P)rofiling, (V)oice"
290 if [ "$memory" = "2" ]; then
291 echo -n ", (8)MB MOD"
293 if [ "$modelname" = "h120" ]; then
294 echo -n ", (R)TC MOD"
296 echo ""
298 cont=1
300 while [ $cont = "1" ]; do
302 option=`input`;
304 case $option in
305 [Dd])
306 if [ "yes" = "$profile" ]; then
307 echo "Debug is incompatible with profiling"
308 else
309 echo "define DEBUG"
310 use_debug="yes"
313 [Ll])
314 echo "logf() support enabled"
315 logf="yes"
317 [Ss])
318 echo "Simulator build enabled"
319 simulator="yes"
321 [Pp])
322 if [ "yes" = "$use_debug" ]; then
323 echo "Profiling is incompatible with debug"
324 else
325 echo "Profiling support is enabled"
326 profile="yes"
329 [Vv])
330 echo "Voice build selected"
331 voice="yes"
334 if [ "$memory" = "2" ]; then
335 memory="8"
336 echo "Memory size selected: 8MB"
337 else
338 cont=0
341 [Rr])
342 if [ "$modelname" = "h120" ]; then
343 config_rtc="#define CONFIG_RTC RTC_DS1339_DS3231"
344 have_rtc_alarm="#define HAVE_RTC_ALARM"
345 echo "RTC functions enabled (DS1339/DS3231)"
346 else
347 cont=0
351 cont=0
353 esac
354 done
355 echo "done"
357 if [ "yes" = "$voice" ]; then
358 # Ask about languages to build
359 echo "Select a number for the language to use (default is english)"
360 # The multiple-language feature is currently broken
361 # echo "You may enter a comma-separated list of languages to build"
363 picklang
364 voicelanguage=`whichlang`
366 if [ -z "$voicelanguage" ]; then
367 # pick a default
368 voicelanguage="english"
370 echo "Voice language set to $voicelanguage"
372 # Configure encoder and TTS engine for each language
373 for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do
374 voiceconfig "$thislang"
375 done
377 if [ "yes" = "$use_debug" ]; then
378 debug="-DDEBUG"
379 GCCOPTS="$GCCOPTS -g -DDEBUG"
381 if [ "yes" = "$logf" ]; then
382 use_logf="#define ROCKBOX_HAS_LOGF 1"
384 if [ "yes" = "$simulator" ]; then
385 debug="-DDEBUG"
386 extradefines="$extradefines -DSIMULATOR"
388 if [ "yes" = "$profile" ]; then
389 extradefines="$extradefines -DRB_PROFILE"
390 PROFILE_OPTS="-finstrument-functions"
394 # Configure voice settings
395 voiceconfig () {
396 thislang=$1
397 echo "Building $thislang voice for $modelname. Select options"
398 echo ""
400 if [ -f "`which flite`" ]; then
401 FLITE="F(l)ite "
402 FLITE_OPTS=""
403 DEFAULT_TTS="flite"
404 DEFAULT_TTS_OPTS=$FLITE_OPTS
405 DEFAULT_NOISEFLOOR="500"
406 DEFAULT_CHOICE="L"
408 if [ -f "`which espeak`" ]; then
409 ESPEAK="(e)Speak "
410 ESPEAK_OPTS=""
411 DEFAULT_TTS="espeak"
412 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
413 DEFAULT_NOISEFLOOR="500"
414 DEFAULT_CHOICE="e"
416 if [ -f "`which festival`" ]; then
417 FESTIVAL="(F)estival "
418 case "$thislang" in
419 "italiano")
420 FESTIVAL_OPTS="--language italian"
422 "espanol")
423 FESTIVAL_OPTS="--language spanish"
425 "finnish")
426 FESTIVAL_OPTS="--language finnish"
428 "czech")
429 FESTIVAL_OPTS="--language czech"
432 FESTIVAL_OPTS=""
434 esac
435 DEFAULT_TTS="festival"
436 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
437 DEFAULT_NOISEFLOOR="500"
438 DEFAULT_CHOICE="F"
440 if [ -f "`which swift`" ]; then
441 SWIFT="S(w)ift "
442 SWIFT_OPTS=""
443 DEFAULT_TTS="swift"
444 DEFAULT_TTS_OPTS=$SWIFT_OPTS
445 DEFAULT_NOISEFLOOR="500"
446 DEFAULT_CHOICE="w"
448 # Allow SAPI if Windows is in use
449 if [ -f "`which winver`" ]; then
450 SAPI="(S)API "
451 SAPI_OPTS=""
452 DEFAULT_TTS="sapi"
453 DEFAULT_TTS_OPTS=$SAPI_OPTS
454 DEFAULT_NOISEFLOOR="500"
455 DEFAULT_CHOICE="S"
458 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
459 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
460 exit
463 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
464 option=`input`
465 case "$option" in
466 [Ll])
467 TTS_ENGINE="flite"
468 NOISEFLOOR="500" # TODO: check this value
469 TTS_OPTS=$FLITE_OPTS
471 [Ee])
472 TTS_ENGINE="espeak"
473 NOISEFLOOR="500"
474 TTS_OPTS=$ESPEAK_OPTS
476 [Ff])
477 TTS_ENGINE="festival"
478 NOISEFLOOR="500"
479 TTS_OPTS=$FESTIVAL_OPTS
481 [Ss])
482 TTS_ENGINE="sapi"
483 NOISEFLOOR="500"
484 TTS_OPTS=$SAPI_OPTS
486 [Ww])
487 TTS_ENGINE="swift"
488 NOISEFLOOR="500"
489 TTS_OPTS=$SWIFT_OPTS
492 TTS_ENGINE=$DEFAULT_TTS
493 TTS_OPTS=$DEFAULT_TTS_OPTS
494 NOISEFLOOR=$DEFAULT_NOISEFLOOR
495 esac
496 echo "Using $TTS_ENGINE for TTS"
498 # Allow the user to input manual commandline options
499 printf "Enter $TTS_ENGINE options (enter for defaults \"$TTS_OPTS\"): "
500 USER_TTS_OPTS=`input`
501 if [ -n "$USER_TTS_OPTS" ]; then
502 TTS_OPTS="$USER_TTS_OPTS"
505 echo ""
507 if [ "$swcodec" = "yes" ]; then
508 ENCODER="rbspeexenc"
509 ENC_CMD="rbspeexenc"
510 ENC_OPTS="-q 4 -c 10"
511 else
512 if [ -f "`which lame`" ]; then
513 ENCODER="lame"
514 ENC_CMD="lame"
515 ENC_OPTS="--resample 12 -t -m m -h -V 9 -S -B 64 --vbr-new"
516 else
517 echo "You need LAME in the system path to build voice files for"
518 echo "HWCODEC targets."
519 exit
523 echo "Using $ENCODER for encoding voice clips"
525 # Allow the user to input manual commandline options
526 printf "Enter $ENCODER options (enter for defaults \"$ENC_OPTS\"): "
527 USER_ENC_OPTS=`input`
528 if [ -n "$USER_ENC_OPTS" ]; then
529 ENC_OPTS=$USER_ENC_OPTS
532 TEMPDIR="${pwd}"
533 if [ -f "`which cygpath`" ]; then
534 TEMPDIR=`cygpath . -a -w`
538 picklang() {
539 # figure out which languages that are around
540 for file in $rootdir/apps/lang/*.lang; do
541 clean=`echo $file | sed -e 's:.*/::g' | cut "-d." -f1`
542 langs="$langs $clean"
543 done
545 num=1
546 for one in $langs; do
547 echo "$num. $one"
548 num=`expr $num + 1`
549 done
551 read pick
554 whichlang() {
555 output=""
556 # Allow the user to pass a comma-separated list of langauges
557 for thispick in `echo $pick | sed 's/,/ /g'`; do
558 num=1
559 for one in $langs; do
560 # Accept both the language number and name
561 if [ "$num" = "$thispick" ] || [ "$thispick" = "$one" ]; then
562 if [ "$output" = "" ]; then
563 output=$one
564 else
565 output=$output,$one
568 num=`expr $num + 1`
569 done
570 done
571 echo $output
574 opt=$1
576 if test "$opt" = "--help"; then
577 echo "Rockbox configure script."
578 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
579 echo "Do *NOT* run this within the tools directory!"
580 echo ""
581 cat <<EOF
582 Usage: configure [OPTION]...
583 Options:
584 --target=TARGET Sets the target, TARGET can be either the target ID or
585 corresponding string. Run without this option to see the
586 available targets.
588 --ram=RAM Sets the RAM for certain targets. Even though any number
589 is accepted, not every number is correct. The default
590 value will be applied, if you entered a wrong number
591 (which depends on the target). Watch the output. Run
592 without this option if you are not sure which the right
593 number is.
595 --type=TYPE Sets the build type. The shortcut is valied.
596 Run without this option to see available types.
597 --ccache Enable ccache use (done by default these days)
598 --no-ccache Disable ccache use
599 --help Shows this message (must not be used with other options)
603 exit
606 if test -r "configure"; then
607 # this is a check for a configure script in the current directory, it there
608 # is one, try to figure out if it is this one!
610 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
611 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
612 echo "It will only cause you pain and grief. Instead do this:"
613 echo ""
614 echo " cd .."
615 echo " mkdir build-dir"
616 echo " cd build-dir"
617 echo " ../tools/configure"
618 echo ""
619 echo "Much happiness will arise from this. Enjoy"
620 exit
624 # get our current directory
625 pwd=`pwd`;
627 if { echo $pwd | grep " "; } then
628 echo "You're running this script in a path that contains space. The build"
629 echo "system is unfortunately not clever enough to deal with this. Please"
630 echo "run the script from a different path, rename the path or fix the build"
631 echo "system!"
632 exit
635 if [ -z "$rootdir" ]; then
636 ##################################################################
637 # Figure out where the source code root is!
639 rootdir=`dirname $0`/../
641 #####################################################################
642 # Convert the possibly relative directory name to an absolute version
644 now=`pwd`
645 cd $rootdir
646 rootdir=`pwd`
648 # cd back to the build dir
649 cd $now
652 apps="apps"
653 appsdir='\$(ROOTDIR)/apps'
654 firmdir='\$(ROOTDIR)/firmware'
655 toolsdir='\$(ROOTDIR)/tools'
658 ##################################################################
659 # Figure out target platform
662 if [ "1" != `parse_args --target` ]; then
663 buildfor=`parse_args --target`;
664 else
665 echo "Enter target platform:"
666 cat <<EOF
667 ==Archos== ==iriver== ==Apple iPod==
668 0) Player/Studio 10) H120/H140 20) Color/Photo
669 1) Recorder 11) H320/H340 21) Nano
670 2) FM Recorder 12) iHP-100/110/115 22) Video
671 3) Recorder v2 13) iFP-790 23) 3G
672 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
673 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
674 6) AV300 26) Mini 2G
675 27) 1G, 2G
677 ==iAudio== ==Toshiba== ==SanDisk==
678 30) X5/X5V/X5L 40) Gigabeat F 50) Sansa e200
679 31) M5/M5L 41) Gigabeat S 51) Sansa e200R
680 32) 7 52) Sansa c200
681 33) Cowon D2 53) Sansa m200
682 34) M3/M3L 54) Sansa c100
684 ==Tatung== ==Olympus== ==Logik==
685 60) Elio TPJ-1022 70) M:Robe 500 80) DAX 1GB MP3/DAB
686 71) M:Robe 100
687 ==Creative== ==Philips== ==Meizu==
688 90) Zen Vision:M 30GB 100) GoGear SA9200 110) M6SL
689 91) Zen Vision:M 60GB 101) GoGear HDD1630
690 92) Zen Vision
693 buildfor=`input`;
696 # Set of tools built for all target platforms:
697 toolset="rdf2binary convbdf codepages"
699 # Toolsets for some target families:
700 archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb"
701 iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb"
702 iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb"
703 ipodbitmaptools="$toolset scramble bmp2rb"
704 gigabeatbitmaptools="$toolset scramble descramble bmp2rb"
705 tccbitmaptools="$toolset scramble mktccboot bmp2rb"
706 # generic is used by IFP, H10, Sansa-e200
707 genericbitmaptools="$toolset bmp2rb"
710 # ---- For each target ----
712 # *Variables*
713 # target_id: a unique number identifying this target, IS NOT the menu number.
714 # Just use the currently highest number+1 when you add a new
715 # target.
716 # modelname: short model name used all over to identify this target
717 # memory: number of megabytes of RAM this target has. If the amount can
718 # be selected by the size prompt, let memory be unset here
719 # target: -Ddefine passed to the build commands to make the correct
720 # config-*.h file get included etc
721 # tool: the tool that takes a plain binary and converts that into a
722 # working "firmware" file for your target
723 # output: the final output file name
724 # boottool: the tool that takes a plain binary and generates a bootloader
725 # file for your target (or blank to use $tool)
726 # bootoutput:the final output file name for the bootloader (or blank to use
727 # $output)
728 # appextra: passed to the APPEXTRA variable in the Makefiles.
729 # TODO: add proper explanation
730 # archosrom: used only for Archos targets that build a special flashable .ucl
731 # image.
732 # flash: name of output for flashing, for targets where there's a special
733 # file output for this.
734 # plugins: set to 'yes' to build the plugins. Early development builds can
735 # set this to no in the early stages to have an easier life for a
736 # while
737 # swcodec: set 'yes' on swcodec targets
738 # toolset: lists what particular tools in the tools/ directory that this
739 # target needs to have built prior to building Rockbox
741 # *Functions*
742 # *cc: sets up gcc and compiler options for your target builds. Note
743 # that if you select a simulator build, the compiler selection is
744 # overridden later in the script.
746 case $buildfor in
748 0|player)
749 target_id=1
750 modelname="player"
751 target="-DARCHOS_PLAYER"
752 shcc
753 tool="$rootdir/tools/scramble"
754 output="archos.mod"
755 appextra="player:gui"
756 archosrom="$pwd/rombox.ucl"
757 flash="$pwd/rockbox.ucl"
758 plugins="yes"
759 swcodec=""
761 # toolset is the tools within the tools directory that we build for
762 # this particular target.
763 toolset="$toolset scramble descramble sh2d player_unifont uclpack"
765 # Note: the convbdf is present in the toolset just because: 1) the
766 # firmware/Makefile assumes it is present always, and 2) we will need it when we
767 # build the player simulator
769 t_cpu="sh"
770 t_manufacturer="archos"
771 t_model="player"
774 1|recorder)
775 target_id=2
776 modelname="recorder"
777 target="-DARCHOS_RECORDER"
778 shcc
779 tool="$rootdir/tools/scramble"
780 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
781 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
782 output="ajbrec.ajz"
783 appextra="recorder:gui"
784 #archosrom="$pwd/rombox.ucl"
785 flash="$pwd/rockbox.ucl"
786 plugins="yes"
787 swcodec=""
788 # toolset is the tools within the tools directory that we build for
789 # this particular target.
790 toolset=$archosbitmaptools
791 t_cpu="sh"
792 t_manufacturer="archos"
793 t_model="recorder"
796 2|fmrecorder)
797 target_id=3
798 modelname="fmrecorder"
799 target="-DARCHOS_FMRECORDER"
800 shcc
801 tool="$rootdir/tools/scramble -fm"
802 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
803 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
804 output="ajbrec.ajz"
805 appextra="recorder:gui"
806 #archosrom="$pwd/rombox.ucl"
807 flash="$pwd/rockbox.ucl"
808 plugins="yes"
809 swcodec=""
810 # toolset is the tools within the tools directory that we build for
811 # this particular target.
812 toolset=$archosbitmaptools
813 t_cpu="sh"
814 t_manufacturer="archos"
815 t_model="fm_v2"
818 3|recorderv2)
819 target_id=4
820 modelname="recorderv2"
821 target="-DARCHOS_RECORDERV2"
822 shcc
823 tool="$rootdir/tools/scramble -v2"
824 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
825 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
826 output="ajbrec.ajz"
827 appextra="recorder:gui"
828 #archosrom="$pwd/rombox.ucl"
829 flash="$pwd/rockbox.ucl"
830 plugins="yes"
831 swcodec=""
832 # toolset is the tools within the tools directory that we build for
833 # this particular target.
834 toolset=$archosbitmaptools
835 t_cpu="sh"
836 t_manufacturer="archos"
837 t_model="fm_v2"
840 4|ondiosp)
841 target_id=7
842 modelname="ondiosp"
843 target="-DARCHOS_ONDIOSP"
844 shcc
845 tool="$rootdir/tools/scramble -osp"
846 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
847 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
848 output="ajbrec.ajz"
849 appextra="recorder:gui"
850 archosrom="$pwd/rombox.ucl"
851 flash="$pwd/rockbox.ucl"
852 plugins="yes"
853 swcodec=""
854 # toolset is the tools within the tools directory that we build for
855 # this particular target.
856 toolset=$archosbitmaptools
857 t_cpu="sh"
858 t_manufacturer="archos"
859 t_model="ondio"
862 5|ondiofm)
863 target_id=8
864 modelname="ondiofm"
865 target="-DARCHOS_ONDIOFM"
866 shcc
867 tool="$rootdir/tools/scramble -ofm"
868 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
869 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
870 output="ajbrec.ajz"
871 appextra="recorder:gui"
872 #archosrom="$pwd/rombox.ucl"
873 flash="$pwd/rockbox.ucl"
874 plugins="yes"
875 swcodec=""
876 toolset=$archosbitmaptools
877 t_cpu="sh"
878 t_manufacturer="archos"
879 t_model="ondio"
882 6|av300)
883 target_id=38
884 modelname="av300"
885 target="-DARCHOS_AV300"
886 memory=16 # always
887 arm7tdmicc
888 tool="$rootdir/tools/scramble -mm=C"
889 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
890 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
891 output="cjbm.ajz"
892 appextra="recorder:gui"
893 plugins="yes"
894 swcodec=""
895 # toolset is the tools within the tools directory that we build for
896 # this particular target.
897 toolset="$toolset scramble descramble bmp2rb"
898 # architecture, manufacturer and model for the target-tree build
899 t_cpu="arm"
900 t_manufacturer="archos"
901 t_model="av300"
904 10|h120)
905 target_id=9
906 modelname="h120"
907 target="-DIRIVER_H120"
908 memory=32 # always
909 coldfirecc
910 tool="$rootdir/tools/scramble -add=h120"
911 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
912 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
913 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
914 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
915 output="rockbox.iriver"
916 appextra="recorder:gui"
917 flash="$pwd/rombox.iriver"
918 plugins="yes"
919 swcodec="yes"
920 # toolset is the tools within the tools directory that we build for
921 # this particular target.
922 toolset=$iriverbitmaptools
923 t_cpu="coldfire"
924 t_manufacturer="iriver"
925 t_model="h100"
928 11|h300)
929 target_id=10
930 modelname="h300"
931 target="-DIRIVER_H300"
932 memory=32 # always
933 coldfirecc
934 tool="$rootdir/tools/scramble -add=h300"
935 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
936 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
937 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
938 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
939 output="rockbox.iriver"
940 appextra="recorder:gui"
941 plugins="yes"
942 swcodec="yes"
943 # toolset is the tools within the tools directory that we build for
944 # this particular target.
945 toolset=$iriverbitmaptools
946 t_cpu="coldfire"
947 t_manufacturer="iriver"
948 t_model="h300"
951 12|h100)
952 target_id=11
953 modelname="h100"
954 target="-DIRIVER_H100"
955 memory=16 # always
956 coldfirecc
957 tool="$rootdir/tools/scramble -add=h100"
958 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
959 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
960 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
961 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
962 output="rockbox.iriver"
963 appextra="recorder:gui"
964 flash="$pwd/rombox.iriver"
965 plugins="yes"
966 swcodec="yes"
967 # toolset is the tools within the tools directory that we build for
968 # this particular target.
969 toolset=$iriverbitmaptools
970 t_cpu="coldfire"
971 t_manufacturer="iriver"
972 t_model="h100"
975 13|ifp7xx)
976 target_id=19
977 modelname="ifp7xx"
978 target="-DIRIVER_IFP7XX"
979 memory=1
980 arm7tdmicc short
981 tool="cp"
982 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
983 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
984 output="rockbox.wma"
985 appextra="recorder:gui"
986 plugins="yes"
987 swcodec="yes"
988 # toolset is the tools within the tools directory that we build for
989 # this particular target.
990 toolset=$genericbitmaptools
991 t_cpu="arm"
992 t_manufacturer="pnx0101"
993 t_model="iriver-ifp7xx"
996 14|h10)
997 target_id=22
998 modelname="h10"
999 target="-DIRIVER_H10"
1000 memory=32 # always
1001 arm7tdmicc
1002 tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
1003 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1004 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1005 output="rockbox.mi4"
1006 appextra="recorder:gui"
1007 plugins="yes"
1008 swcodec="yes"
1009 boottool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
1010 bootoutput="H10_20GC.mi4"
1011 # toolset is the tools within the tools directory that we build for
1012 # this particular target.
1013 toolset="$genericbitmaptools scramble"
1014 # architecture, manufacturer and model for the target-tree build
1015 t_cpu="arm"
1016 t_manufacturer="iriver"
1017 t_model="h10"
1020 15|h10_5gb)
1021 target_id=24
1022 modelname="h10_5gb"
1023 target="-DIRIVER_H10_5GB"
1024 memory=32 # always
1025 arm7tdmicc
1026 tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
1027 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1028 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1029 output="rockbox.mi4"
1030 appextra="recorder:gui"
1031 plugins="yes"
1032 swcodec="yes"
1033 boottool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
1034 bootoutput="H10.mi4"
1035 # toolset is the tools within the tools directory that we build for
1036 # this particular target.
1037 toolset="$genericbitmaptools scramble"
1038 # architecture, manufacturer and model for the target-tree build
1039 t_cpu="arm"
1040 t_manufacturer="iriver"
1041 t_model="h10"
1044 20|ipodcolor)
1045 target_id=13
1046 modelname="ipodcolor"
1047 target="-DIPOD_COLOR"
1048 memory=32 # always
1049 arm7tdmicc
1050 tool="$rootdir/tools/scramble -add=ipco"
1051 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1052 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1053 output="rockbox.ipod"
1054 appextra="recorder:gui"
1055 plugins="yes"
1056 swcodec="yes"
1057 bootoutput="bootloader-$modelname.ipod"
1058 # toolset is the tools within the tools directory that we build for
1059 # this particular target.
1060 toolset=$ipodbitmaptools
1061 # architecture, manufacturer and model for the target-tree build
1062 t_cpu="arm"
1063 t_manufacturer="ipod"
1064 t_model="color"
1067 21|ipodnano)
1068 target_id=14
1069 modelname="ipodnano"
1070 target="-DIPOD_NANO"
1071 memory=32 # always
1072 arm7tdmicc
1073 tool="$rootdir/tools/scramble -add=nano"
1074 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1075 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1076 output="rockbox.ipod"
1077 appextra="recorder:gui"
1078 plugins="yes"
1079 swcodec="yes"
1080 bootoutput="bootloader-$modelname.ipod"
1081 # toolset is the tools within the tools directory that we build for
1082 # this particular target.
1083 toolset=$ipodbitmaptools
1084 # architecture, manufacturer and model for the target-tree build
1085 t_cpu="arm"
1086 t_manufacturer="ipod"
1087 t_model="nano"
1090 22|ipodvideo)
1091 target_id=15
1092 modelname="ipodvideo"
1093 target="-DIPOD_VIDEO"
1094 arm7tdmicc
1095 tool="$rootdir/tools/scramble -add=ipvd"
1096 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1097 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1098 output="rockbox.ipod"
1099 appextra="recorder:gui"
1100 plugins="yes"
1101 swcodec="yes"
1102 bootoutput="bootloader-$modelname.ipod"
1103 # toolset is the tools within the tools directory that we build for
1104 # this particular target.
1105 toolset=$ipodbitmaptools
1106 # architecture, manufacturer and model for the target-tree build
1107 t_cpu="arm"
1108 t_manufacturer="ipod"
1109 t_model="video"
1112 23|ipod3g)
1113 target_id=16
1114 modelname="ipod3g"
1115 target="-DIPOD_3G"
1116 memory=32 # always
1117 arm7tdmicc
1118 tool="$rootdir/tools/scramble -add=ip3g"
1119 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1120 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1121 output="rockbox.ipod"
1122 appextra="recorder:gui"
1123 plugins="yes"
1124 swcodec="yes"
1125 bootoutput="bootloader-$modelname.ipod"
1126 # toolset is the tools within the tools directory that we build for
1127 # this particular target.
1128 toolset=$ipodbitmaptools
1129 # architecture, manufacturer and model for the target-tree build
1130 t_cpu="arm"
1131 t_manufacturer="ipod"
1132 t_model="3g"
1135 24|ipod4g)
1136 target_id=17
1137 modelname="ipod4g"
1138 target="-DIPOD_4G"
1139 memory=32 # always
1140 arm7tdmicc
1141 tool="$rootdir/tools/scramble -add=ip4g"
1142 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1143 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1144 output="rockbox.ipod"
1145 appextra="recorder:gui"
1146 plugins="yes"
1147 swcodec="yes"
1148 bootoutput="bootloader-$modelname.ipod"
1149 # toolset is the tools within the tools directory that we build for
1150 # this particular target.
1151 toolset=$ipodbitmaptools
1152 # architecture, manufacturer and model for the target-tree build
1153 t_cpu="arm"
1154 t_manufacturer="ipod"
1155 t_model="4g"
1158 25|ipodmini)
1159 target_id=18
1160 modelname="ipodmini"
1161 target="-DIPOD_MINI"
1162 memory=32 # always
1163 arm7tdmicc
1164 tool="$rootdir/tools/scramble -add=mini"
1165 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1166 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1167 output="rockbox.ipod"
1168 appextra="recorder:gui"
1169 plugins="yes"
1170 swcodec="yes"
1171 bootoutput="bootloader-$modelname.ipod"
1172 # toolset is the tools within the tools directory that we build for
1173 # this particular target.
1174 toolset=$ipodbitmaptools
1175 # architecture, manufacturer and model for the target-tree build
1176 t_cpu="arm"
1177 t_manufacturer="ipod"
1178 t_model="mini"
1181 26|ipodmini2g)
1182 target_id=21
1183 modelname="ipodmini2g"
1184 target="-DIPOD_MINI2G"
1185 memory=32 # always
1186 arm7tdmicc
1187 tool="$rootdir/tools/scramble -add=mn2g"
1188 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1189 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1190 output="rockbox.ipod"
1191 appextra="recorder:gui"
1192 plugins="yes"
1193 swcodec="yes"
1194 bootoutput="bootloader-$modelname.ipod"
1195 # toolset is the tools within the tools directory that we build for
1196 # this particular target.
1197 toolset=$ipodbitmaptools
1198 # architecture, manufacturer and model for the target-tree build
1199 t_cpu="arm"
1200 t_manufacturer="ipod"
1201 t_model="mini2g"
1204 27|ipod1g2g)
1205 target_id=29
1206 modelname="ipod1g2g"
1207 target="-DIPOD_1G2G"
1208 memory=32 # always
1209 arm7tdmicc
1210 tool="$rootdir/tools/scramble -add=1g2g"
1211 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1212 bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
1213 output="rockbox.ipod"
1214 appextra="recorder:gui"
1215 plugins="yes"
1216 swcodec="yes"
1217 bootoutput="bootloader-$modelname.ipod"
1218 # toolset is the tools within the tools directory that we build for
1219 # this particular target.
1220 toolset=$ipodbitmaptools
1221 # architecture, manufacturer and model for the target-tree build
1222 t_cpu="arm"
1223 t_manufacturer="ipod"
1224 t_model="1g2g"
1227 30|x5)
1228 target_id=12
1229 modelname="x5"
1230 target="-DIAUDIO_X5"
1231 memory=16 # always
1232 coldfirecc
1233 tool="$rootdir/tools/scramble -add=iax5"
1234 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1235 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1236 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1237 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1238 output="rockbox.iaudio"
1239 appextra="recorder:gui"
1240 plugins="yes"
1241 swcodec="yes"
1242 # toolset is the tools within the tools directory that we build for
1243 # this particular target.
1244 toolset="$iaudiobitmaptools"
1245 # architecture, manufacturer and model for the target-tree build
1246 t_cpu="coldfire"
1247 t_manufacturer="iaudio"
1248 t_model="x5"
1251 31|m5)
1252 target_id=28
1253 modelname="m5"
1254 target="-DIAUDIO_M5"
1255 memory=16 # always
1256 coldfirecc
1257 tool="$rootdir/tools/scramble -add=iam5"
1258 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1259 bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
1260 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1261 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
1262 output="rockbox.iaudio"
1263 appextra="recorder:gui"
1264 plugins="yes"
1265 swcodec="yes"
1266 # toolset is the tools within the tools directory that we build for
1267 # this particular target.
1268 toolset="$iaudiobitmaptools"
1269 # architecture, manufacturer and model for the target-tree build
1270 t_cpu="coldfire"
1271 t_manufacturer="iaudio"
1272 t_model="m5"
1275 32|iaudio7)
1276 target_id=32
1277 modelname="iaudio7"
1278 target="-DIAUDIO_7"
1279 memory=16 # always
1280 arm946cc
1281 tool="$rootdir/tools/scramble -add i7"
1282 boottool="$rootdir/tools/scramble -tcc=crc"
1283 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1284 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1285 output="rockbox.iaudio"
1286 appextra="recorder:gui"
1287 plugins="yes"
1288 swcodec="yes"
1289 bootoutput="I7_FW.BIN"
1290 # toolset is the tools within the tools directory that we build for
1291 # this particular target.
1292 toolset="$tccbitmaptools"
1293 # architecture, manufacturer and model for the target-tree build
1294 t_cpu="arm"
1295 t_manufacturer="tcc77x"
1296 t_model="iaudio7"
1299 33|cowond2)
1300 target_id=34
1301 modelname="cowond2"
1302 target="-DCOWON_D2"
1303 memory=32
1304 arm926ejscc
1305 tool="$rootdir/tools/scramble -add=d2"
1306 boottool="$rootdir/tools/scramble -tcc=crc"
1307 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1308 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1309 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1310 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1311 output="rockbox.iaudio"
1312 appextra="recorder:gui"
1313 plugins="yes"
1314 swcodec="yes"
1315 toolset="$tccbitmaptools"
1316 # architecture, manufacturer and model for the target-tree build
1317 t_cpu="arm"
1318 t_manufacturer="tcc780x"
1319 t_model="cowond2"
1322 34|m3)
1323 target_id=37
1324 modelname="m3"
1325 target="-DIAUDIO_M3"
1326 memory=16 # always
1327 coldfirecc
1328 tool="$rootdir/tools/scramble -add=iam3"
1329 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1330 bmp2rb_native="$rootdir/tools/bmp2rb -f 7"
1331 output="rockbox.iaudio"
1332 appextra="recorder:gui"
1333 plugins="yes"
1334 swcodec="yes"
1335 # toolset is the tools within the tools directory that we build for
1336 # this particular target.
1337 toolset="$iaudiobitmaptools"
1338 # architecture, manufacturer and model for the target-tree build
1339 t_cpu="coldfire"
1340 t_manufacturer="iaudio"
1341 t_model="m3"
1344 40|gigabeatf)
1345 target_id=20
1346 modelname="gigabeatf"
1347 target="-DGIGABEAT_F"
1348 memory=32 # always
1349 arm9tdmicc
1350 tool="$rootdir/tools/scramble -add=giga"
1351 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1352 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1353 output="rockbox.gigabeat"
1354 appextra="recorder:gui"
1355 plugins="yes"
1356 swcodec="yes"
1357 toolset=$gigabeatbitmaptools
1358 boottool="$rootdir/tools/scramble -gigabeat"
1359 bootoutput="FWIMG01.DAT"
1360 # architecture, manufacturer and model for the target-tree build
1361 t_cpu="arm"
1362 t_manufacturer="s3c2440"
1363 t_model="gigabeat-fx"
1366 41|gigabeats)
1367 target_id=26
1368 modelname="gigabeats"
1369 target="-DGIGABEAT_S"
1370 memory=64
1371 arm1136jfscc
1372 tool="$rootdir/tools/scramble -add=gigs"
1373 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1374 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1375 output="rockbox.gigabeat"
1376 appextra="recorder:gui"
1377 plugins="yes"
1378 swcodec="yes"
1379 toolset="$gigabeatbitmaptools mknkboot"
1380 boottool="$rootdir/tools/scramble -gigabeats"
1381 bootoutput="nk.bin"
1382 # architecture, manufacturer and model for the target-tree build
1383 t_cpu="arm"
1384 t_manufacturer="imx31"
1385 t_model="gigabeat-s"
1388 70|mrobe500)
1389 target_id=36
1390 modelname="mrobe500"
1391 target="-DMROBE_500"
1392 memory=64 # always
1393 arm926ejscc
1394 # tool="$rootdir/tools/scramble -add=m500"
1395 tool="cp "
1396 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1397 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1398 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1399 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1400 output="rockbox.mrobe500"
1401 appextra="recorder:gui"
1402 plugins="yes"
1403 swcodec="yes"
1404 toolset=$gigabeatbitmaptools
1405 boottool="cp "
1406 bootoutput="rockbox.mrboot"
1407 # architecture, manufacturer and model for the target-tree build
1408 t_cpu="arm"
1409 t_manufacturer="tms320dm320"
1410 t_model="mrobe-500"
1413 71|mrobe100)
1414 target_id=33
1415 modelname="mrobe100"
1416 target="-DMROBE_100"
1417 memory=32 # always
1418 arm7tdmicc
1419 tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1420 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1421 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1422 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1423 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1424 output="rockbox.mi4"
1425 appextra="recorder:gui"
1426 plugins="yes"
1427 swcodec="yes"
1428 boottool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1429 bootoutput="pp5020.mi4"
1430 # toolset is the tools within the tools directory that we build for
1431 # this particular target.
1432 toolset="$genericbitmaptools scramble"
1433 # architecture, manufacturer and model for the target-tree build
1434 t_cpu="arm"
1435 t_manufacturer="olympus"
1436 t_model="mrobe-100"
1439 80|logikdax)
1440 target_id=31
1441 modelname="logikdax"
1442 target="-DLOGIK_DAX"
1443 memory=2 # always
1444 arm946cc
1445 tool="$rootdir/tools/scramble -add=ldax"
1446 boottool="$rootdir/tools/scramble -tcc=crc"
1447 bootoutput="player.rom"
1448 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1449 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1450 output="rockbox.logik"
1451 appextra="recorder:gui"
1452 plugins=""
1453 swcodec="yes"
1454 # toolset is the tools within the tools directory that we build for
1455 # this particular target.
1456 toolset=$tccbitmaptools
1457 # architecture, manufacturer and model for the target-tree build
1458 t_cpu="arm"
1459 t_manufacturer="tcc77x"
1460 t_model="logikdax"
1463 90|creativezvm30gb)
1464 target_id=35
1465 modelname="creativezvm30"
1466 target="-DCREATIVE_ZVM"
1467 memory=64
1468 arm926ejscc
1469 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1470 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1471 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1472 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1473 tool="$rootdir/tools/scramble -creative=zvm"
1474 USE_ELF="yes"
1475 output="rockbox.zvm"
1476 appextra="recorder:gui"
1477 plugins=""
1478 swcodec="yes"
1479 toolset=$ipodbitmaptools
1480 boottool="$rootdir/tools/scramble -creative=zvm"
1481 bootoutput="rockbox.zvmboot"
1482 # architecture, manufacturer and model for the target-tree build
1483 t_cpu="arm"
1484 t_manufacturer="tms320dm320"
1485 t_model="creative-zvm"
1488 91|creativezvm60gb)
1489 target_id=40
1490 modelname="creativezvm60"
1491 target="-DCREATIVE_ZVM60GB"
1492 memory=64
1493 arm926ejscc
1494 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1495 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1496 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1497 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1498 tool="$rootdir/tools/scramble -creative=zvm60"
1499 USE_ELF="yes"
1500 output="rockbox.zvm60"
1501 appextra="recorder:gui"
1502 plugins=""
1503 swcodec="yes"
1504 toolset=$ipodbitmaptools
1505 boottool="$rootdir/tools/scramble -creative=zvm60"
1506 bootoutput="rockbox.zvm60boot"
1507 # architecture, manufacturer and model for the target-tree build
1508 t_cpu="arm"
1509 t_manufacturer="tms320dm320"
1510 t_model="creative-zvm"
1513 92|creativezenvision)
1514 target_id=39
1515 modelname="creativezv"
1516 target="-DCREATIVE_ZV"
1517 memory=64
1518 arm926ejscc
1519 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1520 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1521 bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
1522 bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
1523 tool="$rootdir/tools/scramble -creative=zenvision"
1524 USE_ELF="yes"
1525 output="rockbox.zv"
1526 appextra="recorder:gui"
1527 plugins=""
1528 swcodec="yes"
1529 toolset=$ipodbitmaptools
1530 boottool="$rootdir/tools/scramble -creative=zenvision"
1531 bootoutput="rockbox.zvboot"
1532 # architecture, manufacturer and model for the target-tree build
1533 t_cpu="arm"
1534 t_manufacturer="tms320dm320"
1535 t_model="creative-zvm"
1538 50|e200)
1539 target_id=23
1540 modelname="e200"
1541 target="-DSANSA_E200"
1542 memory=32 # supposedly
1543 arm7tdmicc
1544 tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1545 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1546 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1547 output="rockbox.mi4"
1548 appextra="recorder:gui"
1549 plugins="yes"
1550 swcodec="yes"
1551 boottool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1552 bootoutput="PP5022.mi4"
1553 # toolset is the tools within the tools directory that we build for
1554 # this particular target.
1555 toolset="$genericbitmaptools scramble"
1556 # architecture, manufacturer and model for the target-tree build
1557 t_cpu="arm"
1558 t_manufacturer="sandisk"
1559 t_model="sansa-e200"
1562 51|e200r)
1563 # the e200R model is pretty much identical to the e200, it only has a
1564 # different option to the scramble tool when building a bootloader and
1565 # makes the bootloader output file name in all lower case.
1566 target_id=27
1567 modelname="e200r"
1568 target="-DSANSA_E200"
1569 memory=32 # supposedly
1570 arm7tdmicc
1571 tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1572 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1573 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1574 output="rockbox.mi4"
1575 appextra="recorder:gui"
1576 plugins="yes"
1577 swcodec="yes"
1578 boottool="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
1579 bootoutput="pp5022.mi4"
1580 # toolset is the tools within the tools directory that we build for
1581 # this particular target.
1582 toolset="$genericbitmaptools scramble"
1583 # architecture, manufacturer and model for the target-tree build
1584 t_cpu="arm"
1585 t_manufacturer="sandisk"
1586 t_model="sansa-e200"
1589 52|c200)
1590 target_id=30
1591 modelname="c200"
1592 target="-DSANSA_C200"
1593 memory=32 # supposedly
1594 arm7tdmicc
1595 tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
1596 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1597 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1598 output="rockbox.mi4"
1599 appextra="recorder:gui"
1600 plugins="yes"
1601 swcodec="yes"
1602 boottool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1603 bootoutput="firmware.mi4"
1604 # toolset is the tools within the tools directory that we build for
1605 # this particular target.
1606 toolset="$genericbitmaptools scramble"
1607 # architecture, manufacturer and model for the target-tree build
1608 t_cpu="arm"
1609 t_manufacturer="sandisk"
1610 t_model="sansa-c200"
1613 53|m200)
1614 target_id=31
1615 modelname="m200"
1616 target="-DSANSA_M200"
1617 memory=2 # always
1618 arm946cc
1619 tool="$rootdir/tools/scramble -add=m200"
1620 boottool="$rootdir/tools/scramble -tcc=crc"
1621 bootoutput="player.rom"
1622 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1623 bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
1624 output="rockbox.m200"
1625 appextra="recorder:gui"
1626 plugins=""
1627 swcodec="yes"
1628 # toolset is the tools within the tools directory that we build for
1629 # this particular target.
1630 toolset=$tccbitmaptools
1631 # architecture, manufacturer and model for the target-tree build
1632 t_cpu="arm"
1633 t_manufacturer="tcc77x"
1634 t_model="m200"
1637 54|c100)
1638 target_id=42
1639 modelname="c100"
1640 target="-DSANSA_C100" # The #define used in firmware/export/config.h for conditional compilation
1641 memory=32 # how many megabytes of RAM
1642 arm946cc # Which compiler to use, see the beginning of the file
1643 tool="$rootdir/tools/scramble -add=c100" # Which command to use for creating a rockbox binary to be loaded by the bootloader
1644 boottool="$rootdir/tools/scramble -tcc=crc"
1645 bootoutput="player.rom"
1646 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" # How to create a monochrome bitmap
1647 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" # How to create a native bitmap
1648 output="rockbox.c100" # The name of the Rockbox binary file
1649 appextra="recorder:gui" # What directories in the apps/ tree to include in compilation
1650 plugins="" # Does it support plugins?
1651 toolset=$tccbitmaptools
1652 t_cpu="arm"
1653 t_manufacturer="tcc77x"
1654 t_model="c100"
1657 60|tpj1022)
1658 target_id=25
1659 modelname="tpj1022"
1660 target="-DELIO_TPJ1022"
1661 memory=32 # always
1662 arm7tdmicc
1663 tool="$rootdir/tools/scramble -add tpj2"
1664 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1665 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1666 output="rockbox.elio"
1667 appextra="recorder:gui"
1668 plugins="yes"
1669 swcodec="yes"
1670 boottool="$rootdir/tools/scramble -mi4v2"
1671 bootoutput="pp5020.mi4"
1672 # toolset is the tools within the tools directory that we build for
1673 # this particular target.
1674 toolset="$genericbitmaptools scramble"
1675 # architecture, manufacturer and model for the target-tree build
1676 t_cpu="arm"
1677 t_manufacturer="tatung"
1678 t_model="tpj1022"
1681 100|sa9200)
1682 target_id=41
1683 modelname="sa9200"
1684 target="-DPHILIPS_SA9200"
1685 memory=32 # supposedly
1686 arm7tdmicc
1687 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
1688 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1689 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1690 output="rockbox.mi4"
1691 appextra="recorder:gui"
1692 plugins=""
1693 swcodec="yes"
1694 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
1695 bootoutput="FWImage.ebn"
1696 # toolset is the tools within the tools directory that we build for
1697 # this particular target.
1698 toolset="$genericbitmaptools scramble"
1699 # architecture, manufacturer and model for the target-tree build
1700 t_cpu="arm"
1701 t_manufacturer="philips"
1702 t_model="sa9200"
1705 101|hdd1630)
1706 target_id=43
1707 modelname="hdd1630"
1708 target="-DPHILIPS_HDD1630"
1709 memory=32 # supposedly
1710 arm7tdmicc
1711 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
1712 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1713 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1714 output="rockbox.mi4"
1715 appextra="recorder:gui"
1716 plugins=""
1717 swcodec="yes"
1718 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
1719 bootoutput="FWImage.ebn"
1720 # toolset is the tools within the tools directory that we build for
1721 # this particular target.
1722 toolset="$genericbitmaptools scramble"
1723 # architecture, manufacturer and model for the target-tree build
1724 t_cpu="arm"
1725 t_manufacturer="philips"
1726 t_model="hdd1630"
1729 110|meizum6sl)
1730 target_id=20
1731 modelname="meizum6sl"
1732 target="-DMEIZU_M6SL"
1733 memory=16 # always
1734 arm940tbecc
1735 tool="cp"
1736 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1737 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1738 output="rockbox.meizu"
1739 appextra="recorder:gui"
1740 plugins="no" #FIXME
1741 swcodec="yes"
1742 toolset=$genericbitmaptools
1743 boottool="cp"
1744 bootoutput="rockboot.ebn"
1745 # architecture, manufacturer and model for the target-tree build
1746 t_cpu="arm"
1747 t_manufacturer="s5l8700"
1748 t_model="meizu-m6sl"
1751 echo "Please select a supported target platform!"
1752 exit
1755 esac
1757 echo "Platform set to $modelname"
1760 #remove start
1761 ############################################################################
1762 # Amount of memory, for those that can differ. They have $memory unset at
1763 # this point.
1766 if [ -z "$memory" ]; then
1767 case $target_id in
1769 echo "Enter size of your RAM (in MB): (Defaults to 32)"
1770 if [ "1" != `parse_args --ram` ]; then
1771 size=`parse_args --ram`;
1772 else
1773 size=`input`;
1775 case $size in
1776 60|64)
1777 memory="64"
1780 memory="32"
1782 esac
1785 echo "Enter size of your RAM (in MB): (Defaults to 2)"
1786 if [ "1" != `parse_args --ram` ]; then
1787 size=`parse_args --ram`;
1788 else
1789 size=`input`;
1791 case $size in
1793 memory="8"
1796 memory="2"
1798 esac
1800 esac
1801 echo "Memory size selected: $memory MB"
1802 echo ""
1804 #remove end
1806 ##################################################################
1807 # Figure out build "type"
1810 # the ifp7x0 is the only platform that supports building a gdb stub like
1811 # this
1812 case $modelname in
1813 ifp7xx)
1814 gdbstub="(G)DB stub, "
1816 e200r|e200)
1817 gdbstub="(I)installer, "
1821 esac
1822 if [ "1" != `parse_args --type` ]; then
1823 option=`parse_args --type`;
1824 else
1825 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, $gdbstub(M)anual: (Defaults to N)"
1826 option=`input`;
1829 case $option in
1830 [Ii])
1831 appsdir='\$(ROOTDIR)/bootloader'
1832 apps="bootloader"
1833 extradefines="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
1834 bootloader="1"
1835 echo "e200R-installer build selected"
1837 [Bb])
1838 if test $t_manufacturer = "archos"; then
1839 # Archos SH-based players do this somewhat differently for
1840 # some reason
1841 appsdir='\$(ROOTDIR)/flash/bootbox'
1842 apps="bootbox"
1843 else
1844 appsdir='\$(ROOTDIR)/bootloader'
1845 apps="bootloader"
1846 flash=""
1847 if test -n "$boottool"; then
1848 tool="$boottool"
1850 if test -n "$bootoutput"; then
1851 output=$bootoutput
1854 extradefines="-DBOOTLOADER -ffunction-sections -fdata-sections"
1855 bootloader="1"
1856 echo "Bootloader build selected"
1858 [Ss])
1859 debug="-DDEBUG"
1860 simulator="yes"
1861 extradefines="-DSIMULATOR"
1862 echo "Simulator build selected"
1864 [Aa])
1865 echo "Advanced build selected"
1866 whichadvanced
1868 [Gg])
1869 extradefines="-DSTUB" # for target makefile symbol EXTRA_DEFINES
1870 appsdir='\$(ROOTDIR)/gdb'
1871 apps="stub"
1872 case $modelname in
1873 ifp7xx)
1874 output="stub.wma"
1878 esac
1879 echo "GDB stub build selected"
1881 [Mm])
1882 toolset='';
1883 apps="manual"
1884 echo "Manual build selected"
1887 if [ "$modelname" = "e200r" ]; then
1888 echo "Do not use the e200R target for regular builds. Use e200 instead."
1889 exit
1891 debug=""
1892 echo "Normal build selected"
1895 esac
1896 # to be able running "make manual" from non-manual configuration
1897 case $modelname in
1898 fmrecorder)
1899 manualdev="recorderv2fm"
1901 recorderv2)
1902 manualdev="recorderv2fm"
1904 h1??)
1905 manualdev="h1xx"
1907 ipodmini2g)
1908 manualdev="ipodmini"
1911 manualdev=$modelname
1913 esac
1915 if [ -z "$debug" ]; then
1916 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
1919 echo "Using source code root directory: $rootdir"
1921 # this was once possible to change at build-time, but no more:
1922 language="english"
1924 uname=`uname`
1926 if [ "yes" = "$simulator" ]; then
1927 # setup compiler and things for simulator
1928 simcc
1930 if [ -d "archos" ]; then
1931 echo "sub directory archos already present"
1932 else
1933 mkdir archos
1934 echo "created an archos subdirectory for simulating the hard disk"
1938 # Now, figure out version number of the (gcc) compiler we are about to use
1939 gccver=`$CC -dumpversion`;
1941 # figure out the binutil version too and display it, mostly for the build
1942 # system etc to be able to see it easier
1943 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
1945 if [ -z "$gccver" ]; then
1946 echo "WARNING: The compiler you must use ($CC) is not in your path!"
1947 echo "WARNING: this may cause your build to fail since we cannot do the"
1948 echo "WARNING: checks we want now."
1949 else
1951 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
1952 # DEPEND on it
1954 num1=`echo $gccver | cut -d . -f1`
1955 num2=`echo $gccver | cut -d . -f2`
1956 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
1958 # This makes:
1959 # 3.3.X => 303
1960 # 3.4.X => 304
1961 # 2.95.3 => 295
1963 echo "Using $CC $gccver ($gccnum)"
1965 if test "$gccnum" -ge "400"; then
1966 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
1967 # so we ignore that warnings for now
1968 # -Wno-pointer-sign
1969 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
1972 if test "$gccnum" -ge "401"; then
1973 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
1974 # will break strict-aliasing rules"
1976 GCCOPTS="$GCCOPTS -fno-strict-aliasing"
1979 if test "$gccnum" -ge "402"; then
1980 # disable warning about "warning: initialized field overwritten" as gcc 4.2
1981 # and later would throw it for several valid cases
1982 GCCOPTS="$GCCOPTS -Wno-override-init"
1985 case $prefix in
1987 # simulator
1989 i586-mingw32msvc-)
1990 # cross-compile for win32
1993 # Verify that the cross-compiler is of a recommended version!
1994 if test "$gccver" != "$gccchoice"; then
1995 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
1996 echo "WARNING: version $gccchoice!"
1997 echo "WARNING: This may cause your build to fail since it may be a version"
1998 echo "WARNING: that isn't functional or known to not be the best choice."
1999 echo "WARNING: If you suffer from build problems, you know that this is"
2000 echo "WARNING: a likely source for them..."
2003 esac
2008 echo "Using $LD $ldver"
2010 # check the compiler for SH platforms
2011 if test "$CC" = "sh-elf-gcc"; then
2012 if test "$gccnum" -lt "400"; then
2013 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
2014 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2015 else
2016 # figure out patch status
2017 gccpatch=`$CC --version`;
2019 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
2020 echo "gcc $gccver is rockbox patched"
2021 # then convert -O to -Os to get smaller binaries!
2022 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2023 else
2024 echo "WARNING: You use an unpatched gcc compiler: $gccver"
2025 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2030 if test "$CC" = "m68k-elf-gcc"; then
2031 # convert -O to -Os to get smaller binaries!
2032 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2034 for path in $PATH
2036 # echo "checks for $file in $path" >&2
2037 if test -f "$path/$file"; then
2038 echo "$path/$file"
2039 return
2041 done
2043 if [ "1" != `parse_args --ccache` ]; then
2044 echo "Enable ccache for building"
2045 ccache="ccache"
2046 else
2047 if [ "1" = `parse_args --no-ccache` ]; then
2048 ccache=`findtool ccache`
2049 if test -n "$ccache"; then
2050 echo "Found and uses ccache ($ccache)"
2055 if test -n "$ccache"; then
2056 CC="$ccache $CC"
2059 if test "X$endian" = "Xbig"; then
2060 defendian="ROCKBOX_BIG_ENDIAN"
2061 else
2062 defendian="ROCKBOX_LITTLE_ENDIAN"
2065 sed > autoconf.h \
2066 -e "s,@ENDIAN@,${defendian},g" \
2067 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
2068 -e "s,@config_rtc@,$config_rtc,g" \
2069 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
2070 <<EOF
2071 /* This header was made by configure */
2072 #ifndef __BUILD_AUTOCONF_H
2073 #define __BUILD_AUTOCONF_H
2075 /* Define endianess for the target or simulator platform */
2076 #define @ENDIAN@ 1
2078 /* Define this if you build rockbox to support the logf logging and display */
2079 #undef ROCKBOX_HAS_LOGF
2081 /* optional defines for RTC mod for h1x0 */
2082 @config_rtc@
2083 @have_rtc_alarm@
2085 #endif /* __BUILD_AUTOCONF_H */
2088 if test -n "$t_cpu"; then
2089 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
2090 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
2091 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
2092 GCCOPTS="$GCCOPTS"
2095 if test "$simulator" = "yes"; then
2096 # add simul make stuff on the #SIMUL# line
2097 simmagic1="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
2098 simmagic2="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
2099 else
2100 # delete the lines that match
2101 simmagic1='/@SIMUL1@/D'
2102 simmagic2='/@SIMUL2@/D'
2105 if test "$swcodec" = "yes"; then
2106 voicetoolset="rbspeexenc voicefont wavtrim"
2107 else
2108 voicetoolset="voicefont wavtrim"
2111 if test "$apps" = "apps"; then
2112 # only when we build "real" apps we build the .lng files
2113 buildlangs="langs"
2116 sed > Makefile \
2117 -e "s,@ROOTDIR@,${rootdir},g" \
2118 -e "s,@DEBUG@,${debug},g" \
2119 -e "s,@MEMORY@,${memory},g" \
2120 -e "s,@TARGET_ID@,${target_id},g" \
2121 -e "s,@TARGET@,${target},g" \
2122 -e "s,@CPU@,${t_cpu},g" \
2123 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
2124 -e "s,@MODELNAME@,${modelname},g" \
2125 -e "s,@LANGUAGE@,${language},g" \
2126 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
2127 -e "s,@PWD@,${pwd},g" \
2128 -e "s,@CC@,${CC},g" \
2129 -e "s,@LD@,${LD},g" \
2130 -e "s,@AR@,${AR},g" \
2131 -e "s,@AS@,${AS},g" \
2132 -e "s,@OC@,${OC},g" \
2133 -e "s,@WINDRES@,${WINDRES},g" \
2134 -e "s,@DLLTOOL@,${DLLTOOL},g" \
2135 -e "s,@DLLWRAP@,${DLLWRAP},g" \
2136 -e "s,@RANLIB@,${RANLIB},g" \
2137 -e "s,@TOOL@,${tool},g" \
2138 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
2139 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
2140 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
2141 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
2142 -e "s,@OUTPUT@,${output},g" \
2143 -e "s,@APPEXTRA@,${appextra},g" \
2144 -e "s,@ARCHOSROM@,${archosrom},g" \
2145 -e "s,@FLASHFILE@,${flash},g" \
2146 -e "s,@PLUGINS@,${plugins},g" \
2147 -e "s,@CODECS@,${swcodec},g" \
2148 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
2149 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
2150 -e "s,@GCCOPTS@,${GCCOPTS},g" \
2151 -e "s,@TARGET_INC@,${TARGET_INC},g" \
2152 -e "s!@LDOPTS@!${LDOPTS}!g" \
2153 -e "s,@LOADADDRESS@,${loadaddress},g" \
2154 -e "s,@EXTRADEF@,${extradefines},g" \
2155 -e "s,@APPSDIR@,${appsdir},g" \
2156 -e "s,@FIRMDIR@,${firmdir},g" \
2157 -e "s,@TOOLSDIR@,${toolsdir},g" \
2158 -e "s,@APPS@,${apps},g" \
2159 -e "s,@SIMVER@,${simver},g" \
2160 -e "s,@GCCVER@,${gccver},g" \
2161 -e "s,@GCCNUM@,${gccnum},g" \
2162 -e "s,@UNAME@,${uname},g" \
2163 -e "s,@ENDIAN@,${defendian},g" \
2164 -e "s,@TOOLSET@,${toolset},g" \
2165 -e "${simmagic1}" \
2166 -e "${simmagic2}" \
2167 -e "s,@MANUALDEV@,${manualdev},g" \
2168 -e "s,@ENCODER@,${ENC_CMD},g" \
2169 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
2170 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
2171 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
2172 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
2173 -e "s,@LANGS@,${buildlangs},g" \
2174 -e "s,@USE_ELF@,${USE_ELF},g" \
2175 <<EOF
2176 ## Automatically generated. http://www.rockbox.org/
2178 ifndef V
2179 SILENT=@
2180 else
2181 VERBOSEOPT=-v
2182 endif
2184 # old 'make' versions don't have the built-in 'info' function
2185 info=old\$(shell echo >&2 "Consider upgrading to GNU make 3.81+ for optimum build performance.")
2186 ifeq (\$(call info),old)
2187 export info=echo "\$\$(1)";
2188 endif
2190 export ROOTDIR=@ROOTDIR@
2191 export FIRMDIR=@FIRMDIR@
2192 export APPSDIR=@APPSDIR@
2193 export TOOLSDIR=@TOOLSDIR@
2194 export DOCSDIR=\$(ROOTDIR)/docs
2195 export MANUALDIR=\${ROOTDIR}/manual
2196 export DEBUG=@DEBUG@
2197 export MODELNAME=@MODELNAME@
2198 export ARCHOSROM=@ARCHOSROM@
2199 export FLASHFILE=@FLASHFILE@
2200 export TARGET_ID=@TARGET_ID@
2201 export TARGET=@TARGET@
2202 export CPU=@CPU@
2203 export MANUFACTURER=@MANUFACTURER@
2204 export OBJDIR=@PWD@
2205 export BUILDDIR=@PWD@
2206 export LANGUAGE=@LANGUAGE@
2207 export VOICELANGUAGE=@VOICELANGUAGE@
2208 export MEMORYSIZE=@MEMORY@
2209 export VERSION=\$(shell \$(ROOTDIR)/tools/svnversion.sh \$(ROOTDIR))
2210 export BUILDDATE=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
2211 export MKFIRMWARE=@TOOL@
2212 export BMP2RB_MONO=@BMP2RB_MONO@
2213 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
2214 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
2215 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
2216 export BINARY=@OUTPUT@
2217 export APPEXTRA=@APPEXTRA@
2218 export ENABLEDPLUGINS=@PLUGINS@
2219 export SOFTWARECODECS=@CODECS@
2220 export EXTRA_DEFINES=@EXTRADEF@
2221 export HOSTCC=gcc
2222 export HOSTAR=ar
2223 export CC=@CC@
2224 export LD=@LD@
2225 export AR=@AR@
2226 export AS=@AS@
2227 export OC=@OC@
2228 export WINDRES=@WINDRES@
2229 export DLLTOOL=@DLLTOOL@
2230 export DLLWRAP=@DLLWRAP@
2231 export RANLIB=@RANLIB@
2232 export PROFILE_OPTS=@PROFILE_OPTS@
2233 export SIMVER=@SIMVER@
2234 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
2235 export GCCOPTS=@GCCOPTS@
2236 export TARGET_INC=@TARGET_INC@
2237 export LOADADDRESS=@LOADADDRESS@
2238 export SHARED_FLAG=@SHARED_FLAG@
2239 export LDOPTS=@LDOPTS@
2240 export GCCVER=@GCCVER@
2241 export GCCNUM=@GCCNUM@
2242 export UNAME=@UNAME@
2243 export MANUALDEV=@MANUALDEV@
2244 export TTS_OPTS=@TTS_OPTS@
2245 export TTS_ENGINE=@TTS_ENGINE@
2246 export ENC_OPTS=@ENC_OPTS@
2247 export ENCODER=@ENCODER@
2248 export USE_ELF=@USE_ELF@
2250 # Do not print "Entering directory ..."
2251 MAKEFLAGS += --no-print-directory
2253 .PHONY: all clean tags zip tools manual bin build info langs
2255 all: info
2257 info: build
2258 \$(SILENT)\$(TOOLSDIR)/mkinfo.pl \$(BUILDDIR)/rockbox-info.txt
2260 build: tools @LANGS@
2261 @SIMUL1@
2262 @SIMUL2@
2263 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
2264 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@
2266 bin: tools @LANGS@
2267 @SIMUL1@
2268 @SIMUL2@
2269 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
2270 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ \$(BUILDDIR)/\$(BINARY)
2272 rocks: tools
2273 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ rocks
2275 veryclean: clean toolsclean
2277 toolsclean:
2278 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) clean
2280 clean:
2281 \$(SILENT)echo Cleaning build directory
2282 \$(SILENT)rm -rf rockbox.zip TAGS @APPS@ firmware comsim sim lang.[ch]\
2283 manual *.pdf *.a credits.raw @OUTPUT@ bitmaps pluginbitmaps \
2284 @ARCHOSROM@ @FLASHFILE@ UI256.bmp rockbox-full.zip \
2285 html txt rockbox-manual*.zip sysfont.h rockbox-info.txt \
2286 voicefontids *.wav *.mp3 *.voice max_language_size.h
2288 tools:
2289 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @TOOLSET@
2291 voicetools:
2292 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @VOICETOOLSET@
2294 tags:
2295 \$(SILENT)rm -f TAGS
2296 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) tags
2297 \$(SILENT)\$(MAKE) -C \$(APPSDIR) tags
2298 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins tags
2299 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins/lib tags
2301 fontzip:
2302 \$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\" -r "\$(ROOTDIR)" -f 1 -o rockbox-fonts.zip \$(TARGET) \$(BINARY)
2304 zip:
2305 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
2306 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
2308 mapzip:
2309 \$(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip
2311 fullzip:
2312 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
2313 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" -f 2 -o rockbox-full.zip \$(TARGET) \$(BINARY)
2315 7zip:
2316 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
2317 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.7z" -z "7za a" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
2319 tar:
2320 \$(SILENT)rm -f rockbox.tar
2321 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
2322 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.tar" -z "tar --no-recursion -uf" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
2324 bzip2: tar
2325 \$(SILENT)bzip2 -f9 rockbox.tar
2327 gzip: tar
2328 \$(SILENT)gzip -f9 rockbox.tar
2330 langs: features
2331 \$(SILENT)mkdir -p \$(BUILDDIR)/apps/lang
2332 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/lang OBJDIR=\$(BUILDDIR)/apps/lang
2334 manual: manual-pdf
2335 manual-pdf:
2336 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-pdf
2337 manual-html:
2338 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-html
2339 manual-zhtml: manual-zip
2340 manual-txt:
2341 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt
2342 manual-ztxt:
2343 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt-zip
2344 manual-zip:
2345 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-zip
2347 features: tools
2348 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ features
2350 help:
2351 @echo "A few helpful make targets"
2352 @echo ""
2353 @echo "all - builds a full Rockbox (default), including tools"
2354 @echo "bin - builds only the Rockbox.<target name> file"
2355 @echo "rocks - builds only plugins and codecs"
2356 @echo "clean - cleans a build directory (not tools)"
2357 @echo "veryclean - cleans the build and tools directories"
2358 @echo "manual - builds a manual"
2359 @echo "manual-html - HTML manual"
2360 @echo "manual-zip - HTML manual (zipped)"
2361 @echo "manual-txt - txt manual"
2362 @echo "fullzip - creates a rockbox.zip of your build with fonts"
2363 @echo "zip - creates a rockbox.zip of your build (no fonts)"
2364 @echo "gzip - creates a rockbox.tar.gz of your build (no fonts)"
2365 @echo "bzip2 - creates a rockbox.tar.bz2 of your build (no fonts)"
2366 @echo "7zip - creates a rockbox.7z of your build (no fonts)"
2367 @echo "fontzip - creates rockbox-fonts.zip"
2368 @echo "mapzip - creates rockbox-maps.zip with all .map files"
2369 @echo "tools - builds the tools only"
2370 @echo "voicetools - builds the voice tools only"
2371 @echo "install - installs your build (for simulator builds only)"
2375 if [ "yes" = "$simulator" ]; then
2377 cat >> Makefile <<EOF
2379 install:
2380 @echo "installing a full setup in your archos dir"
2381 @(\$(MAKE) fullzip && cd archos && unzip -oq ../rockbox-full.zip)
2386 if [ "yes" = "$voice" ]; then
2388 cat >> Makefile <<EOF
2390 voice: voicetools features
2391 \$(SILENT)for f in \`cat \$(BUILDDIR)/${apps}/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
2392 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 \\
2397 echo "Created Makefile"