aboutsummaryrefslogtreecommitdiff
path: root/benchmarks/dgemm/bmark.mk
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/dgemm/bmark.mk')
-rw-r--r--benchmarks/dgemm/bmark.mk29
1 files changed, 29 insertions, 0 deletions
diff --git a/benchmarks/dgemm/bmark.mk b/benchmarks/dgemm/bmark.mk
new file mode 100644
index 0000000..5a26242
--- /dev/null
+++ b/benchmarks/dgemm/bmark.mk
@@ -0,0 +1,29 @@
+#=======================================================================
+# UCB CS250 Makefile fragment for benchmarks
+#-----------------------------------------------------------------------
+#
+# Each benchmark directory should have its own fragment which
+# essentially lists what the source files are and how to link them
+# into an riscv and/or host executable. All variables should include
+# the benchmark name as a prefix so that they are unique.
+#
+
+dgemm_c_src = \
+ dgemm_main.c \
+
+dgemm_riscv_src = \
+ crt.S \
+
+dgemm_c_objs = $(patsubst %.c, %.o, $(dgemm_c_src))
+dgemm_riscv_objs = $(patsubst %.S, %.o, $(dgemm_riscv_src))
+
+dgemm_host_bin = dgemm.host
+$(dgemm_host_bin) : $(dgemm_c_src)
+ $(HOST_COMP) $^ -o $(dgemm_host_bin)
+
+dgemm_riscv_bin = dgemm.riscv
+$(dgemm_riscv_bin) : $(dgemm_c_objs) $(dgemm_riscv_objs)
+ $(RISCV_LINK) $(dgemm_c_objs) $(dgemm_riscv_objs) -o $(dgemm_riscv_bin)
+
+junk += $(dgemm_c_objs) $(dgemm_riscv_objs) \
+ $(dgemm_host_bin) $(dgemm_riscv_bin)