-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (44 loc) · 1.12 KB
/
Makefile
File metadata and controls
56 lines (44 loc) · 1.12 KB
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
CPPFLAGS = -Iinclude
CXXFLAGS = -Wall -Werror --std=c++14
LIBGGRAPH_SRC = \
src/aggregation/aggregation.cpp \
src/aggregation/node.cpp \
src/aggregation/view.cpp \
src/attribute.cpp \
src/fork.cpp \
src/forkjoin.cpp \
src/grain.cpp \
src/graph.cpp \
src/join.cpp \
src/linear.cpp \
src/node.cpp \
src/operation.cpp \
src/read.cpp \
src/sibling.cpp \
src/view.cpp \
GGRAPH_VIEWER_SRC = \
src/ggraph-viewer.cpp
all: debug
release: CXXFLAGS += -O3
release: libggraph.a ggraph-viewer check
debug: CPPFLAGS += -DGGRAPH_DEBUG
debug: CXXFLAGS += -O0 -g
debug: libggraph.a ggraph-viewer check
libggraph.a: $(patsubst %.cpp, %.la, $(LIBGGRAPH_SRC))
ggraph-viewer: LDFLAGS+=-L. -lggraph -ligraph
ggraph-viewer: $(patsubst %.cpp, %.o, $(GGRAPH_VIEWER_SRC)) libggraph.a
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ $^ $(LDFLAGS)
include tests/Makefile.sub
%.la: %.cpp
$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o $@ $<
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o $@ $<
%.a:
rm -f $@
ar clqv $@ $^
ranlib $@
clean:
rm -f check.log
rm -rf ggraph-viewer
rm -rf tests/test-runner
find . -name *.o -o -name *.la -o -name *.a | xargs rm -f