-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.sh
executable file
·40 lines (30 loc) · 1.29 KB
/
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
36
37
38
39
40
#!/bin/sh
################################################################################
export BUILD_MODULE=FreeImage
################################################################################
echo "========================== Update "${BUILD_MODULE}" Project ==========================="
android update project -t android-19 -p . -s
if [ -z "$ANDROID_NDK_ROOT" ]; then
ANDROID_NDK_ROOT=~/ndk
fi
if [ "$1" == "" ]; then
echo "========================== Build "${BUILD_MODULE}" ==========================="
$ANDROID_NDK_ROOT/ndk-build -j16 NDK_DEBUG=0 OVR_DEBUG=1
fi
if [ "$1" == "debug" ]; then
echo "========================== Build "${BUILD_MODULE} $1 " ==========================="
$ANDROID_NDK_ROOT/ndk-build -j16 NDK_DEBUG=0 OVR_DEBUG=1
fi
if [ "$1" == "release" ]; then
echo "========================== Build "${BUILD_MODULE} $1 " ==========================="
$ANDROID_NDK_ROOT/ndk-build -j16 NDK_DEBUG=0 OVR_DEBUG=0
fi
if [ "$1" == "clean" ]; then
echo "========================== Build "${BUILD_MODULE} $1 " ==========================="
$ANDROID_NDK_ROOT/ndk-build clean NDK_DEBUG=1
$ANDROID_NDK_ROOT/ndk-build clean NDK_DEBUG=0
ant clean
rm -rf obj
rm -rf libs
fi
################################################################################