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