2024-09-11 21:56:52 +08:00
|
|
|
RM = rm -rf
|
|
|
|
MKBUILD = rm -rf build && mkdir -p build # test -d build || mkdir build
|
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
RM = cmd /C del /Q /F /S
|
|
|
|
MKBUILD = if not exist build mkdir build
|
|
|
|
endif
|
|
|
|
|
|
|
|
all example:
|
|
|
|
true
|
|
|
|
|
|
|
|
build: pico-sdk build/firmware.uf2
|
|
|
|
|
|
|
|
build/firmware.uf2:
|
|
|
|
$(MKBUILD)
|
2024-12-02 22:11:48 +08:00
|
|
|
cd build && cmake -DPICO_BOARD="pico_w" -G "Unix Makefiles" .. && make
|
2024-09-11 21:56:52 +08:00
|
|
|
|
|
|
|
pico-sdk:
|
2024-12-02 22:11:48 +08:00
|
|
|
git clone --depth 1 -b 2.0.0 https://github.com/raspberrypi/pico-sdk $@
|
2024-09-11 21:56:52 +08:00
|
|
|
cd $@ && git submodule update --init
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) pico-sdk build
|