summaryrefslogtreecommitdiff
path: root/tools/configure
diff options
context:
space:
mode:
Diffstat (limited to 'tools/configure')
-rwxr-xr-xtools/configure83
1 files changed, 66 insertions, 17 deletions
diff --git a/tools/configure b/tools/configure
index 20b9095f73..2dd1bf3e12 100755
--- a/tools/configure
+++ b/tools/configure
@@ -726,6 +726,58 @@ androidcc () {
726 prefixtools $gcctarget 726 prefixtools $gcctarget
727} 727}
728 728
729androidndkcc()
730{
731 if ! [ -d "$ANDROID_NDK_PATH" ]; then
732 echo "ERROR: You need the Android NDK installed (r16 or higher) and have the ANDROID_NDK_PATH"
733 echo "environment variable point to the root directory of the Android NDK."
734 exit
735 fi
736
737 make_toolchain="${ANDROID_NDK_PATH}/build/tools/make-standalone-toolchain.sh"
738
739 if ! [ -e "${make_toolchain}" ]; then
740 echo "ERROR: ${make_toolchain} could not be found."
741 exit
742 fi
743
744 buildhost=$(uname -s | tr "[:upper:]" "[:lower:]")
745 buildhost="${buildhost}-$(uname -m)"
746
747 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
748 LDOPTS="$LDOPTS -ldl -llog"
749 SHARED_LDFLAG="-shared"
750 SHARED_CFLAGS=''
751 GLOBAL_LDOPTS="-Wl,-z,defs -Wl,-z,noexecstack"
752
753 # arch dependant stuff
754 case $1 in
755 armeabi)
756 endian="little"
757 gccchoice="4.6"
758 gcctarget="arm-linux-androideabi-"
759 echo "${make_toolchain} --system=${buildhost} --toolchain=arm-linux-androideabi-4.6 --platform=android-16 --install-dir=${pwd}/android-toolchain"
760 ${make_toolchain} --system=${buildhost} --toolchain=arm-linux-androideabi-4.6 --platform=android-16 --install-dir=${pwd}/android-toolchain
761 if [ ${?} != 0 ]; then
762 exit
763 fi
764 GCCOPTS="$GCCOPTS -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer --sysroot=${pwd}/android-toolchain/sysroot"
765 LDOPTS="$LDOPTS --sysroot=${pwd}/android-toolchain/sysroot"
766 ;;
767 *)
768 echo "ERROR: androidndkcc(): Unknown target architecture"
769 exit
770 ;;
771 esac
772
773 echo "Using endian ${endian}"
774 echo "Using gccchoice ${gccchoice}"
775 echo "Using gcctarget ${gcctarget}"
776
777 PATH=$PATH:${pwd}/android-toolchain/bin
778 prefixtools $gcctarget
779}
780
729whichadvanced () { 781whichadvanced () {
730 atype=`echo "$1" | cut -c 2-` 782 atype=`echo "$1" | cut -c 2-`
731 ################################################################## 783 ##################################################################
@@ -3751,26 +3803,24 @@ fi
3751 target_id=94 3803 target_id=94
3752 modelname="ibassodx50" 3804 modelname="ibassodx50"
3753 target="DX50" 3805 target="DX50"
3754 app_type="android_standalone" 3806 app_type="android_ndk"
3755 lcd_orientation="landscape" 3807 lcd_orientation="landscape"
3756 sharedir="/system/rockbox/app_rockbox/rockbox" 3808 # Actually 408260kB
3757 bindir="/system/rockbox/lib" 3809 memory=256
3758 libdir="/system/rockbox/app_rockbox"
3759 memory=32
3760 uname=`uname` 3810 uname=`uname`
3761 androidcc armeabi 3811 androidndkcc armeabi
3762 tool="cp " 3812 tool="cp "
3763 boottool="cp " 3813 boottool="cp "
3764 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3814 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3765 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3815 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3766 output="rockbox" 3816 output="rockbox"
3767 bootoutput="rockbox" 3817 bootoutput="rockbox"
3768 appextra="recorder:gui:radio:hosted/android" 3818 appextra="recorder:gui:hosted"
3769 plugins="yes" 3819 plugins="yes"
3770 swcodec="yes" 3820 swcodec="yes"
3771 # architecture, manufacturer and model for the target-tree build 3821 # architecture, manufacturer and model for the target-tree build
3772 t_cpu="hosted" 3822 t_cpu="hosted"
3773 t_manufacturer="android" 3823 t_manufacturer="ibasso"
3774 t_model="dx50" 3824 t_model="dx50"
3775 ;; 3825 ;;
3776 3826
@@ -3779,27 +3829,24 @@ fi
3779 target_id=95 3829 target_id=95
3780 modelname="ibassodx90" 3830 modelname="ibassodx90"
3781 target="DX90" 3831 target="DX90"
3782 app_type="android_standalone" 3832 app_type="android_ndk"
3783 lcd_orientation="landscape" 3833 lcd_orientation="landscape"
3784 sharedir="/system/rockbox/app_rockbox/rockbox" 3834 memory=256
3785 bindir="/system/rockbox/lib"
3786 libdir="/system/rockbox/app_rockbox"
3787 memory=32
3788 uname=`uname` 3835 uname=`uname`
3789 androidcc armeabi 3836 androidndkcc armeabi
3790 tool="cp " 3837 tool="cp "
3791 boottool="cp " 3838 boottool="cp "
3792 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3839 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3793 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3840 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3794 output="rockbox" 3841 output="rockbox"
3795 bootoutput="rockbox" 3842 bootoutput="rockbox"
3796 appextra="recorder:gui:radio:hosted/android" 3843 appextra="recorder:gui:hosted"
3797 plugins="yes" 3844 plugins="yes"
3798 swcodec="yes" 3845 swcodec="yes"
3799 # architecture, manufacturer and model for the target-tree build 3846 # architecture, manufacturer and model for the target-tree build
3800 t_cpu="hosted" 3847 t_cpu="hosted"
3801 t_manufacturer="android" 3848 t_manufacturer="ibasso"
3802 t_model="dx50" 3849 t_model="dx90"
3803 ;; 3850 ;;
3804 3851
3805 *) 3852 *)
@@ -4333,6 +4380,8 @@ if test -n "$t_cpu"; then
4333 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree 4380 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
4334 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl" 4381 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
4335 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted" 4382 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
4383 elif [ "$t_manufacturer" = "ibasso" ]; then
4384 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/ibasso/tinyalsa/include"
4336 fi 4385 fi
4337 4386
4338 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer" 4387 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"