qmk_keymaps/Makefile

58 lines
2.1 KiB
Makefile
Raw Normal View History

.PHONY: all format clean go draw qmk_upstream qmk_init qmk_clean dztech_dz60rgb_wkl
2023-07-20 20:48:12 +00:00
all:
$(MAKE) format
2023-08-06 09:23:38 +00:00
$(MAKE) draw
$(MAKE) qmk_upstream
2023-07-20 20:48:12 +00:00
format:
2023-08-03 08:30:40 +00:00
clang-format -i dztech_dz60rgb_wkl/keymaps/haunt98/*.c dztech_dz60rgb_wkl/keymaps/haunt98/*.h & \
clang-format-mp-15 -i dztech_dz60rgb_wkl/keymaps/haunt98/*.c dztech_dz60rgb_wkl/keymaps/haunt98/*.h
2023-07-20 20:59:17 +00:00
2023-07-20 20:48:12 +00:00
clean:
rm -rf dztech_dz60rgb_wkl_v2_1_haunt98.bin
2023-07-21 02:52:51 +00:00
2023-07-24 06:36:28 +00:00
# From changeloguru
go:
go install github.com/haunt98/go-test-color@latest
go-test-color -race -failfast ./...
golangci-lint run ./...
go install github.com/haunt98/gofimports/cmd/gofimports@latest
go install mvdan.cc/gofumpt@latest
gofimports -w --company github.com/make-go-great,github.com/haunt98 .
gofumpt -w -extra .
draw:
$(MAKE) go
2023-07-28 11:57:12 +00:00
go run ./cmd/qmkasciigen/*.go -qmk-keyboard dztech/dz60rgb_wkl/v2_1 -qmk-keymap-file dztech_dz60rgb_wkl/keymaps_json/haunt98/keymap.json -out dztech_dz60rgb_wkl/asciiart/haunt98.txt
2023-08-06 09:23:38 +00:00
# https://github.com/caksoylar/keymap-drawer
pipx install keymap-drawer
keymap parse -q dztech_dz60rgb_wkl/keymaps_json/haunt98/keymap.json > dztech_dz60rgb_wkl/caksoylar_keymap_drawer/keymap.yaml
keymap draw dztech_dz60rgb_wkl/caksoylar_keymap_drawer/keymap.yaml > dztech_dz60rgb_wkl/caksoylar_keymap_drawer/keymap.svg
qmk_upstream:
curl https://raw.githubusercontent.com/qmk/qmk_firmware/master/.clang-format --output .clang-format
qmk_init:
qmk setup -H ~/qmk_firmware
qmk git-submodule
qmk doctor
qmk_clean:
qmk clean
rm -rf ~/qmk_firmware/keyboards/dztech/dz60rgb_wkl/keymaps/haunt98
2023-07-21 08:46:38 +00:00
dztech_dz60rgb_wkl:
$(MAKE) qmk_init
2023-07-21 08:46:38 +00:00
# Copy
rm -rf ~/qmk_firmware/keyboards/dztech/dz60rgb_wkl/keymaps/haunt98
cp -rf dztech_dz60rgb_wkl/keymaps/haunt98 ~/qmk_firmware/keyboards/dztech/dz60rgb_wkl/keymaps/
2023-07-21 09:15:46 +00:00
# Lint
qmk lint -kb dztech/dz60rgb_wkl/v2_1 -km haunt98
2023-07-21 08:46:38 +00:00
# Compile
qmk compile -j 8 -kb dztech/dz60rgb_wkl/v2_1 -km haunt98
mv ~/qmk_firmware/dztech_dz60rgb_wkl_v2_1_haunt98.bin .
2023-07-22 18:02:56 +00:00
# JSON
2023-07-21 08:46:38 +00:00
rm -rf dztech_dz60rgb_wkl/keymaps_json/haunt98/keymap.json
qmk c2json -kb dztech/dz60rgb_wkl/v2_1 -km haunt98 -o dztech_dz60rgb_wkl/keymaps_json/haunt98/keymap.json dztech_dz60rgb_wkl/keymaps/haunt98/keymap.c