|
|
@ -3,7 +3,7 @@ MonetDB_LIB =
|
|
|
|
MonetDB_INC =
|
|
|
|
MonetDB_INC =
|
|
|
|
Threading =
|
|
|
|
Threading =
|
|
|
|
CXXFLAGS = --std=c++1z
|
|
|
|
CXXFLAGS = --std=c++1z
|
|
|
|
OPTFLAGS = -O3 -fno-semantic-interposition -DNDEBUG
|
|
|
|
OPTFLAGS = -O3 -DNDEBUG
|
|
|
|
LINKFLAGS = -flto
|
|
|
|
LINKFLAGS = -flto
|
|
|
|
SHAREDFLAGS = -shared
|
|
|
|
SHAREDFLAGS = -shared
|
|
|
|
FPIC = -fPIC
|
|
|
|
FPIC = -fPIC
|
|
|
@ -12,6 +12,18 @@ LIBTOOL =
|
|
|
|
USELIB_FLAG = -Wl,--whole-archive,libaquery.a -Wl,-no-whole-archive
|
|
|
|
USELIB_FLAG = -Wl,--whole-archive,libaquery.a -Wl,-no-whole-archive
|
|
|
|
LIBAQ_SRC = server/server.cpp server/monetdb_conn.cpp server/io.cpp
|
|
|
|
LIBAQ_SRC = server/server.cpp server/monetdb_conn.cpp server/io.cpp
|
|
|
|
LIBAQ_OBJ = server.o monetdb_conn.o io.o
|
|
|
|
LIBAQ_OBJ = server.o monetdb_conn.o io.o
|
|
|
|
|
|
|
|
SEMANTIC_INTERPOSITION = -fno-semantic-interposition
|
|
|
|
|
|
|
|
RANLIB = ranlib
|
|
|
|
|
|
|
|
ifeq ($(COMPILER), clang )
|
|
|
|
|
|
|
|
CLANG_GE_10 = $(shell expr `$(CXX) -dumpversion | cut -f1 -d.` \>= 10)
|
|
|
|
|
|
|
|
ifneq ($(CLANG_GE_10), 1)
|
|
|
|
|
|
|
|
SEMANTIC_INTERPOSITION =
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq (, $(shell llvm-ranlib))
|
|
|
|
|
|
|
|
RANLIB = llvm-ranlib
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
OPTFLAGS += $(SEMANTIC_INTERPOSITION)
|
|
|
|
|
|
|
|
|
|
|
|
ifeq ($(PCH), 1)
|
|
|
|
ifeq ($(PCH), 1)
|
|
|
|
PCHFLAGS = -include server/pch.hpp
|
|
|
|
PCHFLAGS = -include server/pch.hpp
|
|
|
@ -19,7 +31,6 @@ else
|
|
|
|
PCHFLAGS =
|
|
|
|
PCHFLAGS =
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
NULL_DEVICE = NUL
|
|
|
|
NULL_DEVICE = NUL
|
|
|
|
OS_SUPPORT += server/winhelper.cpp
|
|
|
|
OS_SUPPORT += server/winhelper.cpp
|
|
|
@ -48,8 +59,8 @@ else
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
else
|
|
|
|
OPTFLAGS += -march=native
|
|
|
|
OPTFLAGS += -march=native
|
|
|
|
MonetDB_LIB += $AQ_MONETDB_LIB
|
|
|
|
MonetDB_LIB += $(AQ_MONETDB_LIB)
|
|
|
|
MonetDB_INC += $AQ_MONETDB_INC
|
|
|
|
MonetDB_INC += $(AQ_MONETDB_INC)
|
|
|
|
MonetDB_INC += -I/usr/local/include/monetdb -I/usr/include/monetdb
|
|
|
|
MonetDB_INC += -I/usr/local/include/monetdb -I/usr/include/monetdb
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
MonetDB_LIB += -lmonetdbe
|
|
|
|
MonetDB_LIB += -lmonetdbe
|
|
|
@ -64,6 +75,7 @@ endif
|
|
|
|
SHAREDFLAGS += $(FPIC)
|
|
|
|
SHAREDFLAGS += $(FPIC)
|
|
|
|
|
|
|
|
|
|
|
|
info:
|
|
|
|
info:
|
|
|
|
|
|
|
|
$(info $(OPTFLAGS))
|
|
|
|
$(info $(OS_SUPPORT))
|
|
|
|
$(info $(OS_SUPPORT))
|
|
|
|
$(info $(OS))
|
|
|
|
$(info $(OS))
|
|
|
|
$(info $(Threading))
|
|
|
|
$(info $(Threading))
|
|
|
@ -78,14 +90,14 @@ pch:
|
|
|
|
libaquery.a:
|
|
|
|
libaquery.a:
|
|
|
|
$(CXX) -c $(FPIC) $(PCHFLAGS) $(LIBAQ_SRC) $(MonetDB_INC) $(MonetDB_LIB) $(OS_SUPPORT) $(Threading) $(OPTFLAGS) $(LINKFLAGS) $(CXXFLAGS) &&\
|
|
|
|
$(CXX) -c $(FPIC) $(PCHFLAGS) $(LIBAQ_SRC) $(MonetDB_INC) $(MonetDB_LIB) $(OS_SUPPORT) $(Threading) $(OPTFLAGS) $(LINKFLAGS) $(CXXFLAGS) &&\
|
|
|
|
$(LIBTOOL) libaquery.a $(LIBAQ_OBJ) &&\
|
|
|
|
$(LIBTOOL) libaquery.a $(LIBAQ_OBJ) &&\
|
|
|
|
ranlib libaquery.a
|
|
|
|
$(RANLIB) libaquery.a
|
|
|
|
|
|
|
|
|
|
|
|
server.bin:
|
|
|
|
server.bin:
|
|
|
|
$(CXX) $(LIBAQ_SRC) $(LINKFLAGS) $(OS_SUPPORT) $(Threading) $(MonetDB_INC) $(MonetDB_LIB) $(OPTFLAGS) $(CXXFLAGS) -o server.bin
|
|
|
|
$(CXX) $(LIBAQ_SRC) $(LINKFLAGS) $(OS_SUPPORT) $(Threading) $(MonetDB_INC) $(MonetDB_LIB) $(OPTFLAGS) $(CXXFLAGS) -o server.bin
|
|
|
|
launcher:
|
|
|
|
launcher:
|
|
|
|
$(CXX) -D__AQ_BUILD_LAUNCHER__ $(LIBAQ_SRC) $(LINKFLAGS) $(OS_SUPPORT) $(Threading) $(MonetDB_INC) $(MonetDB_LIB) $(OPTFLAGS) $(CXXFLAGS) -o aq
|
|
|
|
$(CXX) -D__AQ_BUILD_LAUNCHER__ $(LIBAQ_SRC) $(LINKFLAGS) $(OS_SUPPORT) $(Threading) $(MonetDB_INC) $(MonetDB_LIB) $(OPTFLAGS) $(CXXFLAGS) -o aq
|
|
|
|
server.so:
|
|
|
|
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
|
|
|
|
# $(CXX) -z muldefs 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
|
|
|
|
$(CXX) $(SHAREDFLAGS) $(PCHFLAGS) $(LIBAQ_SRC) $(OS_SUPPORT) $(Threading) $(MonetDB_INC) $(MonetDB_LIB) $(OPTFLAGS) $(LINKFLAGS) $(CXXFLAGS) -o server.so
|
|
|
|
$(CXX) $(SHAREDFLAGS) $(PCHFLAGS) $(LIBAQ_SRC) $(OS_SUPPORT) $(Threading) $(MonetDB_INC) $(MonetDB_LIB) $(OPTFLAGS) $(LINKFLAGS) $(CXXFLAGS) -o server.so
|
|
|
|
server_uselib:
|
|
|
|
server_uselib:
|
|
|
|
$(CXX) $(SHAREDFLAGS) $(USELIB_FLAG),libaquery.a $(MonetDB_LIB) $(OPTFLAGS) $(LINKFLAGS) $(CXXFLAGS) -o server.so
|
|
|
|
$(CXX) $(SHAREDFLAGS) $(USELIB_FLAG),libaquery.a $(MonetDB_LIB) $(OPTFLAGS) $(LINKFLAGS) $(CXXFLAGS) -o server.so
|
|
|
|