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.
14 vec_matmul_riscv_src
= \
18 vec_matmul_c_objs
= $(patsubst %.c
, %.o
, $(vec_matmul_c_src
))
19 vec_matmul_riscv_objs
= $(patsubst %.S
, %.o
, $(vec_matmul_riscv_src
))
21 vec_matmul_host_bin
= vec-matmul.host
22 $(vec_matmul_host_bin
) : $(vec_matmul_c_src
)
23 $(HOST_COMP
) $^
-o
$(vec_matmul_host_bin
)
25 vec_matmul_riscv_bin
= vec-matmul.riscv
26 $(vec_matmul_riscv_bin
) : $(vec_matmul_c_objs
) $(vec_matmul_riscv_objs
)
27 $(RISCV_LINK
) $(RISCV_LINK_SYSCALL
) $(vec_matmul_c_objs
) $(vec_matmul_riscv_objs
) -o
$(vec_matmul_riscv_bin
)
29 junk
+= $(vec_matmul_c_objs
) $(vec_matmul_riscv_objs
) \
30 $(vec_matmul_host_bin
) $(vec_matmul_riscv_bin
)