aboutsummaryrefslogtreecommitdiff
path: root/main/makefile
blob: 1986cd38761d196766b70dec92311e82b1ac2a70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# this file is for lazy people (loek)

.PHONY: FORCE

all: FORCE build/main.uf2

build/build.ninja: CMakeLists.txt
	mkdir -p build
	cmake -B build -G Ninja --fresh --log-level WARNING

build/main.uf2: build/build.ninja FORCE
	ninja -C build
# ninja automatically builds in parallel, so is preferred

flash: build/main.uf2 FORCE
	picotool load -fx $<
# -f forces a reboot of the pico before flashing
# -x resets the pico after flashing

clean: FORCE
	$(RM) -r build