bmark.mk 1.1 KB

12345678910111213141516171819202122232425262728293031
  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. coremark_c_src = core_list_join.c core_main.c core_matrix.c core_state.c core_util.c core_portme.c \
  11. syscalls.c \
  12. coremark_riscv_src = \
  13. crt.S \
  14. coremark_c_objs = $(patsubst %.c, %.o, $(coremark_c_src))
  15. coremark_riscv_objs = $(patsubst %.S, %.o, $(coremark_riscv_src))
  16. coremark_host_bin = coremark.host
  17. $(coremark_host_bin): $(coremark_c_src)
  18. $(HOST_COMP) $^ -o $(coremark_host_bin)
  19. coremark_riscv_bin = coremark.riscv
  20. $(coremark_riscv_bin): $(coremark_c_objs) $(coremark_riscv_objs)
  21. $(RISCV_LINK) $(coremark_c_objs) $(coremark_riscv_objs) \
  22. -o $(coremark_riscv_bin) $(RISCV_LINK_OPTS)
  23. junk += $(coremark_c_objs) $(coremark_riscv_objs) \
  24. $(coremark_host_bin) $(coremark_riscv_bin)