blob: 667bcac7411d14be917fdfcbe3f913b1ef84d370 (
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
|
#!/bin/bash
set -e
set -x
if [ ! -d "$NDK" ]; then
echo 'Please set $NDK to the path to NDK'
exit 1
fi
cd $(dirname "$0")
function RunConfigure() {
HOST=$1
TARGET=$2
ARCH=$3
TOOLCHAIN=${NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/
export AR=${TOOLCHAIN}${HOST}-ar
export AS=${TOOLCHAIN}${TARGET}-clang
export CC=${TOOLCHAIN}${TARGET}-clang
export CXX=${TOOLCHAIN}${TARGET}-clang++
export LD=${TOOLCHAIN}${HOST}-ld
export STRIP=${TOOLCHAIN}${HOST}-strip
# Tell configure what flags Android requires.
export CFLAGS="-fPIE -fPIC"
export LDFLAGS="-pie"
./configure --host=${HOST} --without-zlib
mkdir -p configs/${ARCH}/MagickCore
mv MagickCore/version.h configs/${ARCH}/MagickCore/
mv MagickCore/magick-baseconfig.h configs/${ARCH}/MagickCore/
}
RunConfigure "aarch64-linux-android" "aarch64-linux-android28" "arm64"
RunConfigure "arm-linux-androideabi" "armv7a-linux-androideabi28" "arm"
RunConfigure "i686-linux-android" "i686-linux-android28" "x86"
RunConfigure "x86_64-linux-android" "x86_64-linux-android28" "x86-64"
|