3 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
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
29 WINDRES
=${prefix}windres
30 DLLTOOL
=${prefix}dlltool
31 DLLWRAP
=${prefix}dllwrap
32 RANLIB
=${prefix}ranlib
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
51 endian
="little" # windows is little endian
54 # scan the $PATH for the given command
61 # echo "checks for $file in $path" >&2
62 if test -f "$path/$file"; then
72 # default tool setup for native building
76 GCCOPTS
='-W -Wall -g -fno-builtin'
78 output
="rockboxui" # use this as default output binary name
80 # generic sdl-config checker
81 sdl
=`findtool sdl-config`
83 if [ -z "$sdl" ]; then
84 echo "configure didn't find sdl-config, which indicates that you"
85 echo "don't have SDL (properly) installed. Please correct and"
86 echo "re-run configure!"
90 # default share option, override below if needed
95 echo "Cygwin host detected"
98 GCCOPTS
="$GCCOPTS `sdl-config --cflags`"
99 LDOPTS
="`sdl-config --libs` -mconsole"
101 output
="rockboxui.exe" # use this as output binary name
105 echo "Linux host detected"
107 if [ "0" != `sdl-config --libs |grep -c mwindows` ]; then
108 # Enable crosscompiling if sdl-config is from Windows SDL
111 GCCOPTS
="$GCCOPTS `sdl-config --cflags`"
112 LDOPTS
="`sdl-config --libs`"
116 echo "FreeBSD host detected"
118 GCCOPTS
="$GCCOPTS `sdl-config --cflags`"
119 LDOPTS
="`sdl-config --libs`"
123 echo "Darwin host detected"
125 GCCOPTS
="$GCCOPTS `sdl-config --cflags`"
126 LDOPTS
="`sdl-config --libs`"
127 SHARED_FLAG
="-dynamiclib -Wl\,-single_module"
131 echo "Unsupported system: $uname, fix configure and retry"
136 if [ "`uname -m`" = "x86_64" ] ||
[ "`uname -m`" = "amd64" ]; then
137 # fPIC is needed to make shared objects link
138 # setting visibility to hidden is necessary to avoid strange crashes
139 # due to symbol clashing
140 GCCOPTS
="$GCCOPTS -fPIC -fvisibility=hidden"
143 GCCOPTS
="$GCCOPTS -I\$(SIMDIR)"
145 if test "X$crosscompile" != "Xyes"; then
147 cat >/tmp
/conftest-
$id.c
<<EOF
149 int main(int argc, char **argv)
152 char *varp = (char *)&var;
160 $CC -o /tmp
/conftest-
$id /tmp
/conftest-
$id.c
2>/dev
/null
162 if test `/tmp/conftest-$id 2>/dev/null` -gt "1"; then
169 echo "Simulator environment deemed $endian endian"
171 # use wildcard here to make it work even if it was named *.exe like
173 rm -f /tmp
/conftest-
$id*
179 GCCOPTS
="$CCOPTS -m1"
180 GCCOPTIMIZE
="-fomit-frame-pointer -fschedule-insns"
185 prefixtools calmrisc16-unknown-elf-
186 GCCOPTS
="-Wl\,--no-check-sections $CCOPTS"
187 GCCOPTIMIZE
="-fomit-frame-pointer"
192 prefixtools m68k-elf-
193 GCCOPTS
="$CCOPTS -m5206e -Wa\,-m5249 -malign-int -mstrict-align"
194 GCCOPTIMIZE
="-fomit-frame-pointer"
200 GCCOPTS
="$CCOPTS -mcpu=arm7tdmi"
201 if test "X$1" != "Xshort"; then
202 GCCOPTS
="$GCCOPTS -mlong-calls"
204 GCCOPTIMIZE
="-fomit-frame-pointer"
210 GCCOPTS
="$CCOPTS -mcpu=arm9tdmi -mlong-calls"
211 GCCOPTIMIZE
="-fomit-frame-pointer"
217 GCCOPTS
="$CCOPTS -mcpu=arm9e -mlong-calls"
218 GCCOPTIMIZE
="-fomit-frame-pointer"
224 GCCOPTS
="$CCOPTS -mcpu=arm926ej-s -mlong-calls"
225 GCCOPTIMIZE
="-fomit-frame-pointer"
230 ##################################################################
231 # Prompt for specific developer options
234 echo "Enter your developer options (press enter when done)"
235 echo -n "(D)EBUG, (L)ogf, (S)imulator, (P)rofiling, (V)oice"
236 if [ "$memory" = "2" ]; then
237 echo -n ", (8)MB MOD"
239 if [ "$archos" = "h120" ]; then
240 echo -n ", (R)TC MOD"
246 while [ $cont = "1" ]; do
252 if [ "yes" = "$profile" ]; then
253 echo "Debug is incompatible with profiling"
260 echo "logf() support enabled"
264 echo "Simulator build enabled"
268 if [ "yes" = "$use_debug" ]; then
269 echo "Profiling is incompatible with debug"
271 echo "Profiling support is enabled"
276 echo "Voice build selected"
280 if [ "$memory" = "2" ]; then
282 echo "Memory size selected: 8MB"
288 if [ "$archos" = "h120" ]; then
289 config_rtc
="#define CONFIG_RTC RTC_DS1339_DS3231"
290 have_rtc_alarm
="#define HAVE_RTC_ALARM"
291 echo "RTC functions enabled (DS1339/DS3231)"
303 if [ "yes" = "$voice" ]; then
304 # Ask about languages to build
305 echo "Select a number for the language to use (default is english)"
306 # The multiple-language feature is currently broken
307 # echo "You may enter a comma-separated list of languages to build"
310 voicelanguage
=`whichlang`
312 if [ -z "$voicelanguage" ]; then
314 voicelanguage
="english"
316 echo "Voice language set to $voicelanguage"
318 # Configure encoder and TTS engine for each language
319 for thislang
in `echo $voicelanguage | sed 's/,/ /g'`; do
320 voiceconfig
"$thislang"
323 if [ "yes" = "$use_debug" ]; then
325 GCCOPTS
="$GCCOPTS -g -DDEBUG"
327 if [ "yes" = "$logf" ]; then
328 use_logf
="#define ROCKBOX_HAS_LOGF 1"
330 if [ "yes" = "$simulator" ]; then
332 extradefines
="$extradefines -DSIMULATOR"
334 if [ "yes" = "$profile" ]; then
335 extradefines
="$extradefines -DRB_PROFILE"
336 PROFILE_OPTS
="-finstrument-functions"
340 # Configure voice settings
343 echo "Building $thislang voice for $archos. Select options"
346 if [ -f "`which flite`" ]; then
350 DEFAULT_TTS_OPTS
=$FLITE_OPTS
351 DEFAULT_NOISEFLOOR
="500"
354 if [ -f "`which espeak`" ]; then
358 DEFAULT_TTS_OPTS
=$ESPEAK_OPTS
359 DEFAULT_NOISEFLOOR
="500"
362 if [ -f "`which festival`" ]; then
363 FESTIVAL
="(F)estival "
366 FESTIVAL_OPTS
="--language italian"
369 FESTIVAL_OPTS
="--language spanish"
372 FESTIVAL_OPTS
="--language finnish"
375 FESTIVAL_OPTS
="--language czech"
381 DEFAULT_TTS
="festival"
382 DEFAULT_TTS_OPTS
=$FESTIVAL_OPTS
383 DEFAULT_NOISEFLOOR
="500"
386 if [ -f "`which swift`" ]; then
390 DEFAULT_TTS_OPTS
=$SWIFT_OPTS
391 DEFAULT_NOISEFLOOR
="500"
394 # Allow SAPI if Windows is in use
395 if [ -f "`which winver`" ]; then
399 DEFAULT_TTS_OPTS
=$SAPI_OPTS
400 DEFAULT_NOISEFLOOR
="500"
404 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
405 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
409 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
414 NOISEFLOOR
="500" # TODO: check this value
420 TTS_OPTS
=$ESPEAK_OPTS
423 TTS_ENGINE
="festival"
425 TTS_OPTS
=$FESTIVAL_OPTS
438 TTS_ENGINE
=$DEFAULT_TTS
439 TTS_OPTS
=$DEFAULT_TTS_OPTS
440 NOISEFLOOR
=$DEFAULT_NOISEFLOOR
442 echo "Using $TTS_ENGINE for TTS"
444 # Allow the user to input manual commandline options
445 printf "Enter $TTS_ENGINE options (enter for defaults \"$TTS_OPTS\"): "
446 USER_TTS_OPTS
=`input`
447 if [ -n "$USER_TTS_OPTS" ]; then
448 TTS_OPTS
="$USER_TTS_OPTS"
453 if [ "$swcodec" = "yes" ]; then
456 ENC_OPTS
="-q 4 -c 10"
458 if [ -f "`which lame`" ]; then
461 ENC_OPTS
="--resample 12 -t -m m -h -V 9 -S -B 64 --vbr-new"
463 echo "You need LAME in the system path to build voice files for"
464 echo "HWCODEC targets."
469 echo "Using $ENCODER for encoding voice clips"
471 # Allow the user to input manual commandline options
472 printf "Enter $ENCODER options (enter for defaults \"$ENC_OPTS\"): "
473 USER_ENC_OPTS
=`input`
474 if [ -n "$USER_ENC_OPTS" ]; then
475 ENC_OPTS
=$USER_ENC_OPTS
479 if [ -f "`which cygpath`" ]; then
480 TEMPDIR
=`cygpath . -a -w`
485 # figure out which languages that are around
486 for file in $rootdir/apps
/lang
/*.lang
; do
487 clean
=`echo $file | sed -e 's:.*/::g' | cut "-d." -f1`
488 langs
="$langs $clean"
492 for one
in $langs; do
502 # Allow the user to pass a comma-separated list of langauges
503 for thispick
in `echo $pick | sed 's/,/ /g'`; do
505 for one
in $langs; do
506 # Accept both the language number and name
507 if [ "$num" = "$thispick" ] ||
[ "$thispick" = "$one" ]; then
508 if [ "$output" = "" ]; then
522 if test "$opt" = "--help"; then
523 echo "Rockbox configure script."
524 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
525 echo "Do *NOT* run this within the tools directory!"
527 echo "Usage: configure [--ccache][--no-ccache]"
531 if test -r "configure"; then
532 # this is a check for a configure script in the current directory, it there
533 # is one, try to figure out if it is this one!
535 if { grep "^# Jukebox" configure
>/dev
/null
2>&1 ; } then
536 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
537 echo "It will only cause you pain and grief. Instead do this:"
540 echo " mkdir build-dir"
542 echo " ../tools/configure"
544 echo "Much happiness will arise from this. Enjoy"
549 # get our current directory
552 if { echo $pwd |
grep " "; } then
553 echo "You're running this script in a path that contains space. The build"
554 echo "system is unfortunately not clever enough to deal with this. Please"
555 echo "run the script from a different path, rename the path or fix the build"
560 if [ -z "$rootdir" ]; then
561 ##################################################################
562 # Figure out where the source code root is!
564 rootdir
=`dirname $0`/..
/
566 #####################################################################
567 # Convert the possibly relative directory name to an absolute version
573 # cd back to the build dir
578 appsdir
='\$(ROOTDIR)/apps'
579 firmdir
='\$(ROOTDIR)/firmware'
580 toolsdir
='\$(ROOTDIR)/tools'
583 ##################################################################
584 # Figure out target platform
587 echo "Enter target platform:"
589 ==Archos== ==iriver== ==Apple iPod==
590 0) Player/Studio 10) H120/H140 20) Color/Photo
591 1) Recorder 11) H320/H340 21) Nano
592 2) FM Recorder 12) iHP-100/110/115 22) Video
593 3) Recorder v2 13) iFP-790 23) 3G
594 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
595 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
599 ==iAudio== ==Toshiba== ==SanDisk==
600 30) X5/X5V/X5L 40) Gigabeat F 50) Sansa e200
601 31) M5/M5L 41) Gigabeat S 51) Sansa e200R
605 ==Tatung== ==Olympus== ==Logik==
606 60) Elio TPJ-1022 70) M:Robe 500 80) DAX 1GB MP3/DAB
612 # Set of tools built for all target platforms:
613 toolset
="rdf2binary convbdf codepages"
615 # Toolsets for some target families:
616 archosbitmaptools
="$toolset scramble descramble sh2d uclpack bmp2rb"
617 iriverbitmaptools
="$toolset scramble descramble mkboot bmp2rb"
618 iaudiobitmaptools
="$toolset scramble descramble mkboot bmp2rb"
619 ipodbitmaptools
="$toolset scramble bmp2rb"
620 gigabeatbitmaptools
="$toolset scramble descramble bmp2rb"
621 tccbitmaptools
="$toolset scramble mktccboot bmp2rb"
622 # generic is used by IFP, H10, Sansa-e200
623 genericbitmaptools
="$toolset bmp2rb"
626 # ---- For each target ----
629 # target_id: a unique number identifying this target, DOES NOT necessarily
630 # have to be the menu number. Just use the currently highest
631 # number+1 when you add a new target.
632 # archos: short model name used all over to identify this target
633 # memory: number of megabytes of RAM this target has. If the amount can
634 # be selected by the size prompt, let memory be unset here
635 # target: -Ddefine passed to the build commands to make the correct
636 # config-*.h file get included etc
637 # tool: the tool that takes a plain binary and converts that into a
638 # working "firmware" file for your target
639 # output: the final output file name
640 # boottool: the tool that takes a plain binary and generates a bootloader
641 # file for your target (or blank to use $tool)
642 # bootoutput:the final output file name for the bootloader (or blank to use
644 # appextra: passed to the APPEXTRA variable in the Makefiles.
645 # TODO: add proper explanation
646 # archosrom: used only for Archos targets that build a special flashable .ucl
647 # image. Set to blank for other builds.
648 # flash: the same as archosrom. These two should be merged
649 # plugins: set to 'yes' to build the plugins. Early development builds can
650 # set this to no in the early stages to have an easier life for a
652 # swcodec: set 'yes' on swcodec targets
653 # toolset: lists what particular tools in the tools/ directory that this
654 # target needs to have built prior to building Rockbox
657 # *cc: sets up gcc and compiler options for your target builds. Note
658 # that if you select a simulator build, the compiler selection is
659 # overridden later in the script.
666 target
="-DARCHOS_PLAYER"
668 tool
="$rootdir/tools/scramble"
670 appextra
="player:gui"
671 archosrom
="$pwd/rombox.ucl"
672 flash
="$pwd/rockbox.ucl"
676 # toolset is the tools within the tools directory that we build for
677 # this particular target.
678 toolset
="$toolset scramble descramble sh2d player_unifont uclpack"
680 # Note: the convbdf is present in the toolset just because: 1) the
681 # firmware/Makefile assumes it is present always, and 2) we will need it when we
682 # build the player simulator
685 t_manufacturer
="archos"
692 target
="-DARCHOS_RECORDER"
694 tool
="$rootdir/tools/scramble"
695 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
696 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
698 appextra
="recorder:gui"
699 archosrom
="" #"$pwd/rombox.ucl"
700 flash
="$pwd/rockbox.ucl"
703 # toolset is the tools within the tools directory that we build for
704 # this particular target.
705 toolset
=$archosbitmaptools
707 t_manufacturer
="archos"
714 target
="-DARCHOS_FMRECORDER"
716 tool
="$rootdir/tools/scramble -fm"
717 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
718 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
720 appextra
="recorder:gui"
721 archosrom
="" #"$pwd/rombox.ucl"
722 flash
="$pwd/rockbox.ucl"
725 # toolset is the tools within the tools directory that we build for
726 # this particular target.
727 toolset
=$archosbitmaptools
729 t_manufacturer
="archos"
736 target
="-DARCHOS_RECORDERV2"
738 tool
="$rootdir/tools/scramble -v2"
739 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
740 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
742 appextra
="recorder:gui"
743 archosrom
="" #"$pwd/rombox.ucl"
744 flash
="$pwd/rockbox.ucl"
747 # toolset is the tools within the tools directory that we build for
748 # this particular target.
749 toolset
=$archosbitmaptools
751 t_manufacturer
="archos"
758 target
="-DARCHOS_ONDIOSP"
760 tool
="$rootdir/tools/scramble -osp"
761 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
762 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
764 appextra
="recorder:gui"
765 archosrom
="$pwd/rombox.ucl"
766 flash
="$pwd/rockbox.ucl"
769 # toolset is the tools within the tools directory that we build for
770 # this particular target.
771 toolset
=$archosbitmaptools
773 t_manufacturer
="archos"
780 target
="-DARCHOS_ONDIOFM"
782 tool
="$rootdir/tools/scramble -ofm"
783 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
784 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
786 appextra
="recorder:gui"
787 archosrom
="" #"$pwd/rombox.ucl"
788 flash
="$pwd/rockbox.ucl"
791 toolset
=$archosbitmaptools
793 t_manufacturer
="archos"
800 target
="-DARCHOS_AV300"
803 tool
="$rootdir/tools/scramble -mm=C"
804 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
805 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
807 appextra
="recorder:gui"
812 # toolset is the tools within the tools directory that we build for
813 # this particular target.
814 toolset
="$toolset scramble descramble bmp2rb"
815 # architecture, manufacturer and model for the target-tree build
817 t_manufacturer
="archos"
824 target
="-DIRIVER_H120"
827 tool
="$rootdir/tools/scramble -add=h120"
828 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
829 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
830 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
831 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
832 output
="rockbox.iriver"
833 appextra
="recorder:gui"
835 flash
="$pwd/rombox.iriver"
838 # toolset is the tools within the tools directory that we build for
839 # this particular target.
840 toolset
=$iriverbitmaptools
842 t_manufacturer
="iriver"
849 target
="-DIRIVER_H300"
852 tool
="$rootdir/tools/scramble -add=h300"
853 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
854 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
855 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
856 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
857 output
="rockbox.iriver"
858 appextra
="recorder:gui"
863 # toolset is the tools within the tools directory that we build for
864 # this particular target.
865 toolset
=$iriverbitmaptools
867 t_manufacturer
="iriver"
874 target
="-DIRIVER_H100"
877 tool
="$rootdir/tools/scramble -add=h100"
878 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
879 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
880 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
881 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
882 output
="rockbox.iriver"
883 appextra
="recorder:gui"
888 # toolset is the tools within the tools directory that we build for
889 # this particular target.
890 toolset
=$iriverbitmaptools
892 t_manufacturer
="iriver"
899 target
="-DIRIVER_IFP7XX"
903 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
904 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
906 appextra
="recorder:gui"
911 # toolset is the tools within the tools directory that we build for
912 # this particular target.
913 toolset
=$genericbitmaptools
915 t_manufacturer
="pnx0101"
916 t_model
="iriver-ifp7xx"
922 target
="-DIRIVER_H10"
925 tool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
926 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
927 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
929 appextra
="recorder:gui"
934 boottool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
935 bootoutput
="H10_20GC.mi4"
936 # toolset is the tools within the tools directory that we build for
937 # this particular target.
938 toolset
="$genericbitmaptools scramble"
939 # architecture, manufacturer and model for the target-tree build
941 t_manufacturer
="iriver"
948 target
="-DIRIVER_H10_5GB"
951 tool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
952 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
953 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
955 appextra
="recorder:gui"
960 boottool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
962 # toolset is the tools within the tools directory that we build for
963 # this particular target.
964 toolset
="$genericbitmaptools scramble"
965 # architecture, manufacturer and model for the target-tree build
967 t_manufacturer
="iriver"
974 target
="-DIPOD_COLOR"
977 tool
="$rootdir/tools/scramble -add=ipco"
978 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
979 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
980 output
="rockbox.ipod"
981 appextra
="recorder:gui"
986 bootoutput
="bootloader-$archos.ipod"
987 # toolset is the tools within the tools directory that we build for
988 # this particular target.
989 toolset
=$ipodbitmaptools
990 # architecture, manufacturer and model for the target-tree build
992 t_manufacturer
="ipod"
1002 tool
="$rootdir/tools/scramble -add=nano"
1003 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1004 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1005 output
="rockbox.ipod"
1006 appextra
="recorder:gui"
1011 bootoutput
="bootloader-$archos.ipod"
1012 # toolset is the tools within the tools directory that we build for
1013 # this particular target.
1014 toolset
=$ipodbitmaptools
1015 # architecture, manufacturer and model for the target-tree build
1017 t_manufacturer
="ipod"
1024 target
="-DIPOD_VIDEO"
1026 tool
="$rootdir/tools/scramble -add=ipvd"
1027 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1028 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1029 output
="rockbox.ipod"
1030 appextra
="recorder:gui"
1035 bootoutput
="bootloader-$archos.ipod"
1036 # toolset is the tools within the tools directory that we build for
1037 # this particular target.
1038 toolset
=$ipodbitmaptools
1039 # architecture, manufacturer and model for the target-tree build
1041 t_manufacturer
="ipod"
1051 tool
="$rootdir/tools/scramble -add=ip3g"
1052 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1053 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1054 output
="rockbox.ipod"
1055 appextra
="recorder:gui"
1060 bootoutput
="bootloader-$archos.ipod"
1061 # toolset is the tools within the tools directory that we build for
1062 # this particular target.
1063 toolset
=$ipodbitmaptools
1064 # architecture, manufacturer and model for the target-tree build
1066 t_manufacturer
="ipod"
1076 tool
="$rootdir/tools/scramble -add=ip4g"
1077 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1078 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1079 output
="rockbox.ipod"
1080 appextra
="recorder:gui"
1085 bootoutput
="bootloader-$archos.ipod"
1086 # toolset is the tools within the tools directory that we build for
1087 # this particular target.
1088 toolset
=$ipodbitmaptools
1089 # architecture, manufacturer and model for the target-tree build
1091 t_manufacturer
="ipod"
1098 target
="-DIPOD_MINI"
1101 tool
="$rootdir/tools/scramble -add=mini"
1102 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1103 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1104 output
="rockbox.ipod"
1105 appextra
="recorder:gui"
1110 bootoutput
="bootloader-$archos.ipod"
1111 # toolset is the tools within the tools directory that we build for
1112 # this particular target.
1113 toolset
=$ipodbitmaptools
1114 # architecture, manufacturer and model for the target-tree build
1116 t_manufacturer
="ipod"
1123 target
="-DIPOD_MINI2G"
1126 tool
="$rootdir/tools/scramble -add=mn2g"
1127 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1128 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1129 output
="rockbox.ipod"
1130 appextra
="recorder:gui"
1135 bootoutput
="bootloader-$archos.ipod"
1136 # toolset is the tools within the tools directory that we build for
1137 # this particular target.
1138 toolset
=$ipodbitmaptools
1139 # architecture, manufacturer and model for the target-tree build
1141 t_manufacturer
="ipod"
1148 target
="-DIPOD_1G2G"
1151 tool
="$rootdir/tools/scramble -add=1g2g"
1152 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1153 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1154 output
="rockbox.ipod"
1155 appextra
="recorder:gui"
1160 bootoutput
="bootloader-$archos.ipod"
1161 # toolset is the tools within the tools directory that we build for
1162 # this particular target.
1163 toolset
=$ipodbitmaptools
1164 # architecture, manufacturer and model for the target-tree build
1166 t_manufacturer
="ipod"
1173 target
="-DIAUDIO_X5"
1176 tool
="$rootdir/tools/scramble -add=iax5"
1177 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1178 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1179 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1180 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1181 output
="rockbox.iaudio"
1182 appextra
="recorder:gui"
1187 # toolset is the tools within the tools directory that we build for
1188 # this particular target.
1189 toolset
="$iaudiobitmaptools"
1190 # architecture, manufacturer and model for the target-tree build
1192 t_manufacturer
="iaudio"
1199 target
="-DIAUDIO_M5"
1202 tool
="$rootdir/tools/scramble -add=iam5"
1203 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1204 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1205 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1206 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1207 output
="rockbox.iaudio"
1208 appextra
="recorder:gui"
1213 # toolset is the tools within the tools directory that we build for
1214 # this particular target.
1215 toolset
="$iaudiobitmaptools"
1216 # architecture, manufacturer and model for the target-tree build
1218 t_manufacturer
="iaudio"
1225 target
="-DGIGABEAT_F"
1228 tool
="$rootdir/tools/scramble -add=giga"
1229 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1230 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1231 output
="rockbox.gigabeat"
1232 appextra
="recorder:gui"
1237 toolset
=$gigabeatbitmaptools
1238 boottool
="$rootdir/tools/scramble -gigabeat"
1239 bootoutput
="FWIMG01.DAT"
1240 # architecture, manufacturer and model for the target-tree build
1242 t_manufacturer
="s3c2440"
1243 t_model
="gigabeat-fx"
1249 target
="-DGIGABEAT_S"
1252 tool
="$rootdir/tools/scramble -add=gigs"
1253 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1254 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1255 output
="rockbox.gigabeat"
1256 appextra
="recorder:gui"
1261 toolset
="$gigabeatbitmaptools mknkboot"
1262 boottool
="$rootdir/tools/scramble -gigabeats"
1264 # architecture, manufacturer and model for the target-tree build
1266 t_manufacturer
="imx31"
1267 t_model
="gigabeat-s"
1273 target
="-DMROBE_500"
1276 # tool="$rootdir/tools/scramble -add=m500"
1278 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1279 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1280 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1281 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1282 output
="rockbox.mrobe500"
1283 appextra
="recorder:gui"
1288 toolset
=$gigabeatbitmaptools
1290 bootoutput
="rockbox.mrboot"
1291 # architecture, manufacturer and model for the target-tree build
1293 t_manufacturer
="tms320dm320"
1300 target
="-DMROBE_100"
1303 tool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1304 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1305 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1306 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1307 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1308 output
="rockbox.mi4"
1309 appextra
="recorder:gui"
1314 boottool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1315 bootoutput
="pp5020.mi4"
1316 # toolset is the tools within the tools directory that we build for
1317 # this particular target.
1318 toolset
="$genericbitmaptools scramble"
1319 # architecture, manufacturer and model for the target-tree build
1321 t_manufacturer
="olympus"
1328 target
="-DLOGIK_DAX"
1331 tool
="$rootdir/tools/scramble -add=ldax"
1332 boottool
="$rootdir/tools/scramble -tcc=crc"
1333 bootoutput
="player.rom"
1334 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1335 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1336 output
="rockbox.logik"
1337 appextra
="recorder:gui"
1342 # toolset is the tools within the tools directory that we build for
1343 # this particular target.
1344 toolset
=$tccbitmaptools
1345 # architecture, manufacturer and model for the target-tree build
1347 t_manufacturer
="tcc77x"
1354 target
="-DSANSA_E200"
1355 memory
=32 # supposedly
1357 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1358 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1359 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1360 output
="rockbox.mi4"
1361 appextra
="recorder:gui"
1366 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1367 bootoutput
="PP5022.mi4"
1368 # toolset is the tools within the tools directory that we build for
1369 # this particular target.
1370 toolset
="$genericbitmaptools scramble"
1371 # architecture, manufacturer and model for the target-tree build
1373 t_manufacturer
="sandisk"
1374 t_model
="sansa-e200"
1378 # the e200R model is pretty much identical to the e200, it only has a
1379 # different option to the scramble tool when building a bootloader and
1380 # makes the bootloader output file name in all lower case.
1383 target
="-DSANSA_E200"
1384 memory
=32 # supposedly
1386 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1387 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1388 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1389 output
="rockbox.mi4"
1390 appextra
="recorder:gui"
1395 boottool
="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
1396 bootoutput
="pp5022.mi4"
1397 # toolset is the tools within the tools directory that we build for
1398 # this particular target.
1399 toolset
="$genericbitmaptools scramble"
1400 # architecture, manufacturer and model for the target-tree build
1402 t_manufacturer
="sandisk"
1403 t_model
="sansa-e200"
1409 target
="-DSANSA_C200"
1410 memory
=32 # supposedly
1412 tool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
1413 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1414 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1415 output
="rockbox.mi4"
1416 appextra
="recorder:gui"
1421 boottool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1422 bootoutput
="firmware.mi4"
1423 # toolset is the tools within the tools directory that we build for
1424 # this particular target.
1425 toolset
="$genericbitmaptools scramble"
1426 # architecture, manufacturer and model for the target-tree build
1428 t_manufacturer
="sandisk"
1429 t_model
="sansa-c200"
1435 target
="-DELIO_TPJ1022"
1438 tool
="$rootdir/tools/scramble -add tpj2"
1439 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1440 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1441 output
="rockbox.elio"
1442 appextra
="recorder:gui"
1447 boottool
="$rootdir/tools/scramble -mi4v2"
1448 bootoutput
="pp5020.mi4"
1449 # toolset is the tools within the tools directory that we build for
1450 # this particular target.
1451 toolset
="$genericbitmaptools scramble"
1452 # architecture, manufacturer and model for the target-tree build
1454 t_manufacturer
="tatung"
1464 tool
="$rootdir/tools/scramble -add i7"
1465 boottool
="$rootdir/tools/scramble -tcc=crc"
1466 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1467 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1468 output
="rockbox.iaudio"
1469 appextra
="recorder:gui"
1474 bootoutput
="I7_FW.BIN"
1475 # toolset is the tools within the tools directory that we build for
1476 # this particular target.
1477 toolset
="$tccbitmaptools"
1478 # architecture, manufacturer and model for the target-tree build
1480 t_manufacturer
="tcc77x"
1491 boottool
="$rootdir/tools/scramble -tcc=crc"
1492 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1493 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1494 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1495 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1496 output
="rockbox.iaudio"
1497 appextra
="recorder:gui"
1502 toolset
="$tccbitmaptools"
1503 # architecture, manufacturer and model for the target-tree build
1505 t_manufacturer
="tcc780x"
1510 echo "Please select a supported target platform!"
1516 echo "Platform set to $archos"
1520 ############################################################################
1521 # Amount of memory, for those that can differ. They have $memory unset at
1525 if [ -z "$memory" ]; then
1529 echo "Enter size of your RAM (in MB): (Defaults to 32)"
1542 echo "Enter size of your RAM (in MB): (defaults to 2)"
1555 echo "Memory size selected: $memory MB"
1559 ##################################################################
1560 # Figure out build "type"
1563 # the ifp7x0 is the only platform that supports building a gdb stub like
1567 gdbstub
="(G)DB stub, "
1570 gdbstub
="(I)installer, "
1577 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, $gdbstub(M)anual (N)"
1583 appsdir
='\$(ROOTDIR)/bootloader'
1585 extradefines
="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
1587 echo "e200R-installer build selected"
1590 if test $t_manufacturer = "archos"; then
1591 # Archos SH-based players do this somewhat differently for
1593 appsdir
='\$(ROOTDIR)/flash/bootbox'
1596 appsdir
='\$(ROOTDIR)/bootloader'
1599 if test -n "$boottool"; then
1602 if test -n "$bootoutput"; then
1606 extradefines
="-DBOOTLOADER -ffunction-sections -fdata-sections"
1608 echo "Bootloader build selected"
1613 extradefines
="-DSIMULATOR"
1614 echo "Simulator build selected"
1617 echo "Advanced build selected"
1621 extradefines
="-DSTUB" # for target makefile symbol EXTRA_DEFINES
1622 appsdir
='\$(ROOTDIR)/gdb'
1631 echo "GDB stub build selected"
1634 appsdir
='\$(ROOTDIR)/manual'
1635 firmdir
='\$(ROOTDIR)/manual/platform' # No Makefile here. Effectively ig:res target
1639 echo "Manual build selected"
1642 if [ "$archos" = "e200r" ]; then
1643 echo "Do not use the e200R target for regular builds. Use e200 instead."
1647 echo "Normal build selected"
1651 # to be able running "make manual" from non-manual configuration
1654 manualdev
="recorderv2fm"
1657 manualdev
="recorderv2fm"
1663 manualdev
="ipodmini"
1670 if [ -z "$debug" ]; then
1671 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
1674 echo "Using source code root directory: $rootdir"
1676 # this was once possible to change at build-time, but no more:
1681 if [ "yes" = "$simulator" ]; then
1682 # setup compiler and things for simulator
1685 if [ -d "archos" ]; then
1686 echo "sub directory archos already present"
1689 echo "created an archos subdirectory for simulating the hard disk"
1693 # Now, figure out version number of the (gcc) compiler we are about to use
1694 gccver
=`$CC -dumpversion`;
1696 # figure out the binutil version too and display it, mostly for the build
1697 # system etc to be able to see it easier
1698 ldver
=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
1700 if [ -z "$gccver" ]; then
1701 echo "WARNING: The compiler you must use ($CC) is not in your path!"
1702 echo "WARNING: this may cause your build to fail since we cannot do the"
1703 echo "WARNING: checks we want now."
1706 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
1709 num1
=`echo $gccver | cut -d . -f1`
1710 num2
=`echo $gccver | cut -d . -f2`
1711 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
1718 echo "Using $CC $gccver ($gccnum)"
1720 if test "$gccnum" -ge "400"; then
1721 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
1722 # so we ignore that warnings for now
1724 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
1727 if test "$gccnum" -ge "401"; then
1728 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
1729 # will break strict-aliasing rules"
1731 GCCOPTS
="$GCCOPTS -fno-strict-aliasing"
1734 if test "$gccnum" -ge "402"; then
1735 # disable warning about "warning: initialized field overwritten" as gcc 4.2
1736 # and later would throw it for several valid cases
1737 GCCOPTS
="$GCCOPTS -Wno-override-init"
1742 echo "Using $LD $ldver"
1744 # check the compiler for SH platforms
1745 if test "$CC" = "sh-elf-gcc"; then
1746 if test "$gccnum" -lt "400"; then
1747 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
1748 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
1750 # figure out patch status
1751 gccpatch
=`$CC --version`;
1753 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
1754 echo "gcc $gccver is rockbox patched"
1755 # then convert -O to -Os to get smaller binaries!
1756 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
1758 echo "WARNING: You use an unpatched gcc compiler: $gccver"
1759 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
1764 if test "$CC" = "m68k-elf-gcc"; then
1765 # convert -O to -Os to get smaller binaries!
1766 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
1769 if test "$1" = "--ccache"; then
1770 echo "Enable ccache for building"
1773 if test "$1" != "--no-ccache"; then
1774 ccache
=`findtool ccache`
1775 if test -n "$ccache"; then
1776 echo "Found and uses ccache ($ccache)"
1781 if test -n "$ccache"; then
1785 if test "X$endian" = "Xbig"; then
1786 defendian
="ROCKBOX_BIG_ENDIAN"
1788 defendian
="ROCKBOX_LITTLE_ENDIAN"
1792 -e "s,@ENDIAN@,${defendian},g" \
1793 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
1794 -e "s,@config_rtc@,$config_rtc,g" \
1795 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
1797 /* This header was made by configure */
1798 #ifndef __BUILD_AUTOCONF_H
1799 #define __BUILD_AUTOCONF_H
1801 /* Define endianess for the target or simulator platform */
1804 /* Define this if you build rockbox to support the logf logging and display */
1805 #undef ROCKBOX_HAS_LOGF
1807 /* optional defines for RTC mod for h1x0 */
1811 #endif /* __BUILD_AUTOCONF_H */
1814 if test -n "$t_cpu"; then
1815 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
1816 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
1817 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
1821 if test "$simulator" = "yes"; then
1822 # add simul make stuff on the #SIMUL# line
1823 simmagic1
="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
1824 simmagic2
="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
1826 # delete the lines that match
1827 simmagic1
='/@SIMUL1@/D'
1828 simmagic2
='/@SIMUL2@/D'
1831 if test "$swcodec" = "yes"; then
1832 voicetoolset
="rbspeexenc voicefont wavtrim"
1834 voicetoolset
="voicefont wavtrim"
1838 -e "s,@ROOTDIR@,${rootdir},g" \
1839 -e "s,@DEBUG@,${debug},g" \
1840 -e "s,@MEMORY@,${memory},g" \
1841 -e "s,@TARGET_ID@,${target_id},g" \
1842 -e "s,@TARGET@,${target},g" \
1843 -e "s,@CPU@,${t_cpu},g" \
1844 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
1845 -e "s,@ARCHOS@,${archos},g" \
1846 -e "s,@LANGUAGE@,${language},g" \
1847 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
1848 -e "s,@PWD@,${pwd},g" \
1849 -e "s,@CC@,${CC},g" \
1850 -e "s,@LD@,${LD},g" \
1851 -e "s,@AR@,${AR},g" \
1852 -e "s,@AS@,${AS},g" \
1853 -e "s,@OC@,${OC},g" \
1854 -e "s,@WINDRES@,${WINDRES},g" \
1855 -e "s,@DLLTOOL@,${DLLTOOL},g" \
1856 -e "s,@DLLWRAP@,${DLLWRAP},g" \
1857 -e "s,@RANLIB@,${RANLIB},g" \
1858 -e "s,@TOOL@,${tool},g" \
1859 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
1860 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
1861 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
1862 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
1863 -e "s,@OUTPUT@,${output},g" \
1864 -e "s,@APPEXTRA@,${appextra},g" \
1865 -e "s,@ARCHOSROM@,${archosrom},g" \
1866 -e "s,@FLASHFILE@,${flash},g" \
1867 -e "s,@PLUGINS@,${plugins},g" \
1868 -e "s,@CODECS@,${swcodec},g" \
1869 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
1870 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
1871 -e "s,@GCCOPTS@,${GCCOPTS},g" \
1872 -e "s,@TARGET_INC@,${TARGET_INC},g" \
1873 -e "s!@LDOPTS@!${LDOPTS}!g" \
1874 -e "s,@LOADADDRESS@,${loadaddress},g" \
1875 -e "s,@EXTRADEF@,${extradefines},g" \
1876 -e "s,@APPSDIR@,${appsdir},g" \
1877 -e "s,@FIRMDIR@,${firmdir},g" \
1878 -e "s,@TOOLSDIR@,${toolsdir},g" \
1879 -e "s,@APPS@,${apps},g" \
1880 -e "s,@SIMVER@,${simver},g" \
1881 -e "s,@GCCVER@,${gccver},g" \
1882 -e "s,@GCCNUM@,${gccnum},g" \
1883 -e "s,@UNAME@,${uname},g" \
1884 -e "s,@ENDIAN@,${defendian},g" \
1885 -e "s,@TOOLSET@,${toolset},g" \
1888 -e "s,@MANUALDEV@,${manualdev},g" \
1889 -e "s,@ENCODER@,${ENC_CMD},g" \
1890 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
1891 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
1892 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
1893 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
1895 ## Automaticly generated. http://www.rockbox.org/
1903 # old 'make' versions don't have the built-in 'info' function
1904 info=old\$(shell echo >&2 "Consider upgrading to GNU make 3.81+ for optimum build performance.")
1905 ifeq (\$(call info),old)
1906 export info=echo "\$\$(1)";
1909 export ROOTDIR=@ROOTDIR@
1910 export FIRMDIR=@FIRMDIR@
1911 export APPSDIR=@APPSDIR@
1912 export TOOLSDIR=@TOOLSDIR@
1913 export DOCSDIR=\$(ROOTDIR)/docs
1914 export MANUALDIR=\${ROOTDIR}/manual
1915 export DEBUG=@DEBUG@
1916 export ARCHOS=@ARCHOS@
1917 export ARCHOSROM=@ARCHOSROM@
1918 export FLASHFILE=@FLASHFILE@
1919 export TARGET_ID=@TARGET_ID@
1920 export TARGET=@TARGET@
1922 export MANUFACTURER=@MANUFACTURER@
1924 export BUILDDIR=@PWD@
1925 export LANGUAGE=@LANGUAGE@
1926 export VOICELANGUAGE=@VOICELANGUAGE@
1927 export MEMORYSIZE=@MEMORY@
1928 export VERSION=\$(shell \$(ROOTDIR)/tools/svnversion.sh \$(ROOTDIR))
1929 export BUILDDATE=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
1930 export MKFIRMWARE=@TOOL@
1931 export BMP2RB_MONO=@BMP2RB_MONO@
1932 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
1933 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
1934 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
1935 export BINARY=@OUTPUT@
1936 export APPEXTRA=@APPEXTRA@
1937 export ENABLEDPLUGINS=@PLUGINS@
1938 export SOFTWARECODECS=@CODECS@
1939 export EXTRA_DEFINES=@EXTRADEF@
1947 export WINDRES=@WINDRES@
1948 export DLLTOOL=@DLLTOOL@
1949 export DLLWRAP=@DLLWRAP@
1950 export RANLIB=@RANLIB@
1951 export PROFILE_OPTS=@PROFILE_OPTS@
1952 export SIMVER=@SIMVER@
1953 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
1954 export GCCOPTS=@GCCOPTS@
1955 export TARGET_INC=@TARGET_INC@
1956 export LOADADDRESS=@LOADADDRESS@
1957 export SHARED_FLAG=@SHARED_FLAG@
1958 export LDOPTS=@LDOPTS@
1959 export GCCVER=@GCCVER@
1960 export GCCNUM=@GCCNUM@
1961 export UNAME=@UNAME@
1962 export MANUALDEV=@MANUALDEV@
1963 export TTS_OPTS=@TTS_OPTS@
1964 export TTS_ENGINE=@TTS_ENGINE@
1965 export ENC_OPTS=@ENC_OPTS@
1966 export ENCODER=@ENCODER@
1968 # Do not print "Entering directory ..."
1969 MAKEFLAGS += --no-print-directory
1971 .PHONY: all clean tags zip tools manual bin build info
1976 \$(SILENT)\$(TOOLSDIR)/mkinfo.pl \$(BUILDDIR)/rockbox-info.txt
1981 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
1982 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@
1987 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
1988 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ \$(BUILDDIR)/\$(BINARY)
1991 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ rocks
1993 veryclean: clean toolsclean
1996 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) clean
1999 \$(SILENT)echo Cleaning build directory
2000 \$(SILENT)rm -rf rockbox.zip TAGS @APPS@ firmware comsim sim lang.[ch]\
2001 manual *.pdf *.a credits.raw @OUTPUT@ bitmaps pluginbitmaps \
2002 @ARCHOSROM@ @FLASHFILE@ UI256.bmp rockbox-full.zip \
2003 html txt rockbox-manual*.zip sysfont.h rockbox-info.txt \
2004 voicefontids *.wav *.mp3 *.voice
2007 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @TOOLSET@
2010 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @VOICETOOLSET@
2013 \$(SILENT)rm -f TAGS
2014 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) tags
2015 \$(SILENT)\$(MAKE) -C \$(APPSDIR) tags
2016 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins tags
2017 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins/lib tags
2020 \$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\" -r "\$(ROOTDIR)" -f 1 -o rockbox-fonts.zip \$(TARGET) \$(BINARY)
2023 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
2024 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
2027 \$(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip
2030 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
2031 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" -f 2 -o rockbox-full.zip \$(TARGET) \$(BINARY)
2034 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
2035 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.7z" -z "7za a" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
2038 \$(SILENT)rm -f rockbox.tar
2039 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
2040 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.tar" -z "tar --no-recursion -uf" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
2043 \$(SILENT)bzip2 -f9 rockbox.tar
2046 \$(SILENT)gzip -f9 rockbox.tar
2050 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-pdf
2052 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-html
2053 manual-zhtml: manual-zip
2055 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt
2057 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt-zip
2059 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-zip
2062 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ features
2065 @echo "A few helpful make targets"
2067 @echo "all - builds a full Rockbox (default), including tools"
2068 @echo "bin - builds only the Rockbox.<target name> file"
2069 @echo "clean - cleans a build directory (not tools)"
2070 @echo "veryclean - cleans the build and tools directories"
2071 @echo "manual - builds a manual"
2072 @echo "manual-html - HTML manual"
2073 @echo "manual-zip - HTML manual (zipped)"
2074 @echo "manual-txt - txt manual"
2075 @echo "fullzip - creates a rockbox.zip of your build with fonts"
2076 @echo "zip - creates a rockbox.zip of your build (no fonts)"
2077 @echo "gzip - creates a rockbox.tar.gz of your build (no fonts)"
2078 @echo "bzip2 - creates a rockbox.tar.bz2 of your build (no fonts)"
2079 @echo "7zip - creates a rockbox.7z of your build (no fonts)"
2080 @echo "fontzip - creates rockbox-fonts.zip"
2081 @echo "mapzip - creates rockbox-maps.zip with all .map files"
2082 @echo "tools - builds the tools only"
2083 @echo "voicetools - builds the voice tools only"
2084 @echo "install - installs your build (for simulator builds only)"
2088 if [ "yes" = "$simulator" ]; then
2090 cat >> Makefile
<<EOF
2093 @echo "installing a full setup in your archos dir"
2094 @(\$(MAKE) fullzip && cd archos && unzip -oq ../rockbox-full.zip)
2099 if [ "yes" = "$voice" ]; then
2101 cat >> Makefile
<<EOF
2103 voice: voicetools features
2104 \$(SILENT)for f in \`cat \$(BUILDDIR)/${apps}/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
2105 for lang in \`echo \$(VOICELANGUAGE) |sed "s/,/ /g"\`; do \$(TOOLSDIR)/voice.pl -V -l=\$\$lang -t=\$(ARCHOS)\$\$feat -i=\$(TARGET_ID) -e="\$(ENCODER)" -E="\$(ENC_OPTS)" -s=\$(TTS_ENGINE) -S="\$(TTS_OPTS)"; done \\
2110 echo "Created Makefile"