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

stream_c_src = \
	stream_d.c \
	syscalls.c \

stream_riscv_src = \
	crt.S \

stream_c_objs     = $(patsubst %.c, %.o, $(stream_c_src))
stream_riscv_objs = $(patsubst %.S, %.o, $(stream_riscv_src))

stream_host_bin = stream.host
$(stream_host_bin): $(stream_c_src)
	$(HOST_COMP) $^ -o $(stream_host_bin)

stream_riscv_bin = stream.riscv
$(stream_riscv_bin): $(stream_c_objs) $(stream_riscv_objs)
	$(RISCV_LINK) $(stream_c_objs) $(stream_riscv_objs) -o $(stream_riscv_bin) $(RISCV_LINK_OPTS)

junk += $(stream_c_objs) $(stream_riscv_objs) \
        $(stream_host_bin) $(stream_riscv_bin)