# project specific files
SRC ?= matrix.c \
- led.c \
adb.c
CONFIG_H = config.h
# Atmel DFU loader 4096 for TMK Converter rev.1/rev.2
# LUFA bootloader 4096
# USBaspLoader 2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
+BOOTLOADER_SIZE ?= 4096
+OPT_DEFS += -DBOOTLOADER_SIZE=$(BOOTLOADER_SIZE)
# Build Options
# comment out to disable the options.
#
-#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
-EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
-CONSOLE_ENABLE = yes # Console for debug(+400)
-COMMAND_ENABLE = yes # Commands for debug and configuration
-#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
-#NKRO_ENABLE = yes # USB Nkey Rollover
-ADB_MOUSE_ENABLE = yes
-#UNIMAP_ENABLE = yes
-#ACTIONMAP_ENABLE = yes # Use 16bit actionmap instead of 8bit keymap
-#KEYMAP_SECTION_ENABLE = yes # fixed address keymap for keymap editor
+BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
+CONSOLE_ENABLE ?= yes # Console for debug(+400)
+COMMAND_ENABLE ?= yes # Commands for debug and configuration
+NKRO_ENABLE ?= no # USB Nkey Rollover
+ADB_MOUSE_ENABLE ?= yes # ADB Mouse support
+UNIMAP_ENABLE ?= yes # Use unimap
+ACTIONMAP_ENABLE ?= no # Use 16bit actionmap instead of 8bit keymap
+KEYMAP_SECTION_ENABLE ?= yes # fixed address keymap for keymap editor
# ADB Mice need acceleration for todays much bigger screens.
-OPT_DEFS += -DADB_MOUSE_MAXACC=8
+ADB_MOUSE_MAXACC ?= 8
+OPT_DEFS += -DADB_MOUSE_MAXACC=$(ADB_MOUSE_MAXACC)
# Optimize size but this may cause error "relocation truncated to fit"
#
# Keymap file
#
-ifdef UNIMAP_ENABLE
+ifeq (yes,$(strip $(UNIMAP_ENABLE)))
KEYMAP_FILE = unimap
else
- ifdef ACTIONMAP_ENABLE
+ ifeq (yes,$(strip $(ACTIONMAP_ENABLE)))
KEYMAP_FILE = actionmap
else
KEYMAP_FILE = keymap