-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (44 loc) · 1.55 KB
/
Copy pathMakefile
File metadata and controls
61 lines (44 loc) · 1.55 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
57
58
59
60
61
SHELL := /bin/bash
all: TeraMS
.PHONY: all clean test
#numIterRand=10
#testinds = ../../data/testing/idx.fmd ../../data/testing/mtb152.fmd
optIncDir = ../include
incdir = ../thirdparty/include
libdir = ../thirdparty/lib
kseqdir = ../thirdparty/kseq
ropebwt3dir = ../../ropebwt3
ropebwt3objs = $(shell if [ ! -d $(ropebwt3dir) ]; then git clone https://github.com/lh3/ropebwt3 $(ropebwt3dir); fi &&\
grep -oPz "OBJS=.*\\\\\n.*\n" $(ropebwt3dir)/Makefile | tail -c +6 | tr -d "\\\\")
objs = $(foreach obj, $(ropebwt3objs), $(ropebwt3dir)/$(obj))
msHeads = $(optIncDir)/util/util.h\
$(optIncDir)/TeraLCP/TeraLCP.h\
$(optIncDir)/TeraIndex/TeraIndex.h\
$(optIncDir)/moveStructure/moveStructure.h\
libs = -lsdsl -lpthread -lz -lm -latomic
incs = -I$(optIncDir) -isystem$(incdir) -isystem$(ropebwt3dir) -isystem$(kseqdir)
developmentflags+= -std=c++17 -Wall -Wpedantic -Wextra -pedantic-errors -Wold-style-cast
cppflags+=$(developmentflags) -O3 -DNDEBUG
#cppflags+=$(developmentflags) -Wall -g -fsanitize=thread
ifneq ($(asan),)
cppflags+=-fsanitize=address
libs+=-fsanitize=address -ldl
endif
ifneq ($(omp),0)
cppflags+=-DLIBSAIS_OPENMP
cppflags+=-fopenmp
libs+=-fopenmp
endif
clean:
-rm TeraMS
#test: TeraMS
# set -e && \
# for testind in $(testinds); do \
# ./TeraLCP -f fmd -i $$testind -orlcp test.rlcp -t testTEMPFILE; \
# done
$(objs):
make -C $(ropebwt3dir)
$(libdir) $(incdir):
make -C ../thirdparty/
TeraMS: TeraMS.cpp $(msHeads) $(objs) $(libdir) $(incdir)
$(CXX) $(cppflags) $(incs) -L$(libdir) $(objs) $< -o $@ $(libs)