forked from sh1r0/caffe-android-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·35 lines (29 loc) · 855 Bytes
/
build.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
#!/usr/bin/env bash
set -e
if [ -z "$NDK_ROOT" ] && [ "$#" -eq 0 ]; then
echo 'Either $NDK_ROOT should be set or provided as argument'
echo "e.g., 'export NDK_ROOT=/path/to/ndk' or"
echo " '${0} /path/to/ndk'"
exit 1
else
NDK_ROOT=$(readlink -f "${1:-${NDK_ROOT}}")
export NDK_ROOT="${NDK_ROOT}"
fi
WD=$(readlink -f "`dirname $0`")
cd ${WD}
export ANDROID_ABI="${ANDROID_ABI:-"armeabi-v7a with NEON"}"
export USE_OPENBLAS=${USE_OPENBLAS:-0}
export N_JOBS=${N_JOBS:-4}
if [[ "${USE_OPENBLAS}" -ne 1 ]] || ./scripts/build_openblas.sh ; then
export USE_OPENBLAS=0
./scripts/get_eigen.sh
fi
./scripts/build_boost.sh
./scripts/build_gflags.sh
./scripts/build_glog.sh
./scripts/build_lmdb.sh
./scripts/build_opencv.sh
./scripts/build_protobuf_host.sh
./scripts/build_protobuf.sh
./scripts/build_caffe.sh
echo "DONE!!"