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