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 bmp2rb_remotemono
="$rootdir/tools/bmp2rb -f 0"
1297 bmp2rb_remotenative
="$rootdir/tools/bmp2rb -f 0"
1298 output
="rockbox.mrobe500"
1299 appextra
="recorder:gui"
1304 toolset
=$gigabeatbitmaptools
1306 bootoutput
="rockbox.mrboot"
1307 # architecture, manufacturer and model for the target-tree build
1309 t_manufacturer
="tms320dm320"
1316 target
="-DSANSA_E200"
1317 memory
=32 # supposedly
1319 tool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS"
1320 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1321 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1322 output
="rockbox.mi4"
1323 appextra
="recorder:gui"
1328 boottool
="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBBL"
1329 bootoutput
="PP5022.mi4"
1330 # toolset is the tools within the tools directory that we build for
1331 # this particular target.
1332 toolset
="$genericbitmaptools scramble"
1333 # architecture, manufacturer and model for the target-tree build
1335 t_manufacturer
="sandisk"
1336 t_model
="sansa-e200"
1340 # the e200R model is pretty much identical to the e200, it only has a
1341 # different option to the scramble tool when building a bootloader and
1342 # makes the bootloader output file name in all lower case.
1345 target
="-DSANSA_E200"
1346 memory
=32 # supposedly
1348 tool
="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS"
1349 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1350 bmp2rb_native
="$rootdir/tools/bmp2rb -f 4"
1351 output
="rockbox.mi4"
1352 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"
1383 boottool
="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBBL"
1384 bootoutput
="firmware.mi4"
1385 # toolset is the tools within the tools directory that we build for
1386 # this particular target.
1387 toolset
="$genericbitmaptools scramble"
1388 # architecture, manufacturer and model for the target-tree build
1390 t_manufacturer
="sandisk"
1391 t_model
="sansa-c200"
1397 target
="-DELIO_TPJ1022"
1400 tool
="$rootdir/tools/scramble -add tpj2"
1401 bmp2rb_mono
="$rootdir/tools/bmp2rb -f 0"
1402 bmp2rb_native
="$rootdir/tools/bmp2rb -f 5"
1403 output
="rockbox.elio"
1404 appextra
="recorder:gui"
1409 boottool
="$rootdir/tools/scramble -mi4v2"
1410 bootoutput
="pp5020.mi4"
1411 # toolset is the tools within the tools directory that we build for
1412 # this particular target.
1413 toolset
="$genericbitmaptools scramble"
1414 # architecture, manufacturer and model for the target-tree build
1416 t_manufacturer
="tatung"
1421 echo "Please select a supported target platform!"
1427 echo "Platform set to $archos"
1431 ############################################################################
1432 # Amount of memory, for those that can differ. They have $memory unset at
1436 if [ -z "$memory" ]; then
1440 echo "Enter size of your RAM (in MB): (Defaults to 32)"
1453 echo "Enter size of your RAM (in MB): (defaults to 2)"
1466 echo "Memory size selected: $memory MB"
1470 ##################################################################
1471 # Figure out build "type"
1474 # the ifp7x0 is the only platform that supports building a gdb stub like
1478 gdbstub
="(G)DB stub, "
1481 gdbstub
="(I)installer, "
1488 echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, $gdbstub(M)anual (N)"
1494 appsdir
='\$(ROOTDIR)/bootloader'
1496 extradefines
="-DBOOTLOADER -DE200R_INSTALLER -ffunction-sections -fdata-sections"
1498 echo "e200R-installer build selected"
1501 if test $t_manufacturer = "archos"; then
1502 # Archos SH-based players do this somewhat differently for
1504 appsdir
='\$(ROOTDIR)/flash/bootbox'
1507 appsdir
='\$(ROOTDIR)/bootloader'
1510 if test -n "$boottool"; then
1513 if test -n "$bootoutput"; then
1517 extradefines
="-DBOOTLOADER -ffunction-sections -fdata-sections"
1519 echo "Bootloader build selected"
1524 extradefines
="-DSIMULATOR"
1525 echo "Simulator build selected"
1528 echo "Advanced build selected"
1532 extradefines
="-DSTUB" # for target makefile symbol EXTRA_DEFINES
1533 appsdir
='\$(ROOTDIR)/gdb'
1542 echo "GDB stub build selected"
1545 appsdir
='\$(ROOTDIR)/manual'
1546 firmdir
='\$(ROOTDIR)/manual/platform' # No Makefile here. Effectively ig:res target
1550 echo "Manual build selected"
1554 echo "Normal build selected"
1558 # to be able running "make manual" from non-manual configuration
1561 manualdev
="recorderv2fm"
1564 manualdev
="recorderv2fm"
1570 manualdev
="ipodmini"
1577 if [ -z "$debug" ]; then
1578 GCCOPTS
="$GCCOPTS $GCCOPTIMIZE"
1581 echo "Using source code root directory: $rootdir"
1583 # this was once possible to change at build-time, but no more:
1588 if [ "yes" = "$simulator" ]; then
1589 # setup compiler and things for simulator
1592 if [ -d "archos" ]; then
1593 echo "sub directory archos already present"
1596 echo "created an archos subdirectory for simulating the hard disk"
1600 # Now, figure out version number of the (gcc) compiler we are about to use
1601 gccver
=`$CC -dumpversion`;
1603 # figure out the binutil version too and display it, mostly for the build
1604 # system etc to be able to see it easier
1605 ldver
=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'`
1607 if [ -z "$gccver" ]; then
1608 echo "WARNING: The compiler you must use ($CC) is not in your path!"
1609 echo "WARNING: this may cause your build to fail since we cannot do the"
1610 echo "WARNING: checks we want now."
1613 # gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
1616 num1
=`echo $gccver | cut -d . -f1`
1617 num2
=`echo $gccver | cut -d . -f2`
1618 gccnum
=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
1625 echo "Using $CC $gccver ($gccnum)"
1627 if test "$gccnum" -ge "400"; then
1628 # gcc 4.0 is just *so* much pickier on arguments that differ in signedness
1629 # so we ignore that warnings for now
1631 GCCOPTS
="$GCCOPTS -Wno-pointer-sign"
1634 if test "$gccnum" -ge "401"; then
1635 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
1636 # will break strict-aliasing rules"
1638 GCCOPTS
="$GCCOPTS -fno-strict-aliasing"
1641 if test "$gccnum" -ge "402"; then
1642 # disable warning about "warning: initialized field overwritten" as gcc 4.2
1643 # and later would throw it for several valid cases
1644 GCCOPTS
="$GCCOPTS -Wno-override-init"
1649 echo "Using $LD $ldver"
1651 # check the compiler for SH platforms
1652 if test "$CC" = "sh-elf-gcc"; then
1653 if test "$gccnum" -lt "400"; then
1654 echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
1655 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
1657 # figure out patch status
1658 gccpatch
=`$CC --version`;
1660 if { echo $gccpatch |
grep "rockbox" >/dev
/null
2>&1; } then
1661 echo "gcc $gccver is rockbox patched"
1662 # then convert -O to -Os to get smaller binaries!
1663 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
1665 echo "WARNING: You use an unpatched gcc compiler: $gccver"
1666 echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
1671 if test "$CC" = "m68k-elf-gcc"; then
1672 # convert -O to -Os to get smaller binaries!
1673 GCCOPTS
=`echo $GCCOPTS | sed 's/ -O / -Os /'`
1676 if test "$1" = "--ccache"; then
1677 echo "Enable ccache for building"
1680 if test "$1" != "--no-ccache"; then
1681 ccache
=`findtool ccache`
1682 if test -n "$ccache"; then
1683 echo "Found and uses ccache ($ccache)"
1688 if test -n "$ccache"; then
1692 if test "X$endian" = "Xbig"; then
1693 defendian
="ROCKBOX_BIG_ENDIAN"
1695 defendian
="ROCKBOX_LITTLE_ENDIAN"
1699 -e "s,@ENDIAN@,${defendian},g" \
1700 -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
1701 -e "s,@config_rtc@,$config_rtc,g" \
1702 -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \
1704 /* This header was made by configure */
1705 #ifndef __BUILD_AUTOCONF_H
1706 #define __BUILD_AUTOCONF_H
1708 /* Define endianess for the target or simulator platform */
1711 /* Define this if you build rockbox to support the logf logging and display */
1712 #undef ROCKBOX_HAS_LOGF
1714 /* optional defines for RTC mod for h1x0 */
1718 #endif /* __BUILD_AUTOCONF_H */
1721 if test -n "$t_cpu"; then
1722 TARGET_INC
="-I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer/$t_model"
1723 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
1724 TARGET_INC
="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
1728 if test "$simulator" = "yes"; then
1729 # add simul make stuff on the #SIMUL# line
1730 simmagic1
="s,@SIMUL1@,\$(SILENT)\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
1731 simmagic2
="s,@SIMUL2@,\$(SILENT)\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
1733 # delete the lines that match
1734 simmagic1
='/@SIMUL1@/D'
1735 simmagic2
='/@SIMUL2@/D'
1739 -e "s,@ROOTDIR@,${rootdir},g" \
1740 -e "s,@DEBUG@,${debug},g" \
1741 -e "s,@MEMORY@,${memory},g" \
1742 -e "s,@TARGET_ID@,${target_id},g" \
1743 -e "s,@TARGET@,${target},g" \
1744 -e "s,@CPU@,${t_cpu},g" \
1745 -e "s,@MANUFACTURER@,${t_manufacturer},g" \
1746 -e "s,@ARCHOS@,${archos},g" \
1747 -e "s,@LANGUAGE@,${language},g" \
1748 -e "s:@VOICELANGUAGE@:${voicelanguage}:g" \
1749 -e "s,@PWD@,${pwd},g" \
1750 -e "s,@CC@,${CC},g" \
1751 -e "s,@LD@,${LD},g" \
1752 -e "s,@AR@,${AR},g" \
1753 -e "s,@AS@,${AS},g" \
1754 -e "s,@OC@,${OC},g" \
1755 -e "s,@WINDRES@,${WINDRES},g" \
1756 -e "s,@DLLTOOL@,${DLLTOOL},g" \
1757 -e "s,@DLLWRAP@,${DLLWRAP},g" \
1758 -e "s,@RANLIB@,${RANLIB},g" \
1759 -e "s,@TOOL@,${tool},g" \
1760 -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
1761 -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
1762 -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
1763 -e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
1764 -e "s,@OUTPUT@,${output},g" \
1765 -e "s,@APPEXTRA@,${appextra},g" \
1766 -e "s,@ARCHOSROM@,${archosrom},g" \
1767 -e "s,@FLASHFILE@,${flash},g" \
1768 -e "s,@PLUGINS@,${plugins},g" \
1769 -e "s,@CODECS@,${swcodec},g" \
1770 -e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
1771 -e "s,@SHARED_FLAG@,${SHARED_FLAG},g" \
1772 -e "s,@GCCOPTS@,${GCCOPTS},g" \
1773 -e "s,@TARGET_INC@,${TARGET_INC},g" \
1774 -e "s!@LDOPTS@!${LDOPTS}!g" \
1775 -e "s,@LOADADDRESS@,${loadaddress},g" \
1776 -e "s,@EXTRADEF@,${extradefines},g" \
1777 -e "s,@APPSDIR@,${appsdir},g" \
1778 -e "s,@FIRMDIR@,${firmdir},g" \
1779 -e "s,@TOOLSDIR@,${toolsdir},g" \
1780 -e "s,@APPS@,${apps},g" \
1781 -e "s,@SIMVER@,${simver},g" \
1782 -e "s,@GCCVER@,${gccver},g" \
1783 -e "s,@GCCNUM@,${gccnum},g" \
1784 -e "s,@UNAME@,${uname},g" \
1785 -e "s,@ENDIAN@,${defendian},g" \
1786 -e "s,@TOOLSET@,${toolset},g" \
1789 -e "s,@MANUALDEV@,${manualdev},g" \
1790 -e "s,@ENCODER@,${ENCODER},g" \
1791 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
1792 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
1793 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
1795 ## Automaticly generated. http://www.rockbox.org/
1803 # old 'make' versions don't have the built-in 'info' function
1804 info=old\$(shell echo >&2 "Consider upgrading to GNU make 3.81+ for optimum build performance.")
1805 ifeq (\$(call info),old)
1806 export info=echo "\$\$(1)";
1809 export ROOTDIR=@ROOTDIR@
1810 export FIRMDIR=@FIRMDIR@
1811 export APPSDIR=@APPSDIR@
1812 export TOOLSDIR=@TOOLSDIR@
1813 export DOCSDIR=\$(ROOTDIR)/docs
1814 export MANUALDIR=\${ROOTDIR}/manual
1815 export DEBUG=@DEBUG@
1816 export ARCHOS=@ARCHOS@
1817 export ARCHOSROM=@ARCHOSROM@
1818 export FLASHFILE=@FLASHFILE@
1819 export TARGET_ID=@TARGET_ID@
1820 export TARGET=@TARGET@
1822 export MANUFACTURER=@MANUFACTURER@
1824 export BUILDDIR=@PWD@
1825 export LANGUAGE=@LANGUAGE@
1826 export VOICELANGUAGE=@VOICELANGUAGE@
1827 export MEMORYSIZE=@MEMORY@
1828 export VERSION=\$(shell \$(ROOTDIR)/tools/svnversion.sh \$(ROOTDIR))
1829 export BUILDDATE=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
1830 export MKFIRMWARE=@TOOL@
1831 export BMP2RB_MONO=@BMP2RB_MONO@
1832 export BMP2RB_NATIVE=@BMP2RB_NATIVE@
1833 export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
1834 export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
1835 export BINARY=@OUTPUT@
1836 export APPEXTRA=@APPEXTRA@
1837 export ENABLEDPLUGINS=@PLUGINS@
1838 export SOFTWARECODECS=@CODECS@
1839 export EXTRA_DEFINES=@EXTRADEF@
1846 export WINDRES=@WINDRES@
1847 export DLLTOOL=@DLLTOOL@
1848 export DLLWRAP=@DLLWRAP@
1849 export RANLIB=@RANLIB@
1850 export PROFILE_OPTS=@PROFILE_OPTS@
1851 export SIMVER=@SIMVER@
1852 export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
1853 export GCCOPTS=@GCCOPTS@
1854 export TARGET_INC=@TARGET_INC@
1855 export LOADADDRESS=@LOADADDRESS@
1856 export SHARED_FLAG=@SHARED_FLAG@
1857 export LDOPTS=@LDOPTS@
1858 export GCCVER=@GCCVER@
1859 export GCCNUM=@GCCNUM@
1860 export UNAME=@UNAME@
1861 export MANUALDEV=@MANUALDEV@
1862 export TTS_OPTS=@TTS_OPTS@
1863 export TTS_ENGINE=@TTS_ENGINE@
1864 export ENC_OPTS=@ENC_OPTS@
1865 export ENCODER=@ENCODER@
1867 # Do not print "Entering directory ..."
1868 MAKEFLAGS += --no-print-directory
1870 .PHONY: all clean tags zip tools manual bin build info
1875 \$(SILENT)\$(TOOLSDIR)/mkinfo.pl \$(BUILDDIR)/rockbox-info.txt
1880 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
1881 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@
1886 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
1887 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ \$(BUILDDIR)/\$(BINARY)
1890 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ rocks
1892 veryclean: clean toolsclean
1895 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) clean
1898 \$(SILENT)echo Cleaning build directory
1899 \$(SILENT)rm -rf rockbox.zip TAGS @APPS@ firmware comsim sim lang.[ch]\
1900 manual *.pdf *.a credits.raw @OUTPUT@ bitmaps pluginbitmaps \
1901 @ARCHOSROM@ @FLASHFILE@ UI256.bmp rockbox-full.zip \
1902 html txt rockbox-manual*.zip sysfont.h rockbox-info.txt \
1903 voicefontids *.wav *.mp3 *.voice
1906 \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) @TOOLSET@
1909 \$(SILENT)rm -f TAGS
1910 \$(SILENT)\$(MAKE) -C \$(FIRMDIR) tags
1911 \$(SILENT)\$(MAKE) -C \$(APPSDIR) tags
1912 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins tags
1913 \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins/lib tags
1916 \$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\" -r "\$(ROOTDIR)" -f 1 -o rockbox-fonts.zip \$(TARGET) \$(BINARY)
1919 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
1920 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
1923 \$(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip
1926 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
1927 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" -f 2 -o rockbox-full.zip \$(TARGET) \$(BINARY)
1930 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
1931 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.7z" -z "7za a" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
1934 \$(SILENT)rm -f rockbox.tar
1935 \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
1936 \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.tar" -z "tar --no-recursion -uf" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
1939 \$(SILENT)bzip2 -f9 rockbox.tar
1942 \$(SILENT)gzip -f9 rockbox.tar
1946 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-pdf
1948 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-html
1949 manual-zhtml: manual-zip
1951 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt
1953 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt-zip
1955 \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-zip
1958 \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ features
1961 @echo "A few helpful make targets"
1963 @echo "all - builds a full Rockbox (default), including tools"
1964 @echo "bin - builds only the Rockbox.<target name> file"
1965 @echo "clean - cleans a build directory (not tools)"
1966 @echo "veryclean - cleans the build and tools directories"
1967 @echo "manual - builds a manual"
1968 @echo "manual-html - HTML manual"
1969 @echo "manual-zip - HTML manual (zipped)"
1970 @echo "manual-txt - txt manual"
1971 @echo "fullzip - creates a rockbox.zip of your build with fonts"
1972 @echo "zip - creates a rockbox.zip of your build (no fonts)"
1973 @echo "gzip - creates a rockbox.tar.gz of your build (no fonts)"
1974 @echo "bzip2 - creates a rockbox.tar.bz2 of your build (no fonts)"
1975 @echo "7zip - creates a rockbox.7z of your build (no fonts)"
1976 @echo "fontzip - creates rockbox-fonts.zip"
1977 @echo "mapzip - creates rockbox-maps.zip with all .map files"
1978 @echo "tools - builds the tools only"
1979 @echo "install - installs your build (for simulator builds only)"
1983 if [ "yes" = "$simulator" ]; then
1985 cat >> Makefile
<<EOF
1988 @echo "installing a full setup in your archos dir"
1989 @(\$(MAKE) fullzip && cd archos && unzip -oq ../rockbox-full.zip)
1994 if [ "yes" = "$voice" ]; then
1996 cat >> Makefile
<<EOF
1998 voice: tools features
1999 \$(SILENT)for f in \`cat \$(BUILDDIR)/${apps}/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
2000 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 \\
2005 echo "Created Makefile"