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"
216 ##################################################################
217 # Prompt for specific developer options
220 echo "Enter your developer options (press enter when done)"
221 echo -n "(D)EBUG, (L)ogf, (S)imulator, (P)rofiling, (V)oice"
222 if [ "$memory" = "2" ]; then
223 echo -n ", (8)MB MOD"
225 if [ "$archos" = "h120" ]; then
226 echo -n ", (R)TC MOD"
232 while [ $cont = "1" ]; do
238 if [ "yes" = "$profile" ]; then
239 echo "Debug is incompatible with profiling"
246 echo "logf() support enabled"
250 echo "Simulator build enabled"
254 if [ "yes" = "$use_debug" ]; then
255 echo "Profiling is incompatible with debug"
257 echo "Profiling support is enabled"
262 echo "Voice build selected"
266 if [ "$memory" = "2" ]; then
268 echo "Memory size selected: 8MB"
274 if [ "$archos" = "h120" ]; then
275 config_rtc
="#define CONFIG_RTC RTC_DS1339_DS3231"
276 have_rtc_alarm
="#define HAVE_RTC_ALARM"
277 echo "RTC functions enabled (DS1339/DS3231)"
289 if [ "yes" = "$voice" ]; then
290 toolset
="${toolset} voicefont wavtrim"
292 # Ask about languages to build
293 echo "Select a number for the language to use (default is english)"
294 # The multiple-language feature is currently broken
295 # echo "You may enter a comma-separated list of languages to build"
298 voicelanguage
=`whichlang`
300 if [ -z "$voicelanguage" ]; then
302 voicelanguage
="english"
304 echo "Voice language set to $voicelanguage"
306 # Configure encoder and TTS engine for each language
307 for thislang
in `echo $voicelanguage | sed 's/,/ /g'`; do
308 voiceconfig
"$thislang"
311 if [ "yes" = "$use_debug" ]; then
313 GCCOPTS
="$GCCOPTS -g -DDEBUG"
315 if [ "yes" = "$logf" ]; then
316 use_logf
="#define ROCKBOX_HAS_LOGF 1"
318 if [ "yes" = "$simulator" ]; then
320 extradefines
="$extradefines -DSIMULATOR"
322 if [ "yes" = "$profile" ]; then
323 extradefines
="$extradefines -DRB_PROFILE"
324 PROFILE_OPTS
="-finstrument-functions"
328 # Configure voice settings
331 echo "Building $thislang voice for $archos. Select options"
334 if [ -f "`which flite`" ]; then
338 DEFAULT_TTS_OPTS
=$FLITE_OPTS
339 DEFAULT_NOISEFLOOR
="500"
342 if [ -f "`which espeak`" ]; then
346 DEFAULT_TTS_OPTS
=$ESPEAK_OPTS
347 DEFAULT_NOISEFLOOR
="500"
350 if [ -f "`which festival`" ]; then
351 FESTIVAL
="(F)estival "
354 FESTIVAL_OPTS
="--language italian"
357 FESTIVAL_OPTS
="--language spanish"
360 FESTIVAL_OPTS
="--language finnish"
363 FESTIVAL_OPTS
="--language czech"
369 DEFAULT_TTS
="festival"
370 DEFAULT_TTS_OPTS
=$FESTIVAL_OPTS
371 DEFAULT_NOISEFLOOR
="500"
374 if [ -f "`which swift`" ]; then
378 DEFAULT_TTS_OPTS
=$SWIFT_OPTS
379 DEFAULT_NOISEFLOOR
="500"
382 # Allow SAPI if Windows is in use
383 if [ -f "`which winver`" ]; then
387 DEFAULT_TTS_OPTS
=$SAPI_OPTS
388 DEFAULT_NOISEFLOOR
="500"
392 if [ "$FESTIVAL" = "$FLITE" ] && [ "$FLITE" = "$ESPEAK" ] && [ "$ESPEAK" = "$SAPI" ] && [ "$SAPI" = "$SWIFT" ]; then
393 echo "You need Festival, eSpeak or Flite in your path, or SAPI available to build voice files"
397 echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?"
402 NOISEFLOOR
="500" # TODO: check this value
408 TTS_OPTS
=$ESPEAK_OPTS
411 TTS_ENGINE
="festival"
413 TTS_OPTS
=$FESTIVAL_OPTS
426 TTS_ENGINE
=$DEFAULT_TTS
427 TTS_OPTS
=$DEFAULT_TTS_OPTS
428 NOISEFLOOR
=$DEFAULT_NOISEFLOOR
430 echo "Using $TTS_ENGINE for TTS"
432 # Allow the user to input manual commandline options
433 printf "Enter $TTS_ENGINE options (enter for defaults \"$TTS_OPTS\"): "
434 USER_TTS_OPTS
=`input`
435 if [ -n "$USER_TTS_OPTS" ]; then
436 TTS_OPTS
="$USER_TTS_OPTS"
441 if [ -f "`which oggenc`" ]; then
444 VORBIS_OPTS
="-q0 --downmix"
445 DEFAULT_ENC_OPTS
=$VORBIS_OPTS
448 if [ -f "`which speexenc`" ]; then
449 SPEEXENC
="(S)peexenc "
450 DEFAULT_ENC
="speexenc"
451 SPEEX_OPTS
="" # TODO: find appropriate options for speex
452 DEFAULT_ENC_OPTS
=$SPEEX_OPTS
455 if [ -f "`which lame`" ]; then
458 LAME_OPTS
="--resample 12 -t -m m -h -V 9 -S -B 64 --vbr-new"
459 DEFAULT_ENC_OPTS
=$LAME_OPTS
463 if [ "$LAME" = "" ]; then
464 echo "You currently need to have Lame installed to build voice files"
467 # echo "Encoder to use: ${LAME}${OGGENC}${SPEEXENC}(${DEFAULT_CHOICE})?"
469 # echo "Note: Use Lame - the other options won't work"
475 ENC_OPTS
=$VORBIS_OPTS
487 ENC_OPTS
=$DEFAULT_ENC_OPTS
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
624 ==Tatung== ==Olympus==
625 60) Elio TPJ-1022 70) M:Robe 500
630 # Set of tools built for all target platforms:
631 toolset
="rdf2binary convbdf codepages"
633 # Toolsets for some target families:
634 archosbitmaptools
="$toolset scramble descramble sh2d uclpack bmp2rb"
635 iriverbitmaptools
="$toolset scramble descramble mkboot bmp2rb"
636 iaudiobitmaptools
="$toolset scramble descramble mkboot bmp2rb"
637 ipodbitmaptools
="$toolset scramble ipod_fw bmp2rb"
638 gigabeatbitmaptools
="$toolset scramble descramble bmp2rb"
639 # generic is used by IFP, H10, Sansa-e200
640 genericbitmaptools
="$toolset bmp2rb"
643 # ---- For each target ----
646 # target_id: a unique number identifying this target, DOES NOT necessarily
647 # have to be the menu number. Just use the currently highest
648 # number+1 when you add a new target.
649 # archos: short model name used all over to identify this target
650 # memory: number of megabytes of RAM this target has. If the amount can
651 # be selected by the size prompt, let memory be unset here
652 # target: -Ddefine passed to the build commands to make the correct
653 # config-*.h file get included etc
654 # tool: the tool that takes a plain binary and converts that into a
655 # working "firmware" file for your target
656 # output: the final output file name
657 # boottool: the tool that takes a plain binary and generates a bootloader
658 # file for your target (or blank to use $tool)
659 # bootoutput:the final output file name for the bootloader (or blank to use
661 # appextra: passed to the APPEXTRA variable in the Makefiles.
662 # TODO: add proper explanation
663 # archosrom: used only for Archos targets that build a special flashable .ucl
664 # image. Set to blank for other builds.
665 # flash: the same as archosrom. These two should be merged
666 # plugins: set to 'yes' to build the plugins. Early development builds can
667 # set this to no in the early stages to have an easier life for a
669 # swcodec: set 'yes' on swcodec targets
670 # toolset: lists what particular tools in the tools/ directory that this
671 # target needs to have built prior to building Rockbox
674 # *cc: sets up gcc and compiler options for your target builds. Note
675 # that if you select a simulator build, the compiler selection is
676 # overridden later in the script.
683 target
="-DARCHOS_PLAYER"
685 tool
="$rootdir/tools/scramble"
687 appextra
="player:gui"
688 archosrom
="$pwd/rombox.ucl"
689 flash
="$pwd/rockbox.ucl"
693 # toolset is the tools within the tools directory that we build for
694 # this particular target.
695 toolset
="$toolset scramble descramble sh2d player_unifont uclpack"
697 # Note: the convbdf is present in the toolset just because: 1) the
698 # firmware/Makefile assumes it is present always, and 2) we will need it when we
699 # build the player simulator
702 t_manufacturer
="archos"
709 target
="-DARCHOS_RECORDER"
711 tool
="$rootdir/tools/scramble"
712 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
713 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
715 appextra
="recorder:gui"
716 archosrom
="" #"$pwd/rombox.ucl"
717 flash
="$pwd/rockbox.ucl"
720 # toolset is the tools within the tools directory that we build for
721 # this particular target.
722 toolset
=$archosbitmaptools
724 t_manufacturer
="archos"
731 target
="-DARCHOS_FMRECORDER"
733 tool
="$rootdir/tools/scramble -fm"
734 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
735 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
737 appextra
="recorder:gui"
738 archosrom
="" #"$pwd/rombox.ucl"
739 flash
="$pwd/rockbox.ucl"
742 # toolset is the tools within the tools directory that we build for
743 # this particular target.
744 toolset
=$archosbitmaptools
746 t_manufacturer
="archos"
753 target
="-DARCHOS_RECORDERV2"
755 tool
="$rootdir/tools/scramble -v2"
756 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
757 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
759 appextra
="recorder:gui"
760 archosrom
="" #"$pwd/rombox.ucl"
761 flash
="$pwd/rockbox.ucl"
764 # toolset is the tools within the tools directory that we build for
765 # this particular target.
766 toolset
=$archosbitmaptools
768 t_manufacturer
="archos"
775 target
="-DARCHOS_ONDIOSP"
777 tool
="$rootdir/tools/scramble -osp"
778 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
779 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
781 appextra
="recorder:gui"
782 archosrom
="$pwd/rombox.ucl"
783 flash
="$pwd/rockbox.ucl"
786 # toolset is the tools within the tools directory that we build for
787 # this particular target.
788 toolset
=$archosbitmaptools
790 t_manufacturer
="archos"
797 target
="-DARCHOS_ONDIOFM"
799 tool
="$rootdir/tools/scramble -ofm"
800 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
801 bmp2rb_native
="$rootdir/tools/bmp2rb -f 0"
803 appextra
="recorder:gui"
804 archosrom
="" #"$pwd/rombox.ucl"
805 flash
="$pwd/rockbox.ucl"
808 toolset
=$archosbitmaptools
810 t_manufacturer
="archos"
817 target
="-DARCHOS_AV300"
820 tool
="$rootdir/tools/scramble -mm=C"
821 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
822 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
824 appextra
="recorder:gui"
829 # toolset is the tools within the tools directory that we build for
830 # this particular target.
831 toolset
="$toolset scramble descramble bmp2rb"
832 # architecture, manufacturer and model for the target-tree build
834 t_manufacturer
="archos"
841 target
="-DIRIVER_H120"
844 tool
="$rootdir/tools/scramble -add=h120"
845 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
846 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
847 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
848 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
849 output
="rockbox.iriver"
850 appextra
="recorder:gui"
852 flash
="$pwd/rombox.iriver"
855 # toolset is the tools within the tools directory that we build for
856 # this particular target.
857 toolset
=$iriverbitmaptools
859 t_manufacturer
="iriver"
866 target
="-DIRIVER_H300"
869 tool
="$rootdir/tools/scramble -add=h300"
870 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
871 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
872 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
873 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
874 output
="rockbox.iriver"
875 appextra
="recorder:gui"
880 # toolset is the tools within the tools directory that we build for
881 # this particular target.
882 toolset
=$iriverbitmaptools
884 t_manufacturer
="iriver"
891 target
="-DIRIVER_H100"
894 tool
="$rootdir/tools/scramble -add=h100"
895 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
896 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
897 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
898 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
899 output
="rockbox.iriver"
900 appextra
="recorder:gui"
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"
928 # toolset is the tools within the tools directory that we build for
929 # this particular target.
930 toolset
=$genericbitmaptools
932 t_manufacturer
="pnx0101"
933 t_model
="iriver-ifp7xx"
939 target
="-DIRIVER_H10"
942 tool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS"
943 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
944 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
946 appextra
="recorder:gui"
951 boottool
="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBBL"
952 bootoutput
="H10_20GC.mi4"
953 # toolset is the tools within the tools directory that we build for
954 # this particular target.
955 toolset
="$genericbitmaptools scramble"
956 # architecture, manufacturer and model for the target-tree build
958 t_manufacturer
="iriver"
965 target
="-DIRIVER_H10_5GB"
968 tool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS"
969 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
970 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
972 appextra
="recorder:gui"
977 boottool
="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBBL"
979 # toolset is the tools within the tools directory that we build for
980 # this particular target.
981 toolset
="$genericbitmaptools scramble"
982 # architecture, manufacturer and model for the target-tree build
984 t_manufacturer
="iriver"
991 target
="-DIPOD_COLOR"
994 tool
="$rootdir/tools/scramble -add=ipco"
995 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
996 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
997 output
="rockbox.ipod"
998 appextra
="recorder:gui"
1003 bootoutput
="bootloader-$archos.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"
1016 target
="-DIPOD_NANO"
1019 tool
="$rootdir/tools/scramble -add=nano"
1020 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1021 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1022 output
="rockbox.ipod"
1023 appextra
="recorder:gui"
1028 bootoutput
="bootloader-$archos.ipod"
1029 # toolset is the tools within the tools directory that we build for
1030 # this particular target.
1031 toolset
=$ipodbitmaptools
1032 # architecture, manufacturer and model for the target-tree build
1034 t_manufacturer
="ipod"
1041 target
="-DIPOD_VIDEO"
1043 tool
="$rootdir/tools/scramble -add=ipvd"
1044 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1045 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1046 output
="rockbox.ipod"
1047 appextra
="recorder:gui"
1052 bootoutput
="bootloader-$archos.ipod"
1053 # toolset is the tools within the tools directory that we build for
1054 # this particular target.
1055 toolset
=$ipodbitmaptools
1056 # architecture, manufacturer and model for the target-tree build
1058 t_manufacturer
="ipod"
1068 tool
="$rootdir/tools/scramble -add=ip3g"
1069 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1070 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1071 output
="rockbox.ipod"
1072 appextra
="recorder:gui"
1077 bootoutput
="bootloader-$archos.ipod"
1078 # toolset is the tools within the tools directory that we build for
1079 # this particular target.
1080 toolset
=$ipodbitmaptools
1081 # architecture, manufacturer and model for the target-tree build
1083 t_manufacturer
="ipod"
1093 tool
="$rootdir/tools/scramble -add=ip4g"
1094 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1095 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1096 output
="rockbox.ipod"
1097 appextra
="recorder:gui"
1102 bootoutput
="bootloader-$archos.ipod"
1103 # toolset is the tools within the tools directory that we build for
1104 # this particular target.
1105 toolset
=$ipodbitmaptools
1106 # architecture, manufacturer and model for the target-tree build
1108 t_manufacturer
="ipod"
1115 target
="-DIPOD_MINI"
1118 tool
="$rootdir/tools/scramble -add=mini"
1119 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1120 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1121 output
="rockbox.ipod"
1122 appextra
="recorder:gui"
1127 bootoutput
="bootloader-$archos.ipod"
1128 # toolset is the tools within the tools directory that we build for
1129 # this particular target.
1130 toolset
=$ipodbitmaptools
1131 # architecture, manufacturer and model for the target-tree build
1133 t_manufacturer
="ipod"
1140 target
="-DIPOD_MINI2G"
1143 tool
="$rootdir/tools/scramble -add=mn2g"
1144 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1145 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1146 output
="rockbox.ipod"
1147 appextra
="recorder:gui"
1152 bootoutput
="bootloader-$archos.ipod"
1153 # toolset is the tools within the tools directory that we build for
1154 # this particular target.
1155 toolset
=$ipodbitmaptools
1156 # architecture, manufacturer and model for the target-tree build
1158 t_manufacturer
="ipod"
1165 target
="-DIPOD_1G2G"
1168 tool
="$rootdir/tools/scramble -add=1g2g"
1169 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1170 bmp2rb_native
="$rootdir/tools/bmp2rb -f 6"
1171 output
="rockbox.ipod"
1172 appextra
="recorder:gui"
1177 bootoutput
="bootloader-$archos.ipod"
1178 # toolset is the tools within the tools directory that we build for
1179 # this particular target.
1180 toolset
=$ipodbitmaptools
1181 # architecture, manufacturer and model for the target-tree build
1183 t_manufacturer
="ipod"
1190 target
="-DIAUDIO_X5"
1193 tool
="$rootdir/tools/scramble -add=iax5"
1194 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1195 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1196 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1197 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1198 output
="rockbox.iaudio"
1199 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"
1216 target
="-DIAUDIO_M5"
1219 tool
="$rootdir/tools/scramble -add=iam5"
1220 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1221 bmp2rb_native
="$rootdir/tools/bmp2rb -f 2"
1222 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1223 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 7"
1224 output
="rockbox.iaudio"
1225 appextra
="recorder:gui"
1230 # toolset is the tools within the tools directory that we build for
1231 # this particular target.
1232 toolset
="$iaudiobitmaptools"
1233 # architecture, manufacturer and model for the target-tree build
1235 t_manufacturer
="iaudio"
1242 target
="-DGIGABEAT_F"
1245 tool
="$rootdir/tools/scramble -add=giga"
1246 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1247 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1248 output
="rockbox.gigabeat"
1249 appextra
="recorder:gui"
1254 toolset
=$gigabeatbitmaptools
1255 boottool
="$rootdir/tools/scramble -gigabeat"
1256 bootoutput
="FWIMG01.DAT"
1257 # architecture, manufacturer and model for the target-tree build
1259 t_manufacturer
="s3c2440"
1260 t_model
="gigabeat-fx"
1266 target
="-DGIGABEAT_S"
1269 tool
="$rootdir/tools/scramble -add=gigs"
1270 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1271 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1272 output
="rockbox.gigabeat"
1273 appextra
="recorder:gui"
1278 toolset
=$gigabeatbitmaptools
1279 boottool
="$rootdir/tools/scramble -gigabeats"
1281 # architecture, manufacturer and model for the target-tree build
1283 t_manufacturer
="imx31"
1284 t_model
="gigabeat-s"
1290 target
="-DMROBE_500"
1293 tool
="$rootdir/tools/scramble -add=m500"
1294 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1295 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1296 output
="rockbox.mrobe500"
1297 appextra
="recorder:gui"
1302 toolset
=$gigabeatbitmaptools
1304 bootoutput
="rockbox.mrboot"
1305 # architecture, manufacturer and model for the target-tree build
1307 t_manufacturer
="tms320dm320"
1314 target
="-DSANSA_E200"
1315 memory
=32 # supposedly
1317 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1318 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1319 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1320 output
="rockbox.mi4"
1321 appextra
="recorder:gui"
1326 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1327 bootoutput
="PP5022.mi4"
1328 # toolset is the tools within the tools directory that we build for
1329 # this particular target.
1330 toolset
="$genericbitmaptools scramble"
1331 # architecture, manufacturer and model for the target-tree build
1333 t_manufacturer
="sandisk"
1334 t_model
="sansa-e200"
1338 # the e200R model is pretty much identical to the e200, it only has a
1339 # different option to the scramble tool when building a bootloader and
1340 # makes the bootloader output file name in all lower case.
1343 target
="-DSANSA_E200"
1344 memory
=32 # supposedly
1346 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1347 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1348 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1349 output
="rockbox.mi4"
1350 appextra
="recorder:gui"
1355 boottool
="$rootdir/tools/scramble -mi4r -model=e20r -type=RBBL"
1356 bootoutput
="pp5022.mi4"
1357 # toolset is the tools within the tools directory that we build for
1358 # this particular target.
1359 toolset
="$genericbitmaptools scramble"
1360 # architecture, manufacturer and model for the target-tree build
1362 t_manufacturer
="sandisk"
1363 t_model
="sansa-e200"
1369 target
="-DSANSA_C200"
1370 memory
=32 # supposedly
1372 tool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS"
1373 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1374 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1375 output
="rockbox.mi4"
1376 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"
1407 boottool
="$rootdir/tools/scramble -mi4v2"
1408 bootoutput
="pp5020.mi4"
1409 # toolset is the tools within the tools directory that we build for
1410 # this particular target.
1411 toolset
="$genericbitmaptools scramble"
1412 # architecture, manufacturer and model for the target-tree build
1414 t_manufacturer
="tatung"
1419 echo "Please select a supported target platform!"
1425 echo "Platform set to $archos"
1429 ############################################################################
1430 # Amount of memory, for those that can differ. They have $memory unset at
1434 if [ -z "$memory" ]; then
1438 echo "Enter size of your RAM (in MB): (Defaults to 32)"
1451 echo "Enter size of your RAM (in MB): (defaults to 2)"
1464 echo "Memory size selected: $memory MB"
1468 ##################################################################
1469 # Figure out build "type"
1472 # the ifp7x0 is the only platform that supports building a gdb stub like
1476 gdbstub
="(G)DB stub, "
1479 gdbstub
="(I)installer, "
1486 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, $gdbstub(M)anual (N)"
1492 appsdir
='\$(ROOTDIR)/bootloader'
1494 extradefines
="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
1496 echo "e200R-installer build selected"
1499 if test $t_manufacturer = "archos"; then
1500 # Archos SH-based players do this somewhat differently for
1502 appsdir
='\$(ROOTDIR)/flash/bootbox'
1505 appsdir
='\$(ROOTDIR)/bootloader'
1508 if test -n "$boottool"; then
1511 if test -n "$bootoutput"; then
1515 extradefines
="-DBOOTLOADER -ffunction-sections -fdata-sections"
1517 echo "Bootloader build selected"
1522 extradefines
="-DSIMULATOR"
1523 echo "Simulator build selected"
1526 echo "Advanced build selected"
1530 extradefines
="-DSTUB" # for target makefile symbol EXTRA_DEFINES
1531 appsdir
='\$(ROOTDIR)/gdb'
1540 echo "GDB stub build selected"
1543 appsdir
='\$(ROOTDIR)/manual'
1544 firmdir
='\$(ROOTDIR)/manual/platform' # No Makefile here. Effectively ig:res target
1548 echo "Manual build selected"
1552 echo "Normal build selected"
1556 # to be able running "make manual" from non-manual configuration
1559 manualdev
="recorderv2fm"
1562 manualdev
="recorderv2fm"
1568 manualdev
="ipodmini"
1575 if [ -z "$debug" ]; then
1576 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
1579 echo "Using source code root directory: $rootdir"
1581 # this was once possible to change at build-time, but no more:
1586 if [ "yes" = "$simulator" ]; then
1587 # setup compiler and things for simulator
1590 if [ -d "archos" ]; then
1591 echo "sub directory archos already present"
1594 echo "created an archos subdirectory for simulating the hard disk"
1598 # Now, figure out version number of the (gcc) compiler we are about to use
1599 gccver
=`$CC -dumpversion`;
1601 # figure out the binutil version too and display it, mostly for the build
1602 # system etc to be able to see it easier
1603 ldver
=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
1605 if [ -z "$gccver" ]; then
1606 echo "WARNING: The compiler you must use ($CC) is not in your path!"
1607 echo "WARNING: this may cause your build to fail since we cannot do the"
1608 echo "WARNING: checks we want now."
1611 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
1614 num1
=`echo $gccver | cut -d . -f1`
1615 num2
=`echo $gccver | cut -d . -f2`
1616 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
1623 echo "Using $CC $gccver ($gccnum)"
1625 if test "$gccnum" -ge "400"; then
1626 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
1627 # so we ignore that warnings for now
1629 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
1632 if test "$gccnum" -ge "401"; then
1633 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
1634 # will break strict-aliasing rules"
1636 GCCOPTS
="$GCCOPTS -fno-strict-aliasing"
1639 if test "$gccnum" -ge "402"; then
1640 # disable warning about "warning: initialized field overwritten" as gcc 4.2
1641 # and later would throw it for several valid cases
1642 GCCOPTS
="$GCCOPTS -Wno-override-init"
1647 echo "Using $LD $ldver"
1649 # check the compiler for SH platforms
1650 if test "$CC" = "sh-elf-gcc"; then
1651 if test "$gccnum" -lt "400"; then
1652 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
1653 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
1655 # figure out patch status
1656 gccpatch
=`$CC --version`;
1658 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
1659 echo "gcc $gccver is rockbox patched"
1660 # then convert -O to -Os to get smaller binaries!
1661 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
1663 echo "WARNING: You use an unpatched gcc compiler: $gccver"
1664 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
1669 if test "$CC" = "m68k-elf-gcc"; then
1670 # convert -O to -Os to get smaller binaries!
1671 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
1674 if test "$1" = "--ccache"; then
1675 echo "Enable ccache for building"
1678 if test "$1" != "--no-ccache"; then
1679 ccache
=`findtool ccache`
1680 if test -n "$ccache"; then
1681 echo "Found and uses ccache ($ccache)"
1686 if test -n "$ccache"; then
1690 if test "X$endian" = "Xbig"; then
1691 defendian
="ROCKBOX_BIG_ENDIAN"
1693 defendian
="ROCKBOX_LITTLE_ENDIAN"
1697 -e "s,@ENDIAN@,${defendian},g" \
1698 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
1699 -e "s,@config_rtc@,$config_rtc,g" \
1700 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
1702 /* This header was made by configure */
1703 #ifndef __BUILD_AUTOCONF_H
1704 #define __BUILD_AUTOCONF_H
1706 /* Define endianess for the target or simulator platform */
1709 /* Define this if you build rockbox to support the logf logging and display */
1710 #undef ROCKBOX_HAS_LOGF
1712 /* optional defines for RTC mod for h1x0 */
1716 #endif /* __BUILD_AUTOCONF_H */
1719 if test -n "$t_cpu"; then
1720 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
1721 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
1722 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
1726 if test "$simulator" = "yes"; then
1727 # add simul make stuff on the #SIMUL# line
1728 simmagic1
="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
1729 simmagic2
="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
1731 # delete the lines that match
1732 simmagic1
='/@SIMUL1@/D'
1733 simmagic2
='/@SIMUL2@/D'
1737 -e "s,@ROOTDIR@,${rootdir},g" \
1738 -e "s,@DEBUG@,${debug},g" \
1739 -e "s,@MEMORY@,${memory},g" \
1740 -e "s,@TARGET_ID@,${target_id},g" \
1741 -e "s,@TARGET@,${target},g" \
1742 -e "s,@CPU@,${t_cpu},g" \
1743 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
1744 -e "s,@ARCHOS@,${archos},g" \
1745 -e "s,@LANGUAGE@,${language},g" \
1746 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
1747 -e "s,@PWD@,${pwd},g" \
1748 -e "s,@CC@,${CC},g" \
1749 -e "s,@LD@,${LD},g" \
1750 -e "s,@AR@,${AR},g" \
1751 -e "s,@AS@,${AS},g" \
1752 -e "s,@OC@,${OC},g" \
1753 -e "s,@WINDRES@,${WINDRES},g" \
1754 -e "s,@DLLTOOL@,${DLLTOOL},g" \
1755 -e "s,@DLLWRAP@,${DLLWRAP},g" \
1756 -e "s,@RANLIB@,${RANLIB},g" \
1757 -e "s,@TOOL@,${tool},g" \
1758 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
1759 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
1760 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
1761 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
1762 -e "s,@OUTPUT@,${output},g" \
1763 -e "s,@APPEXTRA@,${appextra},g" \
1764 -e "s,@ARCHOSROM@,${archosrom},g" \
1765 -e "s,@FLASHFILE@,${flash},g" \
1766 -e "s,@PLUGINS@,${plugins},g" \
1767 -e "s,@CODECS@,${swcodec},g" \
1768 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
1769 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
1770 -e "s,@GCCOPTS@,${GCCOPTS},g" \
1771 -e "s,@TARGET_INC@,${TARGET_INC},g" \
1772 -e "s!@LDOPTS@!${LDOPTS}!g" \
1773 -e "s,@LOADADDRESS@,${loadaddress},g" \
1774 -e "s,@EXTRADEF@,${extradefines},g" \
1775 -e "s,@APPSDIR@,${appsdir},g" \
1776 -e "s,@FIRMDIR@,${firmdir},g" \
1777 -e "s,@TOOLSDIR@,${toolsdir},g" \
1778 -e "s,@APPS@,${apps},g" \
1779 -e "s,@SIMVER@,${simver},g" \
1780 -e "s,@GCCVER@,${gccver},g" \
1781 -e "s,@GCCNUM@,${gccnum},g" \
1782 -e "s,@UNAME@,${uname},g" \
1783 -e "s,@ENDIAN@,${defendian},g" \
1784 -e "s,@TOOLSET@,${toolset},g" \
1787 -e "s,@MANUALDEV@,${manualdev},g" \
1788 -e "s,@ENCODER@,${ENCODER},g" \
1789 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
1790 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
1791 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
1793 ## Automaticly generated. http://www.rockbox.org/
1801 # old 'make' versions don't have the built-in 'info' function
1802 info=old\$(shell echo >&2 "Consider upgrading to GNU make 3.81+ for optimum build performance.")
1803 ifeq (\$(call info),old)
1804 export info=echo "\$\$(1)";
1807 export ROOTDIR=@ROOTDIR@
1808 export FIRMDIR=@FIRMDIR@
1809 export APPSDIR=@APPSDIR@
1810 export TOOLSDIR=@TOOLSDIR@
1811 export DOCSDIR=\$(ROOTDIR)/docs
1812 export MANUALDIR=\${ROOTDIR}/manual
1813 export DEBUG=@DEBUG@
1814 export ARCHOS=@ARCHOS@
1815 export ARCHOSROM=@ARCHOSROM@
1816 export FLASHFILE=@FLASHFILE@
1817 export TARGET_ID=@TARGET_ID@
1818 export TARGET=@TARGET@
1820 export MANUFACTURER=@MANUFACTURER@
1822 export BUILDDIR=@PWD@
1823 export LANGUAGE=@LANGUAGE@
1824 export VOICELANGUAGE=@VOICELANGUAGE@
1825 export MEMORYSIZE=@MEMORY@
1826 export VERSION=\$(shell \$(ROOTDIR)/tools/svnversion.sh \$(ROOTDIR))
1827 export BUILDDATE=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
1828 export MKFIRMWARE=@TOOL@
1829 export BMP2RB_MONO=@BMP2RB_MONO@
1830 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
1831 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
1832 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
1833 export BINARY=@OUTPUT@
1834 export APPEXTRA=@APPEXTRA@
1835 export ENABLEDPLUGINS=@PLUGINS@
1836 export SOFTWARECODECS=@CODECS@
1837 export EXTRA_DEFINES=@EXTRADEF@
1844 export WINDRES=@WINDRES@
1845 export DLLTOOL=@DLLTOOL@
1846 export DLLWRAP=@DLLWRAP@
1847 export RANLIB=@RANLIB@
1848 export PROFILE_OPTS=@PROFILE_OPTS@
1849 export SIMVER=@SIMVER@
1850 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
1851 export GCCOPTS=@GCCOPTS@
1852 export TARGET_INC=@TARGET_INC@
1853 export LOADADDRESS=@LOADADDRESS@
1854 export SHARED_FLAG=@SHARED_FLAG@
1855 export LDOPTS=@LDOPTS@
1856 export GCCVER=@GCCVER@
1857 export GCCNUM=@GCCNUM@
1858 export UNAME=@UNAME@
1859 export MANUALDEV=@MANUALDEV@
1860 export TTS_OPTS=@TTS_OPTS@
1861 export TTS_ENGINE=@TTS_ENGINE@
1862 export ENC_OPTS=@ENC_OPTS@
1863 export ENCODER=@ENCODER@
1865 # Do not print "Entering directory ..."
1866 MAKEFLAGS += --no-print-directory
1868 .PHONY: all clean tags zip tools manual bin build info
1873 \$(SILENT)\$(TOOLSDIR)/mkinfo.pl \$(BUILDDIR)/rockbox-info.txt
1878 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
1879 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@
1884 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
1885 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ \$(BUILDDIR)/\$(BINARY)
1888 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ rocks
1890 veryclean: clean toolsclean
1893 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) clean
1896 \$(SILENT)echo Cleaning build directory
1897 \$(SILENT)rm -rf rockbox.zip TAGS @APPS@ firmware comsim sim lang.[ch]\
1898 manual *.pdf *.a credits.raw @OUTPUT@ bitmaps pluginbitmaps \
1899 @ARCHOSROM@ @FLASHFILE@ UI256.bmp rockbox-full.zip \
1900 html txt rockbox-manual*.zip sysfont.h rockbox-info.txt \
1901 voicefontids *.wav *.mp3 *.voice
1904 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) @TOOLSET@
1907 \$(SILENT)rm -f TAGS
1908 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) tags
1909 \$(SILENT)\$(MAKE) -C \$(APPSDIR) tags
1910 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins tags
1911 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins/lib tags
1914 \$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\" -r "\$(ROOTDIR)" -f 1 -o rockbox-fonts.zip \$(TARGET) \$(BINARY)
1917 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
1918 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
1921 \$(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip
1924 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
1925 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" -f 2 -o rockbox-full.zip \$(TARGET) \$(BINARY)
1928 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
1929 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.7z" -z "7za a" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
1932 \$(SILENT)rm -f rockbox.tar
1933 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
1934 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.tar" -z "tar --no-recursion -uf" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
1937 \$(SILENT)bzip2 -f9 rockbox.tar
1940 \$(SILENT)gzip -f9 rockbox.tar
1944 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-pdf
1946 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-html
1947 manual-zhtml: manual-zip
1949 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt
1951 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt-zip
1953 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-zip
1956 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ features
1959 @echo "A few helpful make targets"
1961 @echo "all - builds a full Rockbox (default), including tools"
1962 @echo "bin - builds only the Rockbox.<target name> file"
1963 @echo "clean - cleans a build directory (not tools)"
1964 @echo "veryclean - cleans the build and tools directories"
1965 @echo "manual - builds a manual"
1966 @echo "manual-html - HTML manual"
1967 @echo "manual-zip - HTML manual (zipped)"
1968 @echo "manual-txt - txt manual"
1969 @echo "fullzip - creates a rockbox.zip of your build with fonts"
1970 @echo "zip - creates a rockbox.zip of your build (no fonts)"
1971 @echo "gzip - creates a rockbox.tar.gz of your build (no fonts)"
1972 @echo "bzip2 - creates a rockbox.tar.bz2 of your build (no fonts)"
1973 @echo "7zip - creates a rockbox.7z of your build (no fonts)"
1974 @echo "fontzip - creates rockbox-fonts.zip"
1975 @echo "mapzip - creates rockbox-maps.zip with all .map files"
1976 @echo "tools - builds the tools only"
1977 @echo "install - installs your build (for simulator builds only)"
1981 if [ "yes" = "$simulator" ]; then
1983 cat >> Makefile
<<EOF
1986 @echo "installing a full setup in your archos dir"
1987 @(\$(MAKE) fullzip && cd archos && unzip -oq ../rockbox-full.zip)
1992 if [ "yes" = "$voice" ]; then
1994 cat >> Makefile
<<EOF
1996 voice: tools features
1997 \$(SILENT)for f in \`cat \$(BUILDDIR)/${apps}/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
1998 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 \\
2003 echo "Created Makefile"