-
-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·31 lines (28 loc) · 811 Bytes
/
build.sh
File metadata and controls
executable file
·31 lines (28 loc) · 811 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
#!/bin/bash
if [ "$(uname)" == "Darwin" ];
then
# Switch to clang with C++11 ASAP.
export MACOSX_VERSION_MIN=10.7
export CC=clang
export CXX=clang++
export CXXFLAGS="-mmacosx-version-min=${MACOSX_VERSION_MIN}"
export CXXFLAGS="${CXXFLAGS} -stdlib=libc++ -std=c++11"
export LIBS="-lc++"
elif [ "$(uname)" == "Linux" ];
then
export CC=gcc
export CXX=g++
fi
./autogen.sh
./configure --prefix="${PREFIX}" \
--with-pic \
--enable-shared \
--enable-static \
CC="${CC}" \
CXX="${CXX}" \
CXXFLAGS="${CXXFLAGS} -O2" \
LDFLAGS="${LDFLAGS}"
make -j ${CPU_COUNT}
make check -j ${CPU_COUNT}
make install
(cd python && python setup.py install --cpp_implementation --single-version-externally-managed --record record.txt && cd ..)