summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 10 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 718e966..10adf28 100644
--- a/Makefile
+++ b/Makefile
@@ -7,21 +7,25 @@ all: pdf test
test: $(TESTS:.test=.ok)
-clean:
+clean: cleanpdf cleantest
+
+cleanpdf:
latexmk -c tcr
rm -f *.thm
+
+cleantest:
rm -f $(TESTS) $(TESTS:.test=.ok)
%.ok: %.test
timeout -v 1 ./$<
@touch $@
-%.test: %.cpp
- g++ -std=gnu++20 -Wall -Wextra -Wpedantic -Werror \
+%.test: %.cpp test.h
+ g++ -include test.h -std=gnu++20 -Wall -Wextra -Wpedantic -Werror \
-fsanitize=address,undefined -g -o $@ $<
graph/test/binary_lifting.test: graph/test/binary_lifting.cpp \
- graph/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/LCA_sparse.cpp datastructures/sparseTable.cpp graph/test/util.cpp
-.PHONY: all pdf test clean
+.PHONY: all pdf test clean cleanpdf cleantest