diff options
Diffstat (limited to 'common_features.mk')
-rw-r--r-- | common_features.mk | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/common_features.mk b/common_features.mk index 572a6db54..8c3361732 100644 --- a/common_features.mk +++ b/common_features.mk | |||
@@ -254,20 +254,34 @@ QUANTUM_SRC:= \ | |||
254 | $(QUANTUM_DIR)/keymap_common.c \ | 254 | $(QUANTUM_DIR)/keymap_common.c \ |
255 | $(QUANTUM_DIR)/keycode_config.c | 255 | $(QUANTUM_DIR)/keycode_config.c |
256 | 256 | ||
257 | ifeq ($(strip $(SPLIT_KEYBOARD)), yes) | 257 | # Include the standard or split matrix code if needed |
258 | ifneq ($(strip $(CUSTOM_MATRIX)), yes) | 258 | ifneq ($(strip $(CUSTOM_MATRIX)), yes) |
259 | QUANTUM_SRC += $(QUANTUM_DIR)/split_common/matrix.c | 259 | ifeq ($(strip $(SPLIT_KEYBOARD)), yes) |
260 | # Do not use $(QUANTUM_DIR)/matrix.c. | 260 | QUANTUM_SRC += $(QUANTUM_DIR)/split_common/matrix.c |
261 | CUSTOM_MATRIX=yes | 261 | else |
262 | QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c | ||
262 | endif | 263 | endif |
264 | endif | ||
265 | |||
266 | # Include the standard debounce code if needed | ||
267 | ifneq ($(strip $(CUSTOM_DEBOUNCE)), yes) | ||
268 | QUANTUM_SRC += $(QUANTUM_DIR)/debounce.c | ||
269 | endif | ||
270 | |||
271 | ifeq ($(strip $(SPLIT_KEYBOARD)), yes) | ||
263 | OPT_DEFS += -DSPLIT_KEYBOARD | 272 | OPT_DEFS += -DSPLIT_KEYBOARD |
273 | |||
274 | # Include files used by all split keyboards | ||
264 | QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_flags.c \ | 275 | QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_flags.c \ |
265 | $(QUANTUM_DIR)/split_common/split_util.c | 276 | $(QUANTUM_DIR)/split_common/split_util.c |
266 | QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/i2c.c | 277 | |
267 | QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/serial.c | 278 | # Determine which (if any) transport files are required |
279 | ifneq ($(strip $(SPLIT_TRANSPORT)), custom) | ||
280 | QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c | ||
281 | # Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called. | ||
282 | # Unused functions are pruned away, which is why we can add both drivers here without bloat. | ||
283 | QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/i2c.c \ | ||
284 | $(QUANTUM_DIR)/split_common/serial.c | ||
285 | endif | ||
268 | COMMON_VPATH += $(QUANTUM_PATH)/split_common | 286 | COMMON_VPATH += $(QUANTUM_PATH)/split_common |
269 | endif | 287 | endif |
270 | |||
271 | ifneq ($(strip $(CUSTOM_MATRIX)), yes) | ||
272 | QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c | ||
273 | endif | ||