Makefile 746 B

12345678910111213141516171819202122232425262728
  1. # The purpose of this Makefile is to build dummy ELF files required to run idf_monitor tests.
  2. # Make sure the toolchains are in the PATH:
  3. PREFIX_XTENSA ?= xtensa-esp32-elf-
  4. PREFIX_RISCV ?= riscv32-esp-elf-
  5. PROG_XTENSA := dummy_xtensa.elf
  6. PROG_RISCV := dummy_riscv.elf
  7. CPPFLAGS_XTENSA := -DTASK_NAME_OFFSET=52
  8. CPPFLAGS_RISCV := -DTASK_NAME_OFFSET=52
  9. all: $(PROG_XTENSA) $(PROG_RISCV)
  10. $(PROG_XTENSA): dummy.c
  11. $(PREFIX_XTENSA)gcc $(CPPFLAGS_XTENSA) --specs=nosys.specs -o $@ -g $^
  12. chmod -x $@
  13. # ^ chmod is there so that we don't have to add ELF files to executables list
  14. $(PROG_RISCV): dummy.c
  15. $(PREFIX_RISCV)gcc $(CPPFLAGS_RISCV) --specs=nosys.specs -o $@ -g $^
  16. chmod -x $@
  17. clean:
  18. rm -f $(PROG_XTENSA) $(PROG_RISCV)
  19. .PHONY: clean all