From 9406379c5fc812d248e53a001280d8b8fb533627 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 24 Nov 2024 14:54:10 +0000 Subject: [PATCH] Auto-generated commit --- CHANGELOG.md | 4 + base/ops/cdiv/benchmark/c/Makefile | 79 +++++++++++++----- base/ops/cneg/benchmark/c/Makefile | 79 +++++++++++++----- base/ops/cnegf/benchmark/c/Makefile | 79 +++++++++++++----- base/special/acos/benchmark/c/Makefile | 79 +++++++++++++----- base/special/acosh/benchmark/c/Makefile | 79 +++++++++++++----- base/special/acoth/benchmark/c/Makefile | 79 +++++++++++++----- base/special/acovercos/benchmark/c/Makefile | 79 +++++++++++++----- base/special/acoversin/benchmark/c/Makefile | 79 +++++++++++++----- base/special/ahavercos/benchmark/c/Makefile | 79 +++++++++++++----- base/special/ahaversin/benchmark/c/Makefile | 79 +++++++++++++----- base/special/asech/benchmark/c/Makefile | 79 +++++++++++++----- base/special/asin/benchmark/c/Makefile | 79 +++++++++++++----- base/special/asinh/benchmark/c/Makefile | 79 +++++++++++++----- base/special/atan/benchmark/c/Makefile | 79 +++++++++++++----- base/special/atan2/benchmark/c/Makefile | 79 +++++++++++++----- base/special/atanh/benchmark/c/Makefile | 79 +++++++++++++----- base/special/avercos/benchmark/c/Makefile | 79 +++++++++++++----- base/special/aversin/benchmark/c/Makefile | 79 +++++++++++++----- base/special/besselj0/benchmark/c/Makefile | 79 +++++++++++++----- base/special/besselj1/benchmark/c/Makefile | 79 +++++++++++++----- base/special/bessely0/benchmark/c/Makefile | 79 +++++++++++++----- base/special/bessely1/benchmark/c/Makefile | 79 +++++++++++++----- base/special/binet/benchmark/c/Makefile | 79 +++++++++++++----- base/special/cbrt/benchmark/c/Makefile | 79 +++++++++++++----- base/special/cbrtf/benchmark/c/Makefile | 79 +++++++++++++----- base/special/ccis/benchmark/c/Makefile | 79 +++++++++++++----- base/special/ceil/benchmark/c/Makefile | 79 +++++++++++++----- base/special/ceilf/benchmark/c/Makefile | 79 +++++++++++++----- base/special/cexp/benchmark/c/Makefile | 79 +++++++++++++----- base/special/cfloor/benchmark/c/Makefile | 79 +++++++++++++----- base/special/cfloorn/benchmark/c/Makefile | 79 +++++++++++++----- base/special/cinv/benchmark/c/Makefile | 79 +++++++++++++----- base/special/cos/benchmark/c/Makefile | 79 +++++++++++++----- base/special/cosh/benchmark/c/Makefile | 79 +++++++++++++----- base/special/covercos/benchmark/c/Makefile | 79 +++++++++++++----- base/special/coversin/benchmark/c/Makefile | 79 +++++++++++++----- base/special/cphase/benchmark/c/Makefile | 79 +++++++++++++----- base/special/cround/benchmark/c/Makefile | 79 +++++++++++++----- base/special/croundf/benchmark/c/Makefile | 79 +++++++++++++----- base/special/dirac-delta/benchmark/c/Makefile | 79 +++++++++++++----- base/special/erf/benchmark/c/Makefile | 79 +++++++++++++----- base/special/erfc/benchmark/c/Makefile | 79 +++++++++++++----- base/special/exp/benchmark/c/Makefile | 79 +++++++++++++----- base/special/exp2/benchmark/c/Makefile | 79 +++++++++++++----- base/special/expit/benchmark/c/Makefile | 79 +++++++++++++----- base/special/expm1/benchmark/c/Makefile | 79 +++++++++++++----- base/special/factorialln/benchmark/c/Makefile | 79 +++++++++++++----- .../fibonacci-index/benchmark/c/Makefile | 79 +++++++++++++----- base/special/fibonacci/benchmark/c/Makefile | 79 +++++++++++++----- base/special/frexp/benchmark/c/Makefile | 79 +++++++++++++----- base/special/gamma/benchmark/c/Makefile | 79 +++++++++++++----- base/special/gammaln/benchmark/c/Makefile | 79 +++++++++++++----- base/special/hacovercos/benchmark/c/Makefile | 79 +++++++++++++----- base/special/hacoversin/benchmark/c/Makefile | 79 +++++++++++++----- base/special/havercos/benchmark/c/Makefile | 79 +++++++++++++----- base/special/haversin/benchmark/c/Makefile | 79 +++++++++++++----- base/special/heaviside/benchmark/c/Makefile | 79 +++++++++++++----- base/special/ldexp/benchmark/c/Makefile | 79 +++++++++++++----- base/special/ln/benchmark/c/Makefile | 79 +++++++++++++----- base/special/log/benchmark/c/Makefile | 79 +++++++++++++----- base/special/log10/benchmark/c/Makefile | 79 +++++++++++++----- base/special/log1mexp/benchmark/c/Makefile | 79 +++++++++++++----- base/special/log1p/benchmark/c/Makefile | 79 +++++++++++++----- base/special/log1pexp/benchmark/c/Makefile | 79 +++++++++++++----- base/special/log1pmx/benchmark/c/Makefile | 79 +++++++++++++----- base/special/log2/benchmark/c/Makefile | 79 +++++++++++++----- base/special/logaddexp/benchmark/c/Makefile | 79 +++++++++++++----- base/special/logit/benchmark/c/Makefile | 79 +++++++++++++----- base/special/lucas/benchmark/c/Makefile | 79 +++++++++++++----- base/special/max/benchmark/c/Makefile | 79 +++++++++++++----- base/special/maxabs/benchmark/c/Makefile | 79 +++++++++++++----- base/special/maxabsn/benchmark/c/Makefile | 79 +++++++++++++----- base/special/maxn/benchmark/c/Makefile | 79 +++++++++++++----- base/special/min/benchmark/c/Makefile | 79 +++++++++++++----- base/special/minabs/benchmark/c/Makefile | 79 +++++++++++++----- base/special/minabsn/benchmark/c/Makefile | 79 +++++++++++++----- base/special/minn/benchmark/c/Makefile | 79 +++++++++++++----- base/special/modf/benchmark/c/Makefile | 79 +++++++++++++----- .../negafibonacci/benchmark/c/Makefile | 79 +++++++++++++----- base/special/negalucas/benchmark/c/Makefile | 79 +++++++++++++----- base/special/pow/benchmark/c/Makefile | 79 +++++++++++++----- base/special/rad2deg/benchmark/c/Makefile | 79 +++++++++++++----- base/special/ramp/benchmark/c/Makefile | 79 +++++++++++++----- base/special/rampf/benchmark/c/Makefile | 79 +++++++++++++----- base/special/rcbrt/benchmark/c/Makefile | 79 +++++++++++++----- base/special/round/benchmark/c/Makefile | 79 +++++++++++++----- base/special/rsqrt/benchmark/c/Makefile | 79 +++++++++++++----- base/special/rsqrtf/benchmark/c/Makefile | 79 +++++++++++++----- base/special/signum/benchmark/c/Makefile | 79 +++++++++++++----- base/special/signumf/benchmark/c/Makefile | 79 +++++++++++++----- base/special/sin/benchmark/c/Makefile | 79 +++++++++++++----- base/special/sincos/benchmark/c/Makefile | 79 +++++++++++++----- base/special/sincospi/benchmark/c/Makefile | 79 +++++++++++++----- base/special/sinh/benchmark/c/Makefile | 79 +++++++++++++----- base/special/sqrt/benchmark/c/Makefile | 79 +++++++++++++----- base/special/sqrtf/benchmark/c/Makefile | 79 +++++++++++++----- base/special/tan/benchmark/c/Makefile | 79 +++++++++++++----- base/special/tanh/benchmark/c/Makefile | 81 ++++++++++++++----- base/special/trunc/benchmark/c/Makefile | 79 +++++++++++++----- base/special/truncf/benchmark/c/Makefile | 79 +++++++++++++----- base/special/vercos/benchmark/c/Makefile | 79 +++++++++++++----- base/special/versin/benchmark/c/Makefile | 79 +++++++++++++----- base/special/wrap/benchmark/c/Makefile | 79 +++++++++++++----- 104 files changed, 6082 insertions(+), 2061 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2010a10a1..02b8b7517 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -356,6 +356,10 @@ A total of 5 people contributed to this release. Thank you to the following cont
+- [`cdaf16f`](https://github.com/stdlib-js/stdlib/commit/cdaf16f9f3c05f153fcffbb00dab12412196cce6) - **chore:** update to modern benchmark Makefile _(by Philipp Burckhardt)_ +- [`ac4992b`](https://github.com/stdlib-js/stdlib/commit/ac4992b3eeccbfcceea795f86cf669b2481d8250) - **chore:** update to modern benchmark Makefile _(by Philipp Burckhardt)_ +- [`97a27cf`](https://github.com/stdlib-js/stdlib/commit/97a27cf2746042026c3e68416b7c5f9da2bb24d9) - **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)_ - [`7bfeb06`](https://github.com/stdlib-js/stdlib/commit/7bfeb066e6bfc209fce693c18ed3006495b3c206) - **style:** minor clean-up _(by Philipp Burckhardt)_ - [`f0b5a73`](https://github.com/stdlib-js/stdlib/commit/f0b5a739637214f85790658974070c871a2ca30b) - **refactor:** replace built-in with `stdlib_base_atan2` in `math/base/special/cphase` [(#3231)](https://github.com/stdlib-js/stdlib/pull/3231) _(by Gunj Joshi)_ - [`35ea456`](https://github.com/stdlib-js/stdlib/commit/35ea456c3f527fda8c717b5f31deccb6ba9e44d2) - **refactor:** use `stdlib_base_round` instead of builtin in `math/base/special/cround` [(#3216)](https://github.com/stdlib-js/stdlib/pull/3216) _(by Gunj Joshi)_ diff --git a/base/ops/cdiv/benchmark/c/Makefile b/base/ops/cdiv/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/ops/cdiv/benchmark/c/Makefile +++ b/base/ops/cdiv/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/ops/cneg/benchmark/c/Makefile b/base/ops/cneg/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/ops/cneg/benchmark/c/Makefile +++ b/base/ops/cneg/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/ops/cnegf/benchmark/c/Makefile b/base/ops/cnegf/benchmark/c/Makefile index 1f0fc61cd..3cbfe3fef 100644 --- a/base/ops/cnegf/benchmark/c/Makefile +++ b/base/ops/cnegf/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/acos/benchmark/c/Makefile b/base/special/acos/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/acos/benchmark/c/Makefile +++ b/base/special/acos/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/acosh/benchmark/c/Makefile b/base/special/acosh/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/acosh/benchmark/c/Makefile +++ b/base/special/acosh/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/acoth/benchmark/c/Makefile b/base/special/acoth/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/acoth/benchmark/c/Makefile +++ b/base/special/acoth/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/acovercos/benchmark/c/Makefile b/base/special/acovercos/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/acovercos/benchmark/c/Makefile +++ b/base/special/acovercos/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/acoversin/benchmark/c/Makefile b/base/special/acoversin/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/acoversin/benchmark/c/Makefile +++ b/base/special/acoversin/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/ahavercos/benchmark/c/Makefile b/base/special/ahavercos/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/ahavercos/benchmark/c/Makefile +++ b/base/special/ahavercos/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/ahaversin/benchmark/c/Makefile b/base/special/ahaversin/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/ahaversin/benchmark/c/Makefile +++ b/base/special/ahaversin/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/asech/benchmark/c/Makefile b/base/special/asech/benchmark/c/Makefile index ad9fedcd4..f69e9da2b 100644 --- a/base/special/asech/benchmark/c/Makefile +++ b/base/special/asech/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/asin/benchmark/c/Makefile b/base/special/asin/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/asin/benchmark/c/Makefile +++ b/base/special/asin/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/asinh/benchmark/c/Makefile b/base/special/asinh/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/asinh/benchmark/c/Makefile +++ b/base/special/asinh/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/atan/benchmark/c/Makefile b/base/special/atan/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/atan/benchmark/c/Makefile +++ b/base/special/atan/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/atan2/benchmark/c/Makefile b/base/special/atan2/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/atan2/benchmark/c/Makefile +++ b/base/special/atan2/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/atanh/benchmark/c/Makefile b/base/special/atanh/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/atanh/benchmark/c/Makefile +++ b/base/special/atanh/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/avercos/benchmark/c/Makefile b/base/special/avercos/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/avercos/benchmark/c/Makefile +++ b/base/special/avercos/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/aversin/benchmark/c/Makefile b/base/special/aversin/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/aversin/benchmark/c/Makefile +++ b/base/special/aversin/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/besselj0/benchmark/c/Makefile b/base/special/besselj0/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/besselj0/benchmark/c/Makefile +++ b/base/special/besselj0/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/besselj1/benchmark/c/Makefile b/base/special/besselj1/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/besselj1/benchmark/c/Makefile +++ b/base/special/besselj1/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/bessely0/benchmark/c/Makefile b/base/special/bessely0/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/bessely0/benchmark/c/Makefile +++ b/base/special/bessely0/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/bessely1/benchmark/c/Makefile b/base/special/bessely1/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/bessely1/benchmark/c/Makefile +++ b/base/special/bessely1/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/binet/benchmark/c/Makefile b/base/special/binet/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/binet/benchmark/c/Makefile +++ b/base/special/binet/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/cbrt/benchmark/c/Makefile b/base/special/cbrt/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/cbrt/benchmark/c/Makefile +++ b/base/special/cbrt/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/cbrtf/benchmark/c/Makefile b/base/special/cbrtf/benchmark/c/Makefile index 9e90af003..0577f1d40 100644 --- a/base/special/cbrtf/benchmark/c/Makefile +++ b/base/special/cbrtf/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/ccis/benchmark/c/Makefile b/base/special/ccis/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/ccis/benchmark/c/Makefile +++ b/base/special/ccis/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/ceil/benchmark/c/Makefile b/base/special/ceil/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/ceil/benchmark/c/Makefile +++ b/base/special/ceil/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/ceilf/benchmark/c/Makefile b/base/special/ceilf/benchmark/c/Makefile index 9e90af003..0577f1d40 100644 --- a/base/special/ceilf/benchmark/c/Makefile +++ b/base/special/ceilf/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/cexp/benchmark/c/Makefile b/base/special/cexp/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/cexp/benchmark/c/Makefile +++ b/base/special/cexp/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/cfloor/benchmark/c/Makefile b/base/special/cfloor/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/cfloor/benchmark/c/Makefile +++ b/base/special/cfloor/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/cfloorn/benchmark/c/Makefile b/base/special/cfloorn/benchmark/c/Makefile index 1f0fc61cd..3cbfe3fef 100644 --- a/base/special/cfloorn/benchmark/c/Makefile +++ b/base/special/cfloorn/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/cinv/benchmark/c/Makefile b/base/special/cinv/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/cinv/benchmark/c/Makefile +++ b/base/special/cinv/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/cos/benchmark/c/Makefile b/base/special/cos/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/cos/benchmark/c/Makefile +++ b/base/special/cos/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/cosh/benchmark/c/Makefile b/base/special/cosh/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/cosh/benchmark/c/Makefile +++ b/base/special/cosh/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/covercos/benchmark/c/Makefile b/base/special/covercos/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/covercos/benchmark/c/Makefile +++ b/base/special/covercos/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/coversin/benchmark/c/Makefile b/base/special/coversin/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/coversin/benchmark/c/Makefile +++ b/base/special/coversin/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/cphase/benchmark/c/Makefile b/base/special/cphase/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/cphase/benchmark/c/Makefile +++ b/base/special/cphase/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/cround/benchmark/c/Makefile b/base/special/cround/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/cround/benchmark/c/Makefile +++ b/base/special/cround/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/croundf/benchmark/c/Makefile b/base/special/croundf/benchmark/c/Makefile index ad9fedcd4..f69e9da2b 100644 --- a/base/special/croundf/benchmark/c/Makefile +++ b/base/special/croundf/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/dirac-delta/benchmark/c/Makefile b/base/special/dirac-delta/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/dirac-delta/benchmark/c/Makefile +++ b/base/special/dirac-delta/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/erf/benchmark/c/Makefile b/base/special/erf/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/erf/benchmark/c/Makefile +++ b/base/special/erf/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/erfc/benchmark/c/Makefile b/base/special/erfc/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/erfc/benchmark/c/Makefile +++ b/base/special/erfc/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/exp/benchmark/c/Makefile b/base/special/exp/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/exp/benchmark/c/Makefile +++ b/base/special/exp/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/exp2/benchmark/c/Makefile b/base/special/exp2/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/exp2/benchmark/c/Makefile +++ b/base/special/exp2/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/expit/benchmark/c/Makefile b/base/special/expit/benchmark/c/Makefile index 3f935c4be..fbec202ab 100644 --- a/base/special/expit/benchmark/c/Makefile +++ b/base/special/expit/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/expm1/benchmark/c/Makefile b/base/special/expm1/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/expm1/benchmark/c/Makefile +++ b/base/special/expm1/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/factorialln/benchmark/c/Makefile b/base/special/factorialln/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/factorialln/benchmark/c/Makefile +++ b/base/special/factorialln/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/fibonacci-index/benchmark/c/Makefile b/base/special/fibonacci-index/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/fibonacci-index/benchmark/c/Makefile +++ b/base/special/fibonacci-index/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/fibonacci/benchmark/c/Makefile b/base/special/fibonacci/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/fibonacci/benchmark/c/Makefile +++ b/base/special/fibonacci/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/frexp/benchmark/c/Makefile b/base/special/frexp/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/frexp/benchmark/c/Makefile +++ b/base/special/frexp/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/gamma/benchmark/c/Makefile b/base/special/gamma/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/gamma/benchmark/c/Makefile +++ b/base/special/gamma/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/gammaln/benchmark/c/Makefile b/base/special/gammaln/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/gammaln/benchmark/c/Makefile +++ b/base/special/gammaln/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/hacovercos/benchmark/c/Makefile b/base/special/hacovercos/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/hacovercos/benchmark/c/Makefile +++ b/base/special/hacovercos/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/hacoversin/benchmark/c/Makefile b/base/special/hacoversin/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/hacoversin/benchmark/c/Makefile +++ b/base/special/hacoversin/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/havercos/benchmark/c/Makefile b/base/special/havercos/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/havercos/benchmark/c/Makefile +++ b/base/special/havercos/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/haversin/benchmark/c/Makefile b/base/special/haversin/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/haversin/benchmark/c/Makefile +++ b/base/special/haversin/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/heaviside/benchmark/c/Makefile b/base/special/heaviside/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/heaviside/benchmark/c/Makefile +++ b/base/special/heaviside/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/ldexp/benchmark/c/Makefile b/base/special/ldexp/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/ldexp/benchmark/c/Makefile +++ b/base/special/ldexp/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/ln/benchmark/c/Makefile b/base/special/ln/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/ln/benchmark/c/Makefile +++ b/base/special/ln/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/log/benchmark/c/Makefile b/base/special/log/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/log/benchmark/c/Makefile +++ b/base/special/log/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/log10/benchmark/c/Makefile b/base/special/log10/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/log10/benchmark/c/Makefile +++ b/base/special/log10/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/log1mexp/benchmark/c/Makefile b/base/special/log1mexp/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/log1mexp/benchmark/c/Makefile +++ b/base/special/log1mexp/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/log1p/benchmark/c/Makefile b/base/special/log1p/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/log1p/benchmark/c/Makefile +++ b/base/special/log1p/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/log1pexp/benchmark/c/Makefile b/base/special/log1pexp/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/log1pexp/benchmark/c/Makefile +++ b/base/special/log1pexp/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/log1pmx/benchmark/c/Makefile b/base/special/log1pmx/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/log1pmx/benchmark/c/Makefile +++ b/base/special/log1pmx/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/log2/benchmark/c/Makefile b/base/special/log2/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/log2/benchmark/c/Makefile +++ b/base/special/log2/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/logaddexp/benchmark/c/Makefile b/base/special/logaddexp/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/logaddexp/benchmark/c/Makefile +++ b/base/special/logaddexp/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/logit/benchmark/c/Makefile b/base/special/logit/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/logit/benchmark/c/Makefile +++ b/base/special/logit/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/lucas/benchmark/c/Makefile b/base/special/lucas/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/lucas/benchmark/c/Makefile +++ b/base/special/lucas/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/max/benchmark/c/Makefile b/base/special/max/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/max/benchmark/c/Makefile +++ b/base/special/max/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/maxabs/benchmark/c/Makefile b/base/special/maxabs/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/maxabs/benchmark/c/Makefile +++ b/base/special/maxabs/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/maxabsn/benchmark/c/Makefile b/base/special/maxabsn/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/maxabsn/benchmark/c/Makefile +++ b/base/special/maxabsn/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/maxn/benchmark/c/Makefile b/base/special/maxn/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/maxn/benchmark/c/Makefile +++ b/base/special/maxn/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/min/benchmark/c/Makefile b/base/special/min/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/min/benchmark/c/Makefile +++ b/base/special/min/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/minabs/benchmark/c/Makefile b/base/special/minabs/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/minabs/benchmark/c/Makefile +++ b/base/special/minabs/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/minabsn/benchmark/c/Makefile b/base/special/minabsn/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/minabsn/benchmark/c/Makefile +++ b/base/special/minabsn/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/minn/benchmark/c/Makefile b/base/special/minn/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/minn/benchmark/c/Makefile +++ b/base/special/minn/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/modf/benchmark/c/Makefile b/base/special/modf/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/modf/benchmark/c/Makefile +++ b/base/special/modf/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/negafibonacci/benchmark/c/Makefile b/base/special/negafibonacci/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/negafibonacci/benchmark/c/Makefile +++ b/base/special/negafibonacci/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/negalucas/benchmark/c/Makefile b/base/special/negalucas/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/negalucas/benchmark/c/Makefile +++ b/base/special/negalucas/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/pow/benchmark/c/Makefile b/base/special/pow/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/pow/benchmark/c/Makefile +++ b/base/special/pow/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/rad2deg/benchmark/c/Makefile b/base/special/rad2deg/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/rad2deg/benchmark/c/Makefile +++ b/base/special/rad2deg/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/ramp/benchmark/c/Makefile b/base/special/ramp/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/ramp/benchmark/c/Makefile +++ b/base/special/ramp/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/rampf/benchmark/c/Makefile b/base/special/rampf/benchmark/c/Makefile index 9e90af003..0577f1d40 100644 --- a/base/special/rampf/benchmark/c/Makefile +++ b/base/special/rampf/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/rcbrt/benchmark/c/Makefile b/base/special/rcbrt/benchmark/c/Makefile index 24d41d693..d6b58c7f5 100644 --- a/base/special/rcbrt/benchmark/c/Makefile +++ b/base/special/rcbrt/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/round/benchmark/c/Makefile b/base/special/round/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/round/benchmark/c/Makefile +++ b/base/special/round/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/rsqrt/benchmark/c/Makefile b/base/special/rsqrt/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/rsqrt/benchmark/c/Makefile +++ b/base/special/rsqrt/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/rsqrtf/benchmark/c/Makefile b/base/special/rsqrtf/benchmark/c/Makefile index 9e90af003..0577f1d40 100644 --- a/base/special/rsqrtf/benchmark/c/Makefile +++ b/base/special/rsqrtf/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/signum/benchmark/c/Makefile b/base/special/signum/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/signum/benchmark/c/Makefile +++ b/base/special/signum/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/signumf/benchmark/c/Makefile b/base/special/signumf/benchmark/c/Makefile index 9e90af003..0577f1d40 100644 --- a/base/special/signumf/benchmark/c/Makefile +++ b/base/special/signumf/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/sin/benchmark/c/Makefile b/base/special/sin/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/sin/benchmark/c/Makefile +++ b/base/special/sin/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/sincos/benchmark/c/Makefile b/base/special/sincos/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/sincos/benchmark/c/Makefile +++ b/base/special/sincos/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/sincospi/benchmark/c/Makefile b/base/special/sincospi/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/sincospi/benchmark/c/Makefile +++ b/base/special/sincospi/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/sinh/benchmark/c/Makefile b/base/special/sinh/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/sinh/benchmark/c/Makefile +++ b/base/special/sinh/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/sqrt/benchmark/c/Makefile b/base/special/sqrt/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/sqrt/benchmark/c/Makefile +++ b/base/special/sqrt/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/sqrtf/benchmark/c/Makefile b/base/special/sqrtf/benchmark/c/Makefile index 9e90af003..0577f1d40 100644 --- a/base/special/sqrtf/benchmark/c/Makefile +++ b/base/special/sqrtf/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/tan/benchmark/c/Makefile b/base/special/tan/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/tan/benchmark/c/Makefile +++ b/base/special/tan/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/tanh/benchmark/c/Makefile b/base/special/tanh/benchmark/c/Makefile index e4542b1e6..0577f1d40 100644 --- a/base/special/tanh/benchmark/c/Makefile +++ b/base/special/tanh/benchmark/c/Makefile @@ -1,7 +1,7 @@ #/ # @license Apache-2.0 # -# Copyright (c) 2018 The Stdlib Authors. +# Copyright (c) 2020 The Stdlib Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/trunc/benchmark/c/Makefile b/base/special/trunc/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/trunc/benchmark/c/Makefile +++ b/base/special/trunc/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/truncf/benchmark/c/Makefile b/base/special/truncf/benchmark/c/Makefile index 9e90af003..0577f1d40 100644 --- a/base/special/truncf/benchmark/c/Makefile +++ b/base/special/truncf/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/vercos/benchmark/c/Makefile b/base/special/vercos/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/vercos/benchmark/c/Makefile +++ b/base/special/vercos/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/versin/benchmark/c/Makefile b/base/special/versin/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/versin/benchmark/c/Makefile +++ b/base/special/versin/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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 diff --git a/base/special/wrap/benchmark/c/Makefile b/base/special/wrap/benchmark/c/Makefile index e4542b1e6..2aa4582a4 100644 --- a/base/special/wrap/benchmark/c/Makefile +++ b/base/special/wrap/benchmark/c/Makefile @@ -16,14 +16,15 @@ # limitations under the License. #/ - # VARIABLES # 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 +37,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 +59,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 @@ -64,43 +69,77 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + # List of C targets: c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles source files. # -# This target is the default target. - +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @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 (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm - + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -# 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