Move non-assignment code to post_rules.mk (#14207)

* 40percentclub/ut47: move non-assignment code to post_rules.mk

* converter/palm_usb: move non-assignment code to post_rules.mk

* converter/sun_usb: move non-assignment code to post_rules.mk

* dm9records/ergoinu: move non-assignment code to post_rules.mk

* ergotaco: move non-assignment code to post_rules.mk

* handwired/symmetric70_proto: move non-assignment code to post_rules.mk

* hhkb/ansi: move non-assignment code to post_rules.mk

* hhkb/jp: move non-assignment code to post_rules.mk

* lfkeyboards/lfk78: move non-assignment code to post_rules.mk

* lfkeyboards/lfk87: move non-assignment code to post_rules.mk

* lfkeyboards/lfkpad: move non-assignment code to post_rules.mk

* lfkeyboards/mini1800: move non-assignment code to post_rules.mk

* manta60: move non-assignment code to post_rules.mk

* mschwingen/modelm: move non-assignment code to post_rules.mk

* newgame40: move non-assignment code to post_rules.mk

* numatreus: move non-assignment code to post_rules.mk

* rgbkb/zen: move non-assignment code to post_rules.mk

* rgbkb/zen/rev2: move non-assignment code to post_rules.mk

* Revert "handwired/symmetric70_proto: move non-assignment code to post_rules.mk"

This reverts commit cffaf0075c3c9b2473a660ba4af8835a9162311b.
master
Zach White 2021-09-09 21:37:31 -07:00 committed by GitHub
parent d971020cd8
commit c94cc1effa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
34 changed files with 144 additions and 155 deletions

View File

@ -0,0 +1,4 @@
ifeq ($(strip $(LED_ENABLE)), yes)
OPT_DEFS += -DLED_ENABLE
SRC += led.c
endif

View File

@ -24,8 +24,3 @@ AUDIO_ENABLE = no # Audio output on port C6
# custom matrix setup # custom matrix setup
CUSTOM_MATRIX = yes CUSTOM_MATRIX = yes
SRC += matrix.c protocol/serial_uart.c SRC += matrix.c protocol/serial_uart.c
ifeq ($(strip $(LED_ENABLE)), yes)
OPT_DEFS += -DLED_ENABLE
SRC += led.c
endif

View File

@ -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

View File

@ -25,12 +25,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
CUSTOM_MATRIX = yes CUSTOM_MATRIX = yes
SRC += matrix.c 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 DEFAULT_FOLDER = converter/palm_usb/stowaway

View File

@ -0,0 +1,6 @@
ifdef HARDWARE_SERIAL
SRC += protocol/serial_uart.c
OPT_DEFS += -DHARDWARE_SERIAL
else
SRC += protocol/serial_soft.c
endif

View File

@ -25,11 +25,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
CUSTOM_MATRIX = yes CUSTOM_MATRIX = yes
SRC += matrix.c led.c 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 DEFAULT_FOLDER = converter/sun_usb/type5

View File

@ -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

View File

@ -29,13 +29,3 @@ SRC += matrix.c serial.c split_util.c
# ergoinu configs # ergoinu configs
DISABLE_PROMICRO_LEDs = yes 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

View File

@ -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

View File

@ -14,6 +14,3 @@ COMMAND_ENABLE = yes
# #
# No touchy, capiche? # No touchy, capiche?
SRC += matrix.c i2c_master.c SRC += matrix.c i2c_master.c
ifeq ($(strip $(DEBUG_MATRIX)), yes)
OPT_DEFS += -DDEBUG_MATRIX
endif

View File

@ -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

View File

@ -33,26 +33,6 @@ MIDI_ENABLE = no # MIDI support
# project specific files # project specific files
SRC = matrix.c 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: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION
# debug-on: all # debug-on: all

View File

@ -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

View File

@ -33,26 +33,6 @@ MIDI_ENABLE = no # MIDI support
# project specific files # project specific files
SRC = matrix.c 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: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION
# debug-on: all # debug-on: all

View File

@ -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

View File

@ -24,19 +24,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 WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
CAPSLOCK_LED = no # Toggle back light LED of Caps Lock 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 DEFAULT_FOLDER = lfkeyboards/lfk78/revj

View File

@ -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

View File

@ -6,11 +6,6 @@
# #
LFK_REV = C LFK_REV = C
ifeq ($(LFK_REV), A)
MCU = at90usb1286
else
MCU = at90usb646
endif
BOOTLOADER = atmel-dfu BOOTLOADER = atmel-dfu
OPT_DEFS += -DLFK_TKL_REV_$(LFK_REV) 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 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 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

View File

@ -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

View File

@ -29,12 +29,4 @@ WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan() isn't run every
SRC = TWIlib.c issi.c lighting.c 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 LAYOUTS = numpad_6x4

View File

@ -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

View File

@ -7,21 +7,12 @@
# Set to A or C # Set to A or C
LFK_REV = C LFK_REV = C
ifeq ($(LFK_REV), A)
MCU = at90usb1286
else
MCU = at90usb646
endif
BOOTLOADER = atmel-dfu BOOTLOADER = atmel-dfu
OPT_DEFS += -DLFK_TKL_REV_$(LFK_REV) OPT_DEFS += -DLFK_TKL_REV_$(LFK_REV)
# Extra source files for IS3731 lighting # Extra source files for IS3731 lighting
SRC = TWIlib.c issi.c lighting.c SRC = TWIlib.c issi.c lighting.c
ifeq ($(strip $(ISSI_ENABLE)), yes)
# TMK_COMMON_DEFS += -DISSI_ENABLE
endif
# Build Options # Build Options
# change yes to no to disable # change yes to no to disable
# #

View File

@ -0,0 +1,3 @@
ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
OPT_DEFS += -DIOS_DEVICE_ENABLE
endif

View File

@ -23,7 +23,3 @@ AUDIO_ENABLE = no # Audio output
SPLIT_KEYBOARD = yes SPLIT_KEYBOARD = yes
IOS_DEVICE_ENABLE = no # connect to IOS device (iPad, iPhone) IOS_DEVICE_ENABLE = no # connect to IOS device (iPad, iPhone)
ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
OPT_DEFS += -DIOS_DEVICE_ENABLE
endif

View File

@ -0,0 +1,3 @@
ifeq ($(strip $(UART_DEBUG)), yes)
OPT_DEFS += -DUART_DEBUG
endif

View File

@ -36,8 +36,4 @@ OPT_DEFS += -DSLEEP_LED_ENABLE # we need our own sleep callbacks to turn of WS28
LTO_ENABLE = yes LTO_ENABLE = yes
ifeq ($(strip $(UART_DEBUG)), yes)
OPT_DEFS += -DUART_DEBUG
endif
DEFAULT_FOLDER = mschwingen/modelm/led_wired DEFAULT_FOLDER = mschwingen/modelm/led_wired

View File

@ -0,0 +1,3 @@
ifeq ($(strip $(IOS_DEVICE_ENABLE )), yes)
OPT_DEFS += -DIOS_DEVICE_ENABLE
endif

View File

@ -21,10 +21,6 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
IOS_DEVICE_ENABLE = no # connect to IOS Device 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 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend

View File

@ -0,0 +1,3 @@
ifeq ($(strip $(LED_ANIMATIONS)), yes)
OPT_DEFS += -DLED_ANIMATIONS
endif

View File

@ -19,9 +19,5 @@ UNICODE_ENABLE = yes # Unicode
RGBLIGHT_ENABLE = no RGBLIGHT_ENABLE = no
LED_ANIMATIONS = 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 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend

View File

@ -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

View File

@ -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

View File

@ -1,9 +1,3 @@
ENCODER_ENABLE = yes ENCODER_ENABLE = yes
OLED_ENABLE = no 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

View File

@ -4,21 +4,6 @@ MCU = atmega32u4
# Bootloader selection # Bootloader selection
BOOTLOADER = caterina 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 # Build Options
# change to "no" to disable the options, or define them in the Makefile in # change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically # the appropriate keymap folder that will get included automatically