forked from dec1/Boost-for-Android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
doIt.sh
executable file
·66 lines (43 loc) · 2.66 KB
/
doIt.sh
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
58
59
60
61
62
# Copyright (c) 2017 Declan Moran (www.silverglint.com)
# Extract boost (src) archive to a directory of the form "major.minor.patch"
# so that the dir name ~ boost version (eg "1.64.0")
#---------------------------------------------------------------------------------
# Example script. Modify the variables below as appropriate for your local setup.
#---------------------------------------------------------------------------------
# Specify the path to boost source code dir
BOOST_SRC_DIR=/home/declan/Documents/zone/mid/lib/boost/down
#------------------------------------------------------------------------------------------
# Specify the version of boost youre building
#BOOST_VERSION=1.64.0
BOOST_VERSION=1.65.1
#------------------------------------------------------------------------------------------
# Specify path to the (Google) Ndk (by default downloded to "..sdk/ndk-bundle" by android studio)
#ANDROID_NDK_ROOT=/home/declan/Documents/zone/mid/lib/android/ndk/15c/android-ndk-r15c
export ANDROID_NDK_ROOT=/home/declan/Documents/zone/mid/lib/android/ndk/16b1/android-ndk-r16-beta1
#------------------------------------------------------------------------------------------
# Modify if desired
# log file where build messages will be stored
logFile=build_out.txt
rm $logFile
#------------------------------------------------------------------------------------------
# the build script writes some extra info to this file if its defined (but will be in "split" across different dirs)
#export NDK_LOGFILE=ndk_log_out.txt
# The options --stdlibs, --abis and --linkage can be one or more of the listed posible values. If you specify more than one, then separate individual values by a comma
#------------------------------------------------------------------------------------------
# which compiler to use
# possible values: {llvm-3.5, gnu-4.9}
STD_LIBS="llvm-3.5"
# STD_LIBS="llvm-3.5, gnu-4.9"
# which abis (~ architecture + instruction set) to build for
# possible values: {armeabi-v7a, x86, mips}
ABIS="armeabi-v7a"
# ABIS="armeabi-v7a, x86, mips"
# whether to build shared or static libraries (or both)
# possible values: {shared, static}
LINKAGE="shared"
#LINKAGE="shared, static"
#--------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------
# Dont modify - the actual call
#-------------------------------
./build_tools/build-boost.sh --version=$BOOST_VERSION --stdlibs=$STD_LIBS --abis=$ABIS --ndk-dir=$ANDROID_NDK_ROOT --linkage=$LINKAGE --verbose $BOOST_SRC_DIR 2>&1 | tee -a $logFile