diff options
Diffstat (limited to 'common_features.mk')
| -rw-r--r-- | common_features.mk | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/common_features.mk b/common_features.mk index 92b24bb20..67c64b425 100644 --- a/common_features.mk +++ b/common_features.mk | |||
| @@ -374,12 +374,28 @@ QUANTUM_SRC:= \ | |||
| 374 | $(QUANTUM_DIR)/keymap_common.c \ | 374 | $(QUANTUM_DIR)/keymap_common.c \ |
| 375 | $(QUANTUM_DIR)/keycode_config.c | 375 | $(QUANTUM_DIR)/keycode_config.c |
| 376 | 376 | ||
| 377 | # Include the standard or split matrix code if needed | 377 | |
| 378 | |||
| 379 | VALID_CUSTOM_MATRIX_TYPES:= yes lite no | ||
| 380 | |||
| 381 | CUSTOM_MATRIX ?= no | ||
| 382 | |||
| 378 | ifneq ($(strip $(CUSTOM_MATRIX)), yes) | 383 | ifneq ($(strip $(CUSTOM_MATRIX)), yes) |
| 379 | ifeq ($(strip $(SPLIT_KEYBOARD)), yes) | 384 | ifeq ($(filter $(CUSTOM_MATRIX),$(VALID_CUSTOM_MATRIX_TYPES)),) |
| 380 | QUANTUM_SRC += $(QUANTUM_DIR)/split_common/matrix.c | 385 | $(error CUSTOM_MATRIX="$(CUSTOM_MATRIX)" is not a valid custom matrix type) |
| 381 | else | 386 | endif |
| 382 | QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c | 387 | |
| 388 | # Include common stuff for all non custom matrix users | ||
| 389 | QUANTUM_SRC += $(QUANTUM_DIR)/matrix_common.c | ||
| 390 | |||
| 391 | # if 'lite' then skip the actual matrix implementation | ||
| 392 | ifneq ($(strip $(CUSTOM_MATRIX)), lite) | ||
| 393 | # Include the standard or split matrix code if needed | ||
| 394 | ifeq ($(strip $(SPLIT_KEYBOARD)), yes) | ||
| 395 | QUANTUM_SRC += $(QUANTUM_DIR)/split_common/matrix.c | ||
| 396 | else | ||
| 397 | QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c | ||
| 398 | endif | ||
| 383 | endif | 399 | endif |
| 384 | endif | 400 | endif |
| 385 | 401 | ||
