sqlite-parquet-vtable/build/Makefile.linux

42 lines
1.2 KiB
Makefile
Raw Normal View History

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-10-27 15:06:01 +00:00
CFLAGS = $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
2020-10-19 11:12:15 +00:00
LDFLAGS = $(OPTIMIZATIONS) -Wl,--no-whole-archive $(LIBS) -lz -lcrypto -lssl
OBJ = parquet.o parquet_filter.o parquet_table.o parquet_cursor.o
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)
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)
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)
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)
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)
2020-10-19 11:12:15 +00:00
.PHONY: clean parquet
clean:
rm -f *.o *.so
distclean:
rm -rf $(SQLITE) $(HERE)