Skip to content

Commit 831640d

Browse files
committed
Add recipe to run C benchmarks
1 parent eadd975 commit 831640d

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

tools/make/lib/benchmark/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# DEPENDENCIES #
33

44
include $(TOOLS_MAKE_LIB_DIR)/benchmark/javascript.mk
5+
include $(TOOLS_MAKE_LIB_DIR)/benchmark/c.mk
56
include $(TOOLS_MAKE_LIB_DIR)/benchmark/julia.mk
67
include $(TOOLS_MAKE_LIB_DIR)/benchmark/python.mk
78
include $(TOOLS_MAKE_LIB_DIR)/benchmark/r.mk
@@ -22,6 +23,6 @@ benchmark: benchmark-javascript
2223
#
2324
# This target runs cross-language benchmarks.
2425

25-
benchmark-lang: benchmark-javascript benchmark-julia benchmark-python benchmark-r
26+
benchmark-lang: benchmark-javascript benchmark-julia benchmark-python benchmark-r benchmark-c
2627

2728
.PHONY: benchmark-lang

tools/make/lib/benchmark/c.mk

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
# TARGETS #
3+
4+
# Run C benchmarks.
5+
#
6+
# This target runs a list of C benchmarks consecutively.
7+
8+
benchmark-c:
9+
$(QUIET) for file in $(C_BENCHMARKS); do \
10+
echo ""; \
11+
echo "Running benchmark: $$file"; \
12+
cd `dirname $$file` && \
13+
$(MAKE) clean && \
14+
$(MAKE) && \
15+
$(MAKE) run || exit 1; \
16+
done
17+
18+
.PHONY: benchmark-c

0 commit comments

Comments
 (0)