summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 20 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 39d09d3..9d7d347 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,7 @@ SELINUX1 := :z
SELINUX2 := ,z
endif
-.PHONY: all clean
+.PHONY: all left clean_firmware clean_image clean
all:
$(shell bin/get_version.sh >> /dev/null)
@@ -20,8 +20,26 @@ all:
-v $(PWD)/config:/app/config:ro$(SELINUX2) \
-e TIMESTAMP=$(TIMESTAMP) \
-e COMMIT=$(COMMIT) \
+ -e BUILD_RIGHT=true \
zmk
+ $(shell git checkout config/version.dtsi)
-clean:
+left:
+ $(shell bin/get_version.sh >> /dev/null)
+ $(DOCKER) build --tag zmk --file Dockerfile .
+ $(DOCKER) run --rm -it --name zmk \
+ -v $(PWD)/firmware:/app/firmware$(SELINUX1) \
+ -v $(PWD)/config:/app/config:ro$(SELINUX2) \
+ -e TIMESTAMP=$(TIMESTAMP) \
+ -e COMMIT=$(COMMIT) \
+ -e BUILD_RIGHT=false \
+ zmk
+ $(shell git checkout config/version.dtsi)
+
+clean_firmware:
rm -f firmware/*.uf2
+
+clean_image:
$(DOCKER) image rm zmk docker.io/zmkfirmware/zmk-build-arm:stable
+
+clean: clean_firmware clean_image