Add crappy Makefile

This commit is contained in:
Colin Dellow 2018-03-10 10:46:10 -05:00
parent 824a416f51
commit 2bc054a2cf
3 changed files with 31 additions and 28 deletions

30
parquet/Makefile Normal file
View File

@ -0,0 +1,30 @@
PARQUET_CPP=~/src/parquet-cpp
CC = g++
# odd, no -lz -ldl -lpthread needed?
CFLAGS = -I ../sqlite -O3 -std=c++11 -Wall -fPIC -g
PARQUET_LIB = $(PARQUET_CPP)/build/release/libparquet.a
THRIFT_LIB = $(PARQUET_CPP)/thrift_ep/src/thrift_ep-install/lib/libthrift.a
ARROW_LIB = $(PARQUET_CPP)/build/release/libarrow.so
BOOST_LIB = /usr/lib/x86_64-linux-gnu/libboost_regex.so
LDFLAGS = -O3 $(PARQUET_LIB) $(THRIFT_LIB) $(ARROW_LIB) $(BOOST_LIB)
DEPS = hellomake.h
OBJ = parquet.o parquet_table.o parquet_cursor.o
libparquet.so: $(OBJ)
$(CC) -shared -o $@ $^ $(LDFLAGS)
parquet_cursor.o: parquet_cursor.cc parquet_cursor.h parquet_table.h
$(CC) -c -o $@ $< $(CFLAGS)
parquet_table.o: parquet_table.cc parquet_table.h
$(CC) -c -o $@ $< $(CFLAGS)
parquet.o: parquet.cc parquet_cursor.h parquet_table.h
$(CC) -c -o $@ $< $(CFLAGS)
.PHONY: clean
clean:
rm -f *.o *.so

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
set -euo pipefail set -euo pipefail
./make make
if [ ! -v DEBUG ]; then if [ ! -v DEBUG ]; then

View File

@ -1,27 +0,0 @@
#!/bin/bash
set -euo pipefail
#set -x
PARQUET_CPP=${PARQUET_CPP:-~/src/parquet-cpp}
# make obj file
clean() {
rm -f *.o *.so
}
build() {
clean
# -O3 -s -DNDEBUG
g++ -O3 -std=c++11 -Wall -fPIC -c -g *.cc -I ../sqlite -lz -ldl -lpthread
g++ -O3 -shared -o libparquet.so *.o \
${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"