1# Default values used by several dev-scripts. 2# 3 4# Current list of platform levels we support 5# 6# Note: levels 6 and 7 are omitted since they have the same native 7# APIs as level 5. Same for levels 10, 11 and 12 8# 9API_LEVELS="3 4 5 8 9 14" 10 11# Default ABIs for the target prebuilt binaries. 12PREBUILT_ABIS="armeabi armeabi-v7a x86 mips" 13 14# Location of the STLport sources, relative to the NDK root directory 15STLPORT_SUBDIR=sources/cxx-stl/stlport 16 17# Location of the GAbi++ sources, relative to the NDK root directory 18GABIXX_SUBDIR=sources/cxx-stl/gabi++ 19 20# Location of the GNU libstdc++ headers and libraries, relative to the NDK 21# root directory. 22GNUSTL_SUBDIR=sources/cxx-stl/gnu-libstdc++ 23 24# The date to use when downloading toolchain sources from AOSP servers 25# Leave it empty for tip of tree. 26TOOLCHAIN_GIT_DATE=2012-04-19 27 28# The space-separated list of all GCC versions we support in this NDK 29DEFAULT_GCC_VERSION_LIST="4.4.3" 30 31# The default GCC version for this NDK, i.e. the first item in 32# $DEFAULT_GCC_VERSION_LIST 33# 34DEFAULT_GCC_VERSION=$(echo "$DEFAULT_GCC_VERSION_LIST" | tr ' ' '\n' | head -n 1) 35 36DEFAULT_BINUTILS_VERSION=2.19 37DEFAULT_GDB_VERSION=6.6 38DEFAULT_MPFR_VERSION=2.4.1 39DEFAULT_GMP_VERSION=4.2.4 40DEFAULT_MPC_VERSION=0.8.1 41 42# Default platform to build target binaries against. 43DEFAULT_PLATFORM=android-9 44 45# The list of default CPU architectures we support 46DEFAULT_ARCHS="arm x86 mips" 47 48# Default toolchain names and prefix 49# 50# This is used by get_default_toolchain_name_for_arch and get_default_toolchain_prefix_for_arch 51# defined below 52DEFAULT_ARCH_TOOLCHAIN_NAME_arm=arm-linux-androideabi 53DEFAULT_ARCH_TOOLCHAIN_PREFIX_arm=arm-linux-androideabi 54 55DEFAULT_ARCH_TOOLCHAIN_NAME_x86=x86 56DEFAULT_ARCH_TOOLCHAIN_PREFIX_x86=i686-android-linux 57 58DEFAULT_ARCH_TOOLCHAIN_NAME_mips=mipsel-linux-android 59DEFAULT_ARCH_TOOLCHAIN_PREFIX_mips=mipsel-linux-android 60 61# The list of default host NDK systems we support 62DEFAULT_SYSTEMS="linux-x86 windows darwin-x86" 63 64# Return default NDK ABI for a given architecture name 65# $1: Architecture name 66# Out: ABI name 67get_default_abi_for_arch () 68{ 69 local RET 70 case $1 in 71 arm) 72 RET="armeabi" 73 ;; 74 x86) 75 RET="x86" 76 ;; 77 mips) 78 RET="mips" 79 ;; 80 *) 81 2> echo "ERROR: Unsupported architecture name: $1, use one of: arm x86 mips" 82 exit 1 83 ;; 84 esac 85 echo "$RET" 86} 87 88 89# Retrieve the list of default ABIs supported by a given architecture 90# $1: Architecture name 91# Out: space-separated list of ABI names 92get_default_abis_for_arch () 93{ 94 local RET 95 case $1 in 96 arm) 97 RET="armeabi armeabi-v7a" 98 ;; 99 x86) 100 RET="x86" 101 ;; 102 mips) 103 RET="mips" 104 ;; 105 *) 106 2> echo "ERROR: Unsupported architecture name: $1, use one of: arm x86 mips" 107 exit 1 108 ;; 109 esac 110 echo "$RET" 111} 112 113 114# Return the default name for a given architecture 115# $1: Architecture name (e.g. 'arm') 116# Out: default arch-specific toolchain name (e.g. 'arm-linux-androideabi-$GCC_VERSION') 117# Return empty for unknown arch 118get_default_toolchain_name_for_arch () 119{ 120 eval echo \"\${DEFAULT_ARCH_TOOLCHAIN_NAME_$1}-$DEFAULT_GCC_VERSION\" 121} 122 123# Return the default toolchain program prefix for a given architecture 124# $1: Architecture name 125# Out: default arch-specific toolchain prefix (e.g. arm-linux-androideabi) 126# Return empty for unknown arch 127get_default_toolchain_prefix_for_arch () 128{ 129 eval echo "\$DEFAULT_ARCH_TOOLCHAIN_PREFIX_$1" 130} 131 132# Get the list of all toolchain names for a given architecture 133# $1: architecture (e.g. 'arm') 134# Out: list of toolchain names for this arch (e.g. arm-linux-androideabi-4.6 arm-linux-androideabi-4.4.3) 135# Return empty for unknown arch 136get_toolchain_name_list_for_arch () 137{ 138 local PREFIX VERSION RET 139 PREFIX=$(eval echo \"\$DEFAULT_ARCH_TOOLCHAIN_NAME_$1\") 140 if [ -z "$PREFIX" ]; then 141 return 0 142 fi 143 RET="" 144 for VERSION in $DEFAULT_GCC_VERSION_LIST; do 145 RET=$RET" $PREFIX-$VERSION" 146 done 147 RET=${RET## } 148 echo "$RET" 149} 150