You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

519 lines
16KB

  1. # Copyright 2017 Fred Sundvik
  2. #
  3. # This program is free software: you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation, either version 2 of the License, or
  6. # (at your option) any later version.
  7. #
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. SERIAL_PATH := $(QUANTUM_PATH)/serial_link
  16. QUANTUM_SRC += \
  17. $(QUANTUM_DIR)/quantum.c \
  18. $(QUANTUM_DIR)/keymap_common.c \
  19. $(QUANTUM_DIR)/keycode_config.c
  20. ifeq ($(strip $(API_SYSEX_ENABLE)), yes)
  21. OPT_DEFS += -DAPI_SYSEX_ENABLE
  22. OPT_DEFS += -DAPI_ENABLE
  23. MIDI_ENABLE=yes
  24. SRC += $(QUANTUM_DIR)/api/api_sysex.c
  25. SRC += $(QUANTUM_DIR)/api.c
  26. endif
  27. ifeq ($(strip $(AUDIO_ENABLE)), yes)
  28. OPT_DEFS += -DAUDIO_ENABLE
  29. MUSIC_ENABLE = yes
  30. SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
  31. SRC += $(QUANTUM_DIR)/process_keycode/process_clicky.c
  32. SRC += $(QUANTUM_DIR)/audio/audio_$(PLATFORM_KEY).c
  33. SRC += $(QUANTUM_DIR)/audio/voices.c
  34. SRC += $(QUANTUM_DIR)/audio/luts.c
  35. endif
  36. ifeq ($(strip $(MIDI_ENABLE)), yes)
  37. OPT_DEFS += -DMIDI_ENABLE
  38. MUSIC_ENABLE = yes
  39. SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
  40. endif
  41. MUSIC_ENABLE ?= no
  42. ifeq ($(MUSIC_ENABLE), yes)
  43. SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
  44. endif
  45. ifeq ($(strip $(STENO_ENABLE)), yes)
  46. OPT_DEFS += -DSTENO_ENABLE
  47. VIRTSER_ENABLE ?= yes
  48. SRC += $(QUANTUM_DIR)/process_keycode/process_steno.c
  49. endif
  50. ifeq ($(strip $(VIRTSER_ENABLE)), yes)
  51. OPT_DEFS += -DVIRTSER_ENABLE
  52. endif
  53. ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes)
  54. OPT_DEFS += -DFAUXCLICKY_ENABLE
  55. SRC += $(QUANTUM_DIR)/fauxclicky.c
  56. endif
  57. ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
  58. OPT_DEFS += -DPOINTING_DEVICE_ENABLE
  59. OPT_DEFS += -DMOUSE_ENABLE
  60. SRC += $(QUANTUM_DIR)/pointing_device.c
  61. endif
  62. VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c
  63. EEPROM_DRIVER ?= vendor
  64. ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),)
  65. $(error EEPROM_DRIVER="$(EEPROM_DRIVER)" is not a valid EEPROM driver)
  66. else
  67. OPT_DEFS += -DEEPROM_ENABLE
  68. ifeq ($(strip $(EEPROM_DRIVER)), custom)
  69. OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_CUSTOM
  70. COMMON_VPATH += $(DRIVER_PATH)/eeprom
  71. SRC += eeprom_driver.c
  72. else ifeq ($(strip $(EEPROM_DRIVER)), i2c)
  73. OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_I2C
  74. COMMON_VPATH += $(DRIVER_PATH)/eeprom
  75. QUANTUM_LIB_SRC += i2c_master.c
  76. SRC += eeprom_driver.c eeprom_i2c.c
  77. else ifeq ($(strip $(EEPROM_DRIVER)), transient)
  78. OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT
  79. COMMON_VPATH += $(DRIVER_PATH)/eeprom
  80. SRC += eeprom_driver.c eeprom_transient.c
  81. else ifeq ($(strip $(EEPROM_DRIVER)), vendor)
  82. OPT_DEFS += -DEEPROM_VENDOR
  83. ifeq ($(PLATFORM),AVR)
  84. # Automatically provided by avr-libc, nothing required
  85. else ifeq ($(PLATFORM),CHIBIOS)
  86. ifeq ($(MCU_SERIES), STM32F3xx)
  87. SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
  88. SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
  89. OPT_DEFS += -DEEPROM_EMU_STM32F303xC
  90. OPT_DEFS += -DSTM32_EEPROM_ENABLE
  91. else ifeq ($(MCU_SERIES), STM32F1xx)
  92. SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
  93. SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
  94. OPT_DEFS += -DEEPROM_EMU_STM32F103xB
  95. OPT_DEFS += -DSTM32_EEPROM_ENABLE
  96. else ifeq ($(MCU_SERIES)_$(MCU_LDSCRIPT), STM32F0xx_STM32F072xB)
  97. SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
  98. SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
  99. OPT_DEFS += -DEEPROM_EMU_STM32F072xB
  100. OPT_DEFS += -DSTM32_EEPROM_ENABLE
  101. else ifneq ($(filter $(MCU_SERIES),STM32L0xx STM32L1xx),)
  102. OPT_DEFS += -DEEPROM_DRIVER
  103. COMMON_VPATH += $(DRIVER_PATH)/eeprom
  104. SRC += eeprom_driver.c eeprom_stm32_L0_L1.c
  105. else
  106. # This will effectively work the same as "transient" if not supported by the chip
  107. SRC += $(PLATFORM_COMMON_DIR)/eeprom_teensy.c
  108. endif
  109. else ifeq ($(PLATFORM),ARM_ATSAM)
  110. SRC += $(PLATFORM_COMMON_DIR)/eeprom.c
  111. else ifeq ($(PLATFORM),TEST)
  112. SRC += $(PLATFORM_COMMON_DIR)/eeprom.c
  113. endif
  114. endif
  115. endif
  116. ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
  117. POST_CONFIG_H += $(QUANTUM_DIR)/rgblight_post_config.h
  118. OPT_DEFS += -DRGBLIGHT_ENABLE
  119. SRC += $(QUANTUM_DIR)/color.c
  120. SRC += $(QUANTUM_DIR)/rgblight.c
  121. CIE1931_CURVE := yes
  122. RGB_KEYCODES_ENABLE := yes
  123. ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes)
  124. OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER
  125. else
  126. WS2812_DRIVER_REQUIRED := yes
  127. endif
  128. endif
  129. VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 IS31FL3737 WS2812 custom
  130. LED_MATRIX_ENABLE ?= no
  131. ifneq ($(strip $(LED_MATRIX_ENABLE)), no)
  132. ifeq ($(filter $(LED_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),)
  133. $(error LED_MATRIX_ENABLE="$(LED_MATRIX_ENABLE)" is not a valid matrix type)
  134. else
  135. BACKLIGHT_ENABLE = yes
  136. BACKLIGHT_DRIVER = custom
  137. OPT_DEFS += -DLED_MATRIX_ENABLE
  138. SRC += $(QUANTUM_DIR)/led_matrix.c
  139. SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
  140. endif
  141. endif
  142. ifeq ($(strip $(LED_MATRIX_ENABLE)), IS31FL3731)
  143. OPT_DEFS += -DIS31FL3731
  144. COMMON_VPATH += $(DRIVER_PATH)/issi
  145. SRC += is31fl3731-simple.c
  146. QUANTUM_LIB_SRC += i2c_master.c
  147. endif
  148. RGB_MATRIX_ENABLE ?= no
  149. ifneq ($(strip $(RGB_MATRIX_ENABLE)), no)
  150. ifeq ($(filter $(RGB_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),)
  151. $(error RGB_MATRIX_ENABLE="$(RGB_MATRIX_ENABLE)" is not a valid matrix type)
  152. endif
  153. OPT_DEFS += -DRGB_MATRIX_ENABLE
  154. SRC += $(QUANTUM_DIR)/color.c
  155. SRC += $(QUANTUM_DIR)/rgb_matrix.c
  156. SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c
  157. CIE1931_CURVE := yes
  158. RGB_KEYCODES_ENABLE := yes
  159. endif
  160. ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
  161. RGB_MATRIX_ENABLE := IS31FL3731
  162. endif
  163. ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3731)
  164. OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
  165. COMMON_VPATH += $(DRIVER_PATH)/issi
  166. SRC += is31fl3731.c
  167. QUANTUM_LIB_SRC += i2c_master.c
  168. endif
  169. ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3733)
  170. OPT_DEFS += -DIS31FL3733 -DSTM32_I2C -DHAL_USE_I2C=TRUE
  171. COMMON_VPATH += $(DRIVER_PATH)/issi
  172. SRC += is31fl3733.c
  173. QUANTUM_LIB_SRC += i2c_master.c
  174. endif
  175. ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3737)
  176. OPT_DEFS += -DIS31FL3737 -DSTM32_I2C -DHAL_USE_I2C=TRUE
  177. COMMON_VPATH += $(DRIVER_PATH)/issi
  178. SRC += is31fl3737.c
  179. QUANTUM_LIB_SRC += i2c_master.c
  180. endif
  181. ifeq ($(strip $(RGB_MATRIX_ENABLE)), WS2812)
  182. OPT_DEFS += -DWS2812
  183. WS2812_DRIVER_REQUIRED := yes
  184. endif
  185. ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes)
  186. OPT_DEFS += -DRGB_MATRIX_CUSTOM_KB
  187. endif
  188. ifeq ($(strip $(RGB_MATRIX_CUSTOM_USER)), yes)
  189. OPT_DEFS += -DRGB_MATRIX_CUSTOM_USER
  190. endif
  191. ifeq ($(strip $(RGB_KEYCODES_ENABLE)), yes)
  192. SRC += $(QUANTUM_DIR)/process_keycode/process_rgb.c
  193. endif
  194. ifeq ($(strip $(PRINTING_ENABLE)), yes)
  195. OPT_DEFS += -DPRINTING_ENABLE
  196. SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c
  197. SRC += $(TMK_DIR)/protocol/serial_uart.c
  198. endif
  199. ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
  200. SERIAL_SRC := $(wildcard $(SERIAL_PATH)/protocol/*.c)
  201. SERIAL_SRC += $(wildcard $(SERIAL_PATH)/system/*.c)
  202. SERIAL_DEFS += -DSERIAL_LINK_ENABLE
  203. COMMON_VPATH += $(SERIAL_PATH)
  204. SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC))
  205. OPT_DEFS += $(SERIAL_DEFS)
  206. VAPTH += $(SERIAL_PATH)
  207. endif
  208. ifneq ($(strip $(VARIABLE_TRACE)),)
  209. SRC += $(QUANTUM_DIR)/variable_trace.c
  210. OPT_DEFS += -DNUM_TRACED_VARIABLES=$(strip $(VARIABLE_TRACE))
  211. ifneq ($(strip $(MAX_VARIABLE_TRACE_SIZE)),)
  212. OPT_DEFS += -DMAX_VARIABLE_TRACE_SIZE=$(strip $(MAX_VARIABLE_TRACE_SIZE))
  213. endif
  214. endif
  215. ifeq ($(strip $(LCD_ENABLE)), yes)
  216. CIE1931_CURVE := yes
  217. endif
  218. # backward compat
  219. ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes)
  220. BACKLIGHT_DRIVER := custom
  221. endif
  222. VALID_BACKLIGHT_TYPES := pwm software custom
  223. BACKLIGHT_ENABLE ?= no
  224. BACKLIGHT_DRIVER ?= pwm
  225. ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
  226. ifeq ($(filter $(BACKLIGHT_DRIVER),$(VALID_BACKLIGHT_TYPES)),)
  227. $(error BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type)
  228. endif
  229. COMMON_VPATH += $(QUANTUM_DIR)/backlight
  230. SRC += $(QUANTUM_DIR)/backlight/backlight.c
  231. SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
  232. OPT_DEFS += -DBACKLIGHT_ENABLE
  233. ifeq ($(strip $(BACKLIGHT_DRIVER)), custom)
  234. OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER
  235. else
  236. SRC += $(QUANTUM_DIR)/backlight/backlight_driver_common.c
  237. ifeq ($(strip $(BACKLIGHT_DRIVER)), pwm)
  238. SRC += $(QUANTUM_DIR)/backlight/backlight_$(PLATFORM_KEY).c
  239. else
  240. SRC += $(QUANTUM_DIR)/backlight/backlight_$(strip $(BACKLIGHT_DRIVER)).c
  241. endif
  242. endif
  243. endif
  244. VALID_WS2812_DRIVER_TYPES := bitbang pwm spi i2c
  245. WS2812_DRIVER ?= bitbang
  246. ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
  247. ifeq ($(filter $(WS2812_DRIVER),$(VALID_WS2812_DRIVER_TYPES)),)
  248. $(error WS2812_DRIVER="$(WS2812_DRIVER)" is not a valid WS2812 driver)
  249. endif
  250. OPT_DEFS += -DWS2812_DRIVER_$(strip $(shell echo $(WS2812_DRIVER) | tr '[:lower:]' '[:upper:]'))
  251. ifeq ($(strip $(WS2812_DRIVER)), bitbang)
  252. SRC += ws2812.c
  253. else
  254. SRC += ws2812_$(strip $(WS2812_DRIVER)).c
  255. endif
  256. # add extra deps
  257. ifeq ($(strip $(WS2812_DRIVER)), i2c)
  258. QUANTUM_LIB_SRC += i2c_master.c
  259. endif
  260. endif
  261. ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
  262. CIE1931_CURVE := yes
  263. endif
  264. ifeq ($(strip $(CIE1931_CURVE)), yes)
  265. OPT_DEFS += -DUSE_CIE1931_CURVE
  266. LED_TABLES := yes
  267. endif
  268. ifeq ($(strip $(LED_TABLES)), yes)
  269. SRC += $(QUANTUM_DIR)/led_tables.c
  270. endif
  271. ifeq ($(strip $(TERMINAL_ENABLE)), yes)
  272. SRC += $(QUANTUM_DIR)/process_keycode/process_terminal.c
  273. OPT_DEFS += -DTERMINAL_ENABLE
  274. OPT_DEFS += -DUSER_PRINT
  275. endif
  276. ifeq ($(strip $(USB_HID_ENABLE)), yes)
  277. include $(TMK_DIR)/protocol/usb_hid.mk
  278. endif
  279. ifeq ($(strip $(WPM_ENABLE)), yes)
  280. SRC += $(QUANTUM_DIR)/wpm.c
  281. OPT_DEFS += -DWPM_ENABLE
  282. endif
  283. ifeq ($(strip $(ENCODER_ENABLE)), yes)
  284. SRC += $(QUANTUM_DIR)/encoder.c
  285. OPT_DEFS += -DENCODER_ENABLE
  286. endif
  287. ifeq ($(strip $(VELOCIKEY_ENABLE)), yes)
  288. OPT_DEFS += -DVELOCIKEY_ENABLE
  289. SRC += $(QUANTUM_DIR)/velocikey.c
  290. endif
  291. ifeq ($(strip $(VIA_ENABLE)), yes)
  292. DYNAMIC_KEYMAP_ENABLE := yes
  293. RAW_ENABLE := yes
  294. BOOTMAGIC_ENABLE := lite
  295. SRC += $(QUANTUM_DIR)/via.c
  296. OPT_DEFS += -DVIA_ENABLE
  297. endif
  298. ifeq ($(strip $(DYNAMIC_KEYMAP_ENABLE)), yes)
  299. OPT_DEFS += -DDYNAMIC_KEYMAP_ENABLE
  300. SRC += $(QUANTUM_DIR)/dynamic_keymap.c
  301. endif
  302. ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
  303. OPT_DEFS += -DDIP_SWITCH_ENABLE
  304. SRC += $(QUANTUM_DIR)/dip_switch.c
  305. endif
  306. VALID_CUSTOM_MATRIX_TYPES:= yes lite no
  307. CUSTOM_MATRIX ?= no
  308. ifneq ($(strip $(CUSTOM_MATRIX)), yes)
  309. ifeq ($(filter $(CUSTOM_MATRIX),$(VALID_CUSTOM_MATRIX_TYPES)),)
  310. $(error CUSTOM_MATRIX="$(CUSTOM_MATRIX)" is not a valid custom matrix type)
  311. endif
  312. # Include common stuff for all non custom matrix users
  313. QUANTUM_SRC += $(QUANTUM_DIR)/matrix_common.c
  314. # if 'lite' then skip the actual matrix implementation
  315. ifneq ($(strip $(CUSTOM_MATRIX)), lite)
  316. # Include the standard or split matrix code if needed
  317. ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
  318. QUANTUM_SRC += $(QUANTUM_DIR)/split_common/matrix.c
  319. else
  320. QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c
  321. endif
  322. endif
  323. endif
  324. DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce
  325. # Debounce Modules. Set DEBOUNCE_TYPE=custom if including one manually.
  326. DEBOUNCE_TYPE?= sym_g
  327. ifneq ($(strip $(DEBOUNCE_TYPE)), custom)
  328. QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c
  329. endif
  330. ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
  331. POST_CONFIG_H += $(QUANTUM_DIR)/split_common/post_config.h
  332. OPT_DEFS += -DSPLIT_KEYBOARD
  333. # Include files used by all split keyboards
  334. QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_util.c
  335. # Determine which (if any) transport files are required
  336. ifneq ($(strip $(SPLIT_TRANSPORT)), custom)
  337. QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c
  338. # Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called.
  339. # Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
  340. ifeq ($(PLATFORM),AVR)
  341. QUANTUM_LIB_SRC += i2c_master.c \
  342. i2c_slave.c
  343. endif
  344. SERIAL_DRIVER ?= bitbang
  345. ifeq ($(strip $(SERIAL_DRIVER)), bitbang)
  346. QUANTUM_LIB_SRC += serial.c
  347. else
  348. QUANTUM_LIB_SRC += serial_$(strip $(SERIAL_DRIVER)).c
  349. endif
  350. endif
  351. COMMON_VPATH += $(QUANTUM_PATH)/split_common
  352. endif
  353. HAPTIC_ENABLE ?= no
  354. ifneq ($(strip $(HAPTIC_ENABLE)),no)
  355. COMMON_VPATH += $(DRIVER_PATH)/haptic
  356. SRC += haptic.c
  357. OPT_DEFS += -DHAPTIC_ENABLE
  358. endif
  359. ifneq ($(filter DRV2605L, $(HAPTIC_ENABLE)), )
  360. SRC += DRV2605L.c
  361. QUANTUM_LIB_SRC += i2c_master.c
  362. OPT_DEFS += -DDRV2605L
  363. endif
  364. ifneq ($(filter SOLENOID, $(HAPTIC_ENABLE)), )
  365. SRC += solenoid.c
  366. OPT_DEFS += -DSOLENOID_ENABLE
  367. endif
  368. ifeq ($(strip $(HD44780_ENABLE)), yes)
  369. SRC += drivers/avr/hd44780.c
  370. OPT_DEFS += -DHD44780_ENABLE
  371. endif
  372. ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
  373. OPT_DEFS += -DOLED_DRIVER_ENABLE
  374. COMMON_VPATH += $(DRIVER_PATH)/oled
  375. QUANTUM_LIB_SRC += i2c_master.c
  376. SRC += oled_driver.c
  377. endif
  378. include $(DRIVER_PATH)/qwiic/qwiic.mk
  379. ifeq ($(strip $(UCIS_ENABLE)), yes)
  380. OPT_DEFS += -DUCIS_ENABLE
  381. UNICODE_COMMON := yes
  382. SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c
  383. endif
  384. ifeq ($(strip $(UNICODEMAP_ENABLE)), yes)
  385. OPT_DEFS += -DUNICODEMAP_ENABLE
  386. UNICODE_COMMON := yes
  387. SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c
  388. endif
  389. ifeq ($(strip $(UNICODE_ENABLE)), yes)
  390. OPT_DEFS += -DUNICODE_ENABLE
  391. UNICODE_COMMON := yes
  392. SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c
  393. endif
  394. ifeq ($(strip $(UNICODE_COMMON)), yes)
  395. SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
  396. endif
  397. SPACE_CADET_ENABLE ?= yes
  398. ifeq ($(strip $(SPACE_CADET_ENABLE)), yes)
  399. SRC += $(QUANTUM_DIR)/process_keycode/process_space_cadet.c
  400. OPT_DEFS += -DSPACE_CADET_ENABLE
  401. endif
  402. MAGIC_ENABLE ?= yes
  403. ifeq ($(strip $(MAGIC_ENABLE)), yes)
  404. SRC += $(QUANTUM_DIR)/process_keycode/process_magic.c
  405. OPT_DEFS += -DMAGIC_KEYCODE_ENABLE
  406. endif
  407. GRAVE_ESC_ENABLE ?= yes
  408. ifeq ($(strip $(GRAVE_ESC_ENABLE)), yes)
  409. SRC += $(QUANTUM_DIR)/process_keycode/process_grave_esc.c
  410. OPT_DEFS += -DGRAVE_ESC_ENABLE
  411. endif
  412. ifeq ($(strip $(DYNAMIC_MACRO_ENABLE)), yes)
  413. SRC += $(QUANTUM_DIR)/process_keycode/process_dynamic_macro.c
  414. OPT_DEFS += -DDYNAMIC_MACRO_ENABLE
  415. endif
  416. ifeq ($(strip $(COMBO_ENABLE)), yes)
  417. SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c
  418. OPT_DEFS += -DCOMBO_ENABLE
  419. endif
  420. ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
  421. SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
  422. OPT_DEFS += -DTAP_DANCE_ENABLE
  423. endif
  424. ifeq ($(strip $(KEY_LOCK_ENABLE)), yes)
  425. SRC += $(QUANTUM_DIR)/process_keycode/process_key_lock.c
  426. OPT_DEFS += -DKEY_LOCK_ENABLE
  427. endif
  428. ifeq ($(strip $(LEADER_ENABLE)), yes)
  429. SRC += $(QUANTUM_DIR)/process_keycode/process_leader.c
  430. OPT_DEFS += -DLEADER_ENABLE
  431. endif
  432. ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes)
  433. SRC += $(QUANTUM_DIR)/process_keycode/process_auto_shift.c
  434. OPT_DEFS += -DAUTO_SHIFT_ENABLE
  435. ifeq ($(strip $(AUTO_SHIFT_MODIFIERS)), yes)
  436. OPT_DEFS += -DAUTO_SHIFT_MODIFIERS
  437. endif
  438. endif