Mask off large constants for RV32
[riscv-tests.git] / benchmarks / median / 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 median_c_src = \
12 median_main.c \
13 median.c \
14 syscalls.c \
15
16 median_riscv_src = \
17 crt.S \
18
19 median_c_objs = $(patsubst %.c, %.o, $(median_c_src))
20 median_riscv_objs = $(patsubst %.S, %.o, $(median_riscv_src))
21
22 median_host_bin = median.host
23 $(median_host_bin): $(median_c_src)
24 $(HOST_COMP) $^ -o $(median_host_bin)
25
26 median_riscv_bin = median.riscv
27 $(median_riscv_bin): $(median_c_objs) $(median_riscv_objs)
28 $(RISCV_LINK) $(median_c_objs) $(median_riscv_objs) -o $(median_riscv_bin) $(RISCV_LINK_OPTS)
29
30 junk += $(median_c_objs) $(median_riscv_objs) \
31 $(median_host_bin) $(median_riscv_bin)