aboutsummaryrefslogtreecommitdiff
path: root/benchmarks/qsort/bmark.mk
blob: 4b39d965f60d420881f0e806ddb6104336d8f159 (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.
#

qsort_c_src = \
	qsort_main.c \
	syscalls.c \

qsort_riscv_src = \
	crt.S \

qsort_c_objs     = $(patsubst %.c, %.o, $(qsort_c_src))
qsort_riscv_objs = $(patsubst %.S, %.o, $(qsort_riscv_src))

qsort_host_bin = qsort.host
$(qsort_host_bin) : $(qsort_c_src)
	$(HOST_COMP) $^ -o $(qsort_host_bin)

qsort_riscv_bin = qsort.riscv
$(qsort_riscv_bin) : $(qsort_c_objs) $(qsort_riscv_objs)
	$(RISCV_LINK) $(qsort_c_objs) $(qsort_riscv_objs) -o $(qsort_riscv_bin) $(RISCV_LINK_OPTS)

junk += $(qsort_c_objs) $(qsort_riscv_objs) \
        $(qsort_host_bin) $(qsort_riscv_bin)