blob: 9cda4afaf037f1be593cab32629b9c1b1c37f55a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
#!/bin/bash
#
# build all of uscxml for android
#
# exit on error
set -e
ME=`basename $0`
DIR="$( cd "$( dirname "$0" )" && pwd )"
CWD=`pwd`
BUILD_DIR="/tmp/build-uscxml-android"
rm -rf ${BUILD_DIR} && mkdir -p ${BUILD_DIR} &> /dev/null
cd ${BUILD_DIR}
if [ ! -d "${ANDROID_NDK}" ]; then
echo
echo No Android NDK at ${ANDROID_NDK}
echo export ANDROID_NDK as the NDK root
echo
exit
fi
echo
echo Using Android NDK at ${ANDROID_NDK}
echo
#. ${DIR}/find-android-ndk.sh
# ANDROID_ABI=armeabi-v7a - specifies the target Application Binary
# Interface (ABI). This option nearly matches to the APP_ABI variable
# used by ndk-build tool from Android NDK.
#
# Possible targets are:
# "armeabi" - matches to the NDK ABI with the same name.
# See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
# "armeabi-v7a" - matches to the NDK ABI with the same name.
# See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
# "armeabi-v7a with NEON" - same as armeabi-v7a, but
# sets NEON as floating-point unit
# "armeabi-v7a with VFPV3" - same as armeabi-v7a, but
# sets VFPV3 as floating-point unit (has 32 registers instead of 16).
# "armeabi-v6 with VFP" - tuned for ARMv6 processors having VFP.
# "x86" - matches to the NDK ABI with the same name.
# See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
# "mips" - matches to the NDK ABI with the same name
# (not testes on real devices)
mkdir -p ${BUILD_DIR} &> /dev/null
cd ${BUILD_DIR}
rm -rf *
cmake ${DIR}/../../ \
-DCMAKE_TOOLCHAIN_FILE=${DIR}/../cmake/CrossCompile-Android.cmake \
-DBUILD_SHARED_LIBS=OFF \
-DANDROID_ABI="armeabi" \
-DCMAKE_BUILD_TYPE=Debug
make -j2
make -j2 java
rm -rf *
cmake ${DIR}/../../ \
-DCMAKE_TOOLCHAIN_FILE=${DIR}/../cmake/CrossCompile-Android.cmake \
-DBUILD_SHARED_LIBS=OFF \
-DANDROID_ABI="armeabi" \
-DCMAKE_BUILD_TYPE=Release
make -j2
make -j2 java
rm -rf *
cmake ${DIR}/../../ \
-DCMAKE_TOOLCHAIN_FILE=${DIR}/../cmake/CrossCompile-Android.cmake \
-DBUILD_SHARED_LIBS=OFF \
-DANDROID_ABI="x86" \
-DCMAKE_BUILD_TYPE=Debug
make -j2
make -j2 java
rm -rf *
cmake ${DIR}/../../ \
-DCMAKE_TOOLCHAIN_FILE=${DIR}/../cmake/CrossCompile-Android.cmake \
-DBUILD_SHARED_LIBS=OFF \
-DANDROID_ABI="x86" \
-DCMAKE_BUILD_TYPE=Release
make -j2
make -j2 java
|