We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 33d19ac commit 6ab6eecCopy full SHA for 6ab6eec
1 file changed
tools/snippets/benchmark/c/native/Makefile
@@ -46,12 +46,18 @@ else
46
fPIC ?= -fPIC
47
endif
48
49
-# List of includes:
+# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`):
50
INCLUDE ?=
51
52
# List of source files:
53
SOURCE_FILES ?=
54
55
+# List of libraries (e.g., `-lopenblas -lpthread`):
56
+LIBRARIES ?=
57
+
58
+# List of library paths (e.g., `-L /foo/bar -L /beep/boop`):
59
+LIBPATH ?=
60
61
# List of C targets:
62
c_targets := TODO.out
63
@@ -72,7 +78,7 @@ all: $(c_targets)
72
78
# This target compiles C source files.
73
79
74
80
$(c_targets): %.out: %.c
75
- $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< -lm
81
+ $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES)
76
82
77
83
84
# Run a benchmark.
0 commit comments