Skip to content

Commit b0e68c5

Browse files
committed
chore: update to modern benchmark Makefile
1 parent 4817867 commit b0e68c5

File tree

103 files changed

+3914
-1854
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+3914
-1854
lines changed

lib/node_modules/@stdlib/math/base/ops/cdiv/benchmark/c/Makefile

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@
2121

2222
ifndef VERBOSE
2323
QUIET := @
24+
else
25+
QUIET :=
2426
endif
2527

26-
# Determine the OS:
28+
# Determine the OS ([1][1], [2][2]).
2729
#
2830
# [1]: https://en.wikipedia.org/wiki/Uname#Examples
2931
# [2]: http://stackoverflow.com/a/27776822/2225624
@@ -36,6 +38,10 @@ ifneq (, $(findstring MSYS,$(OS)))
3638
else
3739
ifneq (, $(findstring CYGWIN,$(OS)))
3840
OS := WINNT
41+
else
42+
ifneq (, $(findstring Windows_NT,$(OS)))
43+
OS := WINNT
44+
endif
3945
endif
4046
endif
4147
endif
@@ -54,7 +60,7 @@ CFLAGS ?= \
5460
-Wall \
5561
-pedantic
5662

57-
# Determine whether to generate [position independent code][1]:
63+
# Determine whether to generate position independent code ([1][1], [2][2]).
5864
#
5965
# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options
6066
# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option
@@ -68,39 +74,53 @@ endif
6874
c_targets := benchmark.out
6975

7076

71-
# TARGETS #
77+
# RULES #
7278

73-
# Default target.
79+
#/
80+
# Compiles C source files.
7481
#
75-
# This target is the default target.
76-
82+
# @param {string} [C_COMPILER] - C compiler
83+
# @param {string} [CFLAGS] - C compiler flags
84+
# @param {(string|void)} [fPIC] - compiler flag indicating whether to generate position independent code
85+
#
86+
# @example
87+
# make
88+
#
89+
# @example
90+
# make all
91+
#/
7792
all: $(c_targets)
7893

7994
.PHONY: all
8095

