forked from KinesisCorporation/Adv360-Pro-ZMK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
21 lines (15 loc) · 556 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
TIMESTAMP := $(shell date -u +"%Y%m%d%H%M%S")
DOCKER := $(shell { command -v podman || command -v docker; })
.PHONY: clean setup
all: setup build
build: firmware/$$(TIMESTAMP)-left.uf2 firmware/$$(TIMESTAMP)-right.uf2
clean:
rm -f firmware/*.uf2
firmware/%-left.uf2 firmware/%-right.uf2: config/adv360.keymap
$(DOCKER) run --rm -it --name zmk \
-v $(PWD)/firmware:/app/firmware \
-v $(PWD)/config:/app/config:ro \
-e TIMESTAMP=$(TIMESTAMP) \
zmk
setup: Dockerfile bin/build.sh config/west.yml
$(DOCKER) build --tag zmk --file Dockerfile .