1
0

core: Fix common.mk for build options

This commit is contained in:
tmk 2016-08-31 16:40:32 +09:00
parent d96f295106
commit 765d82e8b1

View File

@ -17,11 +17,11 @@ SRC += $(COMMON_DIR)/host.c \
# Option modules # Option modules
ifdef UNIMAP_ENABLE ifeq (yes,$(strip $(UNIMAP_ENABLE)))
SRC += $(COMMON_DIR)/unimap.c SRC += $(COMMON_DIR)/unimap.c
OPT_DEFS += -DUNIMAP_ENABLE OPT_DEFS += -DUNIMAP_ENABLE
else else
ifdef ACTIONMAP_ENABLE ifeq (yes,$(strip $(ACTIONMAP_ENABLE)))
SRC += $(COMMON_DIR)/actionmap.c SRC += $(COMMON_DIR)/actionmap.c
OPT_DEFS += -DACTIONMAP_ENABLE OPT_DEFS += -DACTIONMAP_ENABLE
else else
@ -29,58 +29,58 @@ else
endif endif
endif endif
ifdef BOOTMAGIC_ENABLE ifeq (yes,$(strip $(BOOTMAGIC_ENABLE)))
SRC += $(COMMON_DIR)/bootmagic.c SRC += $(COMMON_DIR)/bootmagic.c
SRC += $(COMMON_DIR)/avr/eeconfig.c SRC += $(COMMON_DIR)/avr/eeconfig.c
OPT_DEFS += -DBOOTMAGIC_ENABLE OPT_DEFS += -DBOOTMAGIC_ENABLE
endif endif
ifdef MOUSEKEY_ENABLE ifeq (yes,$(strip $(MOUSEKEY_ENABLE)))
SRC += $(COMMON_DIR)/mousekey.c SRC += $(COMMON_DIR)/mousekey.c
OPT_DEFS += -DMOUSEKEY_ENABLE OPT_DEFS += -DMOUSEKEY_ENABLE
OPT_DEFS += -DMOUSE_ENABLE OPT_DEFS += -DMOUSE_ENABLE
endif endif
ifdef EXTRAKEY_ENABLE ifeq (yes,$(strip $(EXTRAKEY_ENABLE)))
OPT_DEFS += -DEXTRAKEY_ENABLE OPT_DEFS += -DEXTRAKEY_ENABLE
endif endif
ifdef CONSOLE_ENABLE ifeq (yes,$(strip $(CONSOLE_ENABLE)))
OPT_DEFS += -DCONSOLE_ENABLE OPT_DEFS += -DCONSOLE_ENABLE
else else
OPT_DEFS += -DNO_PRINT OPT_DEFS += -DNO_PRINT
OPT_DEFS += -DNO_DEBUG OPT_DEFS += -DNO_DEBUG
endif endif
ifdef COMMAND_ENABLE ifeq (yes,$(strip $(COMMAND_ENABLE)))
SRC += $(COMMON_DIR)/command.c SRC += $(COMMON_DIR)/command.c
OPT_DEFS += -DCOMMAND_ENABLE OPT_DEFS += -DCOMMAND_ENABLE
endif endif
ifdef NKRO_ENABLE ifeq (yes,$(strip $(NKRO_ENABLE)))
OPT_DEFS += -DNKRO_ENABLE OPT_DEFS += -DNKRO_ENABLE
endif endif
ifdef USB_6KRO_ENABLE ifeq (yes,$(strip $(USB_6KRO_ENABLE)))
OPT_DEFS += -DUSB_6KRO_ENABLE OPT_DEFS += -DUSB_6KRO_ENABLE
endif endif
ifdef KEYBOARD_LOCK_ENABLE ifeq (yes, $(strip $(KEYBOARD_LOCK_ENABLE)))
OPT_DEFS += -DKEYBOARD_LOCK_ENABLE OPT_DEFS += -DKEYBOARD_LOCK_ENABLE
endif endif
ifdef SLEEP_LED_ENABLE ifeq (yes,$(strip $(SLEEP_LED_ENABLE)))
SRC += $(COMMON_DIR)/avr/sleep_led.c SRC += $(COMMON_DIR)/avr/sleep_led.c
OPT_DEFS += -DSLEEP_LED_ENABLE OPT_DEFS += -DSLEEP_LED_ENABLE
OPT_DEFS += -DNO_SUSPEND_POWER_DOWN OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
endif endif
ifdef BACKLIGHT_ENABLE ifeq (yes,$(strip $(BACKLIGHT_ENABLE)))
SRC += $(COMMON_DIR)/backlight.c SRC += $(COMMON_DIR)/backlight.c
OPT_DEFS += -DBACKLIGHT_ENABLE OPT_DEFS += -DBACKLIGHT_ENABLE
endif endif
ifdef KEYMAP_SECTION_ENABLE ifeq (yes,$(strip $(KEYMAP_SECTION_ENABLE)))
OPT_DEFS += -DKEYMAP_SECTION_ENABLE OPT_DEFS += -DKEYMAP_SECTION_ENABLE
ifeq ($(strip $(MCU)),atmega32u2) ifeq ($(strip $(MCU)),atmega32u2)