qmk

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.z3bra.org/qmk.git
Log | Files | Refs | Submodules | LICENSE

rules.mk (4567B)


      1 
      2 # Build Options
      3 #   change to "no" to disable the options, or define them in the Makefile in
      4 #   the appropriate keymap folder that will get included automatically
      5 #
      6 BOOTMAGIC_ENABLE = no       # Virtual DIP switch configuration(+1000)
      7 MOUSEKEY_ENABLE = no       # Mouse keys(+4700)
      8 EXTRAKEY_ENABLE = no       # Audio control and System control(+450)
      9 CONSOLE_ENABLE = no        # Console for debug
     10 COMMAND_ENABLE = no        # Commands for debug and configuration
     11 # CONSOLE_ENABLE and COMMAND_ENABLE
     12 #      yes, no  +1500
     13 #      yes, yes +3200
     14 #      no,  yes +400
     15 NKRO_ENABLE = no            # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
     16 BACKLIGHT_ENABLE = no      # Enable keyboard backlight functionality
     17 MIDI_ENABLE = no            # MIDI controls
     18 AUDIO_ENABLE = no           # Audio output on port C6
     19 UNICODE_ENABLE = no         # Unicode
     20 BLUETOOTH_ENABLE = no       # Enable Bluetooth with the Adafruit EZ-Key HID
     21 RGBLIGHT_ENABLE = no        # Enable WS2812 RGB underlight.
     22 SWAP_HANDS_ENABLE = no        # Enable one-hand typing
     23 
     24 define HELIX_CUSTOMISE_MSG
     25   $(info Helix customize)
     26   $(info -  OLED_ENABLE=$(OLED_ENABLE))
     27   $(info -  LED_BACK_ENABLE=$(LED_BACK_ENABLE))
     28   $(info -  LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE))
     29   $(info -  LED_ANIMATION=$(LED_ANIMATIONS))
     30   $(info -  IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE))
     31 endef
     32 
     33 # Helix keyboard customize
     34 # you can edit follows 7 Variables
     35 #  jp: 以下の7つの変数を必要に応じて編集します。
     36 HELIX_ROWS = 5              # Helix Rows is 4 or 5
     37 OLED_ENABLE = no            # OLED_ENABLE
     38 LOCAL_GLCDFONT = no         # use each keymaps "helixfont.h" insted of "common/glcdfont.c"
     39 LED_BACK_ENABLE = no        # LED backlight (Enable WS2812 RGB underlight.)
     40 LED_UNDERGLOW_ENABLE = no   # LED underglow (Enable WS2812 RGB underlight.)
     41 LED_ANIMATIONS = yes        # LED animations
     42 IOS_DEVICE_ENABLE = no      # connect to IOS device (iPad,iPhone)
     43 Link_Time_Optimization = no # if firmware size over limit, try this option
     44 
     45 ####  LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE.
     46 ####    Do not enable these with audio at the same time.
     47 
     48 ### Helix keyboard 'five_rows' keymap: convenient command line option
     49 ##    make HELIX=<options> helix:five_rows
     50 ##    option= oled | back | under | na | ios
     51 ##    ex.
     52 ##      make HELIX=oled          helix:five_rows
     53 ##      make HELIX=oled,back     helix:five_rows
     54 ##      make HELIX=oled,under    helix:five_rows
     55 ##      make HELIX=oled,back,na  helix:five_rows
     56 ##      make HELIX=oled,back,ios helix:five_rows
     57 ##
     58 ifneq ($(strip $(HELIX)),)
     59   ifeq ($(findstring oled,$(HELIX)), oled)
     60     OLED_ENABLE = yes
     61   endif
     62   ifeq ($(findstring back,$(HELIX)), back)
     63     LED_BACK_ENABLE = yes
     64   else ifeq ($(findstring under,$(HELIX)), under)
     65     LED_UNDERGLOW_ENABLE = yes
     66   endif
     67   ifeq ($(findstring na,$(HELIX)), na)
     68     LED_ANIMATIONS = no
     69   endif
     70   ifeq ($(findstring ios,$(HELIX)), ios)
     71     IOS_DEVICE_ENABLE = yes
     72   endif
     73   ifeq ($(findstring console,$(HELIX)), console)
     74     CONSOLE_ENABLE = yes
     75   endif
     76   $(eval $(call HELIX_CUSTOMISE_MSG))
     77   $(info )
     78 endif
     79 
     80 # Uncomment these for checking
     81 #   jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。
     82 # $(eval $(call HELIX_CUSTOMISE_MSG))
     83 # $(info )
     84 
     85 ifneq ($(strip $(HELIX_ROWS)), 4)
     86 ifneq ($(strip $(HELIX_ROWS)), 5)
     87 $(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value)
     88 endif
     89 endif
     90 OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS))
     91 
     92 ifeq ($(strip $(LED_BACK_ENABLE)), yes)
     93   RGBLIGHT_ENABLE = yes
     94   OPT_DEFS += -DRGBLED_BACK
     95   ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
     96     $(eval $(call HELIX_CUSTOMISE_MSG))
     97     $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes')
     98   endif
     99 else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
    100   RGBLIGHT_ENABLE = yes
    101 else
    102   RGBLIGHT_ENABLE = no
    103 endif
    104 
    105 ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
    106     OPT_DEFS += -DIOS_DEVICE_ENABLE
    107 endif
    108 
    109 ifeq ($(strip $(LED_ANIMATIONS)), yes)
    110     OPT_DEFS += -DLED_ANIMATIONS
    111 endif
    112 
    113 ifeq ($(strip $(OLED_ENABLE)), yes)
    114     OPT_DEFS += -DOLED_ENABLE
    115 endif
    116 
    117 ifeq ($(strip $(LOCAL_GLCDFONT)), yes)
    118     OPT_DEFS += -DLOCAL_GLCDFONT
    119 endif
    120 
    121 ifeq ($(strip $(Link_Time_Optimization)),yes)
    122     EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization
    123 endif
    124 
    125 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
    126 SLEEP_LED_ENABLE = no    # Breathing sleep LED during USB suspend
    127 
    128 # Uncomment these for debugging
    129 # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE))
    130 # $(info -- OPT_DEFS=$(OPT_DEFS))
    131 # $(info )