summaryrefslogtreecommitdiff
path: root/tmk_core/common.mk
diff options
context:
space:
mode:
authorChristopher Browne <cbbrowne@ca.afilias.info>2016-04-27 12:34:54 -0400
committerChristopher Browne <cbbrowne@ca.afilias.info>2016-04-27 12:34:54 -0400
commitf59c4b03facd80cab913c6612a899392dd42ebb8 (patch)
treea6f0bcb584fcc6e6cc31261bafdc4f43b2fa7dfc /tmk_core/common.mk
parent6ec6b613536b7138ee0c87002b10da8fe0c0117d (diff)
parentce75a7675e10e24e7ecd7bc3575c0e0fc1bc34b5 (diff)
downloadqmk_firmware-f59c4b03facd80cab913c6612a899392dd42ebb8.tar.gz
qmk_firmware-f59c4b03facd80cab913c6612a899392dd42ebb8.zip
Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
Diffstat (limited to 'tmk_core/common.mk')
-rw-r--r--tmk_core/common.mk30
1 files changed, 17 insertions, 13 deletions
diff --git a/tmk_core/common.mk b/tmk_core/common.mk
index 89c366f554..9cb2eb8ecd 100644
--- a/tmk_core/common.mk
+++ b/tmk_core/common.mk
@@ -17,66 +17,70 @@ SRC += $(COMMON_DIR)/host.c \
# Option modules
-ifdef BOOTMAGIC_ENABLE
+ifeq ($(strip $(BOOTMAGIC_ENABLE)), yes)
SRC += $(COMMON_DIR)/bootmagic.c
SRC += $(COMMON_DIR)/avr/eeconfig.c
OPT_DEFS += -DBOOTMAGIC_ENABLE
+else
+ SRC += $(COMMON_DIR)/magic.c
+ SRC += $(COMMON_DIR)/avr/eeconfig.c
endif
-ifdef MOUSEKEY_ENABLE
+ifeq ($(strip $(MOUSEKEY_ENABLE)), yes)
SRC += $(COMMON_DIR)/mousekey.c
OPT_DEFS += -DMOUSEKEY_ENABLE
OPT_DEFS += -DMOUSE_ENABLE
endif
-ifdef EXTRAKEY_ENABLE
+ifeq ($(strip $(EXTRAKEY_ENABLE)), yes)
OPT_DEFS += -DEXTRAKEY_ENABLE
endif
-ifdef CONSOLE_ENABLE
+ifeq ($(strip $(CONSOLE_ENABLE)), yes)
OPT_DEFS += -DCONSOLE_ENABLE
else
OPT_DEFS += -DNO_PRINT
OPT_DEFS += -DNO_DEBUG
endif
-ifdef COMMAND_ENABLE
+ifeq ($(strip $(COMMAND_ENABLE)), yes)
SRC += $(COMMON_DIR)/command.c
OPT_DEFS += -DCOMMAND_ENABLE
endif
-ifdef NKRO_ENABLE
+ifeq ($(strip $(NKRO_ENABLE)), yes)
OPT_DEFS += -DNKRO_ENABLE
endif
-ifdef MIDI_ENABLE
+ifeq ($(strip $(MIDI_ENABLE)), yes)
OPT_DEFS += -DMIDI_ENABLE
endif
-ifdef AUDIO_ENABLE
+ifeq ($(strip $(AUDIO_ENABLE)), yes)
OPT_DEFS += -DAUDIO_ENABLE
endif
-ifdef USB_6KRO_ENABLE
+ifeq ($(strip $(USB_6KRO_ENABLE)), yes)
OPT_DEFS += -DUSB_6KRO_ENABLE
endif
-ifdef SLEEP_LED_ENABLE
+ifeq ($(strip $(SLEEP_LED_ENABLE)), yes)
SRC += $(COMMON_DIR)/sleep_led.c
OPT_DEFS += -DSLEEP_LED_ENABLE
OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
endif
-ifdef BACKLIGHT_ENABLE
+ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
SRC += $(COMMON_DIR)/backlight.c
+ SRC += $(COMMON_DIR)/avr/eeconfig.c
OPT_DEFS += -DBACKLIGHT_ENABLE
endif
-ifdef BLUETOOTH_ENABLE
+ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
OPT_DEFS += -DBLUETOOTH_ENABLE
endif
-ifdef KEYMAP_SECTION_ENABLE
+ifeq ($(strip $(KEYMAP_SECTION_ENABLE)), yes)
OPT_DEFS += -DKEYMAP_SECTION_ENABLE
ifeq ($(strip $(MCU)),atmega32u2)