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 [ "$modelname" = "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 [ "$modelname" = "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 $modelname. 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, IS NOT the menu number.
630 # Just use the currently highest number+1 when you add a new
632 # modelname: 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
648 # flash: name of output for flashing, for targets where there's a special
649 # file output for this.
650 # plugins: set to 'yes' to build the plugins. Early development builds can
651 # set this to no in the early stages to have an easier life for a
653 # swcodec: set 'yes' on swcodec targets
654 # toolset: lists what particular tools in the tools/ directory that this
655 # target needs to have built prior to building Rockbox
658 # *cc: sets up gcc and compiler options for your target builds. Note
659 # that if you select a simulator build, the compiler selection is
660 # overridden later in the script.
667 target
="-DARCHOS_PLAYER"
669 tool
="$rootdir/tools/scramble"
671 appextra
="player:gui"
672 archosrom
="$pwd/rombox.ucl"
673 flash
="$pwd/rockbox.ucl"
677 # toolset is the tools within the tools directory that we build for
678 # this particular target.
679 toolset
="$toolset scramble descramble sh2d player_unifont uclpack"
681 # Note: the convbdf is present in the toolset just because: 1) the
682 # firmware/Makefile assumes it is present always, and 2) we will need it when we
683 # build the player simulator
686 t_manufacturer
="archos"
693 target
="-DARCHOS_RECORDER"
695 tool
="$rootdir/tools/scramble"
696 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
697 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
699 appextra
="recorder:gui"
700 #archosrom="$pwd/rombox.ucl"
701 flash
="$pwd/rockbox.ucl"
704 # toolset is the tools within the tools directory that we build for
705 # this particular target.
706 toolset
=$archosbitmaptools
708 t_manufacturer
="archos"
714 modelname
="fmrecorder"
715 target
="-DARCHOS_FMRECORDER"
717 tool
="$rootdir/tools/scramble -fm"
718 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
719 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
721 appextra
="recorder:gui"
722 #archosrom="$pwd/rombox.ucl"
723 flash
="$pwd/rockbox.ucl"
726 # toolset is the tools within the tools directory that we build for
727 # this particular target.
728 toolset
=$archosbitmaptools
730 t_manufacturer
="archos"
736 modelname
="recorderv2"
737 target
="-DARCHOS_RECORDERV2"
739 tool
="$rootdir/tools/scramble -v2"
740 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
741 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
743 appextra
="recorder:gui"
744 #archosrom="$pwd/rombox.ucl"
745 flash
="$pwd/rockbox.ucl"
748 # toolset is the tools within the tools directory that we build for
749 # this particular target.
750 toolset
=$archosbitmaptools
752 t_manufacturer
="archos"
759 target
="-DARCHOS_ONDIOSP"
761 tool
="$rootdir/tools/scramble -osp"
762 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
763 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
765 appextra
="recorder:gui"
766 archosrom
="$pwd/rombox.ucl"
767 flash
="$pwd/rockbox.ucl"
770 # toolset is the tools within the tools directory that we build for
771 # this particular target.
772 toolset
=$archosbitmaptools
774 t_manufacturer
="archos"
781 target
="-DARCHOS_ONDIOFM"
783 tool
="$rootdir/tools/scramble -ofm"
784 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
785 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
787 appextra
="recorder:gui"
788 #archosrom="$pwd/rombox.ucl"
789 flash
="$pwd/rockbox.ucl"
792 toolset
=$archosbitmaptools
794 t_manufacturer
="archos"
801 target
="-DARCHOS_AV300"
804 tool
="$rootdir/tools/scramble -mm=C"
805 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
806 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
808 appextra
="recorder:gui"
811 # toolset is the tools within the tools directory that we build for
812 # this particular target.
813 toolset
="$toolset scramble descramble bmp2rb"
814 # architecture, manufacturer and model for the target-tree build
816 t_manufacturer
="archos"
823 target
="-DIRIVER_H120"
826 tool
="$rootdir/tools/scramble -add=h120"
827 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
828 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
829 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
830 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
831 output
="rockbox.iriver"
832 appextra
="recorder:gui"
833 flash
="$pwd/rombox.iriver"
836 # toolset is the tools within the tools directory that we build for
837 # this particular target.
838 toolset
=$iriverbitmaptools
840 t_manufacturer
="iriver"
847 target
="-DIRIVER_H300"
850 tool
="$rootdir/tools/scramble -add=h300"
851 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
852 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
853 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
854 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
855 output
="rockbox.iriver"
856 appextra
="recorder:gui"
859 # toolset is the tools within the tools directory that we build for
860 # this particular target.
861 toolset
=$iriverbitmaptools
863 t_manufacturer
="iriver"
870 target
="-DIRIVER_H100"
873 tool
="$rootdir/tools/scramble -add=h100"
874 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
875 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
876 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
877 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
878 output
="rockbox.iriver"
879 appextra
="recorder:gui"
882 # toolset is the tools within the tools directory that we build for
883 # this particular target.
884 toolset
=$iriverbitmaptools
886 t_manufacturer
="iriver"
893 target
="-DIRIVER_IFP7XX"
897 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
898 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
900 appextra
="recorder:gui"
903 # toolset is the tools within the tools directory that we build for
904 # this particular target.
905 toolset
=$genericbitmaptools
907 t_manufacturer
="pnx0101"
908 t_model
="iriver-ifp7xx"
914 target
="-DIRIVER_H10"
917 tool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
918 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
919 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
921 appextra
="recorder:gui"
924 boottool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
925 bootoutput
="H10_20GC.mi4"
926 # toolset is the tools within the tools directory that we build for
927 # this particular target.
928 toolset
="$genericbitmaptools scramble"
929 # architecture, manufacturer and model for the target-tree build
931 t_manufacturer
="iriver"
938 target
="-DIRIVER_H10_5GB"
941 tool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
942 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
943 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
945 appextra
="recorder:gui"
948 boottool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
950 # toolset is the tools within the tools directory that we build for
951 # this particular target.
952 toolset
="$genericbitmaptools scramble"
953 # architecture, manufacturer and model for the target-tree build
955 t_manufacturer
="iriver"
961 modelname
="ipodcolor"
962 target
="-DIPOD_COLOR"
965 tool
="$rootdir/tools/scramble -add=ipco"
966 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
967 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
968 output
="rockbox.ipod"
969 appextra
="recorder:gui"
972 bootoutput
="bootloader-$modelname.ipod"
973 # toolset is the tools within the tools directory that we build for
974 # this particular target.
975 toolset
=$ipodbitmaptools
976 # architecture, manufacturer and model for the target-tree build
978 t_manufacturer
="ipod"
988 tool
="$rootdir/tools/scramble -add=nano"
989 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
990 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
991 output
="rockbox.ipod"
992 appextra
="recorder:gui"
995 bootoutput
="bootloader-$modelname.ipod"
996 # toolset is the tools within the tools directory that we build for
997 # this particular target.
998 toolset
=$ipodbitmaptools
999 # architecture, manufacturer and model for the target-tree build
1001 t_manufacturer
="ipod"
1007 modelname
="ipodvideo"
1008 target
="-DIPOD_VIDEO"
1010 tool
="$rootdir/tools/scramble -add=ipvd"
1011 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1012 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1013 output
="rockbox.ipod"
1014 appextra
="recorder:gui"
1017 bootoutput
="bootloader-$modelname.ipod"
1018 # toolset is the tools within the tools directory that we build for
1019 # this particular target.
1020 toolset
=$ipodbitmaptools
1021 # architecture, manufacturer and model for the target-tree build
1023 t_manufacturer
="ipod"
1033 tool
="$rootdir/tools/scramble -add=ip3g"
1034 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1035 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1036 output
="rockbox.ipod"
1037 appextra
="recorder:gui"
1040 bootoutput
="bootloader-$modelname.ipod"
1041 # toolset is the tools within the tools directory that we build for
1042 # this particular target.
1043 toolset
=$ipodbitmaptools
1044 # architecture, manufacturer and model for the target-tree build
1046 t_manufacturer
="ipod"
1056 tool
="$rootdir/tools/scramble -add=ip4g"
1057 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1058 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1059 output
="rockbox.ipod"
1060 appextra
="recorder:gui"
1063 bootoutput
="bootloader-$modelname.ipod"
1064 # toolset is the tools within the tools directory that we build for
1065 # this particular target.
1066 toolset
=$ipodbitmaptools
1067 # architecture, manufacturer and model for the target-tree build
1069 t_manufacturer
="ipod"
1075 modelname
="ipodmini"
1076 target
="-DIPOD_MINI"
1079 tool
="$rootdir/tools/scramble -add=mini"
1080 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1081 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1082 output
="rockbox.ipod"
1083 appextra
="recorder:gui"
1086 bootoutput
="bootloader-$modelname.ipod"
1087 # toolset is the tools within the tools directory that we build for
1088 # this particular target.
1089 toolset
=$ipodbitmaptools
1090 # architecture, manufacturer and model for the target-tree build
1092 t_manufacturer
="ipod"
1098 modelname
="ipodmini2g"
1099 target
="-DIPOD_MINI2G"
1102 tool
="$rootdir/tools/scramble -add=mn2g"
1103 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1104 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1105 output
="rockbox.ipod"
1106 appextra
="recorder:gui"
1109 bootoutput
="bootloader-$modelname.ipod"
1110 # toolset is the tools within the tools directory that we build for
1111 # this particular target.
1112 toolset
=$ipodbitmaptools
1113 # architecture, manufacturer and model for the target-tree build
1115 t_manufacturer
="ipod"
1121 modelname
="ipod1g2g"
1122 target
="-DIPOD_1G2G"
1125 tool
="$rootdir/tools/scramble -add=1g2g"
1126 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1127 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1128 output
="rockbox.ipod"
1129 appextra
="recorder:gui"
1132 bootoutput
="bootloader-$modelname.ipod"
1133 # toolset is the tools within the tools directory that we build for
1134 # this particular target.
1135 toolset
=$ipodbitmaptools
1136 # architecture, manufacturer and model for the target-tree build
1138 t_manufacturer
="ipod"
1145 target
="-DIAUDIO_X5"
1148 tool
="$rootdir/tools/scramble -add=iax5"
1149 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1150 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1151 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1152 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1153 output
="rockbox.iaudio"
1154 appextra
="recorder:gui"
1157 # toolset is the tools within the tools directory that we build for
1158 # this particular target.
1159 toolset
="$iaudiobitmaptools"
1160 # architecture, manufacturer and model for the target-tree build
1162 t_manufacturer
="iaudio"
1169 target
="-DIAUDIO_M5"
1172 tool
="$rootdir/tools/scramble -add=iam5"
1173 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1174 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1175 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1176 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1177 output
="rockbox.iaudio"
1178 appextra
="recorder:gui"
1181 # toolset is the tools within the tools directory that we build for
1182 # this particular target.
1183 toolset
="$iaudiobitmaptools"
1184 # architecture, manufacturer and model for the target-tree build
1186 t_manufacturer
="iaudio"
1192 modelname
="gigabeatf"
1193 target
="-DGIGABEAT_F"
1196 tool
="$rootdir/tools/scramble -add=giga"
1197 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1198 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1199 output
="rockbox.gigabeat"
1200 appextra
="recorder:gui"
1203 toolset
=$gigabeatbitmaptools
1204 boottool
="$rootdir/tools/scramble -gigabeat"
1205 bootoutput
="FWIMG01.DAT"
1206 # architecture, manufacturer and model for the target-tree build
1208 t_manufacturer
="s3c2440"
1209 t_model
="gigabeat-fx"
1214 modelname
="gigabeats"
1215 target
="-DGIGABEAT_S"
1218 tool
="$rootdir/tools/scramble -add=gigs"
1219 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1220 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1221 output
="rockbox.gigabeat"
1222 appextra
="recorder:gui"
1225 toolset
="$gigabeatbitmaptools mknkboot"
1226 boottool
="$rootdir/tools/scramble -gigabeats"
1228 # architecture, manufacturer and model for the target-tree build
1230 t_manufacturer
="imx31"
1231 t_model
="gigabeat-s"
1236 modelname
="mrobe500"
1237 target
="-DMROBE_500"
1240 # tool="$rootdir/tools/scramble -add=m500"
1242 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1243 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1244 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1245 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1246 output
="rockbox.mrobe500"
1247 appextra
="recorder:gui"
1250 toolset
=$gigabeatbitmaptools
1252 bootoutput
="rockbox.mrboot"
1253 # architecture, manufacturer and model for the target-tree build
1255 t_manufacturer
="tms320dm320"
1261 modelname
="mrobe100"
1262 target
="-DMROBE_100"
1265 tool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1266 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1267 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1268 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1269 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1270 output
="rockbox.mi4"
1271 appextra
="recorder:gui"
1274 boottool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1275 bootoutput
="pp5020.mi4"
1276 # toolset is the tools within the tools directory that we build for
1277 # this particular target.
1278 toolset
="$genericbitmaptools scramble"
1279 # architecture, manufacturer and model for the target-tree build
1281 t_manufacturer
="olympus"
1287 modelname
="logikdax"
1288 target
="-DLOGIK_DAX"
1291 tool
="$rootdir/tools/scramble -add=ldax"
1292 boottool
="$rootdir/tools/scramble -tcc=crc"
1293 bootoutput
="player.rom"
1294 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1295 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1296 output
="rockbox.logik"
1297 appextra
="recorder:gui"
1300 # toolset is the tools within the tools directory that we build for
1301 # this particular target.
1302 toolset
=$tccbitmaptools
1303 # architecture, manufacturer and model for the target-tree build
1305 t_manufacturer
="tcc77x"
1312 target
="-DSANSA_E200"
1313 memory
=32 # supposedly
1315 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1316 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1317 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1318 output
="rockbox.mi4"
1319 appextra
="recorder:gui"
1322 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1323 bootoutput
="PP5022.mi4"
1324 # toolset is the tools within the tools directory that we build for
1325 # this particular target.
1326 toolset
="$genericbitmaptools scramble"
1327 # architecture, manufacturer and model for the target-tree build
1329 t_manufacturer
="sandisk"
1330 t_model
="sansa-e200"
1334 # the e200R model is pretty much identical to the e200, it only has a
1335 # different option to the scramble tool when building a bootloader and
1336 # makes the bootloader output file name in all lower case.
1339 target
="-DSANSA_E200"
1340 memory
=32 # supposedly
1342 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1343 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1344 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1345 output
="rockbox.mi4"
1346 appextra
="recorder:gui"
1349 boottool
="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
1350 bootoutput
="pp5022.mi4"
1351 # toolset is the tools within the tools directory that we build for
1352 # this particular target.
1353 toolset
="$genericbitmaptools scramble"
1354 # architecture, manufacturer and model for the target-tree build
1356 t_manufacturer
="sandisk"
1357 t_model
="sansa-e200"
1363 target
="-DSANSA_C200"
1364 memory
=32 # supposedly
1366 tool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
1367 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1368 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1369 output
="rockbox.mi4"
1370 appextra
="recorder:gui"
1373 boottool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1374 bootoutput
="firmware.mi4"
1375 # toolset is the tools within the tools directory that we build for
1376 # this particular target.
1377 toolset
="$genericbitmaptools scramble"
1378 # architecture, manufacturer and model for the target-tree build
1380 t_manufacturer
="sandisk"
1381 t_model
="sansa-c200"
1387 target
="-DELIO_TPJ1022"
1390 tool
="$rootdir/tools/scramble -add tpj2"
1391 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1392 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1393 output
="rockbox.elio"
1394 appextra
="recorder:gui"
1397 boottool
="$rootdir/tools/scramble -mi4v2"
1398 bootoutput
="pp5020.mi4"
1399 # toolset is the tools within the tools directory that we build for
1400 # this particular target.
1401 toolset
="$genericbitmaptools scramble"
1402 # architecture, manufacturer and model for the target-tree build
1404 t_manufacturer
="tatung"
1414 tool
="$rootdir/tools/scramble -add i7"
1415 boottool
="$rootdir/tools/scramble -tcc=crc"
1416 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1417 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1418 output
="rockbox.iaudio"
1419 appextra
="recorder:gui"
1422 bootoutput
="I7_FW.BIN"
1423 # toolset is the tools within the tools directory that we build for
1424 # this particular target.
1425 toolset
="$tccbitmaptools"
1426 # architecture, manufacturer and model for the target-tree build
1428 t_manufacturer
="tcc77x"
1439 boottool
="$rootdir/tools/scramble -tcc=crc"
1440 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1441 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1442 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1443 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1444 output
="rockbox.iaudio"
1445 appextra
="recorder:gui"
1448 toolset
="$tccbitmaptools"
1449 # architecture, manufacturer and model for the target-tree build
1451 t_manufacturer
="tcc780x"
1456 echo "Please select a supported target platform!"
1462 echo "Platform set to $modelname"
1466 ############################################################################
1467 # Amount of memory, for those that can differ. They have $memory unset at
1471 if [ -z "$memory" ]; then
1475 echo "Enter size of your RAM (in MB): (Defaults to 32)"
1488 echo "Enter size of your RAM (in MB): (defaults to 2)"
1501 echo "Memory size selected: $memory MB"
1505 ##################################################################
1506 # Figure out build "type"
1509 # the ifp7x0 is the only platform that supports building a gdb stub like
1513 gdbstub
="(G)DB stub, "
1516 gdbstub
="(I)installer, "
1523 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, $gdbstub(M)anual (N)"
1529 appsdir
='\$(ROOTDIR)/bootloader'
1531 extradefines
="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
1533 echo "e200R-installer build selected"
1536 if test $t_manufacturer = "archos"; then
1537 # Archos SH-based players do this somewhat differently for
1539 appsdir
='\$(ROOTDIR)/flash/bootbox'
1542 appsdir
='\$(ROOTDIR)/bootloader'
1545 if test -n "$boottool"; then
1548 if test -n "$bootoutput"; then
1552 extradefines
="-DBOOTLOADER -ffunction-sections -fdata-sections"
1554 echo "Bootloader build selected"
1559 extradefines
="-DSIMULATOR"
1560 echo "Simulator build selected"
1563 echo "Advanced build selected"
1567 extradefines
="-DSTUB" # for target makefile symbol EXTRA_DEFINES
1568 appsdir
='\$(ROOTDIR)/gdb'
1577 echo "GDB stub build selected"
1580 appsdir
='\$(ROOTDIR)/manual'
1581 firmdir
='\$(ROOTDIR)/manual/platform' # No Makefile here. Effectively ig:res target
1585 echo "Manual build selected"
1588 if [ "$modelname" = "e200r" ]; then
1589 echo "Do not use the e200R target for regular builds. Use e200 instead."
1593 echo "Normal build selected"
1597 # to be able running "make manual" from non-manual configuration
1600 manualdev
="recorderv2fm"
1603 manualdev
="recorderv2fm"
1609 manualdev
="ipodmini"
1612 manualdev
=$modelname
1616 if [ -z "$debug" ]; then
1617 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
1620 echo "Using source code root directory: $rootdir"
1622 # this was once possible to change at build-time, but no more:
1627 if [ "yes" = "$simulator" ]; then
1628 # setup compiler and things for simulator
1631 if [ -d "archos" ]; then
1632 echo "sub directory archos already present"
1635 echo "created an archos subdirectory for simulating the hard disk"
1639 # Now, figure out version number of the (gcc) compiler we are about to use
1640 gccver
=`$CC -dumpversion`;
1642 # figure out the binutil version too and display it, mostly for the build
1643 # system etc to be able to see it easier
1644 ldver
=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
1646 if [ -z "$gccver" ]; then
1647 echo "WARNING: The compiler you must use ($CC) is not in your path!"
1648 echo "WARNING: this may cause your build to fail since we cannot do the"
1649 echo "WARNING: checks we want now."
1652 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
1655 num1
=`echo $gccver | cut -d . -f1`
1656 num2
=`echo $gccver | cut -d . -f2`
1657 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
1664 echo "Using $CC $gccver ($gccnum)"
1666 if test "$gccnum" -ge "400"; then
1667 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
1668 # so we ignore that warnings for now
1670 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
1673 if test "$gccnum" -ge "401"; then
1674 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
1675 # will break strict-aliasing rules"
1677 GCCOPTS
="$GCCOPTS -fno-strict-aliasing"
1680 if test "$gccnum" -ge "402"; then
1681 # disable warning about "warning: initialized field overwritten" as gcc 4.2
1682 # and later would throw it for several valid cases
1683 GCCOPTS
="$GCCOPTS -Wno-override-init"
1688 echo "Using $LD $ldver"
1690 # check the compiler for SH platforms
1691 if test "$CC" = "sh-elf-gcc"; then
1692 if test "$gccnum" -lt "400"; then
1693 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
1694 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
1696 # figure out patch status
1697 gccpatch
=`$CC --version`;
1699 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
1700 echo "gcc $gccver is rockbox patched"
1701 # then convert -O to -Os to get smaller binaries!
1702 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
1704 echo "WARNING: You use an unpatched gcc compiler: $gccver"
1705 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
1710 if test "$CC" = "m68k-elf-gcc"; then
1711 # convert -O to -Os to get smaller binaries!
1712 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
1715 if test "$1" = "--ccache"; then
1716 echo "Enable ccache for building"
1719 if test "$1" != "--no-ccache"; then
1720 ccache
=`findtool ccache`
1721 if test -n "$ccache"; then
1722 echo "Found and uses ccache ($ccache)"
1727 if test -n "$ccache"; then
1731 if test "X$endian" = "Xbig"; then
1732 defendian
="ROCKBOX_BIG_ENDIAN"
1734 defendian
="ROCKBOX_LITTLE_ENDIAN"
1738 -e "s,@ENDIAN@,${defendian},g" \
1739 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
1740 -e "s,@config_rtc@,$config_rtc,g" \
1741 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
1743 /* This header was made by configure */
1744 #ifndef __BUILD_AUTOCONF_H
1745 #define __BUILD_AUTOCONF_H
1747 /* Define endianess for the target or simulator platform */
1750 /* Define this if you build rockbox to support the logf logging and display */
1751 #undef ROCKBOX_HAS_LOGF
1753 /* optional defines for RTC mod for h1x0 */
1757 #endif /* __BUILD_AUTOCONF_H */
1760 if test -n "$t_cpu"; then
1761 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
1762 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
1763 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
1767 if test "$simulator" = "yes"; then
1768 # add simul make stuff on the #SIMUL# line
1769 simmagic1
="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
1770 simmagic2
="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
1772 # delete the lines that match
1773 simmagic1
='/@SIMUL1@/D'
1774 simmagic2
='/@SIMUL2@/D'
1777 if test "$swcodec" = "yes"; then
1778 voicetoolset
="rbspeexenc voicefont wavtrim"
1780 voicetoolset
="voicefont wavtrim"
1784 -e "s,@ROOTDIR@,${rootdir},g" \
1785 -e "s,@DEBUG@,${debug},g" \
1786 -e "s,@MEMORY@,${memory},g" \
1787 -e "s,@TARGET_ID@,${target_id},g" \
1788 -e "s,@TARGET@,${target},g" \
1789 -e "s,@CPU@,${t_cpu},g" \
1790 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
1791 -e "s,@MODELNAME@,${modelname},g" \
1792 -e "s,@LANGUAGE@,${language},g" \
1793 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
1794 -e "s,@PWD@,${pwd},g" \
1795 -e "s,@CC@,${CC},g" \
1796 -e "s,@LD@,${LD},g" \
1797 -e "s,@AR@,${AR},g" \
1798 -e "s,@AS@,${AS},g" \
1799 -e "s,@OC@,${OC},g" \
1800 -e "s,@WINDRES@,${WINDRES},g" \
1801 -e "s,@DLLTOOL@,${DLLTOOL},g" \
1802 -e "s,@DLLWRAP@,${DLLWRAP},g" \
1803 -e "s,@RANLIB@,${RANLIB},g" \
1804 -e "s,@TOOL@,${tool},g" \
1805 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
1806 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
1807 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
1808 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
1809 -e "s,@OUTPUT@,${output},g" \
1810 -e "s,@APPEXTRA@,${appextra},g" \
1811 -e "s,@ARCHOSROM@,${archosrom},g" \
1812 -e "s,@FLASHFILE@,${flash},g" \
1813 -e "s,@PLUGINS@,${plugins},g" \
1814 -e "s,@CODECS@,${swcodec},g" \
1815 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
1816 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
1817 -e "s,@GCCOPTS@,${GCCOPTS},g" \
1818 -e "s,@TARGET_INC@,${TARGET_INC},g" \
1819 -e "s!@LDOPTS@!${LDOPTS}!g" \
1820 -e "s,@LOADADDRESS@,${loadaddress},g" \
1821 -e "s,@EXTRADEF@,${extradefines},g" \
1822 -e "s,@APPSDIR@,${appsdir},g" \
1823 -e "s,@FIRMDIR@,${firmdir},g" \
1824 -e "s,@TOOLSDIR@,${toolsdir},g" \
1825 -e "s,@APPS@,${apps},g" \
1826 -e "s,@SIMVER@,${simver},g" \
1827 -e "s,@GCCVER@,${gccver},g" \
1828 -e "s,@GCCNUM@,${gccnum},g" \
1829 -e "s,@UNAME@,${uname},g" \
1830 -e "s,@ENDIAN@,${defendian},g" \
1831 -e "s,@TOOLSET@,${toolset},g" \
1834 -e "s,@MANUALDEV@,${manualdev},g" \
1835 -e "s,@ENCODER@,${ENC_CMD},g" \
1836 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
1837 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
1838 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
1839 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
1841 ## Automaticly generated. http://www.rockbox.org/
1849 # old 'make' versions don't have the built-in 'info' function
1850 info=old\$(shell echo >&2 "Consider upgrading to GNU make 3.81+ for optimum build performance.")
1851 ifeq (\$(call info),old)
1852 export info=echo "\$\$(1)";
1855 export ROOTDIR=@ROOTDIR@
1856 export FIRMDIR=@FIRMDIR@
1857 export APPSDIR=@APPSDIR@
1858 export TOOLSDIR=@TOOLSDIR@
1859 export DOCSDIR=\$(ROOTDIR)/docs
1860 export MANUALDIR=\${ROOTDIR}/manual
1861 export DEBUG=@DEBUG@
1862 export MODELNAME=@MODELNAME@
1863 export ARCHOSROM=@ARCHOSROM@
1864 export FLASHFILE=@FLASHFILE@
1865 export TARGET_ID=@TARGET_ID@
1866 export TARGET=@TARGET@
1868 export MANUFACTURER=@MANUFACTURER@
1870 export BUILDDIR=@PWD@
1871 export LANGUAGE=@LANGUAGE@
1872 export VOICELANGUAGE=@VOICELANGUAGE@
1873 export MEMORYSIZE=@MEMORY@
1874 export VERSION=\$(shell \$(ROOTDIR)/tools/svnversion.sh \$(ROOTDIR))
1875 export BUILDDATE=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
1876 export MKFIRMWARE=@TOOL@
1877 export BMP2RB_MONO=@BMP2RB_MONO@
1878 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
1879 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
1880 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
1881 export BINARY=@OUTPUT@
1882 export APPEXTRA=@APPEXTRA@
1883 export ENABLEDPLUGINS=@PLUGINS@
1884 export SOFTWARECODECS=@CODECS@
1885 export EXTRA_DEFINES=@EXTRADEF@
1893 export WINDRES=@WINDRES@
1894 export DLLTOOL=@DLLTOOL@
1895 export DLLWRAP=@DLLWRAP@
1896 export RANLIB=@RANLIB@
1897 export PROFILE_OPTS=@PROFILE_OPTS@
1898 export SIMVER=@SIMVER@
1899 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
1900 export GCCOPTS=@GCCOPTS@
1901 export TARGET_INC=@TARGET_INC@
1902 export LOADADDRESS=@LOADADDRESS@
1903 export SHARED_FLAG=@SHARED_FLAG@
1904 export LDOPTS=@LDOPTS@
1905 export GCCVER=@GCCVER@
1906 export GCCNUM=@GCCNUM@
1907 export UNAME=@UNAME@
1908 export MANUALDEV=@MANUALDEV@
1909 export TTS_OPTS=@TTS_OPTS@
1910 export TTS_ENGINE=@TTS_ENGINE@
1911 export ENC_OPTS=@ENC_OPTS@
1912 export ENCODER=@ENCODER@
1914 # Do not print "Entering directory ..."
1915 MAKEFLAGS += --no-print-directory
1917 .PHONY: all clean tags zip tools manual bin build info
1922 \$(SILENT)\$(TOOLSDIR)/mkinfo.pl \$(BUILDDIR)/rockbox-info.txt
1927 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
1928 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@
1933 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
1934 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ \$(BUILDDIR)/\$(BINARY)
1937 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ rocks
1939 veryclean: clean toolsclean
1942 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) clean
1945 \$(SILENT)echo Cleaning build directory
1946 \$(SILENT)rm -rf rockbox.zip TAGS @APPS@ firmware comsim sim lang.[ch]\
1947 manual *.pdf *.a credits.raw @OUTPUT@ bitmaps pluginbitmaps \
1948 @ARCHOSROM@ @FLASHFILE@ UI256.bmp rockbox-full.zip \
1949 html txt rockbox-manual*.zip sysfont.h rockbox-info.txt \
1950 voicefontids *.wav *.mp3 *.voice
1953 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @TOOLSET@
1956 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @VOICETOOLSET@
1959 \$(SILENT)rm -f TAGS
1960 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) tags
1961 \$(SILENT)\$(MAKE) -C \$(APPSDIR) tags
1962 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins tags
1963 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins/lib tags
1966 \$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\" -r "\$(ROOTDIR)" -f 1 -o rockbox-fonts.zip \$(TARGET) \$(BINARY)
1969 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
1970 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
1973 \$(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip
1976 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
1977 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" -f 2 -o rockbox-full.zip \$(TARGET) \$(BINARY)
1980 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
1981 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.7z" -z "7za a" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
1984 \$(SILENT)rm -f rockbox.tar
1985 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
1986 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.tar" -z "tar --no-recursion -uf" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
1989 \$(SILENT)bzip2 -f9 rockbox.tar
1992 \$(SILENT)gzip -f9 rockbox.tar
1996 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-pdf
1998 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-html
1999 manual-zhtml: manual-zip
2001 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt
2003 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt-zip
2005 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-zip
2008 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ features
2011 @echo "A few helpful make targets"
2013 @echo "all - builds a full Rockbox (default), including tools"
2014 @echo "bin - builds only the Rockbox.<target name> file"
2015 @echo "clean - cleans a build directory (not tools)"
2016 @echo "veryclean - cleans the build and tools directories"
2017 @echo "manual - builds a manual"
2018 @echo "manual-html - HTML manual"
2019 @echo "manual-zip - HTML manual (zipped)"
2020 @echo "manual-txt - txt manual"
2021 @echo "fullzip - creates a rockbox.zip of your build with fonts"
2022 @echo "zip - creates a rockbox.zip of your build (no fonts)"
2023 @echo "gzip - creates a rockbox.tar.gz of your build (no fonts)"
2024 @echo "bzip2 - creates a rockbox.tar.bz2 of your build (no fonts)"
2025 @echo "7zip - creates a rockbox.7z of your build (no fonts)"
2026 @echo "fontzip - creates rockbox-fonts.zip"
2027 @echo "mapzip - creates rockbox-maps.zip with all .map files"
2028 @echo "tools - builds the tools only"
2029 @echo "voicetools - builds the voice tools only"
2030 @echo "install - installs your build (for simulator builds only)"
2034 if [ "yes" = "$simulator" ]; then
2036 cat >> Makefile
<<EOF
2039 @echo "installing a full setup in your archos dir"
2040 @(\$(MAKE) fullzip && cd archos && unzip -oq ../rockbox-full.zip)
2045 if [ "yes" = "$voice" ]; then
2047 cat >> Makefile
<<EOF
2049 voice: voicetools features
2050 \$(SILENT)for f in \`cat \$(BUILDDIR)/${apps}/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
2051 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 \\
2056 echo "Created Makefile"