-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_binaries
executable file
·36 lines (28 loc) · 1.48 KB
/
build_binaries
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
#!/bin/sh
### # Check for minimum number of arguments.
### REQUIRED_ARGS=1 # Script requires 3 argument
### if [ $# -lt "$REQUIRED_ARGS" ]
### then
### echo "Usage: `basename $0` <treescan_src directory> <boost directory> <binaries output directory>])"
### echo " example: `basename $0` /prj/treescan/build/treescan /prj/treescan/build/boost/boost_1_81_0 /prj/treescan/build/binaries/linux"
### exit 1
### fi
(
cpp_compiler="/usr/bin/g++"
c_compiler="/usr/bin/gcc"
binaries="${3:-/prj/treescan/build/binaries/linux}"
treescan_src="${1:-/prj/treescan/build/treescan}"
boost_src="${2:-/prj/treescan/build/boost/boost_1_81_0}"
processors="-j8"
pthread="-pthread"
lib_target="libtreescan.linux.so"
rm -f $binaries/*
# echo building TreeScan for 32-bit system using gcc
# ./makescript.sh $binaries/treescan32 $treescan_src $boost_src -m32 -O3 $cpp_compiler $c_compiler $processors $pthread
# echo building TreeScan shared object for 32-bit system using gcc
# ./makescript.so.sh $lib_target $binaries/libtreescan32.so $treescan_src $boost_src -m32 -O3 $cpp_compiler $c_compiler $processors $pthread
echo building TreeScan for 64-bit system using gcc
./makescript.sh $binaries/treescan64 $treescan_src $boost_src -m64 -O3 $cpp_compiler $c_compiler $processors $pthread
echo building TreeScan shared object for 64-bit system using gcc
./makescript.so.sh $lib_target $binaries/libtreescan64.so $treescan_src $boost_src -m64 -O3 $cpp_compiler $c_compiler $processors $pthread
) 1> build.stdout 2> build.stderr