From d64cc364e0a16455b2364fc3ebd8cdc8185c0701 Mon Sep 17 00:00:00 2001 From: "Viral B. Shah" Date: Thu, 4 Dec 2014 21:27:19 +0530 Subject: [PATCH] Add `make bench` for building the benchmarks --- test/Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/Makefile b/test/Makefile index 5aae3d4..4018947 100644 --- a/test/Makefile +++ b/test/Makefile @@ -3,6 +3,8 @@ include ../Make.inc all: test-double test-float # test-double-system test-float-system +bench: bench-syslibm bench-openlibm + test-double: test-double.c libm-test.c $(CC) $(CFLAGS) -g $@.c -D__BSD_VISIBLE -I ../include -I../src ../libopenlibm.a -o $@ @@ -14,3 +16,12 @@ test-double-system: test-double.c libm-test.c test-float-system: test-float.c libm-test.c $(CC) $(CFLAGS) -g $< -DSYS_MATH_H -lm -o $@ + +bench-openlibm: libm-bench.cpp + $(CC) $(CFLAGS) -O2 $< ../libopenlibm.a -o $@ + +bench-syslibm: libm-bench.cpp + $(CC) $(CFLAGS) -O2 $< -lm -o $@ + +clean: + rm -fr test-double test-float test-double-system test-float-system bench-openlibm bench-syslibm *.dSYM