aboutsummaryrefslogtreecommitdiff
path: root/benchmarks/spmv/bmark.mk
blob: dcfdb19abaaf63ae0030c72486b4a857d596574c (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.
#

spmv_c_src = \
	spmv_main.c \
	syscalls.c \

spmv_riscv_src = \
	crt.S \

spmv_c_objs     = $(patsubst %.c, %.o, $(spmv_c_src))
spmv_riscv_objs = $(patsubst %.S, %.o, $(spmv_riscv_src))

spmv_host_bin = spmv.host
$(spmv_host_bin) : $(spmv_c_src)
	$(HOST_COMP) $^ -o $(spmv_host_bin)

spmv_riscv_bin = spmv.riscv
$(spmv_riscv_bin) : $(spmv_c_objs) $(spmv_riscv_objs)
	$(RISCV_LINK) $(spmv_c_objs) $(spmv_riscv_objs) -o $(spmv_riscv_bin) $(RISCV_LINK_OPTS)

junk += $(spmv_c_objs) $(spmv_riscv_objs) \
        $(spmv_host_bin) $(spmv_riscv_bin)