forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild-libraries.sh
More file actions
executable file
·57 lines (50 loc) · 1.22 KB
/
build-libraries.sh
File metadata and controls
executable file
·57 lines (50 loc) · 1.22 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
51
52
53
54
55
56
57
#!/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 ARCH=$2
#only ios and android subplatforms are used
if [ "${PLATFORM}" == "ios" ] || [ "${PLATFORM}" == "android" ] ; then
export SUBPLATFORM=$3
else
export SUBPLATFORM=
fi
# Capture the existing build variables, if any
export CUSTOM_CC="${CC}"
export CUSTOM_CXX="${CXX}"
export CUSTOM_EMMAKE="${EMMAKE}"
export CUSTOM_EMCONFIGURE="${EMCONFIGURE}"
# Set which libs to build for the target platform
case "${PLATFORM}" in
android)
PREBUILT_LIBS="openssl icu thirdparty"
;;
mac)
PREBUILT_LIBS="openssl icu thirdparty"
;;
ios)
PREBUILT_LIBS="openssl icu thirdparty"
;;
win32)
PREBUILT_LIBS="openssl curl icu cef thirdparty"
;;
linux)
PREBUILT_LIBS="openssl curl icu cef thirdparty"
;;
emscripten)
PREBUILT_LIBS="icu thirdparty"
;;
esac
# Build all of the libraries that the target platform depends on
for t_lib in ${PREBUILT_LIBS} ; do
${BASEDIR}/scripts/build-${t_lib}.sh
done