qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

rules.mk (3793B)


      1 BOOTMAGIC_ENABLE = no       # Enable Bootmagic Lite
      2 MOUSEKEY_ENABLE = no       # Mouse keys
      3 EXTRAKEY_ENABLE = yes       # Audio control and System control
      4 CONSOLE_ENABLE = no         # Console for debug
      5 COMMAND_ENABLE = no        # Commands for debug and configuration
      6 NKRO_ENABLE = no
      7 BACKLIGHT_ENABLE = no      # Enable keyboard backlight functionality
      8 AUDIO_ENABLE = no           # Audio output
      9 RGBLIGHT_ENABLE = no        # Enable WS2812 RGB underlight.  Do not enable this with audio at the same time.
     10 SWAP_HANDS_ENABLE = no        # Enable one-hand typing
     11 LTO_ENABLE = no             # if firmware size over limit, try this option
     12 
     13 define ZINC_CUSTOMISE_MSG
     14   $(info Zinc customize)
     15   $(info -  LED_BACK_ENABLE=$(LED_BACK_ENABLE))
     16   $(info -  LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE))
     17   $(info -  LED_BOTH_ENABLE=$(LED_BOTH_ENABLE))
     18   $(info -  LED_RGB_CONT=$(LED_RGB_CONT))
     19   $(info -  RGB_MATRIX=$(RGB_MATRIX))
     20   $(info -  LED_ANIMATION=$(LED_ANIMATIONS))
     21   $(info -  IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE))
     22 endef
     23 
     24 # Zinc keyboard customize
     25 LED_BACK_ENABLE = no        # LED backlight (Enable SK6812mini backlight)
     26 LED_UNDERGLOW_ENABLE = no   # LED underglow (Enable WS2812 RGB underlight)
     27 LED_BOTH_ENABLE = no        # LED backlight and underglow
     28 LED_RGB_CONT = no           # LED continuous backlight or/and underglow between left Zinc and right Zinc
     29 RGB_MATRIX = no             # RGB LED Matrix
     30 RGB_MATRIX_SPLIT_RIGHT = no # RGB Matrix for RIGHT Hand
     31 LED_ANIMATIONS = yes        # LED animations
     32 IOS_DEVICE_ENABLE = no      # connect to IOS device (iPad,iPhone)
     33 
     34 ####  LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE.
     35 ####    Do not enable these with audio at the same time.
     36 
     37 ### Zinc keyboard 'default' keymap: convenient command line option
     38 ##    make ZINC=<options> zinc:defualt
     39 ##    option= back | under | both | cont | matrix | na | ios
     40 ##    ex.
     41 ##      make ZINC=under    zinc:defualt
     42 ##      make ZINC=under,ios zinc:defualt
     43 ##      make ZINC=back     zinc:default
     44 ##      make ZINC=back,na  zinc:default
     45 ##      make ZINC=back,ios zinc:default
     46 
     47 ifneq ($(strip $(ZINC)),)
     48   ifeq ($(findstring back,$(ZINC)), back)
     49     LED_BACK_ENABLE = yes
     50   endif
     51   ifeq ($(findstring under,$(ZINC)), under)
     52     LED_UNDERGLOW_ENABLE = yes
     53   endif
     54   ifeq ($(findstring both,$(ZINC)), both)
     55     LED_BOTH_ENABLE = yes
     56   endif
     57   ifeq ($(findstring cont,$(ZINC)), cont)
     58     LED_RGB_CONT = yes
     59   endif
     60   ifeq ($(findstring matrix,$(ZINC)), matrix)
     61     RGB_MATRIX = yes
     62   endif
     63   ifeq ($(findstring right,$(ZINC)), right)
     64     RGB_MATRIX_SPLIT_RIGHT = yes
     65   endif
     66   ifeq ($(findstring na,$(ZINC)), na)
     67     LED_ANIMATIONS = no
     68   endif
     69   ifeq ($(findstring ios,$(ZINC)), ios)
     70     IOS_DEVICE_ENABLE = yes
     71   endif
     72   $(eval $(call ZINC_CUSTOMISE_MSG))
     73   $(info )
     74 endif
     75 
     76 ifeq ($(strip $(LED_BACK_ENABLE)), yes)
     77   RGBLIGHT_ENABLE = yes
     78   ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
     79     OPT_DEFS += -DRGBLED_BOTH
     80     $(info LED_BOTH_ENABLE option is enabled instead of LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE)
     81   else
     82     OPT_DEFS += -DRGBLED_BACK
     83   endif
     84 else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
     85   RGBLIGHT_ENABLE = yes
     86 else
     87   RGBLIGHT_ENABLE = no
     88 endif
     89 
     90 ifeq ($(strip $(LED_BOTH_ENABLE)), yes)
     91   RGBLIGHT_ENABLE = yes
     92   OPT_DEFS += -DRGBLED_BOTH
     93 endif
     94 
     95 ifeq ($(strip $(LED_RGB_CONT)), yes)
     96   OPT_DEFS += -DRGBLED_CONT
     97 endif
     98 
     99 ifeq ($(strip $(RGB_MATRIX)), yes)
    100   RGBLIGHT_ENABLE = no
    101   RGB_MATRIX_ENABLE = yes
    102 endif
    103 
    104 ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
    105   OPT_DEFS += -DIOS_DEVICE_ENABLE
    106 endif
    107 
    108 ifeq ($(strip $(LED_ANIMATIONS)), yes)
    109   OPT_DEFS += -DLED_ANIMATIONS
    110 endif
    111 
    112 ifeq ($(strip $(RGB_MATRIX_SPLIT_RIGHT)), yes)
    113     OPT_DEFS += -DRGB_MATRIX_SPLIT_RIGHT
    114 endif
    115 
    116 # Uncomment these for debugging
    117 # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE))
    118 # $(info -- OPT_DEFS=$(OPT_DEFS))
    119 # $(info )