aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 12 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index e397515..ed93b0a 100644
--- a/Makefile
+++ b/Makefile
@@ -40,6 +40,7 @@ endif # DEBUG
HEADERS = $(wildcard chilbert/*.hpp) $(wildcard chilbert/*.ipp)
DETAIL_HEADERS = $(wildcard chilbert/detail/*.hpp)
TESTS = test/test_bitvec test/test_gray_code_rank test/test_hilbert
+BENCHMARKS = test/bench_bitvec test/bench_hilbert
PROGS = bin/chilbert_obj bin/chilbert_svg
ALL_HEADERS = $(HEADERS) $(DETAIL_HEADERS)
@@ -49,6 +50,8 @@ all: $(PROGS)
tests: $(TESTS)
+benchmarks: $(BENCHMARKS)
+
test/%: test/%.cpp $(ALL_HEADERS)
$(CXX) $(CXXFLAGS) -o $@ $@.cpp
@@ -66,12 +69,18 @@ bin/%: bin/%.cpp $(ALL_HEADERS)
FORCE:
clean:
- rm -f $(TESTS) $(PROGS)
+ rm -f $(PROGS) $(TESTS) $(BENCHMARKS)
-%.run: tests
+%.run:
$*
-test: $(addsuffix .run, $(TESTS)) FORCE
+test: tests $(addsuffix .run, $(TESTS)) FORCE
+
+bench: $(BENCHMARKS)
+ mkdir -p benchmarks
+ cd benchmarks && ../test/bench_bitvec
+ cd benchmarks && ../test/bench_hilbert
+ cd benchmarks && ./plot.py
install: FORCE
install -d $(DESTDIR)$(includedir)/chilbert/