1 #=======================================================================
2 # UCB CS250 Makefile fragment for benchmarks
3 #-----------------------------------------------------------------------
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.
11 vec-fft_data_src
= fft-data.c
22 vec-fft_c_objs
= $(patsubst %.c
, %.o
, $(vec-fft_c_src
))
23 vec-fft_riscv_objs
= $(patsubst %.S
, %.o
, $(vec-fft_riscv_src
))
25 vec-fft_data_bin
= fft-data-gen
26 $(vec-fft_data_src
): $(vec-fft_data_bin
)
27 .
/$< $(FFT_FLOATING_PREC
) $(FFT_SIZE
) > $@
29 vec-fft_host_bin
= vec-fft.host
30 $(vec-fft_host_bin
): $(vec-fft_c_src
)
31 # $(HOST_COMP) $^ -o $(vec-fft_host_bin)
33 RISCV_LINK_SYSCALL
= $(bmarkdir
)/common
/syscalls.c
-lc
35 vec-fft_riscv_bin
= vec-fft.riscv
36 $(vec-fft_riscv_bin
): $(vec-fft_c_objs
) $(vec-fft_riscv_objs
)
37 $(RISCV_LINK
) $(RISCV_LINK_SYSCALL
) $(vec-fft_c_objs
) $(vec-fft_riscv_objs
) -o
$(vec-fft_riscv_bin
)
40 $(vec-fft_data_src
) $(vec-fft_c_objs
) $(vec-fft_riscv_objs
) \
41 $(vec-fft_host_bin
) $(vec-fft_riscv_bin
)