Add a top-level make clean target.
[riscv-tests.git] / benchmarks / vec-fft / 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 vec-fft_data_src = fft-data.c
12
13 vec-fft_c_src = \
14 vec-fft_main.c \
15 vec-fft.c \
16 $(vec-fft_data_src)
17
18 vec-fft_riscv_src = \
19 crt.S \
20 vec-vfft.S
21
22 vec-fft_c_objs = $(patsubst %.c, %.o, $(vec-fft_c_src))
23 vec-fft_riscv_objs = $(patsubst %.S, %.o, $(vec-fft_riscv_src))
24
25 vec-fft_data_bin = fft-data-gen
26 $(vec-fft_data_src): $(vec-fft_data_bin)
27 ./$< $(FFT_FLOATING_PREC) $(FFT_SIZE) > $@
28
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)
32
33 RISCV_LINK_SYSCALL = $(bmarkdir)/common/syscalls.c -lc
34
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)
38
39 junk += \
40 $(vec-fft_data_src) $(vec-fft_c_objs) $(vec-fft_riscv_objs) \
41 $(vec-fft_host_bin) $(vec-fft_riscv_bin)