forked from Haivision/srt
-
Notifications
You must be signed in to change notification settings - Fork 1
/
mksrt
executable file
·47 lines (44 loc) · 1.49 KB
/
mksrt
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
#!/bin/sh
while getopts s:i:t:n:a:e: option
do
case "${option}"
in
s) SRC_DIR=${OPTARG};;
i) INSTALL_DIR=${OPTARG};;
t) ARCH_ABI=${OPTARG};;
n) NDK_ROOT=${OPTARG};;
a) API_LEVEL=${OPTARG};;
e) ENC_LIB=${OPTARG};;
*) twentytwo=${OPTARG};;
esac
done
if [ $ARCH_ABI = "armeabi-v7a" ]; then
BOTAN_CONFIGURE_CPU=armv7
BOTAN_CXX_FLAGS=""
elif [ $ARCH_ABI = "arm64-v8a" ]; then
BOTAN_CONFIGURE_CPU=arm64
BOTAN_CXX_FLAGS="-march=armv8-a+crypto"
elif [ $ARCH_ABI = "x86" ]; then
BOTAN_CONFIGURE_CPU=x86
BOTAN_CXX_FLAGS=""
elif [ $ARCH_ABI = "x86_64" ]; then
BOTAN_CONFIGURE_CPU=x86_64
BOTAN_CXX_FLAGS=""
fi
cd $SRC_DIR
./configure --use-enclib=$ENC_LIB \
--use-openssl-pc=OFF \
--OPENSSL_INCLUDE_DIR=$INSTALL_DIR/include \
--OPENSSL_CRYPTO_LIBRARY=$INSTALL_DIR/lib/libcrypto.a --OPENSSL_SSL_LIBRARY=$INSTALL_DIR/lib/libssl.a \
--STATIC_MBEDTLS=FALSE \
--MBEDTLS_INCLUDE_DIR=$INSTALL_DIR/include --MBEDTLS_INCLUDE_DIRS=$INSTALL_DIR/include \
--MBEDTLS_LIBRARIES=$INSTALL_DIR/lib/libmbedtls.so \
--BOTAN_OS=android \
--BOTAN_CPU=$BOTAN_CONFIGURE_CPU \
--CMAKE_PREFIX_PATH=$INSTALL_DIR --CMAKE_INSTALL_PREFIX=$INSTALL_DIR --CMAKE_ANDROID_NDK=$NDK_ROOT \
--CMAKE_SYSTEM_NAME=Android --CMAKE_SYSTEM_VERSION=$API_LEVEL --CMAKE_ANDROID_ARCH_ABI=$ARCH_ABI \
--CMAKE_C_FLAGS="-fPIC" --CMAKE_CXX_FLAGS=$BOTAN_CXX_FLAGS --CMAKE_SHARED_LINKER_FLAGS="-Wl,--build-id" \
--enable-c++11 --enable-stdcxx-sync \
--enable-debug=2 --enable-logging=0 --enable-heavy-logging=0 --enable-apps=0
make
make install