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"
231 GCCOPTS
="$CCOPTS -mcpu=arm1136jf-s -mlong-calls"
232 GCCOPTIMIZE
="-fomit-frame-pointer"
237 ##################################################################
238 # Prompt for specific developer options
241 echo "Enter your developer options (press enter when done)"
242 echo -n "(D)EBUG, (L)ogf, (S)imulator, (P)rofiling, (V)oice"
243 if [ "$memory" = "2" ]; then
244 echo -n ", (8)MB MOD"
246 if [ "$modelname" = "h120" ]; then
247 echo -n ", (R)TC MOD"
253 while [ $cont = "1" ]; do
259 if [ "yes" = "$profile" ]; then
260 echo "Debug is incompatible with profiling"
267 echo "logf() support enabled"
271 echo "Simulator build enabled"
275 if [ "yes" = "$use_debug" ]; then
276 echo "Profiling is incompatible with debug"
278 echo "Profiling support is enabled"
283 echo "Voice build selected"
287 if [ "$memory" = "2" ]; then
289 echo "Memory size selected: 8MB"
295 if [ "$modelname" = "h120" ]; then
296 config_rtc
="#define CONFIG_RTC RTC_DS1339_DS3231"
297 have_rtc_alarm
="#define HAVE_RTC_ALARM"
298 echo "RTC functions enabled (DS1339/DS3231)"
310 if [ "yes" = "$voice" ]; then
311 # Ask about languages to build
312 echo "Select a number for the language to use (default is english)"
313 # The multiple-language feature is currently broken
314 # echo "You may enter a comma-separated list of languages to build"
317 voicelanguage
=`whichlang`
319 if [ -z "$voicelanguage" ]; then
321 voicelanguage
="english"
323 echo "Voice language set to $voicelanguage"
325 # Configure encoder and TTS engine for each language
326 for thislang
in `echo $voicelanguage | sed 's/,/ /g'`; do
327 voiceconfig
"$thislang"
330 if [ "yes" = "$use_debug" ]; then
332 GCCOPTS
="$GCCOPTS -g -DDEBUG"
334 if [ "yes" = "$logf" ]; then
335 use_logf
="#define ROCKBOX_HAS_LOGF 1"
337 if [ "yes" = "$simulator" ]; then
339 extradefines
="$extradefines -DSIMULATOR"
341 if [ "yes" = "$profile" ]; then
342 extradefines
="$extradefines -DRB_PROFILE"
343 PROFILE_OPTS
="-finstrument-functions"
347 # Configure voice settings
350 echo "Building $thislang voice for $modelname. Select options"
353 if [ -f "`which flite`" ]; then
357 DEFAULT_TTS_OPTS
=$FLITE_OPTS
358 DEFAULT_NOISEFLOOR
="500"
361 if [ -f "`which espeak`" ]; then
365 DEFAULT_TTS_OPTS
=$ESPEAK_OPTS
366 DEFAULT_NOISEFLOOR
="500"
369 if [ -f "`which festival`" ]; then
370 FESTIVAL
="(F)estival "
373 FESTIVAL_OPTS
="--language italian"
376 FESTIVAL_OPTS
="--language spanish"
379 FESTIVAL_OPTS
="--language finnish"
382 FESTIVAL_OPTS
="--language czech"
388 DEFAULT_TTS
="festival"
389 DEFAULT_TTS_OPTS
=$FESTIVAL_OPTS
390 DEFAULT_NOISEFLOOR
="500"
393 if [ -f "`which swift`" ]; then
397 DEFAULT_TTS_OPTS
=$SWIFT_OPTS
398 DEFAULT_NOISEFLOOR
="500"
401 # Allow SAPI if Windows is in use
402 if [ -f "`which winver`" ]; then
406 DEFAULT_TTS_OPTS
=$SAPI_OPTS
407 DEFAULT_NOISEFLOOR
="500"
411 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
412 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
416 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
421 NOISEFLOOR
="500" # TODO: check this value
427 TTS_OPTS
=$ESPEAK_OPTS
430 TTS_ENGINE
="festival"
432 TTS_OPTS
=$FESTIVAL_OPTS
445 TTS_ENGINE
=$DEFAULT_TTS
446 TTS_OPTS
=$DEFAULT_TTS_OPTS
447 NOISEFLOOR
=$DEFAULT_NOISEFLOOR
449 echo "Using $TTS_ENGINE for TTS"
451 # Allow the user to input manual commandline options
452 printf "Enter $TTS_ENGINE options (enter for defaults \"$TTS_OPTS\"): "
453 USER_TTS_OPTS
=`input`
454 if [ -n "$USER_TTS_OPTS" ]; then
455 TTS_OPTS
="$USER_TTS_OPTS"
460 if [ "$swcodec" = "yes" ]; then
463 ENC_OPTS
="-q 4 -c 10"
465 if [ -f "`which lame`" ]; then
468 ENC_OPTS
="--resample 12 -t -m m -h -V 9 -S -B 64 --vbr-new"
470 echo "You need LAME in the system path to build voice files for"
471 echo "HWCODEC targets."
476 echo "Using $ENCODER for encoding voice clips"
478 # Allow the user to input manual commandline options
479 printf "Enter $ENCODER options (enter for defaults \"$ENC_OPTS\"): "
480 USER_ENC_OPTS
=`input`
481 if [ -n "$USER_ENC_OPTS" ]; then
482 ENC_OPTS
=$USER_ENC_OPTS
486 if [ -f "`which cygpath`" ]; then
487 TEMPDIR
=`cygpath . -a -w`
492 # figure out which languages that are around
493 for file in $rootdir/apps
/lang
/*.lang
; do
494 clean
=`echo $file | sed -e 's:.*/::g' | cut "-d." -f1`
495 langs
="$langs $clean"
499 for one
in $langs; do
509 # Allow the user to pass a comma-separated list of langauges
510 for thispick
in `echo $pick | sed 's/,/ /g'`; do
512 for one
in $langs; do
513 # Accept both the language number and name
514 if [ "$num" = "$thispick" ] ||
[ "$thispick" = "$one" ]; then
515 if [ "$output" = "" ]; then
529 if test "$opt" = "--help"; then
530 echo "Rockbox configure script."
531 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
532 echo "Do *NOT* run this within the tools directory!"
534 echo "Usage: configure [--ccache][--no-ccache]"
538 if test -r "configure"; then
539 # this is a check for a configure script in the current directory, it there
540 # is one, try to figure out if it is this one!
542 if { grep "^# Jukebox" configure
>/dev
/null
2>&1 ; } then
543 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
544 echo "It will only cause you pain and grief. Instead do this:"
547 echo " mkdir build-dir"
549 echo " ../tools/configure"
551 echo "Much happiness will arise from this. Enjoy"
556 # get our current directory
559 if { echo $pwd |
grep " "; } then
560 echo "You're running this script in a path that contains space. The build"
561 echo "system is unfortunately not clever enough to deal with this. Please"
562 echo "run the script from a different path, rename the path or fix the build"
567 if [ -z "$rootdir" ]; then
568 ##################################################################
569 # Figure out where the source code root is!
571 rootdir
=`dirname $0`/..
/
573 #####################################################################
574 # Convert the possibly relative directory name to an absolute version
580 # cd back to the build dir
585 appsdir
='\$(ROOTDIR)/apps'
586 firmdir
='\$(ROOTDIR)/firmware'
587 toolsdir
='\$(ROOTDIR)/tools'
590 ##################################################################
591 # Figure out target platform
594 echo "Enter target platform:"
596 ==Archos== ==iriver== ==Apple iPod==
597 0) Player/Studio 10) H120/H140 20) Color/Photo
598 1) Recorder 11) H320/H340 21) Nano
599 2) FM Recorder 12) iHP-100/110/115 22) Video
600 3) Recorder v2 13) iFP-790 23) 3G
601 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
602 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
606 ==iAudio== ==Toshiba== ==SanDisk==
607 30) X5/X5V/X5L 40) Gigabeat F 50) Sansa e200
608 31) M5/M5L 41) Gigabeat S 51) Sansa e200R
612 ==Tatung== ==Olympus== ==Logik==
613 60) Elio TPJ-1022 70) M:Robe 500 80) DAX 1GB MP3/DAB
619 # Set of tools built for all target platforms:
620 toolset
="rdf2binary convbdf codepages"
622 # Toolsets for some target families:
623 archosbitmaptools
="$toolset scramble descramble sh2d uclpack bmp2rb"
624 iriverbitmaptools
="$toolset scramble descramble mkboot bmp2rb"
625 iaudiobitmaptools
="$toolset scramble descramble mkboot bmp2rb"
626 ipodbitmaptools
="$toolset scramble bmp2rb"
627 gigabeatbitmaptools
="$toolset scramble descramble bmp2rb"
628 tccbitmaptools
="$toolset scramble mktccboot bmp2rb"
629 # generic is used by IFP, H10, Sansa-e200
630 genericbitmaptools
="$toolset bmp2rb"
633 # ---- For each target ----
636 # target_id: a unique number identifying this target, IS NOT the menu number.
637 # Just use the currently highest number+1 when you add a new
639 # modelname: short model name used all over to identify this target
640 # memory: number of megabytes of RAM this target has. If the amount can
641 # be selected by the size prompt, let memory be unset here
642 # target: -Ddefine passed to the build commands to make the correct
643 # config-*.h file get included etc
644 # tool: the tool that takes a plain binary and converts that into a
645 # working "firmware" file for your target
646 # output: the final output file name
647 # boottool: the tool that takes a plain binary and generates a bootloader
648 # file for your target (or blank to use $tool)
649 # bootoutput:the final output file name for the bootloader (or blank to use
651 # appextra: passed to the APPEXTRA variable in the Makefiles.
652 # TODO: add proper explanation
653 # archosrom: used only for Archos targets that build a special flashable .ucl
655 # flash: name of output for flashing, for targets where there's a special
656 # file output for this.
657 # plugins: set to 'yes' to build the plugins. Early development builds can
658 # set this to no in the early stages to have an easier life for a
660 # swcodec: set 'yes' on swcodec targets
661 # toolset: lists what particular tools in the tools/ directory that this
662 # target needs to have built prior to building Rockbox
665 # *cc: sets up gcc and compiler options for your target builds. Note
666 # that if you select a simulator build, the compiler selection is
667 # overridden later in the script.
674 target
="-DARCHOS_PLAYER"
676 tool
="$rootdir/tools/scramble"
678 appextra
="player:gui"
679 archosrom
="$pwd/rombox.ucl"
680 flash
="$pwd/rockbox.ucl"
684 # toolset is the tools within the tools directory that we build for
685 # this particular target.
686 toolset
="$toolset scramble descramble sh2d player_unifont uclpack"
688 # Note: the convbdf is present in the toolset just because: 1) the
689 # firmware/Makefile assumes it is present always, and 2) we will need it when we
690 # build the player simulator
693 t_manufacturer
="archos"
700 target
="-DARCHOS_RECORDER"
702 tool
="$rootdir/tools/scramble"
703 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
704 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
706 appextra
="recorder:gui"
707 #archosrom="$pwd/rombox.ucl"
708 flash
="$pwd/rockbox.ucl"
711 # toolset is the tools within the tools directory that we build for
712 # this particular target.
713 toolset
=$archosbitmaptools
715 t_manufacturer
="archos"
721 modelname
="fmrecorder"
722 target
="-DARCHOS_FMRECORDER"
724 tool
="$rootdir/tools/scramble -fm"
725 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
726 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
728 appextra
="recorder:gui"
729 #archosrom="$pwd/rombox.ucl"
730 flash
="$pwd/rockbox.ucl"
733 # toolset is the tools within the tools directory that we build for
734 # this particular target.
735 toolset
=$archosbitmaptools
737 t_manufacturer
="archos"
743 modelname
="recorderv2"
744 target
="-DARCHOS_RECORDERV2"
746 tool
="$rootdir/tools/scramble -v2"
747 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
748 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
750 appextra
="recorder:gui"
751 #archosrom="$pwd/rombox.ucl"
752 flash
="$pwd/rockbox.ucl"
755 # toolset is the tools within the tools directory that we build for
756 # this particular target.
757 toolset
=$archosbitmaptools
759 t_manufacturer
="archos"
766 target
="-DARCHOS_ONDIOSP"
768 tool
="$rootdir/tools/scramble -osp"
769 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
770 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
772 appextra
="recorder:gui"
773 archosrom
="$pwd/rombox.ucl"
774 flash
="$pwd/rockbox.ucl"
777 # toolset is the tools within the tools directory that we build for
778 # this particular target.
779 toolset
=$archosbitmaptools
781 t_manufacturer
="archos"
788 target
="-DARCHOS_ONDIOFM"
790 tool
="$rootdir/tools/scramble -ofm"
791 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
792 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
794 appextra
="recorder:gui"
795 #archosrom="$pwd/rombox.ucl"
796 flash
="$pwd/rockbox.ucl"
799 toolset
=$archosbitmaptools
801 t_manufacturer
="archos"
808 target
="-DARCHOS_AV300"
811 tool
="$rootdir/tools/scramble -mm=C"
812 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
813 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
815 appextra
="recorder:gui"
818 # toolset is the tools within the tools directory that we build for
819 # this particular target.
820 toolset
="$toolset scramble descramble bmp2rb"
821 # architecture, manufacturer and model for the target-tree build
823 t_manufacturer
="archos"
830 target
="-DIRIVER_H120"
833 tool
="$rootdir/tools/scramble -add=h120"
834 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
835 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
836 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
837 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
838 output
="rockbox.iriver"
839 appextra
="recorder:gui"
840 flash
="$pwd/rombox.iriver"
843 # toolset is the tools within the tools directory that we build for
844 # this particular target.
845 toolset
=$iriverbitmaptools
847 t_manufacturer
="iriver"
854 target
="-DIRIVER_H300"
857 tool
="$rootdir/tools/scramble -add=h300"
858 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
859 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
860 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
861 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
862 output
="rockbox.iriver"
863 appextra
="recorder:gui"
866 # toolset is the tools within the tools directory that we build for
867 # this particular target.
868 toolset
=$iriverbitmaptools
870 t_manufacturer
="iriver"
877 target
="-DIRIVER_H100"
880 tool
="$rootdir/tools/scramble -add=h100"
881 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
882 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
883 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
884 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
885 output
="rockbox.iriver"
886 appextra
="recorder:gui"
887 flash
="$pwd/rombox.iriver"
890 # toolset is the tools within the tools directory that we build for
891 # this particular target.
892 toolset
=$iriverbitmaptools
894 t_manufacturer
="iriver"
901 target
="-DIRIVER_IFP7XX"
905 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
906 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
908 appextra
="recorder:gui"
911 # toolset is the tools within the tools directory that we build for
912 # this particular target.
913 toolset
=$genericbitmaptools
915 t_manufacturer
="pnx0101"
916 t_model
="iriver-ifp7xx"
922 target
="-DIRIVER_H10"
925 tool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
926 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
927 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
929 appextra
="recorder:gui"
932 boottool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
933 bootoutput
="H10_20GC.mi4"
934 # toolset is the tools within the tools directory that we build for
935 # this particular target.
936 toolset
="$genericbitmaptools scramble"
937 # architecture, manufacturer and model for the target-tree build
939 t_manufacturer
="iriver"
946 target
="-DIRIVER_H10_5GB"
949 tool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
950 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
951 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
953 appextra
="recorder:gui"
956 boottool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
958 # toolset is the tools within the tools directory that we build for
959 # this particular target.
960 toolset
="$genericbitmaptools scramble"
961 # architecture, manufacturer and model for the target-tree build
963 t_manufacturer
="iriver"
969 modelname
="ipodcolor"
970 target
="-DIPOD_COLOR"
973 tool
="$rootdir/tools/scramble -add=ipco"
974 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
975 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
976 output
="rockbox.ipod"
977 appextra
="recorder:gui"
980 bootoutput
="bootloader-$modelname.ipod"
981 # toolset is the tools within the tools directory that we build for
982 # this particular target.
983 toolset
=$ipodbitmaptools
984 # architecture, manufacturer and model for the target-tree build
986 t_manufacturer
="ipod"
996 tool
="$rootdir/tools/scramble -add=nano"
997 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
998 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
999 output
="rockbox.ipod"
1000 appextra
="recorder:gui"
1003 bootoutput
="bootloader-$modelname.ipod"
1004 # toolset is the tools within the tools directory that we build for
1005 # this particular target.
1006 toolset
=$ipodbitmaptools
1007 # architecture, manufacturer and model for the target-tree build
1009 t_manufacturer
="ipod"
1015 modelname
="ipodvideo"
1016 target
="-DIPOD_VIDEO"
1018 tool
="$rootdir/tools/scramble -add=ipvd"
1019 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1020 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1021 output
="rockbox.ipod"
1022 appextra
="recorder:gui"
1025 bootoutput
="bootloader-$modelname.ipod"
1026 # toolset is the tools within the tools directory that we build for
1027 # this particular target.
1028 toolset
=$ipodbitmaptools
1029 # architecture, manufacturer and model for the target-tree build
1031 t_manufacturer
="ipod"
1041 tool
="$rootdir/tools/scramble -add=ip3g"
1042 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1043 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1044 output
="rockbox.ipod"
1045 appextra
="recorder:gui"
1048 bootoutput
="bootloader-$modelname.ipod"
1049 # toolset is the tools within the tools directory that we build for
1050 # this particular target.
1051 toolset
=$ipodbitmaptools
1052 # architecture, manufacturer and model for the target-tree build
1054 t_manufacturer
="ipod"
1064 tool
="$rootdir/tools/scramble -add=ip4g"
1065 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1066 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1067 output
="rockbox.ipod"
1068 appextra
="recorder:gui"
1071 bootoutput
="bootloader-$modelname.ipod"
1072 # toolset is the tools within the tools directory that we build for
1073 # this particular target.
1074 toolset
=$ipodbitmaptools
1075 # architecture, manufacturer and model for the target-tree build
1077 t_manufacturer
="ipod"
1083 modelname
="ipodmini"
1084 target
="-DIPOD_MINI"
1087 tool
="$rootdir/tools/scramble -add=mini"
1088 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1089 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1090 output
="rockbox.ipod"
1091 appextra
="recorder:gui"
1094 bootoutput
="bootloader-$modelname.ipod"
1095 # toolset is the tools within the tools directory that we build for
1096 # this particular target.
1097 toolset
=$ipodbitmaptools
1098 # architecture, manufacturer and model for the target-tree build
1100 t_manufacturer
="ipod"
1106 modelname
="ipodmini2g"
1107 target
="-DIPOD_MINI2G"
1110 tool
="$rootdir/tools/scramble -add=mn2g"
1111 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1112 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1113 output
="rockbox.ipod"
1114 appextra
="recorder:gui"
1117 bootoutput
="bootloader-$modelname.ipod"
1118 # toolset is the tools within the tools directory that we build for
1119 # this particular target.
1120 toolset
=$ipodbitmaptools
1121 # architecture, manufacturer and model for the target-tree build
1123 t_manufacturer
="ipod"
1129 modelname
="ipod1g2g"
1130 target
="-DIPOD_1G2G"
1133 tool
="$rootdir/tools/scramble -add=1g2g"
1134 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1135 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1136 output
="rockbox.ipod"
1137 appextra
="recorder:gui"
1140 bootoutput
="bootloader-$modelname.ipod"
1141 # toolset is the tools within the tools directory that we build for
1142 # this particular target.
1143 toolset
=$ipodbitmaptools
1144 # architecture, manufacturer and model for the target-tree build
1146 t_manufacturer
="ipod"
1153 target
="-DIAUDIO_X5"
1156 tool
="$rootdir/tools/scramble -add=iax5"
1157 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1158 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1159 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1160 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1161 output
="rockbox.iaudio"
1162 appextra
="recorder:gui"
1165 # toolset is the tools within the tools directory that we build for
1166 # this particular target.
1167 toolset
="$iaudiobitmaptools"
1168 # architecture, manufacturer and model for the target-tree build
1170 t_manufacturer
="iaudio"
1177 target
="-DIAUDIO_M5"
1180 tool
="$rootdir/tools/scramble -add=iam5"
1181 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1182 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1183 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1184 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1185 output
="rockbox.iaudio"
1186 appextra
="recorder:gui"
1189 # toolset is the tools within the tools directory that we build for
1190 # this particular target.
1191 toolset
="$iaudiobitmaptools"
1192 # architecture, manufacturer and model for the target-tree build
1194 t_manufacturer
="iaudio"
1200 modelname
="gigabeatf"
1201 target
="-DGIGABEAT_F"
1204 tool
="$rootdir/tools/scramble -add=giga"
1205 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1206 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1207 output
="rockbox.gigabeat"
1208 appextra
="recorder:gui"
1211 toolset
=$gigabeatbitmaptools
1212 boottool
="$rootdir/tools/scramble -gigabeat"
1213 bootoutput
="FWIMG01.DAT"
1214 # architecture, manufacturer and model for the target-tree build
1216 t_manufacturer
="s3c2440"
1217 t_model
="gigabeat-fx"
1222 modelname
="gigabeats"
1223 target
="-DGIGABEAT_S"
1226 tool
="$rootdir/tools/scramble -add=gigs"
1227 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1228 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1229 output
="rockbox.gigabeat"
1230 appextra
="recorder:gui"
1233 toolset
="$gigabeatbitmaptools mknkboot"
1234 boottool
="$rootdir/tools/scramble -gigabeats"
1236 # architecture, manufacturer and model for the target-tree build
1238 t_manufacturer
="imx31"
1239 t_model
="gigabeat-s"
1244 modelname
="mrobe500"
1245 target
="-DMROBE_500"
1248 # tool="$rootdir/tools/scramble -add=m500"
1250 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1251 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1252 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1253 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1254 output
="rockbox.mrobe500"
1255 appextra
="recorder:gui"
1258 toolset
=$gigabeatbitmaptools
1260 bootoutput
="rockbox.mrboot"
1261 # architecture, manufacturer and model for the target-tree build
1263 t_manufacturer
="tms320dm320"
1269 modelname
="mrobe100"
1270 target
="-DMROBE_100"
1273 tool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1274 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1275 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1276 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1277 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1278 output
="rockbox.mi4"
1279 appextra
="recorder:gui"
1282 boottool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1283 bootoutput
="pp5020.mi4"
1284 # toolset is the tools within the tools directory that we build for
1285 # this particular target.
1286 toolset
="$genericbitmaptools scramble"
1287 # architecture, manufacturer and model for the target-tree build
1289 t_manufacturer
="olympus"
1295 modelname
="logikdax"
1296 target
="-DLOGIK_DAX"
1299 tool
="$rootdir/tools/scramble -add=ldax"
1300 boottool
="$rootdir/tools/scramble -tcc=crc"
1301 bootoutput
="player.rom"
1302 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1303 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1304 output
="rockbox.logik"
1305 appextra
="recorder:gui"
1308 # toolset is the tools within the tools directory that we build for
1309 # this particular target.
1310 toolset
=$tccbitmaptools
1311 # architecture, manufacturer and model for the target-tree build
1313 t_manufacturer
="tcc77x"
1320 target
="-DSANSA_E200"
1321 memory
=32 # supposedly
1323 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1324 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1325 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1326 output
="rockbox.mi4"
1327 appextra
="recorder:gui"
1330 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1331 bootoutput
="PP5022.mi4"
1332 # toolset is the tools within the tools directory that we build for
1333 # this particular target.
1334 toolset
="$genericbitmaptools scramble"
1335 # architecture, manufacturer and model for the target-tree build
1337 t_manufacturer
="sandisk"
1338 t_model
="sansa-e200"
1342 # the e200R model is pretty much identical to the e200, it only has a
1343 # different option to the scramble tool when building a bootloader and
1344 # makes the bootloader output file name in all lower case.
1347 target
="-DSANSA_E200"
1348 memory
=32 # supposedly
1350 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1351 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1352 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1353 output
="rockbox.mi4"
1354 appextra
="recorder:gui"
1357 boottool
="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
1358 bootoutput
="pp5022.mi4"
1359 # toolset is the tools within the tools directory that we build for
1360 # this particular target.
1361 toolset
="$genericbitmaptools scramble"
1362 # architecture, manufacturer and model for the target-tree build
1364 t_manufacturer
="sandisk"
1365 t_model
="sansa-e200"
1371 target
="-DSANSA_C200"
1372 memory
=32 # supposedly
1374 tool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
1375 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1376 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1377 output
="rockbox.mi4"
1378 appextra
="recorder:gui"
1381 boottool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1382 bootoutput
="firmware.mi4"
1383 # toolset is the tools within the tools directory that we build for
1384 # this particular target.
1385 toolset
="$genericbitmaptools scramble"
1386 # architecture, manufacturer and model for the target-tree build
1388 t_manufacturer
="sandisk"
1389 t_model
="sansa-c200"
1395 target
="-DELIO_TPJ1022"
1398 tool
="$rootdir/tools/scramble -add tpj2"
1399 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1400 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1401 output
="rockbox.elio"
1402 appextra
="recorder:gui"
1405 boottool
="$rootdir/tools/scramble -mi4v2"
1406 bootoutput
="pp5020.mi4"
1407 # toolset is the tools within the tools directory that we build for
1408 # this particular target.
1409 toolset
="$genericbitmaptools scramble"
1410 # architecture, manufacturer and model for the target-tree build
1412 t_manufacturer
="tatung"
1422 tool
="$rootdir/tools/scramble -add i7"
1423 boottool
="$rootdir/tools/scramble -tcc=crc"
1424 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1425 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1426 output
="rockbox.iaudio"
1427 appextra
="recorder:gui"
1430 bootoutput
="I7_FW.BIN"
1431 # toolset is the tools within the tools directory that we build for
1432 # this particular target.
1433 toolset
="$tccbitmaptools"
1434 # architecture, manufacturer and model for the target-tree build
1436 t_manufacturer
="tcc77x"
1447 boottool
="$rootdir/tools/scramble -tcc=crc"
1448 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1449 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1450 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1451 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1452 output
="rockbox.iaudio"
1453 appextra
="recorder:gui"
1456 toolset
="$tccbitmaptools"
1457 # architecture, manufacturer and model for the target-tree build
1459 t_manufacturer
="tcc780x"
1464 echo "Please select a supported target platform!"
1470 echo "Platform set to $modelname"
1474 ############################################################################
1475 # Amount of memory, for those that can differ. They have $memory unset at
1479 if [ -z "$memory" ]; then
1483 echo "Enter size of your RAM (in MB): (Defaults to 32)"
1496 echo "Enter size of your RAM (in MB): (defaults to 2)"
1509 echo "Memory size selected: $memory MB"
1513 ##################################################################
1514 # Figure out build "type"
1517 # the ifp7x0 is the only platform that supports building a gdb stub like
1521 gdbstub
="(G)DB stub, "
1524 gdbstub
="(I)installer, "
1531 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, $gdbstub(M)anual (N)"
1537 appsdir
='\$(ROOTDIR)/bootloader'
1539 extradefines
="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
1541 echo "e200R-installer build selected"
1544 if test $t_manufacturer = "archos"; then
1545 # Archos SH-based players do this somewhat differently for
1547 appsdir
='\$(ROOTDIR)/flash/bootbox'
1550 appsdir
='\$(ROOTDIR)/bootloader'
1553 if test -n "$boottool"; then
1556 if test -n "$bootoutput"; then
1560 extradefines
="-DBOOTLOADER -ffunction-sections -fdata-sections"
1562 echo "Bootloader build selected"
1567 extradefines
="-DSIMULATOR"
1568 echo "Simulator build selected"
1571 echo "Advanced build selected"
1575 extradefines
="-DSTUB" # for target makefile symbol EXTRA_DEFINES
1576 appsdir
='\$(ROOTDIR)/gdb'
1585 echo "GDB stub build selected"
1590 echo "Manual build selected"
1593 if [ "$modelname" = "e200r" ]; then
1594 echo "Do not use the e200R target for regular builds. Use e200 instead."
1598 echo "Normal build selected"
1602 # to be able running "make manual" from non-manual configuration
1605 manualdev
="recorderv2fm"
1608 manualdev
="recorderv2fm"
1614 manualdev
="ipodmini"
1617 manualdev
=$modelname
1621 if [ -z "$debug" ]; then
1622 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
1625 echo "Using source code root directory: $rootdir"
1627 # this was once possible to change at build-time, but no more:
1632 if [ "yes" = "$simulator" ]; then
1633 # setup compiler and things for simulator
1636 if [ -d "archos" ]; then
1637 echo "sub directory archos already present"
1640 echo "created an archos subdirectory for simulating the hard disk"
1644 # Now, figure out version number of the (gcc) compiler we are about to use
1645 gccver
=`$CC -dumpversion`;
1647 # figure out the binutil version too and display it, mostly for the build
1648 # system etc to be able to see it easier
1649 ldver
=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
1651 if [ -z "$gccver" ]; then
1652 echo "WARNING: The compiler you must use ($CC) is not in your path!"
1653 echo "WARNING: this may cause your build to fail since we cannot do the"
1654 echo "WARNING: checks we want now."
1657 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
1660 num1
=`echo $gccver | cut -d . -f1`
1661 num2
=`echo $gccver | cut -d . -f2`
1662 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
1669 echo "Using $CC $gccver ($gccnum)"
1671 if test "$gccnum" -ge "400"; then
1672 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
1673 # so we ignore that warnings for now
1675 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
1678 if test "$gccnum" -ge "401"; then
1679 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
1680 # will break strict-aliasing rules"
1682 GCCOPTS
="$GCCOPTS -fno-strict-aliasing"
1685 if test "$gccnum" -ge "402"; then
1686 # disable warning about "warning: initialized field overwritten" as gcc 4.2
1687 # and later would throw it for several valid cases
1688 GCCOPTS
="$GCCOPTS -Wno-override-init"
1693 echo "Using $LD $ldver"
1695 # check the compiler for SH platforms
1696 if test "$CC" = "sh-elf-gcc"; then
1697 if test "$gccnum" -lt "400"; then
1698 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
1699 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
1701 # figure out patch status
1702 gccpatch
=`$CC --version`;
1704 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
1705 echo "gcc $gccver is rockbox patched"
1706 # then convert -O to -Os to get smaller binaries!
1707 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
1709 echo "WARNING: You use an unpatched gcc compiler: $gccver"
1710 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
1715 if test "$CC" = "m68k-elf-gcc"; then
1716 # convert -O to -Os to get smaller binaries!
1717 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
1720 if test "$1" = "--ccache"; then
1721 echo "Enable ccache for building"
1724 if test "$1" != "--no-ccache"; then
1725 ccache
=`findtool ccache`
1726 if test -n "$ccache"; then
1727 echo "Found and uses ccache ($ccache)"
1732 if test -n "$ccache"; then
1736 if test "X$endian" = "Xbig"; then
1737 defendian
="ROCKBOX_BIG_ENDIAN"
1739 defendian
="ROCKBOX_LITTLE_ENDIAN"
1743 -e "s,@ENDIAN@,${defendian},g" \
1744 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
1745 -e "s,@config_rtc@,$config_rtc,g" \
1746 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
1748 /* This header was made by configure */
1749 #ifndef __BUILD_AUTOCONF_H
1750 #define __BUILD_AUTOCONF_H
1752 /* Define endianess for the target or simulator platform */
1755 /* Define this if you build rockbox to support the logf logging and display */
1756 #undef ROCKBOX_HAS_LOGF
1758 /* optional defines for RTC mod for h1x0 */
1762 #endif /* __BUILD_AUTOCONF_H */
1765 if test -n "$t_cpu"; then
1766 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
1767 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
1768 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
1772 if test "$simulator" = "yes"; then
1773 # add simul make stuff on the #SIMUL# line
1774 simmagic1
="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
1775 simmagic2
="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
1777 # delete the lines that match
1778 simmagic1
='/@SIMUL1@/D'
1779 simmagic2
='/@SIMUL2@/D'
1782 if test "$swcodec" = "yes"; then
1783 voicetoolset
="rbspeexenc voicefont wavtrim"
1785 voicetoolset
="voicefont wavtrim"
1789 -e "s,@ROOTDIR@,${rootdir},g" \
1790 -e "s,@DEBUG@,${debug},g" \
1791 -e "s,@MEMORY@,${memory},g" \
1792 -e "s,@TARGET_ID@,${target_id},g" \
1793 -e "s,@TARGET@,${target},g" \
1794 -e "s,@CPU@,${t_cpu},g" \
1795 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
1796 -e "s,@MODELNAME@,${modelname},g" \
1797 -e "s,@LANGUAGE@,${language},g" \
1798 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
1799 -e "s,@PWD@,${pwd},g" \
1800 -e "s,@CC@,${CC},g" \
1801 -e "s,@LD@,${LD},g" \
1802 -e "s,@AR@,${AR},g" \
1803 -e "s,@AS@,${AS},g" \
1804 -e "s,@OC@,${OC},g" \
1805 -e "s,@WINDRES@,${WINDRES},g" \
1806 -e "s,@DLLTOOL@,${DLLTOOL},g" \
1807 -e "s,@DLLWRAP@,${DLLWRAP},g" \
1808 -e "s,@RANLIB@,${RANLIB},g" \
1809 -e "s,@TOOL@,${tool},g" \
1810 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
1811 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
1812 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
1813 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
1814 -e "s,@OUTPUT@,${output},g" \
1815 -e "s,@APPEXTRA@,${appextra},g" \
1816 -e "s,@ARCHOSROM@,${archosrom},g" \
1817 -e "s,@FLASHFILE@,${flash},g" \
1818 -e "s,@PLUGINS@,${plugins},g" \
1819 -e "s,@CODECS@,${swcodec},g" \
1820 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
1821 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
1822 -e "s,@GCCOPTS@,${GCCOPTS},g" \
1823 -e "s,@TARGET_INC@,${TARGET_INC},g" \
1824 -e "s!@LDOPTS@!${LDOPTS}!g" \
1825 -e "s,@LOADADDRESS@,${loadaddress},g" \
1826 -e "s,@EXTRADEF@,${extradefines},g" \
1827 -e "s,@APPSDIR@,${appsdir},g" \
1828 -e "s,@FIRMDIR@,${firmdir},g" \
1829 -e "s,@TOOLSDIR@,${toolsdir},g" \
1830 -e "s,@APPS@,${apps},g" \
1831 -e "s,@SIMVER@,${simver},g" \
1832 -e "s,@GCCVER@,${gccver},g" \
1833 -e "s,@GCCNUM@,${gccnum},g" \
1834 -e "s,@UNAME@,${uname},g" \
1835 -e "s,@ENDIAN@,${defendian},g" \
1836 -e "s,@TOOLSET@,${toolset},g" \
1839 -e "s,@MANUALDEV@,${manualdev},g" \
1840 -e "s,@ENCODER@,${ENC_CMD},g" \
1841 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
1842 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
1843 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
1844 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
1846 ## Automaticly generated. http://www.rockbox.org/
1854 # old 'make' versions don't have the built-in 'info' function
1855 info=old\$(shell echo >&2 "Consider upgrading to GNU make 3.81+ for optimum build performance.")
1856 ifeq (\$(call info),old)
1857 export info=echo "\$\$(1)";
1860 export ROOTDIR=@ROOTDIR@
1861 export FIRMDIR=@FIRMDIR@
1862 export APPSDIR=@APPSDIR@
1863 export TOOLSDIR=@TOOLSDIR@
1864 export DOCSDIR=\$(ROOTDIR)/docs
1865 export MANUALDIR=\${ROOTDIR}/manual
1866 export DEBUG=@DEBUG@
1867 export MODELNAME=@MODELNAME@
1868 export ARCHOSROM=@ARCHOSROM@
1869 export FLASHFILE=@FLASHFILE@
1870 export TARGET_ID=@TARGET_ID@
1871 export TARGET=@TARGET@
1873 export MANUFACTURER=@MANUFACTURER@
1875 export BUILDDIR=@PWD@
1876 export LANGUAGE=@LANGUAGE@
1877 export VOICELANGUAGE=@VOICELANGUAGE@
1878 export MEMORYSIZE=@MEMORY@
1879 export VERSION=\$(shell \$(ROOTDIR)/tools/svnversion.sh \$(ROOTDIR))
1880 export BUILDDATE=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
1881 export MKFIRMWARE=@TOOL@
1882 export BMP2RB_MONO=@BMP2RB_MONO@
1883 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
1884 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
1885 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
1886 export BINARY=@OUTPUT@
1887 export APPEXTRA=@APPEXTRA@
1888 export ENABLEDPLUGINS=@PLUGINS@
1889 export SOFTWARECODECS=@CODECS@
1890 export EXTRA_DEFINES=@EXTRADEF@
1898 export WINDRES=@WINDRES@
1899 export DLLTOOL=@DLLTOOL@
1900 export DLLWRAP=@DLLWRAP@
1901 export RANLIB=@RANLIB@
1902 export PROFILE_OPTS=@PROFILE_OPTS@
1903 export SIMVER=@SIMVER@
1904 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
1905 export GCCOPTS=@GCCOPTS@
1906 export TARGET_INC=@TARGET_INC@
1907 export LOADADDRESS=@LOADADDRESS@
1908 export SHARED_FLAG=@SHARED_FLAG@
1909 export LDOPTS=@LDOPTS@
1910 export GCCVER=@GCCVER@
1911 export GCCNUM=@GCCNUM@
1912 export UNAME=@UNAME@
1913 export MANUALDEV=@MANUALDEV@
1914 export TTS_OPTS=@TTS_OPTS@
1915 export TTS_ENGINE=@TTS_ENGINE@
1916 export ENC_OPTS=@ENC_OPTS@
1917 export ENCODER=@ENCODER@
1919 # Do not print "Entering directory ..."
1920 MAKEFLAGS += --no-print-directory
1922 .PHONY: all clean tags zip tools manual bin build info
1927 \$(SILENT)\$(TOOLSDIR)/mkinfo.pl \$(BUILDDIR)/rockbox-info.txt
1932 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
1933 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@
1938 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
1939 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ \$(BUILDDIR)/\$(BINARY)
1942 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ rocks
1944 veryclean: clean toolsclean
1947 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) clean
1950 \$(SILENT)echo Cleaning build directory
1951 \$(SILENT)rm -rf rockbox.zip TAGS @APPS@ firmware comsim sim lang.[ch]\
1952 manual *.pdf *.a credits.raw @OUTPUT@ bitmaps pluginbitmaps \
1953 @ARCHOSROM@ @FLASHFILE@ UI256.bmp rockbox-full.zip \
1954 html txt rockbox-manual*.zip sysfont.h rockbox-info.txt \
1955 voicefontids *.wav *.mp3 *.voice
1958 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @TOOLSET@
1961 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @VOICETOOLSET@
1964 \$(SILENT)rm -f TAGS
1965 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) tags
1966 \$(SILENT)\$(MAKE) -C \$(APPSDIR) tags
1967 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins tags
1968 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins/lib tags
1971 \$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\" -r "\$(ROOTDIR)" -f 1 -o rockbox-fonts.zip \$(TARGET) \$(BINARY)
1974 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
1975 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
1978 \$(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip
1981 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
1982 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" -f 2 -o rockbox-full.zip \$(TARGET) \$(BINARY)
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.7z" -z "7za a" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
1989 \$(SILENT)rm -f rockbox.tar
1990 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
1991 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.tar" -z "tar --no-recursion -uf" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
1994 \$(SILENT)bzip2 -f9 rockbox.tar
1997 \$(SILENT)gzip -f9 rockbox.tar
2001 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-pdf
2003 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-html
2004 manual-zhtml: manual-zip
2006 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt
2008 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt-zip
2010 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-zip
2013 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ features
2016 @echo "A few helpful make targets"
2018 @echo "all - builds a full Rockbox (default), including tools"
2019 @echo "bin - builds only the Rockbox.<target name> file"
2020 @echo "rocks - builds only plugins and codecs"
2021 @echo "clean - cleans a build directory (not tools)"
2022 @echo "veryclean - cleans the build and tools directories"
2023 @echo "manual - builds a manual"
2024 @echo "manual-html - HTML manual"
2025 @echo "manual-zip - HTML manual (zipped)"
2026 @echo "manual-txt - txt manual"
2027 @echo "fullzip - creates a rockbox.zip of your build with fonts"
2028 @echo "zip - creates a rockbox.zip of your build (no fonts)"
2029 @echo "gzip - creates a rockbox.tar.gz of your build (no fonts)"
2030 @echo "bzip2 - creates a rockbox.tar.bz2 of your build (no fonts)"
2031 @echo "7zip - creates a rockbox.7z of your build (no fonts)"
2032 @echo "fontzip - creates rockbox-fonts.zip"
2033 @echo "mapzip - creates rockbox-maps.zip with all .map files"
2034 @echo "tools - builds the tools only"
2035 @echo "voicetools - builds the voice tools only"
2036 @echo "install - installs your build (for simulator builds only)"
2040 if [ "yes" = "$simulator" ]; then
2042 cat >> Makefile
<<EOF
2045 @echo "installing a full setup in your archos dir"
2046 @(\$(MAKE) fullzip && cd archos && unzip -oq ../rockbox-full.zip)
2051 if [ "yes" = "$voice" ]; then
2053 cat >> Makefile
<<EOF
2055 voice: voicetools features
2056 \$(SILENT)for f in \`cat \$(BUILDDIR)/${apps}/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
2057 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 \\
2062 echo "Created Makefile"