blob: 160880f7f969777a832fe5fb379e63b88b988df1 (
plain)
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
|
TESTS = \
datastructures/test/fenwickTree.test \
datastructures/test/fenwickTree2.test \
datastructures/test/monotonicConvexHull.test \
datastructures/test/persistent.test \
datastructures/test/sparseTable.test \
datastructures/test/sparseTableDisjoint.test \
graph/test/binary_lifting.test \
graph/test/LCA_sparse.test \
math/test/binomial0.test
LATEXMK = latexmk -interaction=nonstopmode
tcr.pdf: FORCE
$(LATEXMK) -pdf tcr
pdf: tcr.pdf tcr-opt.pdf
tcr-opt.pdf: FORCE
$(LATEXMK) -pdf -jobname=tcr-opt -usepretex="\def\OPTIONAL{}" tcr
all: pdf test
test: $(TESTS:.test=.ok)
clean: cleanpdf cleantest
cleanpdf:
$(LATEXMK) -C tcr
$(LATEXMK) -C -jobname=tcr-opt tcr
rm -f *.thm
cleantest:
rm -f $(TESTS) $(TESTS:.test=.ok)
%.ok: %.test
timeout -v 1 ./$<
@touch $@
%.test: %.cpp test.h
g++ -include test.h -std=gnu++20 -Wall -Wextra -Wpedantic -Werror \
-fsanitize=address,undefined -g -o $@ $<
datastructures/test/fenwickTree.test: datastructures/test/fenwickTree.cpp \
datastructures/fenwickTree.cpp
datastructures/test/fenwickTree2.test: datastructures/test/fenwickTree2.cpp \
datastructures/fenwickTree2.cpp
datastructures/test/monotonicConvexHull.test: \
datastructures/test/monotonicConvexHull.cpp \
datastructures/monotonicConvexHull.cpp
datastructures/test/persistent.test: datastructures/test/persistent.cpp \
datastructures/persistent.cpp
datastructures/test/sparseTable.test: datastructures/test/sparseTable.cpp \
datastructures/sparseTable.cpp
datastructures/test/sparseTableDisjoint.test: \
datastructures/test/sparseTableDisjoint.cpp \
datastructures/sparseTableDisjoint.cpp
graph/test/binary_lifting.test: graph/test/binary_lifting.cpp \
graph/binary_lifting.cpp graph/test/util.cpp
graph/test/LCA_sparse.test: graph/test/LCA_sparse.cpp \
graph/LCA_sparse.cpp datastructures/sparseTable.cpp graph/test/util.cpp
math/test/binomial0.test: math/test/binomial0.cpp math/binomial0.cpp \
math/shortModInv.cpp
FORCE:
.PHONY: all pdf test clean cleanpdf cleantest FORCE
|