1 #=======================================================================
2 # UCB CS250 Makefile fragment for benchmarks
3 #-----------------------------------------------------------------------
5 # Each benchmark directory should have its own fragment which
6 # essentially lists what the source files are and how to link them
7 # into an riscv and/or host executable. All variables should include
8 # the benchmark name as a prefix so that they are unique.
16 mt_matmul_riscv_src
= \
19 mt_matmul_c_objs
= $(patsubst %.c
, %.o
, $(mt_matmul_c_src
))
20 mt_matmul_riscv_objs
= $(patsubst %.S
, %.o
, $(mt_matmul_riscv_src
))
22 mt_matmul_host_bin
= mt-matmul.host
23 $(mt_matmul_host_bin
) : $(mt_matmul_c_src
)
24 $(HOST_COMP
) $^
-o
$(mt_matmul_host_bin
)
26 mt_matmul_riscv_bin
= mt-matmul.riscv
27 $(mt_matmul_riscv_bin
) : $(mt_matmul_c_objs
) $(mt_matmul_riscv_objs
)
28 $(RISCV_LINK
) $(mt_matmul_c_objs
) $(mt_matmul_riscv_objs
) $(RISCV_LINK_OPTS
) -o
$(mt_matmul_riscv_bin
)
30 junk
+= $(mt_matmul_c_objs
) $(mt_matmul_riscv_objs
) \
31 $(mt_matmul_host_bin
) $(mt_matmul_riscv_bin
)