Merge branch 'master' of github.com:ucb-bar/riscv-tests
[riscv-tests.git] / benchmarks / multiply / 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 multiply_c_src = \
12 multiply_main.c \
13 multiply.c \
14 syscalls.c \
15
16 multiply_riscv_src = \
17 crt.S \
18
19 multiply_c_objs = $(patsubst %.c, %.o, $(multiply_c_src))
20 multiply_riscv_objs = $(patsubst %.S, %.o, $(multiply_riscv_src))
21
22 multiply_host_bin = multiply.host
23 $(multiply_host_bin): $(multiply_c_src)
24 $(HOST_COMP) $^ -o $(multiply_host_bin)
25
26 multiply_riscv_bin = multiply.riscv
27 $(multiply_riscv_bin): $(multiply_c_objs) $(multiply_riscv_objs)
28 $(RISCV_LINK) $(multiply_c_objs) $(multiply_riscv_objs) -o $(multiply_riscv_bin) $(RISCV_LINK_OPTS)
29
30 junk += $(multiply_c_objs) $(multiply_riscv_objs) \
31 $(multiply_host_bin) $(multiply_riscv_bin)