diff options
author | David Robillard <d@drobilla.net> | 2018-08-26 23:16:00 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-09-29 14:50:34 +0200 |
commit | 0a5a45ff8ae437ddf1c3b8de425f30a44e6f5580 (patch) | |
tree | 870b40f80575969ab5bb7771d62ecb0bdf13662a /Makefile | |
parent | a115beb0d3fedbe3d286ad1ba2dd7af319f7968d (diff) | |
download | chilbert-0a5a45ff8ae437ddf1c3b8de425f30a44e6f5580.tar.gz chilbert-0a5a45ff8ae437ddf1c3b8de425f30a44e6f5580.tar.bz2 chilbert-0a5a45ff8ae437ddf1c3b8de425f30a44e6f5580.zip |
Add benchmarks
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -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/ |