2018-06-25 01:11:07 +00:00
|
|
|
HERE:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
|
|
|
ROOT:=$(HERE)/../..
|
|
|
|
VTABLE:=$(ROOT)/parquet
|
|
|
|
SQLITE:=$(ROOT)/sqlite
|
|
|
|
|
|
|
|
# Flags
|
2018-07-05 13:09:18 +00:00
|
|
|
CXX = g++
|
2018-07-05 22:47:33 +00:00
|
|
|
OPTIMIZATIONS = -O3
|
2020-11-11 11:24:05 +00:00
|
|
|
CFLAGS = -I $(SQLITE) $(OPTIMIZATIONS) -std=c++11 -Wall -fPIC -g
|
2020-10-19 11:12:15 +00:00
|
|
|
LIBS = -lparquet -lboost_regex -lboost_system -lboost_filesystem \
|
|
|
|
-lbrotlienc -lbrotlicommon -lbrotlidec -licui18n -licuuc -licudata \
|
|
|
|
-llz4 -lsnappy -lthrift -lz -lzstd -lcrypto -lssl
|
2018-06-25 01:11:07 +00:00
|
|
|
|
2020-10-19 11:12:15 +00:00
|
|
|
LDFLAGS = $(OPTIMIZATIONS) -Wl,--no-whole-archive $(LIBS) -lz -lcrypto -lssl
|
2018-07-05 01:45:59 +00:00
|
|
|
|
2018-06-25 01:11:07 +00:00
|
|
|
OBJ = parquet.o parquet_filter.o parquet_table.o parquet_cursor.o
|
|
|
|
|
2018-06-27 03:50:11 +00:00
|
|
|
PROF =
|
|
|
|
|
2020-10-19 11:12:15 +00:00
|
|
|
libparquet.so: $(OBJ)
|
2018-07-05 13:09:18 +00:00
|
|
|
$(CXX) $(PROF) -shared -o $@ $(OBJ) $(LDFLAGS)
|
2018-06-25 01:11:07 +00:00
|
|
|
|
2020-10-19 11:12:15 +00:00
|
|
|
parquet_filter.o: $(VTABLE)/parquet_filter.cc $(VTABLE)/parquet_filter.h
|
2018-07-05 13:09:18 +00:00
|
|
|
$(CXX) $(PROF) -c -o $@ $< $(CFLAGS)
|
2018-06-25 01:11:07 +00:00
|
|
|
|
2020-10-19 11:12:15 +00:00
|
|
|
parquet_cursor.o: $(VTABLE)/parquet_cursor.cc $(VTABLE)/parquet_cursor.h $(VTABLE)/parquet_table.h $(VTABLE)/parquet_filter.h
|
2018-07-05 13:09:18 +00:00
|
|
|
$(CXX) $(PROF) -c -o $@ $< $(CFLAGS)
|
2018-06-25 01:11:07 +00:00
|
|
|
|
2020-10-19 11:12:15 +00:00
|
|
|
parquet_table.o: $(VTABLE)/parquet_table.cc $(VTABLE)/parquet_table.h
|
2018-07-05 13:09:18 +00:00
|
|
|
$(CXX) $(PROF) -c -o $@ $< $(CFLAGS)
|
2018-06-25 01:11:07 +00:00
|
|
|
|
2020-10-19 11:12:15 +00:00
|
|
|
parquet.o: $(VTABLE)/parquet.cc $(VTABLE)/parquet_cursor.h $(VTABLE)/parquet_table.h $(VTABLE)/parquet_filter.h
|
2018-07-05 13:09:18 +00:00
|
|
|
$(CXX) $(PROF) -c -o $@ $< $(CFLAGS)
|
2018-06-25 01:11:07 +00:00
|
|
|
|
2020-10-19 11:12:15 +00:00
|
|
|
.PHONY: clean parquet
|
2018-06-25 01:11:07 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.o *.so
|
|
|
|
|
|
|
|
distclean:
|
|
|
|
rm -rf $(SQLITE) $(HERE)
|