forked from snap-stanford/snap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
76 lines (65 loc) · 1.55 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#
# Makefile for non-Microsoft compilers
# tested only on Linux, Mac OS X
#
# Prerequisites:
# - download google test: https://code.google.com/p/googletest/
#
# Compile and run all the tests:
# make run
#
# Note:
# graphviz test files were generated with graphviz version 2.38.0
include ../Makefile.config
CXXFLAGS += $(CXXOPENMP)
LIBS += -lgtest
# use the following line for linking the static library
#LIBS += $(HOME)/miniconda3/lib/libgtest.a
## Main application file
MAIN = run-all-tests
TEST_SRCS = \
test-helper.cpp \
test-TUNGraph.cpp test-TNGraph.cpp \
test-TNEGraph.cpp test-TNEANet.cpp \
test-TNodeNet.cpp test-TNodeEDatNet.cpp test-TNodeEdgeNet.cpp \
test-TTable.cpp \
test-TUndirNet.cpp test-TDirNet.cpp \
test-TMMNet.cpp \
test-TModeNet.cpp \
test-TCrossNet.cpp \
test-multimodal.cpp \
test-subgraph.cpp \
test-TStrPool.cpp \
test-TSysTm.cpp \
test-ggen.cpp \
test-gio.cpp \
test-gviz.cpp \
test-cncom.cpp \
test-bfsdfs.cpp \
test-alg.cpp \
test-triad.cpp \
test-THash.cpp \
test-THashSet.cpp \
test-TAttr.cpp \
test-flow.cpp \
test-randwalk.cpp \
test-priority-queue.cpp \
test-sim.cpp
TEST_OBJS = $(TEST_SRCS:.cpp=.o)
all: $(MAIN)
run: test
# COMPILE
.cpp.o:
$(CC) $(CXXFLAGS) -I$(CSNAP) -I$(CGLIB) -c $<
$(MAIN): $(MAIN).o $(TEST_OBJS) $(CSNAP)/Snap.o
$(CC) $(CXXFLAGS) -o $(MAIN) $^ -I$(CSNAP) -I$(CGLIB) $(LDFLAGS) $(LIBS)
$(CSNAP)/Snap.o:
$(MAKE) -C $(CSNAP)
test: $(MAIN)
./$(MAIN)
clean:
rm -f *.o $(MAIN) $(MAIN).exe
rm -rf Debug Release
rm -rf demo*.dat test*.dat *.Err
rm -rf graphviz/test_*
rm -rf table/p1.txt