Skip to content

Commit a6d6476

Browse files
authored
Update launcher.sh
1 parent 5afa31f commit a6d6476

File tree

1 file changed

+24
-14
lines changed

1 file changed

+24
-14
lines changed

launcher.sh

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,6 @@ ANDROID_API=$1
99
# Can be android-arm, android-arm64, android-x86, android-x86 etc
1010
architecture=$2
1111

12-
if [[ "$architecture" == android-arm ]]
13-
then arcName=arm-linux-androideabi
14-
elif [[ "$architecture" == android-arm64 ]]
15-
then arcName=aarch64-linux-android
16-
elif [[ "$architecture" == android-x86 ]]
17-
then arcName=i686-linux-android
18-
elif [[ "$architecture" == android-x86_64 ]]
19-
then arcName=x86_64-linux-android
20-
else
21-
arcName="$architecture"
22-
fi
23-
2412
# Set directory
2513
SCRIPTPATH=`realpath .`
2614
export ANDROID_NDK_ROOT=$SCRIPTPATH/android-ndk-r23
@@ -54,13 +42,35 @@ cd ${OPENSSL_DIR}
5442
# Build
5543
make -j8
5644

45+
if ("${ANDROID_ABI}" STREQUAL "x86")
46+
set(arcName i686-linux-android)
47+
elseif("${ANDROID_ABI}" STREQUAL "armeabi-v7a")
48+
set(arcName arm-linux-androideabi)
49+
elseif("${ANDROID_ABI}" STREQUAL "arm64-v8a")
50+
set(arcName aarch64-linux-android)
51+
elseif("${ANDROID_ABI}" STREQUAL "x86_64")
52+
set(arcName x86_64-linux-android)
53+
endif()
54+
55+
if [[ "$architecture" == android-arm ]]
56+
then arcName=armeabi-v7a
57+
elif [[ "$architecture" == android-arm64 ]]
58+
then arcName=arm64-v8a
59+
elif [[ "$architecture" == android-x86 ]]
60+
then arcName=x86
61+
elif [[ "$architecture" == android-x86_64 ]]
62+
then arcName=x86_64
63+
else
64+
arcName="$architecture"
65+
fi
66+
5767
# Copy the outputs
5868
OUTPUT_INCLUDE=$SCRIPTPATH/outputStatic/include
59-
OUTPUT_LIB=$SCRIPTPATH/outputStatic/lib/${arcName}/${ANDROID_API}
69+
OUTPUT_LIB=$SCRIPTPATH/outputStatic/lib/${ANDROID_API}/${arcName}
6070
mkdir -p $OUTPUT_INCLUDE
6171
mkdir -p $OUTPUT_LIB
6272
cp -RL include/openssl $OUTPUT_INCLUDE
6373
cp libcrypto.so $OUTPUT_LIB
6474
cp libcrypto.a $OUTPUT_LIB
6575
cp libssl.so $OUTPUT_LIB
66-
cp libssl.a $OUTPUT_LIB
76+
cp libssl.a $OUTPUT_LIB

0 commit comments

Comments
 (0)