You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AQuery/Makefile

60 lines
1.8 KiB

2 years ago
OS_SUPPORT =
MonetDB_LIB =
Threading =
2 years ago
CXXFLAGS = --std=c++1z
OPTFLAGS = -O3 -flto -march=native
SHAREDFLAGS = -shared -fPIC
ifeq ($(PCH), 1)
PCHFLAGS = -include server/aggregations.h
2 years ago
else
PCHFLAGS =
2 years ago
endif
2 years ago
2 years ago
ifeq ($(OS),Windows_NT)
2 years ago
NULL_DEVICE = NUL
2 years ago
OS_SUPPORT += server/winhelper.cpp
MonetDB_LIB += -Imonetdb/msvc msc-plugin/monetdbe.dll
else
UNAME_S = $(shell uname -s)
UNAME_M = $(shell uname -m)
2 years ago
NULL_DEVICE = /dev/null
MonetDB_LIB =
ifeq ($(UNAME_S),Darwin)
MonetDB_LIB += -L`brew --prefix monetdb`/lib
ifneq ($(UNAME_M),arm64)
OPTFLAGS += -march=native
endif
else
OPTFLAGS += -march=native
endif
MonetDB_LIB += -I/usr/local/include/monetdb -I/usr/include/monetdb -lmonetdbe
2 years ago
endif
ifeq ($(THREADING),1)
Threading += server/threading.cpp -DTHREADING
endif
2 years ago
pch:
$(CXX) -x c++-header server/aggregations.h -o server/aggregations.h.pch
info:
$(info $(OS_SUPPORT))
$(info $(OS))
$(info $(Threading))
$(info "test")
$(info $(CXX))
libaquery.a:
$(CXX) -c server/server.cpp server/io.cpp server/table.cpp $(OS_SUPPORT) $(Threading) $(OPTFLAGS) $(CXXFLAGS) -o server.bin
2 years ago
server.bin:
2 years ago
$(CXX) server/server.cpp server/io.cpp server/table.cpp $(OS_SUPPORT) $(Threading) $(OPTFLAGS) $(CXXFLAGS) -o server.bin
2 years ago
server.so:
# $(CXX) server/server.cpp server/monetdb_conn.cpp -fPIC -shared $(OS_SUPPORT) monetdb/msvc/monetdbe.dll --std=c++1z -O3 -march=native -o server.so -I./monetdb/msvc
2 years ago
$(CXX) $(SHAREDFLAGS) server/server.cpp server/io.cpp server/table.cpp $(OS_SUPPORT) server/monetdb_conn.cpp $(Threading) $(MonetDB_LIB) $(OPTFLAGS) $(CXXFLAGS) -o server.so
2 years ago
snippet:
$(CXX) $(SHAREDFLAGS) $(PCHFLAGS) out.cpp server/server.cpp server/monetdb_conn.cpp server/table.cpp server/io.cpp $(MonetDB_LIB) $(OPTFLAGS) $(CXXFLAGS) -o dll.so
2 years ago
docker:
docker build -t aquery .
2 years ago
clean:
2 years ago
rm *.shm *.o dll.so server.so server.bin -rf 2> $(NULL_DEVICE) || true