5 echo "Clean build directory"
10 echo "Build vine library"
12 cmake .. -DLIB_DIR=/usr/lib -DINCLUDE_DIR=/usr/include -DBIN_DIR=/usr/bin \
13 -DWITH_UNITTEST=ON -DWITH_VINE_TEST=ON $1 $2
20 echo "Test vine library"
21 ./$BUILD_DIR/tests/unittest/vine-unittest $1
24 function coding_rule {
25 git clone git@github.sec.samsung.net:RS-SA/coding-style-guides.git
26 chmod 777 ./coding-style-guides/c/*.sh ./coding-style-guides/c/*.pl
27 result_src+="$((`./coding-style-guides/c/checkpatchinit_tizen.sh src| tee /dev/tty | grep total | awk '{ sum+=$2+$4 }; END { print sum }'`))"
28 result_include+="$((`./coding-style-guides/c/checkpatchinit_tizen.sh include| tee /dev/tty | grep total | awk '{ sum+=$2+$4 }; END { print sum }'`))"
29 result_plugins+="$((`./coding-style-guides/c/checkpatchinit_tizen.sh plugins| tee /dev/tty | grep total | awk '{ sum+=$2+$4 }; END { print sum }'`))"
30 result=$(( $result_src + $result_include + $result_plugins ))
32 if [ "${result}" -gt "0" ]; then
37 function install_certs {
38 echo "Installs test certificates"
40 cp -rf ../tests/vine-test/certs ./tests/vine-test/certs
41 cd tests/vine-test/certs
42 ./create-test-certs.sh
48 #NDK_ROOT and NDK_DEP_ROOT_DIR should be defined.
49 #NDK_ROOT=/home/moon/Works/Devel/Vine/android-ndk-r21b
50 #NDK_DEP_ROOT_DIR=/home/moon/Works/Devel/Vine/ndk-deps
52 #Libraries that vine depends on should be located in a directory for each ABI.
53 #If you want to build for arm64-v8a ABI, libraries should be located in $NDK_DEP_ROOT_DIR/lib/arm64-v8a
54 #ABI: armeabi-v7a, arm64-v8a, x86, x86-64
58 function build_android {
60 OUTPUT_LIB=$OUTPUT_DIR/lib/$ABI
61 OUTPUT_INC=$OUTPUT_DIR/include
62 OUTPUT_BIN=$OUTPUT_DIR/bin/$ABI
63 NDK_DEP_LIB=$NDK_DEP_ROOT_DIR/lib/$ABI
64 NDK_DEP_INC=$NDK_DEP_ROOT_DIR/include
66 echo "Build vine library (ABI=$ABI)"
67 echo "NDK_PATH $NDK_ROOT"
73 -DCMAKE_TOOLCHAIN_FILE=$NDK_ROOT/build/cmake/android.toolchain.cmake \
75 -DANDROID_NATIVE_API_LEVEL=$MINSDKVERSION \
76 -DANDROID_STL=c++_static \
77 -DANDROID=ON -DANDROID_NDK=$NDK_ROOT \
78 -DNDK_LIB_DIR=$NDK_DEP_LIB -DNDK_INCLUDE_DIR=$NDK_DEP_INC \
79 -DLIB_DIR=$OUTPUT_LIB -DINCLUDE_DIR=$OUTPUT_INC -DBIN_DIR=$OUTPUT_BIN \
80 -DWITH_UNITTEST=ON -DWITH_VINE_TEST=ON \
81 -DLWS_OPENSSL_INCLUDE_DIRS=$NDK_INCLUDE_DIR \
82 -DLWS_OPENSSL_LIBRARIES="$NDK_DEP_LIB/libcrypto.so;$NDK_DEP_LIB/libssl.so"
88 if [ ! -d "$BUILD_DIR" ]; then
116 build -DENABLE_DATAPATH_PLUGIN_DEBUG=ON -DENABLE_INSTRUMENTATION_MODE=ON
125 build_android arm64-v8a