Scripts for building ICU for Android.

[CL 2251958 by Saul Abreu in Main branch]
This commit is contained in:
Saul Abreu
2014-08-11 17:26:59 -04:00
committed by UnrealBot
parent 1f8aa5c495
commit 81bdee57d5
5 changed files with 88 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
@echo off
REM Batch file for configuring Android platforms of ICU
REM Run this from the ICU directory
setlocal
set CYGWIN=winsymlinks:native
REM Android Configs
if not exist ./Android mkdir Android
cd ./Android
REM ARMv7 Config
if not exist ./ARMv7 mkdir ARMv7
cd ./ARMv7
set PATH=%PATH%;%NDKROOT%\toolchains\llvm-3.3\prebuilt\windows-x86_64\bin\;%NDKROOT%\toolchains\arm-linux-androideabi-4.8\prebuilt\windows-x86_64\bin\;%NDKROOT%\toolchains\arm-linux-androideabi-4.8\prebuilt\windows-x86_64\arm-linux-androideabi\bin\
bash -c '../../ConfigForAndroid-Debug.sh'
cd ../
REM Back to root
cd ../
endlocal

View File

@@ -0,0 +1,21 @@
@echo off
REM Batch file for configuring Android platforms of ICU
REM Run this from the ICU directory
setlocal
set CYGWIN=winsymlinks:native
REM Android Configs
if not exist ./Android mkdir Android
cd ./Android
REM ARMv7 Config
if not exist ./ARMv7 mkdir ARMv7
cd ./ARMv7
set PATH=%PATH%;%NDKROOT%\toolchains\llvm-3.3\prebuilt\windows-x86_64\bin\;%NDKROOT%\toolchains\arm-linux-androideabi-4.8\prebuilt\windows-x86_64\bin\;%NDKROOT%\toolchains\arm-linux-androideabi-4.8\prebuilt\windows-x86_64\arm-linux-androideabi\bin\
bash -c '../../ConfigForAndroid-Release.sh'
cd ../
REM Back to root
cd ../
endlocal

View File

@@ -0,0 +1,10 @@
SYSROOT=$NDKROOT/platforms/android-19/arch-arm
GCCTOOLCHAIN=$NDKROOT/toolchains/arm-linux-androideabi-4.8/prebuilt/windows-x86_64
GNUSTL=$NDKROOT/sources/cxx-stl/gnu-libstdc++/4.8
COMMONTOOLCHAINFLAGS="-target armv7a-none-linux-androideabi --sysroot=$SYSROOT -gcc-toolchain $GCCTOOLCHAIN"
COMMONCOMPILERFLAGS="-fdiagnostics-format=msvc -fPIC -fno-exceptions -frtti -fno-short-enums -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fsigned-char"
export CFLAGS="$COMMONTOOLCHAINFLAGS $COMMONCOMPILERFLAGS -x c"
export CXXFLAGS="$COMMONTOOLCHAINFLAGS $COMMONCOMPILERFLAGS -x c++ -std=c++11"
export CPPFLAGS="$COMMONTOOLCHAINFLAGS -DUCONFIG_NO_TRANSLITERATION=1 -DPIC -DU_HAVE_NL_LANGINFO_CODESET=0 -DU_TIMEZONE=0 -I$GNUSTL/include -I$GNUSTL/libs/armeabi-v7a/include"
export LDFLAGS="$COMMONTOOLCHAINFLAGS -nostdlib -Wl,-shared,-Bsymbolic -Wl,--no-undefined -lgnustl_shared -lc -lgcc -L$GNUSTL/libs/armeabi-v7a -march=armv7-a -Wl,--fix-cortex-a8"
../../Source/configure --prefix=$PWD --build=x86_64-unknown-cygwin --with-cross-build=$PWD/../../Win64/VS2013 --host=armv7a-none-linux-androideabi --enable-debug --disable-release --enable-static --disable-shared --disable-extras --disable-samples --disable-tools --with-data-packaging=files

View File

@@ -0,0 +1,10 @@
SYSROOT=$NDKROOT/platforms/android-19/arch-arm
GCCTOOLCHAIN=$NDKROOT/toolchains/arm-linux-androideabi-4.8/prebuilt/windows-x86_64
GNUSTL=$NDKROOT/sources/cxx-stl/gnu-libstdc++/4.8
COMMONTOOLCHAINFLAGS="-target armv7a-none-linux-androideabi --sysroot=$SYSROOT -gcc-toolchain $GCCTOOLCHAIN"
COMMONCOMPILERFLAGS="-fdiagnostics-format=msvc -fPIC -fno-exceptions -frtti -fno-short-enums -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fsigned-char"
export CFLAGS="$COMMONTOOLCHAINFLAGS $COMMONCOMPILERFLAGS -x c"
export CXXFLAGS="$COMMONTOOLCHAINFLAGS $COMMONCOMPILERFLAGS -x c++ -std=c++11"
export CPPFLAGS="$COMMONTOOLCHAINFLAGS -DUCONFIG_NO_TRANSLITERATION=1 -DPIC -DU_HAVE_NL_LANGINFO_CODESET=0 -DU_TIMEZONE=0 -I$GNUSTL/include -I$GNUSTL/libs/armeabi-v7a/include"
export LDFLAGS="$COMMONTOOLCHAINFLAGS -nostdlib -Wl,-shared,-Bsymbolic -Wl,--no-undefined -lgnustl_shared -lc -lgcc -L$GNUSTL/libs/armeabi-v7a -march=armv7-a -Wl,--fix-cortex-a8"
../../Source/configure --prefix=$PWD --build=x86_64-unknown-cygwin --with-cross-build=$PWD/../../Win64/VS2013 --host=armv7a-none-linux-androideabi --disable-debug --enable-release --enable-static --disable-shared --disable-extras --disable-samples --disable-tools --with-data-packaging=files

View File

@@ -0,0 +1,26 @@
@echo off
REM Batch file for configuring Android platforms of ICU
REM Run this from the ICU directory
setlocal
set CYGWIN=winsymlinks:native
REM Android Configs
if not exist ./Android (
echo Error: Android directory does not exist. Did you forget to run configuration?
goto:eof)
cd ./Android
REM ARMv7 Make
if not exist ./ARMv7 (
echo Error: ARMv7 directory does not exist. Did you forget to run configuration?
goto:eof)
cd ./ARMv7
set PATH=%PATH%;%NDKROOT%\toolchains\llvm-3.3\prebuilt\windows-x86_64\bin\;%NDKROOT%\toolchains\arm-linux-androideabi-4.8\prebuilt\windows-x86_64\bin\;%NDKROOT%\toolchains\arm-linux-androideabi-4.8\prebuilt\windows-x86_64\arm-linux-androideabi\bin\
bash -c 'make clean'
bash -c 'make all'
cd ../
REM Back to root
cd ../
endlocal