-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
executable file
·102 lines (74 loc) · 2.56 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
CCLIB=-lsdsl -ldivsufsort -ldivsufsort64 -Wno-comment -fopenmp
VLIB= -g -O0
LIB_DIR = ${HOME}/lib
INC_DIR = ${HOME}/include
MY_CXX_FLAGS= -std=c++11 -Wall -Wextra -DNDEBUG -D__STDC_FORMAT_MACROS
MY_CXX_OPT_FLAGS= -O3 -m64
#MY_CXX_OPT_FLAGS= $(VLIB)
MY_CXX=g++
LFLAGS = -lm -ldl
LIBOBJ = external/malloc_count/malloc_count.o\
lib/utils.o\
lib/file.o
CXX_FLAGS=$(MY_CXX_FLAGS) $(MY_CXX_OPT_FLAGS) -I$(INC_DIR) -L$(LIB_DIR) $(LFLAGS)
CLAGS= -DSYMBOLBYTES=1
####
DIR = ~/dataset/
INPUT = all_ests.fasta
K = 100
L = 5 # min_lcp
OUTPUT = 0
T = 8 # n_threads
####
all: p-apsp
#new_alg
#apsp_tustumi
#suffix_array_solution_prac
suffix_array_solution_prac: external/suffix_array_solution_prac.cpp ${LIBOBJ}
$(MY_CXX) external/suffix_array_solution_prac.cpp $(CCLIB) -o external/suffix_array_solution_prac $(CXX_FLAGS)
lib: lib/file.o
$(MY_CXX) -c lib/file.c -o lib/file.o
new_alg: lib tmp/new_alg.cpp ${LIBOBJ}
$(MY_CXX) tmp/new_alg.cpp $(CCLIB) -o tmp/new_alg ${LIBOBJ} $(CXX_FLAGS)
p-apsp: lib main.cpp ${LIBOBJ}
$(MY_CXX) main.cpp $(CCLIB) -o p-apsp ${LIBOBJ} $(CXX_FLAGS)
apsp_tustumi: lib external/apsp_tustumi.cpp
$(MY_CXX) external/apsp_tustumi.cpp $(CCLIB) -o external/apsp_tustumi ${LIBOBJ} $(CXX_FLAGS)
strip: utils/strip.cpp
$(MY_CXX) utils/strip.cpp -o utils/strip
clean:
rm external/suffix_array_solution_prac -f
rm external/malloc_count/malloc_count.o -f
rm p-apsp -f
rm tmp/new_alg -f
rm external/apsp_tustumi -f
rm *.bin -f
rm lib/*.o -f
rm *.sdsl -f
run: run_main
#run_new
run_suff:
external/suffix_array_solution_prac $(DIR) $(INPUT) $(K) $(L) $(OUTPUT)
run_main:
./p-apsp $(DIR) $(INPUT) $(K) $(L) $(OUTPUT) $(T)
run_new:
tmp/new_alg $(DIR) $(INPUT) $(K) $(L) $(OUTPUT) $(T)
run_tustumi:
external/apsp_tustumi $(DIR) $(INPUT) $(K) $(L) $(OUTPUT) $(T)
run_sof:
external/SOF/Apsp external/SOF/test.txt -o $(OUTPUT) -m $(L) -p $(T) -s 0
#$(DIR)$(INPUT)
run_strip:
utils/strip $(INPUT) $(K)
valgrind:
# valgrind --tool=memcheck --leak-check=full --track-origins=yes ./p-apsp $(DIR) $(INPUT) $(K) $(L) $(OUTPUT) $(T)
valgrind --tool=memcheck --leak-check=full --track-origins=yes ./new_alg $(DIR) $(INPUT) $(K) $(L) $(OUTPUT) $(T)
valgrind_new:
valgrind --tool=memcheck --leak-check=full --track-origins=yes ./new_alg $(DIR) $(INPUT) $(K) $(L) $(OUTPUT) $(T)
diff:
# ls -lh $(DIR)sdsl/output.$(INPUT).$(K).*.bin
# diff $(DIR)sdsl/output.$(INPUT).$(K).seq.bin $(DIR)sdsl/output.$(INPUT).$(K).par.bin
diff $(DIR)sdsl/output.$(INPUT).$(K).par.bin $(DIR)sdsl/output.$(INPUT).$(K).new.bin
remove:
rm $(DIR)sdsl/*.sdsl
rm $(DIR)sdsl/*.bin