2019-07-16 01:14:27 +06:00
|
|
|
# Look for a json keymap file
|
|
|
|
ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.json)","")
|
|
|
|
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_5)/keymap.json
|
2023-09-25 10:17:50 +06:00
|
|
|
KEYMAP_JSON_PATH := $(MAIN_KEYMAP_PATH_5)
|
2019-07-16 01:14:27 +06:00
|
|
|
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.json)","")
|
|
|
|
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_4)/keymap.json
|
2023-09-25 10:17:50 +06:00
|
|
|
KEYMAP_JSON_PATH := $(MAIN_KEYMAP_PATH_4)
|
2019-07-16 01:14:27 +06:00
|
|
|
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.json)","")
|
|
|
|
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_3)/keymap.json
|
2023-09-25 10:17:50 +06:00
|
|
|
KEYMAP_JSON_PATH := $(MAIN_KEYMAP_PATH_3)
|
2019-07-16 01:14:27 +06:00
|
|
|
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.json)","")
|
|
|
|
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_2)/keymap.json
|
2023-09-25 10:17:50 +06:00
|
|
|
KEYMAP_JSON_PATH := $(MAIN_KEYMAP_PATH_2)
|
2019-07-16 01:14:27 +06:00
|
|
|
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.json)","")
|
|
|
|
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_1)/keymap.json
|
2023-09-25 10:17:50 +06:00
|
|
|
KEYMAP_JSON_PATH := $(MAIN_KEYMAP_PATH_1)
|
2019-07-16 01:14:27 +06:00
|
|
|
endif
|
2023-11-28 02:53:43 +06:00
|
|
|
|
|
|
|
ifneq ($(QMK_USERSPACE),)
|
|
|
|
ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_5)/keymap.json)","")
|
|
|
|
KEYMAP_JSON := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_5)/keymap.json
|
|
|
|
KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_5)
|
|
|
|
else ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_4)/keymap.json)","")
|
|
|
|
KEYMAP_JSON := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_4)/keymap.json
|
|
|
|
KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_4)
|
|
|
|
else ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_3)/keymap.json)","")
|
|
|
|
KEYMAP_JSON := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_3)/keymap.json
|
|
|
|
KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_3)
|
|
|
|
else ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_2)/keymap.json)","")
|
|
|
|
KEYMAP_JSON := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_2)/keymap.json
|
|
|
|
KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_2)
|
|
|
|
else ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_1)/keymap.json)","")
|
|
|
|
KEYMAP_JSON := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_1)/keymap.json
|
|
|
|
KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_1)
|
|
|
|
endif
|
|
|
|
endif
|