From 8061ce76ca0cbab8a2b61bbe5975a252434149a1 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 24 Nov 2024 22:44:36 +0000 Subject: [PATCH] Auto-generated commit --- CHANGELOG.md | 1 + benchmark/c/Makefile | 56 ++++++++++++++++++++++++++++++-------------- 2 files changed, 39 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d038815..b55852e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@
+- [`b0e68c5`](https://github.com/stdlib-js/stdlib/commit/b0e68c5bc8ee985794eb2ea1791c9337cd15fbd0) - **chore:** update to modern benchmark Makefile _(by Philipp Burckhardt)_ - [`dbbb0ba`](https://github.com/stdlib-js/stdlib/commit/dbbb0bab688e9a2de22d967a57eeb31738b93340) - **revert:** chore: update to modern benchmark Makefile _(by Philipp Burckhardt)_ - [`184d71f`](https://github.com/stdlib-js/stdlib/commit/184d71f0d04083ef6e64b641eccfc322273f544c) - **chore:** update to modern benchmark Makefile _(by Philipp Burckhardt)_ - [`f387603`](https://github.com/stdlib-js/stdlib/commit/f387603e739f88a38af3263ce6ff675ad903ee8c) - **docs:** consistently use declarative instead of imperative sentences outside of intros _(by Philipp Burckhardt)_ diff --git a/benchmark/c/Makefile b/benchmark/c/Makefile index e4542b1..e64c005 100644 --- a/benchmark/c/Makefile +++ b/benchmark/c/Makefile @@ -21,9 +21,11 @@ ifndef VERBOSE QUIET := @ +else + QUIET := endif -# Determine the OS: +# Determine the OS ([1][1], [2][2]). # # [1]: https://en.wikipedia.org/wiki/Uname#Examples # [2]: http://stackoverflow.com/a/27776822/2225624 @@ -36,6 +38,10 @@ ifneq (, $(findstring MSYS,$(OS))) else ifneq (, $(findstring CYGWIN,$(OS))) OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif endif endif endif @@ -54,7 +60,7 @@ CFLAGS ?= \ -Wall \ -pedantic -# Determine whether to generate [position independent code][1]: +# Determine whether to generate position independent code ([1][1], [2][2]). # # [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options # [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option @@ -68,39 +74,53 @@ endif c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles C source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler +# @param {string} [CFLAGS] - C compiler flags +# @param {(string|void)} [fPIC] - compiler flag indicating whether to generate position independent code +# +# @example +# make +# +# @example +# make all +#/ all: $(c_targets) .PHONY: all - -# Compile C source. +#/ +# Compiles C source files. # -# This target compiles C source files. - +# @private +# @param {string} CC - C compiler +# @param {string} CFLAGS - C compiler flags +# @param {(string|void)} fPIC - compiler flag indicating whether to generate position independent code +#/ $(c_targets): %.out: %.c $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - -# Run a benchmark. +#/ +# Runs compiled benchmarks. # -# This target runs a benchmark. - +# @example +# make run +#/ run: $(c_targets) $(QUIET) ./$< .PHONY: run - -# Perform clean-up. +#/ +# Removes generated files. # -# This target removes generated files. - +# @example +# make clean +#/ clean: $(QUIET) -rm -f *.o *.out