Updated README to recursively initialize repos
[riscv-tests.git] / benchmarks / towers / 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 towers_c_src = \
12 towers_main.c \
13
14 towers_riscv_src = \
15 crt.S \
16
17 towers_c_objs = $(patsubst %.c, %.o, $(towers_c_src))
18 towers_riscv_objs = $(patsubst %.S, %.o, $(towers_riscv_src))
19
20 towers_host_bin = towers.host
21 $(towers_host_bin) : $(towers_c_src)
22 $(HOST_COMP) $^ -o $(towers_host_bin)
23
24 towers_riscv_bin = towers.riscv
25 $(towers_riscv_bin) : $(towers_c_objs) $(towers_riscv_objs)
26 $(RISCV_LINK) $(towers_c_objs) $(towers_riscv_objs) -o $(towers_riscv_bin)
27
28 junk += $(towers_c_objs) $(towers_riscv_objs) \
29 $(towers_host_bin) $(towers_riscv_bin)