fix building on w32.
[Rockbox.git] / tools / configure
blob3d9afdbfda394384713962d9cf8d7576b3e3d3e1
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 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 54) Sansa c100
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 101) GoGear HDD1630
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 54|c100)
1632 target_id=42
1633 modelname="c100"
1634 target="-DSANSA_C100" # The #define used in firmware/export/config.h for conditional compilation
1635 memory=32 # how many megabytes of RAM
1636 arm946cc # Which compiler to use, see the beginning of the file
1637 tool="$rootdir/tools/scramble -add=c100" # Which command to use for creating a rockbox binary to be loaded by the bootloader
1638 boottool="$rootdir/tools/scramble -tcc=crc"
1639 bootoutput="player.rom"
1640 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" # How to create a monochrome bitmap
1641 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" # How to create a native bitmap
1642 output="rockbox.c100" # The name of the Rockbox binary file
1643 appextra="recorder:gui" # What directories in the apps/ tree to include in compilation
1644 plugins="" # Does it support plugins?
1645 toolset=$tccbitmaptools
1646 t_cpu="arm"
1647 t_manufacturer="tcc77x"
1648 t_model="c100"
1651 60|tpj1022)
1652 target_id=25
1653 modelname="tpj1022"
1654 target="-DELIO_TPJ1022"
1655 memory=32 # always
1656 arm7tdmicc
1657 tool="$rootdir/tools/scramble -add tpj2"
1658 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1659 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
1660 output="rockbox.elio"
1661 appextra="recorder:gui"
1662 plugins="yes"
1663 swcodec="yes"
1664 boottool="$rootdir/tools/scramble -mi4v2"
1665 bootoutput="pp5020.mi4"
1666 # toolset is the tools within the tools directory that we build for
1667 # this particular target.
1668 toolset="$genericbitmaptools scramble"
1669 # architecture, manufacturer and model for the target-tree build
1670 t_cpu="arm"
1671 t_manufacturer="tatung"
1672 t_model="tpj1022"
1675 100|sa9200)
1676 target_id=41
1677 modelname="sa9200"
1678 target="-DPHILIPS_SA9200"
1679 memory=32 # supposedly
1680 arm7tdmicc
1681 tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS"
1682 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1683 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1684 output="rockbox.mi4"
1685 appextra="recorder:gui"
1686 plugins=""
1687 swcodec="yes"
1688 boottool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBBL"
1689 bootoutput="FWImage.ebn"
1690 # toolset is the tools within the tools directory that we build for
1691 # this particular target.
1692 toolset="$genericbitmaptools scramble"
1693 # architecture, manufacturer and model for the target-tree build
1694 t_cpu="arm"
1695 t_manufacturer="philips"
1696 t_model="sa9200"
1699 101|hdd1630)
1700 target_id=43
1701 modelname="hdd1630"
1702 target="-DPHILIPS_HDD1630"
1703 memory=32 # supposedly
1704 arm7tdmicc
1705 tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS"
1706 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1707 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
1708 output="rockbox.mi4"
1709 appextra="recorder:gui"
1710 plugins=""
1711 swcodec="yes"
1712 boottool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBBL"
1713 bootoutput="FWImage.ebn"
1714 # toolset is the tools within the tools directory that we build for
1715 # this particular target.
1716 toolset="$genericbitmaptools scramble"
1717 # architecture, manufacturer and model for the target-tree build
1718 t_cpu="arm"
1719 t_manufacturer="philips"
1720 t_model="hdd1630"
1724 echo "Please select a supported target platform!"
1725 exit
1728 esac
1730 echo "Platform set to $modelname"
1733 #remove start
1734 ############################################################################
1735 # Amount of memory, for those that can differ. They have $memory unset at
1736 # this point.
1739 if [ -z "$memory" ]; then
1740 case $target_id in
1742 echo "Enter size of your RAM (in MB): (Defaults to 32)"
1743 if [ "1" != `parse_args --ram` ]; then
1744 size=`parse_args --ram`;
1745 else
1746 size=`input`;
1748 case $size in
1749 60|64)
1750 memory="64"
1753 memory="32"
1755 esac
1758 echo "Enter size of your RAM (in MB): (Defaults to 2)"
1759 if [ "1" != `parse_args --ram` ]; then
1760 size=`parse_args --ram`;
1761 else
1762 size=`input`;
1764 case $size in
1766 memory="8"
1769 memory="2"
1771 esac
1773 esac
1774 echo "Memory size selected: $memory MB"
1775 echo ""
1777 #remove end
1779 ##################################################################
1780 # Figure out build "type"
1783 # the ifp7x0 is the only platform that supports building a gdb stub like
1784 # this
1785 case $modelname in
1786 ifp7xx)
1787 gdbstub="(G)DB stub, "
1789 e200r|e200)
1790 gdbstub="(I)installer, "
1794 esac
1795 if [ "1" != `parse_args --type` ]; then
1796 option=`parse_args --type`;
1797 else
1798 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, $gdbstub(M)anual: (Defaults to N)"
1799 option=`input`;
1802 case $option in
1803 [Ii])
1804 appsdir='\$(ROOTDIR)/bootloader'
1805 apps="bootloader"
1806 extradefines="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
1807 bootloader="1"
1808 echo "e200R-installer build selected"
1810 [Bb])
1811 if test $t_manufacturer = "archos"; then
1812 # Archos SH-based players do this somewhat differently for
1813 # some reason
1814 appsdir='\$(ROOTDIR)/flash/bootbox'
1815 apps="bootbox"
1816 else
1817 appsdir='\$(ROOTDIR)/bootloader'
1818 apps="bootloader"
1819 flash=""
1820 if test -n "$boottool"; then
1821 tool="$boottool"
1823 if test -n "$bootoutput"; then
1824 output=$bootoutput
1827 extradefines="-DBOOTLOADER -ffunction-sections -fdata-sections"
1828 bootloader="1"
1829 echo "Bootloader build selected"
1831 [Ss])
1832 debug="-DDEBUG"
1833 simulator="yes"
1834 extradefines="-DSIMULATOR"
1835 echo "Simulator build selected"
1837 [Aa])
1838 echo "Advanced build selected"
1839 whichadvanced
1841 [Gg])
1842 extradefines="-DSTUB" # for target makefile symbol EXTRA_DEFINES
1843 appsdir='\$(ROOTDIR)/gdb'
1844 apps="stub"
1845 case $modelname in
1846 ifp7xx)
1847 output="stub.wma"
1851 esac
1852 echo "GDB stub build selected"
1854 [Mm])
1855 toolset='';
1856 apps="manual"
1857 echo "Manual build selected"
1860 if [ "$modelname" = "e200r" ]; then
1861 echo "Do not use the e200R target for regular builds. Use e200 instead."
1862 exit
1864 debug=""
1865 echo "Normal build selected"
1868 esac
1869 # to be able running "make manual" from non-manual configuration
1870 case $modelname in
1871 fmrecorder)
1872 manualdev="recorderv2fm"
1874 recorderv2)
1875 manualdev="recorderv2fm"
1877 h1??)
1878 manualdev="h1xx"
1880 ipodmini2g)
1881 manualdev="ipodmini"
1884 manualdev=$modelname
1886 esac
1888 if [ -z "$debug" ]; then
1889 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
1892 echo "Using source code root directory: $rootdir"
1894 # this was once possible to change at build-time, but no more:
1895 language="english"
1897 uname=`uname`
1899 if [ "yes" = "$simulator" ]; then
1900 # setup compiler and things for simulator
1901 simcc
1903 if [ -d "archos" ]; then
1904 echo "sub directory archos already present"
1905 else
1906 mkdir archos
1907 echo "created an archos subdirectory for simulating the hard disk"
1911 # Now, figure out version number of the (gcc) compiler we are about to use
1912 gccver=`$CC -dumpversion`;
1914 # figure out the binutil version too and display it, mostly for the build
1915 # system etc to be able to see it easier
1916 ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
1918 if [ -z "$gccver" ]; then
1919 echo "WARNING: The compiler you must use ($CC) is not in your path!"
1920 echo "WARNING: this may cause your build to fail since we cannot do the"
1921 echo "WARNING: checks we want now."
1922 else
1924 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
1925 # DEPEND on it
1927 num1=`echo $gccver | cut -d . -f1`
1928 num2=`echo $gccver | cut -d . -f2`
1929 gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
1931 # This makes:
1932 # 3.3.X => 303
1933 # 3.4.X => 304
1934 # 2.95.3 => 295
1936 echo "Using $CC $gccver ($gccnum)"
1938 if test "$gccnum" -ge "400"; then
1939 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
1940 # so we ignore that warnings for now
1941 # -Wno-pointer-sign
1942 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
1945 if test "$gccnum" -ge "401"; then
1946 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
1947 # will break strict-aliasing rules"
1949 GCCOPTS="$GCCOPTS -fno-strict-aliasing"
1952 if test "$gccnum" -ge "402"; then
1953 # disable warning about "warning: initialized field overwritten" as gcc 4.2
1954 # and later would throw it for several valid cases
1955 GCCOPTS="$GCCOPTS -Wno-override-init"
1958 case $prefix in
1960 # simulator
1962 i586-mingw32msvc-)
1963 # cross-compile for win32
1966 # Verify that the cross-compiler is of a recommended version!
1967 if test "$gccver" != "$gccchoice"; then
1968 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
1969 echo "WARNING: version $gccchoice!"
1970 echo "WARNING: This may cause your build to fail since it may be a version"
1971 echo "WARNING: that isn't functional or known to not be the best choice."
1972 echo "WARNING: If you suffer from build problems, you know that this is"
1973 echo "WARNING: a likely source for them..."
1976 esac
1981 echo "Using $LD $ldver"
1983 # check the compiler for SH platforms
1984 if test "$CC" = "sh-elf-gcc"; then
1985 if test "$gccnum" -lt "400"; then
1986 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
1987 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
1988 else
1989 # figure out patch status
1990 gccpatch=`$CC --version`;
1992 if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
1993 echo "gcc $gccver is rockbox patched"
1994 # then convert -O to -Os to get smaller binaries!
1995 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
1996 else
1997 echo "WARNING: You use an unpatched gcc compiler: $gccver"
1998 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
2003 if test "$CC" = "m68k-elf-gcc"; then
2004 # convert -O to -Os to get smaller binaries!
2005 GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
2007 for path in $PATH
2009 # echo "checks for $file in $path" >&2
2010 if test -f "$path/$file"; then
2011 echo "$path/$file"
2012 return
2014 done
2016 if [ "1" != `parse_args --ccache` ]; then
2017 echo "Enable ccache for building"
2018 ccache="ccache"
2019 else
2020 if [ "1" = `parse_args --no-ccache` ]; then
2021 ccache=`findtool ccache`
2022 if test -n "$ccache"; then
2023 echo "Found and uses ccache ($ccache)"
2028 if test -n "$ccache"; then
2029 CC="$ccache $CC"
2032 if test "X$endian" = "Xbig"; then
2033 defendian="ROCKBOX_BIG_ENDIAN"
2034 else
2035 defendian="ROCKBOX_LITTLE_ENDIAN"
2038 sed > autoconf.h \
2039 -e "s,@ENDIAN@,${defendian},g" \
2040 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
2041 -e "s,@config_rtc@,$config_rtc,g" \
2042 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
2043 <<EOF
2044 /* This header was made by configure */
2045 #ifndef __BUILD_AUTOCONF_H
2046 #define __BUILD_AUTOCONF_H
2048 /* Define endianess for the target or simulator platform */
2049 #define @ENDIAN@ 1
2051 /* Define this if you build rockbox to support the logf logging and display */
2052 #undef ROCKBOX_HAS_LOGF
2054 /* optional defines for RTC mod for h1x0 */
2055 @config_rtc@
2056 @have_rtc_alarm@
2058 #endif /* __BUILD_AUTOCONF_H */
2061 if test -n "$t_cpu"; then
2062 TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
2063 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
2064 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
2065 GCCOPTS="$GCCOPTS"
2068 if test "$simulator" = "yes"; then
2069 # add simul make stuff on the #SIMUL# line
2070 simmagic1="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
2071 simmagic2="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
2072 else
2073 # delete the lines that match
2074 simmagic1='/@SIMUL1@/D'
2075 simmagic2='/@SIMUL2@/D'
2078 if test "$swcodec" = "yes"; then
2079 voicetoolset="rbspeexenc voicefont wavtrim"
2080 else
2081 voicetoolset="voicefont wavtrim"
2084 if test "$apps" = "apps"; then
2085 # only when we build "real" apps we build the .lng files
2086 buildlangs="langs"
2089 sed > Makefile \
2090 -e "s,@ROOTDIR@,${rootdir},g" \
2091 -e "s,@DEBUG@,${debug},g" \
2092 -e "s,@MEMORY@,${memory},g" \
2093 -e "s,@TARGET_ID@,${target_id},g" \
2094 -e "s,@TARGET@,${target},g" \
2095 -e "s,@CPU@,${t_cpu},g" \
2096 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
2097 -e "s,@MODELNAME@,${modelname},g" \
2098 -e "s,@LANGUAGE@,${language},g" \
2099 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
2100 -e "s,@PWD@,${pwd},g" \
2101 -e "s,@CC@,${CC},g" \
2102 -e "s,@LD@,${LD},g" \
2103 -e "s,@AR@,${AR},g" \
2104 -e "s,@AS@,${AS},g" \
2105 -e "s,@OC@,${OC},g" \
2106 -e "s,@WINDRES@,${WINDRES},g" \
2107 -e "s,@DLLTOOL@,${DLLTOOL},g" \
2108 -e "s,@DLLWRAP@,${DLLWRAP},g" \
2109 -e "s,@RANLIB@,${RANLIB},g" \
2110 -e "s,@TOOL@,${tool},g" \
2111 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
2112 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
2113 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
2114 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
2115 -e "s,@OUTPUT@,${output},g" \
2116 -e "s,@APPEXTRA@,${appextra},g" \
2117 -e "s,@ARCHOSROM@,${archosrom},g" \
2118 -e "s,@FLASHFILE@,${flash},g" \
2119 -e "s,@PLUGINS@,${plugins},g" \
2120 -e "s,@CODECS@,${swcodec},g" \
2121 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
2122 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
2123 -e "s,@GCCOPTS@,${GCCOPTS},g" \
2124 -e "s,@TARGET_INC@,${TARGET_INC},g" \
2125 -e "s!@LDOPTS@!${LDOPTS}!g" \
2126 -e "s,@LOADADDRESS@,${loadaddress},g" \
2127 -e "s,@EXTRADEF@,${extradefines},g" \
2128 -e "s,@APPSDIR@,${appsdir},g" \
2129 -e "s,@FIRMDIR@,${firmdir},g" \
2130 -e "s,@TOOLSDIR@,${toolsdir},g" \
2131 -e "s,@APPS@,${apps},g" \
2132 -e "s,@SIMVER@,${simver},g" \
2133 -e "s,@GCCVER@,${gccver},g" \
2134 -e "s,@GCCNUM@,${gccnum},g" \
2135 -e "s,@UNAME@,${uname},g" \
2136 -e "s,@ENDIAN@,${defendian},g" \
2137 -e "s,@TOOLSET@,${toolset},g" \
2138 -e "${simmagic1}" \
2139 -e "${simmagic2}" \
2140 -e "s,@MANUALDEV@,${manualdev},g" \
2141 -e "s,@ENCODER@,${ENC_CMD},g" \
2142 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
2143 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
2144 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
2145 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
2146 -e "s,@LANGS@,${buildlangs},g" \
2147 -e "s,@USE_ELF@,${USE_ELF},g" \
2148 <<EOF
2149 ## Automatically generated. http://www.rockbox.org/
2151 ifndef V
2152 SILENT=@
2153 else
2154 VERBOSEOPT=-v
2155 endif
2157 # old 'make' versions don't have the built-in 'info' function
2158 info=old\$(shell echo >&2 "Consider upgrading to GNU make 3.81+ for optimum build performance.")
2159 ifeq (\$(call info),old)
2160 export info=echo "\$\$(1)";
2161 endif
2163 export ROOTDIR=@ROOTDIR@
2164 export FIRMDIR=@FIRMDIR@
2165 export APPSDIR=@APPSDIR@
2166 export TOOLSDIR=@TOOLSDIR@
2167 export DOCSDIR=\$(ROOTDIR)/docs
2168 export MANUALDIR=\${ROOTDIR}/manual
2169 export DEBUG=@DEBUG@
2170 export MODELNAME=@MODELNAME@
2171 export ARCHOSROM=@ARCHOSROM@
2172 export FLASHFILE=@FLASHFILE@
2173 export TARGET_ID=@TARGET_ID@
2174 export TARGET=@TARGET@
2175 export CPU=@CPU@
2176 export MANUFACTURER=@MANUFACTURER@
2177 export OBJDIR=@PWD@
2178 export BUILDDIR=@PWD@
2179 export LANGUAGE=@LANGUAGE@
2180 export VOICELANGUAGE=@VOICELANGUAGE@
2181 export MEMORYSIZE=@MEMORY@
2182 export VERSION=\$(shell \$(ROOTDIR)/tools/svnversion.sh \$(ROOTDIR))
2183 export BUILDDATE=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
2184 export MKFIRMWARE=@TOOL@
2185 export BMP2RB_MONO=@BMP2RB_MONO@
2186 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
2187 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
2188 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
2189 export BINARY=@OUTPUT@
2190 export APPEXTRA=@APPEXTRA@
2191 export ENABLEDPLUGINS=@PLUGINS@
2192 export SOFTWARECODECS=@CODECS@
2193 export EXTRA_DEFINES=@EXTRADEF@
2194 export HOSTCC=gcc
2195 export HOSTAR=ar
2196 export CC=@CC@
2197 export LD=@LD@
2198 export AR=@AR@
2199 export AS=@AS@
2200 export OC=@OC@
2201 export WINDRES=@WINDRES@
2202 export DLLTOOL=@DLLTOOL@
2203 export DLLWRAP=@DLLWRAP@
2204 export RANLIB=@RANLIB@
2205 export PROFILE_OPTS=@PROFILE_OPTS@
2206 export SIMVER=@SIMVER@
2207 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
2208 export GCCOPTS=@GCCOPTS@
2209 export TARGET_INC=@TARGET_INC@
2210 export LOADADDRESS=@LOADADDRESS@
2211 export SHARED_FLAG=@SHARED_FLAG@
2212 export LDOPTS=@LDOPTS@
2213 export GCCVER=@GCCVER@
2214 export GCCNUM=@GCCNUM@
2215 export UNAME=@UNAME@
2216 export MANUALDEV=@MANUALDEV@
2217 export TTS_OPTS=@TTS_OPTS@
2218 export TTS_ENGINE=@TTS_ENGINE@
2219 export ENC_OPTS=@ENC_OPTS@
2220 export ENCODER=@ENCODER@
2221 export USE_ELF=@USE_ELF@
2223 # Do not print "Entering directory ..."
2224 MAKEFLAGS += --no-print-directory
2226 .PHONY: all clean tags zip tools manual bin build info langs
2228 all: info
2230 info: build
2231 \$(SILENT)\$(TOOLSDIR)/mkinfo.pl \$(BUILDDIR)/rockbox-info.txt
2233 build: tools @LANGS@
2234 @SIMUL1@
2235 @SIMUL2@
2236 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
2237 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@
2239 bin: tools @LANGS@
2240 @SIMUL1@
2241 @SIMUL2@
2242 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
2243 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ \$(BUILDDIR)/\$(BINARY)
2245 rocks: tools
2246 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ rocks
2248 veryclean: clean toolsclean
2250 toolsclean:
2251 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) clean
2253 clean:
2254 \$(SILENT)echo Cleaning build directory
2255 \$(SILENT)rm -rf rockbox.zip TAGS @APPS@ firmware comsim sim lang.[ch]\
2256 manual *.pdf *.a credits.raw @OUTPUT@ bitmaps pluginbitmaps \
2257 @ARCHOSROM@ @FLASHFILE@ UI256.bmp rockbox-full.zip \
2258 html txt rockbox-manual*.zip sysfont.h rockbox-info.txt \
2259 voicefontids *.wav *.mp3 *.voice max_language_size.h
2261 tools:
2262 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @TOOLSET@
2264 voicetools:
2265 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @VOICETOOLSET@
2267 tags:
2268 \$(SILENT)rm -f TAGS
2269 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) tags
2270 \$(SILENT)\$(MAKE) -C \$(APPSDIR) tags
2271 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins tags
2272 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins/lib tags
2274 fontzip:
2275 \$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\" -r "\$(ROOTDIR)" -f 1 -o rockbox-fonts.zip \$(TARGET) \$(BINARY)
2277 zip:
2278 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
2279 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
2281 mapzip:
2282 \$(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip
2284 fullzip:
2285 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
2286 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" -f 2 -o rockbox-full.zip \$(TARGET) \$(BINARY)
2288 7zip:
2289 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
2290 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.7z" -z "7za a" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
2292 tar:
2293 \$(SILENT)rm -f rockbox.tar
2294 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
2295 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.tar" -z "tar --no-recursion -uf" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
2297 bzip2: tar
2298 \$(SILENT)bzip2 -f9 rockbox.tar
2300 gzip: tar
2301 \$(SILENT)gzip -f9 rockbox.tar
2303 langs: features
2304 \$(SILENT)mkdir -p \$(BUILDDIR)/apps/lang
2305 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/lang OBJDIR=\$(BUILDDIR)/apps/lang
2307 manual: manual-pdf
2308 manual-pdf:
2309 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-pdf
2310 manual-html:
2311 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-html
2312 manual-zhtml: manual-zip
2313 manual-txt:
2314 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt
2315 manual-ztxt:
2316 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt-zip
2317 manual-zip:
2318 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-zip
2320 features: tools
2321 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ features
2323 help:
2324 @echo "A few helpful make targets"
2325 @echo ""
2326 @echo "all - builds a full Rockbox (default), including tools"
2327 @echo "bin - builds only the Rockbox.<target name> file"
2328 @echo "rocks - builds only plugins and codecs"
2329 @echo "clean - cleans a build directory (not tools)"
2330 @echo "veryclean - cleans the build and tools directories"
2331 @echo "manual - builds a manual"
2332 @echo "manual-html - HTML manual"
2333 @echo "manual-zip - HTML manual (zipped)"
2334 @echo "manual-txt - txt manual"
2335 @echo "fullzip - creates a rockbox.zip of your build with fonts"
2336 @echo "zip - creates a rockbox.zip of your build (no fonts)"
2337 @echo "gzip - creates a rockbox.tar.gz of your build (no fonts)"
2338 @echo "bzip2 - creates a rockbox.tar.bz2 of your build (no fonts)"
2339 @echo "7zip - creates a rockbox.7z of your build (no fonts)"
2340 @echo "fontzip - creates rockbox-fonts.zip"
2341 @echo "mapzip - creates rockbox-maps.zip with all .map files"
2342 @echo "tools - builds the tools only"
2343 @echo "voicetools - builds the voice tools only"
2344 @echo "install - installs your build (for simulator builds only)"
2348 if [ "yes" = "$simulator" ]; then
2350 cat >> Makefile <<EOF
2352 install:
2353 @echo "installing a full setup in your archos dir"
2354 @(\$(MAKE) fullzip && cd archos && unzip -oq ../rockbox-full.zip)
2359 if [ "yes" = "$voice" ]; then
2361 cat >> Makefile <<EOF
2363 voice: voicetools features
2364 \$(SILENT)for f in \`cat \$(BUILDDIR)/${apps}/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
2365 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 \\
2370 echo "Created Makefile"