-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
28 lines (20 loc) · 692 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
KEYBOARD := planck
KEYMAP := thor
HERE := $(realpath ./)
CODE_DIR := $(realpath ../)
QMK_DIR := $(CODE_DIR)/qmk_firmware
KEYMAP_DIR := $(QMK_DIR)/keyboards/$(KEYBOARD)/keymaps/$(KEYMAP)
$(KEYMAP_DIR):
mkdir -p $(KEYMAP_DIR)
prepare: | $(KEYMAP_DIR)
ln -sf $(HERE)/planck_keymap.c $(KEYMAP_DIR)/keymap.c
ln -sf $(HERE)/planck_rules.mk $(KEYMAP_DIR)/rules.mk
ln -sf $(HERE)/planck_config.h $(KEYMAP_DIR)/config.h
build: | prepare
cd $(QMK_DIR) && CFLAGS=-Wno-attribute-alias make $(KEYBOARD):$(KEYMAP)
flash: | prepare
cd $(QMK_DIR) && CFLAGS=-Wno-attribute-alias make $(KEYBOARD):$(KEYMAP):dfu
update:
cd $(KEYMAP_DIR) && git pull --ff-only
clean:
cd $(QMK_DIR) && make clean