Makefile 488 B

1234567891011121314151617181920
  1. ifeq ($(shell uname), Linux)
  2. # Linux-specific settings
  3. toolchain=/home/mhy/gcc-arm-none-eabi-10.3-2021.10/bin
  4. else
  5. # Windows-specific settings
  6. # toolchain=F:\work\TOOLS\sdk-toolchain-RISC-V-GCC-WCH\bin
  7. ifndef toolchain
  8. $(warning Please rewrite the toolchain in windows local directory")
  9. exit 0
  10. endif
  11. endif
  12. all:
  13. scons -j 8 --exec-path=$(toolchain)
  14. PHONY: clean
  15. clean:
  16. scons -c --exec-path=$(toolchain)
  17. rm -f *.bin *.hex *.map > /dev/null 2>&1