0ab2504089c6ade75a53228de27a646fc465ed5d
[riscv-tests.git] / benchmarks / mt-vvadd / bmark.mk
1 #=======================================================================
2 # UCB CS250 Makefile fragment for benchmarks
3 #-----------------------------------------------------------------------
4 #
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.
9 #
10
11 mt_vvadd_c_src = \
12 mt-vvadd.c \
13
14 mt_vvadd_riscv_src = \
15 crt-mt.S \
16
17 mt_vvadd_c_objs = $(patsubst %.c, %.o, $(mt_vvadd_c_src))
18 mt_vvadd_riscv_objs = $(patsubst %.S, %.o, $(mt_vvadd_riscv_src))
19
20 mt_vvadd_host_bin = mt-vvadd.host
21 $(mt_vvadd_host_bin) : $(mt_vvadd_c_src)
22 $(HOST_COMP) $^ -o $(mt_vvadd_host_bin)
23
24 mt_vvadd_riscv_bin = mt-vvadd.riscv
25 $(mt_vvadd_riscv_bin) : $(mt_vvadd_c_objs) $(mt_vvadd_riscv_objs)
26 $(RISCV_LINK_MT) $(RISCV_LINK_SYSCALL) $(mt_vvadd_c_objs) $(mt_vvadd_riscv_objs) -o $(mt_vvadd_riscv_bin)
27
28 junk += $(mt_vvadd_c_objs) $(mt_vvadd_riscv_objs) \
29 $(mt_vvadd_host_bin) $(mt_vvadd_riscv_bin)