2022-02-13 22:46:17 +00:00
|
|
|
# Copyright 2022 Nick Brassel (@tzarc)
|
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
|
|
XAP_FILES := $(shell ls -1 data/xap/* | sort | xargs echo)
|
2022-05-23 01:14:42 +00:00
|
|
|
ifneq ("$(wildcard $(KEYBOARD_PATH_1)/xap.hjson)","")
|
|
|
|
XAP_FILES += $(KEYBOARD_PATH_1)/xap.hjson
|
2022-05-23 00:25:32 +00:00
|
|
|
endif
|
2022-05-23 01:14:42 +00:00
|
|
|
ifneq ("$(wildcard $(KEYBOARD_PATH_2)/xap.hjson)","")
|
|
|
|
XAP_FILES += $(KEYBOARD_PATH_2)/xap.hjson
|
2022-05-23 00:25:32 +00:00
|
|
|
endif
|
2022-05-23 01:14:42 +00:00
|
|
|
ifneq ("$(wildcard $(KEYBOARD_PATH_3)/xap.hjson)","")
|
|
|
|
XAP_FILES += $(KEYBOARD_PATH_3)/xap.hjson
|
2022-05-23 00:25:32 +00:00
|
|
|
endif
|
2022-05-23 01:14:42 +00:00
|
|
|
ifneq ("$(wildcard $(KEYBOARD_PATH_4)/xap.hjson)","")
|
|
|
|
XAP_FILES += $(KEYBOARD_PATH_4)/xap.hjson
|
2022-05-23 00:25:32 +00:00
|
|
|
endif
|
2022-05-23 01:14:42 +00:00
|
|
|
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/xap.hjson)","")
|
|
|
|
XAP_FILES += $(KEYBOARD_PATH_5)/xap.hjson
|
2022-05-23 00:25:32 +00:00
|
|
|
endif
|
2022-05-23 01:14:42 +00:00
|
|
|
ifneq ("$(wildcard $(KEYMAP_PATH)/xap.hjson)","")
|
|
|
|
XAP_FILES += $(KEYMAP_PATH)/xap.hjson
|
2022-05-23 00:25:32 +00:00
|
|
|
endif
|
2023-01-09 19:35:47 +00:00
|
|
|
ifneq ("$(wildcard $(USER_NAME)/xap.hjson)","")
|
|
|
|
XAP_FILES += $(USER_NAME)/xap.hjson
|
|
|
|
endif
|
2022-02-13 22:46:17 +00:00
|
|
|
|
2023-07-06 01:55:18 +00:00
|
|
|
$(INTERMEDIATE_OUTPUT)/src/config_blob_gz.h: $(INFO_JSON_FILES)
|
2022-05-24 15:15:26 +00:00
|
|
|
@$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
|
2023-07-06 01:55:18 +00:00
|
|
|
$(eval CMD=$(QMK_BIN) xap-generate-qmk-blob-h -o "$(INTERMEDIATE_OUTPUT)/src/config_blob_gz.h" -kb $(KEYBOARD) -km $(KEYMAP))
|
2022-05-24 15:15:26 +00:00
|
|
|
@$(BUILD_CMD)
|
|
|
|
|
2023-07-06 01:55:18 +00:00
|
|
|
$(INTERMEDIATE_OUTPUT)/src/xap_generated.inl: $(XAP_FILES)
|
2022-02-13 22:46:17 +00:00
|
|
|
@$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
|
2023-07-06 01:55:18 +00:00
|
|
|
$(eval CMD=$(QMK_BIN) xap-generate-qmk-inc -o "$(INTERMEDIATE_OUTPUT)/src/xap_generated.inl" -kb $(KEYBOARD) -km $(KEYMAP))
|
2022-02-13 22:46:17 +00:00
|
|
|
@$(BUILD_CMD)
|
|
|
|
|
2023-07-06 01:55:18 +00:00
|
|
|
$(INTERMEDIATE_OUTPUT)/src/xap_generated.h: $(XAP_FILES)
|
2022-02-13 22:46:17 +00:00
|
|
|
@$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
|
2023-07-06 01:55:18 +00:00
|
|
|
$(eval CMD=$(QMK_BIN) xap-generate-qmk-h -o "$(INTERMEDIATE_OUTPUT)/src/xap_generated.h" -kb $(KEYBOARD) -km $(KEYMAP))
|
2022-02-13 22:46:17 +00:00
|
|
|
@$(BUILD_CMD)
|
|
|
|
|
2023-07-06 01:55:18 +00:00
|
|
|
generated-files: $(INTERMEDIATE_OUTPUT)/src/config_blob_gz.h $(INTERMEDIATE_OUTPUT)/src/xap_generated.inl $(INTERMEDIATE_OUTPUT)/src/xap_generated.h
|
2022-02-13 22:46:17 +00:00
|
|
|
|
2023-07-06 01:55:18 +00:00
|
|
|
VPATH += $(INTERMEDIATE_OUTPUT)/src
|