2002-05-23 09:11:35 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# __________ __ ___.
|
|
|
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
# \/ \/ \/ \/ \/
|
|
|
|
# $Id$
|
|
|
|
#
|
|
|
|
|
2004-10-04 13:02:41 +00:00
|
|
|
# global CC options for all platforms
|
|
|
|
CCOPTS="-W -Wall -O -nostdlib -ffreestanding -Wstrict-prototypes"
|
2002-09-02 11:50:52 +00:00
|
|
|
|
2005-05-30 13:00:43 +00:00
|
|
|
use_logf="#undef ROCKBOX_HAS_LOGF"
|
2005-07-14 21:46:07 +00:00
|
|
|
use_simsound="#undef ROCKBOX_HAS_SIMSOUND"
|
2005-05-30 13:00:43 +00:00
|
|
|
|
2005-07-08 10:19:02 +00:00
|
|
|
scriptver=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'`
|
|
|
|
|
2002-10-17 09:08:05 +00:00
|
|
|
#
|
|
|
|
# Begin Function Definitions
|
|
|
|
#
|
2002-05-23 09:11:35 +00:00
|
|
|
input() {
|
|
|
|
read response
|
|
|
|
echo $response
|
|
|
|
}
|
|
|
|
|
2005-02-18 13:47:17 +00:00
|
|
|
prefixtools () {
|
|
|
|
prefix="$1"
|
|
|
|
CC=${prefix}gcc
|
|
|
|
WINDRES=${prefix}windres
|
|
|
|
DLLTOOL=${prefix}dlltool
|
|
|
|
DLLWRAP=${prefix}dllwrap
|
|
|
|
RANLIB=${prefix}ranlib
|
|
|
|
LD=${prefix}ld
|
|
|
|
AR=${prefix}ar
|
|
|
|
AS=${prefix}as
|
|
|
|
OC=${prefix}objcopy
|
|
|
|
}
|
|
|
|
|
|
|
|
crosswincc () {
|
|
|
|
# naive approach to selecting a mingw cross-compiler on linux/*nix
|
|
|
|
echo "Enabling win32 crosscompiling"
|
|
|
|
|
2005-03-09 22:07:29 +00:00
|
|
|
prefixtools i586-mingw32msvc-
|
2005-02-18 13:47:17 +00:00
|
|
|
|
|
|
|
LDOPTS="-lgdi32 -luser32 -mwindows"
|
|
|
|
# add cross-compiler option(s)
|
|
|
|
GCCOPTS="$GCCOPTS -mno-cygwin"
|
2005-03-10 22:02:53 +00:00
|
|
|
|
|
|
|
output="rockboxui.exe" # use this as output binary name
|
2005-04-26 22:41:48 +00:00
|
|
|
crosscompile="yes"
|
|
|
|
endian="little" # windows is little endian
|
2005-02-18 13:47:17 +00:00
|
|
|
}
|
|
|
|
|
2005-07-15 21:12:18 +00:00
|
|
|
checksoundcard () {
|
|
|
|
if test -n "$codecs"; then
|
|
|
|
if test -f "/usr/include/sys/soundcard.h"; then
|
|
|
|
# We have a header file so we can build the sound code
|
|
|
|
use_simsound="#define ROCKBOX_HAS_SIMSOUND 1"
|
2005-07-15 21:33:11 +00:00
|
|
|
echo "Enabled PCM sound playback in simulator"
|
2005-07-15 21:12:18 +00:00
|
|
|
fi # header file present
|
|
|
|
fi # has codecs
|
|
|
|
}
|
|
|
|
|
2006-01-09 12:41:07 +00:00
|
|
|
# scan the $PATH for the given command
|
|
|
|
findtool(){
|
|
|
|
file="$1"
|
|
|
|
|
|
|
|
IFS=":"
|
|
|
|
for path in $PATH
|
|
|
|
do
|
|
|
|
# echo "checks for $file in $path" >&2
|
|
|
|
if test -f "$path/$file"; then
|
|
|
|
echo "$path/$file"
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2005-07-15 21:12:18 +00:00
|
|
|
|
2005-02-18 13:47:17 +00:00
|
|
|
simcc () {
|
|
|
|
|
|
|
|
# default tool setup for native building
|
|
|
|
prefixtools ""
|
|
|
|
|
2005-02-22 12:19:12 +00:00
|
|
|
GCCOPTS='-W -Wall -g -fno-builtin'
|
2005-02-18 13:47:17 +00:00
|
|
|
|
|
|
|
output="rockboxui" # use this as default output binary name
|
|
|
|
|
2006-01-09 12:41:07 +00:00
|
|
|
if [ "$simver" = "sdl" ]; then
|
|
|
|
# generic sdl-config checker
|
|
|
|
sdl=`findtool sdl-config`
|
|
|
|
|
|
|
|
if [ -z "$sdl" ]; then
|
|
|
|
echo "configure didn't find sdl-config, which indicates that you"
|
|
|
|
echo "don't have SDL (properly) installed. Please correct and"
|
|
|
|
echo "re-run configure!"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2005-02-18 13:47:17 +00:00
|
|
|
case $uname in
|
|
|
|
CYGWIN*)
|
|
|
|
echo "Cygwin host detected"
|
2005-02-22 12:19:12 +00:00
|
|
|
|
|
|
|
if [ "$simver" = "win32" ]; then
|
|
|
|
# win32 version
|
|
|
|
GCCOPTS="$GCCOPTS -mno-cygwin -DNOCYGWIN"
|
|
|
|
LDOPTS="-lgdi32 -luser32 -mno-cygwin"
|
2006-01-09 11:22:36 +00:00
|
|
|
elif [ "$simver" = "sdl" ]; then
|
|
|
|
# sdl version
|
|
|
|
GCCOPTS="$GCCOPTS `sdl-config --cflags`"
|
|
|
|
LDOPTS="`sdl-config --libs`"
|
|
|
|
checksoundcard
|
2005-02-22 12:19:12 +00:00
|
|
|
else
|
|
|
|
# x11 version
|
2005-02-27 07:58:01 +00:00
|
|
|
GCCOPTS="$GCCOPTS"
|
2005-02-22 12:19:12 +00:00
|
|
|
LDOPTS='-L/usr/X11R6/lib -lSM -lICE -lXt -lX11 -lXmu -lSM -lICE -lX11 -lpthread'
|
2005-07-15 21:12:18 +00:00
|
|
|
checksoundcard
|
2005-02-22 12:19:12 +00:00
|
|
|
fi
|
2005-02-18 13:47:17 +00:00
|
|
|
output="rockboxui.exe" # use this as output binary name
|
|
|
|
;;
|
|
|
|
|
|
|
|
Linux)
|
|
|
|
echo "Linux host detected"
|
2005-02-22 12:19:12 +00:00
|
|
|
GCCOPTS="$GCCOPTS"
|
2005-02-18 13:47:17 +00:00
|
|
|
if [ "$simver" = "win32" ]; then
|
2006-01-09 11:22:36 +00:00
|
|
|
LDOPTS='-L/usr/X11R6/lib -lX11 -lm -lXt -lXmu -lnsl -ldl -lpthread'
|
2005-07-15 21:12:18 +00:00
|
|
|
crosswincc # setup cross-compiler
|
2006-01-09 11:22:36 +00:00
|
|
|
elif [ "$simver" = "sdl" ]; then
|
|
|
|
GCCOPTS="$GCCOPTS `sdl-config --cflags`"
|
|
|
|
LDOPTS="`sdl-config --libs`"
|
|
|
|
checksoundcard
|
2005-07-14 21:46:07 +00:00
|
|
|
else
|
2006-01-09 11:22:36 +00:00
|
|
|
LDOPTS='-L/usr/X11R6/lib -lX11 -lm -lXt -lXmu -lnsl -ldl -lpthread'
|
2005-07-15 21:12:18 +00:00
|
|
|
checksoundcard
|
2005-07-14 21:46:07 +00:00
|
|
|
fi # not a cross-compiler
|
2005-02-18 13:47:17 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
FreeBSD)
|
|
|
|
echo "FreeBSD host detected"
|
|
|
|
LDOPTS='-L/usr/X11R6/lib -lX11 -lm -lXt -lXmu -dl -lpthread'
|
|
|
|
if [ "$simver" = "win32" ]; then
|
|
|
|
crosswincc # setup cross-compiler
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
echo "Unsupported system: $uname, fix configure and retry"
|
|
|
|
exit
|
|
|
|
;;
|
|
|
|
esac
|
2006-03-01 00:31:38 +00:00
|
|
|
|
|
|
|
if [ `uname -m` = "x86_64" ]; then
|
|
|
|
GCCOPTS="$GCCOPTS -fPIC" # needed to make shared objects link
|
|
|
|
fi
|
2005-04-26 22:41:48 +00:00
|
|
|
|
|
|
|
if test "X$crosscompile" != "Xyes"; then
|
|
|
|
id=$$
|
|
|
|
cat >/tmp/conftest-$id.c <<EOF
|
|
|
|
#include <stdio.h>
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
int var=0;
|
|
|
|
char *varp = (char *)&var;
|
|
|
|
*varp=1;
|
|
|
|
|
|
|
|
printf("%d\n", var);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
|
|
|
|
$CC -o /tmp/conftest-$id /tmp/conftest-$id.c 2>/dev/null
|
|
|
|
|
|
|
|
if test `/tmp/conftest-$id 2>/dev/null` -gt "1"; then
|
|
|
|
# big endian
|
|
|
|
endian="big"
|
|
|
|
else
|
|
|
|
# little endian
|
|
|
|
endian="little"
|
|
|
|
fi
|
|
|
|
echo "Simulator environment deemed $endian endian"
|
2005-04-26 22:56:53 +00:00
|
|
|
|
|
|
|
# use wildcard here to make it work even if it was named *.exe like
|
|
|
|
# on cygwin
|
|
|
|
rm -f /tmp/conftest-$id*
|
2005-04-26 22:41:48 +00:00
|
|
|
fi
|
2005-02-18 13:47:17 +00:00
|
|
|
}
|
|
|
|
|
2004-09-22 08:58:50 +00:00
|
|
|
shcc () {
|
2005-02-18 13:47:17 +00:00
|
|
|
prefixtools sh-elf-
|
2004-10-04 13:02:41 +00:00
|
|
|
GCCOPTS="$CCOPTS -m1"
|
2004-10-07 07:08:57 +00:00
|
|
|
GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
|
2005-04-26 22:41:48 +00:00
|
|
|
endian="big"
|
2004-09-22 08:58:50 +00:00
|
|
|
}
|
|
|
|
|
2005-01-04 15:00:06 +00:00
|
|
|
calmrisccc () {
|
2005-02-18 13:47:17 +00:00
|
|
|
prefixtools calmrisc16-unknown-elf-
|
2005-02-10 22:37:09 +00:00
|
|
|
GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
|
2005-01-04 15:00:06 +00:00
|
|
|
GCCOPTIMIZE="-fomit-frame-pointer"
|
2005-04-26 22:41:48 +00:00
|
|
|
endian="big"
|
2005-01-04 15:00:06 +00:00
|
|
|
}
|
|
|
|
|
2004-09-22 08:58:50 +00:00
|
|
|
coldfirecc () {
|
2005-02-18 13:47:17 +00:00
|
|
|
prefixtools m68k-elf-
|
2005-02-06 03:11:26 +00:00
|
|
|
GCCOPTS="$CCOPTS -g -m5200 -Wa\,-m5249 -malign-int -mstrict-align"
|
2004-10-07 07:08:57 +00:00
|
|
|
GCCOPTIMIZE="-fomit-frame-pointer"
|
2005-04-26 22:41:48 +00:00
|
|
|
endian="big"
|
2004-09-22 08:58:50 +00:00
|
|
|
}
|
|
|
|
|
2005-11-08 00:52:39 +00:00
|
|
|
arm7tdmicc () {
|
|
|
|
prefixtools arm-elf-
|
2005-11-13 11:28:48 +00:00
|
|
|
GCCOPTS="$CCOPTS -mcpu=arm7tdmi -ffunction-sections -mlong-calls"
|
2005-11-08 00:52:39 +00:00
|
|
|
GCCOPTIMIZE="-fomit-frame-pointer"
|
|
|
|
endian="little"
|
|
|
|
}
|
|
|
|
|
2006-02-24 15:42:52 +00:00
|
|
|
arm9tdmicc () {
|
|
|
|
prefixtools arm-elf-
|
|
|
|
GCCOPTS="$CCOPTS -mcpu=arm9tdmi -ffunction-sections -mlong-calls"
|
|
|
|
GCCOPTIMIZE="-fomit-frame-pointer"
|
|
|
|
endian="little"
|
|
|
|
}
|
|
|
|
|
2005-02-10 22:37:09 +00:00
|
|
|
whichaddr () {
|
|
|
|
case $archos in
|
2005-02-12 14:12:10 +00:00
|
|
|
gmini120|gminisp)
|
2005-02-10 22:37:09 +00:00
|
|
|
echo ""
|
|
|
|
echo "Where do you want the firmware to be flashed?"
|
|
|
|
echo "WARNING: Do not answer this question lightly,"
|
|
|
|
echo "unless you don't plan to flash your gmini."
|
|
|
|
echo "In this case, reply '0x10000' (no quotes) and "
|
|
|
|
echo "re-configure when you know better."
|
|
|
|
loadaddress=`input`
|
2005-02-11 12:50:00 +00:00
|
|
|
|
|
|
|
if [ "0$loadaddress" = "0" ]; then
|
|
|
|
#default
|
|
|
|
loadaddress="0x10000";
|
|
|
|
fi
|
|
|
|
echo "You selected $loadaddress"
|
2005-02-10 22:37:09 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
2005-05-30 13:00:43 +00:00
|
|
|
whichdevel () {
|
|
|
|
##################################################################
|
|
|
|
# Prompt for specific developer options
|
|
|
|
#
|
|
|
|
echo ""
|
|
|
|
echo "Enter your developer options (press enter when done)"
|
2006-01-18 20:54:13 +00:00
|
|
|
echo "(D)EBUG, (L)ogf, (S)imulator, (P)rofiling"
|
2005-05-30 13:00:43 +00:00
|
|
|
cont=1
|
|
|
|
|
|
|
|
while [ $cont = "1" ]; do
|
|
|
|
|
|
|
|
option=`input`;
|
|
|
|
|
|
|
|
case $option in
|
|
|
|
[Dd])
|
2006-01-18 20:54:13 +00:00
|
|
|
if [ "yes" = "$profile" ]; then
|
|
|
|
echo "Debug is incompatible with profiling"
|
|
|
|
else
|
|
|
|
echo "define DEBUG"
|
|
|
|
use_debug="yes"
|
|
|
|
fi
|
2005-05-30 13:00:43 +00:00
|
|
|
;;
|
|
|
|
[Ll])
|
|
|
|
echo "logf() support enabled"
|
2006-01-18 20:54:13 +00:00
|
|
|
logf="yes"
|
2005-05-30 13:00:43 +00:00
|
|
|
;;
|
|
|
|
[Ss])
|
|
|
|
echo "Simulator build enabled"
|
|
|
|
simulator="yes"
|
|
|
|
;;
|
2006-01-18 20:54:13 +00:00
|
|
|
[Pp])
|
|
|
|
if [ "yes" = "$use_debug" ]; then
|
|
|
|
echo "Profiling is incompatible with debug"
|
|
|
|
else
|
|
|
|
echo "Profiling support is enabled"
|
|
|
|
profile="yes"
|
|
|
|
fi
|
|
|
|
;;
|
2005-05-30 13:00:43 +00:00
|
|
|
*)
|
|
|
|
echo "done"
|
|
|
|
cont=0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2006-01-18 20:54:13 +00:00
|
|
|
if [ "yes" = "$use_debug" ]; then
|
|
|
|
debug="-DDEBUG"
|
|
|
|
GCCOPTS="$GCCOPTS -g -DDEBUG"
|
|
|
|
fi
|
|
|
|
if [ "yes" = "$logf" ]; then
|
|
|
|
use_logf="#define ROCKBOX_HAS_LOGF 1"
|
|
|
|
fi
|
2005-05-30 13:00:43 +00:00
|
|
|
if [ "yes" = "$simulator" ]; then
|
2005-08-30 21:21:06 +00:00
|
|
|
debug="-DDEBUG"
|
2006-01-18 20:54:13 +00:00
|
|
|
extradefines="$extradefines -DSIMULATOR"
|
2005-05-30 13:00:43 +00:00
|
|
|
whichsim
|
|
|
|
fi
|
2006-01-18 20:54:13 +00:00
|
|
|
if [ "yes" = "$profile" ]; then
|
|
|
|
extradefines="$extradefines -DRB_PROFILE"
|
|
|
|
PROFILE_OPTS="-finstrument-functions"
|
|
|
|
GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
|
|
|
|
fi
|
2005-05-30 13:00:43 +00:00
|
|
|
}
|
|
|
|
|
2002-10-17 09:19:34 +00:00
|
|
|
whichsim () {
|
2002-08-02 12:06:07 +00:00
|
|
|
|
|
|
|
if [ -z "$simver" ]; then
|
|
|
|
|
|
|
|
##################################################################
|
2006-02-08 22:44:18 +00:00
|
|
|
# Figure out what simulator version
|
|
|
|
#
|
|
|
|
# x11 is deprecated so hide it from the question
|
2006-02-20 12:18:47 +00:00
|
|
|
# win32 is also deprecated
|
2002-08-02 12:06:07 +00:00
|
|
|
#
|
|
|
|
echo ""
|
2006-02-20 12:18:47 +00:00
|
|
|
echo "Build (S)DL version? (S)"
|
2002-08-02 12:06:07 +00:00
|
|
|
|
|
|
|
option=`input`;
|
|
|
|
|
|
|
|
case $option in
|
|
|
|
[Ww])
|
|
|
|
simver="win32"
|
2005-02-18 13:47:17 +00:00
|
|
|
|
|
|
|
WINDRES=windres
|
|
|
|
DLLTOOL=dlltool
|
|
|
|
DLLWRAP=dllwrap
|
|
|
|
|
|
|
|
# make sure the code knows this is for win32
|
|
|
|
extradefines="$extradefines -DWIN32"
|
2002-08-02 12:06:07 +00:00
|
|
|
;;
|
2006-01-09 11:22:36 +00:00
|
|
|
[Xx])
|
2002-08-02 12:06:07 +00:00
|
|
|
simver="x11"
|
2006-01-09 11:22:36 +00:00
|
|
|
extradefines="$extradefines -DX11"
|
|
|
|
;;
|
|
|
|
[Ss]|*)
|
|
|
|
simver="sdl"
|
|
|
|
extradefines="$extradefines -DSDL"
|
2002-08-02 12:06:07 +00:00
|
|
|
;;
|
|
|
|
esac
|
2003-02-26 09:13:47 +00:00
|
|
|
echo "Selected $simver simulator"
|
2002-08-02 12:06:07 +00:00
|
|
|
fi
|
2002-10-17 09:19:34 +00:00
|
|
|
}
|
|
|
|
|
2002-10-17 09:08:05 +00:00
|
|
|
if test "$1" = "--help"; then
|
|
|
|
echo "Rockbox configure script."
|
|
|
|
echo "Invoke this in a directory to generate a Makefile to build Rockbox"
|
|
|
|
echo "Do *NOT* run this within the tools directory!"
|
2005-06-01 11:42:51 +00:00
|
|
|
echo ""
|
|
|
|
echo "Usage: configure [--ccache]"
|
2002-10-17 09:08:05 +00:00
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2005-06-01 11:42:51 +00:00
|
|
|
if test "$1" = "--ccache"; then
|
|
|
|
echo "Enable ccache for building"
|
|
|
|
ccache="yes"
|
|
|
|
fi
|
|
|
|
|
2002-10-17 09:08:05 +00:00
|
|
|
if test -r "configure"; then
|
|
|
|
# this is a check for a configure script in the current directory, it there
|
|
|
|
# is one, try to figure out if it is this one!
|
|
|
|
|
|
|
|
if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
|
|
|
|
echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
|
|
|
|
echo "It will only cause you pain and grief. Instead do this:"
|
|
|
|
echo ""
|
|
|
|
echo " cd .."
|
|
|
|
echo " mkdir build-dir"
|
|
|
|
echo " cd build-dir"
|
|
|
|
echo " ../tools/configure"
|
|
|
|
echo ""
|
|
|
|
echo "Much happiness will arise from this. Enjoy"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2002-05-31 08:21:20 +00:00
|
|
|
if [ "$target" = "--help" -o \
|
|
|
|
"$target" = "-h" ]; then
|
|
|
|
echo "Just invoke the script and answer the questions."
|
|
|
|
echo "This script will write a Makefile for you"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2002-05-31 07:22:38 +00:00
|
|
|
# get our current directory
|
|
|
|
pwd=`pwd`;
|
2002-05-23 09:11:35 +00:00
|
|
|
|
2002-05-23 10:10:44 +00:00
|
|
|
if [ "$target" = "update" ]; then
|
2004-09-22 08:58:50 +00:00
|
|
|
echo "configure update is unfortunately no longer supported"
|
|
|
|
exit
|
2002-05-31 07:22:38 +00:00
|
|
|
else
|
|
|
|
|
2003-02-26 09:13:47 +00:00
|
|
|
echo "This script will setup your Rockbox build environment."
|
2005-02-18 13:47:17 +00:00
|
|
|
echo "Further docs here: http://www.rockbox.org/"
|
2002-05-31 07:22:38 +00:00
|
|
|
echo ""
|
|
|
|
|
2002-05-23 10:10:44 +00:00
|
|
|
fi
|
|
|
|
|
2004-09-22 08:58:50 +00:00
|
|
|
if [ -z "$rootdir" ]; then
|
|
|
|
##################################################################
|
|
|
|
# Figure out where the source code root is!
|
|
|
|
#
|
|
|
|
|
|
|
|
firmfile="crt0.S" # a file to check for in the firmware root dir
|
|
|
|
|
|
|
|
for dir in . .. ../.. ../rockbox*; do
|
|
|
|
if [ -f $dir/firmware/$firmfile ]; then
|
|
|
|
rootdir=$dir
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ -z "$rootdir" ]; then
|
|
|
|
echo "This script couldn't find your source code root directory. Please enter the"
|
|
|
|
echo "full path to the source code directory here:"
|
|
|
|
|
|
|
|
firmdir=`input`
|
|
|
|
fi
|
|
|
|
|
|
|
|
#####################################################################
|
|
|
|
# Convert the possibly relative directory name to an absolute version
|
|
|
|
#
|
|
|
|
now=`pwd`
|
|
|
|
cd $rootdir
|
|
|
|
rootdir=`pwd`
|
|
|
|
|
|
|
|
echo "Using this source code root directory:"
|
|
|
|
echo $rootdir
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
# cd back to the build dir
|
|
|
|
cd $now
|
|
|
|
fi
|
|
|
|
|
2005-05-07 23:16:08 +00:00
|
|
|
apps="apps"
|
2005-01-29 00:00:47 +00:00
|
|
|
appsdir='\$(ROOTDIR)/apps'
|
2006-02-06 07:25:25 +00:00
|
|
|
firmdir='\$(ROOTDIR)/firmware'
|
2006-02-06 07:54:50 +00:00
|
|
|
toolsdir='\$(ROOTDIR)/tools'
|
2006-02-06 07:25:25 +00:00
|
|
|
|
2005-01-29 00:00:47 +00:00
|
|
|
|
2002-05-23 09:11:35 +00:00
|
|
|
##################################################################
|
|
|
|
# Figure out target platform
|
|
|
|
#
|
|
|
|
|
2005-05-24 09:19:44 +00:00
|
|
|
echo "Enter target platform:"
|
2002-05-23 09:11:35 +00:00
|
|
|
|
2002-10-15 12:25:57 +00:00
|
|
|
echo "1 - Archos Player/Studio"
|
|
|
|
echo "2 - Archos Recorder"
|
2003-01-16 14:37:30 +00:00
|
|
|
echo "3 - Archos FM Recorder"
|
2003-11-19 06:40:59 +00:00
|
|
|
echo "4 - Archos Recorder v2"
|
2005-01-04 15:00:06 +00:00
|
|
|
echo "5 - Archos Gmini 120"
|
2005-02-12 14:12:10 +00:00
|
|
|
echo "6 - Archos Gmini SP"
|
2004-09-09 06:01:46 +00:00
|
|
|
echo "7 - Archos Ondio SP"
|
|
|
|
echo "8 - Archos Ondio FM"
|
2005-07-15 21:24:10 +00:00
|
|
|
echo "9 - iriver H120/H140"
|
|
|
|
echo "10 - iriver H320/H340"
|
|
|
|
echo "11 - iriver iHP-100/iHP-110/iHP-115"
|
|
|
|
echo "12 - iAudio X5"
|
2005-11-08 00:52:39 +00:00
|
|
|
echo "13 - iPod Color/Photo"
|
|
|
|
echo "14 - iPod Nano"
|
2005-12-18 13:04:00 +00:00
|
|
|
echo "15 - iPod Video"
|
2006-02-05 18:30:50 +00:00
|
|
|
echo "16 - iPod 3G"
|
|
|
|
echo "17 - iPod 4G (Grayscale)"
|
2006-03-30 17:29:21 +00:00
|
|
|
echo "18 - iPod Mini (1G)"
|
2006-02-21 15:01:25 +00:00
|
|
|
echo "19 - iriver iFP-790"
|
2006-02-24 15:42:52 +00:00
|
|
|
echo "20 - Toshiba Gigabeat F"
|
2006-03-30 17:29:21 +00:00
|
|
|
echo "21 - iPod Mini 2G"
|
2002-05-23 09:11:35 +00:00
|
|
|
|
2006-01-15 18:20:18 +00:00
|
|
|
target_id=`input`;
|
2002-05-23 09:11:35 +00:00
|
|
|
|
2005-12-02 08:56:20 +00:00
|
|
|
# Set of tools built for all target platforms:
|
2005-12-06 22:04:43 +00:00
|
|
|
toolset="rdf2binary convbdf"
|
2005-12-02 08:56:20 +00:00
|
|
|
|
|
|
|
# Toolsets for some target families:
|
2005-12-06 22:04:43 +00:00
|
|
|
archosbitmaptools="$toolset scramble descramble sh2d uclpack bmp2rb codepages"
|
|
|
|
iriverbitmaptools="$toolset scramble descramble mkboot bmp2rb codepages"
|
2006-02-05 00:08:29 +00:00
|
|
|
iaudiobitmaptools="$toolset scramble descramble mkboot bmp2rb codepages"
|
2006-02-24 15:42:52 +00:00
|
|
|
gigabeatbitmaptools="$toolset bmp2rb codepages"
|
2005-12-06 22:04:43 +00:00
|
|
|
ipodbitmaptools="$toolset scramble ipod_fw bmp2rb codepages"
|
2006-01-24 22:33:49 +00:00
|
|
|
ifpbitmaptools="$toolset bmp2rb codepages"
|
2005-12-02 08:56:20 +00:00
|
|
|
|
2006-01-15 18:20:18 +00:00
|
|
|
case $target_id in
|
2002-05-23 09:11:35 +00:00
|
|
|
|
|
|
|
1)
|
2003-01-16 14:37:30 +00:00
|
|
|
archos="player"
|
2002-05-23 09:11:35 +00:00
|
|
|
target="-DARCHOS_PLAYER"
|
2004-09-22 08:58:50 +00:00
|
|
|
shcc
|
2004-10-07 08:08:05 +00:00
|
|
|
tool="$rootdir/tools/scramble"
|
2004-09-22 08:58:50 +00:00
|
|
|
output="archos.mod"
|
2005-10-28 00:00:00 +00:00
|
|
|
appextra="player:gui"
|
2004-11-20 00:55:25 +00:00
|
|
|
archosrom="$pwd/rombox.ucl"
|
|
|
|
flash="$pwd/rockbox.ucl"
|
2004-09-22 21:40:45 +00:00
|
|
|
plugins="yes"
|
2005-02-16 00:38:31 +00:00
|
|
|
codecs=""
|
2005-12-02 08:56:20 +00:00
|
|
|
|
|
|
|
# toolset is the tools within the tools directory that we build for
|
|
|
|
# this particular target.
|
2005-12-06 22:04:43 +00:00
|
|
|
toolset="$toolset scramble descramble sh2d generate_rocklatin uclpack"
|
2005-12-04 23:25:24 +00:00
|
|
|
|
|
|
|
# Note: the convbdf is present in the toolset just because: 1) the
|
|
|
|
# firmware/Makefile assumes it is present always, and 2) we will need it when we
|
|
|
|
# build the player simulator
|
|
|
|
|
2004-09-22 08:58:50 +00:00
|
|
|
;;
|
|
|
|
|
2005-06-15 11:27:37 +00:00
|
|
|
2)
|
|
|
|
archos="recorder"
|
|
|
|
target="-DARCHOS_RECORDER"
|
|
|
|
shcc
|
|
|
|
tool="$rootdir/tools/scramble"
|
2006-01-22 21:30:32 +00:00
|
|
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
|
|
|
bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
|
2005-06-15 11:27:37 +00:00
|
|
|
output="ajbrec.ajz"
|
2005-10-28 00:00:00 +00:00
|
|
|
appextra="recorder:gui"
|
2005-06-15 11:27:37 +00:00
|
|
|
archosrom="$pwd/rombox.ucl"
|
|
|
|
flash="$pwd/rockbox.ucl"
|
|
|
|
plugins="yes"
|
|
|
|
codecs=""
|
2005-12-02 08:56:20 +00:00
|
|
|
# toolset is the tools within the tools directory that we build for
|
|
|
|
# this particular target.
|
|
|
|
toolset=$archosbitmaptools
|
2005-06-15 11:27:37 +00:00
|
|
|
;;
|
|
|
|
|
2003-01-16 14:37:30 +00:00
|
|
|
3)
|
|
|
|
archos="fmrecorder"
|
|
|
|
target="-DARCHOS_FMRECORDER"
|
2004-09-22 08:58:50 +00:00
|
|
|
shcc
|
2004-10-07 08:08:05 +00:00
|
|
|
tool="$rootdir/tools/scramble -fm"
|
2006-01-22 21:30:32 +00:00
|
|
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
|
|
|
bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
|
2004-09-22 08:58:50 +00:00
|
|
|
output="ajbrec.ajz"
|
2005-10-28 00:00:00 +00:00
|
|
|
appextra="recorder:gui"
|
2005-08-31 21:39:54 +00:00
|
|
|
archosrom="$pwd/rombox.ucl"
|
2004-10-07 08:20:25 +00:00
|
|
|
flash="$pwd/rockbox.ucl"
|
2004-09-22 21:40:45 +00:00
|
|
|
plugins="yes"
|
2005-02-16 00:38:31 +00:00
|
|
|
codecs=""
|
2005-12-02 08:56:20 +00:00
|
|
|
# toolset is the tools within the tools directory that we build for
|
|
|
|
# this particular target.
|
|
|
|
toolset=$archosbitmaptools
|
2003-01-16 14:37:30 +00:00
|
|
|
;;
|
|
|
|
|
2003-11-19 06:40:59 +00:00
|
|
|
4)
|
|
|
|
archos="recorderv2"
|
|
|
|
target="-DARCHOS_RECORDERV2"
|
2004-09-22 08:58:50 +00:00
|
|
|
shcc
|
2004-10-07 08:08:05 +00:00
|
|
|
tool="$rootdir/tools/scramble -v2"
|
2006-01-22 21:30:32 +00:00
|
|
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
|
|
|
bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
|
2004-09-22 08:58:50 +00:00
|
|
|
output="ajbrec.ajz"
|
2005-10-28 00:00:00 +00:00
|
|
|
appextra="recorder:gui"
|
2004-09-22 08:58:50 +00:00
|
|
|
archosrom="$pwd/rombox.ucl"
|
2004-10-07 08:20:25 +00:00
|
|
|
flash="$pwd/rockbox.ucl"
|
2004-09-22 21:40:45 +00:00
|
|
|
plugins="yes"
|
2005-02-16 00:38:31 +00:00
|
|
|
codecs=""
|
2005-12-02 08:56:20 +00:00
|
|
|
# toolset is the tools within the tools directory that we build for
|
|
|
|
# this particular target.
|
|
|
|
toolset=$archosbitmaptools
|
2003-11-19 06:40:59 +00:00
|
|
|
;;
|
|
|
|
|
2005-01-04 15:00:06 +00:00
|
|
|
5)
|
|
|
|
archos="gmini120"
|
2005-03-09 14:39:52 +00:00
|
|
|
target="-DARCHOS_GMINI120"
|
2005-01-04 15:00:06 +00:00
|
|
|
memory=16 # fixed size (16 is a guess, remove comment when checked)
|
|
|
|
calmrisccc
|
2005-02-11 11:05:59 +00:00
|
|
|
tool="cp" # might work for now!
|
2006-01-22 21:30:32 +00:00
|
|
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
|
|
|
bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
|
2005-02-11 11:48:12 +00:00
|
|
|
output="rockbox.gmini"
|
2005-10-28 00:00:00 +00:00
|
|
|
appextra="recorder:gui"
|
2005-01-04 15:00:06 +00:00
|
|
|
archosrom=""
|
|
|
|
flash=""
|
2005-01-23 00:31:30 +00:00
|
|
|
plugins="" # disabled for now, enable later on
|
2005-03-09 14:39:52 +00:00
|
|
|
codecs="libmad"
|
2005-12-02 08:56:20 +00:00
|
|
|
# toolset is the tools within the tools directory that we build for
|
|
|
|
# this particular target.
|
2005-12-06 22:04:43 +00:00
|
|
|
toolset="$toolset bmp2rb codepages"
|
2005-01-04 15:00:06 +00:00
|
|
|
;;
|
|
|
|
|
2005-02-12 14:12:10 +00:00
|
|
|
6)
|
|
|
|
archos="gminisp"
|
2005-03-09 14:39:52 +00:00
|
|
|
target="-DARCHOS_GMINISP"
|
2005-02-12 14:12:10 +00:00
|
|
|
memory=16 # fixed size (16 is a guess, remove comment when checked)
|
|
|
|
calmrisccc
|
|
|
|
tool="cp" # might work for now!
|
2006-01-22 21:30:32 +00:00
|
|
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
|
|
|
bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
|
2005-02-12 14:12:10 +00:00
|
|
|
output="rockbox.gmini"
|
2005-10-28 00:00:00 +00:00
|
|
|
appextra="recorder:gui"
|
2005-02-12 14:12:10 +00:00
|
|
|
archosrom=""
|
|
|
|
flash=""
|
|
|
|
plugins="" # disabled for now, enable later on
|
2005-03-09 14:39:52 +00:00
|
|
|
codecs="libmad"
|
2005-12-02 08:56:20 +00:00
|
|
|
# toolset is the tools within the tools directory that we build for
|
|
|
|
# this particular target.
|
2005-12-06 22:04:43 +00:00
|
|
|
toolset="$toolset bmp2rb codepages"
|
2005-02-12 14:12:10 +00:00
|
|
|
;;
|
|
|
|
|
2004-09-09 06:01:46 +00:00
|
|
|
7)
|
|
|
|
archos="ondiosp"
|
|
|
|
target="-DARCHOS_ONDIOSP"
|
2004-09-22 08:58:50 +00:00
|
|
|
shcc
|
2004-10-07 08:08:05 +00:00
|
|
|
tool="$rootdir/tools/scramble -osp"
|
2006-01-22 21:30:32 +00:00
|
|
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
|
|
|
bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
|
2004-09-22 08:58:50 +00:00
|
|
|
output="ajbrec.ajz"
|
2005-10-28 00:00:00 +00:00
|
|
|
appextra="recorder:gui"
|
2004-10-07 06:51:22 +00:00
|
|
|
archosrom="$pwd/rombox.ucl"
|
2004-10-07 08:20:25 +00:00
|
|
|
flash="$pwd/rockbox.ucl"
|
2004-10-07 06:51:22 +00:00
|
|
|
plugins="yes"
|
2005-02-16 00:38:31 +00:00
|
|
|
codecs=""
|
2005-12-02 08:56:20 +00:00
|
|
|
# toolset is the tools within the tools directory that we build for
|
|
|
|
# this particular target.
|
|
|
|
toolset=$archosbitmaptools
|
2004-09-09 06:01:46 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
8)
|
|
|
|
archos="ondiofm"
|
|
|
|
target="-DARCHOS_ONDIOFM"
|
2004-09-22 08:58:50 +00:00
|
|
|
shcc
|
2004-10-07 08:08:05 +00:00
|
|
|
tool="$rootdir/tools/scramble -ofm"
|
2006-01-22 21:30:32 +00:00
|
|
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
|
|
|
bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
|
2004-09-22 08:58:50 +00:00
|
|
|
output="ajbrec.ajz"
|
2005-10-28 00:00:00 +00:00
|
|
|
appextra="recorder:gui"
|
2004-10-07 06:51:22 +00:00
|
|
|
archosrom="$pwd/rombox.ucl"
|
2004-10-07 08:20:25 +00:00
|
|
|
flash="$pwd/rockbox.ucl"
|
2004-10-07 06:51:22 +00:00
|
|
|
plugins="yes"
|
2005-02-16 00:38:31 +00:00
|
|
|
codecs=""
|
2005-12-02 08:56:20 +00:00
|
|
|
toolset=$archosbitmaptools
|
2004-09-16 14:36:08 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
9)
|
2005-07-08 06:31:13 +00:00
|
|
|
archos="h120"
|
|
|
|
target="-DIRIVER_H120"
|
2004-09-16 21:19:21 +00:00
|
|
|
memory=32 # always
|
2004-09-22 08:58:50 +00:00
|
|
|
coldfirecc
|
2005-01-28 12:27:39 +00:00
|
|
|
tool="$rootdir/tools/scramble -add=h120"
|
2006-01-22 21:30:32 +00:00
|
|
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
|
|
|
bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
|
|
|
|
bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
|
|
|
|
bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
|
2004-09-22 08:58:50 +00:00
|
|
|
output="rockbox.iriver"
|
2005-10-28 00:00:00 +00:00
|
|
|
appextra="recorder:gui"
|
2004-09-22 08:58:50 +00:00
|
|
|
archosrom=""
|
2004-10-07 08:20:25 +00:00
|
|
|
flash=""
|
2005-02-04 12:52:15 +00:00
|
|
|
plugins="yes"
|
2005-10-31 20:56:29 +00:00
|
|
|
codecs="libmad liba52 libffmpegFLAC libTremor libwavpack dumb libmusepack libalac libfaad libm4a"
|
2005-12-02 08:56:20 +00:00
|
|
|
# toolset is the tools within the tools directory that we build for
|
|
|
|
# this particular target.
|
|
|
|
toolset=$iriverbitmaptools
|
2002-05-23 09:11:35 +00:00
|
|
|
;;
|
|
|
|
|
2005-06-15 11:27:37 +00:00
|
|
|
10)
|
|
|
|
archos="h300"
|
|
|
|
target="-DIRIVER_H300"
|
|
|
|
memory=32 # always
|
|
|
|
coldfirecc
|
2005-07-01 09:46:23 +00:00
|
|
|
tool="$rootdir/tools/scramble -add=h300"
|
2006-01-22 21:30:32 +00:00
|
|
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
|
|
|
bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
|
|
|
|
bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
|
|
|
|
bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
|
2005-06-15 11:27:37 +00:00
|
|
|
output="rockbox.iriver"
|
2005-10-28 00:00:00 +00:00
|
|
|
appextra="recorder:gui"
|
2005-06-15 11:27:37 +00:00
|
|
|
archosrom=""
|
|
|
|
flash=""
|
2004-09-22 21:40:45 +00:00
|
|
|
plugins="yes"
|
2005-10-31 20:56:29 +00:00
|
|
|
codecs="libmad liba52 libffmpegFLAC libTremor libwavpack dumb libmusepack libalac libfaad libm4a"
|
2005-12-02 08:56:20 +00:00
|
|
|
# toolset is the tools within the tools directory that we build for
|
|
|
|
# this particular target.
|
|
|
|
toolset=$iriverbitmaptools
|
2004-09-22 09:29:58 +00:00
|
|
|
;;
|
|
|
|
|
2005-07-08 06:31:13 +00:00
|
|
|
11)
|
|
|
|
archos="h100"
|
|
|
|
target="-DIRIVER_H100"
|
|
|
|
memory=16 # always
|
|
|
|
coldfirecc
|
|
|
|
tool="$rootdir/tools/scramble -add=h100"
|
2006-01-22 21:30:32 +00:00
|
|
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
|
|
|
bmp2rb_native="$rootdir/tools/bmp2rb -f 2"
|
|
|
|
bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
|
|
|
|
bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
|
2005-07-08 06:31:13 +00:00
|
|
|
output="rockbox.iriver"
|
2005-10-28 00:00:00 +00:00
|
|
|
appextra="recorder:gui"
|
2005-07-08 06:31:13 +00:00
|
|
|
archosrom=""
|
|
|
|
flash=""
|
|
|
|
plugins="yes"
|
2005-10-31 20:56:29 +00:00
|
|
|
codecs="libmad liba52 libffmpegFLAC libTremor libwavpack dumb libmusepack libalac libfaad libm4a"
|
2005-12-02 08:56:20 +00:00
|
|
|
# toolset is the tools within the tools directory that we build for
|
|
|
|
# this particular target.
|
|
|
|
toolset=$iriverbitmaptools
|
2005-07-08 06:31:13 +00:00
|
|
|
;;
|
|
|
|
|
2005-07-15 21:24:10 +00:00
|
|
|
12)
|
|
|
|
archos="x5"
|
|
|
|
target="-DIAUDIO_X5"
|
2006-02-13 22:12:04 +00:00
|
|
|
memory=16 # always
|
2005-07-15 21:24:10 +00:00
|
|
|
coldfirecc
|
2006-03-22 14:56:00 +00:00
|
|
|
tool="$rootdir/tools/scramble -add=iax5"
|
2006-01-22 21:30:32 +00:00
|
|
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
|
|
|
bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
|
2006-01-22 23:32:34 +00:00
|
|
|
bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
|
|
|
|
bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
|
2005-07-15 21:24:10 +00:00
|
|
|
output="rockbox.iaudio"
|
2005-10-28 00:00:00 +00:00
|
|
|
appextra="recorder:gui"
|
2005-07-15 21:24:10 +00:00
|
|
|
archosrom=""
|
|
|
|
flash=""
|
|
|
|
plugins="yes"
|
2005-10-31 20:56:29 +00:00
|
|
|
codecs="libmad liba52 libffmpegFLAC libTremor libwavpack dumb libmusepack libalac libfaad libm4a"
|
2005-12-02 08:56:20 +00:00
|
|
|
# toolset is the tools within the tools directory that we build for
|
|
|
|
# this particular target.
|
2006-02-05 00:08:29 +00:00
|
|
|
toolset="$iaudiobitmaptools"
|
2006-03-07 12:45:45 +00:00
|
|
|
# architecture, manufacturer and model for the target-tree build
|
|
|
|
t_cpu="coldfire"
|
|
|
|
t_manufactorer="iaudio"
|
|
|
|
t_model="x5"
|
2005-07-15 21:24:10 +00:00
|
|
|
;;
|
|
|
|
|
2005-11-08 00:52:39 +00:00
|
|
|
13)
|
|
|
|
archos="ipodcolor"
|
|
|
|
target="-DIPOD_COLOR"
|
|
|
|
memory=32 # always
|
|
|
|
arm7tdmicc
|
|
|
|
tool="$rootdir/tools/scramble -add=ipco"
|
2006-01-22 21:30:32 +00:00
|
|
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
|
|
|
bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
|
2005-11-08 00:52:39 +00:00
|
|
|
output="rockbox.ipod"
|
|
|
|
appextra="recorder:gui"
|
|
|
|
archosrom=""
|
|
|
|
flash=""
|
|
|
|
plugins="yes"
|
|
|
|
codecs="libmad liba52 libffmpegFLAC libTremor libwavpack dumb libmusepack libalac libfaad libm4a"
|
2005-12-02 08:56:20 +00:00
|
|
|
# toolset is the tools within the tools directory that we build for
|
|
|
|
# this particular target.
|
|
|
|
toolset=$ipodbitmaptools
|
2005-11-08 00:52:39 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
14)
|
|
|
|
archos="ipodnano"
|
|
|
|
target="-DIPOD_NANO"
|
|
|
|
memory=32 # always
|
|
|
|
arm7tdmicc
|
|
|
|
tool="$rootdir/tools/scramble -add=nano"
|
2006-01-22 21:30:32 +00:00
|
|
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
|
|
|
bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
|
2005-11-08 00:52:39 +00:00
|
|
|
output="rockbox.ipod"
|
|
|
|
appextra="recorder:gui"
|
|
|
|
archosrom=""
|
|
|
|
flash=""
|
|
|
|
plugins="yes"
|
|
|
|
codecs="libmad liba52 libffmpegFLAC libTremor libwavpack dumb libmusepack libalac libfaad libm4a"
|
2005-12-02 08:56:20 +00:00
|
|
|
# toolset is the tools within the tools directory that we build for
|
|
|
|
# this particular target.
|
|
|
|
toolset=$ipodbitmaptools
|
2005-11-08 00:52:39 +00:00
|
|
|
;;
|
|
|
|
|
2005-12-18 13:04:00 +00:00
|
|
|
15)
|
|
|
|
archos="ipodvideo"
|
|
|
|
target="-DIPOD_VIDEO"
|
|
|
|
memory=32 # 30GB models have 32MB, 60GB have 64MB
|
|
|
|
arm7tdmicc
|
|
|
|
tool="$rootdir/tools/scramble -add=ipvd"
|
2006-01-22 21:30:32 +00:00
|
|
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
|
|
|
bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
|
2005-12-18 13:04:00 +00:00
|
|
|
output="rockbox.ipod"
|
|
|
|
appextra="recorder:gui"
|
|
|
|
archosrom=""
|
|
|
|
flash=""
|
|
|
|
plugins="yes"
|
|
|
|
codecs="libmad liba52 libffmpegFLAC libTremor libwavpack dumb libmusepack libalac libfaad libm4a"
|
|
|
|
# toolset is the tools within the tools directory that we build for
|
|
|
|
# this particular target.
|
|
|
|
toolset=$ipodbitmaptools
|
|
|
|
;;
|
|
|
|
|
2006-01-12 00:35:50 +00:00
|
|
|
16)
|
2006-02-05 18:30:50 +00:00
|
|
|
archos="ipod3g"
|
|
|
|
target="-DIPOD_3G"
|
|
|
|
memory=32 # always
|
|
|
|
arm7tdmicc
|
|
|
|
tool="$rootdir/tools/scramble -add=ip3g"
|
|
|
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
2006-02-16 20:03:07 +00:00
|
|
|
bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
|
2006-02-05 18:30:50 +00:00
|
|
|
output="rockbox.ipod"
|
|
|
|
appextra="recorder:gui"
|
|
|
|
archosrom=""
|
|
|
|
flash=""
|
|
|
|
plugins="yes"
|
|
|
|
codecs="libmad liba52 libffmpegFLAC libTremor libwavpack dumb libmusepack libalac libfaad libm4a"
|
|
|
|
# toolset is the tools within the tools directory that we build for
|
|
|
|
# this particular target.
|
|
|
|
toolset=$ipodbitmaptools
|
|
|
|
;;
|
|
|
|
|
|
|
|
17)
|
|
|
|
archos="ipod4g"
|
|
|
|
target="-DIPOD_4G"
|
|
|
|
memory=32 # always
|
|
|
|
arm7tdmicc
|
|
|
|
tool="$rootdir/tools/scramble -add=ip4g"
|
|
|
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
2006-02-16 20:03:07 +00:00
|
|
|
bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
|
2006-02-05 18:30:50 +00:00
|
|
|
output="rockbox.ipod"
|
|
|
|
appextra="recorder:gui"
|
|
|
|
archosrom=""
|
|
|
|
flash=""
|
|
|
|
plugins="yes"
|
|
|
|
codecs="libmad liba52 libffmpegFLAC libTremor libwavpack dumb libmusepack libalac libfaad libm4a"
|
|
|
|
# toolset is the tools within the tools directory that we build for
|
|
|
|
# this particular target.
|
|
|
|
toolset=$ipodbitmaptools
|
|
|
|
;;
|
|
|
|
|
|
|
|
18)
|
2006-02-21 15:01:25 +00:00
|
|
|
archos="ipodmini"
|
|
|
|
target="-DIPOD_MINI"
|
|
|
|
memory=32 # always
|
|
|
|
arm7tdmicc
|
|
|
|
tool="$rootdir/tools/scramble -add=mini"
|
|
|
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
|
|
|
bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
|
|
|
|
output="rockbox.ipod"
|
|
|
|
appextra="recorder:gui"
|
|
|
|
archosrom=""
|
|
|
|
flash=""
|
|
|
|
plugins="yes"
|
|
|
|
codecs="libmad liba52 libffmpegFLAC libTremor libwavpack dumb libmusepack libalac libfaad libm4a"
|
|
|
|
# toolset is the tools within the tools directory that we build for
|
|
|
|
# this particular target.
|
|
|
|
toolset=$ipodbitmaptools
|
|
|
|
;;
|
|
|
|
|
|
|
|
19)
|
2006-01-12 00:35:50 +00:00
|
|
|
archos="ifp7xx"
|
|
|
|
target="-DIRIVER_IFP7XX"
|
|
|
|
memory=1
|
|
|
|
arm7tdmicc
|
|
|
|
tool="cp"
|
2006-01-22 21:30:32 +00:00
|
|
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
|
|
|
bmp2rb_native="$rootdir/tools/bmp2rb -f 0"
|
2006-01-12 00:35:50 +00:00
|
|
|
output="rockbox.wma"
|
|
|
|
appextra="recorder:gui"
|
|
|
|
archosrom=""
|
|
|
|
flash=""
|
|
|
|
plugins="yes"
|
|
|
|
codecs="libmad liba52 libffmpegFLAC libTremor libwavpack dumb libmusepack libalac libfaad libm4a"
|
2006-01-24 22:33:49 +00:00
|
|
|
# toolset is the tools within the tools directory that we build for
|
|
|
|
# this particular target.
|
|
|
|
toolset=$ifpbitmaptools
|
2006-01-12 00:35:50 +00:00
|
|
|
;;
|
|
|
|
|
2006-02-24 15:42:52 +00:00
|
|
|
20)
|
|
|
|
archos="gigabeatf"
|
|
|
|
target="-DGIGABEAT_F"
|
|
|
|
memory=32 # always
|
|
|
|
arm9tdmicc
|
|
|
|
tool="cp"
|
|
|
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
|
|
|
bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
|
|
|
|
output="rockbox.gigabeat"
|
|
|
|
appextra="recorder:gui"
|
|
|
|
archosrom=""
|
|
|
|
flash=""
|
|
|
|
plugins="yes"
|
|
|
|
codecs="libmad liba52 libffmpegFLAC libTremor libwavpack dumb libmusepack libalac libfaad libm4a"
|
|
|
|
toolset=$gigabeatbitmaptools
|
|
|
|
;;
|
|
|
|
|
2006-03-30 17:29:21 +00:00
|
|
|
21)
|
|
|
|
archos="ipodmini2g"
|
|
|
|
target="-DIPOD_MINI2G"
|
|
|
|
memory=32 # always
|
|
|
|
arm7tdmicc
|
|
|
|
tool="$rootdir/tools/scramble -add=mn2g"
|
|
|
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
|
|
|
bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
|
|
|
|
output="rockbox.ipod"
|
|
|
|
appextra="recorder:gui"
|
|
|
|
archosrom=""
|
|
|
|
flash=""
|
|
|
|
plugins="yes"
|
|
|
|
codecs="libmad liba52 libffmpegFLAC libTremor libwavpack dumb libmusepack libalac libfaad libm4a"
|
|
|
|
# toolset is the tools within the tools directory that we build for
|
|
|
|
# this particular target.
|
|
|
|
toolset=$ipodbitmaptools
|
|
|
|
;;
|
|
|
|
|
2005-05-23 16:21:46 +00:00
|
|
|
*)
|
|
|
|
echo "Please select an actual target platform!"
|
|
|
|
exit
|
|
|
|
;;
|
|
|
|
|
2002-05-23 09:11:35 +00:00
|
|
|
esac
|
2003-02-26 09:13:47 +00:00
|
|
|
|
|
|
|
echo "Platform set to $archos"
|
|
|
|
|
2005-05-30 13:00:43 +00:00
|
|
|
|
|
|
|
############################################################################
|
|
|
|
# Amount of memory, for those that can differ.
|
|
|
|
#
|
2003-02-26 09:13:47 +00:00
|
|
|
|
|
|
|
if [ -z "$memory" ]; then
|
|
|
|
size="2"
|
|
|
|
if [ -z "$update" ]; then
|
|
|
|
echo "Enter size of your RAM (in MB): (defaults to 2)"
|
|
|
|
size=`input`;
|
|
|
|
fi
|
|
|
|
|
|
|
|
case $size in
|
|
|
|
8)
|
|
|
|
memory="8"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
memory="2"
|
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
echo "Memory size selected: $memory MB"
|
2002-05-23 09:11:35 +00:00
|
|
|
fi
|
|
|
|
|
2005-05-30 13:00:43 +00:00
|
|
|
##################################################################
|
|
|
|
# Figure out build "type"
|
|
|
|
#
|
2006-02-09 21:22:36 +00:00
|
|
|
|
|
|
|
# the ifp7x0 is the only platform that supports building a gdb stub like
|
|
|
|
# this
|
|
|
|
case $archos in
|
|
|
|
ifp7xx)
|
|
|
|
gdbstub="(G)DB stub, "
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2005-05-30 13:00:43 +00:00
|
|
|
echo ""
|
2006-02-09 21:22:36 +00:00
|
|
|
echo "Build (N)ormal, (D)evel, (S)imulator, (B)ootloader, $gdbstub(M)anual? (N)"
|
2002-05-23 09:11:35 +00:00
|
|
|
|
2002-05-23 10:10:44 +00:00
|
|
|
option=`input`;
|
2002-05-23 09:11:35 +00:00
|
|
|
|
2002-05-23 10:10:44 +00:00
|
|
|
case $option in
|
2005-01-29 00:00:47 +00:00
|
|
|
[Bb])
|
2005-07-09 07:45:16 +00:00
|
|
|
case $archos in
|
2006-03-30 17:29:21 +00:00
|
|
|
h100|h120|h300|x5|ipodcolor|ipodnano|ipodvideo|ipod3g|ipod4g|ipodmini|ipodmini2g)
|
2005-07-09 07:45:16 +00:00
|
|
|
extradefines="-DBOOTLOADER" # for target makefile symbol EXTRA_DEFINES
|
|
|
|
appsdir='\$(ROOTDIR)/bootloader'
|
|
|
|
apps="bootloader"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
extradefines="-DBOOTLOADER -ffunction-sections -fdata-sections"
|
|
|
|
appsdir='\$(ROOTDIR)/flash/bootbox'
|
|
|
|
apps="bootbox"
|
|
|
|
;;
|
|
|
|
esac
|
2005-01-29 00:00:47 +00:00
|
|
|
bootloader="1"
|
|
|
|
echo "Bootloader build selected"
|
|
|
|
;;
|
2002-05-31 07:22:38 +00:00
|
|
|
[Ss])
|
2005-08-30 21:21:06 +00:00
|
|
|
debug="-DDEBUG"
|
2002-05-31 07:22:38 +00:00
|
|
|
simulator="yes"
|
2005-02-18 13:47:17 +00:00
|
|
|
extradefines="-DSIMULATOR"
|
2003-02-26 09:13:47 +00:00
|
|
|
echo "Simulator build selected"
|
2002-10-17 09:19:34 +00:00
|
|
|
whichsim
|
2002-05-31 07:22:38 +00:00
|
|
|
;;
|
|
|
|
[Dd])
|
2005-05-30 13:00:43 +00:00
|
|
|
echo "Devel build selected"
|
|
|
|
whichdevel
|
2002-05-23 10:10:44 +00:00
|
|
|
;;
|
2006-01-25 01:41:22 +00:00
|
|
|
[Gg])
|
|
|
|
extradefines="-DSTUB" # for target makefile symbol EXTRA_DEFINES
|
|
|
|
appsdir='\$(ROOTDIR)/gdb'
|
|
|
|
apps="stub"
|
|
|
|
case $archos in
|
|
|
|
ifp7xx)
|
|
|
|
output="stub.wma"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
echo "GDB stub build selected"
|
|
|
|
;;
|
2006-02-06 07:25:25 +00:00
|
|
|
[Mm])
|
|
|
|
appsdir='\$(ROOTDIR)/manual'
|
|
|
|
firmdir='\$(ROOTDIR)/manual/platform' # No Makefile here. Effectively ignores target
|
|
|
|
toolsdir=$firmdir;
|
|
|
|
toolset='';
|
|
|
|
apps="manual"
|
|
|
|
case $archos in
|
|
|
|
fmrecorder)
|
|
|
|
archos="recorderv2fm"
|
|
|
|
;;
|
|
|
|
recorderv2)
|
|
|
|
archos="recorderv2fm"
|
|
|
|
;;
|
|
|
|
h1??)
|
|
|
|
archos="h1xx"
|
2006-04-01 19:12:11 +00:00
|
|
|
;;
|
|
|
|
ipodmini2g)
|
|
|
|
archos="ipodmini"
|
2006-02-06 07:25:25 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
echo "Manual build selected"
|
|
|
|
;;
|
2002-05-23 10:10:44 +00:00
|
|
|
*)
|
2004-09-22 08:58:50 +00:00
|
|
|
debug=""
|
2003-02-26 09:13:47 +00:00
|
|
|
echo "Normal build selected"
|
2004-10-07 07:08:57 +00:00
|
|
|
GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
|
2002-05-23 10:10:44 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
2005-05-30 13:00:43 +00:00
|
|
|
|
2002-05-23 09:11:35 +00:00
|
|
|
|
2005-02-10 22:37:09 +00:00
|
|
|
whichaddr
|
2003-04-22 22:18:57 +00:00
|
|
|
|
2006-01-09 10:43:51 +00:00
|
|
|
# this was once possible to change at build-time, but no more:
|
|
|
|
language="english"
|
2002-09-20 06:38:38 +00:00
|
|
|
|
2005-02-18 13:47:17 +00:00
|
|
|
uname=`uname`
|
|
|
|
|
2002-10-17 09:14:57 +00:00
|
|
|
if [ "yes" = "$simulator" ]; then
|
2005-02-18 13:47:17 +00:00
|
|
|
# setup compiler and things for simulator
|
|
|
|
simcc
|
|
|
|
|
|
|
|
if [ -d "archos" ]; then
|
|
|
|
echo "sub directory archos already present"
|
|
|
|
else
|
|
|
|
mkdir archos
|
|
|
|
echo "created an archos subdirectory for simulating the hard disk"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Now, figure out version number of the (gcc) compiler we are about to use
|
|
|
|
gccver=`$CC -dumpversion`;
|
|
|
|
|
|
|
|
if [ -z "$gccver" ]; then
|
|
|
|
echo "WARNING: The compiler you must use ($CC) is not in your path!"
|
|
|
|
echo "WARNING: this may cause your build to fail since we cannot do the"
|
|
|
|
echo "WARNING: checks we want now."
|
|
|
|
else
|
|
|
|
|
|
|
|
# gccver should now be "3.3.5", "3.4.3", "2.95.3-6" and similar, but don't
|
|
|
|
# DEPEND on it
|
|
|
|
|
|
|
|
num1=`echo $gccver | cut -d . -f1`
|
|
|
|
num2=`echo $gccver | cut -d . -f2`
|
|
|
|
gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
|
|
|
|
|
|
|
|
# This makes:
|
|
|
|
# 3.3.X => 303
|
|
|
|
# 3.4.X => 304
|
|
|
|
# 2.95.3 => 295
|
|
|
|
|
|
|
|
echo "Using $CC $gccver ($gccnum)"
|
|
|
|
|
2005-07-07 08:16:39 +00:00
|
|
|
if test "$gccnum" -ge "400"; then
|
|
|
|
# gcc 4.0 is just *so* much pickier on arguments that differ in signedness
|
|
|
|
# so we ignore that warnings for now
|
|
|
|
# -Wno-pointer-sign
|
|
|
|
GCCOPTS="$GCCOPTS -Wno-pointer-sign"
|
|
|
|
fi
|
|
|
|
|
2002-10-17 09:14:57 +00:00
|
|
|
fi
|
|
|
|
|
2006-05-01 21:21:15 +00:00
|
|
|
# check the compiler for SH platforms
|
|
|
|
if test "$CC" = "sh-elf-gcc"; then
|
|
|
|
if test "$gccnum" -lt "400"; then
|
|
|
|
echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
|
|
|
|
echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
|
|
|
|
else
|
|
|
|
# figure out patch status
|
|
|
|
gccpatch=`$CC --version`;
|
|
|
|
|
|
|
|
if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
|
|
|
|
echo "gcc $gccver is rockbox patched"
|
|
|
|
# then convert -O to -Os to get smaller binaries!
|
2006-05-01 21:34:24 +00:00
|
|
|
GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'`
|
2006-05-01 21:21:15 +00:00
|
|
|
else
|
|
|
|
echo "WARNING: You use an unpatched gcc compiler: $gccver"
|
|
|
|
echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2005-06-01 11:42:51 +00:00
|
|
|
if test "X$ccache" = "Xyes"; then
|
|
|
|
CC="ccache $CC"
|
|
|
|
fi
|
|
|
|
|
2005-04-26 22:41:48 +00:00
|
|
|
if test "X$endian" = "Xbig"; then
|
|
|
|
defendian="ROCKBOX_BIG_ENDIAN"
|
|
|
|
else
|
|
|
|
defendian="ROCKBOX_LITTLE_ENDIAN"
|
|
|
|
fi
|
|
|
|
|
|
|
|
sed > autoconf.h \
|
|
|
|
-e "s,@ENDIAN@,${defendian},g" \
|
2005-05-30 13:00:43 +00:00
|
|
|
-e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \
|
2005-07-14 21:46:07 +00:00
|
|
|
-e "s,@SIMSOUND@,$use_simsound,g" \
|
2005-04-26 22:41:48 +00:00
|
|
|
<<EOF
|
2005-05-07 22:41:17 +00:00
|
|
|
/* This header was made by configure */
|
|
|
|
#ifndef __BUILD_AUTOCONF_H
|
|
|
|
#define __BUILD_AUTOCONF_H
|
|
|
|
|
2005-04-26 22:41:48 +00:00
|
|
|
/* Define endianess for the target or simulator platform */
|
|
|
|
#define @ENDIAN@ 1
|
2005-05-07 22:41:17 +00:00
|
|
|
|
2005-05-30 13:00:43 +00:00
|
|
|
/* Define this if you build rockbox to support the logf logging and display */
|
|
|
|
#undef ROCKBOX_HAS_LOGF
|
|
|
|
|
2005-07-14 21:46:07 +00:00
|
|
|
/* Define this if you have the linux/soundcard.h header and thus can compile
|
|
|
|
the sound-playing code in the X11 sim */
|
|
|
|
@SIMSOUND@
|
|
|
|
|
2005-05-07 22:41:17 +00:00
|
|
|
#endif /* __BUILD_AUTOCONF_H */
|
2005-04-26 22:41:48 +00:00
|
|
|
EOF
|
|
|
|
|
2006-03-07 12:45:45 +00:00
|
|
|
if test -n "$t_cpu"; then
|
|
|
|
TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufactorer/$t_model"
|
|
|
|
TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufactorer"
|
|
|
|
TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
|
|
|
|
GCCOPTS="$GCCOPTS -DTARGET_TREE"
|
|
|
|
fi
|
|
|
|
|
2005-05-23 16:21:46 +00:00
|
|
|
if test "$simulator" = "yes"; then
|
|
|
|
# add simul make stuff on the #SIMUL# line
|
2005-12-05 22:13:55 +00:00
|
|
|
simmagic1="s,@SIMUL1@,@\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
|
|
|
|
simmagic2="s,@SIMUL2@,@\$(MAKE) -C \$(ROOTDIR)/uisimulator/common OBJDIR=\$(BUILDDIR)/comsim,"
|
2005-05-23 16:21:46 +00:00
|
|
|
else
|
2005-12-05 22:13:55 +00:00
|
|
|
# delete the lines that match
|
|
|
|
simmagic1='/@SIMUL1@/D'
|
|
|
|
simmagic2='/@SIMUL2@/D'
|
2005-05-23 16:21:46 +00:00
|
|
|
fi
|
|
|
|
|
2002-05-23 09:39:31 +00:00
|
|
|
sed > Makefile \
|
2004-05-26 11:07:16 +00:00
|
|
|
-e "s,@ROOTDIR@,${rootdir},g" \
|
2002-05-23 09:39:31 +00:00
|
|
|
-e "s,@DEBUG@,${debug},g" \
|
2003-02-26 09:13:47 +00:00
|
|
|
-e "s,@MEMORY@,${memory},g" \
|
2006-01-15 18:20:18 +00:00
|
|
|
-e "s,@TARGET_ID@,${target_id},g" \
|
2002-05-23 09:39:31 +00:00
|
|
|
-e "s,@TARGET@,${target},g" \
|
2003-01-16 14:37:30 +00:00
|
|
|
-e "s,@ARCHOS@,${archos},g" \
|
2002-09-20 06:38:38 +00:00
|
|
|
-e "s,@LANGUAGE@,${language},g" \
|
2002-05-23 09:39:31 +00:00
|
|
|
-e "s,@PWD@,${pwd},g" \
|
2004-09-22 08:58:50 +00:00
|
|
|
-e "s,@CC@,${CC},g" \
|
|
|
|
-e "s,@LD@,${LD},g" \
|
|
|
|
-e "s,@AR@,${AR},g" \
|
|
|
|
-e "s,@AS@,${AS},g" \
|
|
|
|
-e "s,@OC@,${OC},g" \
|
2005-02-18 13:47:17 +00:00
|
|
|
-e "s,@WINDRES@,${WINDRES},g" \
|
|
|
|
-e "s,@DLLTOOL@,${DLLTOOL},g" \
|
|
|
|
-e "s,@DLLWRAP@,${DLLWRAP},g" \
|
|
|
|
-e "s,@RANLIB@,${RANLIB},g" \
|
2004-09-22 08:58:50 +00:00
|
|
|
-e "s,@TOOL@,${tool},g" \
|
2006-01-22 21:30:32 +00:00
|
|
|
-e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \
|
|
|
|
-e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \
|
|
|
|
-e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \
|
|
|
|
-e "s,@BMP2RB_REMOTEMONO@,${bmp2rb_remotemono},g" \
|
2004-09-22 08:58:50 +00:00
|
|
|
-e "s,@OUTPUT@,${output},g" \
|
|
|
|
-e "s,@APPEXTRA@,${appextra},g" \
|
|
|
|
-e "s,@ARCHOSROM@,${archosrom},g" \
|
2004-10-07 08:20:25 +00:00
|
|
|
-e "s,@FLASHFILE@,${flash},g" \
|
2004-09-22 21:40:45 +00:00
|
|
|
-e "s,@PLUGINS@,${plugins},g" \
|
2005-02-16 00:38:31 +00:00
|
|
|
-e "s,@CODECS@,${codecs},g" \
|
2006-01-18 20:54:13 +00:00
|
|
|
-e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
|
2004-10-04 13:02:41 +00:00
|
|
|
-e "s,@GCCOPTS@,${GCCOPTS},g" \
|
2006-03-07 12:45:45 +00:00
|
|
|
-e "s,@TARGET_INC@,${TARGET_INC},g" \
|
2006-01-09 21:43:17 +00:00
|
|
|
-e "s!@LDOPTS@!${LDOPTS}!g" \
|
2005-02-10 22:37:09 +00:00
|
|
|
-e "s,@LOADADDRESS@,${loadaddress},g" \
|
2005-01-29 00:00:47 +00:00
|
|
|
-e "s,@EXTRADEF@,${extradefines},g" \
|
|
|
|
-e "s,@APPSDIR@,${appsdir},g" \
|
2006-02-06 07:25:25 +00:00
|
|
|
-e "s,@FIRMDIR@,${firmdir},g" \
|
|
|
|
-e "s,@TOOLSDIR@,${toolsdir},g" \
|
2005-05-07 23:16:08 +00:00
|
|
|
-e "s,@APPS@,${apps},g" \
|
2005-02-18 13:47:17 +00:00
|
|
|
-e "s,@SIMVER@,${simver},g" \
|
|
|
|
-e "s,@GCCVER@,${gccver},g" \
|
|
|
|
-e "s,@GCCNUM@,${gccnum},g" \
|
2005-02-22 20:00:19 +00:00
|
|
|
-e "s,@UNAME@,${uname},g" \
|
2005-04-26 22:41:48 +00:00
|
|
|
-e "s,@ENDIAN@,${defendian},g" \
|
2005-12-02 08:56:20 +00:00
|
|
|
-e "s,@TOOLSET@,${toolset},g" \
|
2005-12-05 22:13:55 +00:00
|
|
|
-e "${simmagic1}" \
|
|
|
|
-e "${simmagic2}" \
|
2005-02-22 20:00:19 +00:00
|
|
|
<<EOF
|
2005-02-18 13:47:17 +00:00
|
|
|
## Automaticly generated. http://www.rockbox.org/
|
2002-05-23 10:10:44 +00:00
|
|
|
|
2006-02-09 04:27:57 +00:00
|
|
|
ifndef V
|
|
|
|
SILENT=@
|
2006-04-03 21:11:11 +00:00
|
|
|
else
|
|
|
|
VERBOSEOPT=-v
|
2006-02-09 04:27:57 +00:00
|
|
|
endif
|
|
|
|
|
2004-09-22 08:58:50 +00:00
|
|
|
export ROOTDIR=@ROOTDIR@
|
2006-02-06 07:25:25 +00:00
|
|
|
export FIRMDIR=@FIRMDIR@
|
2005-01-29 00:00:47 +00:00
|
|
|
export APPSDIR=@APPSDIR@
|
2006-02-06 07:25:25 +00:00
|
|
|
export TOOLSDIR=@TOOLSDIR@
|
2004-09-22 08:58:50 +00:00
|
|
|
export DOCSDIR=\$(ROOTDIR)/docs
|
2006-02-06 07:25:25 +00:00
|
|
|
export MANUALDIR=\${ROOTDIR}/manual
|
2004-09-22 08:58:50 +00:00
|
|
|
export DEBUG=@DEBUG@
|
|
|
|
export ARCHOS=@ARCHOS@
|
|
|
|
export ARCHOSROM=@ARCHOSROM@
|
2004-10-07 08:20:25 +00:00
|
|
|
export FLASHFILE=@FLASHFILE@
|
2006-01-15 18:20:18 +00:00
|
|
|
export TARGET_ID=@TARGET_ID@
|
2004-09-22 08:58:50 +00:00
|
|
|
export TARGET=@TARGET@
|
|
|
|
export OBJDIR=@PWD@
|
2005-05-07 22:41:17 +00:00
|
|
|
export BUILDDIR=@PWD@
|
2004-09-22 08:58:50 +00:00
|
|
|
export LANGUAGE=@LANGUAGE@
|
|
|
|
export MEMORYSIZE=@MEMORY@
|
|
|
|
export VERSION=\$(shell date +%y%m%d-%H%M)
|
2005-09-06 18:03:50 +00:00
|
|
|
export BUILDDATE=\$(shell date +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
|
2004-10-07 08:08:05 +00:00
|
|
|
export MKFIRMWARE=@TOOL@
|
2006-01-22 21:30:32 +00:00
|
|
|
export BMP2RB_MONO=@BMP2RB_MONO@
|
|
|
|
export BMP2RB_NATIVE=@BMP2RB_NATIVE@
|
|
|
|
export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@
|
|
|
|
export BMP2RB_REMOTENATIVE=@BMP2RB_REMOTENATIVE@
|
2004-09-22 08:58:50 +00:00
|
|
|
export BINARY=@OUTPUT@
|
|
|
|
export APPEXTRA=@APPEXTRA@
|
2004-09-22 21:40:45 +00:00
|
|
|
export ENABLEDPLUGINS=@PLUGINS@
|
2005-02-16 00:38:31 +00:00
|
|
|
export SOFTWARECODECS=@CODECS@
|
2005-01-29 00:00:47 +00:00
|
|
|
export EXTRA_DEFINES=@EXTRADEF@
|
2005-11-21 15:55:34 +00:00
|
|
|
export HOSTCC=gcc
|
2004-09-22 08:58:50 +00:00
|
|
|
export CC=@CC@
|
|
|
|
export LD=@LD@
|
|
|
|
export AR=@AR@
|
|
|
|
export AS=@AS@
|
|
|
|
export OC=@OC@
|
2005-02-18 13:47:17 +00:00
|
|
|
export WINDRES=@WINDRES@
|
|
|
|
export DLLTOOL=@DLLTOOL@
|
|
|
|
export DLLWRAP=@DLLWRAP@
|
|
|
|
export RANLIB=@RANLIB@
|
2006-01-18 20:54:13 +00:00
|
|
|
export PROFILE_OPTS=@PROFILE_OPTS@
|
2004-10-04 13:02:41 +00:00
|
|
|
export GCCOPTS=@GCCOPTS@
|
2006-03-07 12:45:45 +00:00
|
|
|
export TARGET_INC=@TARGET_INC@
|
2005-02-10 22:37:09 +00:00
|
|
|
export LOADADDRESS=@LOADADDRESS@
|
2005-02-18 13:47:17 +00:00
|
|
|
export SIMVER=@SIMVER@
|
|
|
|
export SIMDIR=\$(ROOTDIR)/uisimulator/\$(SIMVER)
|
|
|
|
export LDOPTS=@LDOPTS@
|
|
|
|
export GCCVER=@GCCVER@
|
|
|
|
export GCCNUM=@GCCNUM@
|
2005-02-22 20:00:19 +00:00
|
|
|
export UNAME=@UNAME@
|
2004-09-22 08:58:50 +00:00
|
|
|
|
2005-03-10 22:02:53 +00:00
|
|
|
# Do not print "Entering directory ..."
|
|
|
|
MAKEFLAGS += --no-print-directory
|
|
|
|
|
2006-02-06 07:25:25 +00:00
|
|
|
.PHONY: all clean tags zip tools manual
|
2004-09-22 08:58:50 +00:00
|
|
|
|
2005-12-04 23:25:24 +00:00
|
|
|
all: tools
|
2005-12-05 22:13:55 +00:00
|
|
|
@SIMUL1@
|
|
|
|
@SIMUL2@
|
2006-02-09 04:27:57 +00:00
|
|
|
\$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware
|
|
|
|
\$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@
|
2002-05-24 09:33:37 +00:00
|
|
|
|
2006-02-23 10:16:16 +00:00
|
|
|
veryclean: clean toolsclean
|
|
|
|
|
|
|
|
toolsclean:
|
2006-02-09 04:27:57 +00:00
|
|
|
\$(SILENT)\$(MAKE) -C \$(TOOLSDIR) clean
|
2006-02-23 10:16:16 +00:00
|
|
|
|
|
|
|
clean:
|
2006-02-23 10:02:51 +00:00
|
|
|
\$(SILENT)echo Cleaning build directory
|
|
|
|
\$(SILENT)rm -rf rockbox.zip TAGS @APPS@ firmware comsim sim lang.[ch]\
|
|
|
|
manual *.pdf *.a credits.raw @OUTPUT@ bitmaps pluginbitmaps \
|
2006-07-03 21:15:24 +00:00
|
|
|
@ARCHOSROM@ @FLASHFILE@ UI256.bmp rockbox-full.zip
|
2002-08-15 09:32:59 +00:00
|
|
|
|
2005-11-21 15:55:34 +00:00
|
|
|
tools:
|
2006-02-09 04:27:57 +00:00
|
|
|
\$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) @TOOLSET@
|
2005-11-21 15:55:34 +00:00
|
|
|
|
2002-08-15 09:32:59 +00:00
|
|
|
tags:
|
2006-02-09 04:27:57 +00:00
|
|
|
\$(SILENT)rm -f TAGS
|
|
|
|
\$(SILENT)\$(MAKE) -C \$(FIRMDIR) tags
|
|
|
|
\$(SILENT)\$(MAKE) -C \$(APPSDIR) tags
|
|
|
|
\$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins tags
|
|
|
|
\$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins/lib tags
|
2004-05-21 19:05:47 +00:00
|
|
|
|
2006-05-10 21:57:08 +00:00
|
|
|
fontzip:
|
|
|
|
\$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\" -r "\$(ROOTDIR)" -f 1 -o rockbox-fonts.zip \$(TARGET) \$(BINARY)
|
|
|
|
|
2005-03-03 07:31:39 +00:00
|
|
|
zip:
|
2006-04-03 21:11:11 +00:00
|
|
|
\$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
|
2005-12-13 10:58:07 +00:00
|
|
|
|
2006-05-10 21:57:08 +00:00
|
|
|
fullzip:
|
|
|
|
\$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\" -r "\$(ROOTDIR)" -f 2 -o rockbox-full.zip \$(TARGET) \$(BINARY)
|
|
|
|
|
2005-12-13 10:58:07 +00:00
|
|
|
7zip:
|
2006-04-03 21:47:18 +00:00
|
|
|
\$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\" -o "rockbox.7z" -z "7za a" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
|
2006-02-06 07:25:25 +00:00
|
|
|
|
2006-03-19 06:57:59 +00:00
|
|
|
tar:
|
|
|
|
\$(SILENT)rm -f rockbox.tar
|
2006-04-03 21:47:18 +00:00
|
|
|
\$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\" -o "rockbox.tar" -z "tar --no-recursion -uf" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
|
2006-03-19 06:57:59 +00:00
|
|
|
|
|
|
|
bzip2: tar
|
|
|
|
\$(SILENT)bzip2 -f9 rockbox.tar
|
|
|
|
|
|
|
|
gzip: tar
|
|
|
|
\$(SILENT)gzip -f9 rockbox.tar
|
|
|
|
|
2006-02-06 07:25:25 +00:00
|
|
|
manual:
|
2006-02-09 04:27:57 +00:00
|
|
|
\$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual buildmanual
|
2006-02-06 07:25:25 +00:00
|
|
|
|
2006-03-19 06:57:59 +00:00
|
|
|
help:
|
|
|
|
@echo "A few helpful make targets"
|
|
|
|
@echo ""
|
|
|
|
@echo "all - builds a full Rockbox (default), including tools"
|
|
|
|
@echo "clean - cleans a build directory (not tools)"
|
|
|
|
@echo "veryclean - cleans the build and tools directories"
|
|
|
|
@echo "manual - builds a manual"
|
2006-05-10 21:57:08 +00:00
|
|
|
@echo "fullzip - creates a rockbox.zip of your build with fonts"
|
|
|
|
@echo "zip - creates a rockbox.zip of your build (no fonts)"
|
|
|
|
@echo "gzip - creates a rockbox.tar.gz of your build (no fonts)"
|
|
|
|
@echo "bzip2 - creates a rockbox.tar.bz2 of your build (no fonts)"
|
|
|
|
@echo "7zip - creates a rockbox.7z of your build (no fonts)"
|
|
|
|
@echo "fontzip - creates rockbox-fonts.zip"
|
2006-03-19 06:57:59 +00:00
|
|
|
@echo "tools - builds the tools only"
|
|
|
|
@echo "install - installs your build (for simulator builds only)"
|
|
|
|
|
2005-02-18 13:47:17 +00:00
|
|
|
EOF
|
|
|
|
|
|
|
|
if [ "yes" = "$simulator" ]; then
|
|
|
|
|
|
|
|
cat >> Makefile <<EOF
|
|
|
|
|
|
|
|
install:
|
|
|
|
@echo "installing a full setup in your archos dir"
|
2006-05-20 11:26:19 +00:00
|
|
|
@(\$(MAKE) fullzip && cd archos && unzip -oq ../rockbox-full.zip)
|
2002-05-23 09:11:35 +00:00
|
|
|
EOF
|
2002-05-23 09:39:31 +00:00
|
|
|
|
2005-02-18 13:47:17 +00:00
|
|
|
fi
|
|
|
|
|
2002-05-23 09:39:31 +00:00
|
|
|
echo "Created Makefile"
|