-# Output Messages\r
-MSG_BUILD_BEGIN = Begin compilation of project \"$(TARGET)\"...\r
-MSG_BUILD_END = Finished building project \"$(TARGET)\"...\r
-MSG_COMPILE_CMD = ' [CC] :'\r
-MSG_REMOVE_CMD = ' [RM] :'\r
-MSG_LINKER_CMD = ' [LNK] :'\r
-MSG_SIZE_CMD = ' [SIZE] :'\r
-MSG_OBJCPY_CMD = ' [OBJCPY] :'\r
-MSG_OBJDMP_CMD = ' [OBJDMP] :'\r
-\r
-# Sanity check the user MCU, TARGET, ARCH, SRC, F_USB and LUFA_PATH makefile options\r
-ifeq ($(TARGET),)\r
- $(error Makefile TARGET value not set.)\r
-endif\r
-ifeq ($(ARCH),)\r
- $(error Makefile ARCH value not set.)\r
-endif\r
-ifeq ($(MCU),)\r
- $(error Makefile MCU value not set.)\r
-endif\r
-ifeq ($(SRC),)\r
- $(error Makefile SRC value not set.)\r
-endif\r
-ifeq ($(F_USB),)\r
- $(error Makefile F_USB value not set.)\r
-endif\r
-ifeq ($(LUFA_PATH),)\r
- $(error Makefile LUFA_PATH value not set.)\r
+# Sanity-check values of mandatory user-supplied variables\r
+MCU ?= $(error Makefile MCU value not set.)\r
+TARGET ?= $(error Makefile TARGET value not set.)\r
+ARCH ?= $(error Makefile ARCH value not set.)\r
+SRC ?= $(error Makefile SRC value not set.)\r
+F_USB ?= $(error Makefile F_USB value not set.)\r
+LUFA_PATH ?= $(error Makefile LUFA_PATH value not set.)\r
+\r
+# Default values of optionally user-supplied variables\r
+BOARD ?= NONE\r
+OPTIMIZATION ?= s\r
+F_CPU ?=\r
+C_STANDARD ?= gnu99\r
+CPP_STANDARD ?= gnu++98\r
+C_FLAGS ?=\r
+CPP_FLAGS ?=\r
+ASM_FLAGS ?=\r
+CC_FLAGS ?=\r
+\r
+# Determine the utility prefix to use for the selected architecture\r
+ifeq ($(ARCH), AVR8)\r
+ CROSS := avr-\r
+else ifeq ($(ARCH), XMEGA)\r
+ CROSS := avr-\r
+else ifeq ($(ARCH), UC3)\r
+ CROSS := avr32-\r
+else\r
+ $(error Unsupported architecture.)\r