home | blog | art | git gpg | email | rss

zmk-config

Personal ZMK configuration for my wireless keyboard
git clone git://pollux.codes/git/zmk-config
Log | Files | Refs | README

Makefile (441B)


      1 ZMK_DIRECTORY=$(HOME)/.local/opt/zmk
      2 BOARDS=cradio_left cradio_right
      3 
      4 CONFIG_DIR=$(shell pwd)/config
      5 BUILD_DIR=$(shell pwd)/build
      6 
      7 %.uf2: $(wildcard $(CONFIG_DIR)/*)
      8 	. $(ZMK_DIRECTORY)/.venv/bin/activate; \
      9 	cd $(ZMK_DIRECTORY)/app; \
     10 	west build -b nice_nano_v2 -d $(BUILD_DIR)/$* -- -DSHIELD=$* -DZMK_CONFIG="$(CONFIG_DIR)"
     11 	cp $(BUILD_DIR)/$*/zephyr/zmk.uf2 $@
     12 
     13 all: $(BOARDS:%=%.uf2)
     14 
     15 clean:
     16 	rm *.uf2
     17 	rm -r $(BOARDS:%=$(BUILD_DIR)/%)