-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·53 lines (43 loc) · 961 Bytes
/
build.sh
File metadata and controls
executable file
·53 lines (43 loc) · 961 Bytes
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
#!/bin/bash
export CC=clang
export CXX=clang++
root_dir=`git rev-parse --show-toplevel`
# check the cmake binary
command -v cmake3
if test $? -eq 1 ; then
CMAKE="cmake" ;
else
CMAKE="cmake3" ;
fi
# build kernel module runtime if it hasn't been build
if ! test -e heartbeat-linux/libhb.so ; then
cd heartbeat-linux ;
make libhb ;
ln -s build/libhb.so . ;
cd ../ ;
fi
# build noelle if it hasn't been build
if ! test -d noelle/install ; then
cd noelle ;
make clean ;
make src ;
cd ../ ;
fi
# uninstall
rm -rf build/ ;
# build
mkdir build ;
cd build ;
${CMAKE} -DCMAKE_INSTALL_PREFIX="./" -DCMAKE_BUILD_TYPE=Debug ../ ;
make -j ;
make install ;
cd ../ ;
if ! test -e compile_commands.json ; then
ln -s build/compile_commands.json ./ ;
fi
# generate enable file
installDir="`realpath .`"
enableFile="enable"
echo "#!/bin/bash" > ${enableFile} ;
echo "" >> ${enableFile} ;
echo "source `realpath .`/noelle/enable ;" >> ${enableFile} ;