aboutsummaryrefslogtreecommitdiff
path: root/users/drashna/rules.mk
diff options
context:
space:
mode:
Diffstat (limited to 'users/drashna/rules.mk')
-rw-r--r--users/drashna/rules.mk77
1 files changed, 46 insertions, 31 deletions
diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk
index 2ae01c62e..b79051508 100644
--- a/users/drashna/rules.mk
+++ b/users/drashna/rules.mk
@@ -16,29 +16,37 @@ ifneq ($(strip $(NO_SECRETS)), yes)
16 endif 16 endif
17endif 17endif
18 18
19CUSTOM_TAP_DANCE ?= yes
19ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) 20ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
20 SRC += tap_dances.c 21 ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
22 SRC += tap_dances.c
23 endif
21endif 24endif
22 25
26CUSTOM_RGBLIGHT ?= yes
23ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) 27ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
24 SRC += rgb_stuff.c 28 ifeq ($(strip $(CUSTOM_RGBLIGHT)), yes)
25 ifeq ($(strip $(RGBLIGHT_TWINKLE)), yes) 29 SRC += rgb_stuff.c
26 OPT_DEFS += -DRGBLIGHT_TWINKLE 30 ifeq ($(strip $(RGBLIGHT_TWINKLE)), yes)
27 endif 31 OPT_DEFS += -DRGBLIGHT_TWINKLE
28 ifeq ($(strip $(RGBLIGHT_NOEEPROM)), yes) 32 endif
29 OPT_DEFS += -DRGBLIGHT_NOEEPROM 33 ifeq ($(strip $(RGBLIGHT_NOEEPROM)), yes)
30 endif 34 OPT_DEFS += -DRGBLIGHT_NOEEPROM
31 ifeq ($(strip $(RGBLIGHT_STARTUP_ANIMATION)), yes) 35 endif
32 OPT_DEFS += -DRGBLIGHT_STARTUP_ANIMATION 36 ifeq ($(strip $(RGBLIGHT_STARTUP_ANIMATION)), yes)
37 OPT_DEFS += -DRGBLIGHT_STARTUP_ANIMATION
38 endif
33 endif 39 endif
34endif 40endif
35 41
36RGB_MATRIX_ENABLE ?= no 42CUSTOM_RGB_MATRIX ?= yes
37ifneq ($(strip $(RGB_MATRIX_ENABLE)), no) 43ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
38 SRC += rgb_matrix_stuff.c 44 ifeq ($(strip $(CUSTOM_RGB_MATRIX)), yes)
45 SRC += rgb_matrix_stuff.c
46 endif
39endif 47endif
40 48
41 49KEYLOGGER_ENABLE ?= no
42ifdef CONSOLE_ENABLE 50ifdef CONSOLE_ENABLE
43 ifeq ($(strip $(KEYLOGGER_ENABLE)), yes) 51 ifeq ($(strip $(KEYLOGGER_ENABLE)), yes)
44 OPT_DEFS += -DKEYLOGGER_ENABLE 52 OPT_DEFS += -DKEYLOGGER_ENABLE
@@ -56,8 +64,11 @@ ifeq ($(strip $(PROTOCOL)), VUSB)
56 NKRO_ENABLE = no 64 NKRO_ENABLE = no
57endif 65endif
58 66
67CUSTOM_OLED_DRIVER ?= yes
59ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) 68ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
60 SRC += oled_stuff.c 69 ifeq ($(strip $(CUSTOM_OLED_DRIVER)), yes)
70 SRC += oled_stuff.c
71 endif
61endif 72endif
62 73
63ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes) 74ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes)
@@ -67,26 +78,30 @@ ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes)
67 QUANTUM_LIB_SRC += i2c_master.c 78 QUANTUM_LIB_SRC += i2c_master.c
68endif 79endif
69 80
70 81CUSTOM_SPLIT_TRANSPORT ?= yes
71ifeq ($(strip $(SPLIT_KEYBOARD)), yes) 82ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
72 ifneq ($(strip $(SPLIT_TRANSPORT)), custom) 83 ifneq ($(strip $(SPLIT_TRANSPORT)), custom)
73 SPLIT_TRANSPORT = custom 84 ifeq ($(strip $(CUSTOM_SPLIT_TRANSPORT)), yes)
74 QUANTUM_LIB_SRC += drashna_transport.c 85 SPLIT_TRANSPORT = custom
75 OPT_DEFS += -DDRASHNA_CUSTOM_TRANSPORT 86 QUANTUM_LIB_SRC += drashna_transport.c
76 # Unused functions are pruned away, which is why we can add multiple drivers here without bloat. 87 OPT_DEFS += -DDRASHNA_CUSTOM_TRANSPORT
77 ifeq ($(PLATFORM),AVR) 88 # Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
78 ifneq ($(NO_I2C),yes) 89 ifeq ($(PLATFORM),AVR)
79 QUANTUM_LIB_SRC += i2c_master.c \ 90 ifneq ($(NO_I2C),yes)
80 i2c_slave.c 91 QUANTUM_LIB_SRC += i2c_master.c \
92 i2c_slave.c
93 endif
81 endif 94 endif
82 endif
83 95
84 SERIAL_DRIVER ?= bitbang 96 SERIAL_DRIVER ?= bitbang
85 OPT_DEFS += -DSERIAL_DRIVER_$(strip $(shell echo $(SERIAL_DRIVER) | tr '[:lower:]' '[:upper:]')) 97 OPT_DEFS += -DSERIAL_DRIVER_$(strip $(shell echo $(SERIAL_DRIVER) | tr '[:lower:]' '[:upper:]'))
86 ifeq ($(strip $(SERIAL_DRIVER)), bitbang) 98 ifeq ($(strip $(SERIAL_DRIVER)), bitbang)
87 QUANTUM_LIB_SRC += serial.c 99 QUANTUM_LIB_SRC += serial.c
88 else 100 else
89 QUANTUM_LIB_SRC += serial_$(strip $(SERIAL_DRIVER)).c 101 QUANTUM_LIB_SRC += serial_$(strip $(SERIAL_DRIVER)).c
102 endif
90 endif 103 endif
91 endif 104 endif
92endif 105endif
106
107# DEBUG_MATRIX_SCAN_RATE_ENABLE = api