aboutsummaryrefslogtreecommitdiff
path: root/benchmarks/rsort/bmark.mk
blob: 0fa713c63ce3e753c07289a7d7a76f51f8801414 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#=======================================================================
# UCB CS250 Makefile fragment for benchmarks
#-----------------------------------------------------------------------
#
# Each benchmark directory should have its own fragment which
# essentially lists what the source files are and how to link them
# into an riscv and/or host executable. All variables should include
# the benchmark name as a prefix so that they are unique.
#

rsort_c_src = \
	rsort.c \
	syscalls.c \

rsort_riscv_src = \
	crt.S \

rsort_c_objs     = $(patsubst %.c, %.o, $(rsort_c_src))
rsort_riscv_objs = $(patsubst %.S, %.o, $(rsort_riscv_src))

rsort_host_bin = rsort.host
$(rsort_host_bin) : $(rsort_c_src)
	$(HOST_COMP) $^ -o $(rsort_host_bin)

rsort_riscv_bin = rsort.riscv
$(rsort_riscv_bin) : $(rsort_c_objs) $(rsort_riscv_objs)
	$(RISCV_LINK) $(rsort_c_objs) $(rsort_riscv_objs) -o $(rsort_riscv_bin) $(RISCV_LINK_OPTS)

junk += $(rsort_c_objs) $(rsort_riscv_objs) \
        $(rsort_host_bin) $(rsort_riscv_bin)