0fa713c63ce3e753c07289a7d7a76f51f8801414
[riscv-tests.git] / benchmarks / rsort / 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 rsort_c_src = \
12 rsort.c \
13 syscalls.c \
14
15 rsort_riscv_src = \
16 crt.S \
17
18 rsort_c_objs = $(patsubst %.c, %.o, $(rsort_c_src))
19 rsort_riscv_objs = $(patsubst %.S, %.o, $(rsort_riscv_src))
20
21 rsort_host_bin = rsort.host
22 $(rsort_host_bin) : $(rsort_c_src)
23 $(HOST_COMP) $^ -o $(rsort_host_bin)
24
25 rsort_riscv_bin = rsort.riscv
26 $(rsort_riscv_bin) : $(rsort_c_objs) $(rsort_riscv_objs)
27 $(RISCV_LINK) $(rsort_c_objs) $(rsort_riscv_objs) -o $(rsort_riscv_bin) $(RISCV_LINK_OPTS)
28
29 junk += $(rsort_c_objs) $(rsort_riscv_objs) \
30 $(rsort_host_bin) $(rsort_riscv_bin)