From e0291f5cf9bcf57c187288083279f08894c2c60c Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 28 Aug 2021 18:12:10 -0700 Subject: [PATCH 01/19] 40percentclub/ut47: move non-assignment code to post_rules.mk --- keyboards/40percentclub/ut47/post_rules.mk | 4 ++++ keyboards/40percentclub/ut47/rules.mk | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) create mode 100644 keyboards/40percentclub/ut47/post_rules.mk diff --git a/keyboards/40percentclub/ut47/post_rules.mk b/keyboards/40percentclub/ut47/post_rules.mk new file mode 100644 index 000000000000..7051ee413d7f --- /dev/null +++ b/keyboards/40percentclub/ut47/post_rules.mk @@ -0,0 +1,4 @@ +ifeq ($(strip $(LED_ENABLE)), yes) + OPT_DEFS += -DLED_ENABLE + SRC += led.c +endif diff --git a/keyboards/40percentclub/ut47/rules.mk b/keyboards/40percentclub/ut47/rules.mk index 82900cac3c45..30465bbab100 100644 --- a/keyboards/40percentclub/ut47/rules.mk +++ b/keyboards/40percentclub/ut47/rules.mk @@ -31,8 +31,3 @@ AUDIO_ENABLE = no # Audio output on port C6 # custom matrix setup CUSTOM_MATRIX = yes SRC += matrix.c protocol/serial_uart.c - -ifeq ($(strip $(LED_ENABLE)), yes) - OPT_DEFS += -DLED_ENABLE - SRC += led.c -endif From e03679eb739b97596d37fac4f364389743917ae4 Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 28 Aug 2021 18:15:38 -0700 Subject: [PATCH 02/19] converter/palm_usb: move non-assignment code to post_rules.mk --- keyboards/converter/palm_usb/post_rules.mk | 7 +++++++ keyboards/converter/palm_usb/rules.mk | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 keyboards/converter/palm_usb/post_rules.mk diff --git a/keyboards/converter/palm_usb/post_rules.mk b/keyboards/converter/palm_usb/post_rules.mk new file mode 100644 index 000000000000..9c110767015e --- /dev/null +++ b/keyboards/converter/palm_usb/post_rules.mk @@ -0,0 +1,7 @@ +ifdef HARDWARE_SERIAL + # Untested with palm_usb + SRC += protocol/serial_uart.c + OPT_DEFS += -DHARDWARE_SERIAL +else + SRC += protocol/serial_soft.c +endif diff --git a/keyboards/converter/palm_usb/rules.mk b/keyboards/converter/palm_usb/rules.mk index de70a45c0e30..51327ebd8109 100644 --- a/keyboards/converter/palm_usb/rules.mk +++ b/keyboards/converter/palm_usb/rules.mk @@ -32,12 +32,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes SRC += matrix.c -ifdef HARDWARE_SERIAL - # Untested with palm_usb - SRC += protocol/serial_uart.c - OPT_DEFS += -DHARDWARE_SERIAL -else - SRC += protocol/serial_soft.c -endif DEFAULT_FOLDER = converter/palm_usb/stowaway From 7aed3592c2d05f66981dc0e5ffd69fb5d85de62a Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 28 Aug 2021 18:16:34 -0700 Subject: [PATCH 03/19] converter/sun_usb: move non-assignment code to post_rules.mk --- keyboards/converter/sun_usb/post_rules.mk | 6 ++++++ keyboards/converter/sun_usb/rules.mk | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 keyboards/converter/sun_usb/post_rules.mk diff --git a/keyboards/converter/sun_usb/post_rules.mk b/keyboards/converter/sun_usb/post_rules.mk new file mode 100644 index 000000000000..2ea1f0a5bf3e --- /dev/null +++ b/keyboards/converter/sun_usb/post_rules.mk @@ -0,0 +1,6 @@ +ifdef HARDWARE_SERIAL + SRC += protocol/serial_uart.c + OPT_DEFS += -DHARDWARE_SERIAL +else + SRC += protocol/serial_soft.c +endif diff --git a/keyboards/converter/sun_usb/rules.mk b/keyboards/converter/sun_usb/rules.mk index 8e7e3514cf25..884f85e54eff 100644 --- a/keyboards/converter/sun_usb/rules.mk +++ b/keyboards/converter/sun_usb/rules.mk @@ -32,11 +32,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes SRC += matrix.c led.c -ifdef HARDWARE_SERIAL - SRC += protocol/serial_uart.c - OPT_DEFS += -DHARDWARE_SERIAL -else - SRC += protocol/serial_soft.c -endif DEFAULT_FOLDER = converter/sun_usb/type5 From d166bf08f989261f61b8abffe43c1e7e60d12c85 Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 28 Aug 2021 18:18:55 -0700 Subject: [PATCH 04/19] dm9records/ergoinu: move non-assignment code to post_rules.mk --- keyboards/dm9records/ergoinu/post_rules.mk | 9 +++++++++ keyboards/dm9records/ergoinu/rules.mk | 10 ---------- 2 files changed, 9 insertions(+), 10 deletions(-) create mode 100644 keyboards/dm9records/ergoinu/post_rules.mk diff --git a/keyboards/dm9records/ergoinu/post_rules.mk b/keyboards/dm9records/ergoinu/post_rules.mk new file mode 100644 index 000000000000..02aa48104c19 --- /dev/null +++ b/keyboards/dm9records/ergoinu/post_rules.mk @@ -0,0 +1,9 @@ +ifneq ($(strip $(ERGOINU)),) + ifeq ($(findstring promicroled, $(ERGOINU)), promicroled) + DISABLE_PROMICRO_LEDs = no + endif +endif + +ifeq ($(strip $(DISABLE_PROMICRO_LEDs)), yes) + OPT_DEFS += -DDISABLE_PROMICRO_LEDs +endif diff --git a/keyboards/dm9records/ergoinu/rules.mk b/keyboards/dm9records/ergoinu/rules.mk index 8dcfeaf4f9bd..2f6182f15613 100644 --- a/keyboards/dm9records/ergoinu/rules.mk +++ b/keyboards/dm9records/ergoinu/rules.mk @@ -36,13 +36,3 @@ SRC += matrix.c serial.c split_util.c # ergoinu configs DISABLE_PROMICRO_LEDs = yes - -ifneq ($(strip $(ERGOINU)),) - ifeq ($(findstring promicroled, $(ERGOINU)), promicroled) - DISABLE_PROMICRO_LEDs = no - endif -endif - -ifeq ($(strip $(DISABLE_PROMICRO_LEDs)), yes) - OPT_DEFS += -DDISABLE_PROMICRO_LEDs -endif From db564d9baef3bd9cc13e197177bc3b89af31426d Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 28 Aug 2021 18:19:48 -0700 Subject: [PATCH 05/19] ergotaco: move non-assignment code to post_rules.mk --- keyboards/ergotaco/post_rules.mk | 8 ++++++++ keyboards/ergotaco/rules.mk | 3 --- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 keyboards/ergotaco/post_rules.mk diff --git a/keyboards/ergotaco/post_rules.mk b/keyboards/ergotaco/post_rules.mk new file mode 100644 index 000000000000..0db3171b33db --- /dev/null +++ b/keyboards/ergotaco/post_rules.mk @@ -0,0 +1,8 @@ + +# A bunch of stuff that you shouldn't touch unless you +# know what you're doing. +# +# No touchy, capiche? +ifeq ($(strip $(DEBUG_MATRIX)), yes) + OPT_DEFS += -DDEBUG_MATRIX +endif diff --git a/keyboards/ergotaco/rules.mk b/keyboards/ergotaco/rules.mk index cd8ebc58f0df..9f229ac2028d 100644 --- a/keyboards/ergotaco/rules.mk +++ b/keyboards/ergotaco/rules.mk @@ -21,6 +21,3 @@ COMMAND_ENABLE = yes # # No touchy, capiche? SRC += matrix.c i2c_master.c -ifeq ($(strip $(DEBUG_MATRIX)), yes) - OPT_DEFS += -DDEBUG_MATRIX -endif From 598c8ec5f2f7e480e027548ee005f9976891ec86 Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 28 Aug 2021 20:19:53 -0700 Subject: [PATCH 06/19] handwired/symmetric70_proto: move non-assignment code to post_rules.mk --- .../symmetric70_proto/{local_features.mk => post_rules.mk} | 0 keyboards/handwired/symmetric70_proto/promicro/fast/rules.mk | 3 --- keyboards/handwired/symmetric70_proto/promicro/normal/rules.mk | 3 --- keyboards/handwired/symmetric70_proto/promicro/readme.md | 2 +- keyboards/handwired/symmetric70_proto/proton_c/fast/rules.mk | 3 --- keyboards/handwired/symmetric70_proto/proton_c/normal/rules.mk | 3 --- keyboards/handwired/symmetric70_proto/proton_c/readme.md | 2 +- 7 files changed, 2 insertions(+), 14 deletions(-) rename keyboards/handwired/symmetric70_proto/{local_features.mk => post_rules.mk} (100%) diff --git a/keyboards/handwired/symmetric70_proto/local_features.mk b/keyboards/handwired/symmetric70_proto/post_rules.mk similarity index 100% rename from keyboards/handwired/symmetric70_proto/local_features.mk rename to keyboards/handwired/symmetric70_proto/post_rules.mk diff --git a/keyboards/handwired/symmetric70_proto/promicro/fast/rules.mk b/keyboards/handwired/symmetric70_proto/promicro/fast/rules.mk index de489fcabda8..fbc1c3bb3887 100644 --- a/keyboards/handwired/symmetric70_proto/promicro/fast/rules.mk +++ b/keyboards/handwired/symmetric70_proto/promicro/fast/rules.mk @@ -1,6 +1,3 @@ CUSTOM_MATRIX = yes SRC += matrix_common.c SRC += matrix_fast/matrix.c - -KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))../../local_features.mk -include $(KEYBOARD_LOCAL_FEATURES_MK) diff --git a/keyboards/handwired/symmetric70_proto/promicro/normal/rules.mk b/keyboards/handwired/symmetric70_proto/promicro/normal/rules.mk index 0b2b707ef82a..73192f4ff76e 100644 --- a/keyboards/handwired/symmetric70_proto/promicro/normal/rules.mk +++ b/keyboards/handwired/symmetric70_proto/promicro/normal/rules.mk @@ -1,6 +1,3 @@ CUSTOM_MATRIX = yes SRC += matrix_common.c SRC += matrix_debug/matrix.c - -KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))../../local_features.mk -include $(KEYBOARD_LOCAL_FEATURES_MK) diff --git a/keyboards/handwired/symmetric70_proto/promicro/readme.md b/keyboards/handwired/symmetric70_proto/promicro/readme.md index c74063b9983e..83703f82ba0c 100644 --- a/keyboards/handwired/symmetric70_proto/promicro/readme.md +++ b/keyboards/handwired/symmetric70_proto/promicro/readme.md @@ -19,7 +19,7 @@ Flashing example for this keyboard: make handwired/symmetric70_proto/promicro/normal:default:flash make handwired/symmetric70_proto/promicro/fast:default:flash -Testing options: (see more options: [local_features.mk](../local_features.mk), [matrix_debug](../matrix_debug/readme.md) and [matrix_fast](../matrix_fast/readme.md) ) +Testing options: (see more options: [post_rules.mk](../post_rules.mk), [matrix_debug](../matrix_debug/readme.md) and [matrix_fast](../matrix_fast/readme.md) ) make MTEST=mdelay0 handwired/symmetric70_proto/promicro/normal:default:flash make MTEST=mdelay0 handwired/symmetric70_proto/promicro/fast:default:flash diff --git a/keyboards/handwired/symmetric70_proto/proton_c/fast/rules.mk b/keyboards/handwired/symmetric70_proto/proton_c/fast/rules.mk index de489fcabda8..fbc1c3bb3887 100644 --- a/keyboards/handwired/symmetric70_proto/proton_c/fast/rules.mk +++ b/keyboards/handwired/symmetric70_proto/proton_c/fast/rules.mk @@ -1,6 +1,3 @@ CUSTOM_MATRIX = yes SRC += matrix_common.c SRC += matrix_fast/matrix.c - -KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))../../local_features.mk -include $(KEYBOARD_LOCAL_FEATURES_MK) diff --git a/keyboards/handwired/symmetric70_proto/proton_c/normal/rules.mk b/keyboards/handwired/symmetric70_proto/proton_c/normal/rules.mk index 0b2b707ef82a..73192f4ff76e 100644 --- a/keyboards/handwired/symmetric70_proto/proton_c/normal/rules.mk +++ b/keyboards/handwired/symmetric70_proto/proton_c/normal/rules.mk @@ -1,6 +1,3 @@ CUSTOM_MATRIX = yes SRC += matrix_common.c SRC += matrix_debug/matrix.c - -KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))../../local_features.mk -include $(KEYBOARD_LOCAL_FEATURES_MK) diff --git a/keyboards/handwired/symmetric70_proto/proton_c/readme.md b/keyboards/handwired/symmetric70_proto/proton_c/readme.md index fc10a2e634dd..7457b5f3ee0e 100644 --- a/keyboards/handwired/symmetric70_proto/proton_c/readme.md +++ b/keyboards/handwired/symmetric70_proto/proton_c/readme.md @@ -18,7 +18,7 @@ Flashing example for this keyboard: make handwired/symmetric70_proto/proton_c/normal:default:flash make handwired/symmetric70_proto/proton_c/fast:default:flash -Testing options: (see more options: [local_features.mk](../local_features.mk), [matrix_debug](../matrix_debug/readme.md) and [matrix_fast](../matrix_fast/readme.md) ) +Testing options: (see more options: [post_rules.mk](../post_rules.mk), [matrix_debug](../matrix_debug/readme.md) and [matrix_fast](../matrix_fast/readme.md) ) make MTEST=mdelay0 handwired/symmetric70_proto/proton_c/normal:default:flash make MTEST=mdelay0 handwired/symmetric70_proto/proton_c/fast:default:flash From 6d8193c44f84f36738285f5ebd44a2dc179fbb64 Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 28 Aug 2021 20:21:55 -0700 Subject: [PATCH 07/19] hhkb/ansi: move non-assignment code to post_rules.mk --- keyboards/hhkb/ansi/post_rules.mk | 18 ++++++++++++++++++ keyboards/hhkb/ansi/rules.mk | 20 -------------------- 2 files changed, 18 insertions(+), 20 deletions(-) create mode 100644 keyboards/hhkb/ansi/post_rules.mk diff --git a/keyboards/hhkb/ansi/post_rules.mk b/keyboards/hhkb/ansi/post_rules.mk new file mode 100644 index 000000000000..bc6ad5cd4cb9 --- /dev/null +++ b/keyboards/hhkb/ansi/post_rules.mk @@ -0,0 +1,18 @@ +ifeq ($(strip $(HHKB_RN42_ENABLE)), yes) + +OPT_DEFS += -DHHKB_RN42_ENABLE + +# Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT +# HHKB Alt controller. +RN42_DIR = ../rn42 + +SRC += serial_uart.c \ + ../rn42/suart.S \ + ../rn42/rn42.c \ + ../rn42/rn42_task.c \ + ../rn42/battery.c \ + ../rn42/main.c + +VPATH += $(RN42_DIR) + +endif diff --git a/keyboards/hhkb/ansi/rules.mk b/keyboards/hhkb/ansi/rules.mk index 56c7fd7719c6..2f06527f054d 100644 --- a/keyboards/hhkb/ansi/rules.mk +++ b/keyboards/hhkb/ansi/rules.mk @@ -41,26 +41,6 @@ MIDI_ENABLE = no # MIDI support # project specific files SRC = matrix.c -ifeq ($(strip $(HHKB_RN42_ENABLE)), yes) - -OPT_DEFS += -DHHKB_RN42_ENABLE - -# Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT -# HHKB Alt controller. -RN42_DIR = ../rn42 - -SRC += serial_uart.c \ - ../rn42/suart.S \ - ../rn42/rn42.c \ - ../rn42/rn42_task.c \ - ../rn42/battery.c \ - ../rn42/main.c - -VPATH += $(RN42_DIR) - -endif - - # debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION # debug-on: all From bbfab0f4bcb1f874d1becd4c8d4f4e5798899a02 Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 28 Aug 2021 20:22:34 -0700 Subject: [PATCH 08/19] hhkb/jp: move non-assignment code to post_rules.mk --- keyboards/hhkb/jp/post_rules.mk | 18 ++++++++++++++++++ keyboards/hhkb/jp/rules.mk | 20 -------------------- 2 files changed, 18 insertions(+), 20 deletions(-) create mode 100644 keyboards/hhkb/jp/post_rules.mk diff --git a/keyboards/hhkb/jp/post_rules.mk b/keyboards/hhkb/jp/post_rules.mk new file mode 100644 index 000000000000..bc6ad5cd4cb9 --- /dev/null +++ b/keyboards/hhkb/jp/post_rules.mk @@ -0,0 +1,18 @@ +ifeq ($(strip $(HHKB_RN42_ENABLE)), yes) + +OPT_DEFS += -DHHKB_RN42_ENABLE + +# Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT +# HHKB Alt controller. +RN42_DIR = ../rn42 + +SRC += serial_uart.c \ + ../rn42/suart.S \ + ../rn42/rn42.c \ + ../rn42/rn42_task.c \ + ../rn42/battery.c \ + ../rn42/main.c + +VPATH += $(RN42_DIR) + +endif diff --git a/keyboards/hhkb/jp/rules.mk b/keyboards/hhkb/jp/rules.mk index 1902cf4325bc..43eb73443641 100644 --- a/keyboards/hhkb/jp/rules.mk +++ b/keyboards/hhkb/jp/rules.mk @@ -41,26 +41,6 @@ MIDI_ENABLE = no # MIDI support # project specific files SRC = matrix.c -ifeq ($(strip $(HHKB_RN42_ENABLE)), yes) - -OPT_DEFS += -DHHKB_RN42_ENABLE - -# Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT -# HHKB Alt controller. -RN42_DIR = ../rn42 - -SRC += serial_uart.c \ - ../rn42/suart.S \ - ../rn42/rn42.c \ - ../rn42/rn42_task.c \ - ../rn42/battery.c \ - ../rn42/main.c - -VPATH += $(RN42_DIR) - -endif - - # debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION # debug-on: all From b7f32c2de76f21eb4753369077b09253dcae7090 Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 28 Aug 2021 20:23:52 -0700 Subject: [PATCH 09/19] lfkeyboards/lfk78: move non-assignment code to post_rules.mk --- keyboards/lfkeyboards/lfk78/post_rules.mk | 14 ++++++++++++++ keyboards/lfkeyboards/lfk78/rules.mk | 15 --------------- 2 files changed, 14 insertions(+), 15 deletions(-) create mode 100644 keyboards/lfkeyboards/lfk78/post_rules.mk diff --git a/keyboards/lfkeyboards/lfk78/post_rules.mk b/keyboards/lfkeyboards/lfk78/post_rules.mk new file mode 100644 index 000000000000..03f975b9df27 --- /dev/null +++ b/keyboards/lfkeyboards/lfk78/post_rules.mk @@ -0,0 +1,14 @@ +# Extra source files for IS3731 lighting +SRC += TWIlib.c issi.c lighting.c + +ifeq ($(strip $(ISSI_ENABLE)), yes) + TMK_COMMON_DEFS += -DISSI_ENABLE +endif + +ifeq ($(strip $(WATCHDOG_ENABLE)), yes) + TMK_COMMON_DEFS += -DWATCHDOG_ENABLE +endif + +ifeq ($(strip $(CAPSLOCK_LED)), yes) + TMK_COMMON_DEFS += -DCAPSLOCK_LED +endif diff --git a/keyboards/lfkeyboards/lfk78/rules.mk b/keyboards/lfkeyboards/lfk78/rules.mk index 1abad555716f..bf6a320e387e 100644 --- a/keyboards/lfkeyboards/lfk78/rules.mk +++ b/keyboards/lfkeyboards/lfk78/rules.mk @@ -31,19 +31,4 @@ ISSI_ENABLE = yes # If the I2C pullup resistors aren't install thi WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms CAPSLOCK_LED = no # Toggle back light LED of Caps Lock -# Extra source files for IS3731 lighting -SRC = TWIlib.c issi.c lighting.c - -ifeq ($(strip $(ISSI_ENABLE)), yes) - TMK_COMMON_DEFS += -DISSI_ENABLE -endif - -ifeq ($(strip $(WATCHDOG_ENABLE)), yes) - TMK_COMMON_DEFS += -DWATCHDOG_ENABLE -endif - -ifeq ($(strip $(CAPSLOCK_LED)), yes) - TMK_COMMON_DEFS += -DCAPSLOCK_LED -endif - DEFAULT_FOLDER = lfkeyboards/lfk78/revj From 6c2fe12aa2cf43df3cb9a534c93f8f56fb232ada Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 28 Aug 2021 20:25:48 -0700 Subject: [PATCH 10/19] lfkeyboards/lfk87: move non-assignment code to post_rules.mk --- keyboards/lfkeyboards/lfk87/post_rules.mk | 13 +++++++++++++ keyboards/lfkeyboards/lfk87/rules.mk | 15 --------------- 2 files changed, 13 insertions(+), 15 deletions(-) create mode 100644 keyboards/lfkeyboards/lfk87/post_rules.mk diff --git a/keyboards/lfkeyboards/lfk87/post_rules.mk b/keyboards/lfkeyboards/lfk87/post_rules.mk new file mode 100644 index 000000000000..563462dd9957 --- /dev/null +++ b/keyboards/lfkeyboards/lfk87/post_rules.mk @@ -0,0 +1,13 @@ +ifeq ($(LFK_REV), A) + MCU = at90usb1286 +else + MCU = at90usb646 +endif + +ifeq ($(strip $(ISSI_ENABLE)), yes) + OPT_DEFS += -DISSI_ENABLE +endif + +ifeq ($(strip $(WATCHDOG_ENABLE)), yes) + OPT_DEFS += -DWATCHDOG_ENABLE +endif diff --git a/keyboards/lfkeyboards/lfk87/rules.mk b/keyboards/lfkeyboards/lfk87/rules.mk index 7f5621b0302b..bc988f15aaaf 100644 --- a/keyboards/lfkeyboards/lfk87/rules.mk +++ b/keyboards/lfkeyboards/lfk87/rules.mk @@ -6,11 +6,6 @@ # LFK_REV = C -ifeq ($(LFK_REV), A) - MCU = at90usb1286 -else - MCU = at90usb646 -endif BOOTLOADER = atmel-dfu OPT_DEFS += -DLFK_TKL_REV_$(LFK_REV) @@ -42,13 +37,3 @@ TAP_DANCE_ENABLE = no ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms - - - -ifeq ($(strip $(ISSI_ENABLE)), yes) - OPT_DEFS += -DISSI_ENABLE -endif - -ifeq ($(strip $(WATCHDOG_ENABLE)), yes) - OPT_DEFS += -DWATCHDOG_ENABLE -endif From 8b0f2109eecaa212811a0b67f569c683f72c019a Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 28 Aug 2021 20:26:09 -0700 Subject: [PATCH 11/19] lfkeyboards/lfkpad: move non-assignment code to post_rules.mk --- keyboards/lfkeyboards/lfkpad/post_rules.mk | 7 +++++++ keyboards/lfkeyboards/lfkpad/rules.mk | 8 -------- 2 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 keyboards/lfkeyboards/lfkpad/post_rules.mk diff --git a/keyboards/lfkeyboards/lfkpad/post_rules.mk b/keyboards/lfkeyboards/lfkpad/post_rules.mk new file mode 100644 index 000000000000..ad997587b2de --- /dev/null +++ b/keyboards/lfkeyboards/lfkpad/post_rules.mk @@ -0,0 +1,7 @@ +ifeq ($(strip $(ISSI_ENABLE)), yes) + TMK_COMMON_DEFS += -DISSI_ENABLE +endif + +ifeq ($(strip $(WATCHDOG_ENABLE)), yes) + TMK_COMMON_DEFS += -DWATCHDOG_ENABLE +endif diff --git a/keyboards/lfkeyboards/lfkpad/rules.mk b/keyboards/lfkeyboards/lfkpad/rules.mk index 09dea7037308..d87453490e68 100644 --- a/keyboards/lfkeyboards/lfkpad/rules.mk +++ b/keyboards/lfkeyboards/lfkpad/rules.mk @@ -36,12 +36,4 @@ WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan() isn't run every SRC = TWIlib.c issi.c lighting.c -ifeq ($(strip $(ISSI_ENABLE)), yes) - TMK_COMMON_DEFS += -DISSI_ENABLE -endif - -ifeq ($(strip $(WATCHDOG_ENABLE)), yes) - TMK_COMMON_DEFS += -DWATCHDOG_ENABLE -endif - LAYOUTS = numpad_6x4 From e84c82e61a07d2eb58408c67537a07ddf4086127 Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 28 Aug 2021 20:44:26 -0700 Subject: [PATCH 12/19] lfkeyboards/mini1800: move non-assignment code to post_rules.mk --- keyboards/lfkeyboards/mini1800/post_rules.mk | 9 +++++++++ keyboards/lfkeyboards/mini1800/rules.mk | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 keyboards/lfkeyboards/mini1800/post_rules.mk diff --git a/keyboards/lfkeyboards/mini1800/post_rules.mk b/keyboards/lfkeyboards/mini1800/post_rules.mk new file mode 100644 index 000000000000..f04e10e4a3b5 --- /dev/null +++ b/keyboards/lfkeyboards/mini1800/post_rules.mk @@ -0,0 +1,9 @@ +ifeq ($(LFK_REV), A) + MCU = at90usb1286 +else + MCU = at90usb646 +endif + +ifeq ($(strip $(ISSI_ENABLE)), yes) + # TMK_COMMON_DEFS += -DISSI_ENABLE +endif diff --git a/keyboards/lfkeyboards/mini1800/rules.mk b/keyboards/lfkeyboards/mini1800/rules.mk index a9c29c4b91e2..c9a9b0105439 100644 --- a/keyboards/lfkeyboards/mini1800/rules.mk +++ b/keyboards/lfkeyboards/mini1800/rules.mk @@ -7,21 +7,12 @@ # Set to A or C LFK_REV = C -ifeq ($(LFK_REV), A) - MCU = at90usb1286 -else - MCU = at90usb646 -endif BOOTLOADER = atmel-dfu OPT_DEFS += -DLFK_TKL_REV_$(LFK_REV) # Extra source files for IS3731 lighting SRC = TWIlib.c issi.c lighting.c -ifeq ($(strip $(ISSI_ENABLE)), yes) - # TMK_COMMON_DEFS += -DISSI_ENABLE -endif - # Build Options # change yes to no to disable # From 1a4809710f4d9ba1e4683ff2821ee54c0307c12e Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 28 Aug 2021 20:45:50 -0700 Subject: [PATCH 13/19] manta60: move non-assignment code to post_rules.mk --- keyboards/manta60/post_rules.mk | 3 +++ keyboards/manta60/rules.mk | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 keyboards/manta60/post_rules.mk diff --git a/keyboards/manta60/post_rules.mk b/keyboards/manta60/post_rules.mk new file mode 100644 index 000000000000..e26b52df30f5 --- /dev/null +++ b/keyboards/manta60/post_rules.mk @@ -0,0 +1,3 @@ +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif diff --git a/keyboards/manta60/rules.mk b/keyboards/manta60/rules.mk index db012a1551f2..dbd3ce309364 100644 --- a/keyboards/manta60/rules.mk +++ b/keyboards/manta60/rules.mk @@ -23,7 +23,3 @@ AUDIO_ENABLE = no # Audio output SPLIT_KEYBOARD = yes IOS_DEVICE_ENABLE = no # connect to IOS device (iPad, iPhone) - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif From f43c6fd4bb44e6e26f3e3243050e0b666474ed8c Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 28 Aug 2021 20:47:02 -0700 Subject: [PATCH 14/19] mschwingen/modelm: move non-assignment code to post_rules.mk --- keyboards/mschwingen/modelm/post_rules.mk | 3 +++ keyboards/mschwingen/modelm/rules.mk | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 keyboards/mschwingen/modelm/post_rules.mk diff --git a/keyboards/mschwingen/modelm/post_rules.mk b/keyboards/mschwingen/modelm/post_rules.mk new file mode 100644 index 000000000000..a1c2040f4c52 --- /dev/null +++ b/keyboards/mschwingen/modelm/post_rules.mk @@ -0,0 +1,3 @@ +ifeq ($(strip $(UART_DEBUG)), yes) + OPT_DEFS += -DUART_DEBUG +endif diff --git a/keyboards/mschwingen/modelm/rules.mk b/keyboards/mschwingen/modelm/rules.mk index ef70f5449c2c..d8bcf9b4ad00 100644 --- a/keyboards/mschwingen/modelm/rules.mk +++ b/keyboards/mschwingen/modelm/rules.mk @@ -36,8 +36,4 @@ OPT_DEFS += -DSLEEP_LED_ENABLE # we need our own sleep callbacks to turn of WS28 LTO_ENABLE = yes -ifeq ($(strip $(UART_DEBUG)), yes) - OPT_DEFS += -DUART_DEBUG -endif - DEFAULT_FOLDER = mschwingen/modelm/led_wired From 3dc84dec8b757fffa2ad959dd4c8b483792d29c4 Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 28 Aug 2021 20:48:15 -0700 Subject: [PATCH 15/19] newgame40: move non-assignment code to post_rules.mk --- keyboards/newgame40/post_rules.mk | 3 +++ keyboards/newgame40/rules.mk | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 keyboards/newgame40/post_rules.mk diff --git a/keyboards/newgame40/post_rules.mk b/keyboards/newgame40/post_rules.mk new file mode 100644 index 000000000000..68229fe12b9e --- /dev/null +++ b/keyboards/newgame40/post_rules.mk @@ -0,0 +1,3 @@ +ifeq ($(strip $(IOS_DEVICE_ENABLE )), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif diff --git a/keyboards/newgame40/rules.mk b/keyboards/newgame40/rules.mk index ca508d7b5aa7..cfa8d46d94ff 100644 --- a/keyboards/newgame40/rules.mk +++ b/keyboards/newgame40/rules.mk @@ -28,10 +28,6 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. IOS_DEVICE_ENABLE = no # connect to IOS Device - ifeq ($(strip $(IOS_DEVICE_ENABLE )), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE - endif - # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend From ce7f392d69ec62690043e76816c153ee6cd1f9fd Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 28 Aug 2021 20:48:49 -0700 Subject: [PATCH 16/19] numatreus: move non-assignment code to post_rules.mk --- keyboards/numatreus/post_rules.mk | 3 +++ keyboards/numatreus/rules.mk | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 keyboards/numatreus/post_rules.mk diff --git a/keyboards/numatreus/post_rules.mk b/keyboards/numatreus/post_rules.mk new file mode 100644 index 000000000000..1f49875d0fe9 --- /dev/null +++ b/keyboards/numatreus/post_rules.mk @@ -0,0 +1,3 @@ +ifeq ($(strip $(LED_ANIMATIONS)), yes) + OPT_DEFS += -DLED_ANIMATIONS +endif diff --git a/keyboards/numatreus/rules.mk b/keyboards/numatreus/rules.mk index adfe4d977b59..8d16debb1a25 100644 --- a/keyboards/numatreus/rules.mk +++ b/keyboards/numatreus/rules.mk @@ -27,9 +27,5 @@ UNICODE_ENABLE = yes # Unicode RGBLIGHT_ENABLE = no LED_ANIMATIONS = no -ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DLED_ANIMATIONS -endif - # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend From 0ef17d8833f7a84e9508194a95c27917e5088adb Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 28 Aug 2021 20:50:35 -0700 Subject: [PATCH 17/19] rgbkb/zen: move non-assignment code to post_rules.mk --- keyboards/rgbkb/zen/post_rules.mk | 14 ++++++++++++++ keyboards/rgbkb/zen/rules.mk | 15 --------------- 2 files changed, 14 insertions(+), 15 deletions(-) create mode 100644 keyboards/rgbkb/zen/post_rules.mk diff --git a/keyboards/rgbkb/zen/post_rules.mk b/keyboards/rgbkb/zen/post_rules.mk new file mode 100644 index 000000000000..3ddb449efa03 --- /dev/null +++ b/keyboards/rgbkb/zen/post_rules.mk @@ -0,0 +1,14 @@ +ifeq ($(strip $(CTPC)), yes) + CONVERT_TO_PROTON_C=yes +endif + +ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes) + SPLIT_KEYBOARD = no # currently unsupported on ARM + RGBLIGHT_ENABLE = no # currently unsupported on ARM + + EXTRAFLAGS += -DUSE_PROTON_C +else + # Currently moved to Pro Micro only section because of lack of Proton-C support + SPLIT_KEYBOARD = yes + RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +endif diff --git a/keyboards/rgbkb/zen/rules.mk b/keyboards/rgbkb/zen/rules.mk index 4da70baa41d0..4fa8253daf80 100644 --- a/keyboards/rgbkb/zen/rules.mk +++ b/keyboards/rgbkb/zen/rules.mk @@ -11,21 +11,6 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = caterina -ifeq ($(strip $(CTPC)), yes) - CONVERT_TO_PROTON_C=yes -endif - -ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes) - SPLIT_KEYBOARD = no # currently unsupported on ARM - RGBLIGHT_ENABLE = no # currently unsupported on ARM - - EXTRAFLAGS += -DUSE_PROTON_C -else - # Currently moved to Pro Micro only section because of lack of Proton-C support - SPLIT_KEYBOARD = yes - RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -endif - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically From 9b981aa0261eded9e6234618391499aa8475f1cd Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 28 Aug 2021 20:51:09 -0700 Subject: [PATCH 18/19] rgbkb/zen/rev2: move non-assignment code to post_rules.mk --- keyboards/rgbkb/zen/rev2/post_rules.mk | 5 +++++ keyboards/rgbkb/zen/rev2/rules.mk | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 keyboards/rgbkb/zen/rev2/post_rules.mk diff --git a/keyboards/rgbkb/zen/rev2/post_rules.mk b/keyboards/rgbkb/zen/rev2/post_rules.mk new file mode 100644 index 000000000000..2a4397e980df --- /dev/null +++ b/keyboards/rgbkb/zen/rev2/post_rules.mk @@ -0,0 +1,5 @@ +# Setup so that OLED can be turned on/off easily +ifeq ($(strip $(OLED_ENABLE)), yes) + # Custom local font file + OPT_DEFS += -DOLED_FONT_H=\"common/glcdfont.c\" +endif diff --git a/keyboards/rgbkb/zen/rev2/rules.mk b/keyboards/rgbkb/zen/rev2/rules.mk index 9bb8b8cd0d9b..6dd9d2e2700c 100644 --- a/keyboards/rgbkb/zen/rev2/rules.mk +++ b/keyboards/rgbkb/zen/rev2/rules.mk @@ -1,9 +1,3 @@ ENCODER_ENABLE = yes OLED_ENABLE = no - -# Setup so that OLED can be turned on/off easily -ifeq ($(strip $(OLED_ENABLE)), yes) - # Custom local font file - OPT_DEFS += -DOLED_FONT_H=\"common/glcdfont.c\" -endif From c088fef86af173e4feb7acbf1f4fa5032ee4d895 Mon Sep 17 00:00:00 2001 From: Zach White Date: Sun, 29 Aug 2021 08:53:28 -0700 Subject: [PATCH 19/19] Revert "handwired/symmetric70_proto: move non-assignment code to post_rules.mk" This reverts commit cffaf0075c3c9b2473a660ba4af8835a9162311b. --- .../symmetric70_proto/{post_rules.mk => local_features.mk} | 0 keyboards/handwired/symmetric70_proto/promicro/fast/rules.mk | 3 +++ keyboards/handwired/symmetric70_proto/promicro/normal/rules.mk | 3 +++ keyboards/handwired/symmetric70_proto/promicro/readme.md | 2 +- keyboards/handwired/symmetric70_proto/proton_c/fast/rules.mk | 3 +++ keyboards/handwired/symmetric70_proto/proton_c/normal/rules.mk | 3 +++ keyboards/handwired/symmetric70_proto/proton_c/readme.md | 2 +- 7 files changed, 14 insertions(+), 2 deletions(-) rename keyboards/handwired/symmetric70_proto/{post_rules.mk => local_features.mk} (100%) diff --git a/keyboards/handwired/symmetric70_proto/post_rules.mk b/keyboards/handwired/symmetric70_proto/local_features.mk similarity index 100% rename from keyboards/handwired/symmetric70_proto/post_rules.mk rename to keyboards/handwired/symmetric70_proto/local_features.mk diff --git a/keyboards/handwired/symmetric70_proto/promicro/fast/rules.mk b/keyboards/handwired/symmetric70_proto/promicro/fast/rules.mk index fbc1c3bb3887..de489fcabda8 100644 --- a/keyboards/handwired/symmetric70_proto/promicro/fast/rules.mk +++ b/keyboards/handwired/symmetric70_proto/promicro/fast/rules.mk @@ -1,3 +1,6 @@ CUSTOM_MATRIX = yes SRC += matrix_common.c SRC += matrix_fast/matrix.c + +KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))../../local_features.mk +include $(KEYBOARD_LOCAL_FEATURES_MK) diff --git a/keyboards/handwired/symmetric70_proto/promicro/normal/rules.mk b/keyboards/handwired/symmetric70_proto/promicro/normal/rules.mk index 73192f4ff76e..0b2b707ef82a 100644 --- a/keyboards/handwired/symmetric70_proto/promicro/normal/rules.mk +++ b/keyboards/handwired/symmetric70_proto/promicro/normal/rules.mk @@ -1,3 +1,6 @@ CUSTOM_MATRIX = yes SRC += matrix_common.c SRC += matrix_debug/matrix.c + +KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))../../local_features.mk +include $(KEYBOARD_LOCAL_FEATURES_MK) diff --git a/keyboards/handwired/symmetric70_proto/promicro/readme.md b/keyboards/handwired/symmetric70_proto/promicro/readme.md index 83703f82ba0c..c74063b9983e 100644 --- a/keyboards/handwired/symmetric70_proto/promicro/readme.md +++ b/keyboards/handwired/symmetric70_proto/promicro/readme.md @@ -19,7 +19,7 @@ Flashing example for this keyboard: make handwired/symmetric70_proto/promicro/normal:default:flash make handwired/symmetric70_proto/promicro/fast:default:flash -Testing options: (see more options: [post_rules.mk](../post_rules.mk), [matrix_debug](../matrix_debug/readme.md) and [matrix_fast](../matrix_fast/readme.md) ) +Testing options: (see more options: [local_features.mk](../local_features.mk), [matrix_debug](../matrix_debug/readme.md) and [matrix_fast](../matrix_fast/readme.md) ) make MTEST=mdelay0 handwired/symmetric70_proto/promicro/normal:default:flash make MTEST=mdelay0 handwired/symmetric70_proto/promicro/fast:default:flash diff --git a/keyboards/handwired/symmetric70_proto/proton_c/fast/rules.mk b/keyboards/handwired/symmetric70_proto/proton_c/fast/rules.mk index fbc1c3bb3887..de489fcabda8 100644 --- a/keyboards/handwired/symmetric70_proto/proton_c/fast/rules.mk +++ b/keyboards/handwired/symmetric70_proto/proton_c/fast/rules.mk @@ -1,3 +1,6 @@ CUSTOM_MATRIX = yes SRC += matrix_common.c SRC += matrix_fast/matrix.c + +KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))../../local_features.mk +include $(KEYBOARD_LOCAL_FEATURES_MK) diff --git a/keyboards/handwired/symmetric70_proto/proton_c/normal/rules.mk b/keyboards/handwired/symmetric70_proto/proton_c/normal/rules.mk index 73192f4ff76e..0b2b707ef82a 100644 --- a/keyboards/handwired/symmetric70_proto/proton_c/normal/rules.mk +++ b/keyboards/handwired/symmetric70_proto/proton_c/normal/rules.mk @@ -1,3 +1,6 @@ CUSTOM_MATRIX = yes SRC += matrix_common.c SRC += matrix_debug/matrix.c + +KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))../../local_features.mk +include $(KEYBOARD_LOCAL_FEATURES_MK) diff --git a/keyboards/handwired/symmetric70_proto/proton_c/readme.md b/keyboards/handwired/symmetric70_proto/proton_c/readme.md index 7457b5f3ee0e..fc10a2e634dd 100644 --- a/keyboards/handwired/symmetric70_proto/proton_c/readme.md +++ b/keyboards/handwired/symmetric70_proto/proton_c/readme.md @@ -18,7 +18,7 @@ Flashing example for this keyboard: make handwired/symmetric70_proto/proton_c/normal:default:flash make handwired/symmetric70_proto/proton_c/fast:default:flash -Testing options: (see more options: [post_rules.mk](../post_rules.mk), [matrix_debug](../matrix_debug/readme.md) and [matrix_fast](../matrix_fast/readme.md) ) +Testing options: (see more options: [local_features.mk](../local_features.mk), [matrix_debug](../matrix_debug/readme.md) and [matrix_fast](../matrix_fast/readme.md) ) make MTEST=mdelay0 handwired/symmetric70_proto/proton_c/normal:default:flash make MTEST=mdelay0 handwired/symmetric70_proto/proton_c/fast:default:flash