-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
74 lines (69 loc) · 1.66 KB
/
install.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
####==================================================
#### Compile, Setup and install script of RAOS
#### For Linux, MacOS
####==================================================
#!/bin/sh
# Get platform type
if [ "$(uname)" = "Darwin" ]; then
# Do something under Mac OS X platform
SYSTEM="APPLE"
elif [ "$(expr substr $(uname -s) 1 5)" = "Linux" ]; then
# Do something under GNU/Linux platform
SYSTEM="LINUX"
elif [ "$(expr substr $(uname -s) 1 10)" = "MINGW32_NT" ]; then
# Do something under Windows NT platform
SYSTEM="WIN32"
fi
# Get the absolute TOP path of this project
prjtop=$(cd "$(dirname "$0")"; pwd)
echo "Absolute path of project top directory is: "$prjtop
sleep 1
##======== Compile 3rd Party softwares ========
echo "Start Compiling 3d party soft ..."
# Compile fltk
if [ ${SYSTEM} = "LINUX" ]; then
echo "Start Compiling FLTK..."
sleep 1
cd $prjtop/3rdparty
tar xzvf fltk-1.3.4-1-source.tar.gz
cd fltk-1.3.4-1
mkdir -p build/install
cd build
cmake -D CMAKE_INSTALL_PREFIX=./install ..
make
make install
fi
# Compile blas
echo "Start Compiling BLAS..."
sleep 1
cd $prjtop/3rdparty/blas/BLAS-3.6.0
make
mv blas_*.a libblas.a
rm ./*.o # cleanup
# Compile cblas
echo "Start Compiling CBLAS..."
sleep 1
cd $prjtop/3rdparty/blas/CBLAS
make
mv lib/cblas_*.a lib/libcblas.a
# cleanup
rm ./src/*.o
rm ./testing/*.o
rm ./testing/x*
# Compile lapack
echo "Start Compiling LAPACK..."
sleep 1
cd $prjtop/3rdparty/lapack-3.7.0
mkdir build
cd build
cmake -DLAPACKE=ON ..
make
##======== Compile RAOS ========
echo "Start Compiling RAOS..."
sleep 1
cd $prjtop
mkdir build
cd build
cmake ..
make
#make install