From a035fc10768bf48d096a33d0748e679e5a3e2540 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 12 Mar 2016 23:07:37 +0100 Subject: Add possibility to compare against libtommath MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5a42f89..19d3e1d 100644 --- a/Makefile +++ b/Makefile @@ -82,8 +82,16 @@ test-random.c: test-generate.py test: test.c libzahl.a test-random.c $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -o $@ test.c libzahl.a +ifndef BENCHMARK_LIB benchmark: bench/benchmark.c libzahl.a $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -o $@ $^ +endif +ifdef BENCHMARK_LIB +CPPFLAGS += -DBENCHMARK_LIB='"$(BENCHMARK_LIB).h"' +BENCHMARK_libtommath = -ltommath +benchmark: bench/benchmark.c bench/$(BENCHMARK_LIB).h + $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -o $@ bench/benchmark.c $(BENCHMARK_$(BENCHMARK_LIB)) +endif check: test ./test -- cgit v1.2.3-70-g09d2