3 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
11 # global CC options for all platforms
12 CCOPTS
="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes"
14 use_logf
="#undef ROCKBOX_HAS_LOGF"
16 scriptver
=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'`
19 # Begin Function Definitions
29 WINDRES
=${prefix}windres
30 DLLTOOL
=${prefix}dlltool
31 DLLWRAP
=${prefix}dllwrap
32 RANLIB
=${prefix}ranlib
40 # naive approach to selecting a mingw cross-compiler on linux/*nix
41 echo "Enabling win32 crosscompiling"
43 prefixtools i586-mingw32msvc-
45 LDOPTS
="-lgdi32 -luser32 -mwindows"
46 # add cross-compiler option(s)
47 GCCOPTS
="$GCCOPTS -mno-cygwin"
49 output
="rockboxui.exe" # use this as output binary name
51 endian
="little" # windows is little endian
54 # scan the $PATH for the given command
61 # echo "checks for $file in $path" >&2
62 if test -f "$path/$file"; then
72 # default tool setup for native building
76 GCCOPTS
='-W -Wall -g -fno-builtin'
78 output
="rockboxui" # use this as default output binary name
80 # generic sdl-config checker
81 sdl
=`findtool sdl-config`
83 if [ -z "$sdl" ]; then
84 echo "configure didn't find sdl-config, which indicates that you"
85 echo "don't have SDL (properly) installed. Please correct and"
86 echo "re-run configure!"
90 # default share option, override below if needed
95 echo "Cygwin host detected"
98 GCCOPTS
="$GCCOPTS `sdl-config --cflags`"
99 LDOPTS
="`sdl-config --libs` -mconsole"
101 output
="rockboxui.exe" # use this as output binary name
105 echo "Linux host detected"
107 if [ "0" != `sdl-config --libs |grep -c mwindows` ]; then
108 # Enable crosscompiling if sdl-config is from Windows SDL
111 GCCOPTS
="$GCCOPTS `sdl-config --cflags`"
112 LDOPTS
="`sdl-config --libs`"
116 echo "FreeBSD host detected"
118 GCCOPTS
="$GCCOPTS `sdl-config --cflags`"
119 LDOPTS
="`sdl-config --libs`"
123 echo "Darwin host detected"
125 GCCOPTS
="$GCCOPTS `sdl-config --cflags`"
126 LDOPTS
="`sdl-config --libs`"
127 SHARED_FLAG
="-dynamiclib -Wl\,-single_module"
131 echo "Unsupported system: $uname, fix configure and retry"
136 if [ "`uname -m`" = "x86_64" ] ||
[ "`uname -m`" = "amd64" ]; then
137 # fPIC is needed to make shared objects link
138 # setting visibility to hidden is necessary to avoid strange crashes
139 # due to symbol clashing
140 GCCOPTS
="$GCCOPTS -fPIC -fvisibility=hidden"
143 GCCOPTS
="$GCCOPTS -I\$(SIMDIR)"
145 if test "X$crosscompile" != "Xyes"; then
147 cat >/tmp
/conftest-
$id.c
<<EOF
149 int main(int argc, char **argv)
152 char *varp = (char *)&var;
160 $CC -o /tmp
/conftest-
$id /tmp
/conftest-
$id.c
2>/dev
/null
162 if test `/tmp/conftest-$id 2>/dev/null` -gt "1"; then
169 echo "Simulator environment deemed $endian endian"
171 # use wildcard here to make it work even if it was named *.exe like
173 rm -f /tmp
/conftest-
$id*
179 GCCOPTS
="$CCOPTS -m1"
180 GCCOPTIMIZE
="-fomit-frame-pointer -fschedule-insns"
185 prefixtools calmrisc16-unknown-elf-
186 GCCOPTS
="-Wl\,--no-check-sections $CCOPTS"
187 GCCOPTIMIZE
="-fomit-frame-pointer"
192 prefixtools m68k-elf-
193 GCCOPTS
="$CCOPTS -m5206e -Wa\,-m5249 -malign-int -mstrict-align"
194 GCCOPTIMIZE
="-fomit-frame-pointer"
200 GCCOPTS
="$CCOPTS -mcpu=arm7tdmi"
201 if test "X$1" != "Xshort"; then
202 GCCOPTS
="$GCCOPTS -mlong-calls"
204 GCCOPTIMIZE
="-fomit-frame-pointer"
210 GCCOPTS
="$CCOPTS -mcpu=arm9tdmi -mlong-calls"
211 GCCOPTIMIZE
="-fomit-frame-pointer"
217 GCCOPTS
="$CCOPTS -mcpu=arm9e -mlong-calls"
218 GCCOPTIMIZE
="-fomit-frame-pointer"
224 GCCOPTS
="$CCOPTS -mcpu=arm926ej-s -mlong-calls"
225 GCCOPTIMIZE
="-fomit-frame-pointer"
230 ##################################################################
231 # Prompt for specific developer options
234 echo "Enter your developer options (press enter when done)"
235 echo -n "(D)EBUG, (L)ogf, (S)imulator, (P)rofiling, (V)oice"
236 if [ "$memory" = "2" ]; then
237 echo -n ", (8)MB MOD"
239 if [ "$archos" = "h120" ]; then
240 echo -n ", (R)TC MOD"
246 while [ $cont = "1" ]; do
252 if [ "yes" = "$profile" ]; then
253 echo "Debug is incompatible with profiling"
260 echo "logf() support enabled"
264 echo "Simulator build enabled"
268 if [ "yes" = "$use_debug" ]; then
269 echo "Profiling is incompatible with debug"
271 echo "Profiling support is enabled"
276 echo "Voice build selected"
280 if [ "$memory" = "2" ]; then
282 echo "Memory size selected: 8MB"
288 if [ "$archos" = "h120" ]; then
289 config_rtc
="#define CONFIG_RTC RTC_DS1339_DS3231"
290 have_rtc_alarm
="#define HAVE_RTC_ALARM"
291 echo "RTC functions enabled (DS1339/DS3231)"
303 if [ "yes" = "$voice" ]; then
304 # Ask about languages to build
305 echo "Select a number for the language to use (default is english)"
306 # The multiple-language feature is currently broken
307 # echo "You may enter a comma-separated list of languages to build"
310 voicelanguage
=`whichlang`
312 if [ -z "$voicelanguage" ]; then
314 voicelanguage
="english"
316 echo "Voice language set to $voicelanguage"
318 # Configure encoder and TTS engine for each language
319 for thislang
in `echo $voicelanguage | sed 's/,/ /g'`; do
320 voiceconfig
"$thislang"
323 if [ "yes" = "$use_debug" ]; then
325 GCCOPTS
="$GCCOPTS -g -DDEBUG"
327 if [ "yes" = "$logf" ]; then
328 use_logf
="#define ROCKBOX_HAS_LOGF 1"
330 if [ "yes" = "$simulator" ]; then
332 extradefines
="$extradefines -DSIMULATOR"
334 if [ "yes" = "$profile" ]; then
335 extradefines
="$extradefines -DRB_PROFILE"
336 PROFILE_OPTS
="-finstrument-functions"
340 # Configure voice settings
343 echo "Building $thislang voice for $archos. Select options"
346 if [ -f "`which flite`" ]; then
350 DEFAULT_TTS_OPTS
=$FLITE_OPTS
351 DEFAULT_NOISEFLOOR
="500"
354 if [ -f "`which espeak`" ]; then
358 DEFAULT_TTS_OPTS
=$ESPEAK_OPTS
359 DEFAULT_NOISEFLOOR
="500"
362 if [ -f "`which festival`" ]; then
363 FESTIVAL
="(F)estival "
366 FESTIVAL_OPTS
="--language italian"
369 FESTIVAL_OPTS
="--language spanish"
372 FESTIVAL_OPTS
="--language finnish"
375 FESTIVAL_OPTS
="--language czech"
381 DEFAULT_TTS
="festival"
382 DEFAULT_TTS_OPTS
=$FESTIVAL_OPTS
383 DEFAULT_NOISEFLOOR
="500"
386 if [ -f "`which swift`" ]; then
390 DEFAULT_TTS_OPTS
=$SWIFT_OPTS
391 DEFAULT_NOISEFLOOR
="500"
394 # Allow SAPI if Windows is in use
395 if [ -f "`which winver`" ]; then
399 DEFAULT_TTS_OPTS
=$SAPI_OPTS
400 DEFAULT_NOISEFLOOR
="500"
404 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
405 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
409 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
414 NOISEFLOOR
="500" # TODO: check this value
420 TTS_OPTS
=$ESPEAK_OPTS
423 TTS_ENGINE
="festival"
425 TTS_OPTS
=$FESTIVAL_OPTS
438 TTS_ENGINE
=$DEFAULT_TTS
439 TTS_OPTS
=$DEFAULT_TTS_OPTS
440 NOISEFLOOR
=$DEFAULT_NOISEFLOOR
442 echo "Using $TTS_ENGINE for TTS"
444 # Allow the user to input manual commandline options
445 printf "Enter $TTS_ENGINE options (enter for defaults \"$TTS_OPTS\"): "
446 USER_TTS_OPTS
=`input`
447 if [ -n "$USER_TTS_OPTS" ]; then
448 TTS_OPTS
="$USER_TTS_OPTS"
453 if [ "$swcodec" = "yes" ]; then
456 ENC_OPTS
="-q 4 -c 10"
458 if [ -f "`which lame`" ]; then
461 ENC_OPTS
="--resample 12 -t -m m -h -V 9 -S -B 64 --vbr-new"
463 echo "You need LAME in the system path to build voice files for"
464 echo "HWCODEC targets."
469 echo "Using $ENCODER for encoding voice clips"
471 # Allow the user to input manual commandline options
472 printf "Enter $ENCODER options (enter for defaults \"$ENC_OPTS\"): "
473 USER_ENC_OPTS
=`input`
474 if [ -n "$USER_ENC_OPTS" ]; then
475 ENC_OPTS
=$USER_ENC_OPTS
479 if [ -f "`which cygpath`" ]; then
480 TEMPDIR
=`cygpath . -a -w`
485 # figure out which languages that are around
486 for file in $rootdir/apps
/lang
/*.lang
; do
487 clean
=`echo $file | sed -e 's:.*/::g' | cut "-d." -f1`
488 langs
="$langs $clean"
492 for one
in $langs; do
502 # Allow the user to pass a comma-separated list of langauges
503 for thispick
in `echo $pick | sed 's/,/ /g'`; do
505 for one
in $langs; do
506 # Accept both the language number and name
507 if [ "$num" = "$thispick" ] ||
[ "$thispick" = "$one" ]; then
508 if [ "$output" = "" ]; then
522 if test "$opt" = "--help"; then
523 echo "Rockbox configure script."
524 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
525 echo "Do *NOT* run this within the tools directory!"
527 echo "Usage: configure [--ccache][--no-ccache]"
531 if test -r "configure"; then
532 # this is a check for a configure script in the current directory, it there
533 # is one, try to figure out if it is this one!
535 if { grep "^# Jukebox" configure
>/dev
/null
2>&1 ; } then
536 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
537 echo "It will only cause you pain and grief. Instead do this:"
540 echo " mkdir build-dir"
542 echo " ../tools/configure"
544 echo "Much happiness will arise from this. Enjoy"
549 # get our current directory
552 if { echo $pwd |
grep " "; } then
553 echo "You're running this script in a path that contains space. The build"
554 echo "system is unfortunately not clever enough to deal with this. Please"
555 echo "run the script from a different path, rename the path or fix the build"
560 if [ -z "$rootdir" ]; then
561 ##################################################################
562 # Figure out where the source code root is!
564 rootdir
=`dirname $0`/..
/
566 #####################################################################
567 # Convert the possibly relative directory name to an absolute version
573 # cd back to the build dir
578 appsdir
='\$(ROOTDIR)/apps'
579 firmdir
='\$(ROOTDIR)/firmware'
580 toolsdir
='\$(ROOTDIR)/tools'
583 ##################################################################
584 # Figure out target platform
587 echo "Enter target platform:"
589 ==Archos== ==iriver== ==Apple iPod==
590 0) Player/Studio 10) H120/H140 20) Color/Photo
591 1) Recorder 11) H320/H340 21) Nano
592 2) FM Recorder 12) iHP-100/110/115 22) Video
593 3) Recorder v2 13) iFP-790 23) 3G
594 4) Ondio SP 14) H10 20Gb 24) 4G Grayscale
595 5) Ondio FM 15) H10 5/6Gb 25) Mini 1G
599 ==iAudio== ==Toshiba== ==SanDisk==
600 30) X5/X5V/X5L 40) Gigabeat F 50) Sansa e200
601 31) M5/M5L 41) Gigabeat S 51) Sansa e200R
604 ==Tatung== ==Olympus== ==Logik==
605 60) Elio TPJ-1022 70) M:Robe 500 80) DAX 1GB MP3/DAB
611 # Set of tools built for all target platforms:
612 toolset
="rdf2binary convbdf codepages"
614 # Toolsets for some target families:
615 archosbitmaptools
="$toolset scramble descramble sh2d uclpack bmp2rb"
616 iriverbitmaptools
="$toolset scramble descramble mkboot bmp2rb"
617 iaudiobitmaptools
="$toolset scramble descramble mkboot bmp2rb"
618 ipodbitmaptools
="$toolset scramble ipod_fw bmp2rb"
619 gigabeatbitmaptools
="$toolset scramble descramble bmp2rb"
620 tccbitmaptools
="$toolset scramble mktccboot bmp2rb"
621 # generic is used by IFP, H10, Sansa-e200
622 genericbitmaptools
="$toolset bmp2rb"
625 # ---- For each target ----
628 # target_id: a unique number identifying this target, DOES NOT necessarily
629 # have to be the menu number. Just use the currently highest
630 # number+1 when you add a new target.
631 # archos: short model name used all over to identify this target
632 # memory: number of megabytes of RAM this target has. If the amount can
633 # be selected by the size prompt, let memory be unset here
634 # target: -Ddefine passed to the build commands to make the correct
635 # config-*.h file get included etc
636 # tool: the tool that takes a plain binary and converts that into a
637 # working "firmware" file for your target
638 # output: the final output file name
639 # boottool: the tool that takes a plain binary and generates a bootloader
640 # file for your target (or blank to use $tool)
641 # bootoutput:the final output file name for the bootloader (or blank to use
643 # appextra: passed to the APPEXTRA variable in the Makefiles.
644 # TODO: add proper explanation
645 # archosrom: used only for Archos targets that build a special flashable .ucl
646 # image. Set to blank for other builds.
647 # flash: the same as archosrom. These two should be merged
648 # plugins: set to 'yes' to build the plugins. Early development builds can
649 # set this to no in the early stages to have an easier life for a
651 # swcodec: set 'yes' on swcodec targets
652 # toolset: lists what particular tools in the tools/ directory that this
653 # target needs to have built prior to building Rockbox
656 # *cc: sets up gcc and compiler options for your target builds. Note
657 # that if you select a simulator build, the compiler selection is
658 # overridden later in the script.
665 target
="-DARCHOS_PLAYER"
667 tool
="$rootdir/tools/scramble"
669 appextra
="player:gui"
670 archosrom
="$pwd/rombox.ucl"
671 flash
="$pwd/rockbox.ucl"
675 # toolset is the tools within the tools directory that we build for
676 # this particular target.
677 toolset
="$toolset scramble descramble sh2d player_unifont uclpack"
679 # Note: the convbdf is present in the toolset just because: 1) the
680 # firmware/Makefile assumes it is present always, and 2) we will need it when we
681 # build the player simulator
684 t_manufacturer
="archos"
691 target
="-DARCHOS_RECORDER"
693 tool
="$rootdir/tools/scramble"
694 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
695 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
697 appextra
="recorder:gui"
698 archosrom
="" #"$pwd/rombox.ucl"
699 flash
="$pwd/rockbox.ucl"
702 # toolset is the tools within the tools directory that we build for
703 # this particular target.
704 toolset
=$archosbitmaptools
706 t_manufacturer
="archos"
713 target
="-DARCHOS_FMRECORDER"
715 tool
="$rootdir/tools/scramble -fm"
716 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
717 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
719 appextra
="recorder:gui"
720 archosrom
="" #"$pwd/rombox.ucl"
721 flash
="$pwd/rockbox.ucl"
724 # toolset is the tools within the tools directory that we build for
725 # this particular target.
726 toolset
=$archosbitmaptools
728 t_manufacturer
="archos"
735 target
="-DARCHOS_RECORDERV2"
737 tool
="$rootdir/tools/scramble -v2"
738 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
739 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
741 appextra
="recorder:gui"
742 archosrom
="" #"$pwd/rombox.ucl"
743 flash
="$pwd/rockbox.ucl"
746 # toolset is the tools within the tools directory that we build for
747 # this particular target.
748 toolset
=$archosbitmaptools
750 t_manufacturer
="archos"
757 target
="-DARCHOS_ONDIOSP"
759 tool
="$rootdir/tools/scramble -osp"
760 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
761 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
763 appextra
="recorder:gui"
764 archosrom
="$pwd/rombox.ucl"
765 flash
="$pwd/rockbox.ucl"
768 # toolset is the tools within the tools directory that we build for
769 # this particular target.
770 toolset
=$archosbitmaptools
772 t_manufacturer
="archos"
779 target
="-DARCHOS_ONDIOFM"
781 tool
="$rootdir/tools/scramble -ofm"
782 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
783 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
785 appextra
="recorder:gui"
786 archosrom
="" #"$pwd/rombox.ucl"
787 flash
="$pwd/rockbox.ucl"
790 toolset
=$archosbitmaptools
792 t_manufacturer
="archos"
799 target
="-DARCHOS_AV300"
802 tool
="$rootdir/tools/scramble -mm=C"
803 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
804 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
806 appextra
="recorder:gui"
811 # toolset is the tools within the tools directory that we build for
812 # this particular target.
813 toolset
="$toolset scramble descramble bmp2rb"
814 # architecture, manufacturer and model for the target-tree build
816 t_manufacturer
="archos"
823 target
="-DIRIVER_H120"
826 tool
="$rootdir/tools/scramble -add=h120"
827 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
828 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
829 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
830 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
831 output
="rockbox.iriver"
832 appextra
="recorder:gui"
834 flash
="$pwd/rombox.iriver"
837 # toolset is the tools within the tools directory that we build for
838 # this particular target.
839 toolset
=$iriverbitmaptools
841 t_manufacturer
="iriver"
848 target
="-DIRIVER_H300"
851 tool
="$rootdir/tools/scramble -add=h300"
852 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
853 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
854 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
855 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
856 output
="rockbox.iriver"
857 appextra
="recorder:gui"
862 # toolset is the tools within the tools directory that we build for
863 # this particular target.
864 toolset
=$iriverbitmaptools
866 t_manufacturer
="iriver"
873 target
="-DIRIVER_H100"
876 tool
="$rootdir/tools/scramble -add=h100"
877 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
878 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
879 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
880 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
881 output
="rockbox.iriver"
882 appextra
="recorder:gui"
887 # toolset is the tools within the tools directory that we build for
888 # this particular target.
889 toolset
=$iriverbitmaptools
891 t_manufacturer
="iriver"
898 target
="-DIRIVER_IFP7XX"
902 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
903 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
905 appextra
="recorder:gui"
910 # toolset is the tools within the tools directory that we build for
911 # this particular target.
912 toolset
=$genericbitmaptools
914 t_manufacturer
="pnx0101"
915 t_model
="iriver-ifp7xx"
921 target
="-DIRIVER_H10"
924 tool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
925 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
926 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
928 appextra
="recorder:gui"
933 boottool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
934 bootoutput
="H10_20GC.mi4"
935 # toolset is the tools within the tools directory that we build for
936 # this particular target.
937 toolset
="$genericbitmaptools scramble"
938 # architecture, manufacturer and model for the target-tree build
940 t_manufacturer
="iriver"
947 target
="-DIRIVER_H10_5GB"
950 tool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
951 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
952 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
954 appextra
="recorder:gui"
959 boottool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
961 # toolset is the tools within the tools directory that we build for
962 # this particular target.
963 toolset
="$genericbitmaptools scramble"
964 # architecture, manufacturer and model for the target-tree build
966 t_manufacturer
="iriver"
973 target
="-DIPOD_COLOR"
976 tool
="$rootdir/tools/scramble -add=ipco"
977 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
978 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
979 output
="rockbox.ipod"
980 appextra
="recorder:gui"
985 bootoutput
="bootloader-$archos.ipod"
986 # toolset is the tools within the tools directory that we build for
987 # this particular target.
988 toolset
=$ipodbitmaptools
989 # architecture, manufacturer and model for the target-tree build
991 t_manufacturer
="ipod"
1001 tool
="$rootdir/tools/scramble -add=nano"
1002 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1003 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1004 output
="rockbox.ipod"
1005 appextra
="recorder:gui"
1010 bootoutput
="bootloader-$archos.ipod"
1011 # toolset is the tools within the tools directory that we build for
1012 # this particular target.
1013 toolset
=$ipodbitmaptools
1014 # architecture, manufacturer and model for the target-tree build
1016 t_manufacturer
="ipod"
1023 target
="-DIPOD_VIDEO"
1025 tool
="$rootdir/tools/scramble -add=ipvd"
1026 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1027 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1028 output
="rockbox.ipod"
1029 appextra
="recorder:gui"
1034 bootoutput
="bootloader-$archos.ipod"
1035 # toolset is the tools within the tools directory that we build for
1036 # this particular target.
1037 toolset
=$ipodbitmaptools
1038 # architecture, manufacturer and model for the target-tree build
1040 t_manufacturer
="ipod"
1050 tool
="$rootdir/tools/scramble -add=ip3g"
1051 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1052 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1053 output
="rockbox.ipod"
1054 appextra
="recorder:gui"
1059 bootoutput
="bootloader-$archos.ipod"
1060 # toolset is the tools within the tools directory that we build for
1061 # this particular target.
1062 toolset
=$ipodbitmaptools
1063 # architecture, manufacturer and model for the target-tree build
1065 t_manufacturer
="ipod"
1075 tool
="$rootdir/tools/scramble -add=ip4g"
1076 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1077 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1078 output
="rockbox.ipod"
1079 appextra
="recorder:gui"
1084 bootoutput
="bootloader-$archos.ipod"
1085 # toolset is the tools within the tools directory that we build for
1086 # this particular target.
1087 toolset
=$ipodbitmaptools
1088 # architecture, manufacturer and model for the target-tree build
1090 t_manufacturer
="ipod"
1097 target
="-DIPOD_MINI"
1100 tool
="$rootdir/tools/scramble -add=mini"
1101 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1102 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1103 output
="rockbox.ipod"
1104 appextra
="recorder:gui"
1109 bootoutput
="bootloader-$archos.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"
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"
1134 bootoutput
="bootloader-$archos.ipod"
1135 # toolset is the tools within the tools directory that we build for
1136 # this particular target.
1137 toolset
=$ipodbitmaptools
1138 # architecture, manufacturer and model for the target-tree build
1140 t_manufacturer
="ipod"
1147 target
="-DIPOD_1G2G"
1150 tool
="$rootdir/tools/scramble -add=1g2g"
1151 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1152 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1153 output
="rockbox.ipod"
1154 appextra
="recorder:gui"
1159 bootoutput
="bootloader-$archos.ipod"
1160 # toolset is the tools within the tools directory that we build for
1161 # this particular target.
1162 toolset
=$ipodbitmaptools
1163 # architecture, manufacturer and model for the target-tree build
1165 t_manufacturer
="ipod"
1172 target
="-DIAUDIO_X5"
1175 tool
="$rootdir/tools/scramble -add=iax5"
1176 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1177 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1178 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1179 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1180 output
="rockbox.iaudio"
1181 appextra
="recorder:gui"
1186 # toolset is the tools within the tools directory that we build for
1187 # this particular target.
1188 toolset
="$iaudiobitmaptools"
1189 # architecture, manufacturer and model for the target-tree build
1191 t_manufacturer
="iaudio"
1198 target
="-DIAUDIO_M5"
1201 tool
="$rootdir/tools/scramble -add=iam5"
1202 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1203 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1204 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1205 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1206 output
="rockbox.iaudio"
1207 appextra
="recorder:gui"
1212 # toolset is the tools within the tools directory that we build for
1213 # this particular target.
1214 toolset
="$iaudiobitmaptools"
1215 # architecture, manufacturer and model for the target-tree build
1217 t_manufacturer
="iaudio"
1224 target
="-DGIGABEAT_F"
1227 tool
="$rootdir/tools/scramble -add=giga"
1228 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1229 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1230 output
="rockbox.gigabeat"
1231 appextra
="recorder:gui"
1236 toolset
=$gigabeatbitmaptools
1237 boottool
="$rootdir/tools/scramble -gigabeat"
1238 bootoutput
="FWIMG01.DAT"
1239 # architecture, manufacturer and model for the target-tree build
1241 t_manufacturer
="s3c2440"
1242 t_model
="gigabeat-fx"
1248 target
="-DGIGABEAT_S"
1251 tool
="$rootdir/tools/scramble -add=gigs"
1252 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1253 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1254 output
="rockbox.gigabeat"
1255 appextra
="recorder:gui"
1260 toolset
="$gigabeatbitmaptools mknkboot"
1261 boottool
="$rootdir/tools/scramble -gigabeats"
1263 # architecture, manufacturer and model for the target-tree build
1265 t_manufacturer
="imx31"
1266 t_model
="gigabeat-s"
1272 target
="-DMROBE_500"
1275 # tool="$rootdir/tools/scramble -add=m500"
1277 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1278 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1279 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1280 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1281 output
="rockbox.mrobe500"
1282 appextra
="recorder:gui"
1287 toolset
=$gigabeatbitmaptools
1289 bootoutput
="rockbox.mrboot"
1290 # architecture, manufacturer and model for the target-tree build
1292 t_manufacturer
="tms320dm320"
1299 target
="-DMROBE_100"
1302 tool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS"
1303 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1304 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1305 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1306 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1307 output
="rockbox.mi4"
1308 appextra
="recorder:gui"
1313 boottool
="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBBL"
1314 bootoutput
="pp5020.mi4"
1315 # toolset is the tools within the tools directory that we build for
1316 # this particular target.
1317 toolset
="$genericbitmaptools scramble"
1318 # architecture, manufacturer and model for the target-tree build
1320 t_manufacturer
="olympus"
1327 target
="-DLOGIK_DAX"
1330 tool
="$rootdir/tools/scramble -add=ldax"
1331 boottool
="$rootdir/tools/scramble -tcc=crc"
1332 bootoutput
="player.rom"
1333 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1334 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
1335 output
="rockbox.logik"
1336 appextra
="recorder:gui"
1341 # toolset is the tools within the tools directory that we build for
1342 # this particular target.
1343 toolset
=$tccbitmaptools
1344 # architecture, manufacturer and model for the target-tree build
1346 t_manufacturer
="tcc77x"
1353 target
="-DSANSA_E200"
1354 memory
=32 # supposedly
1356 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1357 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1358 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1359 output
="rockbox.mi4"
1360 appextra
="recorder:gui"
1365 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1366 bootoutput
="PP5022.mi4"
1367 # toolset is the tools within the tools directory that we build for
1368 # this particular target.
1369 toolset
="$genericbitmaptools scramble"
1370 # architecture, manufacturer and model for the target-tree build
1372 t_manufacturer
="sandisk"
1373 t_model
="sansa-e200"
1377 # the e200R model is pretty much identical to the e200, it only has a
1378 # different option to the scramble tool when building a bootloader and
1379 # makes the bootloader output file name in all lower case.
1382 target
="-DSANSA_E200"
1383 memory
=32 # supposedly
1385 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1386 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1387 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1388 output
="rockbox.mi4"
1389 appextra
="recorder:gui"
1394 boottool
="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
1395 bootoutput
="pp5022.mi4"
1396 # toolset is the tools within the tools directory that we build for
1397 # this particular target.
1398 toolset
="$genericbitmaptools scramble"
1399 # architecture, manufacturer and model for the target-tree build
1401 t_manufacturer
="sandisk"
1402 t_model
="sansa-e200"
1408 target
="-DSANSA_C200"
1409 memory
=32 # supposedly
1411 tool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
1412 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1413 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1414 output
="rockbox.mi4"
1415 appextra
="recorder:gui"
1420 boottool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1421 bootoutput
="firmware.mi4"
1422 # toolset is the tools within the tools directory that we build for
1423 # this particular target.
1424 toolset
="$genericbitmaptools scramble"
1425 # architecture, manufacturer and model for the target-tree build
1427 t_manufacturer
="sandisk"
1428 t_model
="sansa-c200"
1434 target
="-DELIO_TPJ1022"
1437 tool
="$rootdir/tools/scramble -add tpj2"
1438 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1439 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1440 output
="rockbox.elio"
1441 appextra
="recorder:gui"
1446 boottool
="$rootdir/tools/scramble -mi4v2"
1447 bootoutput
="pp5020.mi4"
1448 # toolset is the tools within the tools directory that we build for
1449 # this particular target.
1450 toolset
="$genericbitmaptools scramble"
1451 # architecture, manufacturer and model for the target-tree build
1453 t_manufacturer
="tatung"
1463 tool
="$rootdir/tools/scramble -add i7"
1464 boottool
="$rootdir/tools/scramble -tcc=crc"
1465 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1466 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1467 output
="rockbox.iaudio"
1468 appextra
="recorder:gui"
1473 bootoutput
="I7_FW.BIN"
1474 # toolset is the tools within the tools directory that we build for
1475 # this particular target.
1476 toolset
="$tccbitmaptools"
1477 # architecture, manufacturer and model for the target-tree build
1479 t_manufacturer
="tcc77x"
1484 echo "Please select a supported target platform!"
1490 echo "Platform set to $archos"
1494 ############################################################################
1495 # Amount of memory, for those that can differ. They have $memory unset at
1499 if [ -z "$memory" ]; then
1503 echo "Enter size of your RAM (in MB): (Defaults to 32)"
1516 echo "Enter size of your RAM (in MB): (defaults to 2)"
1529 echo "Memory size selected: $memory MB"
1533 ##################################################################
1534 # Figure out build "type"
1537 # the ifp7x0 is the only platform that supports building a gdb stub like
1541 gdbstub
="(G)DB stub, "
1544 gdbstub
="(I)installer, "
1551 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, $gdbstub(M)anual (N)"
1557 appsdir
='\$(ROOTDIR)/bootloader'
1559 extradefines
="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
1561 echo "e200R-installer build selected"
1564 if test $t_manufacturer = "archos"; then
1565 # Archos SH-based players do this somewhat differently for
1567 appsdir
='\$(ROOTDIR)/flash/bootbox'
1570 appsdir
='\$(ROOTDIR)/bootloader'
1573 if test -n "$boottool"; then
1576 if test -n "$bootoutput"; then
1580 extradefines
="-DBOOTLOADER -ffunction-sections -fdata-sections"
1582 echo "Bootloader build selected"
1587 extradefines
="-DSIMULATOR"
1588 echo "Simulator build selected"
1591 echo "Advanced build selected"
1595 extradefines
="-DSTUB" # for target makefile symbol EXTRA_DEFINES
1596 appsdir
='\$(ROOTDIR)/gdb'
1605 echo "GDB stub build selected"
1608 appsdir
='\$(ROOTDIR)/manual'
1609 firmdir
='\$(ROOTDIR)/manual/platform' # No Makefile here. Effectively ig:res target
1613 echo "Manual build selected"
1616 if [ "$archos" = "e200r" ]; then
1617 echo "Do not use the e200R target for regular builds. Use e200 instead."
1621 echo "Normal build selected"
1625 # to be able running "make manual" from non-manual configuration
1628 manualdev
="recorderv2fm"
1631 manualdev
="recorderv2fm"
1637 manualdev
="ipodmini"
1644 if [ -z "$debug" ]; then
1645 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
1648 echo "Using source code root directory: $rootdir"
1650 # this was once possible to change at build-time, but no more:
1655 if [ "yes" = "$simulator" ]; then
1656 # setup compiler and things for simulator
1659 if [ -d "archos" ]; then
1660 echo "sub directory archos already present"
1663 echo "created an archos subdirectory for simulating the hard disk"
1667 # Now, figure out version number of the (gcc) compiler we are about to use
1668 gccver
=`$CC -dumpversion`;
1670 # figure out the binutil version too and display it, mostly for the build
1671 # system etc to be able to see it easier
1672 ldver
=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
1674 if [ -z "$gccver" ]; then
1675 echo "WARNING: The compiler you must use ($CC) is not in your path!"
1676 echo "WARNING: this may cause your build to fail since we cannot do the"
1677 echo "WARNING: checks we want now."
1680 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
1683 num1
=`echo $gccver | cut -d . -f1`
1684 num2
=`echo $gccver | cut -d . -f2`
1685 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
1692 echo "Using $CC $gccver ($gccnum)"
1694 if test "$gccnum" -ge "400"; then
1695 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
1696 # so we ignore that warnings for now
1698 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
1701 if test "$gccnum" -ge "401"; then
1702 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
1703 # will break strict-aliasing rules"
1705 GCCOPTS
="$GCCOPTS -fno-strict-aliasing"
1708 if test "$gccnum" -ge "402"; then
1709 # disable warning about "warning: initialized field overwritten" as gcc 4.2
1710 # and later would throw it for several valid cases
1711 GCCOPTS
="$GCCOPTS -Wno-override-init"
1716 echo "Using $LD $ldver"
1718 # check the compiler for SH platforms
1719 if test "$CC" = "sh-elf-gcc"; then
1720 if test "$gccnum" -lt "400"; then
1721 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
1722 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
1724 # figure out patch status
1725 gccpatch
=`$CC --version`;
1727 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
1728 echo "gcc $gccver is rockbox patched"
1729 # then convert -O to -Os to get smaller binaries!
1730 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
1732 echo "WARNING: You use an unpatched gcc compiler: $gccver"
1733 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
1738 if test "$CC" = "m68k-elf-gcc"; then
1739 # convert -O to -Os to get smaller binaries!
1740 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
1743 if test "$1" = "--ccache"; then
1744 echo "Enable ccache for building"
1747 if test "$1" != "--no-ccache"; then
1748 ccache
=`findtool ccache`
1749 if test -n "$ccache"; then
1750 echo "Found and uses ccache ($ccache)"
1755 if test -n "$ccache"; then
1759 if test "X$endian" = "Xbig"; then
1760 defendian
="ROCKBOX_BIG_ENDIAN"
1762 defendian
="ROCKBOX_LITTLE_ENDIAN"
1766 -e "s,@ENDIAN@,${defendian},g" \
1767 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
1768 -e "s,@config_rtc@,$config_rtc,g" \
1769 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
1771 /* This header was made by configure */
1772 #ifndef __BUILD_AUTOCONF_H
1773 #define __BUILD_AUTOCONF_H
1775 /* Define endianess for the target or simulator platform */
1778 /* Define this if you build rockbox to support the logf logging and display */
1779 #undef ROCKBOX_HAS_LOGF
1781 /* optional defines for RTC mod for h1x0 */
1785 #endif /* __BUILD_AUTOCONF_H */
1788 if test -n "$t_cpu"; then
1789 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
1790 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
1791 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
1795 if test "$simulator" = "yes"; then
1796 # add simul make stuff on the #SIMUL# line
1797 simmagic1
="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
1798 simmagic2
="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
1800 # delete the lines that match
1801 simmagic1
='/@SIMUL1@/D'
1802 simmagic2
='/@SIMUL2@/D'
1805 if test "$swcodec" = "yes"; then
1806 voicetoolset
="rbspeexenc voicefont wavtrim"
1808 voicetoolset
="voicefont wavtrim"
1812 -e "s,@ROOTDIR@,${rootdir},g" \
1813 -e "s,@DEBUG@,${debug},g" \
1814 -e "s,@MEMORY@,${memory},g" \
1815 -e "s,@TARGET_ID@,${target_id},g" \
1816 -e "s,@TARGET@,${target},g" \
1817 -e "s,@CPU@,${t_cpu},g" \
1818 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
1819 -e "s,@ARCHOS@,${archos},g" \
1820 -e "s,@LANGUAGE@,${language},g" \
1821 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
1822 -e "s,@PWD@,${pwd},g" \
1823 -e "s,@CC@,${CC},g" \
1824 -e "s,@LD@,${LD},g" \
1825 -e "s,@AR@,${AR},g" \
1826 -e "s,@AS@,${AS},g" \
1827 -e "s,@OC@,${OC},g" \
1828 -e "s,@WINDRES@,${WINDRES},g" \
1829 -e "s,@DLLTOOL@,${DLLTOOL},g" \
1830 -e "s,@DLLWRAP@,${DLLWRAP},g" \
1831 -e "s,@RANLIB@,${RANLIB},g" \
1832 -e "s,@TOOL@,${tool},g" \
1833 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
1834 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
1835 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
1836 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
1837 -e "s,@OUTPUT@,${output},g" \
1838 -e "s,@APPEXTRA@,${appextra},g" \
1839 -e "s,@ARCHOSROM@,${archosrom},g" \
1840 -e "s,@FLASHFILE@,${flash},g" \
1841 -e "s,@PLUGINS@,${plugins},g" \
1842 -e "s,@CODECS@,${swcodec},g" \
1843 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
1844 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
1845 -e "s,@GCCOPTS@,${GCCOPTS},g" \
1846 -e "s,@TARGET_INC@,${TARGET_INC},g" \
1847 -e "s!@LDOPTS@!${LDOPTS}!g" \
1848 -e "s,@LOADADDRESS@,${loadaddress},g" \
1849 -e "s,@EXTRADEF@,${extradefines},g" \
1850 -e "s,@APPSDIR@,${appsdir},g" \
1851 -e "s,@FIRMDIR@,${firmdir},g" \
1852 -e "s,@TOOLSDIR@,${toolsdir},g" \
1853 -e "s,@APPS@,${apps},g" \
1854 -e "s,@SIMVER@,${simver},g" \
1855 -e "s,@GCCVER@,${gccver},g" \
1856 -e "s,@GCCNUM@,${gccnum},g" \
1857 -e "s,@UNAME@,${uname},g" \
1858 -e "s,@ENDIAN@,${defendian},g" \
1859 -e "s,@TOOLSET@,${toolset},g" \
1862 -e "s,@MANUALDEV@,${manualdev},g" \
1863 -e "s,@ENCODER@,${ENC_CMD},g" \
1864 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
1865 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
1866 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
1867 -e "s,@VOICETOOLSET@,${voicetoolset},g" \
1869 ## Automaticly generated. http://www.rockbox.org/
1877 # old 'make' versions don't have the built-in 'info' function
1878 info=old\$(shell echo >&2 "Consider upgrading to GNU make 3.81+ for optimum build performance.")
1879 ifeq (\$(call info),old)
1880 export info=echo "\$\$(1)";
1883 export ROOTDIR=@ROOTDIR@
1884 export FIRMDIR=@FIRMDIR@
1885 export APPSDIR=@APPSDIR@
1886 export TOOLSDIR=@TOOLSDIR@
1887 export DOCSDIR=\$(ROOTDIR)/docs
1888 export MANUALDIR=\${ROOTDIR}/manual
1889 export DEBUG=@DEBUG@
1890 export ARCHOS=@ARCHOS@
1891 export ARCHOSROM=@ARCHOSROM@
1892 export FLASHFILE=@FLASHFILE@
1893 export TARGET_ID=@TARGET_ID@
1894 export TARGET=@TARGET@
1896 export MANUFACTURER=@MANUFACTURER@
1898 export BUILDDIR=@PWD@
1899 export LANGUAGE=@LANGUAGE@
1900 export VOICELANGUAGE=@VOICELANGUAGE@
1901 export MEMORYSIZE=@MEMORY@
1902 export VERSION=\$(shell \$(ROOTDIR)/tools/svnversion.sh \$(ROOTDIR))
1903 export BUILDDATE=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
1904 export MKFIRMWARE=@TOOL@
1905 export BMP2RB_MONO=@BMP2RB_MONO@
1906 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
1907 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
1908 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
1909 export BINARY=@OUTPUT@
1910 export APPEXTRA=@APPEXTRA@
1911 export ENABLEDPLUGINS=@PLUGINS@
1912 export SOFTWARECODECS=@CODECS@
1913 export EXTRA_DEFINES=@EXTRADEF@
1921 export WINDRES=@WINDRES@
1922 export DLLTOOL=@DLLTOOL@
1923 export DLLWRAP=@DLLWRAP@
1924 export RANLIB=@RANLIB@
1925 export PROFILE_OPTS=@PROFILE_OPTS@
1926 export SIMVER=@SIMVER@
1927 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
1928 export GCCOPTS=@GCCOPTS@
1929 export TARGET_INC=@TARGET_INC@
1930 export LOADADDRESS=@LOADADDRESS@
1931 export SHARED_FLAG=@SHARED_FLAG@
1932 export LDOPTS=@LDOPTS@
1933 export GCCVER=@GCCVER@
1934 export GCCNUM=@GCCNUM@
1935 export UNAME=@UNAME@
1936 export MANUALDEV=@MANUALDEV@
1937 export TTS_OPTS=@TTS_OPTS@
1938 export TTS_ENGINE=@TTS_ENGINE@
1939 export ENC_OPTS=@ENC_OPTS@
1940 export ENCODER=@ENCODER@
1942 # Do not print "Entering directory ..."
1943 MAKEFLAGS += --no-print-directory
1945 .PHONY: all clean tags zip tools manual bin build info
1950 \$(SILENT)\$(TOOLSDIR)/mkinfo.pl \$(BUILDDIR)/rockbox-info.txt
1955 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
1956 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@
1961 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
1962 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ \$(BUILDDIR)/\$(BINARY)
1965 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ rocks
1967 veryclean: clean toolsclean
1970 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) clean
1973 \$(SILENT)echo Cleaning build directory
1974 \$(SILENT)rm -rf rockbox.zip TAGS @APPS@ firmware comsim sim lang.[ch]\
1975 manual *.pdf *.a credits.raw @OUTPUT@ bitmaps pluginbitmaps \
1976 @ARCHOSROM@ @FLASHFILE@ UI256.bmp rockbox-full.zip \
1977 html txt rockbox-manual*.zip sysfont.h rockbox-info.txt \
1978 voicefontids *.wav *.mp3 *.voice
1981 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @TOOLSET@
1984 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @VOICETOOLSET@
1987 \$(SILENT)rm -f TAGS
1988 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) tags
1989 \$(SILENT)\$(MAKE) -C \$(APPSDIR) tags
1990 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins tags
1991 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins/lib tags
1994 \$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\" -r "\$(ROOTDIR)" -f 1 -o rockbox-fonts.zip \$(TARGET) \$(BINARY)
1997 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
1998 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
2001 \$(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip
2004 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
2005 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" -f 2 -o rockbox-full.zip \$(TARGET) \$(BINARY)
2008 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
2009 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.7z" -z "7za a" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
2012 \$(SILENT)rm -f rockbox.tar
2013 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
2014 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.tar" -z "tar --no-recursion -uf" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
2017 \$(SILENT)bzip2 -f9 rockbox.tar
2020 \$(SILENT)gzip -f9 rockbox.tar
2024 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-pdf
2026 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-html
2027 manual-zhtml: manual-zip
2029 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt
2031 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt-zip
2033 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-zip
2036 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ features
2039 @echo "A few helpful make targets"
2041 @echo "all - builds a full Rockbox (default), including tools"
2042 @echo "bin - builds only the Rockbox.<target name> file"
2043 @echo "clean - cleans a build directory (not tools)"
2044 @echo "veryclean - cleans the build and tools directories"
2045 @echo "manual - builds a manual"
2046 @echo "manual-html - HTML manual"
2047 @echo "manual-zip - HTML manual (zipped)"
2048 @echo "manual-txt - txt manual"
2049 @echo "fullzip - creates a rockbox.zip of your build with fonts"
2050 @echo "zip - creates a rockbox.zip of your build (no fonts)"
2051 @echo "gzip - creates a rockbox.tar.gz of your build (no fonts)"
2052 @echo "bzip2 - creates a rockbox.tar.bz2 of your build (no fonts)"
2053 @echo "7zip - creates a rockbox.7z of your build (no fonts)"
2054 @echo "fontzip - creates rockbox-fonts.zip"
2055 @echo "mapzip - creates rockbox-maps.zip with all .map files"
2056 @echo "tools - builds the tools only"
2057 @echo "voicetools - builds the voice tools only"
2058 @echo "install - installs your build (for simulator builds only)"
2062 if [ "yes" = "$simulator" ]; then
2064 cat >> Makefile
<<EOF
2067 @echo "installing a full setup in your archos dir"
2068 @(\$(MAKE) fullzip && cd archos && unzip -oq ../rockbox-full.zip)
2073 if [ "yes" = "$voice" ]; then
2075 cat >> Makefile
<<EOF
2077 voice: voicetools features
2078 \$(SILENT)for f in \`cat \$(BUILDDIR)/${apps}/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
2079 for lang in \`echo \$(VOICELANGUAGE) |sed "s/,/ /g"\`; do \$(TOOLSDIR)/voice.pl -V -l=\$\$lang -t=\$(ARCHOS)\$\$feat -i=\$(TARGET_ID) -e="\$(ENCODER)" -E="\$(ENC_OPTS)" -s=\$(TTS_ENGINE) -S="\$(TTS_OPTS)"; done \\
2084 echo "Created Makefile"