2016-04-01 20:58:15 +08:00
|
|
|
#help for make
|
|
|
|
#http://www.cnblogs.com/wang_yb/p/3990952.html
|
|
|
|
#https://segmentfault.com/a/1190000000349917
|
|
|
|
#http://blog.csdn.net/cuiyifang/article/details/7910268
|
|
|
|
|
2016-09-18 20:01:57 +08:00
|
|
|
#to use gprof to analyse efficience of the program:
|
|
|
|
#http://blog.chinaunix.net/uid-25194149-id-3215487.html
|
2017-01-16 14:12:57 +08:00
|
|
|
|
|
|
|
#to use gcov and lcov
|
|
|
|
#Notice that optimization should not be used here
|
|
|
|
#http://blog.163.com/bobile45@126/blog/static/96061992201382025729313/
|
|
|
|
#gcov -a main.cpp
|
|
|
|
#lcov --directory . --capture --output-file dig.info
|
|
|
|
#genhtml --output-directory . --frames --show-details dig.info
|
|
|
|
|
2016-09-18 20:01:57 +08:00
|
|
|
#to use doxygen+graphviz+htmlhelp to generate document from source code:
|
|
|
|
#http://www.doxygen.nl/
|
|
|
|
#(also include good comments norm)
|
|
|
|
#http://blog.csdn.net/u010740725/article/details/51387810
|
|
|
|
|
2017-02-17 17:09:47 +08:00
|
|
|
#NOTICE: to speed up the make process, use make -j4
|
|
|
|
#use -j8 or higher may cause error
|
|
|
|
#http://blog.csdn.net/cscrazybing/article/details/50789482
|
|
|
|
#http://blog.163.com/liuhonggaono1@126/blog/static/10497901201210254622141/
|
|
|
|
|
|
|
|
|
2016-04-01 20:58:15 +08:00
|
|
|
#TODO:the dependences are not complete!
|
|
|
|
|
2017-02-26 17:18:21 +08:00
|
|
|
#TODO: parallel -pthread
|
|
|
|
|
|
|
|
#TODO: judge and decide using which program
|
|
|
|
#CC=$(shell which clang 2>/dev/null || which gcc)
|
|
|
|
#ccache, readline, gcov lcov
|
|
|
|
#http://blog.csdn.net/u012421852/article/details/52138960
|
|
|
|
|
2016-04-01 20:58:15 +08:00
|
|
|
#compile parameters
|
|
|
|
|
2017-05-16 21:16:40 +08:00
|
|
|
CC = ccache g++ -std=c++11
|
2017-02-17 17:09:47 +08:00
|
|
|
#CC = g++
|
2016-04-01 20:58:15 +08:00
|
|
|
|
|
|
|
#the optimazition level of gcc/g++
|
|
|
|
#http://blog.csdn.net/hit_090420216/article/details/44900215
|
|
|
|
#NOTICE: -O2 is recommended, while -O3 is dangerous
|
|
|
|
#when developing, not use -O because it will disturb the normal
|
|
|
|
#routine. use it for test and release.
|
2017-05-16 21:27:20 +08:00
|
|
|
CFLAGS = -c -Wall -O2
|
|
|
|
EXEFLAG = -O2
|
2017-01-16 14:12:57 +08:00
|
|
|
#-coverage
|
2017-03-23 21:32:41 +08:00
|
|
|
#CFLAGS = -c -Wall -O2 -pthread
|
|
|
|
#EXEFLAG = -O2 -pthread
|
2016-04-01 20:58:15 +08:00
|
|
|
|
2017-01-16 14:12:57 +08:00
|
|
|
#add -lreadline -ltermcap if using readline or objs contain readline
|
2017-05-17 20:50:23 +08:00
|
|
|
library = -ltermcap -lreadline -L./lib -L/usr/local/lib -lantlr -lgcov -lboost_filesystem -lboost_system -lboost_regex -lpthread -I/usr/local/include/boost
|
2017-05-16 21:27:20 +08:00
|
|
|
# library = -ltermcap -lreadline -L./lib -lantlr -lgcov
|
2017-01-16 14:12:57 +08:00
|
|
|
def64IO = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
|
|
|
|
|
2016-04-01 20:58:15 +08:00
|
|
|
# paths
|
2015-11-06 19:13:39 +08:00
|
|
|
|
|
|
|
objdir = .objs/
|
|
|
|
|
2016-04-01 20:58:15 +08:00
|
|
|
exedir = bin/
|
2016-03-04 16:49:06 +08:00
|
|
|
|
2016-03-11 17:00:53 +08:00
|
|
|
lib_antlr = lib/libantlr.a
|
|
|
|
|
2016-04-01 20:58:15 +08:00
|
|
|
api_cpp = api/cpp/lib/libgstoreconnector.a
|
|
|
|
|
|
|
|
api_java = api/java/lib/GstoreJavaAPI.jar
|
|
|
|
|
|
|
|
# objects
|
2016-03-12 02:08:45 +08:00
|
|
|
|
2017-01-16 14:12:57 +08:00
|
|
|
#sstreeobj = $(objdir)Tree.o $(objdir)Storage.o $(objdir)Node.o $(objdir)IntlNode.o $(objdir)LeafNode.o $(objdir)Heap.o
|
2016-09-18 20:01:57 +08:00
|
|
|
sitreeobj = $(objdir)SITree.o $(objdir)SIStorage.o $(objdir)SINode.o $(objdir)SIIntlNode.o $(objdir)SILeafNode.o $(objdir)SIHeap.o
|
|
|
|
istreeobj = $(objdir)ISTree.o $(objdir)ISStorage.o $(objdir)ISNode.o $(objdir)ISIntlNode.o $(objdir)ISLeafNode.o $(objdir)ISHeap.o
|
2017-03-28 16:56:16 +08:00
|
|
|
ivtreeobj = $(objdir)IVTree.o $(objdir)IVStorage.o $(objdir)IVNode.o $(objdir)IVIntlNode.o $(objdir)IVLeafNode.o $(objdir)IVHeap.o
|
2016-09-18 20:01:57 +08:00
|
|
|
|
2017-03-31 00:23:16 +08:00
|
|
|
kvstoreobj = $(objdir)KVstore.o $(sitreeobj) $(istreeobj) $(ivtreeobj) #$(sstreeobj)
|
2016-04-01 20:58:15 +08:00
|
|
|
|
2017-03-31 00:23:16 +08:00
|
|
|
utilobj = $(objdir)Util.o $(objdir)Bstr.o $(objdir)Stream.o $(objdir)Triple.o $(objdir)BloomFilter.o $(objdir)VList.o
|
2016-04-01 20:58:15 +08:00
|
|
|
|
|
|
|
queryobj = $(objdir)SPARQLquery.o $(objdir)BasicQuery.o $(objdir)ResultSet.o $(objdir)IDList.o \
|
2016-05-16 03:16:22 +08:00
|
|
|
$(objdir)Varset.o $(objdir)QueryTree.o $(objdir)ResultFilter.o $(objdir)GeneralEvaluation.o
|
2016-04-01 20:58:15 +08:00
|
|
|
|
2015-11-06 19:13:39 +08:00
|
|
|
signatureobj = $(objdir)SigEntry.o $(objdir)Signature.o
|
2016-04-01 20:58:15 +08:00
|
|
|
|
|
|
|
vstreeobj = $(objdir)VSTree.o $(objdir)EntryBuffer.o $(objdir)LRUCache.o $(objdir)VNode.o
|
|
|
|
|
2016-09-25 22:14:36 +08:00
|
|
|
stringindexobj = $(objdir)StringIndex.o
|
|
|
|
|
2016-05-16 03:16:22 +08:00
|
|
|
parserobj = $(objdir)RDFParser.o $(objdir)SparqlParser.o $(objdir)DBparser.o \
|
2016-04-01 20:58:15 +08:00
|
|
|
$(objdir)SparqlLexer.o $(objdir)TurtleParser.o $(objdir)QueryParser.o
|
|
|
|
|
2017-05-16 21:27:20 +08:00
|
|
|
serverobj = $(objdir)Operation.o $(objdir)Server.o $(objdir)Client.o $(objdir)Socket.o
|
|
|
|
|
|
|
|
# httpobj = $(objdir)client_http.hpp.gch $(objdir)server_http.hpp.gch
|
2016-04-01 20:58:15 +08:00
|
|
|
|
2016-05-16 03:16:22 +08:00
|
|
|
databaseobj = $(objdir)Database.o $(objdir)Join.o $(objdir)Strategy.o
|
2016-04-01 20:58:15 +08:00
|
|
|
|
|
|
|
|
2017-05-16 21:27:20 +08:00
|
|
|
objfile = $(kvstoreobj) $(vstreeobj) $(stringindexobj) $(parserobj) $(serverobj) $(httpobj) $(databaseobj) \
|
2016-04-01 20:58:15 +08:00
|
|
|
$(utilobj) $(signatureobj) $(queryobj)
|
2015-11-06 19:13:39 +08:00
|
|
|
|
2017-05-16 21:27:20 +08:00
|
|
|
inc = -I./tools/libantlr3c-3.4/ -I./tools/libantlr3c-3.4/include
|
|
|
|
#-I./usr/local/include/boost/
|
2016-03-04 16:49:06 +08:00
|
|
|
|
2015-11-06 19:13:39 +08:00
|
|
|
|
2017-02-17 17:09:47 +08:00
|
|
|
#auto generate dependencies
|
|
|
|
# http://blog.csdn.net/gmpy_tiger/article/details/51849474
|
|
|
|
# http://blog.csdn.net/jeffrey0000/article/details/12421317
|
|
|
|
|
2016-03-04 16:49:06 +08:00
|
|
|
#gtest
|
2017-05-16 21:27:20 +08:00
|
|
|
|
|
|
|
TARGET = $(exedir)gbuild $(exedir)gserver $(exedir)gclient $(exedir)gquery $(exedir)gconsole $(api_java) $(exedir)gadd $(exedir)gsub $(exedir)HttpConnector
|
2017-02-17 17:09:47 +08:00
|
|
|
|
|
|
|
all: $(TARGET)
|
2015-11-06 19:13:39 +08:00
|
|
|
|
2016-05-16 03:16:22 +08:00
|
|
|
test_index: test_index.cpp
|
2016-04-30 15:28:46 +08:00
|
|
|
$(CC) $(EXEFLAG) -o test_index test_index.cpp $(objfile) $(library)
|
|
|
|
|
2017-02-17 17:09:47 +08:00
|
|
|
#BETTER: use for loop to reduce the lines
|
|
|
|
#NOTICE: g++ -MM will run error if linking failed, like Database.h/../SparlParser.h/../antlr3.h
|
|
|
|
|
2015-11-06 19:13:39 +08:00
|
|
|
#executables begin
|
|
|
|
|
2016-04-01 20:58:15 +08:00
|
|
|
#NOTICE:not include g*.o in objfile due to multiple definitions of main()
|
2017-01-16 14:12:57 +08:00
|
|
|
$(exedir)gbuild: $(lib_antlr) $(objdir)gbuild.o $(objfile)
|
|
|
|
$(CC) $(EXEFLAG) -o $(exedir)gbuild $(objdir)gbuild.o $(objfile) $(library)
|
2015-11-06 19:13:39 +08:00
|
|
|
|
2016-04-01 20:58:15 +08:00
|
|
|
$(exedir)gquery: $(lib_antlr) $(objdir)gquery.o $(objfile)
|
|
|
|
$(CC) $(EXEFLAG) -o $(exedir)gquery $(objdir)gquery.o $(objfile) $(library)
|
2015-11-06 19:13:39 +08:00
|
|
|
|
2016-04-01 20:58:15 +08:00
|
|
|
$(exedir)gserver: $(lib_antlr) $(objdir)gserver.o $(objfile)
|
|
|
|
$(CC) $(EXEFLAG) -o $(exedir)gserver $(objdir)gserver.o $(objfile) $(library)
|
2015-11-06 19:13:39 +08:00
|
|
|
|
2016-04-01 20:58:15 +08:00
|
|
|
$(exedir)gclient: $(lib_antlr) $(objdir)gclient.o $(objfile)
|
|
|
|
$(CC) $(EXEFLAG) -o $(exedir)gclient $(objdir)gclient.o $(objfile) $(library)
|
|
|
|
|
|
|
|
$(exedir)gconsole: $(lib_antlr) $(objdir)gconsole.o $(objfile) $(api_cpp)
|
|
|
|
$(CC) $(EXEFLAG) -o $(exedir)gconsole $(objdir)gconsole.o $(objfile) $(library) -L./api/cpp/lib -lgstoreconnector
|
2015-11-06 19:13:39 +08:00
|
|
|
|
2017-05-16 21:27:20 +08:00
|
|
|
$(exedir)HttpConnector: $(lib_antlr) $(objdir)HttpConnector.o ./Server/server_http.hpp ./Server/client_http.hpp $(objfile)
|
2017-05-17 20:50:23 +08:00
|
|
|
$(CC) $(EXEFLAG) -o $(exedir)HttpConnector $(objdir)HttpConnector.o $(objfile) $(library) $(inc) -DUSE_BOOST_REGEX
|
2017-05-16 21:27:20 +08:00
|
|
|
|
|
|
|
|
2015-11-06 19:13:39 +08:00
|
|
|
#executables end
|
|
|
|
|
|
|
|
|
|
|
|
#objects in Main/ begin
|
|
|
|
|
2017-01-16 14:12:57 +08:00
|
|
|
$(objdir)gbuild.o: Main/gbuild.cpp Database/Database.h Util/Util.h $(lib_antlr)
|
|
|
|
$(CC) $(CFLAGS) Main/gbuild.cpp $(inc) -o $(objdir)gbuild.o
|
2015-11-06 19:13:39 +08:00
|
|
|
|
2017-01-16 14:12:57 +08:00
|
|
|
$(objdir)gquery.o: Main/gquery.cpp Database/Database.h Util/Util.h $(lib_antlr)
|
2016-03-04 16:49:06 +08:00
|
|
|
$(CC) $(CFLAGS) Main/gquery.cpp $(inc) -o $(objdir)gquery.o #-DREADLINE_ON
|
2015-11-06 19:13:39 +08:00
|
|
|
#add -DREADLINE_ON if using readline
|
|
|
|
|
2017-01-16 14:12:57 +08:00
|
|
|
$(objdir)gserver.o: Main/gserver.cpp Server/Server.h Util/Util.h $(lib_antlr)
|
2015-11-06 19:13:39 +08:00
|
|
|
$(CC) $(CFLAGS) Main/gserver.cpp $(inc) -o $(objdir)gserver.o
|
|
|
|
|
2017-01-16 14:12:57 +08:00
|
|
|
$(objdir)gclient.o: Main/gclient.cpp Server/Client.h Util/Util.h $(lib_antlr)
|
2016-03-04 16:49:06 +08:00
|
|
|
$(CC) $(CFLAGS) Main/gclient.cpp $(inc) -o $(objdir)gclient.o #-DREADLINE_ON
|
2015-11-06 19:13:39 +08:00
|
|
|
|
2017-01-16 14:12:57 +08:00
|
|
|
$(objdir)gconsole.o: Main/gconsole.cpp Database/Database.h Util/Util.h api/cpp/src/GstoreConnector.h $(lib_antlr)
|
2016-04-01 20:58:15 +08:00
|
|
|
$(CC) $(CFLAGS) Main/gconsole.cpp $(inc) -o $(objdir)gconsole.o -I./api/cpp/src/ #-DREADLINE_ON
|
|
|
|
|
2017-05-16 21:27:20 +08:00
|
|
|
$(objdir)HttpConnector.o: Main/HttpConnector.cpp Server/server_http.hpp Server/client_http.hpp Database/Database.h Util/Util.h $(lib_antlr)
|
2017-05-17 20:50:23 +08:00
|
|
|
$(CC) $(CFLAGS) Main/HttpConnector.cpp $(inc) -o $(objdir)HttpConnector.o -DUSE_BOOST_REGEX
|
2017-05-16 21:27:20 +08:00
|
|
|
|
|
|
|
|
2015-11-06 19:13:39 +08:00
|
|
|
#objects in Main/ end
|
|
|
|
|
|
|
|
|
|
|
|
#objects in kvstore/ begin
|
|
|
|
|
2016-09-18 20:01:57 +08:00
|
|
|
#objects in sstree/ begin
|
2017-01-16 14:12:57 +08:00
|
|
|
#$(objdir)Tree.o: KVstore/SSTree/Tree.cpp KVstore/SSTree/Tree.h $(objdir)Stream.o
|
|
|
|
#$(CC) $(CFLAGS) KVstore/SSTree/Tree.cpp -o $(objdir)Tree.o
|
2016-09-18 20:01:57 +08:00
|
|
|
|
2017-01-16 14:12:57 +08:00
|
|
|
#$(objdir)Storage.o: KVstore/SSTree/storage/Storage.cpp KVstore/SSTree/storage/Storage.h $(objdir)Util.o
|
|
|
|
#$(CC) $(CFLAGS) KVstore/SSTree/storage/Storage.cpp -o $(objdir)Storage.o $(def64IO)
|
2016-09-18 20:01:57 +08:00
|
|
|
|
2017-01-16 14:12:57 +08:00
|
|
|
#$(objdir)Node.o: KVstore/SSTree/node/Node.cpp KVstore/SSTree/node/Node.h $(objdir)Util.o
|
|
|
|
#$(CC) $(CFLAGS) KVstore/SSTree/node/Node.cpp -o $(objdir)Node.o
|
2016-09-18 20:01:57 +08:00
|
|
|
|
2017-01-16 14:12:57 +08:00
|
|
|
#$(objdir)IntlNode.o: KVstore/SSTree/node/IntlNode.cpp KVstore/SSTree/node/IntlNode.h
|
|
|
|
#$(CC) $(CFLAGS) KVstore/SSTree/node/IntlNode.cpp -o $(objdir)IntlNode.o
|
2016-09-18 20:01:57 +08:00
|
|
|
|
2017-01-16 14:12:57 +08:00
|
|
|
#$(objdir)LeafNode.o: KVstore/SSTree/node/LeafNode.cpp KVstore/SSTree/node/LeafNode.h
|
|
|
|
#$(CC) $(CFLAGS) KVstore/SSTree/node/LeafNode.cpp -o $(objdir)LeafNode.o
|
2016-09-18 20:01:57 +08:00
|
|
|
|
2017-01-16 14:12:57 +08:00
|
|
|
#$(objdir)Heap.o: KVstore/SSTree/heap/Heap.cpp KVstore/SSTree/heap/Heap.h $(objdir)Util.o
|
|
|
|
#$(CC) $(CFLAGS) KVstore/SSTree/heap/Heap.cpp -o $(objdir)Heap.o
|
2016-09-18 20:01:57 +08:00
|
|
|
#objects in sstree/ end
|
2015-11-06 19:13:39 +08:00
|
|
|
|
2016-09-18 20:01:57 +08:00
|
|
|
#objects in sitree/ begin
|
2017-01-16 14:12:57 +08:00
|
|
|
$(objdir)SITree.o: KVstore/SITree/SITree.cpp KVstore/SITree/SITree.h $(objdir)Stream.o
|
|
|
|
$(CC) $(CFLAGS) KVstore/SITree/SITree.cpp -o $(objdir)SITree.o
|
2015-11-06 19:13:39 +08:00
|
|
|
|
2017-01-16 14:12:57 +08:00
|
|
|
$(objdir)SIStorage.o: KVstore/SITree/storage/SIStorage.cpp KVstore/SITree/storage/SIStorage.h $(objdir)Util.o
|
|
|
|
$(CC) $(CFLAGS) KVstore/SITree/storage/SIStorage.cpp -o $(objdir)SIStorage.o $(def64IO)
|
2015-11-06 19:13:39 +08:00
|
|
|
|
2017-01-16 14:12:57 +08:00
|
|
|
$(objdir)SINode.o: KVstore/SITree/node/SINode.cpp KVstore/SITree/node/SINode.h $(objdir)Util.o
|
|
|
|
$(CC) $(CFLAGS) KVstore/SITree/node/SINode.cpp -o $(objdir)SINode.o
|
2015-11-06 19:13:39 +08:00
|
|
|
|
2017-01-16 14:12:57 +08:00
|
|
|
$(objdir)SIIntlNode.o: KVstore/SITree/node/SIIntlNode.cpp KVstore/SITree/node/SIIntlNode.h
|
|
|
|
$(CC) $(CFLAGS) KVstore/SITree/node/SIIntlNode.cpp -o $(objdir)SIIntlNode.o
|
2015-11-06 19:13:39 +08:00
|
|
|
|
2017-01-16 14:12:57 +08:00
|
|
|
$(objdir)SILeafNode.o: KVstore/SITree/node/SILeafNode.cpp KVstore/SITree/node/SILeafNode.h
|
|
|
|
$(CC) $(CFLAGS) KVstore/SITree/node/SILeafNode.cpp -o $(objdir)SILeafNode.o
|
2015-11-06 19:13:39 +08:00
|
|
|
|
2017-01-16 14:12:57 +08:00
|
|
|
$(objdir)SIHeap.o: KVstore/SITree/heap/SIHeap.cpp KVstore/SITree/heap/SIHeap.h $(objdir)Util.o
|
|
|
|
$(CC) $(CFLAGS) KVstore/SITree/heap/SIHeap.cpp -o $(objdir)SIHeap.o
|
2016-09-18 20:01:57 +08:00
|
|
|
#objects in sitree/ end
|
|
|
|
|
|
|
|
#objects in istree/ begin
|
2017-01-16 14:12:57 +08:00
|
|
|
$(objdir)ISTree.o: KVstore/ISTree/ISTree.cpp KVstore/ISTree/ISTree.h $(objdir)Stream.o
|
|
|
|
$(CC) $(CFLAGS) KVstore/ISTree/ISTree.cpp -o $(objdir)ISTree.o
|
2016-09-18 20:01:57 +08:00
|
|
|
|
2017-01-16 14:12:57 +08:00
|
|
|
$(objdir)ISStorage.o: KVstore/ISTree/storage/ISStorage.cpp KVstore/ISTree/storage/ISStorage.h $(objdir)Util.o
|
|
|
|
$(CC) $(CFLAGS) KVstore/ISTree/storage/ISStorage.cpp -o $(objdir)ISStorage.o $(def64IO)
|
2016-09-18 20:01:57 +08:00
|
|
|
|
2017-01-16 14:12:57 +08:00
|
|
|
$(objdir)ISNode.o: KVstore/ISTree/node/ISNode.cpp KVstore/ISTree/node/ISNode.h $(objdir)Util.o
|
|
|
|
$(CC) $(CFLAGS) KVstore/ISTree/node/ISNode.cpp -o $(objdir)ISNode.o
|
2016-09-18 20:01:57 +08:00
|
|
|
|
2017-01-16 14:12:57 +08:00
|
|
|
$(objdir)ISIntlNode.o: KVstore/ISTree/node/ISIntlNode.cpp KVstore/ISTree/node/ISIntlNode.h
|
|
|
|
$(CC) $(CFLAGS) KVstore/ISTree/node/ISIntlNode.cpp -o $(objdir)ISIntlNode.o
|
2016-09-18 20:01:57 +08:00
|
|
|
|
2017-01-16 14:12:57 +08:00
|
|
|
$(objdir)ISLeafNode.o: KVstore/ISTree/node/ISLeafNode.cpp KVstore/ISTree/node/ISLeafNode.h
|
|
|
|
$(CC) $(CFLAGS) KVstore/ISTree/node/ISLeafNode.cpp -o $(objdir)ISLeafNode.o
|
2016-09-18 20:01:57 +08:00
|
|
|
|
2017-01-16 14:12:57 +08:00
|
|
|
$(objdir)ISHeap.o: KVstore/ISTree/heap/ISHeap.cpp KVstore/ISTree/heap/ISHeap.h $(objdir)Util.o
|
|
|
|
$(CC) $(CFLAGS) KVstore/ISTree/heap/ISHeap.cpp -o $(objdir)ISHeap.o
|
2016-09-18 20:01:57 +08:00
|
|
|
#objects in istree/ end
|
|
|
|
|
2017-03-28 16:56:16 +08:00
|
|
|
#objects in ivtree/ begin
|
2017-03-31 00:23:16 +08:00
|
|
|
$(objdir)IVTree.o: KVstore/IVTree/IVTree.cpp KVstore/IVTree/IVTree.h $(objdir)Stream.o $(objdir)VList.o
|
2017-03-28 16:56:16 +08:00
|
|
|
$(CC) $(CFLAGS) KVstore/IVTree/IVTree.cpp -o $(objdir)IVTree.o
|
|
|
|
|
|
|
|
$(objdir)IVStorage.o: KVstore/IVTree/storage/IVStorage.cpp KVstore/IVTree/storage/IVStorage.h $(objdir)Util.o
|
|
|
|
$(CC) $(CFLAGS) KVstore/IVTree/storage/IVStorage.cpp -o $(objdir)IVStorage.o $(def64IO)
|
|
|
|
|
|
|
|
$(objdir)IVNode.o: KVstore/IVTree/node/IVNode.cpp KVstore/IVTree/node/IVNode.h $(objdir)Util.o
|
|
|
|
$(CC) $(CFLAGS) KVstore/IVTree/node/IVNode.cpp -o $(objdir)IVNode.o
|
|
|
|
|
|
|
|
$(objdir)IVIntlNode.o: KVstore/IVTree/node/IVIntlNode.cpp KVstore/IVTree/node/IVIntlNode.h
|
|
|
|
$(CC) $(CFLAGS) KVstore/IVTree/node/IVIntlNode.cpp -o $(objdir)IVIntlNode.o
|
|
|
|
|
|
|
|
$(objdir)IVLeafNode.o: KVstore/IVTree/node/IVLeafNode.cpp KVstore/IVTree/node/IVLeafNode.h
|
|
|
|
$(CC) $(CFLAGS) KVstore/IVTree/node/IVLeafNode.cpp -o $(objdir)IVLeafNode.o
|
|
|
|
|
|
|
|
$(objdir)IVHeap.o: KVstore/IVTree/heap/IVHeap.cpp KVstore/IVTree/heap/IVHeap.h $(objdir)Util.o
|
|
|
|
$(CC) $(CFLAGS) KVstore/IVTree/heap/IVHeap.cpp -o $(objdir)IVHeap.o
|
|
|
|
#objects in ivtree/ end
|
|
|
|
|
2016-09-18 20:01:57 +08:00
|
|
|
$(objdir)KVstore.o: KVstore/KVstore.cpp KVstore/KVstore.h KVstore/Tree.h
|
2015-11-06 19:13:39 +08:00
|
|
|
$(CC) $(CFLAGS) KVstore/KVstore.cpp $(inc) -o $(objdir)KVstore.o
|
|
|
|
|
|
|
|
#objects in kvstore/ end
|
|
|
|
|
|
|
|
|
|
|
|
#objects in Database/ begin
|
|
|
|
|
|
|
|
$(objdir)Database.o: Database/Database.cpp Database/Database.h \
|
|
|
|
$(objdir)IDList.o $(objdir)ResultSet.o $(objdir)SPARQLquery.o \
|
|
|
|
$(objdir)BasicQuery.o $(objdir)Triple.o $(objdir)SigEntry.o \
|
|
|
|
$(objdir)KVstore.o $(objdir)VSTree.o $(objdir)DBparser.o \
|
2016-09-25 22:14:36 +08:00
|
|
|
$(objdir)Util.o $(objdir)RDFParser.o $(objdir)Join.o $(objdir)GeneralEvaluation.o $(objdir)StringIndex.o
|
2015-11-06 19:13:39 +08:00
|
|
|
$(CC) $(CFLAGS) Database/Database.cpp $(inc) -o $(objdir)Database.o
|
|
|
|
|
2016-05-16 03:16:22 +08:00
|
|
|
$(objdir)Join.o: Database/Join.cpp Database/Join.h $(objdir)IDList.o $(objdir)BasicQuery.o $(objdir)Util.o\
|
2016-04-01 20:58:15 +08:00
|
|
|
$(objdir)KVstore.o $(objdir)Util.o $(objdir)SPARQLquery.o
|
|
|
|
$(CC) $(CFLAGS) Database/Join.cpp $(inc) -o $(objdir)Join.o
|
|
|
|
|
2016-05-16 03:16:22 +08:00
|
|
|
$(objdir)Strategy.o: Database/Strategy.cpp Database/Strategy.h $(objdir)SPARQLquery.o $(objdir)BasicQuery.o \
|
2016-09-25 22:14:36 +08:00
|
|
|
$(objdir)Triple.o $(objdir)IDList.o $(objdir)KVstore.o $(objdir)VSTree.o $(objdir)Util.o $(objdir)Join.o $(objdir)ResultFilter.o
|
2016-05-16 03:16:22 +08:00
|
|
|
$(CC) $(CFLAGS) Database/Strategy.cpp $(inc) -o $(objdir)Strategy.o
|
|
|
|
|
2015-11-06 19:13:39 +08:00
|
|
|
#objects in Database/ end
|
|
|
|
|
|
|
|
|
|
|
|
#objects in Query/ begin
|
|
|
|
|
|
|
|
$(objdir)IDList.o: Query/IDList.cpp Query/IDList.h
|
|
|
|
$(CC) $(CFLAGS) Query/IDList.cpp $(inc) -o $(objdir)IDList.o
|
|
|
|
|
|
|
|
$(objdir)SPARQLquery.o: Query/SPARQLquery.cpp Query/SPARQLquery.h $(objdir)BasicQuery.o
|
|
|
|
$(CC) $(CFLAGS) Query/SPARQLquery.cpp $(inc) -o $(objdir)SPARQLquery.o
|
|
|
|
|
|
|
|
$(objdir)BasicQuery.o: Query/BasicQuery.cpp Query/BasicQuery.h $(objdir)Signature.o
|
|
|
|
$(CC) $(CFLAGS) Query/BasicQuery.cpp $(inc) -o $(objdir)BasicQuery.o
|
2016-04-01 20:58:15 +08:00
|
|
|
|
|
|
|
$(objdir)ResultSet.o: Query/ResultSet.cpp Query/ResultSet.h $(objdir)Stream.o
|
2015-11-06 19:13:39 +08:00
|
|
|
$(CC) $(CFLAGS) Query/ResultSet.cpp $(inc) -o $(objdir)ResultSet.o
|
|
|
|
|
2016-04-01 20:58:15 +08:00
|
|
|
$(objdir)Varset.o: Query/Varset.cpp Query/Varset.h
|
|
|
|
$(CC) $(CFLAGS) Query/Varset.cpp $(inc) -o $(objdir)Varset.o
|
|
|
|
|
|
|
|
$(objdir)QueryTree.o: Query/QueryTree.cpp Query/QueryTree.h $(objdir)Varset.o
|
|
|
|
$(CC) $(CFLAGS) Query/QueryTree.cpp $(inc) -o $(objdir)QueryTree.o
|
|
|
|
|
2016-09-25 22:14:36 +08:00
|
|
|
$(objdir)ResultFilter.o: Query/ResultFilter.cpp Query/ResultFilter.h $(objdir)BasicQuery.o $(objdir)SPARQLquery.o $(objdir)Util.o
|
2016-05-16 03:16:22 +08:00
|
|
|
$(CC) $(CFLAGS) Query/ResultFilter.cpp $(inc) -o $(objdir)ResultFilter.o
|
|
|
|
|
2016-09-25 22:14:36 +08:00
|
|
|
#no more using $(objdir)Database.o
|
2016-05-16 03:16:22 +08:00
|
|
|
$(objdir)GeneralEvaluation.o: Query/GeneralEvaluation.cpp Query/GeneralEvaluation.h $(objdir)QueryParser.o $(objdir)QueryTree.o \
|
2016-09-25 22:14:36 +08:00
|
|
|
$(objdir)SPARQLquery.o $(objdir)Varset.o $(objdir)KVstore.o $(objdir)ResultFilter.o $(objdir)Strategy.o $(objdir)StringIndex.o
|
2016-04-01 20:58:15 +08:00
|
|
|
$(CC) $(CFLAGS) Query/GeneralEvaluation.cpp $(inc) -o $(objdir)GeneralEvaluation.o
|
|
|
|
|
2015-11-06 19:13:39 +08:00
|
|
|
#objects in Query/ end
|
|
|
|
|
|
|
|
|
|
|
|
#objects in Signature/ begin
|
|
|
|
|
|
|
|
$(objdir)SigEntry.o: Signature/SigEntry.cpp Signature/SigEntry.h $(objdir)Signature.o
|
|
|
|
$(CC) $(CFLAGS) Signature/SigEntry.cpp $(inc) -o $(objdir)SigEntry.o
|
|
|
|
|
|
|
|
$(objdir)Signature.o: Signature/Signature.cpp Signature/Signature.h
|
|
|
|
$(CC) $(CFLAGS) Signature/Signature.cpp $(inc) -o $(objdir)Signature.o
|
|
|
|
|
|
|
|
#objects in Signature/ end
|
|
|
|
|
|
|
|
|
|
|
|
#objects in Util/ begin
|
|
|
|
|
|
|
|
$(objdir)Util.o: Util/Util.cpp Util/Util.h
|
|
|
|
$(CC) $(CFLAGS) Util/Util.cpp -o $(objdir)Util.o
|
|
|
|
|
2016-04-01 20:58:15 +08:00
|
|
|
$(objdir)Stream.o: Util/Stream.cpp Util/Stream.h $(objdir)Util.o $(objdir)Bstr.o
|
2016-09-18 20:01:57 +08:00
|
|
|
$(CC) $(CFLAGS) Util/Stream.cpp -o $(objdir)Stream.o $(def64IO)
|
2015-11-06 19:13:39 +08:00
|
|
|
|
2016-04-01 20:58:15 +08:00
|
|
|
$(objdir)Bstr.o: Util/Bstr.cpp Util/Bstr.h $(objdir)Util.o
|
|
|
|
$(CC) $(CFLAGS) Util/Bstr.cpp -o $(objdir)Bstr.o
|
|
|
|
|
|
|
|
$(objdir)Triple.o: Util/Triple.cpp Util/Triple.h $(objdir)Util.o
|
|
|
|
$(CC) $(CFLAGS) Util/Triple.cpp -o $(objdir)Triple.o
|
|
|
|
|
|
|
|
$(objdir)BloomFilter.o: Util/BloomFilter.cpp Util/BloomFilter.h $(objdir)Util.o
|
|
|
|
$(CC) $(CFLAGS) Util/BloomFilter.cpp -o $(objdir)BloomFilter.o
|
|
|
|
|
2017-03-31 00:23:16 +08:00
|
|
|
$(objdir)VList.o: Util/VList.cpp Util/VList.h
|
|
|
|
$(CC) $(CFLAGS) Util/VList.cpp -o $(objdir)VList.o
|
|
|
|
|
2015-11-06 19:13:39 +08:00
|
|
|
#objects in util/ end
|
|
|
|
|
|
|
|
|
|
|
|
#objects in VSTree/ begin
|
|
|
|
|
|
|
|
$(objdir)VSTree.o: VSTree/VSTree.cpp VSTree/VSTree.h $(objdir)EntryBuffer.o $(objdir)LRUCache.o $(objdir)VNode.o
|
2016-09-18 20:01:57 +08:00
|
|
|
$(CC) $(CFLAGS) VSTree/VSTree.cpp $(inc) -o $(objdir)VSTree.o $(def64IO)
|
2015-11-06 19:13:39 +08:00
|
|
|
|
|
|
|
$(objdir)EntryBuffer.o: VSTree/EntryBuffer.cpp VSTree/EntryBuffer.h Signature/SigEntry.h
|
2016-09-18 20:01:57 +08:00
|
|
|
$(CC) $(CFLAGS) VSTree/EntryBuffer.cpp $(inc) -o $(objdir)EntryBuffer.o $(def64IO)
|
2015-11-06 19:13:39 +08:00
|
|
|
|
|
|
|
$(objdir)LRUCache.o: VSTree/LRUCache.cpp VSTree/LRUCache.h VSTree/VNode.h
|
2016-09-18 20:01:57 +08:00
|
|
|
$(CC) $(CFLAGS) VSTree/LRUCache.cpp $(inc) -o $(objdir)LRUCache.o $(def64IO)
|
2015-11-06 19:13:39 +08:00
|
|
|
|
|
|
|
$(objdir)VNode.o: VSTree/VNode.cpp VSTree/VNode.h
|
2016-09-18 20:01:57 +08:00
|
|
|
$(CC) $(CFLAGS) VSTree/VNode.cpp $(inc) -o $(objdir)VNode.o $(def64IO)
|
2015-11-06 19:13:39 +08:00
|
|
|
|
|
|
|
#objects in VSTree/ end
|
|
|
|
|
|
|
|
|
2016-09-25 22:14:36 +08:00
|
|
|
#objects in StringIndex/ begin
|
|
|
|
$(objdir)StringIndex.o: StringIndex/StringIndex.cpp StringIndex/StringIndex.h $(objdir)KVstore.o $(objdir)Util.o
|
|
|
|
|
|
|
|
$(CC) $(CFLAGS) StringIndex/StringIndex.cpp $(inc) -o $(objdir)StringIndex.o
|
|
|
|
#objects in StringIndex/ end
|
|
|
|
|
|
|
|
|
2015-11-06 19:13:39 +08:00
|
|
|
#objects in Parser/ begin
|
|
|
|
|
|
|
|
$(objdir)DBparser.o: Parser/DBparser.cpp Parser/DBparser.h $(objdir)SparqlParser.o $(objdir)SparqlLexer.o $(objdir)Triple.o
|
|
|
|
$(CC) $(CFLAGS) Parser/DBparser.cpp $(inc) -o $(objdir)DBparser.o
|
|
|
|
|
|
|
|
$(objdir)SparqlParser.o: Parser/SparqlParser.c Parser/SparqlParser.h
|
|
|
|
gcc $(CFLAGS) Parser/SparqlParser.c $(inc) -o $(objdir)SparqlParser.o
|
|
|
|
|
|
|
|
$(objdir)SparqlLexer.o: Parser/SparqlLexer.c Parser/SparqlLexer.h
|
|
|
|
gcc $(CFLAGS) Parser/SparqlLexer.c $(inc) -o $(objdir)SparqlLexer.o
|
|
|
|
|
|
|
|
$(objdir)TurtleParser.o: Parser/TurtleParser.cpp Parser/TurtleParser.h Parser/Type.h
|
|
|
|
gcc $(CFLAGS) Parser/TurtleParser.cpp $(inc) -o $(objdir)TurtleParser.o
|
|
|
|
|
|
|
|
$(objdir)RDFParser.o: Parser/RDFParser.cpp Parser/RDFParser.h $(objdir)TurtleParser.o $(objdir)Triple.o
|
|
|
|
gcc $(CFLAGS) Parser/RDFParser.cpp $(inc) -o $(objdir)RDFParser.o
|
|
|
|
|
2016-04-01 20:58:15 +08:00
|
|
|
$(objdir)QueryParser.o: Parser/QueryParser.cpp Parser/QueryParser.h $(objdir)SparqlParser.o $(objdir)SparqlLexer.o $(objdir)QueryTree.o
|
|
|
|
$(CC) $(CFLAGS) Parser/QueryParser.cpp $(inc) -o $(objdir)QueryParser.o
|
|
|
|
|
2015-11-06 19:13:39 +08:00
|
|
|
#objects in Parser/ end
|
|
|
|
|
|
|
|
|
|
|
|
#objects in Server/ begin
|
|
|
|
|
|
|
|
$(objdir)Operation.o: Server/Operation.cpp Server/Operation.h
|
|
|
|
$(CC) $(CFLAGS) Server/Operation.cpp $(inc) -o $(objdir)Operation.o
|
|
|
|
|
|
|
|
$(objdir)Socket.o: Server/Socket.cpp Server/Socket.h
|
|
|
|
$(CC) $(CFLAGS) Server/Socket.cpp $(inc) -o $(objdir)Socket.o
|
|
|
|
|
|
|
|
$(objdir)Server.o: Server/Server.cpp Server/Server.h $(objdir)Socket.o $(objdir)Database.o $(objdir)Operation.o
|
|
|
|
$(CC) $(CFLAGS) Server/Server.cpp $(inc) -o $(objdir)Server.o
|
|
|
|
|
2016-03-04 16:49:06 +08:00
|
|
|
$(objdir)Client.o: Server/Client.cpp Server/Client.h $(objdir)Socket.o $(objdir)Util.o
|
2015-11-06 19:13:39 +08:00
|
|
|
$(CC) $(CFLAGS) Server/Client.cpp $(inc) -o $(objdir)Client.o
|
|
|
|
|
2017-05-16 21:27:20 +08:00
|
|
|
# $(objdir)client_http.o: Server/client_http.hpp
|
|
|
|
# $(CC) $(CFLAGS) Server/client_http.hpp $(inc) -o $(objdir)client_http.o
|
|
|
|
|
|
|
|
# $(objdir)server_http.o: Server/server_http.hpp
|
|
|
|
# $(CC) $(CFLAGS) Server/server_http.hpp $(inc) -o $(objdir)server_http.o
|
|
|
|
|
2015-11-06 19:13:39 +08:00
|
|
|
#objects in Server/ end
|
|
|
|
|
|
|
|
|
2016-04-01 20:58:15 +08:00
|
|
|
$(lib_antlr):
|
2016-03-11 16:35:47 +08:00
|
|
|
rm -rf tools/libantlr3c-3.4/
|
|
|
|
cd tools; tar -xzvf libantlr3c-3.4.tar.gz;
|
2016-04-01 20:58:15 +08:00
|
|
|
cd tools; cd libantlr3c-3.4/; ./configure -enable-64bit; make;
|
2015-11-06 19:13:39 +08:00
|
|
|
rm -rf lib/libantlr.a
|
|
|
|
ar -crv lib/libantlr.a tools/libantlr3c-3.4/*.o
|
2016-04-01 20:58:15 +08:00
|
|
|
#NOTICE: update the sparql.tar.gz if Sparql* in Parser are changed manually
|
|
|
|
rm -rf Parser/Sparql*
|
|
|
|
cd tools; tar -xzvf sparql.tar.gz; mv Sparql* ../Parser/;
|
2015-11-06 19:13:39 +08:00
|
|
|
|
2016-04-01 20:58:15 +08:00
|
|
|
$(api_cpp): $(objdir)Socket.o
|
2016-03-04 16:49:06 +08:00
|
|
|
$(MAKE) -C api/cpp/src
|
2016-04-01 20:58:15 +08:00
|
|
|
|
|
|
|
$(api_java):
|
2016-03-04 16:49:06 +08:00
|
|
|
$(MAKE) -C api/java/src
|
|
|
|
|
|
|
|
.PHONY: clean dist tarball api_example gtest sumlines
|
2015-11-06 19:13:39 +08:00
|
|
|
|
|
|
|
clean:
|
2017-01-16 14:12:57 +08:00
|
|
|
rm -rf lib/libantlr.a
|
2016-03-04 16:49:06 +08:00
|
|
|
$(MAKE) -C api/cpp/src clean
|
|
|
|
$(MAKE) -C api/cpp/example clean
|
|
|
|
$(MAKE) -C api/java/src clean
|
|
|
|
$(MAKE) -C api/java/example clean
|
2015-11-06 19:13:39 +08:00
|
|
|
#$(MAKE) -C KVstore clean
|
2017-01-16 14:12:57 +08:00
|
|
|
rm -rf $(exedir)g* $(objdir)*.o $(exedir).gserver*
|
2016-03-04 16:49:06 +08:00
|
|
|
#rm -rf .project .cproject .settings just for eclipse
|
|
|
|
#rm -rf cscope* just for vim
|
2017-02-17 17:09:47 +08:00
|
|
|
rm -rf logs/*.log
|
2015-11-06 19:13:39 +08:00
|
|
|
|
|
|
|
dist: clean
|
2016-04-01 20:58:15 +08:00
|
|
|
rm -rf *.nt *.n3 .debug/*.log .tmp/*.dat *.txt *.db
|
|
|
|
rm -rf tools/libantlr3c-3.4 lib/libantlr.a Parser/Sparql*
|
2017-02-17 17:09:47 +08:00
|
|
|
#rm -rf Parser/SparqlLexer* Parser/SparlParser.cpp
|
2016-05-16 03:16:22 +08:00
|
|
|
rm -rf cscope* .cproject .settings tags
|
2017-01-16 14:12:57 +08:00
|
|
|
rm -rf *.info
|
2015-11-06 19:13:39 +08:00
|
|
|
|
|
|
|
tarball:
|
2017-02-08 16:29:53 +08:00
|
|
|
tar -czvf devGstore.tar.gz api bin lib tools .debug .tmp .objs test docs data makefile \
|
2017-03-24 20:10:43 +08:00
|
|
|
Main Database KVstore Util Query Signature VSTree Parser Server README.md init.conf NOTES.md StringIndex COVERAGE
|
2016-03-04 16:49:06 +08:00
|
|
|
|
2016-04-01 20:58:15 +08:00
|
|
|
APIexample: $(api_cpp) $(api_java)
|
2016-03-04 16:49:06 +08:00
|
|
|
$(MAKE) -C api/cpp/example
|
|
|
|
$(MAKE) -C api/java/example
|
|
|
|
|
|
|
|
gtest: $(objdir)gtest.o $(objfile)
|
2016-09-18 20:01:57 +08:00
|
|
|
$(CC) $(EXEFLAG) -o $(exedir)gtest $(objdir)gtest.o $(objfile) lib/libantlr.a $(library)
|
2016-03-04 16:49:06 +08:00
|
|
|
|
|
|
|
$(objdir)gtest.o: test/gtest.cpp
|
|
|
|
$(CC) $(CFLAGS) test/gtest.cpp $(inc) -o $(objdir)gtest.o
|
|
|
|
|
2016-09-18 20:01:57 +08:00
|
|
|
$(exedir)gadd: $(objdir)gadd.o $(objfile)
|
|
|
|
$(CC) $(EXEFLAG) -o $(exedir)gadd $(objdir)gadd.o $(objfile) lib/libantlr.a $(library)
|
|
|
|
|
|
|
|
$(objdir)gadd.o: Main/gadd.cpp
|
|
|
|
$(CC) $(CFLAGS) Main/gadd.cpp $(inc) -o $(objdir)gadd.o
|
|
|
|
|
2017-05-18 22:56:41 +08:00
|
|
|
#$(objdir)HttpConnector: $(objdir)HttpConnector.o $(objfile)
|
|
|
|
#$(CC) $(CFLAGS) -o $(exedir)HttpConnector $(objdir)HttpConnector.o $(objfile) lib/libantlr.a $(library) $(inc) -DUSE_BOOST_REGEX
|
2017-05-16 21:27:20 +08:00
|
|
|
|
2017-05-18 22:56:41 +08:00
|
|
|
#$(objdir)HttpConnector.o: Main/HttpConnector.cpp
|
|
|
|
#$(CC) $(CFLAGS) Main/HttpConnector.cpp $(inc) -o $(objdir)HttpConnector.o $(library) -DUSE_BOOST_REGEX
|
2017-05-16 21:27:20 +08:00
|
|
|
|
2016-09-18 20:01:57 +08:00
|
|
|
$(exedir)gsub: $(objdir)gsub.o $(objfile)
|
|
|
|
$(CC) $(EXEFLAG) -o $(exedir)gsub $(objdir)gsub.o $(objfile) lib/libantlr.a $(library)
|
|
|
|
|
|
|
|
$(objdir)gsub.o: Main/gsub.cpp
|
|
|
|
$(CC) $(CFLAGS) Main/gsub.cpp $(inc) -o $(objdir)gsub.o
|
|
|
|
|
2016-03-04 16:49:06 +08:00
|
|
|
sumlines:
|
|
|
|
bash test/sumline.sh
|
2015-11-06 19:13:39 +08:00
|
|
|
|
2016-05-16 03:16:22 +08:00
|
|
|
tag:
|
|
|
|
ctags -R
|
|
|
|
|
|
|
|
idx:
|
|
|
|
find `realpath .` -name "*.h" -o -name "*.c" -o -name "*.cpp" > cscope.files
|
|
|
|
cscope -bkq #-i cscope.files
|
|
|
|
|
2017-01-16 14:12:57 +08:00
|
|
|
cover:
|
|
|
|
bash test/cover.sh
|
|
|
|
|
|
|
|
fulltest:
|
|
|
|
#NOTICE:compile gstore with -O2 only
|
|
|
|
#setup new virtuoso and configure it
|
|
|
|
cp test/full_test.sh ~
|
|
|
|
cd ~
|
|
|
|
bash full_test.sh
|
|
|
|
|
2017-03-23 21:32:41 +08:00
|
|
|
#test the efficience of kvstore, insert/delete/search, use dbpedia170M by default
|
|
|
|
test-kvstore:
|
|
|
|
echo "TODO"
|
|
|
|
|