bmark.mk 1.1 KB

1234567891011121314151617181920212223242526272829303132
  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. mt_vvadd_c_src = \
  11. mt-vvadd.c \
  12. vvadd.c \
  13. syscalls.c \
  14. mt_vvadd_riscv_src = \
  15. crt.S \
  16. mt_vvadd_c_objs = $(patsubst %.c, %.o, $(mt_vvadd_c_src))
  17. mt_vvadd_riscv_objs = $(patsubst %.S, %.o, $(mt_vvadd_riscv_src))
  18. mt_vvadd_host_bin = mt-vvadd.host
  19. $(mt_vvadd_host_bin) : $(mt_vvadd_c_src)
  20. $(HOST_COMP) $^ -o $(mt_vvadd_host_bin)
  21. mt_vvadd_riscv_bin = mt-vvadd.riscv
  22. $(mt_vvadd_riscv_bin) : $(mt_vvadd_c_objs) $(mt_vvadd_riscv_objs)
  23. $(RISCV_LINK) $(mt_vvadd_c_objs) $(mt_vvadd_riscv_objs) $(RISCV_LINK_OPTS) -o $(mt_vvadd_riscv_bin)
  24. junk += $(mt_vvadd_c_objs) $(mt_vvadd_riscv_objs) \
  25. $(mt_vvadd_host_bin) $(mt_vvadd_riscv_bin)