-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.sh
executable file
·48 lines (41 loc) · 937 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
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
if [ $# -eq 0 ]
then
echo "No arguments supplied, argument should be either 'kdd', 'kdd-samsung' or 'emul'"
exit
fi
if [ $1 == 'kdd' ] || [ $1 == 'emul' ] || [ $1 == 'kdd-samsung' ]
then
echo "Building NKV with : $1"
else
echo "Build argument should be either 'kdd', 'emul' or 'kdd-samsung'"
exit
fi
set -o xtrace
CWD="$(pwd)"
CWDNAME=`basename "$CWD"`
OD="${CWD}/../${CWDNAME}_out"
if [ $(yum list installed | cut -f1 -d" " | grep --extended '^boost-devel' | wc -l) -eq 1 ]; then
echo "boost-devel already installed";
else
echo "yum install boost-devel"
yum install boost-devel
fi
rm -rf $OD
mkdir $OD
cd ${OD}
if [ $1 == 'kdd' ]
then
cmake $CWD -DNKV_WITH_KDD=ON
elif [ $1 == 'emul' ]
then
cmake $CWD -DNKV_WITH_EMU=ON
elif [ $1 == 'kdd-samsung' ]
then
cmake $CWD -DNKV_WITH_KDD=ON -DNKV_WITH_SAMSUNG_API=ON
else
echo "Build argument should be either 'kdd' or 'emul'"
exit
fi
make -j4
exit