-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
59 lines (46 loc) · 1.11 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
DIR = ./
DEBUG =
OBJDIR = bin
TARGET = STREX
RDFOX-INCLUDE = $(DIR)/RDFox/include
TREX-INCLUDE = $(DIR)/TRex/include
ANTLR-INCLUDE = $(DIR)/antlr/antlr4-runtime
RDFOX-LIB = $(DIR)/RDFox/build/release-dll
TREX-LIB = $(DIR)/TRex/lib
ANTLR-LIB = $(DIR)/antlr/lib
INCLUDE = \
-I $(TREX-INCLUDE) \
-I $(ANTLR-INCLUDE) \
-I $(RDFOX-INCLUDE)
LIBS = \
-L $(TREX-LIB) \
-L $(ANTLR-LIB) \
-L $(RDFOX-LIB) \
-l CppRDFox \
-l TRex2 \
-l antlr4-runtime
CXX = g++
CXXFLAGS = -std=c++14 -O3 -Wall $(DEBUG)
SRCS = $(wildcard *.cpp) \
$(wildcard Parser/*.cpp) \
$(wildcard RDFStore/*.cpp) \
$(wildcard RDFConstructor/*.cpp) \
$(wildcard Eval/*.cpp) \
$(wildcard Test/*.cpp)
OBJS = $(addprefix $(OBJDIR)/, $(SRCS:.cpp=.o))
DEPS = $(addprefix $(OBJDIR)/, $(SRCS:.cpp=.d))
all: $(OBJDIR) $(TARGET)
$(TARGET): $(OBJS)
$(CXX) $(CXXFLAGS) $^ -o $@ $(LIBS)
$(OBJDIR):
mkdir $(OBJDIR)
mkdir $(OBJDIR)/Parser
mkdir $(OBJDIR)/RDFStore
mkdir $(OBJDIR)/RDFConstructor
mkdir $(OBJDIR)/Eval
mkdir $(OBJDIR)/Test
$(OBJDIR)/%.o: %.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -fPIC -MMD -MP -c $< -o $@
clean:
rm -rf $(OBJDIR) $(TARGET)
-include $(DEPS)