bmark.mk 1019 B

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. vvadd_c_src = \
  11. vvadd_main.c \
  12. syscalls.c \
  13. vvadd_riscv_src = \
  14. crt.S \
  15. vvadd_c_objs = $(patsubst %.c, %.o, $(vvadd_c_src))
  16. vvadd_riscv_objs = $(patsubst %.S, %.o, $(vvadd_riscv_src))
  17. vvadd_host_bin = vvadd.host
  18. $(vvadd_host_bin) : $(vvadd_c_src)
  19. $(HOST_COMP) $^ -o $(vvadd_host_bin)
  20. vvadd_riscv_bin = vvadd.riscv
  21. $(vvadd_riscv_bin) : $(vvadd_c_objs) $(vvadd_riscv_objs)
  22. $(RISCV_LINK) $(vvadd_c_objs) $(vvadd_riscv_objs) -o $(vvadd_riscv_bin) $(RISCV_LINK_OPTS)
  23. junk += $(vvadd_c_objs) $(vvadd_riscv_objs) \
  24. $(vvadd_host_bin) $(vvadd_riscv_bin)