-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·63 lines (53 loc) · 1.59 KB
/
setup.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
echo "Setting up environment for PTA"
#########
# Please change LLVM_OBJ_ROOT before using it
########
export LLVM_OBJ_ROOT=$LLVM_OBJ
export PATH=$LLVM_OBJ_ROOT/bin:$PATH
export LLVM_DIR=$LLVM_OBJ_ROOT
#export LLVM_OBJ_ROOT=$LLVM_HOME/llvm-$llvm_version.dbg
#export PATH=$LLVM_OBJ_ROOT/Debug+Asserts/bin:$PATH
export LLVMOPT=opt
export CLANG=$LLVM_OBJ_ROOT/bin/clang
export CLANGCPP=$LLVM_OBJ_ROOT/bin/clang++
export LLVMDIS=llvm-dis
export LLVMLLC=llc
##############astyle code formatting###############
AstyleDir=/home/ysui/astyle/build/clang
export PATH=$AstyleDir/bin:$PATH
##############check what os we have
PLATFORM='unknown'
unamestr=`uname`
if [[ "$unamestr" == 'Linux' ]]; then
export PLATFORM='linux'
elif [[ "$unamestr" == 'Darwin' ]]; then
export PLATFORM='darwin'
elif [[ "$unamestr" == 'FreeBSD' ]]; then
export PLATFORM='freebsd'
fi
#########PATH FOR PTA##############
export SVF_HOME=`pwd`
if [[ $1 == 'debug' ]]
then
PTAOBJTY='Debug'
else
PTAOBJTY='Release'
fi
Build=$PTAOBJTY'-build'
export SVF_HOME=`pwd`
export PTABIN=$SVF_HOME/$Build/bin
export PTALIB=$SVF_HOME/$Build/lib
export PTARTLIB=$SVF_HOME/lib/RuntimeLib
export PATH=$PTABIN:$PATH
export PTATEST=$SVF_HOME/PTABen
export PTATESTSCRIPTS=$PTATEST/scripts
export CLONESCRIPTS=$SVF_HOME/CloneBen/scripts
export RUNSCRIPT=$PTATESTSCRIPTS/run.sh
### for mac 10.10.1###
rm -rf $PTALIB/liblib*
for file in $(find $PTALIB -name "*.dylib")
do
basefilename=`basename $file`
newfile=`echo $basefilename | sed s/lib/liblib/`
ln -s $PTALIB/$basefilename $PTALIB/$newfile
done