Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android-sdk/install.sh =================================================================== --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android-sdk/install.sh (revision 12578) +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android-sdk/install.sh (revision 12579) @@ -1,5 +1,6 @@ #This installs the Android SDK (Software Development Kit) #which is needed for the compilation of the Java project. +source $ANDROID_DIR/android_variables.sh step=1; @@ -10,24 +11,29 @@ #4: cleanup present_dir=`pwd`; -default_droid="Android-4.0" sd_card="issm-sdcard" +((tmp=$1- 3)) + +if [[ $tmp -ge "-2" && $tmp -le "3" ]]; then + step=$1 +else + echo "Using default step: " $step +fi + if [[ $step == "1" ]]; then #Cleanup the install rm -rf install-sdk install-ant #Download from ISSM server - $ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/android-sdk_r18-macosx.zip' 'android-sdk_r18-macosx.zip' + $ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/android-sdk_r'$sdk_rev'-macosx.zip' 'android-sdk_r'${sdk_rev}'-macosx.zip' # Install Android SDK and NDK. - unzip -o android-sdk_r18-macosx.zip - unzip -o apache-ant-1.8.2-bin.zip + unzip -o android-sdk_r${sdk_rev}-macosx.zip #Move to install mv -f android-sdk-macosx install-sdk - mv -f apache-ant-1.8.2 install-ant #Post_install configuration: #We need specific settings for specific platforms, for the SDK to @@ -35,10 +41,10 @@ #For now, we need to install: #android sdk platform tools - #and a specific android api: API 15 and API 14 - #Note: API 15 and 14 correspond to Android 4.0.3 and 4.0 respectively. + #and a specific android api: API 16, API 15 and API 14 + #Note: API 16, API 15 and 14 correspond to Android 4.1, 4.0.3 and 4.0 respectively. - cd install-sdk/tools/ && source ./android update sdk -t platform-tools,android-15,android-14,system-image --no-ui + cd install-sdk/tools/ && source ./android update sdk -t platform-tool,${api_levels},system-image --no-ui fi Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android_variables.sh =================================================================== --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android_variables.sh (revision 0) +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android_variables.sh (revision 12579) @@ -0,0 +1,5 @@ +sdk_rev=20 +ndk_rev=8 +api_levels="android-14,android-15,android-16" +default_droid="android-4.1" +toolchain_path=${ANDROID_DIR}"/arm-linux-"${default_droid}"/bin/arm-linux-androideabi" Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android-ndk/install.sh =================================================================== --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android-ndk/install.sh (revision 12578) +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android-ndk/install.sh (revision 12579) @@ -2,23 +2,26 @@ #which is needed for the compilation of C/C++ code into the #native architecture of the Android device. -#The android-ndk-r7b-darwin-x86.tar.bz2 dummy.tar.bz2 file was downloaded +#The android-ndk-r8-darwin-x86.tar.bz2 ndk.tar.bz2 file was downloaded #from the android developer website: +source $ANDROID_DIR/android_variables.sh #Cleanup the install rm -rf install -rm -rf $ANDROID_DIR/arm-linux-android-4.0 +rm -rf $ANDROID_DIR/arm-linux-android-${default_droid} #Download from ISSM server -$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/android-ndk-r7b-darwin-x86.tar.bz2' 'dummy.tar.bz2' +$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/android-ndk-r'${ndk_rev}'-darwin-x86.tar.bz2' 'ndk.tar.bz2' # Install Android SDK and NDK. -bunzip2 dummy.tar.bz2 -tar -xvf dummy.tar -rm -rf dummy.tar dummy.tar.bz2 +bunzip2 ndk.tar.bz2 +tar -xvf ndk.tar +rm -rf ndk.tar ndk.tar.bz2 #Move to install -mv android-ndk-r7b install +mv android-ndk-r${ndk_rev} install #Create Standalone Development Directory -$ANDROID_NDK_DIR/build/tools/make-standalone-toolchain.sh --platform=android-5 --install-dir=$ANDROID_DIR/arm-linux-android-4.0 +#Note: API-14 corresponds to Android 4.0 although we are +#calling our toolchain 4.1 to agree with our device. +$ANDROID_NDK_DIR/build/tools/make-standalone-toolchain.sh --platform=android-14 --install-dir=$ANDROID_DIR/arm-linux-${default_droid} Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/gsl/install-android-4.0.sh =================================================================== --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/gsl/install-android-4.0.sh (revision 12578) +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/gsl/install-android-4.0.sh (revision 12579) @@ -1,38 +0,0 @@ -#!/bin/bash - -#Some cleanup -rm -rf src install gsl-1.15 -mkdir src install - -#Download from ISSM server -$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/gsl-1.15.tar.gz' 'gsl-1.15.tar.gz' - -#Untar -tar -zxvf gsl-1.15.tar.gz - -#Move gsl into src directory -mv gsl-1.15/* src -rm -rf gsl-1.15 - -#Configure gsl -cd src - -./configure \ - CC=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-gcc\ - LD=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-ld\ - AR=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-ar\ - RANLIB=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-ranlib\ - NM=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-nm\ - OBJ_EXT=o\ - LIB_EXT=a\ - --host="arm-linux"\ - --prefix="$ISSM_DIR/externalpackages/gsl/install" - -#Compile gsl -if [ -z $1 ]; then - make -else - make -j $1 -fi - -make install Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/gsl/install-android.sh =================================================================== --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/gsl/install-android.sh (revision 0) +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/gsl/install-android.sh (revision 12579) @@ -0,0 +1,39 @@ +#!/bin/bash +source $ANDROID_DIR/android_variables.sh + +#Some cleanup +rm -rf src install gsl-1.15 +mkdir src install + +#Download from ISSM server +$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/gsl-1.15.tar.gz' 'gsl-1.15.tar.gz' + +#Untar +tar -zxvf gsl-1.15.tar.gz + +#Move gsl into src directory +mv gsl-1.15/* src +rm -rf gsl-1.15 + +#Configure gsl +cd src + +./configure \ + CC=${toolchain_path}-gcc\ + LD=${toolchain_path}-ld\ + AR=${toolchain_path}-ar\ + RANLIB=${toolchain_path}-ranlib\ + NM=${toolchain_path}-nm\ + OBJ_EXT=o\ + LIB_EXT=a\ + --host="arm-linux"\ + --prefix="$ISSM_DIR/externalpackages/gsl/install" + +#Compile gsl +if [ -z $1 ]; then + make +else + make -j $1 +fi + +make install Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/gsl/install-android.sh ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-android-4.0.sh =================================================================== --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-android-4.0.sh (revision 12578) +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-android-4.0.sh (revision 12579) @@ -1,33 +0,0 @@ -#!/bin/bash - -#use matlab? -matlab=0 - -#Some cleanup -rm -rf install triangle -mkdir install - -#Download from ISSM server -$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/triangle.zip' 'triangle.zip' - -#Untar -cd install -cp ../triangle.zip ./ -unzip triangle.zip - -#copy new makefile -cp ../configs/android/android-4.0/configure.make ./ -cp ../makefile ./ - -#Patch triangle.c -if [[ $matlab == "1" ]];then - patch triangle.c ../triangle.c.patch.matlab -else - patch triangle.c ../triangle.c.patch.python -fi - -#Compile triangle -make - -#Patch triangle.h -patch triangle.h ../triangle.h.patch Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/configs/android/android-4.0/configure.make =================================================================== --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/configs/android/android-4.0/configure.make (revision 12578) +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/configs/android/android-4.0/configure.make (revision 12579) @@ -1,19 +0,0 @@ -# This makefile configures build process to cross-compile to the android platform. -# The binary tools referenced below are specifically configuered to target armeabi-v7a. -# Furthermore, the compilers (which are simply wrappers around GNU GCC) are set to -# produce binaries that are EABI complient. -# -# Note that the AAPCS standard defines 'EABI' as a moniker used to specify -# a _family_ of similar but distinct ABIs. Android follows the little-endian -# ARM GNU/Linux ABI as documented in the following document: -# -# http://www.codesourcery.com/gnu_toolchains/arm/arm_gnu_linux_abi.pdf - -ANDROID_BIN=$(ISSM_TIER)/src/android/tmp/android-14-toolchain/bin -CC=$(ANDROID_DIR)/arm-linux-android-4.0/bin/arm-linux-androideabi-gcc -AR=$(ANDROID_DIR)/arm-linux-android-4.0/bin/arm-linux-androideabi-ar -RANLIB=$(ANDROID_DIR)/arm-linux-android-4.0/bin/arm-linux-androideabi-ranlib -CSWITCHES = $(CFLAGS) -TRILIBDEFS = -DTRILIBRARY -OBJ_EXT=o -LIB_EXT=a Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/configs/android/configure.make =================================================================== --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/configs/android/configure.make (revision 0) +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/configs/android/configure.make (revision 12579) @@ -0,0 +1,17 @@ +# This makefile configures build process to cross-compile to the android platform. +# The binary tools referenced below are specifically configuered to target armeabi-v7a. +# Furthermore, the compilers (which are simply wrappers around GNU GCC) are set to +# produce binaries that are EABI complient. +# +# Note that the AAPCS standard defines 'EABI' as a moniker used to specify +# a _family_ of similar but distinct ABIs. Android follows the little-endian +# ARM GNU/Linux ABI as documented in the following document: +# +# http://www.codesourcery.com/gnu_toolchains/arm/arm_gnu_linux_abi.pdf +CC=${toolchain_path}-gcc +AR=${toolchain_path}-ar +RANLIB=${toolchain_path}-ranlib +CSWITCHES = $(CFLAGS) +TRILIBDEFS = -DTRILIBRARY +OBJ_EXT=o +LIB_EXT=a Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-android.sh =================================================================== --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-android.sh (revision 0) +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-android.sh (revision 12579) @@ -0,0 +1,35 @@ +#!/bin/bash +source $ANDROID_DIR/android_variables.sh +export toolchain_path + +#use matlab? +matlab=0 + +#Some cleanup +rm -rf install triangle +mkdir install + +#Download from ISSM server +$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/triangle.zip' 'triangle.zip' + +#Untar +cd install +cp ../triangle.zip ./ +unzip triangle.zip + +#copy new makefile +cp ../configs//android/configure.make ./ +cp ../makefile ./ + +#Patch triangle.c +if [[ $matlab == "1" ]];then + patch triangle.c ../triangle.c.patch.matlab +else + patch triangle.c ../triangle.c.patch.python +fi + +#Compile triangle +make + +#Patch triangle.h +patch triangle.h ../triangle.h.patch