Files
Adv360-Pro-ZMK/Makefile
T
Allan Wind b3753fd711 Makefile: simplify; clean removes images
The target all was previous running setup followed by build.  As
both setup and build are phony targets they run in sequence and because
the firmware contain the timestamp they always run (dependencies doesn't
do anything).  all now does exactly what it says on the tin
without introducing non-standard targets.

clean now removes the images that created during build which is
what you expect from that target.  See:
https://www.gnu.org/software/make/manual/html_node/Standard-Targets.html#Standard-Targets
2022-11-01 00:19:43 -04:00

17 lines
424 B
Makefile

DOCKER := $(shell { command -v podman || command -v docker; })
TIMESTAMP := $(shell date -u +"%Y%m%d%H%M%S")
.PHONY: all clean
all:
$(DOCKER) build --tag zmk --file Dockerfile .
$(DOCKER) run --rm -it --name zmk \
-v $(PWD)/firmware:/app/firmware \
-v $(PWD)/config:/app/config:ro \
-e TIMESTAMP=$(TIMESTAMP) \
zmk
clean:
rm -f firmware/*.uf2
$(DOCKER) image rm zmk docker.io/zmkfirmware/zmk-build-arm:stable