2018-03-02 23:59:34 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-03-03 20:44:01 +00:00
|
|
|
set -euo pipefail
|
|
|
|
#set -x
|
2018-03-02 23:59:34 +00:00
|
|
|
|
|
|
|
PARQUET_CPP=${PARQUET_CPP:-~/src/parquet-cpp}
|
|
|
|
|
|
|
|
# make obj file
|
|
|
|
clean() {
|
|
|
|
rm -f *.o *.so
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
clean
|
2018-03-03 20:44:01 +00:00
|
|
|
# -O3 -s -DNDEBUG
|
|
|
|
g++ -O3 -std=c++11 -Wall -fPIC -c -g *.cc -I ../sqlite -lz -ldl -lpthread
|
2018-03-02 23:59:34 +00:00
|
|
|
|
2018-03-03 20:44:01 +00:00
|
|
|
g++ -O3 -shared -o libparquet.so *.o \
|
2018-03-02 23:59:34 +00:00
|
|
|
${PARQUET_CPP}/build/release/libparquet.a \
|
|
|
|
${PARQUET_CPP}/thrift_ep/src/thrift_ep-install/lib/libthrift.a \
|
|
|
|
${PARQUET_CPP}/build/release/libarrow.so \
|
|
|
|
/usr/lib/x86_64-linux-gnu/libboost_regex.so
|
|
|
|
}
|
|
|
|
|
|
|
|
fn=${1:-build}
|
|
|
|
|
|
|
|
"$fn"
|