1ifeq ($(shell uname), Linux)
2    # Linux-specific settings
3    toolchain=/home/mhy/gcc-arm-none-eabi-10.3-2021.10/bin
4else
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
11endif
12
13all:
14	scons -j 8 --exec-path=$(toolchain)
15
16PHONY: clean
17clean:
18	scons -c --exec-path=$(toolchain)
19	rm -f *.bin *.hex *.map > /dev/null 2>&1
20
21