forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-libraries.sh
More file actions
executable file
·50 lines (44 loc) · 1 KB
/
build-libraries.sh
File metadata and controls
executable file
·50 lines (44 loc) · 1 KB
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
#!/bin/bash
# Abort building if any errors occur
set -e
# Build location
export BASEDIR=$(dirname $0)
export BUILDDIR="`pwd`/build"
export INSTALL_DIR="`pwd`/build/install"
export OUTPUT_DIR="`pwd`"
mkdir -p "${BUILDDIR}"
mkdir -p "${INSTALL_DIR}"
mkdir -p "${OUTPUT_DIR}"
# Target platform and architecture
export PLATFORM=$1
export CUSTOM_ARCH=$2
TARGET_LIB=$3
# Capture the existing CC and CXX variables, if any
export CUSTOM_CC="${CC}"
export CUSTOM_CXX="${CXX}"
# Special behaviour if "all" is specified as the platform
if [ "${PLATFORM}" == "all" ] ; then
set -e
"$0" mac
"$0" android
"$0" ios
exit
fi
# Build all of the libraries that we depend on (OpenSSL, CURL and ICU) if not specified
if [ -z "${TARGET_LIB}" ] ; then
$BASEDIR/scripts/build-openssl.sh
$BASEDIR/scripts/build-curl.sh
$BASEDIR/scripts/build-icu.sh
else
case "${TARGET_LIB}" in
openssl)
$BASEDIR/scripts/build-openssl.sh
;;
curl)
$BASEDIR/scripts/build-curl.sh
;;
icu)
$BASEDIR/scripts/build-icu.sh
;;
esac
fi