Skip to content

Commit d64cc36

Browse files
committed
Add make bench for building the benchmarks
1 parent 1baf1d3 commit d64cc36

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

test/Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ include ../Make.inc
33

44
all: test-double test-float # test-double-system test-float-system
55

6+
bench: bench-syslibm bench-openlibm
7+
68
test-double: test-double.c libm-test.c
79
$(CC) $(CFLAGS) -g $@.c -D__BSD_VISIBLE -I ../include -I../src ../libopenlibm.a -o $@
810

@@ -14,3 +16,12 @@ test-double-system: test-double.c libm-test.c
1416

1517
test-float-system: test-float.c libm-test.c
1618
$(CC) $(CFLAGS) -g $< -DSYS_MATH_H -lm -o $@
19+
20+
bench-openlibm: libm-bench.cpp
21+
$(CC) $(CFLAGS) -O2 $< ../libopenlibm.a -o $@
22+
23+
bench-syslibm: libm-bench.cpp
24+
$(CC) $(CFLAGS) -O2 $< -lm -o $@
25+
26+
clean:
27+
rm -fr test-double test-float test-double-system test-float-system bench-openlibm bench-syslibm *.dSYM

0 commit comments

Comments
 (0)