81-
82-
# Compile C source.
96+
#/
97+
# Compiles C source files.
8398
#
84-
# This target compiles C source files.
85-
99+
# @private
100+
# @param {string} CC - C compiler
101+
# @param {string} CFLAGS - C compiler flags
102+
# @param {(string|void)} fPIC - compiler flag indicating whether to generate position independent code
103+
#/
86104
$(c_targets): %.out: %.c
87105
$(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm
88106

89-
90-
# Run a benchmark.
107+
#/
108+
# Runs compiled benchmarks.
91109
#
92-
# This target runs a benchmark.
93-
110+
# @example
111+
# make run
112+
#/
94113
run: $(c_targets)
95114
$(QUIET) ./$<
96115

97116
.PHONY: run
98117

99-
100-
# Perform clean-up.
118+
#/
119+
# Removes generated files.
101120
#
102-
# This target removes generated files.
103-
121+
# @example
122+
# make clean
123+
#/
104124
clean:
105125
$(QUIET) -rm -f *.o *.out
106126

lib/node_modules/@stdlib/math/base/ops/cneg/benchmark/c/Makefile

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@
2121

2222
ifndef VERBOSE
2323
QUIET := @
24+
else
25+
QUIET :=
2426
endif
2527

26-
# Determine the OS:
28+
# Determine the OS ([1][1], [2][2]).
2729
#
2830
# [1]: https://en.wikipedia.org/wiki/Uname#Examples
2931
# [2]: http://stackoverflow.com/a/27776822/2225624
@@ -36,6 +38,10 @@ ifneq (, $(findstring MSYS,$(OS)))
3638
else
3739
ifneq (, $(findstring CYGWIN,$(OS)))
3840
OS := WINNT
41+
else
42+
ifneq (, $(findstring Windows_NT,$(OS)))
43+
OS := WINNT
44+
endif
3945
endif
4046
endif
4147
endif
@@ -54,7 +60,7 @@ CFLAGS ?= \
5460
-Wall \
5561
-pedantic
5662

57-
# Determine whether to generate [position independent code][1]:
63+
# Determine whether to generate position independent code ([1][1], [2][2]).
5864
#
5965
# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options
6066
# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option
@@ -68,39 +74,53 @@ endif
6874
c_targets := benchmark.out
6975

7076

71-
# TARGETS #
77+
# RULES #
7278

73-
# Default target.
79+
#/
80+
# Compiles C source files.
7481
#
75-
# This target is the default target.
76-
82+
# @param {string} [C_COMPILER] - C compiler
83+
# @param {string} [CFLAGS] - C compiler flags
84+
# @param {(string|void)} [fPIC] - compiler flag indicating whether to generate position independent code
85+
#
86+
# @example
87+
# make
88+
#
89+
# @example
90+
# make all
91+
#/
7792
all: $(c_targets)
7893

7994
.PHONY: all
8095

81-
82-
# Compile C source.
96+
#/
97+
# Compiles C source files.
8398
#
84-
# This target compiles C source files.
85-
99+
# @private
100+
# @param {string} CC - C compiler
101+
# @param {string} CFLAGS - C compiler flags
102+
# @param {(string|void)} fPIC - compiler flag indicating whether to generate position independent code
103+
#/
86104
$(c_targets): %.out: %.c
87105
$(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm
88106

89-
90-
# Run a benchmark.
107+
#/
108+
# Runs compiled benchmarks.
91109
#
92-
# This target runs a benchmark.
93-
110+
# @example
111+
# make run
112+
#/
94113
run: $(c_targets)
95114
$(QUIET) ./$<
96115

97116
.PHONY: run
98117

99-
100-
# Perform clean-up.
118+
#/
119+
# Removes generated files.
101120
#
102-
# This target removes generated files.
103-
121+
# @example
122+
# make clean
123+
#/
104124
clean:
105125
$(QUIET) -rm -f *.o *.out
106126

lib/node_modules/@stdlib/math/base/ops/cnegf/benchmark/c/Makefile

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@
2121

2222
ifndef VERBOSE
2323
QUIET := @
24+
else
25+
QUIET :=
2426
endif
2527

26-
# Determine the OS:
28+
# Determine the OS ([1][1], [2][2]).
2729
#
2830
# [1]: https://en.wikipedia.org/wiki/Uname#Examples
2931
# [2]: http://stackoverflow.com/a/27776822/2225624
@@ -36,6 +38,10 @@ ifneq (, $(findstring MSYS,$(OS)))
3638
else
3739
ifneq (, $(findstring CYGWIN,$(OS)))
3840
OS := WINNT
41+
else
42+
ifneq (, $(findstring Windows_NT,$(OS)))
43+
OS := WINNT
44+
endif
3945
endif
4046
endif
4147
endif
@@ -54,7 +60,7 @@ CFLAGS ?= \
5460
-Wall \
5561
-pedantic
5662

57-
# Determine whether to generate [position independent code][1]:
63+
# Determine whether to generate position independent code ([1][1], [2][2]).
5864
#
5965
# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options
6066
# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option
@@ -68,39 +74,53 @@ endif
6874
c_targets := benchmark.out
6975

7076

71-
# TARGETS #
77+
# RULES #
7278

73-
# Default target.
79+
#/
80+
# Compiles C source files.
7481
#
75-
# This target is the default target.
76-
82+
# @param {string} [C_COMPILER] - C compiler
83+
# @param {string} [CFLAGS] - C compiler flags
84+
# @param {(string|void)} [fPIC] - compiler flag indicating whether to generate position independent code
85+
#
86+
# @example
87+
# make
88+
#
89+
# @example
90+
# make all
91+
#/
7792
all: $(c_targets)
7893

7994
.PHONY: all
8095

81-
82-
# Compile C source.
96+
#/
97+
# Compiles C source files.
8398
#
84-
# This target compiles C source files.
85-
99+
# @private
100+
# @param {string} CC - C compiler
101+
# @param {string} CFLAGS - C compiler flags
102+
# @param {(string|void)} fPIC - compiler flag indicating whether to generate position independent code
103+
#/
86104
$(c_targets): %.out: %.c
87105
$(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm
88106

89-
90-
# Run a benchmark.
107+
#/
108+
# Runs compiled benchmarks.
91109
#
92-
# This target runs a benchmark.
93-
110+
# @example
111+
# make run
112+
#/
94113
run: $(c_targets)
95114
$(QUIET) ./$<
96115

97116
.PHONY: run
98117

99-
100-
# Perform clean-up.
118+
#/
119+
# Removes generated files.
101120
#
102-
# This target removes generated files.
103-
121+
# @example
122+
# make clean
123+
#/
104124
clean:
105125
$(QUIET) -rm -f *.o *.out
106126

0 commit comments

Comments
 (0)