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*
178 # functions for setting up cross-compiler names and options
179 # also set endianess and what the exact recommended gcc version is
180 # the gcc version should most likely match what versions we build with
185 GCCOPTS
="$CCOPTS -m1"
186 GCCOPTIMIZE
="-fomit-frame-pointer -fschedule-insns"
192 prefixtools calmrisc16-unknown-elf-
193 GCCOPTS
="-Wl\,--no-check-sections $CCOPTS"
194 GCCOPTIMIZE
="-fomit-frame-pointer"
199 prefixtools m68k-elf-
200 GCCOPTS
="$CCOPTS -m5206e -Wa\,-m5249 -malign-int -mstrict-align"
201 GCCOPTIMIZE
="-fomit-frame-pointer"
208 GCCOPTS
="$CCOPTS -mcpu=arm7tdmi"
209 if test "X$1" != "Xshort"; then
210 GCCOPTS
="$GCCOPTS -mlong-calls"
212 GCCOPTIMIZE
="-fomit-frame-pointer"
219 GCCOPTS
="$CCOPTS -mcpu=arm9tdmi -mlong-calls"
220 GCCOPTIMIZE
="-fomit-frame-pointer"
227 GCCOPTS
="$CCOPTS -mcpu=arm9e -mlong-calls"
228 GCCOPTIMIZE
="-fomit-frame-pointer"
235 GCCOPTS
="$CCOPTS -mcpu=arm926ej-s -mlong-calls"
236 GCCOPTIMIZE
="-fomit-frame-pointer"
243 GCCOPTS
="$CCOPTS -mcpu=arm1136jf-s -mlong-calls"
244 GCCOPTIMIZE
="-fomit-frame-pointer"
250 ##################################################################
251 # Prompt for specific developer options
254 echo "Enter your developer options (press enter when done)"
255 echo -n "(D)EBUG, (L)ogf, (S)imulator, (P)rofiling, (V)oice"
256 if [ "$memory" = "2" ]; then
257 echo -n ", (8)MB MOD"
259 if [ "$modelname" = "h120" ]; then
260 echo -n ", (R)TC MOD"
266 while [ $cont = "1" ]; do
272 if [ "yes" = "$profile" ]; then
273 echo "Debug is incompatible with profiling"
280 echo "logf() support enabled"
284 echo "Simulator build enabled"
288 if [ "yes" = "$use_debug" ]; then
289 echo "Profiling is incompatible with debug"
291 echo "Profiling support is enabled"
296 echo "Voice build selected"
300 if [ "$memory" = "2" ]; then
302 echo "Memory size selected: 8MB"
308 if [ "$modelname" = "h120" ]; then
309 config_rtc
="#define CONFIG_RTC RTC_DS1339_DS3231"
310 have_rtc_alarm
="#define HAVE_RTC_ALARM"
311 echo "RTC functions enabled (DS1339/DS3231)"
323 if [ "yes" = "$voice" ]; then
324 # Ask about languages to build
325 echo "Select a number for the language to use (default is english)"
326 # The multiple-language feature is currently broken
327 # echo "You may enter a comma-separated list of languages to build"
330 voicelanguage
=`whichlang`
332 if [ -z "$voicelanguage" ]; then
334 voicelanguage
="english"
336 echo "Voice language set to $voicelanguage"
338 # Configure encoder and TTS engine for each language
339 for thislang
in `echo $voicelanguage | sed 's/,/ /g'`; do
340 voiceconfig
"$thislang"
343 if [ "yes" = "$use_debug" ]; then
345 GCCOPTS
="$GCCOPTS -g -DDEBUG"
347 if [ "yes" = "$logf" ]; then
348 use_logf
="#define ROCKBOX_HAS_LOGF 1"
350 if [ "yes" = "$simulator" ]; then
352 extradefines
="$extradefines -DSIMULATOR"
354 if [ "yes" = "$profile" ]; then
355 extradefines
="$extradefines -DRB_PROFILE"
356 PROFILE_OPTS
="-finstrument-functions"
360 # Configure voice settings
363 echo "Building $thislang voice for $modelname. Select options"
366 if [ -f "`which flite`" ]; then
370 DEFAULT_TTS_OPTS
=$FLITE_OPTS
371 DEFAULT_NOISEFLOOR
="500"
374 if [ -f "`which espeak`" ]; then
378 DEFAULT_TTS_OPTS
=$ESPEAK_OPTS
379 DEFAULT_NOISEFLOOR
="500"
382 if [ -f "`which festival`" ]; then
383 FESTIVAL
="(F)estival "
386 FESTIVAL_OPTS
="--language italian"
389 FESTIVAL_OPTS
="--language spanish"
392 FESTIVAL_OPTS
="--language finnish"
395 FESTIVAL_OPTS
="--language czech"
401 DEFAULT_TTS
="festival"
402 DEFAULT_TTS_OPTS
=$FESTIVAL_OPTS
403 DEFAULT_NOISEFLOOR
="500"
406 if [ -f "`which swift`" ]; then
410 DEFAULT_TTS_OPTS
=$SWIFT_OPTS
411 DEFAULT_NOISEFLOOR
="500"
414 # Allow SAPI if Windows is in use
415 if [ -f "`which winver`" ]; then
419 DEFAULT_TTS_OPTS
=$SAPI_OPTS
420 DEFAULT_NOISEFLOOR
="500"
424 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
425 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
429 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
434 NOISEFLOOR
="500" # TODO: check this value
440 TTS_OPTS
=$ESPEAK_OPTS
443 TTS_ENGINE
="festival"
445 TTS_OPTS
=$FESTIVAL_OPTS
458 TTS_ENGINE
=$DEFAULT_TTS
459 TTS_OPTS
=$DEFAULT_TTS_OPTS
460 NOISEFLOOR
=$DEFAULT_NOISEFLOOR
462 echo "Using $TTS_ENGINE for TTS"
464 # Allow the user to input manual commandline options
465 printf "Enter $TTS_ENGINE options (enter for defaults \"$TTS_OPTS\"): "
466 USER_TTS_OPTS
=`input`
467 if [ -n "$USER_TTS_OPTS" ]; then
468 TTS_OPTS
="$USER_TTS_OPTS"
473 if [ "$swcodec" = "yes" ]; then
476 ENC_OPTS
="-q 4 -c 10"
478 if [ -f "`which lame`" ]; then
481 ENC_OPTS
="--resample 12 -t -m m -h -V 9 -S -B 64 --vbr-new"
483 echo "You need LAME in the system path to build voice files for"
484 echo "HWCODEC targets."
489 echo "Using $ENCODER for encoding voice clips"
491 # Allow the user to input manual commandline options
492 printf "Enter $ENCODER options (enter for defaults \"$ENC_OPTS\"): "
493 USER_ENC_OPTS
=`input`
494 if [ -n "$USER_ENC_OPTS" ]; then
495 ENC_OPTS
=$USER_ENC_OPTS
499 if [ -f "`which cygpath`" ]; then
500 TEMPDIR
=`cygpath . -a -w`
505 # figure out which languages that are around
506 for file in $rootdir/apps
/lang
/*.lang
; do
507 clean
=`echo $file | sed -e 's:.*/::g' | cut "-d." -f1`
508 langs
="$langs $clean"
512 for one
in $langs; do
522 # Allow the user to pass a comma-separated list of langauges
523 for thispick
in `echo $pick | sed 's/,/ /g'`; do
525 for one
in $langs; do
526 # Accept both the language number and name
527 if [ "$num" = "$thispick" ] ||
[ "$thispick" = "$one" ]; then
528 if [ "$output" = "" ]; then
542 if test "$opt" = "--help"; then
543 echo "Rockbox configure script."
544 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
545 echo "Do *NOT* run this within the tools directory!"
547 echo "Usage: configure [--ccache][--no-ccache]"
551 if test -r "configure"; then
552 # this is a check for a configure script in the current directory, it there
553 # is one, try to figure out if it is this one!
555 if { grep "^# Jukebox" configure
>/dev
/null
2>&1 ; } then
556 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
557 echo "It will only cause you pain and grief. Instead do this:"
560 echo " mkdir build-dir"
562 echo " ../tools/configure"
564 echo "Much happiness will arise from this. Enjoy"
569 # get our current directory
572 if { echo $pwd |
grep " "; } then
573 echo "You're running this script in a path that contains space. The build"
574 echo "system is unfortunately not clever enough to deal with this. Please"
575 echo "run the script from a different path, rename the path or fix the build"
580 if [ -z "$rootdir" ]; then
581 ##################################################################
582 # Figure out where the source code root is!
584 rootdir
=`dirname $0`/..
/
586 #####################################################################
587 # Convert the possibly relative directory name to an absolute version
593 # cd back to the build dir
598 appsdir
='\$(ROOTDIR)/apps'
599 firmdir
='\$(ROOTDIR)/firmware'
600 toolsdir
='\$(ROOTDIR)/tools'
603 ##################################################################
604 # Figure out target platform
607 echo "Enter target platform:"
609 ==Archos== ==iriver== ==Apple iPod==
610 0) Player/Studio 10) H120/H140 20) Color/Photo
611 1) Recorder 11) H320/H340 21) Nano
612 2) FM Recorder 12) iHP-100/110/115 22) Video
613 3) Recorder v2 13) iFP-790 23) 3G
614 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
615 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
619 ==iAudio== ==Toshiba== ==SanDisk==
620 30) X5/X5V/X5L 40) Gigabeat F 50) Sansa e200
621 31) M5/M5L 41) Gigabeat S 51) Sansa e200R
625 ==Tatung== ==Olympus== ==Logik==
626 60) Elio TPJ-1022 70) M:Robe 500 80) DAX 1GB MP3/DAB
634 # Set of tools built for all target platforms:
635 toolset
="rdf2binary convbdf codepages"
637 # Toolsets for some target families:
638 archosbitmaptools
="$toolset scramble descramble sh2d uclpack bmp2rb"
639 iriverbitmaptools
="$toolset scramble descramble mkboot bmp2rb"
640 iaudiobitmaptools
="$toolset scramble descramble mkboot bmp2rb"
641 ipodbitmaptools
="$toolset scramble bmp2rb"
642 gigabeatbitmaptools
="$toolset scramble descramble bmp2rb"
643 tccbitmaptools
="$toolset scramble mktccboot bmp2rb"
644 # generic is used by IFP, H10, Sansa-e200
645 genericbitmaptools
="$toolset bmp2rb"
648 # ---- For each target ----
651 # target_id: a unique number identifying this target, IS NOT the menu number.
652 # Just use the currently highest number+1 when you add a new
654 # modelname: short model name used all over to identify this target
655 # memory: number of megabytes of RAM this target has. If the amount can
656 # be selected by the size prompt, let memory be unset here
657 # target: -Ddefine passed to the build commands to make the correct
658 # config-*.h file get included etc
659 # tool: the tool that takes a plain binary and converts that into a
660 # working "firmware" file for your target
661 # output: the final output file name
662 # boottool: the tool that takes a plain binary and generates a bootloader
663 # file for your target (or blank to use $tool)
664 # bootoutput:the final output file name for the bootloader (or blank to use
666 # appextra: passed to the APPEXTRA variable in the Makefiles.
667 # TODO: add proper explanation
668 # archosrom: used only for Archos targets that build a special flashable .ucl
670 # flash: name of output for flashing, for targets where there's a special
671 # file output for this.
672 # plugins: set to 'yes' to build the plugins. Early development builds can
673 # set this to no in the early stages to have an easier life for a
675 # swcodec: set 'yes' on swcodec targets
676 # toolset: lists what particular tools in the tools/ directory that this
677 # target needs to have built prior to building Rockbox
680 # *cc: sets up gcc and compiler options for your target builds. Note
681 # that if you select a simulator build, the compiler selection is
682 # overridden later in the script.
689 target
="-DARCHOS_PLAYER"
691 tool
="$rootdir/tools/scramble"
693 appextra
="player:gui"
694 archosrom
="$pwd/rombox.ucl"
695 flash
="$pwd/rockbox.ucl"
699 # toolset is the tools within the tools directory that we build for
700 # this particular target.
701 toolset
="$toolset scramble descramble sh2d player_unifont uclpack"
703 # Note: the convbdf is present in the toolset just because: 1) the
704 # firmware/Makefile assumes it is present always, and 2) we will need it when we
705 # build the player simulator
708 t_manufacturer
="archos"
715 target
="-DARCHOS_RECORDER"
717 tool
="$rootdir/tools/scramble"
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
="fmrecorder"
737 target
="-DARCHOS_FMRECORDER"
739 tool
="$rootdir/tools/scramble -fm"
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"
758 modelname
="recorderv2"
759 target
="-DARCHOS_RECORDERV2"
761 tool
="$rootdir/tools/scramble -v2"
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_ONDIOSP"
783 tool
="$rootdir/tools/scramble -osp"
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 is the tools within the tools directory that we build for
793 # this particular target.
794 toolset
=$archosbitmaptools
796 t_manufacturer
="archos"
803 target
="-DARCHOS_ONDIOFM"
805 tool
="$rootdir/tools/scramble -ofm"
806 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
807 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
809 appextra
="recorder:gui"
810 #archosrom="$pwd/rombox.ucl"
811 flash
="$pwd/rockbox.ucl"
814 toolset
=$archosbitmaptools
816 t_manufacturer
="archos"
823 target
="-DARCHOS_AV300"
826 tool
="$rootdir/tools/scramble -mm=C"
827 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
828 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
830 appextra
="recorder:gui"
833 # toolset is the tools within the tools directory that we build for
834 # this particular target.
835 toolset
="$toolset scramble descramble bmp2rb"
836 # architecture, manufacturer and model for the target-tree build
838 t_manufacturer
="archos"
845 target
="-DIRIVER_H120"
848 tool
="$rootdir/tools/scramble -add=h120"
849 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
850 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
851 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
852 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
853 output
="rockbox.iriver"
854 appextra
="recorder:gui"
855 flash
="$pwd/rombox.iriver"
858 # toolset is the tools within the tools directory that we build for
859 # this particular target.
860 toolset
=$iriverbitmaptools
862 t_manufacturer
="iriver"
869 target
="-DIRIVER_H300"
872 tool
="$rootdir/tools/scramble -add=h300"
873 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
874 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
875 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
876 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
877 output
="rockbox.iriver"
878 appextra
="recorder:gui"
881 # toolset is the tools within the tools directory that we build for
882 # this particular target.
883 toolset
=$iriverbitmaptools
885 t_manufacturer
="iriver"
892 target
="-DIRIVER_H100"
895 tool
="$rootdir/tools/scramble -add=h100"
896 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
897 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
898 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
899 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
900 output
="rockbox.iriver"
901 appextra
="recorder:gui"
902 flash
="$pwd/rombox.iriver"
905 # toolset is the tools within the tools directory that we build for
906 # this particular target.
907 toolset
=$iriverbitmaptools
909 t_manufacturer
="iriver"
916 target
="-DIRIVER_IFP7XX"
920 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
921 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
923 appextra
="recorder:gui"
926 # toolset is the tools within the tools directory that we build for
927 # this particular target.
928 toolset
=$genericbitmaptools
930 t_manufacturer
="pnx0101"
931 t_model
="iriver-ifp7xx"
937 target
="-DIRIVER_H10"
940 tool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
941 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
942 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
944 appextra
="recorder:gui"
947 boottool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
948 bootoutput
="H10_20GC.mi4"
949 # toolset is the tools within the tools directory that we build for
950 # this particular target.
951 toolset
="$genericbitmaptools scramble"
952 # architecture, manufacturer and model for the target-tree build
954 t_manufacturer
="iriver"
961 target
="-DIRIVER_H10_5GB"
964 tool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
965 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
966 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
968 appextra
="recorder:gui"
971 boottool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
973 # toolset is the tools within the tools directory that we build for
974 # this particular target.
975 toolset
="$genericbitmaptools scramble"
976 # architecture, manufacturer and model for the target-tree build
978 t_manufacturer
="iriver"
984 modelname
="ipodcolor"
985 target
="-DIPOD_COLOR"
988 tool
="$rootdir/tools/scramble -add=ipco"
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
="ipodnano"
1008 target
="-DIPOD_NANO"
1011 tool
="$rootdir/tools/scramble -add=nano"
1012 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1013 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1014 output
="rockbox.ipod"
1015 appextra
="recorder:gui"
1018 bootoutput
="bootloader-$modelname.ipod"
1019 # toolset is the tools within the tools directory that we build for
1020 # this particular target.
1021 toolset
=$ipodbitmaptools
1022 # architecture, manufacturer and model for the target-tree build
1024 t_manufacturer
="ipod"
1030 modelname
="ipodvideo"
1031 target
="-DIPOD_VIDEO"
1033 tool
="$rootdir/tools/scramble -add=ipvd"
1034 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1035 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
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=ip3g"
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"
1079 tool
="$rootdir/tools/scramble -add=ip4g"
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
="ipodmini"
1099 target
="-DIPOD_MINI"
1102 tool
="$rootdir/tools/scramble -add=mini"
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
="ipodmini2g"
1122 target
="-DIPOD_MINI2G"
1125 tool
="$rootdir/tools/scramble -add=mn2g"
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"
1144 modelname
="ipod1g2g"
1145 target
="-DIPOD_1G2G"
1148 tool
="$rootdir/tools/scramble -add=1g2g"
1149 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1150 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1151 output
="rockbox.ipod"
1152 appextra
="recorder:gui"
1155 bootoutput
="bootloader-$modelname.ipod"
1156 # toolset is the tools within the tools directory that we build for
1157 # this particular target.
1158 toolset
=$ipodbitmaptools
1159 # architecture, manufacturer and model for the target-tree build
1161 t_manufacturer
="ipod"
1168 target
="-DIAUDIO_X5"
1171 tool
="$rootdir/tools/scramble -add=iax5"
1172 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1173 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1174 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1175 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1176 output
="rockbox.iaudio"
1177 appextra
="recorder:gui"
1180 # toolset is the tools within the tools directory that we build for
1181 # this particular target.
1182 toolset
="$iaudiobitmaptools"
1183 # architecture, manufacturer and model for the target-tree build
1185 t_manufacturer
="iaudio"
1192 target
="-DIAUDIO_M5"
1195 tool
="$rootdir/tools/scramble -add=iam5"
1196 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1197 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1198 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1199 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1200 output
="rockbox.iaudio"
1201 appextra
="recorder:gui"
1204 # toolset is the tools within the tools directory that we build for
1205 # this particular target.
1206 toolset
="$iaudiobitmaptools"
1207 # architecture, manufacturer and model for the target-tree build
1209 t_manufacturer
="iaudio"
1215 modelname
="gigabeatf"
1216 target
="-DGIGABEAT_F"
1219 tool
="$rootdir/tools/scramble -add=giga"
1220 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1221 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1222 output
="rockbox.gigabeat"
1223 appextra
="recorder:gui"
1226 toolset
=$gigabeatbitmaptools
1227 boottool
="$rootdir/tools/scramble -gigabeat"
1228 bootoutput
="FWIMG01.DAT"
1229 # architecture, manufacturer and model for the target-tree build
1231 t_manufacturer
="s3c2440"
1232 t_model
="gigabeat-fx"
1237 modelname
="gigabeats"
1238 target
="-DGIGABEAT_S"
1241 tool
="$rootdir/tools/scramble -add=gigs"
1242 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1243 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1244 output
="rockbox.gigabeat"
1245 appextra
="recorder:gui"
1248 toolset
="$gigabeatbitmaptools mknkboot"
1249 boottool
="$rootdir/tools/scramble -gigabeats"
1251 # architecture, manufacturer and model for the target-tree build
1253 t_manufacturer
="imx31"
1254 t_model
="gigabeat-s"
1259 modelname
="mrobe500"
1260 target
="-DMROBE_500"
1263 # tool="$rootdir/tools/scramble -add=m500"
1265 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1266 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1267 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1268 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1269 output
="rockbox.mrobe500"
1270 appextra
="recorder:gui"
1273 toolset
=$gigabeatbitmaptools
1275 bootoutput
="rockbox.mrboot"
1276 # architecture, manufacturer and model for the target-tree build
1278 t_manufacturer
="tms320dm320"
1284 modelname
="mrobe100"
1285 target
="-DMROBE_100"
1288 tool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1289 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1290 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1291 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1292 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1293 output
="rockbox.mi4"
1294 appextra
="recorder:gui"
1297 boottool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1298 bootoutput
="pp5020.mi4"
1299 # toolset is the tools within the tools directory that we build for
1300 # this particular target.
1301 toolset
="$genericbitmaptools scramble"
1302 # architecture, manufacturer and model for the target-tree build
1304 t_manufacturer
="olympus"
1310 modelname
="logikdax"
1311 target
="-DLOGIK_DAX"
1314 tool
="$rootdir/tools/scramble -add=ldax"
1315 boottool
="$rootdir/tools/scramble -tcc=crc"
1316 bootoutput
="player.rom"
1317 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1318 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1319 output
="rockbox.logik"
1320 appextra
="recorder:gui"
1323 # toolset is the tools within the tools directory that we build for
1324 # this particular target.
1325 toolset
=$tccbitmaptools
1326 # architecture, manufacturer and model for the target-tree build
1328 t_manufacturer
="tcc77x"
1334 modelname
="creativezvm"
1335 target
="-DCREATIVE_ZVM"
1338 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1339 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1340 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1341 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1342 output
="rockbox.zvm"
1343 appextra
="recorder:gui"
1346 toolset
=$gigabeatbitmaptools
1347 boottool
="$rootdir/tools/scramble -zvm"
1348 bootoutput
="rockbox.zvmboot"
1349 # architecture, manufacturer and model for the target-tree build
1351 t_manufacturer
="tms320dm320"
1352 t_model
="creative-zvm"
1358 target
="-DSANSA_E200"
1359 memory
=32 # supposedly
1361 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1362 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1363 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1364 output
="rockbox.mi4"
1365 appextra
="recorder:gui"
1368 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1369 bootoutput
="PP5022.mi4"
1370 # toolset is the tools within the tools directory that we build for
1371 # this particular target.
1372 toolset
="$genericbitmaptools scramble"
1373 # architecture, manufacturer and model for the target-tree build
1375 t_manufacturer
="sandisk"
1376 t_model
="sansa-e200"
1380 # the e200R model is pretty much identical to the e200, it only has a
1381 # different option to the scramble tool when building a bootloader and
1382 # makes the bootloader output file name in all lower case.
1385 target
="-DSANSA_E200"
1386 memory
=32 # supposedly
1388 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1389 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1390 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1391 output
="rockbox.mi4"
1392 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"
1419 boottool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1420 bootoutput
="firmware.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
1426 t_manufacturer
="sandisk"
1427 t_model
="sansa-c200"
1433 target
="-DELIO_TPJ1022"
1436 tool
="$rootdir/tools/scramble -add tpj2"
1437 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1438 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1439 output
="rockbox.elio"
1440 appextra
="recorder:gui"
1443 boottool
="$rootdir/tools/scramble -mi4v2"
1444 bootoutput
="pp5020.mi4"
1445 # toolset is the tools within the tools directory that we build for
1446 # this particular target.
1447 toolset
="$genericbitmaptools scramble"
1448 # architecture, manufacturer and model for the target-tree build
1450 t_manufacturer
="tatung"
1460 tool
="$rootdir/tools/scramble -add i7"
1461 boottool
="$rootdir/tools/scramble -tcc=crc"
1462 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1463 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1464 output
="rockbox.iaudio"
1465 appextra
="recorder:gui"
1468 bootoutput
="I7_FW.BIN"
1469 # toolset is the tools within the tools directory that we build for
1470 # this particular target.
1471 toolset
="$tccbitmaptools"
1472 # architecture, manufacturer and model for the target-tree build
1474 t_manufacturer
="tcc77x"
1484 tool
="$rootdir/tools/scramble -add=d2"
1485 boottool
="$rootdir/tools/scramble -tcc=crc"
1486 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1487 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1488 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1489 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1490 output
="rockbox.iaudio"
1491 appextra
="recorder:gui"
1494 toolset
="$tccbitmaptools"
1495 # architecture, manufacturer and model for the target-tree build
1497 t_manufacturer
="tcc780x"
1502 echo "Please select a supported target platform!"
1508 echo "Platform set to $modelname"
1512 ############################################################################
1513 # Amount of memory, for those that can differ. They have $memory unset at
1517 if [ -z "$memory" ]; then
1521 echo "Enter size of your RAM (in MB): (Defaults to 32)"
1534 echo "Enter size of your RAM (in MB): (defaults to 2)"
1547 echo "Memory size selected: $memory MB"
1551 ##################################################################
1552 # Figure out build "type"
1555 # the ifp7x0 is the only platform that supports building a gdb stub like
1559 gdbstub
="(G)DB stub, "
1562 gdbstub
="(I)installer, "
1569 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, $gdbstub(M)anual (N)"
1575 appsdir
='\$(ROOTDIR)/bootloader'
1577 extradefines
="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
1579 echo "e200R-installer build selected"
1582 if test $t_manufacturer = "archos"; then
1583 # Archos SH-based players do this somewhat differently for
1585 appsdir
='\$(ROOTDIR)/flash/bootbox'
1588 appsdir
='\$(ROOTDIR)/bootloader'
1591 if test -n "$boottool"; then
1594 if test -n "$bootoutput"; then
1598 extradefines
="-DBOOTLOADER -ffunction-sections -fdata-sections"
1600 echo "Bootloader build selected"
1605 extradefines
="-DSIMULATOR"
1606 echo "Simulator build selected"
1609 echo "Advanced build selected"
1613 extradefines
="-DSTUB" # for target makefile symbol EXTRA_DEFINES
1614 appsdir
='\$(ROOTDIR)/gdb'
1623 echo "GDB stub build selected"
1628 echo "Manual build selected"
1631 if [ "$modelname" = "e200r" ]; then
1632 echo "Do not use the e200R target for regular builds. Use e200 instead."
1636 echo "Normal build selected"
1640 # to be able running "make manual" from non-manual configuration
1643 manualdev
="recorderv2fm"
1646 manualdev
="recorderv2fm"
1652 manualdev
="ipodmini"
1655 manualdev
=$modelname
1659 if [ -z "$debug" ]; then
1660 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
1663 echo "Using source code root directory: $rootdir"
1665 # this was once possible to change at build-time, but no more:
1670 if [ "yes" = "$simulator" ]; then
1671 # setup compiler and things for simulator
1674 if [ -d "archos" ]; then
1675 echo "sub directory archos already present"
1678 echo "created an archos subdirectory for simulating the hard disk"
1682 # Now, figure out version number of the (gcc) compiler we are about to use
1683 gccver
=`$CC -dumpversion`;
1685 # figure out the binutil version too and display it, mostly for the build
1686 # system etc to be able to see it easier
1687 ldver
=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
1689 if [ -z "$gccver" ]; then
1690 echo "WARNING: The compiler you must use ($CC) is not in your path!"
1691 echo "WARNING: this may cause your build to fail since we cannot do the"
1692 echo "WARNING: checks we want now."
1695 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
1698 num1
=`echo $gccver | cut -d . -f1`
1699 num2
=`echo $gccver | cut -d . -f2`
1700 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
1707 echo "Using $CC $gccver ($gccnum)"
1709 if test "$gccnum" -ge "400"; then
1710 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
1711 # so we ignore that warnings for now
1713 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
1716 if test "$gccnum" -ge "401"; then
1717 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
1718 # will break strict-aliasing rules"
1720 GCCOPTS
="$GCCOPTS -fno-strict-aliasing"
1723 if test "$gccnum" -ge "402"; then
1724 # disable warning about "warning: initialized field overwritten" as gcc 4.2
1725 # and later would throw it for several valid cases
1726 GCCOPTS
="$GCCOPTS -Wno-override-init"
1734 # cross-compile for win32
1737 # Verify that the cross-compiler is of a recommended version!
1738 if test "$gccver" != "$gccchoice"; then
1739 echo "WARNING: Your cross-compiler $CC $gccver is not of the recommended"
1740 echo "WARNING: version $gccchoice!"
1741 echo "WARNING: This may cause your build to fail since it may be a version"
1742 echo "WARNING: that isn't functional or known to not be the best choice."
1743 echo "WARNING: If you suffer from build problems, you know that this is"
1744 echo "WARNING: a likely source for them..."
1752 echo "Using $LD $ldver"
1754 # check the compiler for SH platforms
1755 if test "$CC" = "sh-elf-gcc"; then
1756 if test "$gccnum" -lt "400"; then
1757 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
1758 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
1760 # figure out patch status
1761 gccpatch
=`$CC --version`;
1763 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
1764 echo "gcc $gccver is rockbox patched"
1765 # then convert -O to -Os to get smaller binaries!
1766 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
1768 echo "WARNING: You use an unpatched gcc compiler: $gccver"
1769 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
1774 if test "$CC" = "m68k-elf-gcc"; then
1775 # convert -O to -Os to get smaller binaries!
1776 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
1779 if test "$1" = "--ccache"; then
1780 echo "Enable ccache for building"
1783 if test "$1" != "--no-ccache"; then
1784 ccache
=`findtool ccache`
1785 if test -n "$ccache"; then
1786 echo "Found and uses ccache ($ccache)"
1791 if test -n "$ccache"; then
1795 if test "X$endian" = "Xbig"; then
1796 defendian
="ROCKBOX_BIG_ENDIAN"
1798 defendian
="ROCKBOX_LITTLE_ENDIAN"
1802 -e "s,@ENDIAN@,${defendian},g" \
1803 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
1804 -e "s,@config_rtc@,$config_rtc,g" \
1805 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
1807 /* This header was made by configure */
1808 #ifndef __BUILD_AUTOCONF_H
1809 #define __BUILD_AUTOCONF_H
1811 /* Define endianess for the target or simulator platform */
1814 /* Define this if you build rockbox to support the logf logging and display */
1815 #undef ROCKBOX_HAS_LOGF
1817 /* optional defines for RTC mod for h1x0 */
1821 #endif /* __BUILD_AUTOCONF_H */
1824 if test -n "$t_cpu"; then
1825 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
1826 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
1827 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
1831 if test "$simulator" = "yes"; then
1832 # add simul make stuff on the #SIMUL# line
1833 simmagic1
="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
1834 simmagic2
="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
1836 # delete the lines that match
1837 simmagic1
='/@SIMUL1@/D'
1838 simmagic2
='/@SIMUL2@/D'
1841 if test "$swcodec" = "yes"; then
1842 voicetoolset
="rbspeexenc voicefont wavtrim"
1844 voicetoolset
="voicefont wavtrim"
1847 if test "$apps" = "apps"; then
1848 # only when we build "real" apps we build the .lng files
1853 -e "s,@ROOTDIR@,${rootdir},g" \
1854 -e "s,@DEBUG@,${debug},g" \
1855 -e "s,@MEMORY@,${memory},g" \
1856 -e "s,@TARGET_ID@,${target_id},g" \
1857 -e "s,@TARGET@,${target},g" \
1858 -e "s,@CPU@,${t_cpu},g" \
1859 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
1860 -e "s,@MODELNAME@,${modelname},g" \
1861 -e "s,@LANGUAGE@,${language},g" \
1862 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
1863 -e "s,@PWD@,${pwd},g" \
1864 -e "s,@CC@,${CC},g" \
1865 -e "s,@LD@,${LD},g" \
1866 -e "s,@AR@,${AR},g" \
1867 -e "s,@AS@,${AS},g" \
1868 -e "s,@OC@,${OC},g" \
1869 -e "s,@WINDRES@,${WINDRES},g" \
1870 -e "s,@DLLTOOL@,${DLLTOOL},g" \
1871 -e "s,@DLLWRAP@,${DLLWRAP},g" \
1872 -e "s,@RANLIB@,${RANLIB},g" \
1873 -e "s,@TOOL@,${tool},g" \
1874 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
1875 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
1876 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
1877 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
1878 -e "s,@OUTPUT@,${output},g" \
1879 -e "s,@APPEXTRA@,${appextra},g" \
1880 -e "s,@ARCHOSROM@,${archosrom},g" \
1881 -e "s,@FLASHFILE@,${flash},g" \
1882 -e "s,@PLUGINS@,${plugins},g" \
1883 -e "s,@CODECS@,${swcodec},g" \
1884 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
1885 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
1886 -e "s,@GCCOPTS@,${GCCOPTS},g" \
1887 -e "s,@TARGET_INC@,${TARGET_INC},g" \
1888 -e "s!@LDOPTS@!${LDOPTS}!g" \
1889 -e "s,@LOADADDRESS@,${loadaddress},g" \
1890 -e "s,@EXTRADEF@,${extradefines},g" \
1891 -e "s,@APPSDIR@,${appsdir},g" \
1892 -e "s,@FIRMDIR@,${firmdir},g" \
1893 -e "s,@TOOLSDIR@,${toolsdir},g" \
1894 -e "s,@APPS@,${apps},g" \
1895 -e "s,@SIMVER@,${simver},g" \
1896 -e "s,@GCCVER@,${gccver},g" \
1897 -e "s,@GCCNUM@,${gccnum},g" \
1898 -e "s,@UNAME@,${uname},g" \
1899 -e "s,@ENDIAN@,${defendian},g" \
1900 -e "s,@TOOLSET@,${toolset},g" \
1903 -e "s,@MANUALDEV@,${manualdev},g" \
1904 -e "s,@ENCODER@,${ENC_CMD},g" \
1905 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
1906 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
1907 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
1908 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
1909 -e "s,@LANGS@,${buildlangs},g" \
1911 ## Automaticly generated. http://www.rockbox.org/
1919 # old 'make' versions don't have the built-in 'info' function
1920 info=old\$(shell echo >&2 "Consider upgrading to GNU make 3.81+ for optimum build performance.")
1921 ifeq (\$(call info),old)
1922 export info=echo "\$\$(1)";
1925 export ROOTDIR=@ROOTDIR@
1926 export FIRMDIR=@FIRMDIR@
1927 export APPSDIR=@APPSDIR@
1928 export TOOLSDIR=@TOOLSDIR@
1929 export DOCSDIR=\$(ROOTDIR)/docs
1930 export MANUALDIR=\${ROOTDIR}/manual
1931 export DEBUG=@DEBUG@
1932 export MODELNAME=@MODELNAME@
1933 export ARCHOSROM=@ARCHOSROM@
1934 export FLASHFILE=@FLASHFILE@
1935 export TARGET_ID=@TARGET_ID@
1936 export TARGET=@TARGET@
1938 export MANUFACTURER=@MANUFACTURER@
1940 export BUILDDIR=@PWD@
1941 export LANGUAGE=@LANGUAGE@
1942 export VOICELANGUAGE=@VOICELANGUAGE@
1943 export MEMORYSIZE=@MEMORY@
1944 export VERSION=\$(shell \$(ROOTDIR)/tools/svnversion.sh \$(ROOTDIR))
1945 export BUILDDATE=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
1946 export MKFIRMWARE=@TOOL@
1947 export BMP2RB_MONO=@BMP2RB_MONO@
1948 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
1949 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
1950 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
1951 export BINARY=@OUTPUT@
1952 export APPEXTRA=@APPEXTRA@
1953 export ENABLEDPLUGINS=@PLUGINS@
1954 export SOFTWARECODECS=@CODECS@
1955 export EXTRA_DEFINES=@EXTRADEF@
1963 export WINDRES=@WINDRES@
1964 export DLLTOOL=@DLLTOOL@
1965 export DLLWRAP=@DLLWRAP@
1966 export RANLIB=@RANLIB@
1967 export PROFILE_OPTS=@PROFILE_OPTS@
1968 export SIMVER=@SIMVER@
1969 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
1970 export GCCOPTS=@GCCOPTS@
1971 export TARGET_INC=@TARGET_INC@
1972 export LOADADDRESS=@LOADADDRESS@
1973 export SHARED_FLAG=@SHARED_FLAG@
1974 export LDOPTS=@LDOPTS@
1975 export GCCVER=@GCCVER@
1976 export GCCNUM=@GCCNUM@
1977 export UNAME=@UNAME@
1978 export MANUALDEV=@MANUALDEV@
1979 export TTS_OPTS=@TTS_OPTS@
1980 export TTS_ENGINE=@TTS_ENGINE@
1981 export ENC_OPTS=@ENC_OPTS@
1982 export ENCODER=@ENCODER@
1984 # Do not print "Entering directory ..."
1985 MAKEFLAGS += --no-print-directory
1987 .PHONY: all clean tags zip tools manual bin build info langs
1992 \$(SILENT)\$(TOOLSDIR)/mkinfo.pl \$(BUILDDIR)/rockbox-info.txt
1994 build: tools @LANGS@
1997 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
1998 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@
2003 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
2004 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ \$(BUILDDIR)/\$(BINARY)
2007 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ rocks
2009 veryclean: clean toolsclean
2012 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) clean
2015 \$(SILENT)echo Cleaning build directory
2016 \$(SILENT)rm -rf rockbox.zip TAGS @APPS@ firmware comsim sim lang.[ch]\
2017 manual *.pdf *.a credits.raw @OUTPUT@ bitmaps pluginbitmaps \
2018 @ARCHOSROM@ @FLASHFILE@ UI256.bmp rockbox-full.zip \
2019 html txt rockbox-manual*.zip sysfont.h rockbox-info.txt \
2020 voicefontids *.wav *.mp3 *.voice max_language_size.h
2023 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @TOOLSET@
2026 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @VOICETOOLSET@
2029 \$(SILENT)rm -f TAGS
2030 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) tags
2031 \$(SILENT)\$(MAKE) -C \$(APPSDIR) tags
2032 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins tags
2033 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins/lib tags
2036 \$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\" -r "\$(ROOTDIR)" -f 1 -o rockbox-fonts.zip \$(TARGET) \$(BINARY)
2039 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
2040 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
2043 \$(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip
2046 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
2047 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" -f 2 -o rockbox-full.zip \$(TARGET) \$(BINARY)
2050 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
2051 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.7z" -z "7za a" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
2054 \$(SILENT)rm -f rockbox.tar
2055 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
2056 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.tar" -z "tar --no-recursion -uf" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
2059 \$(SILENT)bzip2 -f9 rockbox.tar
2062 \$(SILENT)gzip -f9 rockbox.tar
2065 \$(SILENT)mkdir -p \$(BUILDDIR)/apps/lang
2066 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/lang OBJDIR=\$(BUILDDIR)/apps/lang
2070 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-pdf
2072 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-html
2073 manual-zhtml: manual-zip
2075 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt
2077 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt-zip
2079 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-zip
2082 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ features
2085 @echo "A few helpful make targets"
2087 @echo "all - builds a full Rockbox (default), including tools"
2088 @echo "bin - builds only the Rockbox.<target name> file"
2089 @echo "rocks - builds only plugins and codecs"
2090 @echo "clean - cleans a build directory (not tools)"
2091 @echo "veryclean - cleans the build and tools directories"
2092 @echo "manual - builds a manual"
2093 @echo "manual-html - HTML manual"
2094 @echo "manual-zip - HTML manual (zipped)"
2095 @echo "manual-txt - txt manual"
2096 @echo "fullzip - creates a rockbox.zip of your build with fonts"
2097 @echo "zip - creates a rockbox.zip of your build (no fonts)"
2098 @echo "gzip - creates a rockbox.tar.gz of your build (no fonts)"
2099 @echo "bzip2 - creates a rockbox.tar.bz2 of your build (no fonts)"
2100 @echo "7zip - creates a rockbox.7z of your build (no fonts)"
2101 @echo "fontzip - creates rockbox-fonts.zip"
2102 @echo "mapzip - creates rockbox-maps.zip with all .map files"
2103 @echo "tools - builds the tools only"
2104 @echo "voicetools - builds the voice tools only"
2105 @echo "install - installs your build (for simulator builds only)"
2109 if [ "yes" = "$simulator" ]; then
2111 cat >> Makefile
<<EOF
2114 @echo "installing a full setup in your archos dir"
2115 @(\$(MAKE) fullzip && cd archos && unzip -oq ../rockbox-full.zip)
2120 if [ "yes" = "$voice" ]; then
2122 cat >> Makefile
<<EOF
2124 voice: voicetools features
2125 \$(SILENT)for f in \`cat \$(BUILDDIR)/${apps}/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
2126 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 \\
2131 echo "Created Makefile"