From 231658362eca0f882f1fc28642ffe160926461f1 Mon Sep 17 00:00:00 2001
From: Dean Camera <dean@fourwalledcubicle.com>
Date: Tue, 15 Dec 2015 22:23:08 +1100
Subject: Replace LUFA build system with DMBS.

---
 LUFA/Build/DMBS                                  |   1 +
 LUFA/Build/HID_EEPROM_Loader/HID_EEPROM_Loader.c |  61 ----
 LUFA/Build/HID_EEPROM_Loader/makefile            |  42 ---
 LUFA/Build/lufa_atprogram.mk                     |  97 +------
 LUFA/Build/lufa_avrdude.mk                       |  80 +-----
 LUFA/Build/lufa_build.mk                         | 338 ++---------------------
 LUFA/Build/lufa_core.mk                          | 169 +-----------
 LUFA/Build/lufa_cppcheck.mk                      | 101 +------
 LUFA/Build/lufa_dfu.mk                           |  89 +-----
 LUFA/Build/lufa_doxygen.mk                       |  94 +------
 LUFA/Build/lufa_hid.mk                           |  90 +-----
 LUFA/Build/lufa_sources.mk                       |  10 +-
 12 files changed, 36 insertions(+), 1136 deletions(-)
 create mode 160000 LUFA/Build/DMBS
 delete mode 100644 LUFA/Build/HID_EEPROM_Loader/HID_EEPROM_Loader.c
 delete mode 100644 LUFA/Build/HID_EEPROM_Loader/makefile

diff --git a/LUFA/Build/DMBS b/LUFA/Build/DMBS
new file mode 160000
index 000000000..7dfe3cf63
--- /dev/null
+++ b/LUFA/Build/DMBS
@@ -0,0 +1 @@
+Subproject commit 7dfe3cf63ab428690112b79ce5d5261945a9118c
diff --git a/LUFA/Build/HID_EEPROM_Loader/HID_EEPROM_Loader.c b/LUFA/Build/HID_EEPROM_Loader/HID_EEPROM_Loader.c
deleted file mode 100644
index 2ec44093c..000000000
--- a/LUFA/Build/HID_EEPROM_Loader/HID_EEPROM_Loader.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-             LUFA Library
-     Copyright (C) Dean Camera, 2015.
-
-  dean [at] fourwalledcubicle [dot] com
-           www.lufa-lib.org
-*/
-
-/*
-  Copyright 2015  Dean Camera (dean [at] fourwalledcubicle [dot] com)
-
-  Permission to use, copy, modify, distribute, and sell this
-  software and its documentation for any purpose is hereby granted
-  without fee, provided that the above copyright notice appear in
-  all copies and that both that the copyright notice and this
-  permission notice and warranty disclaimer appear in supporting
-  documentation, and that the name of the author not be used in
-  advertising or publicity pertaining to distribution of the
-  software without specific, written prior permission.
-
-  The author disclaims all warranties with regard to this
-  software, including all implied warranties of merchantability
-  and fitness.  In no event shall the author be liable for any
-  special, indirect or consequential damages or any damages
-  whatsoever resulting from loss of use, data or profits, whether
-  in an action of contract, negligence or other tortious action,
-  arising out of or in connection with the use or performance of
-  this software.
-*/
-
-/** \file
- *
- *  Special application to extract an EEPROM image stored in FLASH memory, and
- *  copy it to the device EEPROM. This application is designed to be used with
- *  the HID build system module of LUFA to program the EEPROM of a target device
- *  that uses the HID bootloader protocol, which does not have native EEPROM
- *  programming support.
- */
-
-#include <avr/io.h>
-#include <avr/eeprom.h>
-#include <avr/pgmspace.h>
-
-/* References to the binary EEPROM data linked in the AVR's FLASH memory space */
-extern const char _binary_InputEEData_bin_start[];
-extern const char _binary_InputEEData_bin_end[];
-extern const char _binary_InputEEData_bin_size[];
-
-/* Friendly names for the embedded binary data stored in FLASH memory space */
-#define InputEEData       _binary_InputEEData_bin_start
-#define InputEEData_size  ((int)_binary_InputEEData_bin_size)
-
-int main(void)
-{
-	/* Copy out the embedded EEPROM data from FLASH to EEPROM memory space */
-	for (uint16_t i = 0; i < InputEEData_size; i++)
-	  eeprom_update_byte((uint8_t*)i, pgm_read_byte(&InputEEData[i]));
-
-	/* Infinite loop once complete */
-	for (;;);
-}
diff --git a/LUFA/Build/HID_EEPROM_Loader/makefile b/LUFA/Build/HID_EEPROM_Loader/makefile
deleted file mode 100644
index 763574898..000000000
--- a/LUFA/Build/HID_EEPROM_Loader/makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-#             LUFA Library
-#     Copyright (C) Dean Camera, 2015.
-#
-#  dean [at] fourwalledcubicle [dot] com
-#           www.lufa-lib.org
-#
-# --------------------------------------
-#         LUFA Project Makefile.
-# --------------------------------------
-
-# Run "make help" for target help.
-
-MCU          = at90usb1287
-ARCH         = AVR8
-F_CPU        = 1000000
-F_USB        = $(F_CPU)
-OPTIMIZATION = s
-TARGET       = HID_EEPROM_Loader
-SRC          = $(TARGET).c
-LUFA_PATH    = ../../../LUFA
-CC_FLAGS     =
-LD_FLAGS     =
-OBJECT_FILES = InputEEData.o
-
-# Default target
-all:
-
-# Determine the AVR sub-architecture of the build main application object file
-FIND_AVR_SUBARCH = avr$(shell avr-objdump -f $(TARGET).o | grep architecture | cut -d':' -f3 | cut -d',' -f1)
-
-# Create a linkable object file with the input binary EEPROM data stored in the FLASH section
-InputEEData.o: InputEEData.bin $(TARGET).o $(MAKEFILE_LIST)
-	@echo $(MSG_OBJCPY_CMD) Converting \"$<\" to a object file \"$@\"
-	avr-objcopy -I binary -O elf32-avr -B $(call FIND_AVR_SUBARCH) --rename-section .data=.progmem.data,contents,alloc,readonly,data $< $@
-
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
diff --git a/LUFA/Build/lufa_atprogram.mk b/LUFA/Build/lufa_atprogram.mk
index d55b02b76..86988d1ca 100644
--- a/LUFA/Build/lufa_atprogram.mk
+++ b/LUFA/Build/lufa_atprogram.mk
@@ -6,98 +6,5 @@
 #           www.lufa-lib.org
 #
 
-LUFA_BUILD_MODULES         += ATPROGRAM
-LUFA_BUILD_TARGETS         += atprogram atprogram-ee
-LUFA_BUILD_MANDATORY_VARS  += MCU TARGET
-LUFA_BUILD_OPTIONAL_VARS   += ATPROGRAM_PROGRAMMER ATPROGRAM_INTERFACE ATPROGRAM_PORT
-LUFA_BUILD_PROVIDED_VARS   +=
-LUFA_BUILD_PROVIDED_MACROS +=
-
-# -----------------------------------------------------------------------------
-#             LUFA ATPROGRAM Programmer Buildsystem Makefile Module.
-# -----------------------------------------------------------------------------
-# DESCRIPTION:
-#   Provides a set of targets to re-program a device using the Atmel atprogram
-#   utility in AVR Studio 5.x and Atmel Studio 6.0 onwards.
-# -----------------------------------------------------------------------------
-# TARGETS:
-#
-#    atprogram                 - Program target FLASH with application using
-#                                atprogram
-#    atprogram-ee              - Program target EEPROM with application data
-#                                using atprogram
-#
-# MANDATORY PARAMETERS:
-#
-#    MCU                       - Microcontroller device model name
-#    TARGET                    - Application name
-#
-# OPTIONAL PARAMETERS:
-#
-#    ATPROGRAM_PROGRAMMER      - Name of programming hardware to use
-#    ATPROGRAM_INTERFACE       - Name of programming interface to use
-#    ATPROGRAM_PORT            - Name of communication port to use
-#
-# PROVIDED VARIABLES:
-#
-#    (None)
-#
-# PROVIDED MACROS:
-#
-#    (None)
-#
-# -----------------------------------------------------------------------------
-
-SHELL = /bin/sh
-
-ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
-ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
-ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
-
-# Default values of optionally user-supplied variables
-ATPROGRAM_PROGRAMMER ?= atmelice
-ATPROGRAM_INTERFACE  ?= jtag
-ATPROGRAM_PORT       ?=
-
-# Sanity check user supplied values
-$(foreach MANDATORY_VAR, $(LUFA_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
-$(call ERROR_IF_EMPTY, MCU)
-$(call ERROR_IF_EMPTY, TARGET)
-$(call ERROR_IF_EMPTY, ATPROGRAM_PROGRAMMER)
-$(call ERROR_IF_EMPTY, ATPROGRAM_INTERFACE)
-
-# Output Messages
-MSG_ATPROGRAM_CMD    := ' [ATPRGRM] :'
-
-# Construct base atprogram command flags
-BASE_ATPROGRAM_FLAGS := --tool $(ATPROGRAM_PROGRAMMER) --interface $(ATPROGRAM_INTERFACE) --device $(MCU)
-ifneq ($(ATPROGRAM_PORT),)
-   BASE_ATPROGRAM_FLAGS += --port $(ATPROGRAM_PORT)
-endif
-
-# Construct the flags to use for the various memory spaces
-ifeq ($(ARCH), AVR8)
-   ATPROGRAM_FLASH_FLAGS  := --chiperase --flash
-   ATPROGRAM_EEPROM_FLAGS := --eeprom
-else ifeq ($(ARCH), XMEGA)
-   ATPROGRAM_FLASH_FLAGS  := --erase --flash
-   ATPROGRAM_EEPROM_FLAGS := --eeprom
-else ifeq ($(ARCH), UC3)
-   ATPROGRAM_FLASH_FLAGS  := --erase
-   ATPROGRAM_EEPROM_FLAGS := --eeprom
-else
-   $(error Unsupported architecture "$(ARCH)")
-endif
-
-# Programs in the target FLASH memory using ATPROGRAM
-atprogram: $(TARGET).elf $(MAKEFILE_LIST)
-	@echo $(MSG_ATPROGRAM_CMD) Programming device \"$(MCU)\" FLASH using \"$(ATPROGRAM_PROGRAMMER)\"
-	atprogram $(BASE_ATPROGRAM_FLAGS) program $(ATPROGRAM_FLASH_FLAGS) --file $<
-
-# Programs in the target EEPROM memory using ATPROGRAM
-atprogram-ee: $(TARGET).elf $(MAKEFILE_LIST)
-	@echo $(MSG_ATPROGRAM_CMD) Programming device \"$(MCU)\" EEPROM using \"$(ATPROGRAM_PROGRAMMER)\"
-	atprogram $(BASE_ATPROGRAM_FLAGS) program $(ATPROGRAM_EEPROM_FLAGS) --file $<
-
-# Phony build targets for this module
-.PHONY: atprogram atprogram-ee
+DMBS_PATH := $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/atprogram.mk
diff --git a/LUFA/Build/lufa_avrdude.mk b/LUFA/Build/lufa_avrdude.mk
index 06c87e3d3..649215f5a 100644
--- a/LUFA/Build/lufa_avrdude.mk
+++ b/LUFA/Build/lufa_avrdude.mk
@@ -6,81 +6,5 @@
 #           www.lufa-lib.org
 #
 
-LUFA_BUILD_MODULES         += AVRDUDE
-LUFA_BUILD_TARGETS         += avrdude avrdude-ee
-LUFA_BUILD_MANDATORY_VARS  += MCU TARGET
-LUFA_BUILD_OPTIONAL_VARS   += AVRDUDE_PROGRAMMER AVRDUDE_PORT AVRDUDE_FLAGS
-LUFA_BUILD_PROVIDED_VARS   +=
-LUFA_BUILD_PROVIDED_MACROS +=
-
-# -----------------------------------------------------------------------------
-#             LUFA AVRDUDE Programmer Buildsystem Makefile Module.
-# -----------------------------------------------------------------------------
-# DESCRIPTION:
-#   Provides a set of targets to re-program a device using the open source
-#   avr-dude utility.
-# -----------------------------------------------------------------------------
-# TARGETS:
-#
-#    avrdude                   - Program target FLASH with application using
-#                                avrdude
-#    avrdude-ee                - Program target EEPROM with application data
-#                                using avrdude
-#
-# MANDATORY PARAMETERS:
-#
-#    MCU                       - Microcontroller device model name
-#    TARGET                    - Application name
-#
-# OPTIONAL PARAMETERS:
-#
-#    AVRDUDE_PROGRAMMER        - Name of programming hardware to use
-#    AVRDUDE_PORT              - Name of communication port to use
-#    AVRDUDE_FLAGS             - Flags to pass to avr-dude
-#
-# PROVIDED VARIABLES:
-#
-#    (None)
-#
-# PROVIDED MACROS:
-#
-#    (None)
-#
-# -----------------------------------------------------------------------------
-
-SHELL = /bin/sh
-
-ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
-ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
-ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
-
-# Default values of optionally user-supplied variables
-AVRDUDE_PROGRAMMER ?= jtagicemkii
-AVRDUDE_PORT       ?= usb
-AVRDUDE_FLAGS      ?=
-
-# Sanity check user supplied values
-$(foreach MANDATORY_VAR, $(LUFA_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
-$(call ERROR_IF_EMPTY, MCU)
-$(call ERROR_IF_EMPTY, TARGET)
-$(call ERROR_IF_EMPTY, AVRDUDE_PROGRAMMER)
-$(call ERROR_IF_EMPTY, AVRDUDE_PORT)
-
-# Output Messages
-MSG_AVRDUDE_CMD    := ' [AVRDUDE] :'
-
-# Construct base avrdude command flags
-BASE_AVRDUDE_FLAGS := -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
-
-# Programs in the target FLASH memory using AVRDUDE
-avrdude: $(TARGET).hex $(MAKEFILE_LIST)
-	@echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" FLASH using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\"
-	avrdude $(BASE_AVRDUDE_FLAGS) -U flash:w:$< $(AVRDUDE_FLAGS)
-
-# Programs in the target EEPROM memory using AVRDUDE
-avrdude-ee: $(TARGET).eep $(MAKEFILE_LIST)
-	@echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" EEPROM using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\"
-	avrdude $(BASE_AVRDUDE_FLAGS) -U eeprom:w:$< $(AVRDUDE_FLAGS)
-
-# Phony build targets for this module
-.PHONY: avrdude avrdude-ee
+DMBS_PATH := $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/avrdude.mk
diff --git a/LUFA/Build/lufa_build.mk b/LUFA/Build/lufa_build.mk
index 9f1125d99..3c41da000 100644
--- a/LUFA/Build/lufa_build.mk
+++ b/LUFA/Build/lufa_build.mk
@@ -6,346 +6,40 @@
 #           www.lufa-lib.org
 #
 
-LUFA_BUILD_MODULES         += BUILD
-LUFA_BUILD_TARGETS         += size symbol-sizes all lib elf bin hex lss clean mostlyclean
-LUFA_BUILD_MANDATORY_VARS  += TARGET ARCH MCU SRC F_USB LUFA_PATH
-LUFA_BUILD_OPTIONAL_VARS   += BOARD OPTIMIZATION C_STANDARD CPP_STANDARD F_CPU C_FLAGS CPP_FLAGS ASM_FLAGS CC_FLAGS LD_FLAGS OBJDIR OBJECT_FILES DEBUG_TYPE DEBUG_LEVEL LINKER_RELAXATIONS COMPILER_PATH
-LUFA_BUILD_PROVIDED_VARS   +=
-LUFA_BUILD_PROVIDED_MACROS +=
-
-# -----------------------------------------------------------------------------
-#               LUFA GCC Compiler Buildsystem Makefile Module.
-# -----------------------------------------------------------------------------
-# DESCRIPTION:
-#   Provides a set of targets to build a C, C++ and/or Assembly application
-#   via the AVR-GCC compiler.
-# -----------------------------------------------------------------------------
-# TARGETS:
-#
-#    size                      - List built application size
-#    symbol-sizes              - Print application symbols from the binary ELF
-#                                file as a list sorted by size in bytes
-#    all                       - Build application and list size
-#    lib                       - Build and archive source files into a library
-#    elf                       - Build application ELF debug object file
-#    bin                       - Build application BIN binary object file
-#    hex                       - Build application HEX object file
-#    lss                       - Build application LSS assembly listing file
-#    clean                     - Remove all project intermediary and binary
-#                                output files
-#    mostlyclean               - Remove intermediary output files, but
-#                                preserve binaries
-#    <filename>.s              - Compile C/C++ source file into an assembly file
-#                                for manual code inspection
-#
-# MANDATORY PARAMETERS:
-#
-#    TARGET                    - Application name
-#    ARCH                      - Device architecture name
-#    MCU                       - Microcontroller device model name
-#    SRC                       - List of input source files (*.c, *.cpp, *.S)
-#    F_USB                     - Speed of the input clock of the USB controller
-#                                in Hz
-#    LUFA_PATH                 - Path to the LUFA library core
-#
-# OPTIONAL PARAMETERS:
-#
-#    BOARD                     - LUFA board hardware
-#    OPTIMIZATION              - Optimization level
-#    C_STANDARD                - C Language Standard to use
-#    CPP_STANDARD              - C++ Language Standard to use
-#    F_CPU                     - Speed of the CPU, in Hz
-#    C_FLAGS                   - Flags to pass to the C compiler only
-#    CPP_FLAGS                 - Flags to pass to the C++ compiler only
-#    ASM_FLAGS                 - Flags to pass to the assembler only
-#    CC_FLAGS                  - Common flags to pass to the C/C++ compiler and
-#                                assembler
-#    LD_FLAGS                  - Flags to pass to the linker
-#    LINKER_RELAXATIONS        - Enable or disable linker relaxations to
-#                                decrease binary size (note: can cause link
-#                                failures on systems with an unpatched binutils)
-#    OBJDIR                    - Directory for the output object and dependency
-#                                files; if equal to ".", the output files will
-#                                be generated in the same folder as the sources
-#    OBJECT_FILES              - Extra object files to link in to the binaries
-#    DEBUG_FORMAT              - Format of the debugging information to
-#                                generate in the compiled object files
-#    DEBUG_LEVEL               - Level the debugging information to generate in
-#                                the compiled object files
-#    COMPILER_PATH             - Location of the GCC toolchain to use
-#
-# PROVIDED VARIABLES:
-#
-#    (None)
-#
-# PROVIDED MACROS:
-#
-#    (None)
-#
-# -----------------------------------------------------------------------------
-
-SHELL = /bin/sh
+DMBS_BUILD_MODULES         +=
+DMBS_BUILD_TARGETS         +=
+DMBS_BUILD_MANDATORY_VARS  += F_USB
+DMBS_BUILD_OPTIONAL_VARS   += BOARD
+DMBS_BUILD_PROVIDED_VARS   +=
+DMBS_BUILD_PROVIDED_MACROS +=
 
 ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
 ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
 ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
 
-# Default values of optionally user-supplied variables
-COMPILER_PATH      ?=
-BOARD              ?= NONE
-OPTIMIZATION       ?= s
-F_CPU              ?=
-C_STANDARD         ?= gnu99
-CPP_STANDARD       ?= gnu++98
-C_FLAGS            ?=
-CPP_FLAGS          ?=
-ASM_FLAGS          ?=
-CC_FLAGS           ?=
-OBJDIR             ?= .
-OBJECT_FILES       ?=
-DEBUG_FORMAT       ?= dwarf-2
-DEBUG_LEVEL        ?= 2
-LINKER_RELAXATIONS ?= Y
-
 # Sanity check user supplied values
-$(foreach MANDATORY_VAR, $(LUFA_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
-$(call ERROR_IF_EMPTY, MCU)
-$(call ERROR_IF_EMPTY, TARGET)
 $(call ERROR_IF_EMPTY, ARCH)
 $(call ERROR_IF_EMPTY, F_USB)
-$(call ERROR_IF_EMPTY, LUFA_PATH)
-$(call ERROR_IF_EMPTY, BOARD)
-$(call ERROR_IF_EMPTY, OPTIMIZATION)
-$(call ERROR_IF_EMPTY, C_STANDARD)
-$(call ERROR_IF_EMPTY, CPP_STANDARD)
-$(call ERROR_IF_EMPTY, OBJDIR)
-$(call ERROR_IF_EMPTY, DEBUG_FORMAT)
-$(call ERROR_IF_EMPTY, DEBUG_LEVEL)
-$(call ERROR_IF_NONBOOL, LINKER_RELAXATIONS)
+
+# Default values of optionally user-supplied variables
+BOARD ?= NONE
 
 # Determine the utility prefix to use for the selected architecture
-ifeq ($(ARCH), AVR8)
-   CROSS        := $(COMPILER_PATH)avr
-else ifeq ($(ARCH), XMEGA)
-   CROSS        := $(COMPILER_PATH)avr
+ifeq ($(ARCH), XMEGA)
    $(warning The XMEGA device support is currently EXPERIMENTAL (incomplete and/or non-functional), and is included for preview purposes only.)
 else ifeq ($(ARCH), UC3)
-   CROSS        := $(COMPILER_PATH)avr32
    $(warning The UC3 device support is currently EXPERIMENTAL (incomplete and/or non-functional), and is included for preview purposes only.)
-else
-   $(error Unsupported architecture "$(ARCH)")
-endif
-
-# Output Messages
-MSG_INFO_MESSAGE := ' [INFO]    :'
-MSG_COMPILE_CMD  := ' [GCC]     :'
-MSG_ASSEMBLE_CMD := ' [GAS]     :'
-MSG_NM_CMD       := ' [NM]      :'
-MSG_REMOVE_CMD   := ' [RM]      :'
-MSG_LINK_CMD     := ' [LNK]     :'
-MSG_ARCHIVE_CMD  := ' [AR]      :'
-MSG_SIZE_CMD     := ' [SIZE]    :'
-MSG_OBJCPY_CMD   := ' [OBJCPY]  :'
-MSG_OBJDMP_CMD   := ' [OBJDMP]  :'
-
-# Convert input source file list to differentiate them by type
-C_SOURCE   := $(filter %.c, $(SRC))
-CPP_SOURCE := $(filter %.cpp, $(SRC))
-ASM_SOURCE := $(filter %.S, $(SRC))
-
-# Create a list of unknown source file types, if any are found throw an error
-UNKNOWN_SOURCE := $(filter-out $(C_SOURCE) $(CPP_SOURCE) $(ASM_SOURCE), $(SRC))
-ifneq ($(UNKNOWN_SOURCE),)
-   $(error Unknown input source file formats: $(UNKNOWN_SOURCE))
 endif
 
-# Convert input source filenames into a list of required output object files
-OBJECT_FILES += $(addsuffix .o, $(basename $(SRC)))
-
-# Check if an output object file directory was specified instead of the input file location
-ifneq ($(OBJDIR),.)
-   # Prefix all the object filenames with the output object file directory path
-   OBJECT_FILES    := $(addprefix $(patsubst %/,%,$(OBJDIR))/, $(notdir $(OBJECT_FILES)))
-
-   # Check if any object file (without path) appears more than once in the object file list
-   ifneq ($(words $(sort $(OBJECT_FILES))), $(words $(OBJECT_FILES)))
-       $(error Cannot build with OBJDIR parameter set - one or more object file name is not unique)
-   endif
-
-   # Create the output object file directory if it does not exist and add it to the virtual path list
-   $(shell mkdir $(OBJDIR) 2> /dev/null)
-   VPATH           += $(dir $(SRC))
-endif
-
-# Create a list of dependency files from the list of object files
-DEPENDENCY_FILES := $(OBJECT_FILES:%.o=%.d)
-
-# Create a list of common flags to pass to the compiler/linker/assembler
-BASE_CC_FLAGS    := -pipe -g$(DEBUG_FORMAT) -g$(DEBUG_LEVEL)
-ifeq ($(ARCH), AVR8)
-   BASE_CC_FLAGS += -mmcu=$(MCU) -fshort-enums -fno-inline-small-functions -fpack-struct
-else ifeq ($(ARCH), XMEGA)
-   BASE_CC_FLAGS += -mmcu=$(MCU) -fshort-enums -fno-inline-small-functions -fpack-struct
-else ifeq ($(ARCH), UC3)
-   BASE_CC_FLAGS += -mpart=$(MCU:at32%=%) -masm-addr-pseudos
-endif
-BASE_CC_FLAGS += -Wall -fno-strict-aliasing -funsigned-char -funsigned-bitfields -ffunction-sections
-BASE_CC_FLAGS += -I. -I$(patsubst %/,%,$(LUFA_PATH))/..
-BASE_CC_FLAGS += -DARCH=ARCH_$(ARCH) -DBOARD=BOARD_$(BOARD) -DF_USB=$(F_USB)UL
-ifneq ($(F_CPU),)
-   BASE_CC_FLAGS += -DF_CPU=$(F_CPU)UL
-endif
-ifeq ($(LINKER_RELAXATIONS), Y)
-BASE_CC_FLAGS += -mrelax
-endif
+# LUFA specific standard build options
+C_FLAGS += -I. -I$(patsubst %/,%,$(LUFA_PATH))/..
+C_FLAGS += -DARCH=ARCH_$(ARCH) -DBOARD=BOARD_$(BOARD) -DF_USB=$(F_USB)UL
 
 # This flag is required for bootloaders as GCC will emit invalid jump table
 # assembly code for devices with large amounts of flash; the jump table target
 # is extracted from FLASH without using the correct ELPM instruction, resulting
 # in a pseudo-random jump target.
-BASE_CC_FLAGS += -fno-jump-tables
-
-# Additional language specific compiler flags
-BASE_C_FLAGS   := -x c -O$(OPTIMIZATION) -std=$(C_STANDARD) -Wstrict-prototypes
-BASE_CPP_FLAGS := -x c++ -O$(OPTIMIZATION) -std=$(CPP_STANDARD)
-BASE_ASM_FLAGS := -x assembler-with-cpp
-
-# Create a list of flags to pass to the linker
-BASE_LD_FLAGS := -lm -Wl,-Map=$(TARGET).map,--cref -Wl,--gc-sections
-ifeq ($(LINKER_RELAXATIONS), Y)
-   BASE_LD_FLAGS += -Wl,--relax
-endif
-ifeq ($(ARCH), AVR8)
-   BASE_LD_FLAGS += -mmcu=$(MCU)
-else ifeq ($(ARCH), XMEGA)
-   BASE_LD_FLAGS += -mmcu=$(MCU)
-else ifeq ($(ARCH), UC3)
-   BASE_LD_FLAGS += -mpart=$(MCU:at32%=%) --rodata-writable --direct-data
-endif
-
-# Determine flags to pass to the size utility based on its reported features (only invoke if size target required)
-# and on an architecture where this non-standard patch is available
-ifneq ($(ARCH), UC3)
-size: SIZE_MCU_FLAG    := $(shell $(CROSS)-size --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
-size: SIZE_FORMAT_FLAG := $(shell $(CROSS)-size --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
-endif
-
-# Pre-build informational target, to give compiler and project name information when building
-build_begin:
-	@echo $(MSG_INFO_MESSAGE) Begin compilation of project \"$(TARGET)\"...
-	@echo ""
-	@$(CROSS)-gcc --version
-
-# Post-build informational target, to project name information when building has completed
-build_end:
-	@echo $(MSG_INFO_MESSAGE) Finished building project \"$(TARGET)\".
-
-# Prints size information of a compiled application (FLASH, RAM and EEPROM usages)
-size: $(TARGET).elf
-	@echo $(MSG_SIZE_CMD) Determining size of \"$<\"
-	@echo ""
-	$(CROSS)-size $(SIZE_MCU_FLAG) $(SIZE_FORMAT_FLAG) $<
-
-# Prints size information on the symbols within a compiled application in decimal bytes
-symbol-sizes: $(TARGET).elf
-	@echo $(MSG_NM_CMD) Extracting \"$<\" symbols with decimal byte sizes
-	$(CROSS)-nm --size-sort --demangle --radix=d $<
-
-# Cleans intermediary build files, leaving only the compiled application files
-mostlyclean:
-	@echo $(MSG_REMOVE_CMD) Removing object files of \"$(TARGET)\"
-	rm -f $(OBJECT_FILES)
-	@echo $(MSG_REMOVE_CMD) Removing dependency files of \"$(TARGET)\"
-	rm -f $(DEPENDENCY_FILES)
-
-# Cleans all build files, leaving only the original source code
-clean: mostlyclean
-	@echo $(MSG_REMOVE_CMD) Removing output files of \"$(TARGET)\"
-	rm -f $(TARGET).elf $(TARGET).hex $(TARGET).bin $(TARGET).eep $(TARGET).map $(TARGET).lss $(TARGET).sym lib$(TARGET).a
-
-# Performs a complete build of the user application and prints size information afterwards
-all: build_begin elf hex bin lss sym size build_end
-
-# Helper targets, to build a specific type of output file without having to know the project target name
-lib: lib$(TARGET).a
-elf: $(TARGET).elf
-hex: $(TARGET).hex $(TARGET).eep
-bin: $(TARGET).bin
-lss: $(TARGET).lss
-sym: $(TARGET).sym
-
-# Default target to *create* the user application's specified source files; if this rule is executed by
-# make, the input source file doesn't exist and an error needs to be presented to the user
-$(SRC):
-	$(error Source file does not exist: $@)
-
-# Compiles an input C source file and generates an assembly listing for it
-%.s: %.c $(MAKEFILE_LIST)
-	@echo $(MSG_COMPILE_CMD) Generating assembly from C file \"$(notdir $<)\"
-	$(CROSS)-gcc -S $(BASE_CC_FLAGS) $(BASE_C_FLAGS) $(CC_FLAGS) $(C_FLAGS) $< -o $@
-
-# Compiles an input C++ source file and generates an assembly listing for it
-%.s: %.cpp $(MAKEFILE_LIST)
-	@echo $(MSG_COMPILE_CMD) Generating assembly from C++ file \"$(notdir $<)\"
-	$(CROSS)-gcc -S $(BASE_CC_FLAGS) $(BASE_CPP_FLAGS) $(CC_FLAGS) $(CPP_FLAGS) $< -o $@
-
-# Compiles an input C source file and generates a linkable object file for it
-$(OBJDIR)/%.o: %.c $(MAKEFILE_LIST)
-	@echo $(MSG_COMPILE_CMD) Compiling C file \"$(notdir $<)\"
-	$(CROSS)-gcc -c $(BASE_CC_FLAGS) $(BASE_C_FLAGS) $(CC_FLAGS) $(C_FLAGS) -MMD -MP -MF $(@:%.o=%.d) $< -o $@
-
-# Compiles an input C++ source file and generates a linkable object file for it
-$(OBJDIR)/%.o: %.cpp $(MAKEFILE_LIST)
-	@echo $(MSG_COMPILE_CMD) Compiling C++ file \"$(notdir $<)\"
-	$(CROSS)-gcc -c $(BASE_CC_FLAGS) $(BASE_CPP_FLAGS) $(CC_FLAGS) $(CPP_FLAGS) -MMD -MP -MF $(@:%.o=%.d) $< -o $@
-
-# Assembles an input ASM source file and generates a linkable object file for it
-$(OBJDIR)/%.o: %.S $(MAKEFILE_LIST)
-	@echo $(MSG_ASSEMBLE_CMD) Assembling \"$(notdir $<)\"
-	$(CROSS)-gcc -c $(BASE_CC_FLAGS) $(BASE_ASM_FLAGS) $(CC_FLAGS) $(ASM_FLAGS) -MMD -MP -MF $(@:%.o=%.d) $< -o $@
-
-# Generates a library archive file from the user application, which can be linked into other applications
-.PRECIOUS  : $(OBJECT_FILES)
-.SECONDARY : %.a
-%.a: $(OBJECT_FILES)
-	@echo $(MSG_ARCHIVE_CMD) Archiving object files into \"$@\"
-	$(CROSS)-ar rcs $@ $(OBJECT_FILES)
-
-# Generates an ELF debug file from the user application, which can be further processed for FLASH and EEPROM data
-# files, or used for programming and debugging directly
-.PRECIOUS  : $(OBJECT_FILES)
-.SECONDARY : %.elf
-%.elf: $(OBJECT_FILES)
-	@echo $(MSG_LINK_CMD) Linking object files into \"$@\"
-	$(CROSS)-gcc $^ -o $@ $(BASE_LD_FLAGS) $(LD_FLAGS)
-
-# Extracts out the loadable FLASH memory data from the project ELF file, and creates an Intel HEX format file of it
-%.hex: %.elf
-	@echo $(MSG_OBJCPY_CMD) Extracting HEX file data from \"$<\"
-	$(CROSS)-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature $< $@
-
-# Extracts out the loadable FLASH memory data from the project ELF file, and creates an Binary format file of it
-%.bin: %.elf
-	@echo $(MSG_OBJCPY_CMD) Extracting BIN file data from \"$<\"
-	$(CROSS)-objcopy -O binary -R .eeprom -R .fuse -R .lock -R .signature $< $@
-
-# Extracts out the loadable EEPROM memory data from the project ELF file, and creates an Intel HEX format file of it
-%.eep: %.elf
-	@echo $(MSG_OBJCPY_CMD) Extracting EEP file data from \"$<\"
-	$(CROSS)-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings $< $@ || exit 0
-
-# Creates an assembly listing file from an input project ELF file, containing interleaved assembly and source data
-%.lss: %.elf
-	@echo $(MSG_OBJDMP_CMD) Extracting LSS file data from \"$<\"
-	$(CROSS)-objdump -h -d -S -z $< > $@
-
-# Creates a symbol file listing the loadable and discarded symbols from an input project ELF file
-%.sym: %.elf
-	@echo $(MSG_NM_CMD) Extracting SYM file data from \"$<\"
-	$(CROSS)-nm -n $< > $@
-
-# Include build dependency files
--include $(DEPENDENCY_FILES)
+C_FLAGS += -fno-jump-tables
 
-# Phony build targets for this module
-.PHONY: build_begin build_end size symbol-sizes lib elf hex lss clean mostlyclean
+DMBS_PATH := $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/gcc.mk
diff --git a/LUFA/Build/lufa_core.mk b/LUFA/Build/lufa_core.mk
index 3067845e7..62cef9046 100644
--- a/LUFA/Build/lufa_core.mk
+++ b/LUFA/Build/lufa_core.mk
@@ -6,170 +6,5 @@
 #           www.lufa-lib.org
 #
 
-LUFA_BUILD_MODULES         += CORE
-LUFA_BUILD_TARGETS         += help list_targets list_modules list_mandatory list_optional list_provided list_macros
-LUFA_BUILD_MANDATORY_VARS  +=
-LUFA_BUILD_OPTIONAL_VARS   +=
-LUFA_BUILD_PROVIDED_VARS   +=
-LUFA_BUILD_PROVIDED_MACROS +=
-
-# -----------------------------------------------------------------------------
-#               LUFA Core Build System Makefile Module.
-# -----------------------------------------------------------------------------
-# DESCRIPTION:
-#   Provides a set of core build targets for the LUFA build system
-# -----------------------------------------------------------------------------
-# TARGETS:
-#
-#    help                      - Build system help
-#    list_targets              - List all build targets
-#    list_modules              - List all build modules
-#    list_mandatory            - List all mandatory make variables required by
-#                                the included build modules of the application
-#    list_optional             - List all optional make variables required by
-#                                the included build modules of the application
-#    list_provided             - List all provided make variables from the
-#                                included build modules of the application
-#    list_macros               - List all provided make macros from the
-#                                included build modules of the application
-#
-# MANDATORY PARAMETERS:
-#
-#    (None)
-#
-# OPTIONAL PARAMETERS:
-#
-#    (None)
-#
-# PROVIDED VARIABLES:
-#
-#    (None)
-#
-# PROVIDED MACROS:
-#
-#    (None)
-#
-# -----------------------------------------------------------------------------
-
-SHELL = /bin/sh
-
-# Converts a given input to a printable output using "(None)" if no items are in the list
-CONVERT_TO_PRINTABLE           = $(if $(strip $(1)), $(1), (None))
-
-
-# Build sorted and filtered lists of the included build module data
-SORTED_LUFA_BUILD_MODULES      = $(sort $(LUFA_BUILD_MODULES))
-SORTED_LUFA_BUILD_TARGETS      = $(sort $(LUFA_BUILD_TARGETS))
-SORTED_LUFA_MANDATORY_VARS     = $(sort $(LUFA_BUILD_MANDATORY_VARS))
-SORTED_LUFA_OPTIONAL_VARS      = $(filter-out $(SORTED_LUFA_MANDATORY_VARS), $(sort $(LUFA_BUILD_OPTIONAL_VARS)))
-SORTED_LUFA_PROVIDED_VARS      = $(sort $(LUFA_BUILD_PROVIDED_VARS))
-SORTED_LUFA_PROVIDED_MACROS    = $(sort $(LUFA_BUILD_PROVIDED_MACROS))
-
-# Create printable versions of the sorted build module data (use "(None)" when no data is available)
-PRINTABLE_LUFA_BUILD_MODULES   = $(call CONVERT_TO_PRINTABLE, $(SORTED_LUFA_BUILD_MODULES))
-PRINTABLE_LUFA_BUILD_TARGETS   = $(call CONVERT_TO_PRINTABLE, $(SORTED_LUFA_BUILD_TARGETS))
-PRINTABLE_LUFA_MANDATORY_VARS  = $(call CONVERT_TO_PRINTABLE, $(SORTED_LUFA_MANDATORY_VARS))
-PRINTABLE_LUFA_OPTIONAL_VARS   = $(call CONVERT_TO_PRINTABLE, $(SORTED_LUFA_OPTIONAL_VARS))
-PRINTABLE_LUFA_PROVIDED_VARS   = $(call CONVERT_TO_PRINTABLE, $(SORTED_LUFA_PROVIDED_VARS))
-PRINTABLE_LUFA_PROVIDED_MACROS = $(call CONVERT_TO_PRINTABLE, $(SORTED_LUFA_PROVIDED_MACROS))
-
-help:
-	@echo "==================================================================="
-	@echo "                       LUFA Build System 2.0                       "
-	@echo "      (C) Dean Camera, 2015 { dean @ fourwalledcubicle . com }     "
-	@echo "==================================================================="
-	@echo "DESCRIPTION:                                                       "
-	@echo " This build system is a set of makefile modules for (GNU) Make, to "
-	@echo " provide a simple system for building LUFA powered applications.   "
-	@echo " Each makefile module can be included from within a user makefile, "
-	@echo " to expose the build rules documented in the comments at the top of"
-	@echo " each build module.                                                "
-	@echo "                                                                   "
-	@echo "USAGE:                                                             "
-	@echo " To execute a rule, define all variables indicated in the desired  "
-	@echo " module as a required parameter before including the build module  "
-	@echo " in your project makefile. Parameters marked as optional will      "
-	@echo " assume a default value in the modules if not user-assigned.       "
-	@echo "                                                                   "
-	@echo " By default the target output shows both a friendly summary, as    "
-	@echo " well as the actual invoked command. To suppress the output of the "
-	@echo " invoked commands and show only the friendly command output, run   "
-	@echo " make with the \"-s\" switch added before the target(s).           "
-	@echo "                                                                   "
-	@echo "SEE ALSO:                                                          "
-	@echo " For more information, see the 'Build System' chapter of the LUFA  "
-	@echo " project documentation.                                            "
-	@echo "==================================================================="
-	@echo "                                                                   "
-	@echo "  Currently used build system modules in this application:         "
-	@echo "                                                                   "
-	@printf " %b" "$(PRINTABLE_LUFA_BUILD_MODULES:%=   - %\n)"
-	@echo "                                                                   "
-	@echo "                                                                   "
-	@echo "  Currently available build targets in this application:           "
-	@echo "                                                                   "
-	@printf " %b" "$(PRINTABLE_LUFA_BUILD_TARGETS:%=   - %\n)"
-	@echo "                                                                   "
-	@echo "                                                                   "
-	@echo "  Mandatory variables required by the selected build Modules:      "
-	@echo "                                                                   "
-	@printf " %b" "$(PRINTABLE_LUFA_MANDATORY_VARS:%=   - %\n)"
-	@echo "                                                                   "
-	@echo "                                                                   "
-	@echo "  Optional variables required by the selected build Modules:       "
-	@echo "                                                                   "
-	@printf " %b" "$(PRINTABLE_LUFA_OPTIONAL_VARS:%=   - %\n)"
-	@echo "                                                                   "
-	@echo "                                                                   "
-	@echo "  Variables provided by the selected build Modules:                "
-	@echo "                                                                   "
-	@printf " %b" "$(PRINTABLE_LUFA_PROVIDED_VARS:%=   - %\n)"
-	@echo "                                                                   "
-	@echo "                                                                   "
-	@echo "  Macros provided by the selected build Modules:                   "
-	@echo "                                                                   "
-	@printf " %b" "$(PRINTABLE_LUFA_PROVIDED_MACROS:%=   - %\n)"
-	@echo "                                                                   "
-	@echo "==================================================================="
-	@echo "   The LUFA BuildSystem 2.0 - Powered By Positive Thinking (tm)    "
-	@echo "==================================================================="
-
-# Lists build modules included by the project makefile, in alphabetical order
-list_modules:
-	@echo Currently Used Build System Modules:
-	@printf " %b" "$(PRINTABLE_LUFA_BUILD_MODULES:%=   - %\n)"
-
-# Lists build targets included by the project makefile, in alphabetical order
-list_targets:
-	@echo Currently Available Build Targets:
-	@printf " %b" "$(PRINTABLE_LUFA_BUILD_TARGETS:%=   - %\n)"
-
-# Lists mandatory variables that must be set by the project makefile, in alphabetical order
-list_mandatory:
-	@echo Mandatory Variables for Included Modules:
-	@printf " %b" "$(PRINTABLE_LUFA_MANDATORY_VARS:%=   - %\n)"
-
-# Lists optional variables that must be set by the project makefile, in alphabetical order
-list_optional:
-	@echo Optional Variables for Included Modules:
-	@printf " %b" "$(PRINTABLE_LUFA_OPTIONAL_VARS:%=   - %\n)"
-
-# Lists variables provided by the included build modules, in alphabetical order
-list_provided:
-	@echo Variables Provided by the Included Modules:
-	@printf " %b" "$(PRINTABLE_LUFA_PROVIDED_VARS:%=   - %\n)"
-
-# Lists macros provided by the included build modules, in alphabetical order
-list_macros:
-	@echo Macros Provided by the Included Modules:
-	@printf " %b" "$(PRINTABLE_LUFA_PROVIDED_MACROS:%=   - %\n)"
-
-# Disable default in-built make rules (those that are needed are explicitly
-# defined, and doing so has performance benefits when recursively building)
-ifeq ($(filter -r,$(MAKEFLAGS)),)
-  MAKEFLAGS += -r
-endif
-.SUFFIXES:
-
-# Phony build targets for this module
-.PHONY: help list_modules list_targets list_mandatory list_optional list_provided list_macros
+DMBS_PATH := $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
diff --git a/LUFA/Build/lufa_cppcheck.mk b/LUFA/Build/lufa_cppcheck.mk
index b96232338..801a4c15c 100644
--- a/LUFA/Build/lufa_cppcheck.mk
+++ b/LUFA/Build/lufa_cppcheck.mk
@@ -6,102 +6,5 @@
 #           www.lufa-lib.org
 #
 
-LUFA_BUILD_MODULES         += CPPCHECK
-LUFA_BUILD_TARGETS         += cppcheck cppcheck-config
-LUFA_BUILD_MANDATORY_VARS  += SRC
-LUFA_BUILD_OPTIONAL_VARS   += CPPCHECK_INCLUDES CPPCHECK_EXCLUDES CPPCHECK_MSG_TEMPLATE CPPCHECK_ENABLE \
-                              CPPCHECK_SUPPRESS CPPCHECK_FAIL_ON_WARNING CPPCHECK_QUIET CPPCHECK_FLAGS
-LUFA_BUILD_PROVIDED_VARS   +=
-LUFA_BUILD_PROVIDED_MACROS +=
-
-# -----------------------------------------------------------------------------
-#                LUFA CPPCheck Buildsystem Makefile Module.
-# -----------------------------------------------------------------------------
-# DESCRIPTION:
-#   Provides a set of targets to scan a project with the free "cppcheck" static
-#   analysis tool, to check for code errors at runtime
-#   (see http://cppcheck.sourceforge.net).
-# -----------------------------------------------------------------------------
-# TARGETS:
-#
-#    cppcheck                  - Scan the project with CPPCheck
-#    cppcheck-config           - Use CPPCheck to look for missing include files
-#
-# MANDATORY PARAMETERS:
-#
-#    SRC                       - List of source files to statically analyze
-#
-# OPTIONAL PARAMETERS:
-#
-#    CPPCHECK_INCLUDES         - Extra include paths to search for missing
-#                                header files
-#    CPPCHECK_EXCLUDES         - Source file paths to exclude checking (can be
-#                                a path fragment if desired)
-#    CPPCHECK_MSG_TEMPLATE     - Template for cppcheck error and warning output
-#    CPPCHECK_ENABLE           - General cppcheck category checks to enable
-#    CPPCHECK_SUPPRESS         - Specific cppcheck warnings to disable by ID
-#    CPPCHECK_FAIL_ON_WARNING  - Set to Y to fail the build on cppcheck
-#                                warnings, N to continue even if warnings occur
-#    CPPCHECK_QUIET            - Enable cppcheck verbose or quiet output mode
-#    CPPCHECK_FLAGS            - Additional flags to pass to cppcheck
-#
-# PROVIDED VARIABLES:
-#
-#    (None)
-#
-# PROVIDED MACROS:
-#
-#    (None)
-#
-# -----------------------------------------------------------------------------
-
-SHELL = /bin/sh
-
-ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
-ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
-ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
-
-# Default values of optionally user-supplied variables
-CPPCHECK_INCLUDES            ?=
-CPPCHECK_EXCLUDES            ?=
-CPPCHECK_MSG_TEMPLATE        ?= {file}:{line}: {severity} ({id}): {message}
-CPPCHECK_ENABLE              ?= all
-CPPCHECK_SUPPRESS            ?= variableScope missingInclude
-CPPCHECK_FAIL_ON_WARNING     ?= Y
-CPPCHECK_QUIET               ?= Y
-CPPCHECK_FLAGS               ?=
-
-# Sanity check user supplied values
-$(foreach MANDATORY_VAR, $(LUFA_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
-$(call ERROR_IF_EMPTY, SRC)
-$(call ERROR_IF_EMPTY, CPPCHECK_MSG_TEMPLATE)
-$(call ERROR_IF_EMPTY, CPPCHECK_ENABLE)
-$(call ERROR_IF_NONBOOL, CPPCHECK_FAIL_ON_WARNING)
-$(call ERROR_IF_NONBOOL, CPPCHECK_QUIET)
-
-# Build a default argument list for cppcheck
-BASE_CPPCHECK_FLAGS := --template="$(CPPCHECK_MSG_TEMPLATE)" $(CPPCHECK_INCLUDES:%=-I%) $(CPPCHECK_EXCLUDES:%=-i%) --inline-suppr --force --std=c99
-
-# Sanity check parameters and construct additional command line arguments to cppcheck
-ifeq ($(CPPCHECK_FAIL_ON_WARNING), Y)
-   BASE_CPPCHECK_FLAGS += --error-exitcode=1
-endif
-ifeq ($(CPPCHECK_QUIET), Y)
-   BASE_CPPCHECK_FLAGS += --quiet
-endif
-
-# Output Messages
-MSG_CPPCHECK_CMD         := ' [CPPCHECK]:'
-
-# Checks the CPPCheck configuration as used in the user project, to determine if any paths are missing or invalid
-cppcheck-config: $(MAKEFILE_LIST)
-	@echo $(MSG_CPPCHECK_CMD) Checking cppcheck configuration check on source files
-	cppcheck $(BASE_CPPCHECK_FLAGS) --check-config $(CPPCHECK_FLAGS) $(SRC)
-
-# Runs a static analysis using CPPCheck to determine if there are any issues
-cppcheck: $(MAKEFILE_LIST)
-	@echo $(MSG_CPPCHECK_CMD) Performing static analysis on source files
-	cppcheck $(BASE_CPPCHECK_FLAGS) --enable=$(CPPCHECK_ENABLE) $(CPPCHECK_SUPPRESS:%=--suppress=%) $(CPPCHECK_FLAGS) $(SRC)
-
-# Phony build targets for this module
-.PHONY: cppcheck-config cppcheck
+DMBS_PATH := $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/cppcheck.mk
diff --git a/LUFA/Build/lufa_dfu.mk b/LUFA/Build/lufa_dfu.mk
index b19df057e..2100ae8f7 100644
--- a/LUFA/Build/lufa_dfu.mk
+++ b/LUFA/Build/lufa_dfu.mk
@@ -6,90 +6,5 @@
 #           www.lufa-lib.org
 #
 
-LUFA_BUILD_MODULES         += DFU
-LUFA_BUILD_TARGETS         += flip flip-ee dfu dfu-ee
-LUFA_BUILD_MANDATORY_VARS  += MCU TARGET
-LUFA_BUILD_OPTIONAL_VARS   +=
-LUFA_BUILD_PROVIDED_VARS   +=
-LUFA_BUILD_PROVIDED_MACROS +=
-
-# -----------------------------------------------------------------------------
-#               LUFA DFU Bootloader Buildsystem Makefile Module.
-# -----------------------------------------------------------------------------
-# DESCRIPTION:
-#   Provides a set of targets to re-program a device currently running a DFU
-#   class bootloader with a project's FLASH and EEPROM files.
-# -----------------------------------------------------------------------------
-# TARGETS:
-#
-#    flip                      - Program FLASH into target via Atmel FLIP
-#    flip-ee                   - Program EEPROM into target via Atmel FLIP
-#    dfu                       - Program FLASH into target via dfu-programmer
-#    dfu-ee                    - Program EEPROM into target via dfu-programmer
-#
-# MANDATORY PARAMETERS:
-#
-#    MCU                       - Microcontroller device model name
-#    TARGET                    - Application name
-#
-# OPTIONAL PARAMETERS:
-#
-#    (None)
-#
-# PROVIDED VARIABLES:
-#
-#    (None)
-#
-# PROVIDED MACROS:
-#
-#    (None)
-#
-# -----------------------------------------------------------------------------
-
-SHELL = /bin/sh
-
-ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
-ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
-ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
-
-# Sanity-check values of mandatory user-supplied variables
-$(foreach MANDATORY_VAR, $(LUFA_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
-$(call ERROR_IF_EMPTY, MCU)
-$(call ERROR_IF_EMPTY, TARGET)
-
-# Output Messages
-MSG_COPY_CMD   := ' [CP]      :'
-MSG_REMOVE_CMD := ' [RM]      :'
-MSG_DFU_CMD    := ' [DFU]     :'
-
-# Programs in the target FLASH memory using BATCHISP, the command line tool used by FLIP
-flip: $(TARGET).hex $(MAKEFILE_LIST)
-	@echo $(MSG_DFU_CMD) Programming FLASH with batchisp using \"$<\"
-	batchisp -hardware usb -device $(MCU) -operation erase f loadbuffer $< program
-	batchisp -hardware usb -device $(MCU) -operation start reset 0
-
-# Programs in the target EEPROM memory using BATCHISP, the command line tool used by FLIP
-flip-ee: $(TARGET).eep $(MAKEFILE_LIST)
-	@echo $(MSG_COPY_CMD) Copying EEP file to temporary file \"$<.hex\"
-	cp $< $<.hex
-	@echo $(MSG_DFU_CMD) Programming EEPROM with batchisp using \"$<.hex\"
-	batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $<.hex program
-	batchisp -hardware usb -device $(MCU) -operation start reset 0
-	@echo $(MSG_REMOVE_CMD) Removing temporary file \"$<.hex\"
-	rm $<.hex
-
-# Programs in the target FLASH memory using DFU-PROGRAMMER
-dfu: $(TARGET).hex $(MAKEFILE_LIST)
-	@echo $(MSG_DFU_CMD) Programming FLASH with dfu-programmer using \"$<\"
-	dfu-programmer $(MCU) erase
-	dfu-programmer $(MCU) flash $<
-	dfu-programmer $(MCU) reset
-
-# Programs in the target EEPROM memory using DFU-PROGRAMMER
-dfu-ee: $(TARGET).eep $(MAKEFILE_LIST)
-	@echo $(MSG_DFU_CMD) Programming EEPROM with dfu-programmer using \"$<\"
-	dfu-programmer $(MCU) flash --eeprom $<
-	dfu-programmer $(MCU) reset
-
-# Phony build targets for this module
-.PHONY: flip flip-ee dfu dfu-ee
+DMBS_PATH := $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/dfu.mk
diff --git a/LUFA/Build/lufa_doxygen.mk b/LUFA/Build/lufa_doxygen.mk
index c2c516f92..64afd4a5a 100644
--- a/LUFA/Build/lufa_doxygen.mk
+++ b/LUFA/Build/lufa_doxygen.mk
@@ -6,95 +6,5 @@
 #           www.lufa-lib.org
 #
 
-LUFA_BUILD_MODULES         += DOXYGEN
-LUFA_BUILD_TARGETS         += doxygen doxygen_upgrade doxygen_create
-LUFA_BUILD_MANDATORY_VARS  += LUFA_PATH
-LUFA_BUILD_OPTIONAL_VARS   += DOXYGEN_CONF DOXYGEN_FAIL_ON_WARNING DOXYGEN_OVERRIDE_PARAMS
-LUFA_BUILD_PROVIDED_VARS   +=
-LUFA_BUILD_PROVIDED_MACROS +=
-
-# -----------------------------------------------------------------------------
-#                 LUFA Doxygen Buildsystem Makefile Module.
-# -----------------------------------------------------------------------------
-# DESCRIPTION:
-#   Provides a set of targets to automatically build Doxygen documentation for
-#   a project (see www.doxygen.org).
-# -----------------------------------------------------------------------------
-# TARGETS:
-#
-#    doxygen                   - Build Doxygen Documentation
-#    doxygen_create            - Create a new Doxygen configuration file using
-#                                the latest template
-#    doxygen_upgrade           - Upgrade an existing Doxygen configuration file
-#                                to the latest template
-#
-# MANDATORY PARAMETERS:
-#
-#    LUFA_PATH                 - Path to the LUFA library core
-#
-# OPTIONAL PARAMETERS:
-#
-#    DOXYGEN_CONF              - Doxygen configuration filename
-#    DOXYGEN_FAIL_ON_WARNING   - Set to Y to fail the build on Doxygen warnings,
-#                                N to continue even if warnings occur
-#    DOXYGEN_OVERRIDE_PARAMS   - Parameters to override in the doxygen
-#                                configuration file
-# PROVIDED VARIABLES:
-#
-#    (None)
-#
-# PROVIDED MACROS:
-#
-#    (None)
-#
-# -----------------------------------------------------------------------------
-
-SHELL = /bin/sh
-
-ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
-ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
-ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
-
-# Default values of optionally user-supplied variables
-DOXYGEN_CONF            ?= doxyfile
-DOXYGEN_FAIL_ON_WARNING ?= Y
-DOXYGEN_OVERRIDE_PARAMS ?= QUIET=YES HTML_EXTRA_STYLESHEET=$(patsubst %/,%,$(LUFA_PATH))/DoxygenPages/Style/Style.css
-
-# Sanity check user supplied values
-$(foreach MANDATORY_VAR, $(LUFA_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
-$(call ERROR_IF_EMPTY, DOXYGEN_CONF)
-$(call ERROR_IF_EMPTY, LUFA_PATH)
-$(call ERROR_IF_NONBOOL, DOXYGEN_FAIL_ON_WARNING)
-
-# Output Messages
-MSG_DOXYGEN_CMD         := ' [DOXYGEN] :'
-
-# Determine Doxygen invocation command
-BASE_DOXYGEN_CMD := ( cat $(DOXYGEN_CONF) $(DOXYGEN_OVERRIDE_PARAMS:%=; echo "%") ) | doxygen -
-ifeq ($(DOXYGEN_FAIL_ON_WARNING), Y)
-   DOXYGEN_CMD := if ( $(BASE_DOXYGEN_CMD) 2>&1 | grep -v -e "[Ww]arning:\|recompile doxygen" ;); then exit 1; fi;
-else
-   DOXYGEN_CMD := $(BASE_DOXYGEN_CMD)
-endif
-
-# Error if the specified Doxygen configuration file does not exist
-$(DOXYGEN_CONF):
-	$(error Doxygen configuration file $@ does not exist)
-
-# Builds the project documentation using the specified configuration file and the DOXYGEN tool
-doxygen: $(DOXYGEN_CONF) $(MAKEFILE_LIST)
-	@echo $(MSG_DOXYGEN_CMD) Configuration file \"$(DOXYGEN_CONF)\" with parameters \"$(DOXYGEN_OVERRIDE_PARAMS)\"
-	$(DOXYGEN_CMD)
-
-# Upgrades an existing Doxygen configuration file to the latest Doxygen template, preserving settings
-doxygen_upgrade: $(DOXYGEN_CONF) $(MAKEFILE_LIST)
-	@echo $(MSG_DOXYGEN_CMD) Upgrading configuration file \"$(DOXYGEN_CONF)\" with latest template
-	doxygen -u $(DOXYGEN_CONF) > /dev/null
-
-# Creates a new Doxygen configuration file with the set file name
-doxygen_create: $(MAKEFILE_LIST)
-	@echo $(MSG_DOXYGEN_CMD) Creating new configuration file \"$(DOXYGEN_CONF)\" with latest template
-	doxygen -g $(DOXYGEN_CONF) > /dev/null
-
-# Phony build targets for this module
-.PHONY: doxygen doxygen_upgrade doxygen_create
+DMBS_PATH := $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/doxygen.mk
diff --git a/LUFA/Build/lufa_hid.mk b/LUFA/Build/lufa_hid.mk
index 32a32a83c..86ca145bf 100644
--- a/LUFA/Build/lufa_hid.mk
+++ b/LUFA/Build/lufa_hid.mk
@@ -6,91 +6,5 @@
 #           www.lufa-lib.org
 #
 
-LUFA_BUILD_MODULES         += HID
-LUFA_BUILD_TARGETS         += hid hid-ee teensy teensy-ee
-LUFA_BUILD_MANDATORY_VARS  += MCU TARGET
-LUFA_BUILD_OPTIONAL_VARS   +=
-LUFA_BUILD_PROVIDED_VARS   +=
-LUFA_BUILD_PROVIDED_MACROS +=
-
-# -----------------------------------------------------------------------------
-#               LUFA HID Bootloader Buildsystem Makefile Module.
-# -----------------------------------------------------------------------------
-# DESCRIPTION:
-#   Provides a set of targets to re-program a device currently running a HID
-#   class bootloader with a project's FLASH files.
-# -----------------------------------------------------------------------------
-# TARGETS:
-#
-#    hid                       - Program FLASH into target via
-#                                hid_bootloader_cli
-#    hid-ee                    - Program EEPROM into target via a temporary
-#                                AVR application and hid_bootloader_cli
-#    teensy                    - Program FLASH into target via
-#                                teensy_loader_cli
-#    teensy-ee                 - Program EEPROM into target via a temporary
-#                                AVR application and teensy_loader_cli
-#
-# MANDATORY PARAMETERS:
-#
-#    MCU                       - Microcontroller device model name
-#    TARGET                    - Application name
-#
-# OPTIONAL PARAMETERS:
-#
-#    (None)
-#
-# PROVIDED VARIABLES:
-#
-#    (None)
-#
-# PROVIDED MACROS:
-#
-#    (None)
-#
-# -----------------------------------------------------------------------------
-
-SHELL = /bin/sh
-
-LUFA_MODULE_PATH := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
-
-ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
-ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
-ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
-
-# Sanity-check values of mandatory user-supplied variables
-$(foreach MANDATORY_VAR, $(LUFA_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
-$(call ERROR_IF_EMPTY, MCU)
-$(call ERROR_IF_EMPTY, TARGET)
-
-# Output Messages
-MSG_HID_BOOTLOADER_CMD := ' [HID]     :'
-MSG_OBJCPY_CMD         := ' [OBJCPY]  :'
-MSG_MAKE_CMD           := ' [MAKE]    :'
-
-# Programs in the target FLASH memory using the HID_BOOTLOADER_CLI tool
-hid: $(TARGET).hex $(MAKEFILE_LIST)
-	@echo $(MSG_HID_BOOTLOADER_CMD) Programming FLASH with hid_bootloader_cli using \"$<\"
-	hid_bootloader_cli -mmcu=$(MCU) -v $<
-
-# Programs in the target EEPROM memory using the HID_BOOTLOADER_CLI tool (note: clears target FLASH memory)
-hid-ee: $(TARGET).eep $(MAKEFILE_LIST)
-	@echo $(MSG_OBJCPY_CMD) Converting \"$<\" to a binary file \"InputEEData.bin\"
-	avr-objcopy -I ihex -O binary $< $(LUFA_MODULE_PATH)/HID_EEPROM_Loader/InputEEData.bin
-	@echo $(MSG_MAKE_CMD) Making EEPROM loader application for \"$<\"
-	$(MAKE) -C $(LUFA_MODULE_PATH)/HID_EEPROM_Loader/ MCU=$(MCU) clean hid
-
-# Programs in the target FLASH memory using the TEENSY_BOOTLOADER_CLI tool
-teensy: $(TARGET).hex $(MAKEFILE_LIST)
-	@echo $(MSG_HID_BOOTLOADER_CMD) Programming FLASH with teensy_loader_cli using \"$<\"
-	teensy_loader_cli -mmcu=$(MCU) -v $<
-
-# Programs in the target EEPROM memory using the TEENSY_BOOTLOADER_CLI tool (note: clears target FLASH memory)
-teensy-ee: $(TARGET).hex $(MAKEFILE_LIST)
-	@echo $(MSG_OBJCPY_CMD) Converting \"$<\" to a binary file \"InputEEData.bin\"
-	avr-objcopy -I ihex -O binary $< $(LUFA_MODULE_PATH)/HID_EEPROM_Loader/InputEEData.bin
-	@echo $(MSG_MAKE_CMD) Making EEPROM loader application for \"$<\"
-	$(MAKE) -s -C $(LUFA_MODULE_PATH)/HID_EEPROM_Loader/ MCU=$(MCU) clean teensy
-
-# Phony build targets for this module
-.PHONY: hid hid-ee teensy teensy-ee
+DMBS_PATH := $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/hid.mk
diff --git a/LUFA/Build/lufa_sources.mk b/LUFA/Build/lufa_sources.mk
index 73a8f7fe1..ad1a47711 100644
--- a/LUFA/Build/lufa_sources.mk
+++ b/LUFA/Build/lufa_sources.mk
@@ -6,11 +6,11 @@
 #           www.lufa-lib.org
 #
 
-LUFA_BUILD_MODULES         += SOURCES
-LUFA_BUILD_TARGETS         +=
-LUFA_BUILD_MANDATORY_VARS  += LUFA_PATH ARCH
-LUFA_BUILD_OPTIONAL_VARS   +=
-LUFA_BUILD_PROVIDED_VARS   += LUFA_SRC_USB_DEVICE LUFA_SRC_USB_HOST    \
+DMBS_BUILD_MODULES         += LUFA_SOURCES
+DMBS_BUILD_TARGETS         +=
+DMBS_BUILD_MANDATORY_VARS  += LUFA_PATH ARCH
+DMBS_BUILD_OPTIONAL_VARS   +=
+DMBS_BUILD_PROVIDED_VARS   += LUFA_SRC_USB_DEVICE LUFA_SRC_USB_HOST    \
                               LUFA_SRC_USB LUFA_SRC_USBCLASS_DEVICE    \
                               LUFA_SRC_USBCLASS_HOST LUFA_SRC_USBCLASS \
                               LUFA_SRC_TEMPERATURE LUFA_SRC_SERIAL     \
-- 
cgit v1.2.3


From b590350df0cb857bca8efdbd1be9c8532008aa54 Mon Sep 17 00:00:00 2001
From: Dean Camera <dean@fourwalledcubicle.com>
Date: Tue, 22 Dec 2015 21:17:19 +1100
Subject: Clean up core build system DMBS subclass module.

---
 LUFA/Build/lufa_build.mk                   | 37 +++++++++++++++++++++++++++++-
 LUFA/Build/lufa_sources.mk                 |  2 +-
 LUFA/DoxygenPages/BuildSystem.txt          | 21 +++++++++++++----
 LUFA/DoxygenPages/MigrationInformation.txt |  2 +-
 4 files changed, 55 insertions(+), 7 deletions(-)

diff --git a/LUFA/Build/lufa_build.mk b/LUFA/Build/lufa_build.mk
index 3c41da000..1aae2a388 100644
--- a/LUFA/Build/lufa_build.mk
+++ b/LUFA/Build/lufa_build.mk
@@ -8,16 +8,51 @@
 
 DMBS_BUILD_MODULES         +=
 DMBS_BUILD_TARGETS         +=
-DMBS_BUILD_MANDATORY_VARS  += F_USB
+DMBS_BUILD_MANDATORY_VARS  += LUFA_PATH ARCH F_USB
 DMBS_BUILD_OPTIONAL_VARS   += BOARD
 DMBS_BUILD_PROVIDED_VARS   +=
 DMBS_BUILD_PROVIDED_MACROS +=
 
+# -----------------------------------------------------------------------------
+#               LUFA Core Build Buildsystem Makefile Module.
+# -----------------------------------------------------------------------------
+# DESCRIPTION:
+#   Subclass of the standard DMBS GCC build module, with LUFA specific
+#   extensions. This module provides the core build rules for the compilation
+#   of LUFA projects using GCC.
+# -----------------------------------------------------------------------------
+# TARGETS:
+#
+#    (None)
+#
+# MANDATORY PARAMETERS:
+#
+#    LUFA_PATH                 - Path to the LUFA library core
+#    ARCH                      - Device architecture name
+#    F_USB                     - Speed of the USB core clock, in Hz
+#
+# OPTIONAL PARAMETERS:
+#
+#    BOARD                     - LUFA board drivers to use
+#
+# PROVIDED VARIABLES:
+#
+#    (None)
+#
+# PROVIDED MACROS:
+#
+#    (None)
+#
+# -----------------------------------------------------------------------------
+
+SHELL = /bin/sh
+
 ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
 ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
 ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
 
 # Sanity check user supplied values
+$(call ERROR_IF_EMPTY, LUFA_PATH)
 $(call ERROR_IF_EMPTY, ARCH)
 $(call ERROR_IF_EMPTY, F_USB)
 
diff --git a/LUFA/Build/lufa_sources.mk b/LUFA/Build/lufa_sources.mk
index ad1a47711..0764d30f1 100644
--- a/LUFA/Build/lufa_sources.mk
+++ b/LUFA/Build/lufa_sources.mk
@@ -15,7 +15,7 @@ DMBS_BUILD_PROVIDED_VARS   += LUFA_SRC_USB_DEVICE LUFA_SRC_USB_HOST    \
                               LUFA_SRC_USBCLASS_HOST LUFA_SRC_USBCLASS \
                               LUFA_SRC_TEMPERATURE LUFA_SRC_SERIAL     \
                               LUFA_SRC_TWI LUFA_SRC_PLATFORM
-LUFA_BUILD_PROVIDED_MACROS +=
+DMBS_BUILD_PROVIDED_MACROS +=
 
 # -----------------------------------------------------------------------------
 #               LUFA Sources Buildsystem Makefile Module.
diff --git a/LUFA/DoxygenPages/BuildSystem.txt b/LUFA/DoxygenPages/BuildSystem.txt
index 7ddfa1be3..2c8d0c745 100644
--- a/LUFA/DoxygenPages/BuildSystem.txt
+++ b/LUFA/DoxygenPages/BuildSystem.txt
@@ -7,10 +7,23 @@
 /** \page Page_BuildSystem The LUFA Build System
  *
  *  \section Sec_BuildSystem_Overview Overview of the LUFA Build System
- *  The LUFA build system is an attempt at making a set of re-usable, modular build make files which
- *  can be referenced in a LUFA powered project, to minimize the amount of code required in an
- *  application makefile. The system is written in GNU Make, and each module is independent of
- *  one-another.
+ *  The LUFA build system was originally an attempt at making a set of
+ *  re-usable, modular build make files which could be referenced in a LUFA
+ *  powered project, to minimize the amount of code required in an
+ *  application makefile.
+ *
+ *  As it turned out to be fairly generic in nature, it was split out into its
+ *  own separate project, called DMBS (<i>Dean's Makefile Build System</i>)
+ *  which is released into the public domain. LUFA specific portions of the
+ *  LUFA build system extend DMBS, and provide a universal build system for all
+ *  LUFA projects.
+ *
+ *  The latest DMBS project information can be found at:
+ *  https://github.com/abcminiuser/dmbs
+ *
+ *  DMBS is written in GNU Make, and each module is independent of one-another.
+ *
+ *  \section SSec_BuildSystem_Using Using the LUFA Build System
  *
  *  For details on the prerequisites needed for Linux and Windows machines to be able to use the LUFA
  *  build system, see \ref Sec_CompilingApps_Prerequisites.
diff --git a/LUFA/DoxygenPages/MigrationInformation.txt b/LUFA/DoxygenPages/MigrationInformation.txt
index b98bfc170..b9ed3a335 100644
--- a/LUFA/DoxygenPages/MigrationInformation.txt
+++ b/LUFA/DoxygenPages/MigrationInformation.txt
@@ -17,7 +17,7 @@
  *  \section Sec_Migration151115 Migrating from 140928 to 151115
  *  <b>Non-USB Library Components</b>
  *    - The ATPROGRAM LUFA build system module now defaults to the Atmel ICE debugger tool, instead of the Atmel JTAG ICE3.
- *    - The \x Serial_CreateStream() and \c Serial_CreateBlockingStream() functions now require a USART base pointer for XMEGA devices as the first parameter.
+ *    - The \c Serial_CreateStream() and \c Serial_CreateBlockingStream() functions now require a USART base pointer for XMEGA devices as the first parameter.
  *
  *  \section Sec_Migration140928 Migrating from 140302 to 140928
  *  <b>Device Mode</b>
-- 
cgit v1.2.3


From 09b6c80555bc17b1206ee688ccdfc76454b2dbd7 Mon Sep 17 00:00:00 2001
From: Dean Camera <dean@fourwalledcubicle.com>
Date: Tue, 22 Dec 2015 21:22:11 +1100
Subject: Add DMBS; don't Submodule so that people can download complete
 ZIP/TAR archives.

---
 LUFA/Build/DMBS                                    |   1 -
 .../DMBS/HID_EEPROM_Loader/HID_EEPROM_Loader.c     |  39 +++
 LUFA/Build/DMBS/DMBS/HID_EEPROM_Loader/makefile    |  35 +++
 LUFA/Build/DMBS/DMBS/License.txt                   |  32 ++
 LUFA/Build/DMBS/DMBS/atprogram.mk                  | 103 +++++++
 LUFA/Build/DMBS/DMBS/avrdude.mk                    |  86 ++++++
 LUFA/Build/DMBS/DMBS/core.mk                       | 180 +++++++++++
 LUFA/Build/DMBS/DMBS/cppcheck.mk                   | 107 +++++++
 LUFA/Build/DMBS/DMBS/dfu.mk                        |  95 ++++++
 LUFA/Build/DMBS/DMBS/doxygen.mk                    |  99 ++++++
 LUFA/Build/DMBS/DMBS/gcc.mk                        | 331 +++++++++++++++++++++
 LUFA/Build/DMBS/DMBS/hid.mk                        |  96 ++++++
 LUFA/Build/DMBS/Readme.md                          | 105 +++++++
 LUFA/Build/DMBS/Template/Template.c                |  12 +
 LUFA/Build/DMBS/Template/makefile                  |  32 ++
 15 files changed, 1352 insertions(+), 1 deletion(-)
 delete mode 160000 LUFA/Build/DMBS
 create mode 100644 LUFA/Build/DMBS/DMBS/HID_EEPROM_Loader/HID_EEPROM_Loader.c
 create mode 100644 LUFA/Build/DMBS/DMBS/HID_EEPROM_Loader/makefile
 create mode 100644 LUFA/Build/DMBS/DMBS/License.txt
 create mode 100644 LUFA/Build/DMBS/DMBS/atprogram.mk
 create mode 100644 LUFA/Build/DMBS/DMBS/avrdude.mk
 create mode 100644 LUFA/Build/DMBS/DMBS/core.mk
 create mode 100644 LUFA/Build/DMBS/DMBS/cppcheck.mk
 create mode 100644 LUFA/Build/DMBS/DMBS/dfu.mk
 create mode 100644 LUFA/Build/DMBS/DMBS/doxygen.mk
 create mode 100644 LUFA/Build/DMBS/DMBS/gcc.mk
 create mode 100644 LUFA/Build/DMBS/DMBS/hid.mk
 create mode 100644 LUFA/Build/DMBS/Readme.md
 create mode 100644 LUFA/Build/DMBS/Template/Template.c
 create mode 100644 LUFA/Build/DMBS/Template/makefile

diff --git a/LUFA/Build/DMBS b/LUFA/Build/DMBS
deleted file mode 160000
index 7dfe3cf63..000000000
--- a/LUFA/Build/DMBS
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 7dfe3cf63ab428690112b79ce5d5261945a9118c
diff --git a/LUFA/Build/DMBS/DMBS/HID_EEPROM_Loader/HID_EEPROM_Loader.c b/LUFA/Build/DMBS/DMBS/HID_EEPROM_Loader/HID_EEPROM_Loader.c
new file mode 100644
index 000000000..35ea2d79b
--- /dev/null
+++ b/LUFA/Build/DMBS/DMBS/HID_EEPROM_Loader/HID_EEPROM_Loader.c
@@ -0,0 +1,39 @@
+/*
+             DMBS Build System
+      Released into the public domain.
+
+   dean [at] fourwalledcubicle [dot] com
+         www.fourwalledcubicle.com
+ */
+
+/** \file
+ *
+ *  Special application to extract an EEPROM image stored in FLASH memory, and
+ *  copy it to the device EEPROM. This application is designed to be used with
+ *  the HID build system module of DMBS to program the EEPROM of a target device
+ *  that uses the HID bootloader protocol, which does not have native EEPROM
+ *  programming support.
+ */
+
+#include <avr/io.h>
+#include <avr/eeprom.h>
+#include <avr/pgmspace.h>
+
+/* References to the binary EEPROM data linked in the AVR's FLASH memory space */
+extern const char _binary_InputEEData_bin_start[];
+extern const char _binary_InputEEData_bin_end[];
+extern const char _binary_InputEEData_bin_size[];
+
+/* Friendly names for the embedded binary data stored in FLASH memory space */
+#define InputEEData       _binary_InputEEData_bin_start
+#define InputEEData_size  ((int)_binary_InputEEData_bin_size)
+
+int main(void)
+{
+	/* Copy out the embedded EEPROM data from FLASH to EEPROM memory space */
+	for (uint16_t i = 0; i < InputEEData_size; i++)
+	  eeprom_update_byte((uint8_t*)i, pgm_read_byte(&InputEEData[i]));
+
+	/* Infinite loop once complete */
+	for (;;);
+}
diff --git a/LUFA/Build/DMBS/DMBS/HID_EEPROM_Loader/makefile b/LUFA/Build/DMBS/DMBS/HID_EEPROM_Loader/makefile
new file mode 100644
index 000000000..879eda8cf
--- /dev/null
+++ b/LUFA/Build/DMBS/DMBS/HID_EEPROM_Loader/makefile
@@ -0,0 +1,35 @@
+#
+#            DMBS Build System
+#     Released into the public domain.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#        www.fourwalledcubicle.com
+#
+
+# Run "make help" for target help.
+
+MCU          = atmega128
+ARCH         = AVR8
+F_CPU        = 1000000
+OPTIMIZATION = s
+TARGET       = HID_EEPROM_Loader
+SRC          = $(TARGET).c
+CC_FLAGS     =
+LD_FLAGS     =
+OBJECT_FILES = InputEEData.o
+
+# Default target
+all:
+
+# Determine the AVR sub-architecture of the build main application object file
+FIND_AVR_SUBARCH = avr$(shell avr-objdump -f $(TARGET).o | grep architecture | cut -d':' -f3 | cut -d',' -f1)
+
+# Create a linkable object file with the input binary EEPROM data stored in the FLASH section
+InputEEData.o: InputEEData.bin $(TARGET).o $(MAKEFILE_LIST)
+	@echo $(MSG_OBJCPY_CMD) Converting \"$<\" to a object file \"$@\"
+	avr-objcopy -I binary -O elf32-avr -B $(call FIND_AVR_SUBARCH) --rename-section .data=.progmem.data,contents,alloc,readonly,data $< $@
+
+# Include LUFA build script makefiles
+include ../core.mk
+include ../gcc.mk
+include ../hid.mk
diff --git a/LUFA/Build/DMBS/DMBS/License.txt b/LUFA/Build/DMBS/DMBS/License.txt
new file mode 100644
index 000000000..322c7624e
--- /dev/null
+++ b/LUFA/Build/DMBS/DMBS/License.txt
@@ -0,0 +1,32 @@
+             DMBS Build System
+      Released into the public domain.
+
+   dean [at] fourwalledcubicle [dot] com
+         www.fourwalledcubicle.com
+
+
+
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to <http://unlicense.org/>
diff --git a/LUFA/Build/DMBS/DMBS/atprogram.mk b/LUFA/Build/DMBS/DMBS/atprogram.mk
new file mode 100644
index 000000000..de801b003
--- /dev/null
+++ b/LUFA/Build/DMBS/DMBS/atprogram.mk
@@ -0,0 +1,103 @@
+#
+#            DMBS Build System
+#     Released into the public domain.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#        www.fourwalledcubicle.com
+#
+
+DMBS_BUILD_MODULES         += ATPROGRAM
+DMBS_BUILD_TARGETS         += atprogram atprogram-ee
+DMBS_BUILD_MANDATORY_VARS  += MCU TARGET
+DMBS_BUILD_OPTIONAL_VARS   += ATPROGRAM_PROGRAMMER ATPROGRAM_INTERFACE ATPROGRAM_PORT
+DMBS_BUILD_PROVIDED_VARS   +=
+DMBS_BUILD_PROVIDED_MACROS +=
+
+# -----------------------------------------------------------------------------
+#             DMBS ATPROGRAM Programmer Buildsystem Makefile Module.
+# -----------------------------------------------------------------------------
+# DESCRIPTION:
+#   Provides a set of targets to re-program a device using the Atmel atprogram
+#   utility in AVR Studio 5.x and Atmel Studio 6.0 onwards.
+# -----------------------------------------------------------------------------
+# TARGETS:
+#
+#    atprogram                 - Program target FLASH with application using
+#                                atprogram
+#    atprogram-ee              - Program target EEPROM with application data
+#                                using atprogram
+#
+# MANDATORY PARAMETERS:
+#
+#    MCU                       - Microcontroller device model name
+#    TARGET                    - Application name
+#
+# OPTIONAL PARAMETERS:
+#
+#    ATPROGRAM_PROGRAMMER      - Name of programming hardware to use
+#    ATPROGRAM_INTERFACE       - Name of programming interface to use
+#    ATPROGRAM_PORT            - Name of communication port to use
+#
+# PROVIDED VARIABLES:
+#
+#    (None)
+#
+# PROVIDED MACROS:
+#
+#    (None)
+#
+# -----------------------------------------------------------------------------
+
+SHELL = /bin/sh
+
+ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
+ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
+ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
+
+# Default values of optionally user-supplied variables
+ATPROGRAM_PROGRAMMER ?= jtagice3
+ATPROGRAM_INTERFACE  ?= jtag
+ATPROGRAM_PORT       ?=
+
+# Sanity check user supplied values
+$(foreach MANDATORY_VAR, $(DMBS_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
+$(call ERROR_IF_EMPTY, MCU)
+$(call ERROR_IF_EMPTY, TARGET)
+$(call ERROR_IF_EMPTY, ATPROGRAM_PROGRAMMER)
+$(call ERROR_IF_EMPTY, ATPROGRAM_INTERFACE)
+
+# Output Messages
+MSG_ATPROGRAM_CMD    := ' [ATPRGRM] :'
+
+# Construct base atprogram command flags
+BASE_ATPROGRAM_FLAGS := --tool $(ATPROGRAM_PROGRAMMER) --interface $(ATPROGRAM_INTERFACE) --device $(MCU)
+ifneq ($(ATPROGRAM_PORT),)
+   BASE_ATPROGRAM_FLAGS += --port $(ATPROGRAM_PORT)
+endif
+
+# Construct the flags to use for the various memory spaces
+ifeq ($(ARCH), AVR8)
+   ATPROGRAM_FLASH_FLAGS  := --chiperase --flash
+   ATPROGRAM_EEPROM_FLAGS := --eeprom
+else ifeq ($(ARCH), XMEGA)
+   ATPROGRAM_FLASH_FLAGS  := --erase --flash
+   ATPROGRAM_EEPROM_FLAGS := --eeprom
+else ifeq ($(ARCH), UC3)
+   ATPROGRAM_FLASH_FLAGS  := --erase
+   ATPROGRAM_EEPROM_FLAGS := --eeprom
+else
+   $(error Unsupported architecture "$(ARCH)")
+endif
+
+# Programs in the target FLASH memory using ATPROGRAM
+atprogram: $(TARGET).elf $(MAKEFILE_LIST)
+	@echo $(MSG_ATPROGRAM_CMD) Programming device \"$(MCU)\" FLASH using \"$(ATPROGRAM_PROGRAMMER)\"
+	atprogram $(BASE_ATPROGRAM_FLAGS) program $(ATPROGRAM_FLASH_FLAGS) --file $<
+
+# Programs in the target EEPROM memory using ATPROGRAM
+atprogram-ee: $(TARGET).elf $(MAKEFILE_LIST)
+	@echo $(MSG_ATPROGRAM_CMD) Programming device \"$(MCU)\" EEPROM using \"$(ATPROGRAM_PROGRAMMER)\"
+	atprogram $(BASE_ATPROGRAM_FLAGS) program $(ATPROGRAM_EEPROM_FLAGS) --file $<
+
+# Phony build targets for this module
+.PHONY: $(DMBS_BUILD_TARGETS)
diff --git a/LUFA/Build/DMBS/DMBS/avrdude.mk b/LUFA/Build/DMBS/DMBS/avrdude.mk
new file mode 100644
index 000000000..d9b4df048
--- /dev/null
+++ b/LUFA/Build/DMBS/DMBS/avrdude.mk
@@ -0,0 +1,86 @@
+#
+#            DMBS Build System
+#     Released into the public domain.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#        www.fourwalledcubicle.com
+#
+
+DMBS_BUILD_MODULES         += AVRDUDE
+DMBS_BUILD_TARGETS         += avrdude avrdude-ee
+DMBS_BUILD_MANDATORY_VARS  += MCU TARGET
+DMBS_BUILD_OPTIONAL_VARS   += AVRDUDE_PROGRAMMER AVRDUDE_PORT AVRDUDE_FLAGS
+DMBS_BUILD_PROVIDED_VARS   +=
+DMBS_BUILD_PROVIDED_MACROS +=
+
+# -----------------------------------------------------------------------------
+#             DMBS AVRDUDE Programmer Buildsystem Makefile Module.
+# -----------------------------------------------------------------------------
+# DESCRIPTION:
+#   Provides a set of targets to re-program a device using the open source
+#   avr-dude utility.
+# -----------------------------------------------------------------------------
+# TARGETS:
+#
+#    avrdude                   - Program target FLASH with application using
+#                                avrdude
+#    avrdude-ee                - Program target EEPROM with application data
+#                                using avrdude
+#
+# MANDATORY PARAMETERS:
+#
+#    MCU                       - Microcontroller device model name
+#    TARGET                    - Application name
+#
+# OPTIONAL PARAMETERS:
+#
+#    AVRDUDE_PROGRAMMER        - Name of programming hardware to use
+#    AVRDUDE_PORT              - Name of communication port to use
+#    AVRDUDE_FLAGS             - Flags to pass to avr-dude
+#
+# PROVIDED VARIABLES:
+#
+#    (None)
+#
+# PROVIDED MACROS:
+#
+#    (None)
+#
+# -----------------------------------------------------------------------------
+
+SHELL = /bin/sh
+
+ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
+ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
+ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
+
+# Default values of optionally user-supplied variables
+AVRDUDE_PROGRAMMER ?= jtagicemkii
+AVRDUDE_PORT       ?= usb
+AVRDUDE_FLAGS      ?=
+
+# Sanity check user supplied values
+$(foreach MANDATORY_VAR, $(DMBS_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
+$(call ERROR_IF_EMPTY, MCU)
+$(call ERROR_IF_EMPTY, TARGET)
+$(call ERROR_IF_EMPTY, AVRDUDE_PROGRAMMER)
+$(call ERROR_IF_EMPTY, AVRDUDE_PORT)
+
+# Output Messages
+MSG_AVRDUDE_CMD    := ' [AVRDUDE] :'
+
+# Construct base avrdude command flags
+BASE_AVRDUDE_FLAGS := -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
+
+# Programs in the target FLASH memory using AVRDUDE
+avrdude: $(TARGET).hex $(MAKEFILE_LIST)
+	@echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" FLASH using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\"
+	avrdude $(BASE_AVRDUDE_FLAGS) -U flash:w:$< $(AVRDUDE_FLAGS)
+
+# Programs in the target EEPROM memory using AVRDUDE
+avrdude-ee: $(TARGET).eep $(MAKEFILE_LIST)
+	@echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" EEPROM using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\"
+	avrdude $(BASE_AVRDUDE_FLAGS) -U eeprom:w:$< $(AVRDUDE_FLAGS)
+
+# Phony build targets for this module
+.PHONY: $(DMBS_BUILD_TARGETS)
diff --git a/LUFA/Build/DMBS/DMBS/core.mk b/LUFA/Build/DMBS/DMBS/core.mk
new file mode 100644
index 000000000..41992566d
--- /dev/null
+++ b/LUFA/Build/DMBS/DMBS/core.mk
@@ -0,0 +1,180 @@
+#
+#            DMBS Build System
+#     Released into the public domain.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#        www.fourwalledcubicle.com
+#
+
+DMBS_BUILD_MODULES         += CORE
+DMBS_BUILD_TARGETS         += help list_targets list_modules list_mandatory list_optional list_provided list_macros
+DMBS_BUILD_MANDATORY_VARS  +=
+DMBS_BUILD_OPTIONAL_VARS   +=
+DMBS_BUILD_PROVIDED_VARS   += DMBS_VERSION
+DMBS_BUILD_PROVIDED_MACROS +=
+
+# -----------------------------------------------------------------------------
+#               DMBS Core Build System Makefile Module.
+# -----------------------------------------------------------------------------
+# DESCRIPTION:
+#   Provides a set of core build targets for the DMBS build system
+# -----------------------------------------------------------------------------
+# TARGETS:
+#
+#    help                      - Build system help
+#    list_targets              - List all build targets
+#    list_modules              - List all build modules
+#    list_mandatory            - List all mandatory make variables required by
+#                                the included build modules of the application
+#    list_optional             - List all optional make variables required by
+#                                the included build modules of the application
+#    list_provided             - List all provided make variables from the
+#                                included build modules of the application
+#    list_macros               - List all provided make macros from the
+#                                included build modules of the application
+#
+# MANDATORY PARAMETERS:
+#
+#    (None)
+#
+# OPTIONAL PARAMETERS:
+#
+#    (None)
+#
+# PROVIDED VARIABLES:
+#
+#    DMBS_VERSION
+#
+# PROVIDED MACROS:
+#
+#    (None)
+#
+# -----------------------------------------------------------------------------
+
+SHELL = /bin/sh
+
+
+# Current DMBS release version
+DMBS_VERSION = 0.3
+
+
+# Converts a given input to a printable output using "(None)" if no items are in the list
+CONVERT_TO_PRINTABLE           = $(if $(strip $(1)), $(1), (None))
+
+
+# Build sorted and filtered lists of the included build module data
+SORTED_DMBS_BUILD_MODULES      = $(sort $(DMBS_BUILD_MODULES))
+SORTED_DMBS_BUILD_TARGETS      = $(sort $(DMBS_BUILD_TARGETS))
+SORTED_DMBS_MANDATORY_VARS     = $(sort $(DMBS_BUILD_MANDATORY_VARS))
+SORTED_DMBS_OPTIONAL_VARS      = $(filter-out $(SORTED_DMBS_MANDATORY_VARS), $(sort $(DMBS_BUILD_OPTIONAL_VARS)))
+SORTED_DMBS_PROVIDED_VARS      = $(sort $(DMBS_BUILD_PROVIDED_VARS))
+SORTED_DMBS_PROVIDED_MACROS    = $(sort $(DMBS_BUILD_PROVIDED_MACROS))
+
+# Create printable versions of the sorted build module data (use "(None)" when no data is available)
+PRINTABLE_DMBS_BUILD_MODULES   = $(call CONVERT_TO_PRINTABLE, $(SORTED_DMBS_BUILD_MODULES))
+PRINTABLE_DMBS_BUILD_TARGETS   = $(call CONVERT_TO_PRINTABLE, $(SORTED_DMBS_BUILD_TARGETS))
+PRINTABLE_DMBS_MANDATORY_VARS  = $(call CONVERT_TO_PRINTABLE, $(SORTED_DMBS_MANDATORY_VARS))
+PRINTABLE_DMBS_OPTIONAL_VARS   = $(call CONVERT_TO_PRINTABLE, $(SORTED_DMBS_OPTIONAL_VARS))
+PRINTABLE_DMBS_PROVIDED_VARS   = $(call CONVERT_TO_PRINTABLE, $(SORTED_DMBS_PROVIDED_VARS))
+PRINTABLE_DMBS_PROVIDED_MACROS = $(call CONVERT_TO_PRINTABLE, $(SORTED_DMBS_PROVIDED_MACROS))
+
+help:
+	@echo "==================================================================="
+	@echo "                       The DMBS Build System                       "
+	@echo "         By Dean Camera { dean @ fourwalledcubicle . com }         "
+	@echo "==================================================================="
+	@echo "DESCRIPTION:                                                       "
+	@echo " This build system is a set of makefile modules for (GNU) Make, to "
+	@echo " provide a simple system for building DMBS powered applications.   "
+	@echo " Each makefile module can be included from within a user makefile, "
+	@echo " to expose the build rules documented in the comments at the top of"
+	@echo " each build module.                                                "
+	@echo "                                                                   "
+	@echo "USAGE:                                                             "
+	@echo " To execute a rule, define all variables indicated in the desired  "
+	@echo " module as a required parameter before including the build module  "
+	@echo " in your project makefile. Parameters marked as optional will      "
+	@echo " assume a default value in the modules if not user-assigned.       "
+	@echo "                                                                   "
+	@echo " By default the target output shows both a friendly summary, as    "
+	@echo " well as the actual invoked command. To suppress the output of the "
+	@echo " invoked commands and show only the friendly command output, run   "
+	@echo " make with the \"-s\" switch added before the target(s).           "
+	@echo "==================================================================="
+	@echo "                                                                   "
+	@echo "  Currently used build system modules in this application:         "
+	@echo "                                                                   "
+	@printf " %b" "$(PRINTABLE_DMBS_BUILD_MODULES:%=   - %\n)"
+	@echo "                                                                   "
+	@echo "                                                                   "
+	@echo "  Currently available build targets in this application:           "
+	@echo "                                                                   "
+	@printf " %b" "$(PRINTABLE_DMBS_BUILD_TARGETS:%=   - %\n)"
+	@echo "                                                                   "
+	@echo "                                                                   "
+	@echo "  Mandatory variables required by the selected build Modules:      "
+	@echo "                                                                   "
+	@printf " %b" "$(PRINTABLE_DMBS_MANDATORY_VARS:%=   - %\n)"
+	@echo "                                                                   "
+	@echo "                                                                   "
+	@echo "  Optional variables required by the selected build Modules:       "
+	@echo "                                                                   "
+	@printf " %b" "$(PRINTABLE_DMBS_OPTIONAL_VARS:%=   - %\n)"
+	@echo "                                                                   "
+	@echo "                                                                   "
+	@echo "  Variables provided by the selected build Modules:                "
+	@echo "                                                                   "
+	@printf " %b" "$(PRINTABLE_DMBS_PROVIDED_VARS:%=   - %\n)"
+	@echo "                                                                   "
+	@echo "                                                                   "
+	@echo "  Macros provided by the selected build Modules:                   "
+	@echo "                                                                   "
+	@printf " %b" "$(PRINTABLE_DMBS_PROVIDED_MACROS:%=   - %\n)"
+	@echo "                                                                   "
+	@echo "==================================================================="
+	@echo "          The DMBS Build System $(DMBS_VERSION) - Making MAKE easier."
+	@echo "==================================================================="
+
+# Lists build modules included by the project makefile, in alphabetical order
+list_modules:
+	@echo Currently Used Build System Modules:
+	@printf " %b" "$(PRINTABLE_DMBS_BUILD_MODULES:%=   - %\n)"
+
+# Lists build targets included by the project makefile, in alphabetical order
+list_targets:
+	@echo Currently Available Build Targets:
+	@printf " %b" "$(PRINTABLE_DMBS_BUILD_TARGETS:%=   - %\n)"
+
+# Lists mandatory variables that must be set by the project makefile, in alphabetical order
+list_mandatory:
+	@echo Mandatory Variables for Included Modules:
+	@printf " %b" "$(PRINTABLE_DMBS_MANDATORY_VARS:%=   - %\n)"
+
+# Lists optional variables that must be set by the project makefile, in alphabetical order
+list_optional:
+	@echo Optional Variables for Included Modules:
+	@printf " %b" "$(PRINTABLE_DMBS_OPTIONAL_VARS:%=   - %\n)"
+
+# Lists variables provided by the included build modules, in alphabetical order
+list_provided:
+	@echo Variables Provided by the Included Modules:
+	@printf " %b" "$(PRINTABLE_DMBS_PROVIDED_VARS:%=   - %\n)"
+
+# Lists macros provided by the included build modules, in alphabetical order
+list_macros:
+	@echo Macros Provided by the Included Modules:
+	@printf " %b" "$(PRINTABLE_DMBS_PROVIDED_MACROS:%=   - %\n)"
+
+# Debugging; "make print-VARNAME" will output the variable VARNAME's value
+print-%:
+	@printf "%s = %s" $(@:print-%=%) $($(@:print-%=%))
+
+# Disable default in-built make rules (those that are needed are explicitly
+# defined, and doing so has performance benefits when recursively building)
+ifeq ($(filter -r,$(MAKEFLAGS)),)
+  MAKEFLAGS += -r
+endif
+.SUFFIXES:
+
+# Phony build targets for this module
+.PHONY: $(DMBS_BUILD_TARGETS)
diff --git a/LUFA/Build/DMBS/DMBS/cppcheck.mk b/LUFA/Build/DMBS/DMBS/cppcheck.mk
new file mode 100644
index 000000000..2e0be12ad
--- /dev/null
+++ b/LUFA/Build/DMBS/DMBS/cppcheck.mk
@@ -0,0 +1,107 @@
+#
+#            DMBS Build System
+#     Released into the public domain.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#        www.fourwalledcubicle.com
+#
+
+DMBS_BUILD_MODULES         += CPPCHECK
+DMBS_BUILD_TARGETS         += cppcheck cppcheck-config
+DMBS_BUILD_MANDATORY_VARS  += SRC
+DMBS_BUILD_OPTIONAL_VARS   += CPPCHECK_INCLUDES CPPCHECK_EXCLUDES CPPCHECK_MSG_TEMPLATE CPPCHECK_ENABLE \
+                              CPPCHECK_SUPPRESS CPPCHECK_FAIL_ON_WARNING CPPCHECK_QUIET CPPCHECK_FLAGS
+DMBS_BUILD_PROVIDED_VARS   +=
+DMBS_BUILD_PROVIDED_MACROS +=
+
+# -----------------------------------------------------------------------------
+#                DMBS CPPCheck Buildsystem Makefile Module.
+# -----------------------------------------------------------------------------
+# DESCRIPTION:
+#   Provides a set of targets to scan a project with the free "cppcheck" static
+#   analysis tool, to check for code errors at runtime
+#   (see http://cppcheck.sourceforge.net).
+# -----------------------------------------------------------------------------
+# TARGETS:
+#
+#    cppcheck                  - Scan the project with CPPCheck
+#    cppcheck-config           - Use CPPCheck to look for missing include files
+#
+# MANDATORY PARAMETERS:
+#
+#    SRC                       - List of source files to statically analyze
+#
+# OPTIONAL PARAMETERS:
+#
+#    CPPCHECK_INCLUDES         - Extra include paths to search for missing
+#                                header files
+#    CPPCHECK_EXCLUDES         - Source file paths to exclude checking (can be
+#                                a path fragment if desired)
+#    CPPCHECK_MSG_TEMPLATE     - Template for cppcheck error and warning output
+#    CPPCHECK_ENABLE           - General cppcheck category checks to enable
+#    CPPCHECK_SUPPRESS         - Specific cppcheck warnings to disable by ID
+#    CPPCHECK_FAIL_ON_WARNING  - Set to Y to fail the build on cppcheck
+#                                warnings, N to continue even if warnings occur
+#    CPPCHECK_QUIET            - Enable cppcheck verbose or quiet output mode
+#    CPPCHECK_FLAGS            - Additional flags to pass to cppcheck
+#
+# PROVIDED VARIABLES:
+#
+#    (None)
+#
+# PROVIDED MACROS:
+#
+#    (None)
+#
+# -----------------------------------------------------------------------------
+
+SHELL = /bin/sh
+
+ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
+ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
+ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
+
+# Default values of optionally user-supplied variables
+CPPCHECK_INCLUDES            ?=
+CPPCHECK_EXCLUDES            ?=
+CPPCHECK_MSG_TEMPLATE        ?= {file}:{line}: {severity} ({id}): {message}
+CPPCHECK_ENABLE              ?= all
+CPPCHECK_SUPPRESS            ?= variableScope missingInclude
+CPPCHECK_FAIL_ON_WARNING     ?= Y
+CPPCHECK_QUIET               ?= Y
+CPPCHECK_FLAGS               ?=
+
+# Sanity check user supplied values
+$(foreach MANDATORY_VAR, $(DMBS_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
+$(call ERROR_IF_EMPTY, SRC)
+$(call ERROR_IF_EMPTY, CPPCHECK_MSG_TEMPLATE)
+$(call ERROR_IF_EMPTY, CPPCHECK_ENABLE)
+$(call ERROR_IF_NONBOOL, CPPCHECK_FAIL_ON_WARNING)
+$(call ERROR_IF_NONBOOL, CPPCHECK_QUIET)
+
+# Build a default argument list for cppcheck
+BASE_CPPCHECK_FLAGS := --template="$(CPPCHECK_MSG_TEMPLATE)" $(CPPCHECK_INCLUDES:%=-I%) $(CPPCHECK_EXCLUDES:%=-i%) --inline-suppr --force --std=c99
+
+# Sanity check parameters and construct additional command line arguments to cppcheck
+ifeq ($(CPPCHECK_FAIL_ON_WARNING), Y)
+   BASE_CPPCHECK_FLAGS += --error-exitcode=1
+endif
+ifeq ($(CPPCHECK_QUIET), Y)
+   BASE_CPPCHECK_FLAGS += --quiet
+endif
+
+# Output Messages
+MSG_CPPCHECK_CMD         := ' [CPPCHECK]:'
+
+# Checks the CPPCheck configuration as used in the user project, to determine if any paths are missing or invalid
+cppcheck-config: $(MAKEFILE_LIST)
+	@echo $(MSG_CPPCHECK_CMD) Checking cppcheck configuration check on source files
+	cppcheck $(BASE_CPPCHECK_FLAGS) --check-config $(CPPCHECK_FLAGS) $(SRC)
+
+# Runs a static analysis using CPPCheck to determine if there are any issues
+cppcheck: $(MAKEFILE_LIST)
+	@echo $(MSG_CPPCHECK_CMD) Performing static analysis on source files
+	cppcheck $(BASE_CPPCHECK_FLAGS) --enable=$(CPPCHECK_ENABLE) $(CPPCHECK_SUPPRESS:%=--suppress=%) $(CPPCHECK_FLAGS) $(SRC)
+
+# Phony build targets for this module
+.PHONY: $(DMBS_BUILD_TARGETS)
diff --git a/LUFA/Build/DMBS/DMBS/dfu.mk b/LUFA/Build/DMBS/DMBS/dfu.mk
new file mode 100644
index 000000000..62365c141
--- /dev/null
+++ b/LUFA/Build/DMBS/DMBS/dfu.mk
@@ -0,0 +1,95 @@
+#
+#            DMBS Build System
+#     Released into the public domain.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#        www.fourwalledcubicle.com
+#
+
+DMBS_BUILD_MODULES         += DFU
+DMBS_BUILD_TARGETS         += flip flip-ee dfu dfu-ee
+DMBS_BUILD_MANDATORY_VARS  += MCU TARGET
+DMBS_BUILD_OPTIONAL_VARS   +=
+DMBS_BUILD_PROVIDED_VARS   +=
+DMBS_BUILD_PROVIDED_MACROS +=
+
+# -----------------------------------------------------------------------------
+#               DMBS DFU Bootloader Buildsystem Makefile Module.
+# -----------------------------------------------------------------------------
+# DESCRIPTION:
+#   Provides a set of targets to re-program a device currently running a DFU
+#   class bootloader with a project's FLASH and EEPROM files.
+# -----------------------------------------------------------------------------
+# TARGETS:
+#
+#    flip                      - Program FLASH into target via Atmel FLIP
+#    flip-ee                   - Program EEPROM into target via Atmel FLIP
+#    dfu                       - Program FLASH into target via dfu-programmer
+#    dfu-ee                    - Program EEPROM into target via dfu-programmer
+#
+# MANDATORY PARAMETERS:
+#
+#    MCU                       - Microcontroller device model name
+#    TARGET                    - Application name
+#
+# OPTIONAL PARAMETERS:
+#
+#    (None)
+#
+# PROVIDED VARIABLES:
+#
+#    (None)
+#
+# PROVIDED MACROS:
+#
+#    (None)
+#
+# -----------------------------------------------------------------------------
+
+SHELL = /bin/sh
+
+ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
+ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
+ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
+
+# Sanity-check values of mandatory user-supplied variables
+$(foreach MANDATORY_VAR, $(DMBS_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
+$(call ERROR_IF_EMPTY, MCU)
+$(call ERROR_IF_EMPTY, TARGET)
+
+# Output Messages
+MSG_COPY_CMD   := ' [CP]      :'
+MSG_REMOVE_CMD := ' [RM]      :'
+MSG_DFU_CMD    := ' [DFU]     :'
+
+# Programs in the target FLASH memory using BATCHISP, the command line tool used by FLIP
+flip: $(TARGET).hex $(MAKEFILE_LIST)
+	@echo $(MSG_DFU_CMD) Programming FLASH with batchisp using \"$<\"
+	batchisp -hardware usb -device $(MCU) -operation erase f loadbuffer $< program
+	batchisp -hardware usb -device $(MCU) -operation start reset 0
+
+# Programs in the target EEPROM memory using BATCHISP, the command line tool used by FLIP
+flip-ee: $(TARGET).eep $(MAKEFILE_LIST)
+	@echo $(MSG_COPY_CMD) Copying EEP file to temporary file \"$<.hex\"
+	cp $< $<.hex
+	@echo $(MSG_DFU_CMD) Programming EEPROM with batchisp using \"$<.hex\"
+	batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $<.hex program
+	batchisp -hardware usb -device $(MCU) -operation start reset 0
+	@echo $(MSG_REMOVE_CMD) Removing temporary file \"$<.hex\"
+	rm $<.hex
+
+# Programs in the target FLASH memory using DFU-PROGRAMMER
+dfu: $(TARGET).hex $(MAKEFILE_LIST)
+	@echo $(MSG_DFU_CMD) Programming FLASH with dfu-programmer using \"$<\"
+	dfu-programmer $(MCU) erase
+	dfu-programmer $(MCU) flash $<
+	dfu-programmer $(MCU) reset
+
+# Programs in the target EEPROM memory using DFU-PROGRAMMER
+dfu-ee: $(TARGET).eep $(MAKEFILE_LIST)
+	@echo $(MSG_DFU_CMD) Programming EEPROM with dfu-programmer using \"$<\"
+	dfu-programmer $(MCU) flash --eeprom $<
+	dfu-programmer $(MCU) reset
+
+# Phony build targets for this module
+.PHONY: $(DMBS_BUILD_TARGETS)
diff --git a/LUFA/Build/DMBS/DMBS/doxygen.mk b/LUFA/Build/DMBS/DMBS/doxygen.mk
new file mode 100644
index 000000000..bcde61b47
--- /dev/null
+++ b/LUFA/Build/DMBS/DMBS/doxygen.mk
@@ -0,0 +1,99 @@
+#
+#            DMBS Build System
+#     Released into the public domain.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#        www.fourwalledcubicle.com
+#
+
+DMBS_BUILD_MODULES         += DOXYGEN
+DMBS_BUILD_TARGETS         += doxygen doxygen_upgrade doxygen_create
+DMBS_BUILD_MANDATORY_VARS  +=
+DMBS_BUILD_OPTIONAL_VARS   += DOXYGEN_CONF DOXYGEN_FAIL_ON_WARNING DOXYGEN_OVERRIDE_PARAMS
+DMBS_BUILD_PROVIDED_VARS   +=
+DMBS_BUILD_PROVIDED_MACROS +=
+
+# -----------------------------------------------------------------------------
+#                 DMBS Doxygen Buildsystem Makefile Module.
+# -----------------------------------------------------------------------------
+# DESCRIPTION:
+#   Provides a set of targets to automatically build Doxygen documentation for
+#   a project (see www.doxygen.org).
+# -----------------------------------------------------------------------------
+# TARGETS:
+#
+#    doxygen                   - Build Doxygen Documentation
+#    doxygen_create            - Create a new Doxygen configuration file using
+#                                the latest template
+#    doxygen_upgrade           - Upgrade an existing Doxygen configuration file
+#                                to the latest template
+#
+# MANDATORY PARAMETERS:
+#
+#    (None)
+#
+# OPTIONAL PARAMETERS:
+#
+#    DOXYGEN_CONF              - Doxygen configuration filename
+#    DOXYGEN_FAIL_ON_WARNING   - Set to Y to fail the build on Doxygen warnings,
+#                                N to continue even if warnings occur
+#    DOXYGEN_OVERRIDE_PARAMS   - Parameters to override in the doxygen
+#                                configuration file
+# PROVIDED VARIABLES:
+#
+#    (None)
+#
+# PROVIDED MACROS:
+#
+#    (None)
+#
+# -----------------------------------------------------------------------------
+
+SHELL = /bin/sh
+
+ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
+ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
+ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
+
+# Default values of optionally user-supplied variables
+DOXYGEN_CONF            ?= doxyfile
+DOXYGEN_FAIL_ON_WARNING ?= Y
+DOXYGEN_OVERRIDE_PARAMS ?= QUIET=YES
+
+# Sanity check user supplied values
+$(foreach MANDATORY_VAR, $(DMBS_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
+$(call ERROR_IF_EMPTY, DOXYGEN_CONF)
+$(call ERROR_IF_NONBOOL, DOXYGEN_FAIL_ON_WARNING)
+
+# Output Messages
+MSG_DOXYGEN_CMD         := ' [DOXYGEN] :'
+
+# Determine Doxygen invocation command
+BASE_DOXYGEN_CMD := ( cat $(DOXYGEN_CONF) $(DOXYGEN_OVERRIDE_PARAMS:%=; echo "%") ) | doxygen -
+ifeq ($(DOXYGEN_FAIL_ON_WARNING), Y)
+   DOXYGEN_CMD := if ( $(BASE_DOXYGEN_CMD) 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then exit 1; fi;
+else
+   DOXYGEN_CMD := $(BASE_DOXYGEN_CMD)
+endif
+
+# Error if the specified Doxygen configuration file does not exist
+$(DOXYGEN_CONF):
+	$(error Doxygen configuration file $@ does not exist)
+
+# Builds the project documentation using the specified configuration file and the DOXYGEN tool
+doxygen: $(DOXYGEN_CONF) $(MAKEFILE_LIST)
+	@echo $(MSG_DOXYGEN_CMD) Configuration file \"$(DOXYGEN_CONF)\" with parameters \"$(DOXYGEN_OVERRIDE_PARAMS)\"
+	$(DOXYGEN_CMD)
+
+# Upgrades an existing Doxygen configuration file to the latest Doxygen template, preserving settings
+doxygen_upgrade: $(DOXYGEN_CONF) $(MAKEFILE_LIST)
+	@echo $(MSG_DOXYGEN_CMD) Upgrading configuration file \"$(DOXYGEN_CONF)\" with latest template
+	doxygen -u $(DOXYGEN_CONF) > /dev/null
+
+# Creates a new Doxygen configuration file with the set file name
+doxygen_create: $(MAKEFILE_LIST)
+	@echo $(MSG_DOXYGEN_CMD) Creating new configuration file \"$(DOXYGEN_CONF)\" with latest template
+	doxygen -g $(DOXYGEN_CONF) > /dev/null
+
+# Phony build targets for this module
+.PHONY: $(DMBS_BUILD_TARGETS)
diff --git a/LUFA/Build/DMBS/DMBS/gcc.mk b/LUFA/Build/DMBS/DMBS/gcc.mk
new file mode 100644
index 000000000..b9347a60b
--- /dev/null
+++ b/LUFA/Build/DMBS/DMBS/gcc.mk
@@ -0,0 +1,331 @@
+#
+#            DMBS Build System
+#     Released into the public domain.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#        www.fourwalledcubicle.com
+#
+
+DMBS_BUILD_MODULES         += GCC
+DMBS_BUILD_TARGETS         += size symbol-sizes all lib elf bin hex lss clean mostlyclean
+DMBS_BUILD_MANDATORY_VARS  += TARGET ARCH MCU SRC
+DMBS_BUILD_OPTIONAL_VARS   += BOARD OPTIMIZATION C_STANDARD CPP_STANDARD F_CPU C_FLAGS CPP_FLAGS ASM_FLAGS CC_FLAGS LD_FLAGS OBJDIR OBJECT_FILES DEBUG_TYPE DEBUG_LEVEL LINKER_RELAXATIONS COMPILER_PATH
+DMBS_BUILD_PROVIDED_VARS   +=
+DMBS_BUILD_PROVIDED_MACROS +=
+
+# -----------------------------------------------------------------------------
+#               DMBS GCC Compiler Buildsystem Makefile Module.
+# -----------------------------------------------------------------------------
+# DESCRIPTION:
+#   Provides a set of targets to build a C, C++ and/or Assembly application
+#   via the AVR-GCC compiler.
+# -----------------------------------------------------------------------------
+# TARGETS:
+#
+#    size                      - List built application size
+#    symbol-sizes              - Print application symbols from the binary ELF
+#                                file as a list sorted by size in bytes
+#    all                       - Build application and list size
+#    lib                       - Build and archive source files into a library
+#    elf                       - Build application ELF debug object file
+#    bin                       - Build application BIN binary object file
+#    hex                       - Build application HEX object file
+#    lss                       - Build application LSS assembly listing file
+#    clean                     - Remove all project intermediary and binary
+#                                output files
+#    mostlyclean               - Remove intermediary output files, but
+#                                preserve binaries
+#    <filename>.s              - Compile C/C++ source file into an assembly file
+#                                for manual code inspection
+#
+# MANDATORY PARAMETERS:
+#
+#    TARGET                    - Application name
+#    ARCH                      - Device architecture name
+#    MCU                       - Microcontroller device model name
+#    SRC                       - List of input source files (*.c, *.cpp, *.S)
+#
+# OPTIONAL PARAMETERS:
+#
+#    OPTIMIZATION              - Optimization level
+#    C_STANDARD                - C Language Standard to use
+#    CPP_STANDARD              - C++ Language Standard to use
+#    F_CPU                     - Speed of the CPU, in Hz
+#    C_FLAGS                   - Flags to pass to the C compiler only
+#    CPP_FLAGS                 - Flags to pass to the C++ compiler only
+#    ASM_FLAGS                 - Flags to pass to the assembler only
+#    CC_FLAGS                  - Common flags to pass to the C/C++ compiler and
+#                                assembler
+#    LD_FLAGS                  - Flags to pass to the linker
+#    LINKER_RELAXATIONS        - Enable or disable linker relaxations to
+#                                decrease binary size (note: can cause link
+#                                failures on systems with an unpatched binutils)
+#    OBJDIR                    - Directory for the output object and dependency
+#                                files; if equal to ".", the output files will
+#                                be generated in the same folder as the sources
+#    OBJECT_FILES              - Extra object files to link in to the binaries
+#    DEBUG_FORMAT              - Format of the debugging information to
+#                                generate in the compiled object files
+#    DEBUG_LEVEL               - Level the debugging information to generate in
+#                                the compiled object files
+#    COMPILER_PATH             - Location of the GCC toolchain to use
+#
+# PROVIDED VARIABLES:
+#
+#    (None)
+#
+# PROVIDED MACROS:
+#
+#    (None)
+#
+# -----------------------------------------------------------------------------
+
+SHELL = /bin/sh
+
+ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
+ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
+ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
+
+# Default values of optionally user-supplied variables
+COMPILER_PATH      ?=
+OPTIMIZATION       ?= s
+F_CPU              ?=
+C_STANDARD         ?= gnu99
+CPP_STANDARD       ?= gnu++98
+C_FLAGS            ?=
+CPP_FLAGS          ?=
+ASM_FLAGS          ?=
+CC_FLAGS           ?=
+OBJDIR             ?= obj
+OBJECT_FILES       ?=
+DEBUG_FORMAT       ?= dwarf-2
+DEBUG_LEVEL        ?= 2
+LINKER_RELAXATIONS ?= Y
+
+# Sanity check user supplied values
+$(foreach MANDATORY_VAR, $(DMBS_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
+$(call ERROR_IF_EMPTY, MCU)
+$(call ERROR_IF_EMPTY, TARGET)
+$(call ERROR_IF_EMPTY, ARCH)
+$(call ERROR_IF_EMPTY, OPTIMIZATION)
+$(call ERROR_IF_EMPTY, C_STANDARD)
+$(call ERROR_IF_EMPTY, CPP_STANDARD)
+$(call ERROR_IF_EMPTY, OBJDIR)
+$(call ERROR_IF_EMPTY, DEBUG_FORMAT)
+$(call ERROR_IF_EMPTY, DEBUG_LEVEL)
+$(call ERROR_IF_NONBOOL, LINKER_RELAXATIONS)
+
+# Determine the utility prefix to use for the selected architecture
+ifeq ($(ARCH), AVR8)
+   CROSS        := $(COMPILER_PATH)avr
+else ifeq ($(ARCH), XMEGA)
+   CROSS        := $(COMPILER_PATH)avr
+else ifeq ($(ARCH), UC3)
+   CROSS        := $(COMPILER_PATH)avr32
+else
+   $(error Unsupported architecture "$(ARCH)")
+endif
+
+# Output Messages
+MSG_INFO_MESSAGE := ' [INFO]    :'
+MSG_COMPILE_CMD  := ' [GCC]     :'
+MSG_ASSEMBLE_CMD := ' [GAS]     :'
+MSG_NM_CMD       := ' [NM]      :'
+MSG_REMOVE_CMD   := ' [RM]      :'
+MSG_LINK_CMD     := ' [LNK]     :'
+MSG_ARCHIVE_CMD  := ' [AR]      :'
+MSG_SIZE_CMD     := ' [SIZE]    :'
+MSG_OBJCPY_CMD   := ' [OBJCPY]  :'
+MSG_OBJDMP_CMD   := ' [OBJDMP]  :'
+
+# Convert input source file list to differentiate them by type
+C_SOURCE   := $(filter %.c, $(SRC))
+CPP_SOURCE := $(filter %.cpp, $(SRC))
+ASM_SOURCE := $(filter %.S, $(SRC))
+
+# Create a list of unknown source file types, if any are found throw an error
+UNKNOWN_SOURCE := $(filter-out $(C_SOURCE) $(CPP_SOURCE) $(ASM_SOURCE), $(SRC))
+ifneq ($(UNKNOWN_SOURCE),)
+   $(error Unknown input source file formats: $(UNKNOWN_SOURCE))
+endif
+
+# Convert input source filenames into a list of required output object files
+OBJECT_FILES += $(addsuffix .o, $(basename $(SRC)))
+
+# Check if an output object file directory was specified instead of the input file location
+ifneq ($(OBJDIR),.)
+   # Prefix all the object filenames with the output object file directory path
+   OBJECT_FILES    := $(addprefix $(patsubst %/,%,$(OBJDIR))/, $(notdir $(OBJECT_FILES)))
+
+   # Check if any object file (without path) appears more than once in the object file list
+   ifneq ($(words $(sort $(OBJECT_FILES))), $(words $(OBJECT_FILES)))
+       $(error Cannot build with OBJDIR parameter set - one or more object file name is not unique)
+   endif
+
+   # Create the output object file directory if it does not exist and add it to the virtual path list
+   $(shell mkdir $(OBJDIR) 2> /dev/null)
+   VPATH           += $(dir $(SRC))
+endif
+
+# Create a list of dependency files from the list of object files
+DEPENDENCY_FILES := $(OBJECT_FILES:%.o=%.d)
+
+# Create a list of common flags to pass to the compiler/linker/assembler
+BASE_CC_FLAGS    := -pipe -g$(DEBUG_FORMAT) -g$(DEBUG_LEVEL)
+ifneq ($(findstring $(ARCH), AVR8 XMEGA),)
+   BASE_CC_FLAGS += -mmcu=$(MCU) -fshort-enums -fno-inline-small-functions -fpack-struct
+else ifneq ($(findstring $(ARCH), UC3),)
+   BASE_CC_FLAGS += -mpart=$(MCU:at32%=%) -masm-addr-pseudos
+endif
+BASE_CC_FLAGS += -Wall -fno-strict-aliasing -funsigned-char -funsigned-bitfields -ffunction-sections
+BASE_CC_FLAGS += -I.
+BASE_CC_FLAGS += -DARCH=ARCH_$(ARCH)
+ifneq ($(F_CPU),)
+   BASE_CC_FLAGS += -DF_CPU=$(F_CPU)UL
+endif
+ifeq ($(LINKER_RELAXATIONS), Y)
+BASE_CC_FLAGS += -mrelax
+endif
+
+# Additional language specific compiler flags
+BASE_C_FLAGS   := -x c -O$(OPTIMIZATION) -std=$(C_STANDARD) -Wstrict-prototypes
+BASE_CPP_FLAGS := -x c++ -O$(OPTIMIZATION) -std=$(CPP_STANDARD)
+BASE_ASM_FLAGS := -x assembler-with-cpp
+
+# Create a list of flags to pass to the linker
+BASE_LD_FLAGS := -lm -Wl,-Map=$(TARGET).map,--cref -Wl,--gc-sections
+ifeq ($(LINKER_RELAXATIONS), Y)
+   BASE_LD_FLAGS += -Wl,--relax
+endif
+ifneq ($(findstring $(ARCH), AVR8 XMEGA),)
+   BASE_LD_FLAGS += -mmcu=$(MCU)
+else ifneq ($(findstring $(ARCH), UC3),)
+   BASE_LD_FLAGS += -mpart=$(MCU:at32%=%) --rodata-writable --direct-data
+endif
+
+# Determine flags to pass to the size utility based on its reported features (only invoke if size target required)
+# and on an architecture where this non-standard patch is available
+ifneq ($(ARCH), UC3)
+size: SIZE_MCU_FLAG    := $(shell $(CROSS)-size --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+size: SIZE_FORMAT_FLAG := $(shell $(CROSS)-size --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+endif
+
+# Pre-build informational target, to give compiler and project name information when building
+build_begin:
+	@echo $(MSG_INFO_MESSAGE) Begin compilation of project \"$(TARGET)\"...
+	@echo ""
+	@$(CROSS)-gcc --version
+
+# Post-build informational target, to project name information when building has completed
+build_end:
+	@echo $(MSG_INFO_MESSAGE) Finished building project \"$(TARGET)\".
+
+# Prints size information of a compiled application (FLASH, RAM and EEPROM usages)
+size: $(TARGET).elf
+	@echo $(MSG_SIZE_CMD) Determining size of \"$<\"
+	@echo ""
+	$(CROSS)-size $(SIZE_MCU_FLAG) $(SIZE_FORMAT_FLAG) $<
+
+# Prints size information on the symbols within a compiled application in decimal bytes
+symbol-sizes: $(TARGET).elf
+	@echo $(MSG_NM_CMD) Extracting \"$<\" symbols with decimal byte sizes
+	$(CROSS)-nm --size-sort --demangle --radix=d $<
+
+# Cleans intermediary build files, leaving only the compiled application files
+mostlyclean:
+	@echo $(MSG_REMOVE_CMD) Removing object files of \"$(TARGET)\"
+	rm -f $(OBJECT_FILES)
+	@echo $(MSG_REMOVE_CMD) Removing dependency files of \"$(TARGET)\"
+	rm -f $(DEPENDENCY_FILES)
+
+# Cleans all build files, leaving only the original source code
+clean: mostlyclean
+	@echo $(MSG_REMOVE_CMD) Removing output files of \"$(TARGET)\"
+	rm -f $(TARGET).elf $(TARGET).hex $(TARGET).bin $(TARGET).eep $(TARGET).map $(TARGET).lss $(TARGET).sym lib$(TARGET).a
+
+# Performs a complete build of the user application and prints size information afterwards
+all: build_begin elf hex bin lss sym size build_end
+
+# Helper targets, to build a specific type of output file without having to know the project target name
+lib: lib$(TARGET).a
+elf: $(TARGET).elf
+hex: $(TARGET).hex $(TARGET).eep
+bin: $(TARGET).bin
+lss: $(TARGET).lss
+sym: $(TARGET).sym
+
+# Default target to *create* the user application's specified source files; if this rule is executed by
+# make, the input source file doesn't exist and an error needs to be presented to the user
+$(SRC):
+	$(error Source file does not exist: $@)
+
+# Compiles an input C source file and generates an assembly listing for it
+%.s: %.c $(MAKEFILE_LIST)
+	@echo $(MSG_COMPILE_CMD) Generating assembly from C file \"$(notdir $<)\"
+	$(CROSS)-gcc -S $(BASE_CC_FLAGS) $(BASE_C_FLAGS) $(CC_FLAGS) $(C_FLAGS) $< -o $@
+
+# Compiles an input C++ source file and generates an assembly listing for it
+%.s: %.cpp $(MAKEFILE_LIST)
+	@echo $(MSG_COMPILE_CMD) Generating assembly from C++ file \"$(notdir $<)\"
+	$(CROSS)-gcc -S $(BASE_CC_FLAGS) $(BASE_CPP_FLAGS) $(CC_FLAGS) $(CPP_FLAGS) $< -o $@
+
+# Compiles an input C source file and generates a linkable object file for it
+$(OBJDIR)/%.o: %.c $(MAKEFILE_LIST)
+	@echo $(MSG_COMPILE_CMD) Compiling C file \"$(notdir $<)\"
+	$(CROSS)-gcc -c $(BASE_CC_FLAGS) $(BASE_C_FLAGS) $(CC_FLAGS) $(C_FLAGS) -MMD -MP -MF $(@:%.o=%.d) $< -o $@
+
+# Compiles an input C++ source file and generates a linkable object file for it
+$(OBJDIR)/%.o: %.cpp $(MAKEFILE_LIST)
+	@echo $(MSG_COMPILE_CMD) Compiling C++ file \"$(notdir $<)\"
+	$(CROSS)-gcc -c $(BASE_CC_FLAGS) $(BASE_CPP_FLAGS) $(CC_FLAGS) $(CPP_FLAGS) -MMD -MP -MF $(@:%.o=%.d) $< -o $@
+
+# Assembles an input ASM source file and generates a linkable object file for it
+$(OBJDIR)/%.o: %.S $(MAKEFILE_LIST)
+	@echo $(MSG_ASSEMBLE_CMD) Assembling \"$(notdir $<)\"
+	$(CROSS)-gcc -c $(BASE_CC_FLAGS) $(BASE_ASM_FLAGS) $(CC_FLAGS) $(ASM_FLAGS) -MMD -MP -MF $(@:%.o=%.d) $< -o $@
+
+# Generates a library archive file from the user application, which can be linked into other applications
+.PRECIOUS  : $(OBJECT_FILES)
+.SECONDARY : %.a
+%.a: $(OBJECT_FILES)
+	@echo $(MSG_ARCHIVE_CMD) Archiving object files into \"$@\"
+	$(CROSS)-ar rcs $@ $(OBJECT_FILES)
+
+# Generates an ELF debug file from the user application, which can be further processed for FLASH and EEPROM data
+# files, or used for programming and debugging directly
+.PRECIOUS  : $(OBJECT_FILES)
+.SECONDARY : %.elf
+%.elf: $(OBJECT_FILES)
+	@echo $(MSG_LINK_CMD) Linking object files into \"$@\"
+	$(CROSS)-gcc $^ -o $@ $(BASE_LD_FLAGS) $(LD_FLAGS)
+
+# Extracts out the loadable FLASH memory data from the project ELF file, and creates an Intel HEX format file of it
+%.hex: %.elf
+	@echo $(MSG_OBJCPY_CMD) Extracting HEX file data from \"$<\"
+	$(CROSS)-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature $< $@
+
+# Extracts out the loadable FLASH memory data from the project ELF file, and creates an Binary format file of it
+%.bin: %.elf
+	@echo $(MSG_OBJCPY_CMD) Extracting BIN file data from \"$<\"
+	$(CROSS)-objcopy -O binary -R .eeprom -R .fuse -R .lock -R .signature $< $@
+
+# Extracts out the loadable EEPROM memory data from the project ELF file, and creates an Intel HEX format file of it
+%.eep: %.elf
+	@echo $(MSG_OBJCPY_CMD) Extracting EEP file data from \"$<\"
+	$(CROSS)-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings $< $@ || exit 0
+
+# Creates an assembly listing file from an input project ELF file, containing interleaved assembly and source data
+%.lss: %.elf
+	@echo $(MSG_OBJDMP_CMD) Extracting LSS file data from \"$<\"
+	$(CROSS)-objdump -h -d -S -z $< > $@
+
+# Creates a symbol file listing the loadable and discarded symbols from an input project ELF file
+%.sym: %.elf
+	@echo $(MSG_NM_CMD) Extracting SYM file data from \"$<\"
+	$(CROSS)-nm -n $< > $@
+
+# Include build dependency files
+-include $(DEPENDENCY_FILES)
+
+# Phony build targets for this module
+.PHONY: build_begin build_end $(DMBS_BUILD_TARGETS)
diff --git a/LUFA/Build/DMBS/DMBS/hid.mk b/LUFA/Build/DMBS/DMBS/hid.mk
new file mode 100644
index 000000000..3f0d456e1
--- /dev/null
+++ b/LUFA/Build/DMBS/DMBS/hid.mk
@@ -0,0 +1,96 @@
+#
+#            DMBS Build System
+#     Released into the public domain.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#        www.fourwalledcubicle.com
+#
+
+DMBS_BUILD_MODULES         += HID
+DMBS_BUILD_TARGETS         += hid hid-ee teensy teensy-ee
+DMBS_BUILD_MANDATORY_VARS  += MCU TARGET
+DMBS_BUILD_OPTIONAL_VARS   +=
+DMBS_BUILD_PROVIDED_VARS   +=
+DMBS_BUILD_PROVIDED_MACROS +=
+
+# -----------------------------------------------------------------------------
+#               DMBS HID Bootloader Buildsystem Makefile Module.
+# -----------------------------------------------------------------------------
+# DESCRIPTION:
+#   Provides a set of targets to re-program a device currently running a HID
+#   class bootloader with a project's FLASH files.
+# -----------------------------------------------------------------------------
+# TARGETS:
+#
+#    hid                       - Program FLASH into target via
+#                                hid_bootloader_cli
+#    hid-ee                    - Program EEPROM into target via a temporary
+#                                AVR application and hid_bootloader_cli
+#    teensy                    - Program FLASH into target via
+#                                teensy_loader_cli
+#    teensy-ee                 - Program EEPROM into target via a temporary
+#                                AVR application and teensy_loader_cli
+#
+# MANDATORY PARAMETERS:
+#
+#    MCU                       - Microcontroller device model name
+#    TARGET                    - Application name
+#
+# OPTIONAL PARAMETERS:
+#
+#    (None)
+#
+# PROVIDED VARIABLES:
+#
+#    (None)
+#
+# PROVIDED MACROS:
+#
+#    (None)
+#
+# -----------------------------------------------------------------------------
+
+SHELL = /bin/sh
+
+DMBS_MODULE_PATH := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
+
+ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
+ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
+ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
+
+# Sanity-check values of mandatory user-supplied variables
+$(foreach MANDATORY_VAR, $(DMBS_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
+$(call ERROR_IF_EMPTY, MCU)
+$(call ERROR_IF_EMPTY, TARGET)
+
+# Output Messages
+MSG_HID_BOOTLOADER_CMD := ' [HID]     :'
+MSG_OBJCPY_CMD         := ' [OBJCPY]  :'
+MSG_MAKE_CMD           := ' [MAKE]    :'
+
+# Programs in the target FLASH memory using the HID_BOOTLOADER_CLI tool
+hid: $(TARGET).hex $(MAKEFILE_LIST)
+	@echo $(MSG_HID_BOOTLOADER_CMD) Programming FLASH with hid_bootloader_cli using \"$<\"
+	hid_bootloader_cli -mmcu=$(MCU) -v $<
+
+# Programs in the target EEPROM memory using the HID_BOOTLOADER_CLI tool (note: clears target FLASH memory)
+hid-ee: $(TARGET).eep $(MAKEFILE_LIST)
+	@echo $(MSG_OBJCPY_CMD) Converting \"$<\" to a binary file \"InputEEData.bin\"
+	avr-objcopy -I ihex -O binary $< $(DMBS_MODULE_PATH)/HID_EEPROM_Loader/InputEEData.bin
+	@echo $(MSG_MAKE_CMD) Making EEPROM loader application for \"$<\"
+	$(MAKE) -C $(DMBS_MODULE_PATH)/HID_EEPROM_Loader/ MCU=$(MCU) clean hid
+
+# Programs in the target FLASH memory using the TEENSY_BOOTLOADER_CLI tool
+teensy: $(TARGET).hex $(MAKEFILE_LIST)
+	@echo $(MSG_HID_BOOTLOADER_CMD) Programming FLASH with teensy_loader_cli using \"$<\"
+	teensy_loader_cli -mmcu=$(MCU) -v $<
+
+# Programs in the target EEPROM memory using the TEENSY_BOOTLOADER_CLI tool (note: clears target FLASH memory)
+teensy-ee: $(TARGET).hex $(MAKEFILE_LIST)
+	@echo $(MSG_OBJCPY_CMD) Converting \"$<\" to a binary file \"InputEEData.bin\"
+	avr-objcopy -I ihex -O binary $< $(DMBS_MODULE_PATH)/HID_EEPROM_Loader/InputEEData.bin
+	@echo $(MSG_MAKE_CMD) Making EEPROM loader application for \"$<\"
+	$(MAKE) -s -C $(DMBS_MODULE_PATH)/HID_EEPROM_Loader/ MCU=$(MCU) clean teensy
+
+# Phony build targets for this module
+.PHONY: $(DMBS_BUILD_TARGETS)
diff --git a/LUFA/Build/DMBS/Readme.md b/LUFA/Build/DMBS/Readme.md
new file mode 100644
index 000000000..f5533a9ab
--- /dev/null
+++ b/LUFA/Build/DMBS/Readme.md
@@ -0,0 +1,105 @@
+DMBS - Dean's Makefile Build System
+===================================
+
+
+Project Overview
+----------------
+
+GNU Make is scary, and it's tough to get the rules right sometimes. Many
+projects get by via simple copy-pasting of old makefiles, resulting in many
+redundant copies of the same old rules. DMBS aims to solve this by providing a
+simple modular set of makefiles which can be included by your project to quickly
+add various build functionality.
+
+This aims to replace the old WinAVR "mfile" makefile template, giving better
+functionality and much simpler user makefiles.
+
+
+Benefits:
+----------------
+
+Apart from much simpler, cleaner makefiles DMBS carries the aim of making the
+process of troubleshooting build issues a little easier. Lots can go wrong, so
+DMBS tries to sanity check its inputs wherever possible, and produce
+human-readable error messages. Forgotten to set a variable? Get a
+`Makefile {X} value not set.` message, rather than a possibly unrelated message.
+Have the wrong filename? See `Source file does not exist: {X}` rather than the
+infamous `No rule to make target {X}` message.
+
+
+Use:
+----------------
+
+A template user makefile is provided in the `Template` directory. DMBS modules
+are included via a GNU Make `include` directive. While the DMBS `core` module is
+always required, you can pick and choose what other modules you wish to add to
+your user project.
+
+Here's an example user makefile:
+
+	MCU          = atmega128
+	ARCH         = AVR8
+	F_CPU        = 8000000
+	OPTIMIZATION = s
+	TARGET       = Template
+	SRC          = $(TARGET).c
+	CC_FLAGS     =
+	LD_FLAGS     =
+
+	# Default target
+	all:
+
+	# Include DMBS build script makefiles
+	DMBS_PATH   ?= ../DMBS
+	include $(DMBS_PATH)/core.mk
+	include $(DMBS_PATH)/gcc.mk
+	include $(DMBS_PATH)/cppcheck.mk
+	include $(DMBS_PATH)/doxygen.mk
+	include $(DMBS_PATH)/dfu.mk
+	include $(DMBS_PATH)/hid.mk
+	include $(DMBS_PATH)/avrdude.mk
+	include $(DMBS_PATH)/atprogram.mk
+
+Each DMBS module can optionally supply one or more Make variables and macros,
+which you can reference in your user makefile. Additionally, modules can require
+one or more variables to be set by the user makefile, with (in some cases) sane
+defaults used if left out.
+
+As modules are added, you can get a list of available targets by simply typing
+`make help` from the command line. This will produce a formatted list of targets
+as well as mandatory and optional variables and exposed variables and macros.
+
+
+License
+----------------
+
+DMBS is released into the public domain, making is suitable for use everywhere,
+by everyone. Contributions are greatly appreciated however, in order to make
+DMBS better for everyone.
+
+The actual license text is as follows:
+
+	This is free and unencumbered software released into the public domain.
+
+	Anyone is free to copy, modify, publish, use, compile, sell, or
+	distribute this software, either in source code form or as a compiled
+	binary, for any purpose, commercial or non-commercial, and by any
+	means.
+
+	In jurisdictions that recognize copyright laws, the author or authors
+	of this software dedicate any and all copyright interest in the
+	software to the public domain. We make this dedication for the benefit
+	of the public at large and to the detriment of our heirs and
+	successors. We intend this dedication to be an overt act of
+	relinquishment in perpetuity of all present and future rights to this
+	software under copyright law.
+
+	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+	EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+	MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+	IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+	ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+	OTHER DEALINGS IN THE SOFTWARE.
+
+	For more information, please refer to <http://unlicense.org/>
diff --git a/LUFA/Build/DMBS/Template/Template.c b/LUFA/Build/DMBS/Template/Template.c
new file mode 100644
index 000000000..95d36f7db
--- /dev/null
+++ b/LUFA/Build/DMBS/Template/Template.c
@@ -0,0 +1,12 @@
+/*
+             DMBS Build System
+      Released into the public domain.
+
+   dean [at] fourwalledcubicle [dot] com
+         www.fourwalledcubicle.com
+ */
+
+int main(void)
+{
+	// Application code here.
+}
diff --git a/LUFA/Build/DMBS/Template/makefile b/LUFA/Build/DMBS/Template/makefile
new file mode 100644
index 000000000..d88292388
--- /dev/null
+++ b/LUFA/Build/DMBS/Template/makefile
@@ -0,0 +1,32 @@
+#
+#            DMBS Build System
+#     Released into the public domain.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#        www.fourwalledcubicle.com
+#
+
+# Run "make help" for target help.
+
+MCU          = atmega128
+ARCH         = AVR8
+F_CPU        = 8000000
+OPTIMIZATION = s
+TARGET       = Template
+SRC          = $(TARGET).c
+CC_FLAGS     =
+LD_FLAGS     =
+
+# Default target
+all:
+
+# Include DMBS build script makefiles
+DMBS_PATH   ?= ../DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
-- 
cgit v1.2.3


From 2fcd50ada8e0916d1ed5addb2567b4bfcee8497c Mon Sep 17 00:00:00 2001
From: Dean Camera <dean@fourwalledcubicle.com>
Date: Tue, 22 Dec 2015 22:14:09 +1100
Subject: Fix C++ builds, XPLAINBridge project.

---
 LUFA/Build/lufa_build.mk       | 12 ++++++++----
 Projects/XPLAINBridge/makefile |  6 +++---
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/LUFA/Build/lufa_build.mk b/LUFA/Build/lufa_build.mk
index 1aae2a388..d20493ea2 100644
--- a/LUFA/Build/lufa_build.mk
+++ b/LUFA/Build/lufa_build.mk
@@ -66,15 +66,19 @@ else ifeq ($(ARCH), UC3)
    $(warning The UC3 device support is currently EXPERIMENTAL (incomplete and/or non-functional), and is included for preview purposes only.)
 endif
 
-# LUFA specific standard build options
-C_FLAGS += -I. -I$(patsubst %/,%,$(LUFA_PATH))/..
-C_FLAGS += -DARCH=ARCH_$(ARCH) -DBOARD=BOARD_$(BOARD) -DF_USB=$(F_USB)UL
+# Common LUFA C/C++ includes/definitions
+LUFA_CXX_INCLUDES = -I. -I$(patsubst %/,%,$(LUFA_PATH))/..
+LUFA_CXX_DEFINES  = -DARCH=ARCH_$(ARCH) -DBOARD=BOARD_$(BOARD) -DF_USB=$(F_USB)UL
 
 # This flag is required for bootloaders as GCC will emit invalid jump table
 # assembly code for devices with large amounts of flash; the jump table target
 # is extracted from FLASH without using the correct ELPM instruction, resulting
 # in a pseudo-random jump target.
-C_FLAGS += -fno-jump-tables
+LUFA_CXX_FLAGS    = -fno-jump-tables
+
+# LUFA specific standard build options
+C_FLAGS   += $(LUFA_CXX_INCLUDES) $(LUFA_CXX_DEFINES) $(LUFA_CXX_FLAGS)
+CPP_FLAGS += $(LUFA_CXX_INCLUDES) $(LUFA_CXX_DEFINES) $(LUFA_CXX_FLAGS)
 
 DMBS_PATH := $(LUFA_PATH)/Build/DMBS/DMBS
 include $(DMBS_PATH)/gcc.mk
diff --git a/Projects/XPLAINBridge/makefile b/Projects/XPLAINBridge/makefile
index 65ca730f9..aacca6780 100644
--- a/Projects/XPLAINBridge/makefile
+++ b/Projects/XPLAINBridge/makefile
@@ -31,13 +31,13 @@ LD_FLAGS     =
 # Default target
 all:
 
+OBJDIR      := obj
+
 # Since this project borrows files from the AVRISP-MKII project which may also have an
 # identical OBJDIR directory, we need to enforce the use of this project's object file
 # directory as the one where the build object files are to be stored by pre-pending the
 # absolute path of the current project to the OBJDIR variable.
-ifneq ($(OBJDIR),)
-  override OBJDIR:=$(shell pwd)/$(OBJDIR)
-endif
+override OBJDIR:=$(shell pwd)/$(OBJDIR)
 
 # Include LUFA build script makefiles
 include $(LUFA_PATH)/Build/lufa_core.mk
-- 
cgit v1.2.3


From 9864c02eb4a33b260cc016b7108a12412b9264b5 Mon Sep 17 00:00:00 2001
From: Dean Camera <dean@fourwalledcubicle.com>
Date: Wed, 27 Jan 2016 20:31:11 +1100
Subject: Minor documentation improvements.

---
 LUFA/DoxygenPages/LUFAPoweredProjects.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/LUFA/DoxygenPages/LUFAPoweredProjects.txt b/LUFA/DoxygenPages/LUFAPoweredProjects.txt
index 853bd3d2c..fa94add49 100644
--- a/LUFA/DoxygenPages/LUFAPoweredProjects.txt
+++ b/LUFA/DoxygenPages/LUFAPoweredProjects.txt
@@ -169,6 +169,7 @@
  *  \li BitFury, a Bitcoin ASIC miner: https://github.com/aauer1/LUFA-BitFury/tree/master/Projects/BitfuryBTC
  *  \li Ceberus, a MadCatz Xbox 360 arcade stick modifier: http://www.phreakmods.com/products/cerberus
  *  \li CFFA3000, a CompactFlash interface for the Apple II: http://www.dreher.net/CFforAppleII
+ *  \li ChameleonMini, a RFID monitoring tool: https://github.com/emsec/ChameleonMini/wiki
  *  \li Digital Survey Instruments Magnetometer and Pointer: http://www.digitalsurveyinstruments.com/
  *  \li FinchRobot, a robot designed for educational use: http://www.finchrobot.com/
  *  \li Flysight, a GPS logger for wingsuit pilots: http://flysight.ca/
-- 
cgit v1.2.3


From 3069b7d9d2a01f7f1e68722e722fa8e868154585 Mon Sep 17 00:00:00 2001
From: Dean Camera <dean@fourwalledcubicle.com>
Date: Sun, 3 Apr 2016 11:35:25 +1000
Subject: Update to latest DMBS version.

---
 LUFA/Build/DMBS/DMBS/atprogram.mk | 2 +-
 LUFA/Build/DMBS/DMBS/avrdude.mk   | 7 +++++--
 LUFA/Build/DMBS/DMBS/core.mk      | 2 +-
 LUFA/Build/DMBS/DMBS/gcc.mk       | 6 ++++++
 LUFA/Build/DMBS/Readme.md         | 4 ++++
 5 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/LUFA/Build/DMBS/DMBS/atprogram.mk b/LUFA/Build/DMBS/DMBS/atprogram.mk
index de801b003..7e3815e4c 100644
--- a/LUFA/Build/DMBS/DMBS/atprogram.mk
+++ b/LUFA/Build/DMBS/DMBS/atprogram.mk
@@ -55,7 +55,7 @@ ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $
 ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
 
 # Default values of optionally user-supplied variables
-ATPROGRAM_PROGRAMMER ?= jtagice3
+ATPROGRAM_PROGRAMMER ?= atmelice
 ATPROGRAM_INTERFACE  ?= jtag
 ATPROGRAM_PORT       ?=
 
diff --git a/LUFA/Build/DMBS/DMBS/avrdude.mk b/LUFA/Build/DMBS/DMBS/avrdude.mk
index d9b4df048..149cf5c14 100644
--- a/LUFA/Build/DMBS/DMBS/avrdude.mk
+++ b/LUFA/Build/DMBS/DMBS/avrdude.mk
@@ -9,7 +9,7 @@
 DMBS_BUILD_MODULES         += AVRDUDE
 DMBS_BUILD_TARGETS         += avrdude avrdude-ee
 DMBS_BUILD_MANDATORY_VARS  += MCU TARGET
-DMBS_BUILD_OPTIONAL_VARS   += AVRDUDE_PROGRAMMER AVRDUDE_PORT AVRDUDE_FLAGS
+DMBS_BUILD_OPTIONAL_VARS   += AVRDUDE_PROGRAMMER AVRDUDE_PORT AVRDUDE_FLAGS AVRDUDE_MEMORY
 DMBS_BUILD_PROVIDED_VARS   +=
 DMBS_BUILD_PROVIDED_MACROS +=
 
@@ -37,6 +37,8 @@ DMBS_BUILD_PROVIDED_MACROS +=
 #    AVRDUDE_PROGRAMMER        - Name of programming hardware to use
 #    AVRDUDE_PORT              - Name of communication port to use
 #    AVRDUDE_FLAGS             - Flags to pass to avr-dude
+#    AVRDUDE_MEMORY            - Memory space to program application into (e.g.
+#                                "application" for an XMEGA DFU device)
 #
 # PROVIDED VARIABLES:
 #
@@ -58,6 +60,7 @@ ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(s
 AVRDUDE_PROGRAMMER ?= jtagicemkii
 AVRDUDE_PORT       ?= usb
 AVRDUDE_FLAGS      ?=
+AVRDUDE_MEMORY     ?= flash
 
 # Sanity check user supplied values
 $(foreach MANDATORY_VAR, $(DMBS_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
@@ -75,7 +78,7 @@ BASE_AVRDUDE_FLAGS := -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
 # Programs in the target FLASH memory using AVRDUDE
 avrdude: $(TARGET).hex $(MAKEFILE_LIST)
 	@echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" FLASH using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\"
-	avrdude $(BASE_AVRDUDE_FLAGS) -U flash:w:$< $(AVRDUDE_FLAGS)
+	avrdude $(BASE_AVRDUDE_FLAGS) -U $(AVRDUDE_MEMORY):w:$< $(AVRDUDE_FLAGS)
 
 # Programs in the target EEPROM memory using AVRDUDE
 avrdude-ee: $(TARGET).eep $(MAKEFILE_LIST)
diff --git a/LUFA/Build/DMBS/DMBS/core.mk b/LUFA/Build/DMBS/DMBS/core.mk
index 41992566d..bc85777a7 100644
--- a/LUFA/Build/DMBS/DMBS/core.mk
+++ b/LUFA/Build/DMBS/DMBS/core.mk
@@ -55,7 +55,7 @@ SHELL = /bin/sh
 
 
 # Current DMBS release version
-DMBS_VERSION = 0.3
+DMBS_VERSION = 0.4
 
 
 # Converts a given input to a printable output using "(None)" if no items are in the list
diff --git a/LUFA/Build/DMBS/DMBS/gcc.mk b/LUFA/Build/DMBS/DMBS/gcc.mk
index b9347a60b..f3c695502 100644
--- a/LUFA/Build/DMBS/DMBS/gcc.mk
+++ b/LUFA/Build/DMBS/DMBS/gcc.mk
@@ -192,6 +192,12 @@ BASE_C_FLAGS   := -x c -O$(OPTIMIZATION) -std=$(C_STANDARD) -Wstrict-prototypes
 BASE_CPP_FLAGS := -x c++ -O$(OPTIMIZATION) -std=$(CPP_STANDARD)
 BASE_ASM_FLAGS := -x assembler-with-cpp
 
+# This flag is required for bootloaders as GCC will emit invalid jump table
+# assembly code for devices with large amounts of flash; the jump table target
+# is extracted from FLASH without using the correct ELPM instruction, resulting
+# in a pseudo-random jump target.
+BASE_CC_FLAGS += -fno-jump-tables
+
 # Create a list of flags to pass to the linker
 BASE_LD_FLAGS := -lm -Wl,-Map=$(TARGET).map,--cref -Wl,--gc-sections
 ifeq ($(LINKER_RELAXATIONS), Y)
diff --git a/LUFA/Build/DMBS/Readme.md b/LUFA/Build/DMBS/Readme.md
index f5533a9ab..448db1e70 100644
--- a/LUFA/Build/DMBS/Readme.md
+++ b/LUFA/Build/DMBS/Readme.md
@@ -35,6 +35,10 @@ are included via a GNU Make `include` directive. While the DMBS `core` module is
 always required, you can pick and choose what other modules you wish to add to
 your user project.
 
+DMBS is also used in the LUFA Project which provides a
+[detailed documentation](http://www.fourwalledcubicle.com/files/LUFA/Doc/151115/html/_page__build_system.html)
+of DMBS.
+
 Here's an example user makefile:
 
 	MCU          = atmega128
-- 
cgit v1.2.3


From 51d3adfe1869e4a45c8368bb00a485be052eecdb Mon Sep 17 00:00:00 2001
From: Dean Camera <dean@fourwalledcubicle.com>
Date: Sun, 3 Apr 2016 13:52:00 +1000
Subject: Update to latest version of DMBS.

---
 LUFA/Build/DMBS/.gitignore        |   9 ++
 LUFA/Build/DMBS/DMBS/Modules.md   |  26 +++++
 LUFA/Build/DMBS/DMBS/atprogram.md | 111 +++++++++++++++++++++
 LUFA/Build/DMBS/DMBS/atprogram.mk |  35 -------
 LUFA/Build/DMBS/DMBS/avrdude.md   | 116 ++++++++++++++++++++++
 LUFA/Build/DMBS/DMBS/avrdude.mk   |  37 -------
 LUFA/Build/DMBS/DMBS/core.md      | 116 ++++++++++++++++++++++
 LUFA/Build/DMBS/DMBS/core.mk      |  41 --------
 LUFA/Build/DMBS/DMBS/cppcheck.md  | 126 ++++++++++++++++++++++++
 LUFA/Build/DMBS/DMBS/cppcheck.mk  |  41 --------
 LUFA/Build/DMBS/DMBS/dfu.md       | 114 ++++++++++++++++++++++
 LUFA/Build/DMBS/DMBS/dfu.mk       |  33 -------
 LUFA/Build/DMBS/DMBS/doxygen.md   | 110 +++++++++++++++++++++
 LUFA/Build/DMBS/DMBS/doxygen.mk   |  42 +-------
 LUFA/Build/DMBS/DMBS/gcc.md       | 196 ++++++++++++++++++++++++++++++++++++++
 LUFA/Build/DMBS/DMBS/gcc.mk       |  67 -------------
 LUFA/Build/DMBS/DMBS/hid.md       | 121 +++++++++++++++++++++++
 LUFA/Build/DMBS/DMBS/hid.mk       |  37 -------
 LUFA/Build/DMBS/Readme.md         |   4 +-
 19 files changed, 1049 insertions(+), 333 deletions(-)
 create mode 100644 LUFA/Build/DMBS/.gitignore
 create mode 100644 LUFA/Build/DMBS/DMBS/Modules.md
 create mode 100644 LUFA/Build/DMBS/DMBS/atprogram.md
 create mode 100644 LUFA/Build/DMBS/DMBS/avrdude.md
 create mode 100644 LUFA/Build/DMBS/DMBS/core.md
 create mode 100644 LUFA/Build/DMBS/DMBS/cppcheck.md
 create mode 100644 LUFA/Build/DMBS/DMBS/dfu.md
 create mode 100644 LUFA/Build/DMBS/DMBS/doxygen.md
 create mode 100644 LUFA/Build/DMBS/DMBS/gcc.md
 create mode 100644 LUFA/Build/DMBS/DMBS/hid.md

diff --git a/LUFA/Build/DMBS/.gitignore b/LUFA/Build/DMBS/.gitignore
new file mode 100644
index 000000000..938768908
--- /dev/null
+++ b/LUFA/Build/DMBS/.gitignore
@@ -0,0 +1,9 @@
+*.lss
+*.bin
+*.elf
+*.hex
+*.eep
+*.map
+*.o
+*.d
+*.sym
diff --git a/LUFA/Build/DMBS/DMBS/Modules.md b/LUFA/Build/DMBS/DMBS/Modules.md
new file mode 100644
index 000000000..65caf8a60
--- /dev/null
+++ b/LUFA/Build/DMBS/DMBS/Modules.md
@@ -0,0 +1,26 @@
+DMBS - Dean's Makefile Build System
+===================================
+
+
+Modules Overview
+---------------
+
+The following modules are currently included:
+
+ - [ATPROGRAM](atprogram.md) - Device Programming
+ - [AVRDUDE](avrdude.md) - Device Programming
+ - [CORE](core.md) - DMBS Core Functionality
+ - [CPPCHECK](cppcheck.md) - Static Code Analysis
+ - [DFU](dfu.md) - Device Programming
+ - [DOXYGEN](doxygen.md) - Automated Source Code Documentation
+ - [GCC](gcc.md) - Compiling/Assembling/Linking with GCC
+ - [HID](hid.md) - Device Programming
+
+To use a module, you will need to add the following boilerplate to your
+makefile:
+
+    # Include DMBS build script makefiles
+    DMBS_PATH   ?= ../DMBS
+
+Which is then used to indicate the location of your DMBS installation, relative
+to the current directory.
diff --git a/LUFA/Build/DMBS/DMBS/atprogram.md b/LUFA/Build/DMBS/DMBS/atprogram.md
new file mode 100644
index 000000000..d84cc9860
--- /dev/null
+++ b/LUFA/Build/DMBS/DMBS/atprogram.md
@@ -0,0 +1,111 @@
+DMBS - Dean's Makefile Build System
+===================================
+
+
+Module: ATPROGRAM
+-----------------
+
+The ATPROGRAM module provides build targets for use with the official
+`ATPROGRAM` back-end utility distributed with the free
+[Atmel Studio](http://www.atmel.com) software released by Atmel.
+
+## Importing This Module into a Makefile:
+
+To use this module in your application makefile, add the following code to your
+makefile:
+
+    include $(DMBS_PATH)/atprogram.mk
+
+## Prerequisites:
+
+This module requires the `atprogram.exe` utility to be available in your
+system's `PATH` variable. The `atprogram.exe` utility is distributed in Atmel
+Studio (usually) inside the application install folder's `atbackend`
+subdirectory.
+
+## Build Targets:
+
+The following targets are supported by this module:
+
+<table>
+ <tbody>
+   <tr>
+    <td>atprogram</td>
+    <td>Program the device FLASH memory with the application's executable data.</td>
+   </tr>
+   <tr>
+    <td>atprogram-ee</td>
+    <td>Program the device EEPROM memory with the application's EEPROM data.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Mandatory Variables:
+
+The following variables must be defined (with a `NAME = VALUE` syntax, one
+variable per line) in the user makefile to be able to use this module:
+
+<table>
+ <tbody>
+   <tr>
+    <td>MCU</td>
+    <td>Name of the Atmel processor model (e.g. `at90usb1287`).</td>
+   </tr>
+   <tr>
+    <td>TARGET</td>
+    <td>Name of the application output file prefix (e.g. `TestApplication`).</td>
+   </tr>
+ </tbody>
+</table>
+
+## Optional Variables:
+
+The following variables may be defined (with a `NAME = VALUE` syntax, one
+variable per line) in the user makefile. If not specified, a default value will
+be assumed.
+
+<table>
+ <tbody>
+   <tr>
+    <td>ATPROGRAM_PROGRAMMER</td>
+    <td>Name of the Atmel programmer or debugger tool to communicate with (e.g. `jtagice3`). Default is `atmelice`.</td>
+   </tr>
+   <tr>
+    <td>ATPROGRAM_INTERFACE</td>
+    <td>Name of the programming interface to use when programming the target (e.g. `spi`). Default is `jtag`.</td>
+   </tr>
+   <tr>
+    <td>ATPROGRAM_PORT</td>
+    <td>Name of the communication port to use when when programming with a serially connected tool (e.g. `COM2`). Default is `usb`.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Provided Variables:
+
+The following variables may be referenced in a user makefile (via `$(NAME)`
+syntax) if desired, as they are provided by this module.
+
+<table>
+ <tbody>
+   <tr>
+    <td>N/A</td>
+    <td>This module provides no variables.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Provided Macros:
+
+The following macros may be referenced in a user makefile (via
+`$(call NAME, ARG1, ARG2, ...)` syntax) if desired, as they are provided by
+this module.
+
+<table>
+ <tbody>
+   <tr>
+    <td>N/A</td>
+    <td>This module provides no macros.</td>
+   </tr>
+ </tbody>
+</table>
diff --git a/LUFA/Build/DMBS/DMBS/atprogram.mk b/LUFA/Build/DMBS/DMBS/atprogram.mk
index 7e3815e4c..5c433d7db 100644
--- a/LUFA/Build/DMBS/DMBS/atprogram.mk
+++ b/LUFA/Build/DMBS/DMBS/atprogram.mk
@@ -13,41 +13,6 @@ DMBS_BUILD_OPTIONAL_VARS   += ATPROGRAM_PROGRAMMER ATPROGRAM_INTERFACE ATPROGRAM
 DMBS_BUILD_PROVIDED_VARS   +=
 DMBS_BUILD_PROVIDED_MACROS +=
 
-# -----------------------------------------------------------------------------
-#             DMBS ATPROGRAM Programmer Buildsystem Makefile Module.
-# -----------------------------------------------------------------------------
-# DESCRIPTION:
-#   Provides a set of targets to re-program a device using the Atmel atprogram
-#   utility in AVR Studio 5.x and Atmel Studio 6.0 onwards.
-# -----------------------------------------------------------------------------
-# TARGETS:
-#
-#    atprogram                 - Program target FLASH with application using
-#                                atprogram
-#    atprogram-ee              - Program target EEPROM with application data
-#                                using atprogram
-#
-# MANDATORY PARAMETERS:
-#
-#    MCU                       - Microcontroller device model name
-#    TARGET                    - Application name
-#
-# OPTIONAL PARAMETERS:
-#
-#    ATPROGRAM_PROGRAMMER      - Name of programming hardware to use
-#    ATPROGRAM_INTERFACE       - Name of programming interface to use
-#    ATPROGRAM_PORT            - Name of communication port to use
-#
-# PROVIDED VARIABLES:
-#
-#    (None)
-#
-# PROVIDED MACROS:
-#
-#    (None)
-#
-# -----------------------------------------------------------------------------
-
 SHELL = /bin/sh
 
 ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
diff --git a/LUFA/Build/DMBS/DMBS/avrdude.md b/LUFA/Build/DMBS/DMBS/avrdude.md
new file mode 100644
index 000000000..6af6c70fd
--- /dev/null
+++ b/LUFA/Build/DMBS/DMBS/avrdude.md
@@ -0,0 +1,116 @@
+DMBS - Dean's Makefile Build System
+===================================
+
+
+Module: AVRDUDE
+-----------------
+
+The AVRDUDE module provides build targets for use with the official
+open source `AVRDUDE` programmer utility, for the reprogramming of Atmel devices
+using a wide variety of official and non-official programming devices and
+bootloaders.
+
+## Importing This Module into a Makefile:
+
+To use this module in your application makefile, add the following code to your
+makefile:
+
+    include $(DMBS_PATH)/avrdude.mk
+
+## Prerequisites:
+
+This module requires the `avrdude` utility to be available in your
+system's `PATH` variable. The `avrdude` utility is distributed on the project's
+[official site](https://savannah.nongnu.org/projects/avrdude) but is also
+made available in many *nix operating system's package managers.
+
+## Build Targets:
+
+The following targets are supported by this module:
+
+<table>
+ <tbody>
+   <tr>
+    <td>avrdude</td>
+    <td>Program the device FLASH memory with the application's executable data.</td>
+   </tr>
+   <tr>
+    <td>avrdude-ee</td>
+    <td>Program the device EEPROM memory with the application's EEPROM data.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Mandatory Variables:
+
+The following variables must be defined (with a `NAME = VALUE` syntax, one
+variable per line) in the user makefile to be able to use this module:
+
+<table>
+ <tbody>
+   <tr>
+    <td>MCU</td>
+    <td>Name of the Atmel processor model (e.g. `at90usb1287`).</td>
+   </tr>
+   <tr>
+    <td>TARGET</td>
+    <td>Name of the application output file prefix (e.g. `TestApplication`).</td>
+   </tr>
+ </tbody>
+</table>
+
+## Optional Variables:
+
+The following variables may be defined (with a `NAME = VALUE` syntax, one
+variable per line) in the user makefile. If not specified, a default value will
+be assumed.
+
+<table>
+ <tbody>
+   <tr>
+    <td>AVRDUDE_PROGRAMMER</td>
+    <td>Name of the programmer/debugger tool or bootloader to communicate with (e.g. `jtagicemkii`). Default is `jtagicemkii`.</td>
+   </tr>
+   <tr>
+    <td>AVRDUDE_PORT</td>
+    <td>Name of the communication port to use when when programming with a serially connected tool (e.g. `COM2`). Default is `usb`.</td>
+   </tr>
+   <tr>
+    <td>AVRDUDE_FLAGS</td>
+    <td>Additional flags to pass to `avrdude` when invoking the tool. Default is empty (no additional flags).</td>
+   </tr>
+   <tr>
+    <td>AVRDUDE_MEMORY</td>
+    <td>Memory space to program when executing the `avrdude` target (e.g. 'application` for an XMEGA device). Default is `flash`.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Provided Variables:
+
+The following variables may be referenced in a user makefile (via `$(NAME)`
+syntax) if desired, as they are provided by this module.
+
+<table>
+ <tbody>
+   <tr>
+    <td>N/A</td>
+    <td>This module provides no variables.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Provided Macros:
+
+The following macros may be referenced in a user makefile (via
+`$(call NAME, ARG1, ARG2, ...)` syntax) if desired, as they are provided by
+this module.
+
+<table>
+ <tbody>
+   <tr>
+    <td>N/A</td>
+    <td>This module provides no macros.</td>
+   </tr>
+ </tbody>
+</table>
diff --git a/LUFA/Build/DMBS/DMBS/avrdude.mk b/LUFA/Build/DMBS/DMBS/avrdude.mk
index 149cf5c14..6dba68de4 100644
--- a/LUFA/Build/DMBS/DMBS/avrdude.mk
+++ b/LUFA/Build/DMBS/DMBS/avrdude.mk
@@ -13,43 +13,6 @@ DMBS_BUILD_OPTIONAL_VARS   += AVRDUDE_PROGRAMMER AVRDUDE_PORT AVRDUDE_FLAGS AVRD
 DMBS_BUILD_PROVIDED_VARS   +=
 DMBS_BUILD_PROVIDED_MACROS +=
 
-# -----------------------------------------------------------------------------
-#             DMBS AVRDUDE Programmer Buildsystem Makefile Module.
-# -----------------------------------------------------------------------------
-# DESCRIPTION:
-#   Provides a set of targets to re-program a device using the open source
-#   avr-dude utility.
-# -----------------------------------------------------------------------------
-# TARGETS:
-#
-#    avrdude                   - Program target FLASH with application using
-#                                avrdude
-#    avrdude-ee                - Program target EEPROM with application data
-#                                using avrdude
-#
-# MANDATORY PARAMETERS:
-#
-#    MCU                       - Microcontroller device model name
-#    TARGET                    - Application name
-#
-# OPTIONAL PARAMETERS:
-#
-#    AVRDUDE_PROGRAMMER        - Name of programming hardware to use
-#    AVRDUDE_PORT              - Name of communication port to use
-#    AVRDUDE_FLAGS             - Flags to pass to avr-dude
-#    AVRDUDE_MEMORY            - Memory space to program application into (e.g.
-#                                "application" for an XMEGA DFU device)
-#
-# PROVIDED VARIABLES:
-#
-#    (None)
-#
-# PROVIDED MACROS:
-#
-#    (None)
-#
-# -----------------------------------------------------------------------------
-
 SHELL = /bin/sh
 
 ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
diff --git a/LUFA/Build/DMBS/DMBS/core.md b/LUFA/Build/DMBS/DMBS/core.md
new file mode 100644
index 000000000..a6faf74d1
--- /dev/null
+++ b/LUFA/Build/DMBS/DMBS/core.md
@@ -0,0 +1,116 @@
+DMBS - Dean's Makefile Build System
+===================================
+
+
+Module: CORE
+------------
+
+The CORE module provides the core DMBS infrastructure used by other DMBS
+modules, and must always be imported. Additionally, this module provides the
+help system for DMBS.
+
+## Importing This Module into a Makefile:
+
+To use this module in your application makefile, add the following code to your
+makefile:
+
+    include $(DMBS_PATH)/core.mk
+
+## Prerequisites:
+
+None.
+
+## Build Targets:
+
+The following targets are supported by this module:
+
+<table>
+ <tbody>
+   <tr>
+    <td>help</td>
+    <td>Show help for the current project, including a list of all available targets, variables and macros from the imported modules.</td>
+   </tr>
+   <tr>
+    <td>list_targets</td>
+    <td>Show a list of all build targets from the imported modules.</td>
+   </tr>
+   <tr>
+    <td>list_modules</td>
+    <td>Show a list of all imported modules.</td>
+   </tr>
+   <tr>
+    <td>list_mandatory</td>
+    <td>Show a list of all mandatory variables from the imported modules.</td>
+   </tr>
+   <tr>
+    <td>list_optional</td>
+    <td>Show a list of all optional variables from the imported modules.</td>
+   </tr>
+   <tr>
+    <td>list_provided</td>
+    <td>Show a list of all variables provided by the imported modules.</td>
+   </tr>
+   <tr>
+    <td>list_macros</td>
+    <td>Show a list of all macros provided by the imported modules.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Mandatory Variables:
+
+The following variables must be defined (with a `NAME = VALUE` syntax, one
+variable per line) in the user makefile to be able to use this module:
+
+<table>
+ <tbody>
+   <tr>
+    <td>N/A</td>
+    <td>This module has no mandatory variables.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Optional Variables:
+
+The following variables may be defined (with a `NAME = VALUE` syntax, one
+variable per line) in the user makefile. If not specified, a default value will
+be assumed.
+
+<table>
+ <tbody>
+   <tr>
+    <td>N/A</td>
+    <td>This module has no optional variables.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Provided Variables:
+
+The following variables may be referenced in a user makefile (via `$(NAME)`
+syntax) if desired, as they are provided by this module.
+
+<table>
+ <tbody>
+   <tr>
+    <td>DMBS_VERSION</td>
+    <td>Current version of this DMBS release.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Provided Macros:
+
+The following macros may be referenced in a user makefile (via
+`$(call NAME, ARG1, ARG2, ...)` syntax) if desired, as they are provided by
+this module.
+
+<table>
+ <tbody>
+   <tr>
+    <td>N/A</td>
+    <td>This module provides no macros.</td>
+   </tr>
+ </tbody>
+</table>
diff --git a/LUFA/Build/DMBS/DMBS/core.mk b/LUFA/Build/DMBS/DMBS/core.mk
index bc85777a7..913731e69 100644
--- a/LUFA/Build/DMBS/DMBS/core.mk
+++ b/LUFA/Build/DMBS/DMBS/core.mk
@@ -13,55 +13,14 @@ DMBS_BUILD_OPTIONAL_VARS   +=
 DMBS_BUILD_PROVIDED_VARS   += DMBS_VERSION
 DMBS_BUILD_PROVIDED_MACROS +=
 
-# -----------------------------------------------------------------------------
-#               DMBS Core Build System Makefile Module.
-# -----------------------------------------------------------------------------
-# DESCRIPTION:
-#   Provides a set of core build targets for the DMBS build system
-# -----------------------------------------------------------------------------
-# TARGETS:
-#
-#    help                      - Build system help
-#    list_targets              - List all build targets
-#    list_modules              - List all build modules
-#    list_mandatory            - List all mandatory make variables required by
-#                                the included build modules of the application
-#    list_optional             - List all optional make variables required by
-#                                the included build modules of the application
-#    list_provided             - List all provided make variables from the
-#                                included build modules of the application
-#    list_macros               - List all provided make macros from the
-#                                included build modules of the application
-#
-# MANDATORY PARAMETERS:
-#
-#    (None)
-#
-# OPTIONAL PARAMETERS:
-#
-#    (None)
-#
-# PROVIDED VARIABLES:
-#
-#    DMBS_VERSION
-#
-# PROVIDED MACROS:
-#
-#    (None)
-#
-# -----------------------------------------------------------------------------
-
 SHELL = /bin/sh
 
-
 # Current DMBS release version
 DMBS_VERSION = 0.4
 
-
 # Converts a given input to a printable output using "(None)" if no items are in the list
 CONVERT_TO_PRINTABLE           = $(if $(strip $(1)), $(1), (None))
 
-
 # Build sorted and filtered lists of the included build module data
 SORTED_DMBS_BUILD_MODULES      = $(sort $(DMBS_BUILD_MODULES))
 SORTED_DMBS_BUILD_TARGETS      = $(sort $(DMBS_BUILD_TARGETS))
diff --git a/LUFA/Build/DMBS/DMBS/cppcheck.md b/LUFA/Build/DMBS/DMBS/cppcheck.md
new file mode 100644
index 000000000..d10e39040
--- /dev/null
+++ b/LUFA/Build/DMBS/DMBS/cppcheck.md
@@ -0,0 +1,126 @@
+DMBS - Dean's Makefile Build System
+===================================
+
+
+Module: CPPCHECK
+-----------------
+
+The CPPCHECK module provides build targets to perform static analysis of the
+user application, using the open source `cppcheck` tool.
+
+## Importing This Module into a Makefile:
+
+To use this module in your application makefile, add the following code to your
+makefile:
+
+    include $(DMBS_PATH)/cppcheck.mk
+
+## Prerequisites:
+
+This module requires the `cppcheck` utility to be available in your system's
+`PATH` variable. The `cppcheck` utility is distributed on the project's
+[official site](http://cppcheck.sourceforge.net/) but is also
+made available in many *nix operating system's package managers.
+
+## Build Targets:
+
+The following targets are supported by this module:
+
+<table>
+ <tbody>
+   <tr>
+    <td>cppcheck</td>
+    <td>Scan the project with CPPCHECK, and show all discovered issues.</td>
+   </tr>
+   <tr>
+    <td>cppcheck-config</td>
+    <td>Check the project with CPPCHECK, to find missing header paths.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Mandatory Variables:
+
+The following variables must be defined (with a `NAME = VALUE` syntax, one
+variable per line) in the user makefile to be able to use this module:
+
+<table>
+ <tbody>
+   <tr>
+    <td>SRC</td>
+    <td>List of all project source files to scan.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Optional Variables:
+
+The following variables may be defined (with a `NAME = VALUE` syntax, one
+variable per line) in the user makefile. If not specified, a default value will
+be assumed.
+
+<table>
+ <tbody>
+   <tr>
+    <td>CPPCHECK_INCLUDES</td>
+    <td>Extra include paths to search, for any missing header files. Default is empty (no additional paths).</td>
+   </tr>
+   <tr>
+    <td>CPPCHECK_EXCLUDES</td>
+    <td>List of source files, file paths or path fragments to exclude from the scan. Default is empty (no exclusions).</td>
+   </tr>
+   <tr>
+    <td>CPPCHECK_MSG_TEMPLATE</td>
+    <td>Template for error and warning message output. Default is `{file}:{line}: {severity} ({id}): {message}`.</td>
+   </tr>
+   <tr>
+    <td>CPPCHECK_ENABLE</td>
+    <td>List of CPPCHECK checks to enable. Default is `all`.</td>
+   </tr>
+   <tr>
+    <td>CPPCHECK_SUPPRESS</td>
+    <td>List of CPPCHECK checks to ignore. Default is `variableScope missingInclude`.</td>
+   </tr>
+   <tr>
+    <td>CPPCHECK_FAIL_ON_WARNING</td>
+    <td>Boolean, if `Y` the build will fail if CPPCHECK discovers any errors or warnings. If `N`, fail only on errors. Default is `Y`.</td>
+   </tr>
+   <tr>
+    <td>CPPCHECK_QUIET</td>
+    <td>Boolean, if `Y` CPPCHECK will suppress all output except for discovered errors or warnings. If `N`, scan progress will be emitted. Default is `Y`.</td>
+   </tr>
+   <tr>
+    <td>CPPCHECK_FLAGS_</td>
+    <td>Additional flags to pass to CPPCHECK when scans are started. Default is empty (no additional flags).</td>
+   </tr>
+ </tbody>
+</table>
+
+## Provided Variables:
+
+The following variables may be referenced in a user makefile (via `$(NAME)`
+syntax) if desired, as they are provided by this module.
+
+<table>
+ <tbody>
+   <tr>
+    <td>N/A</td>
+    <td>This module provides no variables.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Provided Macros:
+
+The following macros may be referenced in a user makefile (via
+`$(call NAME, ARG1, ARG2, ...)` syntax) if desired, as they are provided by
+this module.
+
+<table>
+ <tbody>
+   <tr>
+    <td>N/A</td>
+    <td>This module provides no macros.</td>
+   </tr>
+ </tbody>
+</table>
diff --git a/LUFA/Build/DMBS/DMBS/cppcheck.mk b/LUFA/Build/DMBS/DMBS/cppcheck.mk
index 2e0be12ad..70b9ed721 100644
--- a/LUFA/Build/DMBS/DMBS/cppcheck.mk
+++ b/LUFA/Build/DMBS/DMBS/cppcheck.mk
@@ -14,47 +14,6 @@ DMBS_BUILD_OPTIONAL_VARS   += CPPCHECK_INCLUDES CPPCHECK_EXCLUDES CPPCHECK_MSG_T
 DMBS_BUILD_PROVIDED_VARS   +=
 DMBS_BUILD_PROVIDED_MACROS +=
 
-# -----------------------------------------------------------------------------
-#                DMBS CPPCheck Buildsystem Makefile Module.
-# -----------------------------------------------------------------------------
-# DESCRIPTION:
-#   Provides a set of targets to scan a project with the free "cppcheck" static
-#   analysis tool, to check for code errors at runtime
-#   (see http://cppcheck.sourceforge.net).
-# -----------------------------------------------------------------------------
-# TARGETS:
-#
-#    cppcheck                  - Scan the project with CPPCheck
-#    cppcheck-config           - Use CPPCheck to look for missing include files
-#
-# MANDATORY PARAMETERS:
-#
-#    SRC                       - List of source files to statically analyze
-#
-# OPTIONAL PARAMETERS:
-#
-#    CPPCHECK_INCLUDES         - Extra include paths to search for missing
-#                                header files
-#    CPPCHECK_EXCLUDES         - Source file paths to exclude checking (can be
-#                                a path fragment if desired)
-#    CPPCHECK_MSG_TEMPLATE     - Template for cppcheck error and warning output
-#    CPPCHECK_ENABLE           - General cppcheck category checks to enable
-#    CPPCHECK_SUPPRESS         - Specific cppcheck warnings to disable by ID
-#    CPPCHECK_FAIL_ON_WARNING  - Set to Y to fail the build on cppcheck
-#                                warnings, N to continue even if warnings occur
-#    CPPCHECK_QUIET            - Enable cppcheck verbose or quiet output mode
-#    CPPCHECK_FLAGS            - Additional flags to pass to cppcheck
-#
-# PROVIDED VARIABLES:
-#
-#    (None)
-#
-# PROVIDED MACROS:
-#
-#    (None)
-#
-# -----------------------------------------------------------------------------
-
 SHELL = /bin/sh
 
 ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
diff --git a/LUFA/Build/DMBS/DMBS/dfu.md b/LUFA/Build/DMBS/DMBS/dfu.md
new file mode 100644
index 000000000..a674d4e75
--- /dev/null
+++ b/LUFA/Build/DMBS/DMBS/dfu.md
@@ -0,0 +1,114 @@
+DMBS - Dean's Makefile Build System
+===================================
+
+
+Module: DFU
+-----------------
+
+The DFU module provides build targets to program a USB connected target running
+a DFU class bootloader, via the official Atmel FLIP utility running via the
+command line, or the open source `DFU-Programmer` tool.
+
+## Importing This Module into a Makefile:
+
+To use this module in your application makefile, add the following code to your
+makefile:
+
+    include $(DMBS_PATH)/dfu.mk
+
+## Prerequisites:
+
+This module requires the `batchisp` utility to be available in your system's
+`PATH` variable. The `batchisp` utility is distributed as part of Atmel's FLIP
+software which can be downloaded from the [official site](http://www.atmel.com).
+
+This module requires the `dfu-programmer` utility to be available in your
+system's `PATH` variable. The `dfu-programmer` utility is distributed from the
+[official project site](https://dfu-programmer.github.io/).
+
+## Build Targets:
+
+The following targets are supported by this module:
+
+<table>
+ <tbody>
+   <tr>
+    <td>flip</td>
+    <td>Program the application into the device's flash memory, using Atmel FLIP.</td>
+   </tr>
+   <tr>
+    <td>flip-ee</td>
+    <td>Program the application's EEPROM data into the device's EEPROM memory, using Atmel FLIP.</td>
+   </tr>
+   <tr>
+    <td>dfu</td>
+    <td>Program the application into the device's flash memory, using `dfu-programmer`.</td>
+   </tr>
+   <tr>
+    <td>dfu-ee</td>
+    <td>Program the application's EEPROM data into the device's EEPROM memory, using `dfu-programmer`.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Mandatory Variables:
+
+The following variables must be defined (with a `NAME = VALUE` syntax, one
+variable per line) in the user makefile to be able to use this module:
+
+<table>
+ <tbody>
+   <tr>
+    <td>MCU</td>
+    <td>Name of the Atmel processor model (e.g. `at90usb1287`).</td>
+   </tr>
+   <tr>
+    <td>TARGET</td>
+    <td>Name of the application output file prefix (e.g. `TestApplication`).</td>
+   </tr>   
+ </tbody>
+</table>
+
+## Optional Variables:
+
+The following variables may be defined (with a `NAME = VALUE` syntax, one
+variable per line) in the user makefile. If not specified, a default value will
+be assumed.
+
+<table>
+ <tbody>
+   <tr>
+    <td>N/A</td>
+    <td>This module has no optional variables.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Provided Variables:
+
+The following variables may be referenced in a user makefile (via `$(NAME)`
+syntax) if desired, as they are provided by this module.
+
+<table>
+ <tbody>
+   <tr>
+    <td>N/A</td>
+    <td>This module provides no variables.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Provided Macros:
+
+The following macros may be referenced in a user makefile (via
+`$(call NAME, ARG1, ARG2, ...)` syntax) if desired, as they are provided by
+this module.
+
+<table>
+ <tbody>
+   <tr>
+    <td>N/A</td>
+    <td>This module provides no macros.</td>
+   </tr>
+ </tbody>
+</table>
diff --git a/LUFA/Build/DMBS/DMBS/dfu.mk b/LUFA/Build/DMBS/DMBS/dfu.mk
index 62365c141..1349e17a8 100644
--- a/LUFA/Build/DMBS/DMBS/dfu.mk
+++ b/LUFA/Build/DMBS/DMBS/dfu.mk
@@ -13,39 +13,6 @@ DMBS_BUILD_OPTIONAL_VARS   +=
 DMBS_BUILD_PROVIDED_VARS   +=
 DMBS_BUILD_PROVIDED_MACROS +=
 
-# -----------------------------------------------------------------------------
-#               DMBS DFU Bootloader Buildsystem Makefile Module.
-# -----------------------------------------------------------------------------
-# DESCRIPTION:
-#   Provides a set of targets to re-program a device currently running a DFU
-#   class bootloader with a project's FLASH and EEPROM files.
-# -----------------------------------------------------------------------------
-# TARGETS:
-#
-#    flip                      - Program FLASH into target via Atmel FLIP
-#    flip-ee                   - Program EEPROM into target via Atmel FLIP
-#    dfu                       - Program FLASH into target via dfu-programmer
-#    dfu-ee                    - Program EEPROM into target via dfu-programmer
-#
-# MANDATORY PARAMETERS:
-#
-#    MCU                       - Microcontroller device model name
-#    TARGET                    - Application name
-#
-# OPTIONAL PARAMETERS:
-#
-#    (None)
-#
-# PROVIDED VARIABLES:
-#
-#    (None)
-#
-# PROVIDED MACROS:
-#
-#    (None)
-#
-# -----------------------------------------------------------------------------
-
 SHELL = /bin/sh
 
 ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
diff --git a/LUFA/Build/DMBS/DMBS/doxygen.md b/LUFA/Build/DMBS/DMBS/doxygen.md
new file mode 100644
index 000000000..11f6be5e3
--- /dev/null
+++ b/LUFA/Build/DMBS/DMBS/doxygen.md
@@ -0,0 +1,110 @@
+DMBS - Dean's Makefile Build System
+===================================
+
+
+Module: DOXYGEN
+-----------------
+
+The DOXYGEN module provides build targets to automatically generate API
+documentation for a project, using the open-source Doxygen tool.
+
+## Importing This Module into a Makefile:
+
+To use this module in your application makefile, add the following code to your
+makefile:
+
+    include $(DMBS_PATH)/doxygen.mk
+
+## Prerequisites:
+
+This module requires the `doxygen` utility to be available in your system's
+`PATH` variable. The `doxygen` utility is distributed on the project's
+[official site](http://doxygen.org/) but is also
+made available in many *nix operating system's package managers.
+
+## Build Targets:
+
+The following targets are supported by this module:
+
+<table>
+ <tbody>
+   <tr>
+    <td>doxygen</td>
+    <td>Generate project documentation, via Doxygen.</td>
+   </tr>
+   <tr>
+    <td>doxygen-create</td>
+    <td>Create a new project Doxygen template, which can then be customized.</td>
+   </tr>
+   <tr>
+    <td>doxygen-upgrade</td>
+    <td>Upgrade an existing project Doxygen template to the latest Doxygen version.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Mandatory Variables:
+
+The following variables must be defined (with a `NAME = VALUE` syntax, one
+variable per line) in the user makefile to be able to use this module:
+
+<table>
+ <tbody>
+   <tr>
+    <td>N/A</td>
+    <td>This module has no mandatory variables.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Optional Variables:
+
+The following variables may be defined (with a `NAME = VALUE` syntax, one
+variable per line) in the user makefile. If not specified, a default value will
+be assumed.
+
+<table>
+ <tbody>
+   <tr>
+    <td>DOXYGEN_CONF</td>
+    <td>Name of the Doxygen project configuration file that should be used when generating documentation, or creating/upgrading the configuration file.</td>
+   </tr>
+   <tr>
+    <td>DOXYGEN_FAIL_ON_WARNING</td>
+    <td>Boolean, if `Y` the build will fail if Doxygen encounters any errors or warnings. If `N`, fail only on errors. Default is `Y`.</td>
+   </tr>
+   <tr>
+    <td>DOXYGEN_OVERRIDE_PARAMS</td>
+    <td>List of `NAME=VALUE` parameters which should override the values specified in the project configuration file, when building documentation.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Provided Variables:
+
+The following variables may be referenced in a user makefile (via `$(NAME)`
+syntax) if desired, as they are provided by this module.
+
+<table>
+ <tbody>
+   <tr>
+    <td>N/A</td>
+    <td>This module provides no variables.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Provided Macros:
+
+The following macros may be referenced in a user makefile (via
+`$(call NAME, ARG1, ARG2, ...)` syntax) if desired, as they are provided by
+this module.
+
+<table>
+ <tbody>
+   <tr>
+    <td>N/A</td>
+    <td>This module provides no macros.</td>
+   </tr>
+ </tbody>
+</table>
diff --git a/LUFA/Build/DMBS/DMBS/doxygen.mk b/LUFA/Build/DMBS/DMBS/doxygen.mk
index bcde61b47..73bc7ff40 100644
--- a/LUFA/Build/DMBS/DMBS/doxygen.mk
+++ b/LUFA/Build/DMBS/DMBS/doxygen.mk
@@ -7,48 +7,12 @@
 #
 
 DMBS_BUILD_MODULES         += DOXYGEN
-DMBS_BUILD_TARGETS         += doxygen doxygen_upgrade doxygen_create
+DMBS_BUILD_TARGETS         += doxygen doxygen-upgrade doxygen-create
 DMBS_BUILD_MANDATORY_VARS  +=
 DMBS_BUILD_OPTIONAL_VARS   += DOXYGEN_CONF DOXYGEN_FAIL_ON_WARNING DOXYGEN_OVERRIDE_PARAMS
 DMBS_BUILD_PROVIDED_VARS   +=
 DMBS_BUILD_PROVIDED_MACROS +=
 
-# -----------------------------------------------------------------------------
-#                 DMBS Doxygen Buildsystem Makefile Module.
-# -----------------------------------------------------------------------------
-# DESCRIPTION:
-#   Provides a set of targets to automatically build Doxygen documentation for
-#   a project (see www.doxygen.org).
-# -----------------------------------------------------------------------------
-# TARGETS:
-#
-#    doxygen                   - Build Doxygen Documentation
-#    doxygen_create            - Create a new Doxygen configuration file using
-#                                the latest template
-#    doxygen_upgrade           - Upgrade an existing Doxygen configuration file
-#                                to the latest template
-#
-# MANDATORY PARAMETERS:
-#
-#    (None)
-#
-# OPTIONAL PARAMETERS:
-#
-#    DOXYGEN_CONF              - Doxygen configuration filename
-#    DOXYGEN_FAIL_ON_WARNING   - Set to Y to fail the build on Doxygen warnings,
-#                                N to continue even if warnings occur
-#    DOXYGEN_OVERRIDE_PARAMS   - Parameters to override in the doxygen
-#                                configuration file
-# PROVIDED VARIABLES:
-#
-#    (None)
-#
-# PROVIDED MACROS:
-#
-#    (None)
-#
-# -----------------------------------------------------------------------------
-
 SHELL = /bin/sh
 
 ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
@@ -86,12 +50,12 @@ doxygen: $(DOXYGEN_CONF) $(MAKEFILE_LIST)
 	$(DOXYGEN_CMD)
 
 # Upgrades an existing Doxygen configuration file to the latest Doxygen template, preserving settings
-doxygen_upgrade: $(DOXYGEN_CONF) $(MAKEFILE_LIST)
+doxygen-upgrade: $(DOXYGEN_CONF) $(MAKEFILE_LIST)
 	@echo $(MSG_DOXYGEN_CMD) Upgrading configuration file \"$(DOXYGEN_CONF)\" with latest template
 	doxygen -u $(DOXYGEN_CONF) > /dev/null
 
 # Creates a new Doxygen configuration file with the set file name
-doxygen_create: $(MAKEFILE_LIST)
+doxygen-create: $(MAKEFILE_LIST)
 	@echo $(MSG_DOXYGEN_CMD) Creating new configuration file \"$(DOXYGEN_CONF)\" with latest template
 	doxygen -g $(DOXYGEN_CONF) > /dev/null
 
diff --git a/LUFA/Build/DMBS/DMBS/gcc.md b/LUFA/Build/DMBS/DMBS/gcc.md
new file mode 100644
index 000000000..d25085fa6
--- /dev/null
+++ b/LUFA/Build/DMBS/DMBS/gcc.md
@@ -0,0 +1,196 @@
+DMBS - Dean's Makefile Build System
+===================================
+
+
+Module: GCC
+-----------------
+
+The GCC module provides build targets to compile a user application, using a
+variant of GCC for a specific target architecture (such as `avr-gcc`).
+
+## Importing This Module into a Makefile:
+
+To use this module in your application makefile, add the following code to your
+makefile:
+
+    include $(DMBS_PATH)/gcc.mk
+
+## Prerequisites:
+
+This module requires the GCC compiler to be installed and available in the
+system's `PATH` variable for the desired target architecture.
+
+## Build Targets:
+
+The following targets are supported by this module:
+
+<table>
+ <tbody>
+   <tr>
+    <td>size</td>
+    <td>Show the compiled binary size for the various memory segments.</td>
+   </tr>
+   <tr>
+    <td>symbol-sizes</td>
+    <td>Show the size of each symbol in the compiled binary (useful to find large functions to optimize further).</td>
+   </tr>
+   <tr>
+    <td>all</td>
+    <td>Build application and generate all binary (BIN, ELF, HEX) and auxiliary (LSS, MAP, SYM, etc.) output files.</td>
+   </tr>
+   <tr>
+    <td>lib</td>
+    <td>Generate a static `.a` library from the application code, containing the flash region's data.</td>
+   </tr>
+   <tr>
+    <td>elf</td>
+    <td>Generate an ELF debug file from the application code, containing all region's data.</td>
+   </tr>
+   <tr>
+    <td>bin</td>
+    <td>Generate a flat BIN binary file from the application code, containing the flash region's data.</td>
+   </tr>
+   <tr>
+    <td>hex</td>
+    <td>Generate a pair of Intel HEX files from the application code, containing the flash region's data (HEX) and EEPROM data (EEP).</td>
+   </tr>
+   <tr>
+    <td>lss</td>
+    <td>Generate a LSS listing file showing the disassembly of the compiled application.</td>
+   </tr>
+   <tr>
+    <td>clean</td>
+    <td>Remove all generated project intermediary and binary output files.</td>
+   </tr>
+   <tr>
+    <td>mostlyclean</td>
+    <td>Remove all generated project intermediary output files, but preserve the binary output files.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Mandatory Variables:
+
+The following variables must be defined (with a `NAME = VALUE` syntax, one
+variable per line) in the user makefile to be able to use this module:
+
+<table>
+ <tbody>
+   <tr>
+    <td>MCU</td>
+    <td>Name of the Atmel processor model (e.g. `at90usb1287`).</td>
+   </tr>
+   <tr>
+    <td>TARGET</td>
+    <td>Name of the application output file prefix (e.g. `TestApplication`).</td>
+   </tr>   
+   <tr>
+    <td>ARCH</td>
+    <td>Target device architecture (e.g. `AVR8`).</td>
+   </tr>
+   <tr>
+     <td>SRC</td>
+     <td>List of all project source files (C, C++, ASM).</td>
+   </tr>
+ </tbody>
+</table>
+
+## Optional Variables:
+
+The following variables may be defined (with a `NAME = VALUE` syntax, one
+variable per line) in the user makefile. If not specified, a default value will
+be assumed.
+
+<table>
+ <tbody>
+   <tr>
+    <td>OPTIMIZATION</td>
+    <td>Optimization level to use when compiling C and C++ source files. Default is `s` (optimize for smallest size).</td>
+   </tr>
+   <tr>
+    <td>C_STANDARD</td>
+    <td>C language standard used when compiling C language source files. Default is `gnu99` (C99 standard with GNU extensions)./td>
+   </tr>
+   <tr>
+    <td>CPP_STANDARD</td>
+    <td>C++ language standard used when compiling C++ language source files. Default is `gnu++98` (C++98 standard with GNU extensions)./td>
+   </tr>
+   <tr>
+    <td>F_CPU</td>
+    <td>Processor core clock frequency, in Hz. This is used by some architectures for functions such as software spin-loop delays. Default is blank (no value defined).</td>
+   </tr>
+   <tr>
+    <td>C_FLAGS</td>
+    <td>Common GCC flags passed to the compiler for C language (C) input files. Default is blank (no additional flags).</td>
+   </tr>
+   <tr>
+    <td>CPP_FLAGS</td>
+    <td>Common GCC flags passed to the compiler for C++ language (CPP) input files. Default is blank (no additional flags).</td>
+   </tr>
+   <tr>
+    <td>ASM_FLAGS</td>
+    <td>Common GCC flags passed to the assembler for assembly language (S) input files. Default is blank (no additional flags).</td>
+   </tr>
+   <tr>
+    <td>CC_FLAGS</td>
+    <td>Common GCC flags passed to the compiler for all source file types. Default is blank (no additional flags).</td>
+   </tr>
+   <tr>
+    <td>LD_FLAGS</td>
+    <td>Extra flags to pass to the GNU linker when linking the compiled object files into the resulting binary. Default is blank (no additional flags).</td>
+   </tr>
+   <tr>
+    <td>LINKER_RELAXATIONS</td>
+    <td>Boolean, if `Y` linker relaxations will be enabled to slightly reduce the resulting binary's size. Default is `Y`.</td>
+   </tr>
+   <tr>
+    <td>OBJDIR</td>
+    <td>Directory to store the intermediate object files, as they are generated from the source files. Default is `obj`.</td>
+   </tr>
+   <tr>
+    <td>OBJECT_FILES</td>
+    <td>List of additional `.o` object files to link into the final binary. Default is blank (no additional objects).</td>
+   </tr>
+   <tr>
+    <td>DEBUG_FORMAT</td>
+    <td>Debug ELF file format to generate. Default is `dwarf-2`.</td>
+   </tr>
+   <tr>
+    <td>DEBUG_LEVEL</td>
+    <td>Level of the debugging information to generate in the compiled object files. Debug is 2 (medium level debugging information).</td>
+   </tr>
+   <tr>
+    <td>COMPILER_PATH</td>
+    <td>Path to the compiler to use, in case a specific compiler should be substituted for the one in the system's `PATH` variable. Default is blank (use `PATH` provided compiler).</td>
+   </tr>
+ </tbody>
+</table>
+
+## Provided Variables:
+
+The following variables may be referenced in a user makefile (via `$(NAME)`
+syntax) if desired, as they are provided by this module.
+
+<table>
+ <tbody>
+   <tr>
+    <td>N/A</td>
+    <td>This module provides no variables.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Provided Macros:
+
+The following macros may be referenced in a user makefile (via
+`$(call NAME, ARG1, ARG2, ...)` syntax) if desired, as they are provided by
+this module.
+
+<table>
+ <tbody>
+   <tr>
+    <td>N/A</td>
+    <td>This module provides no macros.</td>
+   </tr>
+ </tbody>
+</table>
diff --git a/LUFA/Build/DMBS/DMBS/gcc.mk b/LUFA/Build/DMBS/DMBS/gcc.mk
index f3c695502..c7299edff 100644
--- a/LUFA/Build/DMBS/DMBS/gcc.mk
+++ b/LUFA/Build/DMBS/DMBS/gcc.mk
@@ -13,73 +13,6 @@ DMBS_BUILD_OPTIONAL_VARS   += BOARD OPTIMIZATION C_STANDARD CPP_STANDARD F_CPU C
 DMBS_BUILD_PROVIDED_VARS   +=
 DMBS_BUILD_PROVIDED_MACROS +=
 
-# -----------------------------------------------------------------------------
-#               DMBS GCC Compiler Buildsystem Makefile Module.
-# -----------------------------------------------------------------------------
-# DESCRIPTION:
-#   Provides a set of targets to build a C, C++ and/or Assembly application
-#   via the AVR-GCC compiler.
-# -----------------------------------------------------------------------------
-# TARGETS:
-#
-#    size                      - List built application size
-#    symbol-sizes              - Print application symbols from the binary ELF
-#                                file as a list sorted by size in bytes
-#    all                       - Build application and list size
-#    lib                       - Build and archive source files into a library
-#    elf                       - Build application ELF debug object file
-#    bin                       - Build application BIN binary object file
-#    hex                       - Build application HEX object file
-#    lss                       - Build application LSS assembly listing file
-#    clean                     - Remove all project intermediary and binary
-#                                output files
-#    mostlyclean               - Remove intermediary output files, but
-#                                preserve binaries
-#    <filename>.s              - Compile C/C++ source file into an assembly file
-#                                for manual code inspection
-#
-# MANDATORY PARAMETERS:
-#
-#    TARGET                    - Application name
-#    ARCH                      - Device architecture name
-#    MCU                       - Microcontroller device model name
-#    SRC                       - List of input source files (*.c, *.cpp, *.S)
-#
-# OPTIONAL PARAMETERS:
-#
-#    OPTIMIZATION              - Optimization level
-#    C_STANDARD                - C Language Standard to use
-#    CPP_STANDARD              - C++ Language Standard to use
-#    F_CPU                     - Speed of the CPU, in Hz
-#    C_FLAGS                   - Flags to pass to the C compiler only
-#    CPP_FLAGS                 - Flags to pass to the C++ compiler only
-#    ASM_FLAGS                 - Flags to pass to the assembler only
-#    CC_FLAGS                  - Common flags to pass to the C/C++ compiler and
-#                                assembler
-#    LD_FLAGS                  - Flags to pass to the linker
-#    LINKER_RELAXATIONS        - Enable or disable linker relaxations to
-#                                decrease binary size (note: can cause link
-#                                failures on systems with an unpatched binutils)
-#    OBJDIR                    - Directory for the output object and dependency
-#                                files; if equal to ".", the output files will
-#                                be generated in the same folder as the sources
-#    OBJECT_FILES              - Extra object files to link in to the binaries
-#    DEBUG_FORMAT              - Format of the debugging information to
-#                                generate in the compiled object files
-#    DEBUG_LEVEL               - Level the debugging information to generate in
-#                                the compiled object files
-#    COMPILER_PATH             - Location of the GCC toolchain to use
-#
-# PROVIDED VARIABLES:
-#
-#    (None)
-#
-# PROVIDED MACROS:
-#
-#    (None)
-#
-# -----------------------------------------------------------------------------
-
 SHELL = /bin/sh
 
 ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
diff --git a/LUFA/Build/DMBS/DMBS/hid.md b/LUFA/Build/DMBS/DMBS/hid.md
new file mode 100644
index 000000000..691a422ba
--- /dev/null
+++ b/LUFA/Build/DMBS/DMBS/hid.md
@@ -0,0 +1,121 @@
+DMBS - Dean's Makefile Build System
+===================================
+
+
+Module: HID
+-----------------
+
+The HID module provides build targets to program a target running a PJRC Teensy
+or LUFA compatible HID class bootloader.
+
+## Importing This Module into a Makefile:
+
+To use this module in your application makefile, add the following code to your
+makefile:
+
+    include $(DMBS_PATH)/hid.mk
+
+## Prerequisites:
+
+This module requires the `teensy_loader_cli` utility to be available in your
+system's `PATH` variable. The `teensy_loader_cli` utility is distributed in
+a modified form (from PJRC) in the LUFA project's
+[official site](http://www.lufa-lib.org/), but is also
+made available in its original form directly from the 
+[PJRC website](https://www.pjrc.com/teensy/loader_cli.html). Note that the
+original tool works with Teensy boards only, and not LUFA HID bootloader
+devices.
+
+This module requires the `hid_bootloader_cli` utility to be available in your
+system's `PATH` variable. The `hid_bootloader_cli` Python script utility is
+distributed in LUFA project's [official site](http://www.lufa-lib.org/).
+
+This module requires the AVR-GCC compiler to be installed and available in the
+system's `PATH` variable.
+
+## Build Targets:
+
+The following targets are supported by this module:
+
+<table>
+ <tbody>
+   <tr>
+    <td>hid</td>
+    <td>Program a LUFA HID class bootloader device, using the `hid_bootloader_cli.py` Python script.</td>
+   </tr>
+   <tr>
+    <td>hid-ee</td>
+    <td>Program a LUFA HID class bootloader device's EEPROM, using the `hid_bootloader_cli.py` Python script and a shim application which is programmed into the target's flash.</td>
+   </tr>
+   <tr>
+    <td>teensy</td>
+    <td>Program a LUFA HID class bootloader device or Teensy board, using the `teensy_loader_cli` tool.</td>
+   </tr>
+   <tr>
+    <td>teensy-ee</td>
+    <td>Program a LUFA HID class bootloader device's EEPROM, using the `teensy_loader_cli` tool and a shim application which is programmed into the target's flash.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Mandatory Variables:
+
+The following variables must be defined (with a `NAME = VALUE` syntax, one
+variable per line) in the user makefile to be able to use this module:
+
+<table>
+ <tbody>
+   <tr>
+    <td>MCU</td>
+    <td>Name of the Atmel processor model (e.g. `at90usb1287`).</td>
+   </tr>
+   <tr>
+    <td>TARGET</td>
+    <td>Name of the application output file prefix (e.g. `TestApplication`).</td>
+   </tr>   
+ </tbody>
+</table>
+
+## Optional Variables:
+
+The following variables may be defined (with a `NAME = VALUE` syntax, one
+variable per line) in the user makefile. If not specified, a default value will
+be assumed.
+
+<table>
+ <tbody>
+   <tr>
+    <td>N/A</td>
+    <td>This module has no optional variables.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Provided Variables:
+
+The following variables may be referenced in a user makefile (via `$(NAME)`
+syntax) if desired, as they are provided by this module.
+
+<table>
+ <tbody>
+   <tr>
+    <td>N/A</td>
+    <td>This module provides no variables.</td>
+   </tr>
+ </tbody>
+</table>
+
+## Provided Macros:
+
+The following macros may be referenced in a user makefile (via
+`$(call NAME, ARG1, ARG2, ...)` syntax) if desired, as they are provided by
+this module.
+
+<table>
+ <tbody>
+   <tr>
+    <td>N/A</td>
+    <td>This module provides no macros.</td>
+   </tr>
+ </tbody>
+</table>
diff --git a/LUFA/Build/DMBS/DMBS/hid.mk b/LUFA/Build/DMBS/DMBS/hid.mk
index 3f0d456e1..3575f3777 100644
--- a/LUFA/Build/DMBS/DMBS/hid.mk
+++ b/LUFA/Build/DMBS/DMBS/hid.mk
@@ -13,43 +13,6 @@ DMBS_BUILD_OPTIONAL_VARS   +=
 DMBS_BUILD_PROVIDED_VARS   +=
 DMBS_BUILD_PROVIDED_MACROS +=
 
-# -----------------------------------------------------------------------------
-#               DMBS HID Bootloader Buildsystem Makefile Module.
-# -----------------------------------------------------------------------------
-# DESCRIPTION:
-#   Provides a set of targets to re-program a device currently running a HID
-#   class bootloader with a project's FLASH files.
-# -----------------------------------------------------------------------------
-# TARGETS:
-#
-#    hid                       - Program FLASH into target via
-#                                hid_bootloader_cli
-#    hid-ee                    - Program EEPROM into target via a temporary
-#                                AVR application and hid_bootloader_cli
-#    teensy                    - Program FLASH into target via
-#                                teensy_loader_cli
-#    teensy-ee                 - Program EEPROM into target via a temporary
-#                                AVR application and teensy_loader_cli
-#
-# MANDATORY PARAMETERS:
-#
-#    MCU                       - Microcontroller device model name
-#    TARGET                    - Application name
-#
-# OPTIONAL PARAMETERS:
-#
-#    (None)
-#
-# PROVIDED VARIABLES:
-#
-#    (None)
-#
-# PROVIDED MACROS:
-#
-#    (None)
-#
-# -----------------------------------------------------------------------------
-
 SHELL = /bin/sh
 
 DMBS_MODULE_PATH := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
diff --git a/LUFA/Build/DMBS/Readme.md b/LUFA/Build/DMBS/Readme.md
index 448db1e70..05125ce5b 100644
--- a/LUFA/Build/DMBS/Readme.md
+++ b/LUFA/Build/DMBS/Readme.md
@@ -35,9 +35,7 @@ are included via a GNU Make `include` directive. While the DMBS `core` module is
 always required, you can pick and choose what other modules you wish to add to
 your user project.
 
-DMBS is also used in the LUFA Project which provides a
-[detailed documentation](http://www.fourwalledcubicle.com/files/LUFA/Doc/151115/html/_page__build_system.html)
-of DMBS.
+[See here for the documentation on the individual modules provided by DMBS.](DMBS/Modules.md)
 
 Here's an example user makefile:
 
-- 
cgit v1.2.3


From 0ecd09c3e1d1ed47c940541c41b79815b16bd627 Mon Sep 17 00:00:00 2001
From: Dean Camera <dean@fourwalledcubicle.com>
Date: Sun, 3 Apr 2016 14:51:48 +1000
Subject: Add LUFA DMBS extension modules, use DMBS in project makefiles.

---
 Bootloaders/CDC/makefile                           |  23 +-
 Bootloaders/DFU/makefile                           |  23 +-
 Bootloaders/HID/makefile                           |  23 +-
 Bootloaders/MassStorage/makefile                   |  23 +-
 Bootloaders/Printer/makefile                       |  23 +-
 BuildTests/BoardDriverTest/makefile                |   5 +-
 BuildTests/BoardDriverTest/makefile.test           |  12 +-
 BuildTests/BootloaderTest/makefile                 |   5 +-
 BuildTests/ModuleTest/makefile                     |   5 +-
 BuildTests/ModuleTest/makefile.test                |  12 +-
 BuildTests/SingleUSBModeTest/makefile              |   5 +-
 BuildTests/SingleUSBModeTest/makefile.test         |  12 +-
 BuildTests/StaticAnalysisTest/makefile             |   8 +-
 Demos/Device/ClassDriver/AudioInput/makefile       |  25 +-
 Demos/Device/ClassDriver/AudioOutput/makefile      |  25 +-
 Demos/Device/ClassDriver/DualMIDI/makefile         |  25 +-
 .../Device/ClassDriver/DualVirtualSerial/makefile  |  25 +-
 Demos/Device/ClassDriver/GenericHID/makefile       |  25 +-
 Demos/Device/ClassDriver/Joystick/makefile         |  25 +-
 Demos/Device/ClassDriver/Keyboard/makefile         |  25 +-
 Demos/Device/ClassDriver/KeyboardMouse/makefile    |  25 +-
 .../ClassDriver/KeyboardMouseMultiReport/makefile  |  25 +-
 Demos/Device/ClassDriver/MIDI/makefile             |  25 +-
 Demos/Device/ClassDriver/MassStorage/makefile      |  25 +-
 .../ClassDriver/MassStorageKeyboard/makefile       |  25 +-
 Demos/Device/ClassDriver/Mouse/makefile            |  25 +-
 Demos/Device/ClassDriver/RNDISEthernet/makefile    |  25 +-
 Demos/Device/ClassDriver/VirtualSerial/makefile    |  25 +-
 .../ClassDriver/VirtualSerialMassStorage/makefile  |  25 +-
 .../Device/ClassDriver/VirtualSerialMouse/makefile |  25 +-
 .../Device/Incomplete/TestAndMeasurement/makefile  |  25 +-
 Demos/Device/LowLevel/AudioInput/makefile          |  25 +-
 Demos/Device/LowLevel/AudioOutput/makefile         |  25 +-
 Demos/Device/LowLevel/BulkVendor/makefile          |  25 +-
 Demos/Device/LowLevel/DualVirtualSerial/makefile   |  25 +-
 Demos/Device/LowLevel/GenericHID/makefile          |  25 +-
 Demos/Device/LowLevel/Joystick/makefile            |  25 +-
 Demos/Device/LowLevel/Keyboard/makefile            |  25 +-
 Demos/Device/LowLevel/KeyboardMouse/makefile       |  25 +-
 Demos/Device/LowLevel/MIDI/makefile                |  25 +-
 Demos/Device/LowLevel/MassStorage/makefile         |  25 +-
 Demos/Device/LowLevel/Mouse/makefile               |  25 +-
 Demos/Device/LowLevel/RNDISEthernet/makefile       |  25 +-
 Demos/Device/LowLevel/VirtualSerial/makefile       |  25 +-
 .../DualRole/ClassDriver/MouseHostDevice/makefile  |  25 +-
 .../Host/ClassDriver/AndroidAccessoryHost/makefile |  25 +-
 Demos/Host/ClassDriver/AudioInputHost/makefile     |  25 +-
 Demos/Host/ClassDriver/AudioOutputHost/makefile    |  25 +-
 .../ClassDriver/JoystickHostWithParser/makefile    |  25 +-
 Demos/Host/ClassDriver/KeyboardHost/makefile       |  25 +-
 .../ClassDriver/KeyboardHostWithParser/makefile    |  25 +-
 Demos/Host/ClassDriver/MIDIHost/makefile           |  25 +-
 Demos/Host/ClassDriver/MassStorageHost/makefile    |  25 +-
 Demos/Host/ClassDriver/MouseHost/makefile          |  25 +-
 .../Host/ClassDriver/MouseHostWithParser/makefile  |  25 +-
 Demos/Host/ClassDriver/PrinterHost/makefile        |  25 +-
 Demos/Host/ClassDriver/RNDISEthernetHost/makefile  |  25 +-
 Demos/Host/ClassDriver/StillImageHost/makefile     |  25 +-
 Demos/Host/ClassDriver/VirtualSerialHost/makefile  |  25 +-
 Demos/Host/LowLevel/AndroidAccessoryHost/makefile  |  25 +-
 Demos/Host/LowLevel/AudioInputHost/makefile        |  25 +-
 Demos/Host/LowLevel/AudioOutputHost/makefile       |  25 +-
 Demos/Host/LowLevel/GenericHIDHost/makefile        |  25 +-
 .../Host/LowLevel/JoystickHostWithParser/makefile  |  25 +-
 Demos/Host/LowLevel/KeyboardHost/makefile          |  25 +-
 .../Host/LowLevel/KeyboardHostWithParser/makefile  |  25 +-
 Demos/Host/LowLevel/MIDIHost/makefile              |  25 +-
 Demos/Host/LowLevel/MassStorageHost/makefile       |  25 +-
 Demos/Host/LowLevel/MouseHost/makefile             |  25 +-
 Demos/Host/LowLevel/MouseHostWithParser/makefile   |  25 +-
 Demos/Host/LowLevel/PrinterHost/makefile           |  25 +-
 Demos/Host/LowLevel/RNDISEthernetHost/makefile     |  25 +-
 Demos/Host/LowLevel/StillImageHost/makefile        |  25 +-
 Demos/Host/LowLevel/VirtualSerialHost/makefile     |  25 +-
 LUFA/Build/DMBS/Template/makefile                  |  11 +-
 LUFA/Build/LUFA/lufa-gcc.mk                        |  43 ++
 LUFA/Build/LUFA/lufa-sources.mk                    |  95 +++
 LUFA/Build/lufa_build.mk                           |  78 +-
 LUFA/Build/lufa_sources.mk                         | 138 +---
 LUFA/CodeTemplates/makefile_template               |  25 +-
 LUFA/DoxygenPages/BuildSystem.txt                  | 829 ++-------------------
 LUFA/DoxygenPages/ChangeLog.txt                    |   2 +
 LUFA/DoxygenPages/DevelopingWithLUFA.txt           |   1 -
 LUFA/DoxygenPages/ExportingLibrary.txt             | 112 ---
 .../Images/AS5_AS6_Import/AS5_AS6_Import_Step1.png | Bin 98201 -> 0 bytes
 .../Images/AS5_AS6_Import/AS5_AS6_Import_Step2.png | Bin 100532 -> 0 bytes
 .../Images/AS5_AS6_Import/AS5_AS6_Import_Step3.png | Bin 32987 -> 0 bytes
 .../Images/AS5_AS6_Import/AS5_AS6_Import_Step4.png | Bin 161824 -> 0 bytes
 .../AS5_AS6_Import/AS5_AS6_Import_Step5_1.png      | Bin 43666 -> 0 bytes
 .../AS5_AS6_Import/AS5_AS6_Import_Step5_2.png      | Bin 28918 -> 0 bytes
 .../AS5_AS6_Import/AS5_AS6_Import_Step5_3.png      | Bin 23561 -> 0 bytes
 LUFA/DoxygenPages/ProgrammingApps.txt              |   3 -
 LUFA/doxyfile                                      |   1 +
 LUFA/makefile                                      |  43 +-
 Projects/AVRISP-MKII/makefile                      |  25 +-
 Projects/Benito/makefile                           |  25 +-
 Projects/HIDReportViewer/makefile                  |  25 +-
 Projects/LEDNotifier/makefile                      |  25 +-
 Projects/MIDIToneGenerator/makefile                |  25 +-
 Projects/Magstripe/makefile                        |  25 +-
 Projects/MediaController/makefile                  |  25 +-
 Projects/MissileLauncher/makefile                  |  25 +-
 Projects/RelayBoard/makefile                       |  25 +-
 Projects/SerialToLCD/makefile                      |  25 +-
 Projects/TempDataLogger/makefile                   |  25 +-
 Projects/USBtoSerial/makefile                      |  25 +-
 Projects/Webserver/makefile                        |  25 +-
 Projects/XPLAINBridge/makefile                     |  25 +-
 108 files changed, 1487 insertions(+), 1948 deletions(-)
 create mode 100644 LUFA/Build/LUFA/lufa-gcc.mk
 create mode 100644 LUFA/Build/LUFA/lufa-sources.mk
 delete mode 100644 LUFA/DoxygenPages/ExportingLibrary.txt
 delete mode 100644 LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step1.png
 delete mode 100644 LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step2.png
 delete mode 100644 LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step3.png
 delete mode 100644 LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step4.png
 delete mode 100644 LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_1.png
 delete mode 100644 LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_2.png
 delete mode 100644 LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_3.png

diff --git a/Bootloaders/CDC/makefile b/Bootloaders/CDC/makefile
index 3e265b8a6..cee20f9fe 100644
--- a/Bootloaders/CDC/makefile
+++ b/Bootloaders/CDC/makefile
@@ -45,11 +45,18 @@ BOOT_API_LD_FLAGS    += $(call BOOT_SECTION_LD_FLAG, .apitable_signatures,  Boot
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Bootloaders/DFU/makefile b/Bootloaders/DFU/makefile
index 965074b0d..4b31f76f5 100644
--- a/Bootloaders/DFU/makefile
+++ b/Bootloaders/DFU/makefile
@@ -45,11 +45,18 @@ BOOT_API_LD_FLAGS    += $(call BOOT_SECTION_LD_FLAG, .apitable_signatures,  Boot
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Bootloaders/HID/makefile b/Bootloaders/HID/makefile
index 8e5ac6149..a76faf06e 100644
--- a/Bootloaders/HID/makefile
+++ b/Bootloaders/HID/makefile
@@ -38,11 +38,18 @@ BOOT_SEC_OFFSET       = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) * 1024) -
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Bootloaders/MassStorage/makefile b/Bootloaders/MassStorage/makefile
index 506c941ff..59bc9e434 100644
--- a/Bootloaders/MassStorage/makefile
+++ b/Bootloaders/MassStorage/makefile
@@ -58,11 +58,18 @@ endif
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Bootloaders/Printer/makefile b/Bootloaders/Printer/makefile
index abdf9c890..e8f6a7302 100644
--- a/Bootloaders/Printer/makefile
+++ b/Bootloaders/Printer/makefile
@@ -45,11 +45,18 @@ BOOT_API_LD_FLAGS    += $(call BOOT_SECTION_LD_FLAG, .apitable_signatures,  Boot
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/BuildTests/BoardDriverTest/makefile b/BuildTests/BoardDriverTest/makefile
index 56fdd8f75..cf4ed6969 100644
--- a/BuildTests/BoardDriverTest/makefile
+++ b/BuildTests/BoardDriverTest/makefile
@@ -64,5 +64,6 @@ clean:
 
 .PHONY: all begin end makeboardlist testboards clean
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
diff --git a/BuildTests/BoardDriverTest/makefile.test b/BuildTests/BoardDriverTest/makefile.test
index c9ef890b8..c1d84e41a 100644
--- a/BuildTests/BoardDriverTest/makefile.test
+++ b/BuildTests/BoardDriverTest/makefile.test
@@ -23,5 +23,13 @@ LUFA_PATH    = ../../LUFA
 CC_FLAGS     = -Werror
 DEBUG_LEVEL  = 0
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_build.mk
+
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/gcc.mk
diff --git a/BuildTests/BootloaderTest/makefile b/BuildTests/BootloaderTest/makefile
index 01d93ce5d..f3f4fc586 100644
--- a/BuildTests/BootloaderTest/makefile
+++ b/BuildTests/BootloaderTest/makefile
@@ -60,5 +60,6 @@ clean:
 
 .PHONY: all begin end testbootloaders clean
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
diff --git a/BuildTests/ModuleTest/makefile b/BuildTests/ModuleTest/makefile
index 2c696a4dc..51c45bc85 100644
--- a/BuildTests/ModuleTest/makefile
+++ b/BuildTests/ModuleTest/makefile
@@ -62,5 +62,6 @@ clean:
 
 .PHONY: all arch_avr8 arch_xmega arch_uc3 begin end
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
diff --git a/BuildTests/ModuleTest/makefile.test b/BuildTests/ModuleTest/makefile.test
index 23615217d..30bd3aad1 100644
--- a/BuildTests/ModuleTest/makefile.test
+++ b/BuildTests/ModuleTest/makefile.test
@@ -83,6 +83,12 @@ Test_C.c Test_CPP.cpp: CC_FLAGS += -Wc++-compat
 #CC_FLAGS += -Wsign-conversion
 #CC_FLAGS += -pedantic
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/gcc.mk
diff --git a/BuildTests/SingleUSBModeTest/makefile b/BuildTests/SingleUSBModeTest/makefile
index 54f1e1f6f..712af0b45 100644
--- a/BuildTests/SingleUSBModeTest/makefile
+++ b/BuildTests/SingleUSBModeTest/makefile
@@ -52,5 +52,6 @@ clean:
 
 .PHONY: begin end compile clean
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
diff --git a/BuildTests/SingleUSBModeTest/makefile.test b/BuildTests/SingleUSBModeTest/makefile.test
index d85a0b301..116c001c4 100644
--- a/BuildTests/SingleUSBModeTest/makefile.test
+++ b/BuildTests/SingleUSBModeTest/makefile.test
@@ -64,6 +64,12 @@ C_FLAGS += -Wnested-externs
 #CC_FLAGS += -Wjump-misses-init
 #CC_FLAGS += -pedantic
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/gcc.mk
diff --git a/BuildTests/StaticAnalysisTest/makefile b/BuildTests/StaticAnalysisTest/makefile
index e6de603a2..722ba5e85 100644
--- a/BuildTests/StaticAnalysisTest/makefile
+++ b/BuildTests/StaticAnalysisTest/makefile
@@ -39,9 +39,9 @@ end:
 
 %:
 
-
 .PHONY: all begin end
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
diff --git a/Demos/Device/ClassDriver/AudioInput/makefile b/Demos/Device/ClassDriver/AudioInput/makefile
index 80fa4f4f8..160376a1f 100644
--- a/Demos/Device/ClassDriver/AudioInput/makefile
+++ b/Demos/Device/ClassDriver/AudioInput/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/ClassDriver/AudioOutput/makefile b/Demos/Device/ClassDriver/AudioOutput/makefile
index 71ecb5cbc..24f1e92e9 100644
--- a/Demos/Device/ClassDriver/AudioOutput/makefile
+++ b/Demos/Device/ClassDriver/AudioOutput/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/ClassDriver/DualMIDI/makefile b/Demos/Device/ClassDriver/DualMIDI/makefile
index 481d4c841..1c9fe52b1 100644
--- a/Demos/Device/ClassDriver/DualMIDI/makefile
+++ b/Demos/Device/ClassDriver/DualMIDI/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/ClassDriver/DualVirtualSerial/makefile b/Demos/Device/ClassDriver/DualVirtualSerial/makefile
index 1a66c1f40..a644c7455 100644
--- a/Demos/Device/ClassDriver/DualVirtualSerial/makefile
+++ b/Demos/Device/ClassDriver/DualVirtualSerial/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/ClassDriver/GenericHID/makefile b/Demos/Device/ClassDriver/GenericHID/makefile
index 295e8bde0..edd200f8a 100644
--- a/Demos/Device/ClassDriver/GenericHID/makefile
+++ b/Demos/Device/ClassDriver/GenericHID/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/ClassDriver/Joystick/makefile b/Demos/Device/ClassDriver/Joystick/makefile
index 5f805f5a4..867b7effc 100644
--- a/Demos/Device/ClassDriver/Joystick/makefile
+++ b/Demos/Device/ClassDriver/Joystick/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/ClassDriver/Keyboard/makefile b/Demos/Device/ClassDriver/Keyboard/makefile
index 07791830a..0ec9cf841 100644
--- a/Demos/Device/ClassDriver/Keyboard/makefile
+++ b/Demos/Device/ClassDriver/Keyboard/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/ClassDriver/KeyboardMouse/makefile b/Demos/Device/ClassDriver/KeyboardMouse/makefile
index 259efc352..c60768fd5 100644
--- a/Demos/Device/ClassDriver/KeyboardMouse/makefile
+++ b/Demos/Device/ClassDriver/KeyboardMouse/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/makefile b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/makefile
index 34ca37ba7..406142775 100644
--- a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/makefile
+++ b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/ClassDriver/MIDI/makefile b/Demos/Device/ClassDriver/MIDI/makefile
index 97ceb1a6f..a06862d88 100644
--- a/Demos/Device/ClassDriver/MIDI/makefile
+++ b/Demos/Device/ClassDriver/MIDI/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/ClassDriver/MassStorage/makefile b/Demos/Device/ClassDriver/MassStorage/makefile
index 74d7eedc2..cfd8cee21 100644
--- a/Demos/Device/ClassDriver/MassStorage/makefile
+++ b/Demos/Device/ClassDriver/MassStorage/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/makefile b/Demos/Device/ClassDriver/MassStorageKeyboard/makefile
index 95afd5381..ca04ddbb7 100644
--- a/Demos/Device/ClassDriver/MassStorageKeyboard/makefile
+++ b/Demos/Device/ClassDriver/MassStorageKeyboard/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/ClassDriver/Mouse/makefile b/Demos/Device/ClassDriver/Mouse/makefile
index c5286618d..0aca79138 100644
--- a/Demos/Device/ClassDriver/Mouse/makefile
+++ b/Demos/Device/ClassDriver/Mouse/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/makefile b/Demos/Device/ClassDriver/RNDISEthernet/makefile
index e690e5865..98739137c 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/makefile
+++ b/Demos/Device/ClassDriver/RNDISEthernet/makefile
@@ -27,13 +27,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/ClassDriver/VirtualSerial/makefile b/Demos/Device/ClassDriver/VirtualSerial/makefile
index 305c18ad5..e98daccb2 100644
--- a/Demos/Device/ClassDriver/VirtualSerial/makefile
+++ b/Demos/Device/ClassDriver/VirtualSerial/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/ClassDriver/VirtualSerialMassStorage/makefile b/Demos/Device/ClassDriver/VirtualSerialMassStorage/makefile
index 669780883..ced390220 100644
--- a/Demos/Device/ClassDriver/VirtualSerialMassStorage/makefile
+++ b/Demos/Device/ClassDriver/VirtualSerialMassStorage/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/makefile b/Demos/Device/ClassDriver/VirtualSerialMouse/makefile
index 99e69c3e3..4f520f529 100644
--- a/Demos/Device/ClassDriver/VirtualSerialMouse/makefile
+++ b/Demos/Device/ClassDriver/VirtualSerialMouse/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/Incomplete/TestAndMeasurement/makefile b/Demos/Device/Incomplete/TestAndMeasurement/makefile
index 948060fb0..46c0e33ae 100644
--- a/Demos/Device/Incomplete/TestAndMeasurement/makefile
+++ b/Demos/Device/Incomplete/TestAndMeasurement/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/LowLevel/AudioInput/makefile b/Demos/Device/LowLevel/AudioInput/makefile
index 8e5d22b69..961b8fe59 100644
--- a/Demos/Device/LowLevel/AudioInput/makefile
+++ b/Demos/Device/LowLevel/AudioInput/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/LowLevel/AudioOutput/makefile b/Demos/Device/LowLevel/AudioOutput/makefile
index 5b8fb844c..7b6bf99c6 100644
--- a/Demos/Device/LowLevel/AudioOutput/makefile
+++ b/Demos/Device/LowLevel/AudioOutput/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/LowLevel/BulkVendor/makefile b/Demos/Device/LowLevel/BulkVendor/makefile
index 1ef9b4c19..d69959bc2 100644
--- a/Demos/Device/LowLevel/BulkVendor/makefile
+++ b/Demos/Device/LowLevel/BulkVendor/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/LowLevel/DualVirtualSerial/makefile b/Demos/Device/LowLevel/DualVirtualSerial/makefile
index 197e19d70..34d570f9b 100644
--- a/Demos/Device/LowLevel/DualVirtualSerial/makefile
+++ b/Demos/Device/LowLevel/DualVirtualSerial/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/LowLevel/GenericHID/makefile b/Demos/Device/LowLevel/GenericHID/makefile
index 6aefa72be..013a87ef9 100644
--- a/Demos/Device/LowLevel/GenericHID/makefile
+++ b/Demos/Device/LowLevel/GenericHID/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/LowLevel/Joystick/makefile b/Demos/Device/LowLevel/Joystick/makefile
index 7804e047b..1069beef8 100644
--- a/Demos/Device/LowLevel/Joystick/makefile
+++ b/Demos/Device/LowLevel/Joystick/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/LowLevel/Keyboard/makefile b/Demos/Device/LowLevel/Keyboard/makefile
index 299fdbbc5..d72aa22ff 100644
--- a/Demos/Device/LowLevel/Keyboard/makefile
+++ b/Demos/Device/LowLevel/Keyboard/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/LowLevel/KeyboardMouse/makefile b/Demos/Device/LowLevel/KeyboardMouse/makefile
index 957c3bc99..f2800813f 100644
--- a/Demos/Device/LowLevel/KeyboardMouse/makefile
+++ b/Demos/Device/LowLevel/KeyboardMouse/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/LowLevel/MIDI/makefile b/Demos/Device/LowLevel/MIDI/makefile
index b98042d63..e3ab3bfab 100644
--- a/Demos/Device/LowLevel/MIDI/makefile
+++ b/Demos/Device/LowLevel/MIDI/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/LowLevel/MassStorage/makefile b/Demos/Device/LowLevel/MassStorage/makefile
index ac5c7cbe6..e7c7b9786 100644
--- a/Demos/Device/LowLevel/MassStorage/makefile
+++ b/Demos/Device/LowLevel/MassStorage/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/LowLevel/Mouse/makefile b/Demos/Device/LowLevel/Mouse/makefile
index c23e1e773..1c9edf0e8 100644
--- a/Demos/Device/LowLevel/Mouse/makefile
+++ b/Demos/Device/LowLevel/Mouse/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/LowLevel/RNDISEthernet/makefile b/Demos/Device/LowLevel/RNDISEthernet/makefile
index c8d8e6b29..9235ab587 100644
--- a/Demos/Device/LowLevel/RNDISEthernet/makefile
+++ b/Demos/Device/LowLevel/RNDISEthernet/makefile
@@ -27,13 +27,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Device/LowLevel/VirtualSerial/makefile b/Demos/Device/LowLevel/VirtualSerial/makefile
index 87b16694d..a3f546082 100644
--- a/Demos/Device/LowLevel/VirtualSerial/makefile
+++ b/Demos/Device/LowLevel/VirtualSerial/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/DualRole/ClassDriver/MouseHostDevice/makefile b/Demos/DualRole/ClassDriver/MouseHostDevice/makefile
index 62d564036..158bc959f 100644
--- a/Demos/DualRole/ClassDriver/MouseHostDevice/makefile
+++ b/Demos/DualRole/ClassDriver/MouseHostDevice/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/makefile b/Demos/Host/ClassDriver/AndroidAccessoryHost/makefile
index 5614d2502..b1833d305 100644
--- a/Demos/Host/ClassDriver/AndroidAccessoryHost/makefile
+++ b/Demos/Host/ClassDriver/AndroidAccessoryHost/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/ClassDriver/AudioInputHost/makefile b/Demos/Host/ClassDriver/AudioInputHost/makefile
index efae02824..25d506ffc 100644
--- a/Demos/Host/ClassDriver/AudioInputHost/makefile
+++ b/Demos/Host/ClassDriver/AudioInputHost/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/ClassDriver/AudioOutputHost/makefile b/Demos/Host/ClassDriver/AudioOutputHost/makefile
index b11ab4808..5eb75bf29 100644
--- a/Demos/Host/ClassDriver/AudioOutputHost/makefile
+++ b/Demos/Host/ClassDriver/AudioOutputHost/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/ClassDriver/JoystickHostWithParser/makefile b/Demos/Host/ClassDriver/JoystickHostWithParser/makefile
index d0d03859f..1117d30a1 100644
--- a/Demos/Host/ClassDriver/JoystickHostWithParser/makefile
+++ b/Demos/Host/ClassDriver/JoystickHostWithParser/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/ClassDriver/KeyboardHost/makefile b/Demos/Host/ClassDriver/KeyboardHost/makefile
index 6951c8ce0..0f6da4303 100644
--- a/Demos/Host/ClassDriver/KeyboardHost/makefile
+++ b/Demos/Host/ClassDriver/KeyboardHost/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/ClassDriver/KeyboardHostWithParser/makefile b/Demos/Host/ClassDriver/KeyboardHostWithParser/makefile
index 3663ad798..64d5c5d2b 100644
--- a/Demos/Host/ClassDriver/KeyboardHostWithParser/makefile
+++ b/Demos/Host/ClassDriver/KeyboardHostWithParser/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/ClassDriver/MIDIHost/makefile b/Demos/Host/ClassDriver/MIDIHost/makefile
index 37d5a603a..602848278 100644
--- a/Demos/Host/ClassDriver/MIDIHost/makefile
+++ b/Demos/Host/ClassDriver/MIDIHost/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/ClassDriver/MassStorageHost/makefile b/Demos/Host/ClassDriver/MassStorageHost/makefile
index f87124e28..2278fd0d6 100644
--- a/Demos/Host/ClassDriver/MassStorageHost/makefile
+++ b/Demos/Host/ClassDriver/MassStorageHost/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/ClassDriver/MouseHost/makefile b/Demos/Host/ClassDriver/MouseHost/makefile
index f66efc089..0b18197bd 100644
--- a/Demos/Host/ClassDriver/MouseHost/makefile
+++ b/Demos/Host/ClassDriver/MouseHost/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/ClassDriver/MouseHostWithParser/makefile b/Demos/Host/ClassDriver/MouseHostWithParser/makefile
index d9f35eadf..9ebfbbd52 100644
--- a/Demos/Host/ClassDriver/MouseHostWithParser/makefile
+++ b/Demos/Host/ClassDriver/MouseHostWithParser/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/ClassDriver/PrinterHost/makefile b/Demos/Host/ClassDriver/PrinterHost/makefile
index 5aefa036b..4fd123ae6 100644
--- a/Demos/Host/ClassDriver/PrinterHost/makefile
+++ b/Demos/Host/ClassDriver/PrinterHost/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/ClassDriver/RNDISEthernetHost/makefile b/Demos/Host/ClassDriver/RNDISEthernetHost/makefile
index 41068539f..6f98d0a3b 100644
--- a/Demos/Host/ClassDriver/RNDISEthernetHost/makefile
+++ b/Demos/Host/ClassDriver/RNDISEthernetHost/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/ClassDriver/StillImageHost/makefile b/Demos/Host/ClassDriver/StillImageHost/makefile
index d7d35c76a..462fa2c5e 100644
--- a/Demos/Host/ClassDriver/StillImageHost/makefile
+++ b/Demos/Host/ClassDriver/StillImageHost/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/ClassDriver/VirtualSerialHost/makefile b/Demos/Host/ClassDriver/VirtualSerialHost/makefile
index f4683d36e..930700aaa 100644
--- a/Demos/Host/ClassDriver/VirtualSerialHost/makefile
+++ b/Demos/Host/ClassDriver/VirtualSerialHost/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/LowLevel/AndroidAccessoryHost/makefile b/Demos/Host/LowLevel/AndroidAccessoryHost/makefile
index 3d5a284a0..58e99ec34 100644
--- a/Demos/Host/LowLevel/AndroidAccessoryHost/makefile
+++ b/Demos/Host/LowLevel/AndroidAccessoryHost/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/LowLevel/AudioInputHost/makefile b/Demos/Host/LowLevel/AudioInputHost/makefile
index 877f13821..17e381a9e 100644
--- a/Demos/Host/LowLevel/AudioInputHost/makefile
+++ b/Demos/Host/LowLevel/AudioInputHost/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/LowLevel/AudioOutputHost/makefile b/Demos/Host/LowLevel/AudioOutputHost/makefile
index 19504ee8b..2f1f2111f 100644
--- a/Demos/Host/LowLevel/AudioOutputHost/makefile
+++ b/Demos/Host/LowLevel/AudioOutputHost/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/LowLevel/GenericHIDHost/makefile b/Demos/Host/LowLevel/GenericHIDHost/makefile
index 295ca08d4..77444236c 100644
--- a/Demos/Host/LowLevel/GenericHIDHost/makefile
+++ b/Demos/Host/LowLevel/GenericHIDHost/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/LowLevel/JoystickHostWithParser/makefile b/Demos/Host/LowLevel/JoystickHostWithParser/makefile
index 4300e2832..3d3ac5638 100644
--- a/Demos/Host/LowLevel/JoystickHostWithParser/makefile
+++ b/Demos/Host/LowLevel/JoystickHostWithParser/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/LowLevel/KeyboardHost/makefile b/Demos/Host/LowLevel/KeyboardHost/makefile
index a081ab613..d26318623 100644
--- a/Demos/Host/LowLevel/KeyboardHost/makefile
+++ b/Demos/Host/LowLevel/KeyboardHost/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/makefile b/Demos/Host/LowLevel/KeyboardHostWithParser/makefile
index 47edcbca1..0caa30256 100644
--- a/Demos/Host/LowLevel/KeyboardHostWithParser/makefile
+++ b/Demos/Host/LowLevel/KeyboardHostWithParser/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/LowLevel/MIDIHost/makefile b/Demos/Host/LowLevel/MIDIHost/makefile
index 38cebeaa3..76173cc15 100644
--- a/Demos/Host/LowLevel/MIDIHost/makefile
+++ b/Demos/Host/LowLevel/MIDIHost/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/LowLevel/MassStorageHost/makefile b/Demos/Host/LowLevel/MassStorageHost/makefile
index b2f4e7dff..9677d499d 100644
--- a/Demos/Host/LowLevel/MassStorageHost/makefile
+++ b/Demos/Host/LowLevel/MassStorageHost/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/LowLevel/MouseHost/makefile b/Demos/Host/LowLevel/MouseHost/makefile
index 87c76078b..a5979159c 100644
--- a/Demos/Host/LowLevel/MouseHost/makefile
+++ b/Demos/Host/LowLevel/MouseHost/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/LowLevel/MouseHostWithParser/makefile b/Demos/Host/LowLevel/MouseHostWithParser/makefile
index 3c643e9ba..04cd5a447 100644
--- a/Demos/Host/LowLevel/MouseHostWithParser/makefile
+++ b/Demos/Host/LowLevel/MouseHostWithParser/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/LowLevel/PrinterHost/makefile b/Demos/Host/LowLevel/PrinterHost/makefile
index f5632af3f..2a1e973cc 100644
--- a/Demos/Host/LowLevel/PrinterHost/makefile
+++ b/Demos/Host/LowLevel/PrinterHost/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/LowLevel/RNDISEthernetHost/makefile b/Demos/Host/LowLevel/RNDISEthernetHost/makefile
index 2b27089b4..399682027 100644
--- a/Demos/Host/LowLevel/RNDISEthernetHost/makefile
+++ b/Demos/Host/LowLevel/RNDISEthernetHost/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/LowLevel/StillImageHost/makefile b/Demos/Host/LowLevel/StillImageHost/makefile
index db0206b18..f2d0fc944 100644
--- a/Demos/Host/LowLevel/StillImageHost/makefile
+++ b/Demos/Host/LowLevel/StillImageHost/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Demos/Host/LowLevel/VirtualSerialHost/makefile b/Demos/Host/LowLevel/VirtualSerialHost/makefile
index 9d8eff0a1..f63826a27 100644
--- a/Demos/Host/LowLevel/VirtualSerialHost/makefile
+++ b/Demos/Host/LowLevel/VirtualSerialHost/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/LUFA/Build/DMBS/Template/makefile b/LUFA/Build/DMBS/Template/makefile
index d88292388..ba60ab9c2 100644
--- a/LUFA/Build/DMBS/Template/makefile
+++ b/LUFA/Build/DMBS/Template/makefile
@@ -20,13 +20,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include DMBS build script makefiles
-DMBS_PATH   ?= ../DMBS
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
 include $(DMBS_PATH)/core.mk
-include $(DMBS_PATH)/gcc.mk
 include $(DMBS_PATH)/cppcheck.mk
 include $(DMBS_PATH)/doxygen.mk
 include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
 include $(DMBS_PATH)/hid.mk
 include $(DMBS_PATH)/avrdude.mk
 include $(DMBS_PATH)/atprogram.mk
diff --git a/LUFA/Build/LUFA/lufa-gcc.mk b/LUFA/Build/LUFA/lufa-gcc.mk
new file mode 100644
index 000000000..f824362e4
--- /dev/null
+++ b/LUFA/Build/LUFA/lufa-gcc.mk
@@ -0,0 +1,43 @@
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2015.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+
+DMBS_BUILD_MODULES         += LUFA_GCC
+DMBS_BUILD_TARGETS         +=
+DMBS_BUILD_MANDATORY_VARS  += LUFA_PATH ARCH F_USB
+DMBS_BUILD_OPTIONAL_VARS   += BOARD
+DMBS_BUILD_PROVIDED_VARS   +=
+DMBS_BUILD_PROVIDED_MACROS +=
+
+SHELL = /bin/sh
+
+ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
+ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
+ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
+
+# Sanity check user supplied values
+$(call ERROR_IF_EMPTY, LUFA_PATH)
+$(call ERROR_IF_EMPTY, ARCH)
+$(call ERROR_IF_EMPTY, F_USB)
+
+# Default values of optionally user-supplied variables
+BOARD ?= NONE
+
+# Determine the utility prefix to use for the selected architecture
+ifeq ($(ARCH), XMEGA)
+   $(warning The XMEGA device support is currently EXPERIMENTAL (incomplete and/or non-functional), and is included for preview purposes only.)
+else ifeq ($(ARCH), UC3)
+   $(warning The UC3 device support is currently EXPERIMENTAL (incomplete and/or non-functional), and is included for preview purposes only.)
+endif
+
+# Common LUFA C/C++ includes/definitions
+LUFA_CXX_INCLUDES = -I. -I$(patsubst %/,%,$(LUFA_PATH))/..
+LUFA_CXX_DEFINES  = -DARCH=ARCH_$(ARCH) -DBOARD=BOARD_$(BOARD) -DF_USB=$(F_USB)UL
+
+# LUFA specific standard build options
+C_FLAGS   += $(LUFA_CXX_INCLUDES) $(LUFA_CXX_DEFINES) $(LUFA_CXX_FLAGS)
+CPP_FLAGS += $(LUFA_CXX_INCLUDES) $(LUFA_CXX_DEFINES) $(LUFA_CXX_FLAGS)
diff --git a/LUFA/Build/LUFA/lufa-sources.mk b/LUFA/Build/LUFA/lufa-sources.mk
new file mode 100644
index 000000000..7ca9a28dc
--- /dev/null
+++ b/LUFA/Build/LUFA/lufa-sources.mk
@@ -0,0 +1,95 @@
+#
+#             LUFA Library
+#     Copyright (C) Dean Camera, 2015.
+#
+#  dean [at] fourwalledcubicle [dot] com
+#           www.lufa-lib.org
+#
+
+DMBS_BUILD_MODULES         += LUFA_SOURCES
+DMBS_BUILD_TARGETS         +=
+DMBS_BUILD_MANDATORY_VARS  += LUFA_PATH ARCH
+DMBS_BUILD_OPTIONAL_VARS   +=
+DMBS_BUILD_PROVIDED_VARS   += LUFA_SRC_USB_DEVICE LUFA_SRC_USB_HOST    \
+                              LUFA_SRC_USB LUFA_SRC_USBCLASS_DEVICE    \
+                              LUFA_SRC_USBCLASS_HOST LUFA_SRC_USBCLASS \
+                              LUFA_SRC_TEMPERATURE LUFA_SRC_SERIAL     \
+                              LUFA_SRC_TWI LUFA_SRC_PLATFORM
+DMBS_BUILD_PROVIDED_MACROS +=
+
+SHELL = /bin/sh
+
+ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
+ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
+ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
+
+# Sanity check user supplied values
+$(foreach MANDATORY_VAR, $(LUFA_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
+$(call ERROR_IF_EMPTY, LUFA_PATH)
+$(call ERROR_IF_EMPTY, ARCH)
+
+# Allow LUFA_ROOT_PATH to be overridden elsewhere to support legacy LUFA makefiles
+LUFA_ROOT_PATH ?= $(patsubst %/,%,$(LUFA_PATH))
+
+# Construct LUFA module source variables
+LUFA_SRC_USB_COMMON      := $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/USBController_$(ARCH).c   \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/USBInterrupt_$(ARCH).c    \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Core/ConfigDescriptors.c               \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Core/Events.c                          \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Core/USBTask.c                         \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Common/HIDParser.c               \
+
+LUFA_SRC_USB_HOST        := $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Host_$(ARCH).c            \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Pipe_$(ARCH).c            \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/PipeStream_$(ARCH).c      \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Core/HostStandardReq.c                 \
+                            $(LUFA_SRC_USB_COMMON)
+
+LUFA_SRC_USB_DEVICE      := $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Device_$(ARCH).c          \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Endpoint_$(ARCH).c        \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/EndpointStream_$(ARCH).c  \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Core/DeviceStandardReq.c               \
+                            $(LUFA_SRC_USB_COMMON)
+
+LUFA_SRC_USBCLASS_DEVICE := $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/AudioClassDevice.c        \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/CDCClassDevice.c          \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/HIDClassDevice.c          \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/MassStorageClassDevice.c  \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/MIDIClassDevice.c         \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/PrinterClassDevice.c      \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/RNDISClassDevice.c        \
+
+LUFA_SRC_USBCLASS_HOST   := $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/AudioClassHost.c            \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/CDCClassHost.c              \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/HIDClassHost.c              \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/MassStorageClassHost.c      \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/MIDIClassHost.c             \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/PrinterClassHost.c          \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/RNDISClassHost.c            \
+                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/StillImageClassHost.c
+
+LUFA_SRC_USB             := $(sort $(LUFA_SRC_USB_COMMON) $(LUFA_SRC_USB_HOST) $(LUFA_SRC_USB_DEVICE))
+
+LUFA_SRC_USBCLASS        := $(LUFA_SRC_USBCLASS_DEVICE) $(LUFA_SRC_USBCLASS_HOST)
+
+LUFA_SRC_TEMPERATURE     := $(LUFA_ROOT_PATH)/Drivers/Board/Temperature.c
+
+LUFA_SRC_SERIAL          := $(LUFA_ROOT_PATH)/Drivers/Peripheral/$(ARCH)/Serial_$(ARCH).c
+
+LUFA_SRC_TWI             := $(LUFA_ROOT_PATH)/Drivers/Peripheral/$(ARCH)/TWI_$(ARCH).c
+
+ifeq ($(ARCH), UC3)
+   LUFA_SRC_PLATFORM     := $(LUFA_ROOT_PATH)/Platform/UC3/Exception.S   \
+                            $(LUFA_ROOT_PATH)/Platform/UC3/InterruptManagement.c
+else
+   LUFA_SRC_PLATFORM     :=
+endif
+
+# Build a list of all available module sources
+LUFA_SRC_ALL_FILES   := $(LUFA_SRC_USB)            \
+                        $(LUFA_SRC_USBCLASS)       \
+                        $(LUFA_SRC_TEMPERATURE)    \
+                        $(LUFA_SRC_SERIAL)         \
+                        $(LUFA_SRC_TWI)            \
+                        $(LUFA_SRC_PLATFORM)
diff --git a/LUFA/Build/lufa_build.mk b/LUFA/Build/lufa_build.mk
index d20493ea2..f7c496e18 100644
--- a/LUFA/Build/lufa_build.mk
+++ b/LUFA/Build/lufa_build.mk
@@ -6,79 +6,7 @@
 #           www.lufa-lib.org
 #
 
-DMBS_BUILD_MODULES         +=
-DMBS_BUILD_TARGETS         +=
-DMBS_BUILD_MANDATORY_VARS  += LUFA_PATH ARCH F_USB
-DMBS_BUILD_OPTIONAL_VARS   += BOARD
-DMBS_BUILD_PROVIDED_VARS   +=
-DMBS_BUILD_PROVIDED_MACROS +=
-
-# -----------------------------------------------------------------------------
-#               LUFA Core Build Buildsystem Makefile Module.
-# -----------------------------------------------------------------------------
-# DESCRIPTION:
-#   Subclass of the standard DMBS GCC build module, with LUFA specific
-#   extensions. This module provides the core build rules for the compilation
-#   of LUFA projects using GCC.
-# -----------------------------------------------------------------------------
-# TARGETS:
-#
-#    (None)
-#
-# MANDATORY PARAMETERS:
-#
-#    LUFA_PATH                 - Path to the LUFA library core
-#    ARCH                      - Device architecture name
-#    F_USB                     - Speed of the USB core clock, in Hz
-#
-# OPTIONAL PARAMETERS:
-#
-#    BOARD                     - LUFA board drivers to use
-#
-# PROVIDED VARIABLES:
-#
-#    (None)
-#
-# PROVIDED MACROS:
-#
-#    (None)
-#
-# -----------------------------------------------------------------------------
-
-SHELL = /bin/sh
-
-ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
-ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
-ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
-
-# Sanity check user supplied values
-$(call ERROR_IF_EMPTY, LUFA_PATH)
-$(call ERROR_IF_EMPTY, ARCH)
-$(call ERROR_IF_EMPTY, F_USB)
-
-# Default values of optionally user-supplied variables
-BOARD ?= NONE
-
-# Determine the utility prefix to use for the selected architecture
-ifeq ($(ARCH), XMEGA)
-   $(warning The XMEGA device support is currently EXPERIMENTAL (incomplete and/or non-functional), and is included for preview purposes only.)
-else ifeq ($(ARCH), UC3)
-   $(warning The UC3 device support is currently EXPERIMENTAL (incomplete and/or non-functional), and is included for preview purposes only.)
-endif
-
-# Common LUFA C/C++ includes/definitions
-LUFA_CXX_INCLUDES = -I. -I$(patsubst %/,%,$(LUFA_PATH))/..
-LUFA_CXX_DEFINES  = -DARCH=ARCH_$(ARCH) -DBOARD=BOARD_$(BOARD) -DF_USB=$(F_USB)UL
-
-# This flag is required for bootloaders as GCC will emit invalid jump table
-# assembly code for devices with large amounts of flash; the jump table target
-# is extracted from FLASH without using the correct ELPM instruction, resulting
-# in a pseudo-random jump target.
-LUFA_CXX_FLAGS    = -fno-jump-tables
-
-# LUFA specific standard build options
-C_FLAGS   += $(LUFA_CXX_INCLUDES) $(LUFA_CXX_DEFINES) $(LUFA_CXX_FLAGS)
-CPP_FLAGS += $(LUFA_CXX_INCLUDES) $(LUFA_CXX_DEFINES) $(LUFA_CXX_FLAGS)
-
-DMBS_PATH := $(LUFA_PATH)/Build/DMBS/DMBS
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
 include $(DMBS_PATH)/gcc.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
diff --git a/LUFA/Build/lufa_sources.mk b/LUFA/Build/lufa_sources.mk
index 0764d30f1..48291c731 100644
--- a/LUFA/Build/lufa_sources.mk
+++ b/LUFA/Build/lufa_sources.mk
@@ -6,139 +6,5 @@
 #           www.lufa-lib.org
 #
 
-DMBS_BUILD_MODULES         += LUFA_SOURCES
-DMBS_BUILD_TARGETS         +=
-DMBS_BUILD_MANDATORY_VARS  += LUFA_PATH ARCH
-DMBS_BUILD_OPTIONAL_VARS   +=
-DMBS_BUILD_PROVIDED_VARS   += LUFA_SRC_USB_DEVICE LUFA_SRC_USB_HOST    \
-                              LUFA_SRC_USB LUFA_SRC_USBCLASS_DEVICE    \
-                              LUFA_SRC_USBCLASS_HOST LUFA_SRC_USBCLASS \
-                              LUFA_SRC_TEMPERATURE LUFA_SRC_SERIAL     \
-                              LUFA_SRC_TWI LUFA_SRC_PLATFORM
-DMBS_BUILD_PROVIDED_MACROS +=
-
-# -----------------------------------------------------------------------------
-#               LUFA Sources Buildsystem Makefile Module.
-# -----------------------------------------------------------------------------
-# DESCRIPTION:
-#   Provides a set of makefile variables for the various LUFA module sources.
-#   Once included, the sources required to use a given LUFA module will become
-#   available using the makefile variable names listed in the LUFA project
-#   documentation.
-# -----------------------------------------------------------------------------
-# TARGETS:
-#
-#    (None)
-#
-# MANDATORY PARAMETERS:
-#
-#    LUFA_PATH                 - Path to the LUFA library core
-#    ARCH                      - Device architecture name
-#
-# OPTIONAL PARAMETERS:
-#
-#    (None)
-#
-# PROVIDED VARIABLES:
-#
-#    LUFA_SRC_USB_DEVICE       - List of LUFA USB driver source files required
-#                                for USB Device mode only
-#    LUFA_SRC_USB_HOST         - List of LUFA USB driver source files required
-#                                for USB Host mode only
-#    LUFA_SRC_USB              - List of LUFA USB driver source files for all
-#                                USB modes
-#    LUFA_SRC_USBCLASS_DEVICE  - List of LUFA USB Class driver source files for
-#                                USB Device mode only
-#    LUFA_SRC_USBCLASS_HOST    - List of LUFA USB Class driver source files for
-#                                USB Host mode only
-#    LUFA_SRC_USBCLASS         - List of LUFA USB Class driver source files for
-#                                all USB modes
-#    LUFA_SRC_TEMPERATURE      - List of LUFA temperature sensor driver source
-#                                files
-#    LUFA_SRC_SERIAL           - List of LUFA Serial U(S)ART driver source files
-#    LUFA_SRC_TWI              - List of LUFA TWI driver source files
-#    LUFA_SRC_PLATFORM         - List of LUFA architecture specific platform
-#                                management source files
-#
-# PROVIDED MACROS:
-#
-#    (None)
-#
-# -----------------------------------------------------------------------------
-
-SHELL = /bin/sh
-
-ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
-ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
-ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
-
-# Sanity check user supplied values
-$(foreach MANDATORY_VAR, $(LUFA_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
-$(call ERROR_IF_EMPTY, LUFA_PATH)
-$(call ERROR_IF_EMPTY, ARCH)
-
-# Allow LUFA_ROOT_PATH to be overridden elsewhere to support legacy LUFA makefiles
-LUFA_ROOT_PATH ?= $(patsubst %/,%,$(LUFA_PATH))
-
-# Construct LUFA module source variables
-LUFA_SRC_USB_COMMON      := $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/USBController_$(ARCH).c   \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/USBInterrupt_$(ARCH).c    \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Core/ConfigDescriptors.c               \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Core/Events.c                          \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Core/USBTask.c                         \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Common/HIDParser.c               \
-
-LUFA_SRC_USB_HOST        := $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Host_$(ARCH).c            \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Pipe_$(ARCH).c            \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/PipeStream_$(ARCH).c      \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Core/HostStandardReq.c                 \
-                            $(LUFA_SRC_USB_COMMON)
-
-LUFA_SRC_USB_DEVICE      := $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Device_$(ARCH).c          \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Endpoint_$(ARCH).c        \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/EndpointStream_$(ARCH).c  \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Core/DeviceStandardReq.c               \
-                            $(LUFA_SRC_USB_COMMON)
-
-LUFA_SRC_USBCLASS_DEVICE := $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/AudioClassDevice.c        \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/CDCClassDevice.c          \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/HIDClassDevice.c          \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/MassStorageClassDevice.c  \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/MIDIClassDevice.c         \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/PrinterClassDevice.c      \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/RNDISClassDevice.c        \
-
-LUFA_SRC_USBCLASS_HOST   := $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/AudioClassHost.c            \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/CDCClassHost.c              \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/HIDClassHost.c              \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/MassStorageClassHost.c      \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/MIDIClassHost.c             \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/PrinterClassHost.c          \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/RNDISClassHost.c            \
-                            $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/StillImageClassHost.c
-
-LUFA_SRC_USB             := $(sort $(LUFA_SRC_USB_COMMON) $(LUFA_SRC_USB_HOST) $(LUFA_SRC_USB_DEVICE))
-
-LUFA_SRC_USBCLASS        := $(LUFA_SRC_USBCLASS_DEVICE) $(LUFA_SRC_USBCLASS_HOST)
-
-LUFA_SRC_TEMPERATURE     := $(LUFA_ROOT_PATH)/Drivers/Board/Temperature.c
-
-LUFA_SRC_SERIAL          := $(LUFA_ROOT_PATH)/Drivers/Peripheral/$(ARCH)/Serial_$(ARCH).c
-
-LUFA_SRC_TWI             := $(LUFA_ROOT_PATH)/Drivers/Peripheral/$(ARCH)/TWI_$(ARCH).c
-
-ifeq ($(ARCH), UC3)
-   LUFA_SRC_PLATFORM     := $(LUFA_ROOT_PATH)/Platform/UC3/Exception.S   \
-                            $(LUFA_ROOT_PATH)/Platform/UC3/InterruptManagement.c
-else
-   LUFA_SRC_PLATFORM     :=
-endif
-
-# Build a list of all available module sources
-LUFA_SRC_ALL_FILES   := $(LUFA_SRC_USB)            \
-                        $(LUFA_SRC_USBCLASS)       \
-                        $(LUFA_SRC_TEMPERATURE)    \
-                        $(LUFA_SRC_SERIAL)         \
-                        $(LUFA_SRC_TWI)            \
-                        $(LUFA_SRC_PLATFORM)
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
diff --git a/LUFA/CodeTemplates/makefile_template b/LUFA/CodeTemplates/makefile_template
index dc8fc7356..291da359c 100644
--- a/LUFA/CodeTemplates/makefile_template
+++ b/LUFA/CodeTemplates/makefile_template
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/LUFA/DoxygenPages/BuildSystem.txt b/LUFA/DoxygenPages/BuildSystem.txt
index d5e051b79..ef57fcf0c 100644
--- a/LUFA/DoxygenPages/BuildSystem.txt
+++ b/LUFA/DoxygenPages/BuildSystem.txt
@@ -14,790 +14,99 @@
  *
  *  As it turned out to be fairly generic in nature, it was split out into its
  *  own separate project, called DMBS (<i>Dean's Makefile Build System</i>)
- *  which is released into the public domain. LUFA specific portions of the
+ *  which is released into the public domain. LUFA-specific portions of the
  *  LUFA build system extend DMBS, and provide a universal build system for all
  *  LUFA projects.
  *
- *  The latest DMBS project information can be found at:
+ *  The latest DMBS project information and documentation can be found at:
  *  https://github.com/abcminiuser/dmbs
  *
  *  DMBS is written in GNU Make, and each module is independent of one-another.
  *
- *  \section SSec_BuildSystem_Using Using the LUFA Build System
+ *  LUFA now uses DMBS for its build system, with some LUFA specific extension
+ *  modules.
  *
- *  For details on the prerequisites needed for Linux and Windows machines to be able to use the LUFA
- *  build system, see \ref Sec_CompilingApps_Prerequisites.
+ *  If you have problems building using LUFA, see \subpage Page_BuildTroubleshooting for resolution steps.
  *
- *  To use a LUFA build system module, simply add an include to your project makefile. All user projects
- *  should at a minimum include \ref Page_BuildModule_CORE for base functionality:
- *  \code
- *  include $(LUFA_PATH)/Build/lufa_core.mk
- *  \endcode
- *
- *  Once included in your project makefile, the associated build module targets will be added to your
- *  project's build makefile targets automatically. To call a build target, run <tt>make {TARGET_NAME}</tt>
- *  from the command line, substituting in the appropriate target name.
- *
- *  \see \ref Sec_ConfiguringApps_AppMakefileParams for a copy of the sample LUFA project makefile.
- *
- *  Each build module may have one or more mandatory parameters (GNU Make variables) which <i>must</i>
- *  be supplied in the project makefile for the module to work, and one or more optional parameters which
- *  may be defined and which will assume a sensible default if not.
- *
- *  \section SSec_BuildSystem_Modules Available Modules
- *
- *  The following modules are included in this LUFA release:
- *
- *  \li \subpage Page_BuildModule_ATPROGRAM - Device Programming
- *  \li \subpage Page_BuildModule_AVRDUDE - Device Programming
- *  \li \subpage Page_BuildModule_BUILD - Compiling/Assembling/Linking
- *  \li \subpage Page_BuildModule_CORE - Core Build System Functions
- *  \li \subpage Page_BuildModule_CPPCHECK - Static Code Analysis
- *  \li \subpage Page_BuildModule_DFU - Device Programming
- *  \li \subpage Page_BuildModule_DOXYGEN - Automated Source Code Documentation
- *  \li \subpage Page_BuildModule_HID - Device Programming
- *  \li \subpage Page_BuildModule_SOURCES - LUFA Module Source Code Variables
- *
- *  If you have problems building using the LUFA build system, see \subpage Page_BuildTroubleshooting for resolution steps.
- */
-
- /** \page Page_BuildModule_BUILD The BUILD build module
- *
- *  The BUILD LUFA build system module, providing targets for the compilation,
- *  assembling and linking of an application from source code into binary files
- *  suitable for programming into a target device, using the GCC compiler.
- *
- *  To use this module in your application makefile, add the following code:
- *  \code
- *  include $(LUFA_PATH)/Build/lufa_build.mk
- *  \endcode
- *
- *  \section SSec_BuildModule_BUILD_Requirements Requirements
- *  This module requires the the architecture appropriate binaries of the GCC compiler are available in your
- *  system's <b>PATH</b> variable. The GCC compiler and associated toolchain is distributed in Atmel AVR Studio
- *  5.x and Atmel Studio 6.x installation directories, as well as in many third party distribution packages.
- *
- *  \section SSec_BuildModule_BUILD_Targets Targets
- *
- *  <table>
- *   <tr>
- *    <td><tt>size</tt></td>
- *    <td>Display size of the compiled application FLASH and SRAM segments.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>symbol-sizes</tt></td>
- *    <td>Display a size-sorted list of symbols from the compiled application, in decimal bytes.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>lib</tt></td>
- *    <td>Build and archive all source files into a library A binary file.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>all</tt></td>
- *    <td>Build and link the application into ELF debug and HEX binary files.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>elf</tt></td>
- *    <td>Build and link the application into an ELF debug file.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>bin</tt></td>
- *    <td>Build and link the application and produce a BIN binary file.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>hex</tt></td>
- *    <td>Build and link the application and produce HEX and EEP binary files.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>lss</tt></td>
- *    <td>Build and link the application and produce a LSS source code/assembly code mixed listing file.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>clean</tt></td>
- *    <td>Remove all intermediary files and binary output files.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>mostlyclean</tt></td>
- *    <td>Remove all intermediary files but preserve any binary output files.</td>
- *   </tr>
- *   <tr>
- *    <td><tt><i>&lt;filename&gt;</i>.s</tt></td>
- *    <td>Create an assembly listing of a given input C/C++ source file.</td>
- *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_BUILD_MandatoryParams Mandatory Parameters
- *
- *  <table>
- *   <tr>
- *    <td><tt>TARGET</tt></td>
- *    <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td>
- *   </tr>
- *   <tr>
- *    <td><tt>ARCH</tt></td>
- *    <td>Architecture of the target processor (see \ref Page_DeviceSupport).</td>
- *   </tr>
- *   <tr>
- *    <td><tt>MCU</tt></td>
- *    <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td>
- *   </tr>
- *   <tr>
- *    <td><tt>SRC</tt></td>
- *    <td>List of relative or absolute paths to the application C (.c), C++ (.cpp) and Assembly (.S) source files.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>F_USB</tt></td>
- *    <td>Speed in Hz of the input clock frequency to the target's USB controller.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>LUFA_PATH</tt></td>
- *    <td>Path to the LUFA library core, either relative or absolute (e.g. <tt>../LUFA-000000/LUFA/</tt>).</td>
- *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_BUILD_OptionalParams Optional Parameters
- *
- *  <table>
- *   <tr>
- *    <td><tt>BOARD</tt></td>
- *    <td>LUFA board hardware drivers to use (see \ref Page_DeviceSupport).</td>
- *   </tr>
- *   <tr>
- *    <td><tt>OPTIMIZATION</tt></td>
- *    <td>Optimization level to use when compiling source files (see GCC manual).</td>
- *   </tr>
- *   <tr>
- *    <td><tt>C_STANDARD</tt></td>
- *    <td>Version of the C standard to apply when compiling C++ source files (see GCC manual).</td>
- *   </tr>
- *   <tr>
- *    <td><tt>CPP_STANDARD</tt></td>
- *    <td>Version of the C++ standard to apply when compiling C++ source files (see GCC manual).</td>
- *   </tr>
- *   <tr>
- *    <td><tt>DEBUG_FORMAT</tt></td>
- *    <td>Format of the debug information to embed in the generated object files (see GCC manual).</td>
- *   </tr>
- *   <tr>
- *    <td><tt>DEBUG_LEVEL</tt></td>
- *    <td>Level of the debugging information to embed in the generated object files (see GCC manual).</td>
- *   </tr>
- *   <tr>
- *    <td><tt>F_CPU</tt></td>
- *    <td>Speed of the processor CPU clock, in Hz.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>C_FLAGS</tt></td>
- *    <td>Flags to pass to the C compiler only, after the automatically generated flags.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>CPP_FLAGS</tt></td>
- *    <td>Flags to pass to the C++ compiler only, after the automatically generated flags.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>ASM_FLAGS</tt></td>
- *    <td>Flags to pass to the assembler only, after the automatically generated flags.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>CC_FLAGS</tt></td>
- *    <td>Common flags to pass to the C/C++ compiler and assembler, after the automatically generated flags.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>COMPILER_PATH</tt></td>
- *    <td>Directory where the C/C++ toolchain is located, if not available in the system <tt>PATH</tt>.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>LD_FLAGS</tt></td>
- *    <td>Flags to pass to the linker, after the automatically generated flags.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>LINKER_RELAXATIONS</tt></td>
- *    <td>Enables or disables linker relaxations when linking the application binary. This can reduce the total size
- *        of the application by replacing full \c CALL instructions with smaller \c RCALL instructions where possible.
- *        \note On some unpatched versions of binutils, this can cause link failures in some circumstances. If you
- *              receive a link error <tt>relocation truncated to fit: R_AVR_13_PCREL</tt>, disable this setting.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>OBJDIR</tt></td>
- *    <td>Directory to place the generated object and dependency files. If set to "." the same folder as the source file will be used.
- *        \note When this option is enabled, all source filenames <b>must</b> be unique.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>OBJECT_FILES</tt></td>
- *    <td>List of additional object files that should be linked into the resulting binary.</td>
- *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_BUILD_ProvidedVariables Module Provided Variables
- *
- *  <table>
- *   <tr>
- *    <td><i>None</i></td>
- *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_BUILD_ProvidedMacros Module Provided Macros
- *
- *  <table>
- *   <tr>
- *    <td><i>None</i></td>
- *   </tr>
- *  </table>
- */
-
-/** \page Page_BuildModule_CORE The CORE build module
- *
- *  The core LUFA build system module, providing common build system help and information targets.
- *
- *  To use this module in your application makefile, add the following code:
- *  \code
- *  include $(LUFA_PATH)/Build/lufa_core.mk
- *  \endcode
- *
- *  \section SSec_BuildModule_CORE_Requirements Requirements
- *  This module has no requirements outside a standard *nix shell like environment; the <tt>sh</tt>
- *  shell, GNU <tt>make</tt> and *nix CoreUtils (<tt>echo</tt>, <tt>printf</tt>, etc.).
- *
- *  \section SSec_BuildModule_CORE_Targets Targets
- *
- *  <table>
- *   <tr>
- *    <td><tt>help</tt></td>
- *    <td>Display build system help and configuration information.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>list_targets</tt></td>
- *    <td>List all available build targets from the build system.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>list_modules</tt></td>
- *    <td>List all available build modules from the build system.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>list_mandatory</tt></td>
- *    <td>List all mandatory parameters required by the included modules.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>list_optional</tt></td>
- *    <td>List all optional parameters required by the included modules.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>list_provided</tt></td>
- *    <td>List all variables provided by the included modules.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>list_macros</tt></td>
- *    <td>List all macros provided by the included modules.</td>
- *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_CORE_MandatoryParams Mandatory Parameters
- *
- *  <table>
- *   <tr>
- *    <td><i>None</i></td>
- *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_CORE_OptionalParams Optional Parameters
- *
- *  <table>
- *   <tr>
- *    <td><i>None</i></td>
- *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_CORE_ProvidedVariables Module Provided Variables
- *
- *  <table>
- *   <tr>
- *    <td><i>None</i></td>
- *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_CORE_ProvidedMacros Module Provided Macros
- *
- *  <table>
- *   <tr>
- *    <td><i>None</i></td>
- *   </tr>
- *  </table>
- */
-
-/** \page Page_BuildModule_ATPROGRAM The ATPROGRAM build module
- *
- *  The ATPROGRAM programming utility LUFA build system module, providing targets to reprogram an
- *  Atmel processor FLASH and EEPROM memories with a project's compiled binary output files.
- *
- *  To use this module in your application makefile, add the following code:
- *  \code
- *  include $(LUFA_PATH)/Build/lufa_atprogram.mk
- *  \endcode
- *
- *  \section SSec_BuildModule_ATPROGRAM_Requirements Requirements
- *  This module requires the <tt>atprogram.exe</tt> utility to be available in your system's <b>PATH</b>
- *  variable. The <tt>atprogram.exe</tt> utility is distributed in Atmel AVR Studio 5.x and Atmel Studio 6.x
- *  inside the application install folder's "\atbackend" subdirectory.
- *
- *  \section SSec_BuildModule_ATPROGRAM_Targets Targets
- *
- *  <table>
- *   <tr>
- *    <td><tt>atprogram</tt></td>
- *    <td>Program the device FLASH memory with the application's executable data.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>atprogram-ee</tt></td>
- *    <td>Program the device EEPROM memory with the application's EEPROM data.</td>
- *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_ATPROGRAM_MandatoryParams Mandatory Parameters
- *
- *  <table>
- *   <tr>
- *    <td><tt>MCU</tt></td>
- *    <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td>
- *   </tr>
- *   <tr>
- *    <td><tt>TARGET</tt></td>
- *    <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td>
- *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_ATPROGRAM_OptionalParams Optional Parameters
- *
- *  <table>
- *   <tr>
- *    <td><tt>ATPROGRAM_PROGRAMMER</tt></td>
- *    <td>Name of the Atmel programmer or debugger tool to communicate with (e.g. <tt>jtagice3</tt>).</td>
- *   </tr>
- *   <tr>
- *    <td><tt>ATPROGRAM_INTERFACE</tt></td>
- *    <td>Name of the programming interface to use when programming the target (e.g. <tt>spi</tt>).</td>
- *   </tr>
- *   <tr>
- *    <td><tt>ATPROGRAM_PORT</tt></td>
- *    <td>Name of the communication port to use when when programming with a serially connected tool (e.g. <tt>COM2</tt>).</td>
- *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_ATPROGRAM_ProvidedVariables Module Provided Variables
- *
- *  <table>
- *   <tr>
- *    <td><i>None</i></td>
- *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_ATPROGRAM_ProvidedMacros Module Provided Macros
- *
- *  <table>
- *   <tr>
- *    <td><i>None</i></td>
- *   </tr>
- *  </table>
- */
-
-/** \page Page_BuildModule_AVRDUDE The AVRDUDE build module
- *
- *  The AVRDUDE programming utility LUFA build system module, providing targets to reprogram an
- *  Atmel processor FLASH and EEPROM memories with a project's compiled binary output files.
- *
- *  To use this module in your application makefile, add the following code:
- *  \code
- *  include $(LUFA_PATH)/Build/lufa_avrdude.mk
- *  \endcode
- *
- *  \section SSec_BuildModule_AVRDUDE_Requirements Requirements
- *  This module requires the <tt>avrdude</tt> utility to be available in your system's <b>PATH</b>
- *  variable. The <tt>avrdude</tt> utility is distributed in the old WinAVR project releases for
- *  Windows (<a>http://winavr.sourceforge.net</a>) or can be installed on *nix systems via the project's
- *  source code (<a>https://savannah.nongnu.org/projects/avrdude</a>) or through the package manager.
- *
- *  \section SSec_BuildModule_AVRDUDE_Targets Targets
- *
- *  <table>
- *   <tr>
- *    <td><tt>avrdude</tt></td>
- *    <td>Program the device FLASH memory with the application's executable data.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>avrdude-ee</tt></td>
- *    <td>Program the device EEPROM memory with the application's EEPROM data.</td>
- *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_AVRDUDE_MandatoryParams Mandatory Parameters
- *
- *  <table>
- *   <tr>
- *    <td><tt>MCU</tt></td>
- *    <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td>
- *   </tr>
- *   <tr>
- *    <td><tt>TARGET</tt></td>
- *    <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td>
- *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_AVRDUDE_OptionalParams Optional Parameters
- *
- *  <table>
- *   <tr>
- *    <td><tt>AVRDUDE_PROGRAMMER</tt></td>
- *    <td>Name of the programmer or debugger tool to communicate with (e.g. <tt>jtagicemkii</tt>).</td>
- *   </tr>
- *   <tr>
- *    <td><tt>AVRDUDE_PORT</tt></td>
- *    <td>Name of the communication port to use when when programming with the connected tool (e.g. <tt>COM2</tt>, <tt>/dev/ttyUSB0</tt> or <tt>usb</tt>).</td>
- *   </tr>
- *   <tr>
- *    <td><tt>AVRDUDE_FLAGS</tt></td>
- *    <td>Additional flags to pass to avrdude when programming, applied after the automatically generated flags.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>AVRDUDE_MEMORY</tt></td>
- *    <td>Main memory space used when programming in an application *e.g. <tt>application</tt> for a DFU bootloader, or <tt>flash</tt> for a regular programmer).</td>
- *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_AVRDUDE_ProvidedVariables Module Provided Variables
- *
- *  <table>
- *   <tr>
- *    <td><i>None</i></td>
- *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_AVRDUDE_ProvidedMacros Module Provided Macros
- *
- *  <table>
- *   <tr>
- *    <td><i>None</i></td>
- *   </tr>
- *  </table>
- */
-
- /** \page Page_BuildModule_CPPCHECK The CPPCHECK build module
- *
- *  The CPPCHECK programming utility LUFA build system module, providing targets to statically
- *  analyze C and C++ source code for errors and performance/style issues.
- *
- *  To use this module in your application makefile, add the following code:
- *  \code
- *  include $(LUFA_PATH)/Build/lufa_cppcheck.mk
- *  \endcode
- *
- *  \section SSec_BuildModule_CPPCHECK_Requirements Requirements
- *  This module requires the <tt>cppcheck</tt> utility to be available in your system's <b>PATH</b>
- *  variable. The <tt>cppcheck</tt> utility is distributed through the project's home page
- *  (<a>http://cppcheck.sourceforge.net</a>) for Windows, and can be installed on *nix systems via
- *  the project's source code or through the package manager.
- *
- *  \section SSec_BuildModule_CPPCHECK_Targets Targets
- *
- *  <table>
- *   <tr>
- *    <td><tt>cppcheck</tt></td>
- *    <td>Statically analyze the project source code for issues.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>cppcheck-config</tt></td>
- *    <td>Check the <tt>cppcheck</tt> configuration - scan source code and warn about missing header files and other issues.</td>
- *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_CPPCHECK_MandatoryParams Mandatory Parameters
- *
- *  <table>
- *   <tr>
- *    <td><tt>SRC</tt></td>
- *    <td>List of source files to statically analyze.</td>
- *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_CPPCHECK_OptionalParams Optional Parameters
- *
- *  <table>
- *   <tr>
- *    <td><tt>CPPCHECK_INCLUDES</tt></td>
- *    <td>Path of extra directories to check when attemting to resolve C/C++ header file includes.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>CPPCHECK_EXCLUDES</tt></td>
- *    <td>Paths or path fragments to exclude when analyzing.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>CPPCHECK_MSG_TEMPLATE</tt></td>
- *    <td>Output message template to use when printing errors, warnings and information (see <tt>cppcheck</tt> documentation).</td>
- *   </tr>
- *   <tr>
- *    <td><tt>CPPCHECK_ENABLE</tt></td>
- *    <td>Analysis rule categories to enable (see <tt>cppcheck</tt> documentation).</td>
- *   </tr>
- *   <tr>
- *    <td><tt>CPPCHECK_SUPPRESS</tt></td>
- *    <td>Specific analysis rules to suppress (see <tt>cppcheck</tt> documentation).</td>
- *   </tr>
- *   <tr>
- *    <td><tt>CPPCHECK_FAIL_ON_WARNING</tt></td>
- *    <td>Set to <b>Y</b> to fail the analysis job with an error exit code if warnings are found, <b>N</b> to continue without failing.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>CPPCHECK_QUIET</tt></td>
- *    <td>Set to <b>Y</b> to suppress all output except warnings and errors, <b>N</b> to show verbose output information.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>CPPCHECK_FLAGS</tt></td>
- *    <td>Extra flags to pass to <tt>cppcheck</tt>, after the automatically generated flags.</td>
- *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_CPPCHECK_ProvidedVariables Module Provided Variables
- *
- *  <table>
- *   <tr>
- *    <td><i>None</i></td>
- *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_CPPCHECK_ProvidedMacros Module Provided Macros
- *
- *  <table>
- *   <tr>
- *    <td><i>None</i></td>
- *   </tr>
- *  </table>
+ *  \li \subpage Page_BuildModule_LUFA_SOURCES - The LUFA SOURCES extension module for DMBS
+ *  \li \subpage Page_BuildModule_LUFA_GCC - The LUFA GCC extension module for DMBS
  */
 
- /** \page Page_BuildModule_DFU The DFU build module
+/** \page Page_BuildModule_LUFA_SOURCES LUFA SOURCES extension module for DMBS
  *
- *  The DFU programming utility LUFA build system module, providing targets to reprogram an
- *  Atmel processor FLASH and EEPROM memories with a project's compiled binary output files.
- *  This module requires a DFU class bootloader to be running in the target, compatible with
- *  the DFU bootloader protocol as published by Atmel.
+ *  The LUFA SOURCES extension more for DMBS provides LUFA specific variables
+ *  listing the various LUFA source files required to be build by a project for
+ *  a given LUFA module. This module gives a way to reference LUFA source files
+ *  symbolically, so that changes to the library structure do not break the
+ *  library makefile.
  *
  *  To use this module in your application makefile, add the following code:
  *  \code
- *  include $(LUFA_PATH)/Build/lufa_dfu.mk
+ *  include $(LUFA_PATH)/Build/LUFA/lufa-sources.mk
  *  \endcode
  *
- *  \section SSec_BuildModule_DFU_Requirements Requirements
- *  This module requires either the <tt>batchisp</tt> utility from Atmel's FLIP utility, or the open
- *  source <tt>dfu-programmer</tt> utility (<a>http://dfu-programmer.sourceforge.net/</a>) to be
- *  available in your system's <b>PATH</b> variable. On *nix systems the <tt>dfu-programmer</tt> utility
- *  can be installed via the project's source code or through the package manager.
- *
- *  \section SSec_BuildModule_DFU_Targets Targets
- *
- *  <table>
- *   <tr>
- *    <td><tt>dfu</tt></td>
- *    <td>Program the device FLASH memory with the application's executable data using <tt>dfu-programmer</tt>.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>dfu-ee</tt></td>
- *    <td>Program the device EEPROM memory with the application's EEPROM data using <tt>dfu-programmer</tt>.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>flip</tt></td>
- *    <td>Program the device FLASH memory with the application's executable data using <tt>batchisp</tt>.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>flip-ee</tt></td>
- *    <td>Program the device EEPROM memory with the application's EEPROM data using <tt>batchisp</tt>.</td>
- *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_DFU_MandatoryParams Mandatory Parameters
- *
- *  <table>
- *   <tr>
- *    <td><tt>MCU</tt></td>
- *    <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td>
- *   </tr>
- *   <tr>
- *    <td><tt>TARGET</tt></td>
- *    <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td>
- *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_DFU_OptionalParams Optional Parameters
- *
- *  <table>
- *   <tr>
- *    <td><i>None</i></td>
- *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_DFU_ProvidedVariables Module Provided Variables
- *
- *  <table>
- *   <tr>
- *    <td><i>None</i></td>
- *   </tr>
- *  </table>
+ *  \section SSec_BuildModule_LUFA_SOURCES_Requirements Requirements
+ *  None.
  *
- *  \section SSec_BuildModule_DFU_ProvidedMacros Module Provided Macros
+ *  \section SSec_BuildModule_LUFA_SOURCES_Targets Targets
  *
  *  <table>
  *   <tr>
  *    <td><i>None</i></td>
  *   </tr>
  *  </table>
- */
-
- /** \page Page_BuildModule_DOXYGEN The DOXYGEN build module
- *
- *  The DOXYGEN code documentation utility LUFA build system module, providing targets to generate
- *  project HTML and other format documentation from a set of source files that include special
- *  Doxygen comments.
- *
- *  To use this module in your application makefile, add the following code:
- *  \code
- *  include $(LUFA_PATH)/Build/lufa_doxygen.mk
- *  \endcode
- *
- *  \section SSec_BuildModule_DOXYGEN_Requirements Requirements
- *  This module requires the <tt>doxygen</tt> utility from the Doxygen website
- *  (<a>http://www.doxygen.org/</a>) to be available in your system's <b>PATH</b> variable. On *nix
- *  systems the <tt>doxygen</tt> utility can be installed via the project's source code or through
- *  the package manager.
- *
- *  \section SSec_BuildModule_DOXYGEN_Targets Targets
- *
- *  <table>
- *   <tr>
- *    <td><tt>doxygen</tt></td>
- *    <td>Generate project documentation.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>doxygen_create</tt></td>
- *    <td>Create a new Doxygen configuration file using the latest template.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>doxygen_upgrade</tt></td>
- *    <td>Upgrade an existing Doxygen configuration file to the latest template</td>
- *   </tr>
- *  </table>
  *
- *  \section SSec_BuildModule_DOXYGEN_MandatoryParams Mandatory Parameters
+ *  \section SSec_BuildModule_LUFA_SOURCES_MandatoryParams Mandatory Parameters
  *
  *  <table>
  *   <tr>
  *    <td><tt>LUFA_PATH</tt></td>
  *    <td>Path to the LUFA library core, either relative or absolute (e.g. <tt>../LUFA-000000/LUFA/</tt>).</td>
  *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_DOXYGEN_OptionalParams Optional Parameters
- *
- *  <table>
- *   <tr>
- *    <td><tt>DOXYGEN_CONF</tt></td>
- *    <td>Name and path of the base Doxygen configuration file for the project.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>DOXYGEN_FAIL_ON_WARNING</tt></td>
- *    <td>Set to <b>Y</b> to fail the generation with an error exit code if warnings are found other than unsupported configuration parameters, <b>N</b> to continue without failing.</td>
- *   </tr>
  *   <tr>
- *    <td><tt>DOXYGEN_OVERRIDE_PARAMS</tt></td>
- *    <td>Extra Doxygen configuration parameters to apply, overriding the corresponding config entry in the project's configuration file (e.g. <tt>QUIET=YES</tt>).</td>
- *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_DOXYGEN_ProvidedVariables Module Provided Variables
- *
- *  <table>
- *   <tr>
- *    <td><i>None</i></td>
+ *    <td><tt>ARCH</tt></td>
+ *    <td>Architecture of the target processor (see \ref Page_DeviceSupport).</td>
  *   </tr>
  *  </table>
  *
- *  \section SSec_BuildModule_DOXYGEN_ProvidedMacros Module Provided Macros
+ *  \section SSec_BuildModule_LUFA_SOURCES_OptionalParams Optional Parameters
  *
  *  <table>
  *   <tr>
  *    <td><i>None</i></td>
  *   </tr>
  *  </table>
- */
-
- /** \page Page_BuildModule_HID The HID build module
- *
- *  The HID programming utility LUFA build system module, providing targets to reprogram an
- *  Atmel processor's FLASH memory with a project's compiled binary output file. This module
- *  requires a HID class bootloader to be running in the target, using a protocol compatible
- *  with the PJRC "HalfKay" protocol (<a>http://www.pjrc.com/teensy/halfkay_protocol.html</a>).
- *
- *  To use this module in your application makefile, add the following code:
- *  \code
- *  include $(LUFA_PATH)/Build/lufa_hid.mk
- *  \endcode
  *
- *  \section SSec_BuildModule_HID_Requirements Requirements
- *  This module requires either the <tt>hid_bootloader_cli</tt> utility from the included LUFA HID
- *  class bootloader API subdirectory, or the <tt>teensy_loader_cli</tt> utility from PJRC
- *  (<a>http://www.pjrc.com/teensy/loader_cli.html</a>) to be available in your system's <b>PATH</b>
- *  variable.
- *
- *  \section SSec_BuildModule_HID_Targets Targets
+ *  \section SSec_BuildModule_LUFA_SOURCES_ProvidedVariables Module Provided Variables
  *
  *  <table>
  *   <tr>
- *    <td><tt>hid</tt></td>
- *    <td>Program the device FLASH memory with the application's executable data using <tt>hid_bootloader_cli</tt>.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>hid-ee</tt></td>
- *    <td>Program the device EEPROM memory with the application's EEPROM data using <tt>hid_bootloader_cli</tt> and
- *        a temporary AVR application programmed into the target's FLASH.
- *        \note This will erase the currently loaded application in the target.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>teensy</tt></td>
- *    <td>Program the device FLASH memory with the application's executable data using <tt>teensy_loader_cli</tt>.</td>
+ *    <td><tt>LUFA_SRC_USB</tt></td>
+ *    <td>List of LUFA USB driver source files.</td>
  *   </tr>
  *   <tr>
- *    <td><tt>teensy-ee</tt></td>
- *    <td>Program the device EEPROM memory with the application's EEPROM data using <tt>teensy_loader_cli</tt> and
- *        a temporary AVR application programmed into the target's FLASH.
- *        \note This will erase the currently loaded application in the target.</td>
+ *    <td><tt>LUFA_SRC_USBCLASS</tt></td>
+ *    <td>List of LUFA USB Class driver source files.</td>
  *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_HID_MandatoryParams Mandatory Parameters
- *
- *  <table>
  *   <tr>
- *    <td><tt>MCU</tt></td>
- *    <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td>
+ *    <td><tt>LUFA_SRC_TEMPERATURE</tt></td>
+ *    <td>List of LUFA temperature sensor driver source files.</td>
  *   </tr>
  *   <tr>
- *    <td><tt>TARGET</tt></td>
- *    <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td>
+ *    <td><tt>LUFA_SRC_SERIAL</tt></td>
+ *    <td>List of LUFA Serial U(S)ART driver source files.</td>
  *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_HID_OptionalParams Optional Parameters
- *
- *  <table>
  *   <tr>
- *    <td><i>None</i></td>
+ *    <td><tt>LUFA_SRC_TWI</tt></td>
+ *    <td>List of LUFA TWI driver source files.</td>
  *   </tr>
- *  </table>
- *
- *  \section SSec_BuildModule_HID_ProvidedVariables Module Provided Variables
- *
- *  <table>
  *   <tr>
- *    <td><i>None</i></td>
+ *    <td><tt>LUFA_SRC_PLATFORM</tt></td>
+ *    <td>List of LUFA architecture specific platform management source files.</td>
  *   </tr>
  *  </table>
  *
- *  \section SSec_BuildModule_HID_ProvidedMacros Module Provided Macros
+ *  \section SSec_BuildModule_LUFA_SOURCES_ProvidedMacros Module Provided Macros
  *
  *  <table>
  *   <tr>
@@ -806,22 +115,22 @@
  *  </table>
  */
 
- /** \page Page_BuildModule_SOURCES The SOURCES build module
+/** \page Page_BuildModule_LUFA_GCC LUFA GCC extension module for DMBS
  *
- *  The SOURCES LUFA build system module, providing variables listing the various LUFA source files
- *  required to be build by a project for a given LUFA module. This module gives a way to reference
- *  LUFA source files symbolically, so that changes to the library structure do not break the library
- *  makefile.
+ *  The LUFA GCC extension module for the standard DMBS GCC module extends the
+ *  latter to support the compilation of LUFA powered projects. It should be
+ *  imported into your LUFA powered project makefiles to ensure that the correct
+ *  build settings are used for the project's configuration.
  *
  *  To use this module in your application makefile, add the following code:
  *  \code
- *  include $(LUFA_PATH)/Build/lufa_sources.mk
+ *  include $(LUFA_PATH)/Build/LUFA/lufa-gcc.mk
  *  \endcode
  *
- *  \section SSec_BuildModule_SOURCES_Requirements Requirements
- *  None.
+ *  \section SSec_BuildModule_LUFA_GCC_Requirements Requirements
+ *  This module should be included in your makefile *after* the DMBS GCC module.
  *
- *  \section SSec_BuildModule_SOURCES_Targets Targets
+ *  \section SSec_BuildModule_LUFA_GCC_Targets Targets
  *
  *  <table>
  *   <tr>
@@ -829,57 +138,33 @@
  *   </tr>
  *  </table>
  *
- *  \section SSec_BuildModule_SOURCES_MandatoryParams Mandatory Parameters
+ *  \section SSec_BuildModule_LUFA_GCC_MandatoryParams Mandatory Parameters
  *
  *  <table>
  *   <tr>
  *    <td><tt>LUFA_PATH</tt></td>
  *    <td>Path to the LUFA library core, either relative or absolute (e.g. <tt>../LUFA-000000/LUFA/</tt>).</td>
  *   </tr>
- *   <tr>
- *    <td><tt>ARCH</tt></td>
- *    <td>Architecture of the target processor (see \ref Page_DeviceSupport).</td>
- *   </tr>
  *  </table>
  *
- *  \section SSec_BuildModule_SOURCES_OptionalParams Optional Parameters
+ *  \section SSec_BuildModule_LUFA_GCC_OptionalParams Optional Parameters
  *
  *  <table>
  *   <tr>
- *    <td><i>None</i></td>
+ *    <td><tt>BOARD</tt></td>
+ *    <td>LUFA board hardware drivers to use (see \ref Page_DeviceSupport).</td>
  *   </tr>
  *  </table>
  *
- *  \section SSec_BuildModule_SOURCES_ProvidedVariables Module Provided Variables
+ *  \section SSec_BuildModule_LUFA_GCC_ProvidedVariables Module Provided Variables
  *
  *  <table>
  *   <tr>
- *    <td><tt>LUFA_SRC_USB</tt></td>
- *    <td>List of LUFA USB driver source files.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>LUFA_SRC_USBCLASS</tt></td>
- *    <td>List of LUFA USB Class driver source files.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>LUFA_SRC_TEMPERATURE</tt></td>
- *    <td>List of LUFA temperature sensor driver source files.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>LUFA_SRC_SERIAL</tt></td>
- *    <td>List of LUFA Serial U(S)ART driver source files.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>LUFA_SRC_TWI</tt></td>
- *    <td>List of LUFA TWI driver source files.</td>
- *   </tr>
- *   <tr>
- *    <td><tt>LUFA_SRC_PLATFORM</tt></td>
- *    <td>List of LUFA architecture specific platform management source files.</td>
+ *    <td><i>None</i></td>
  *   </tr>
  *  </table>
  *
- *  \section SSec_BuildModule_SOURCES_ProvidedMacros Module Provided Macros
+ *  \section SSec_BuildModule_LUFA_GCC_ProvidedMacros Module Provided Macros
  *
  *  <table>
  *   <tr>
@@ -890,9 +175,13 @@
 
 /** \page Page_BuildTroubleshooting Troubleshooting Information
  *
- *  LUFA uses a lot of advanced features of the AVR-GCC compiler, linker, and surrounding binaries. This can sometimes lead to problems compiling applications if one of these
- *  features is buggy in the version of the tools used in a build environment. Missing utilities and incorrectly set makefile configuration options can also result in different
- *  errors being produced when compilation or other operations are attempted. The table below lists a set of commonly encountered errors and their resolutions.
+ *  LUFA uses a lot of advanced features of the AVR-GCC compiler, linker, and
+ *  surrounding binaries. This can sometimes lead to problems compiling
+ *  applications if one of these features is buggy in the version of the tools
+ *  used in a build environment. Missing utilities and incorrectly set makefile
+ *  configuration options can also result in different errors being produced
+ *  when compilation or other operations are attempted. The table below lists a
+ *  set of commonly encountered errors and their resolutions.
  *
  *  <table>
  *    <tr>
@@ -984,7 +273,7 @@
  *   <tr>
  *    <td>Error &quot;<b><tt>undefined reference to `<i>{X}</i>'</tt></b>&quot; shown when compiling.</td>
  *    <td>This is usually caused by a missing source file in the user application's <tt>SRC</tt> configuration parameter. If the indicated symbol is one from the LUFA
- *        library, you may be missing a LUFA source makefile module (see \ref Page_BuildModule_SOURCES).</td>
+ *        library, you may be missing a LUFA source makefile module (see \ref Page_BuildModule_LUFA_SOURCES).</td>
  *   </tr>
  *  </table>
  *
diff --git a/LUFA/DoxygenPages/ChangeLog.txt b/LUFA/DoxygenPages/ChangeLog.txt
index e0471888f..201a50068 100644
--- a/LUFA/DoxygenPages/ChangeLog.txt
+++ b/LUFA/DoxygenPages/ChangeLog.txt
@@ -29,6 +29,8 @@
   *   - Added signed alternative libUSB driver for the AVRISP-MKII clone project, to support Atmel Studio 7 (thanks to Atmel)
   *   - Removed no longer required LIBUSB_DRIVER_COMPAT and RESET_TOGGLES_LIBUSB_COMPAT configuration options from the AVRISP-MKII
   *     clone project, as the new libUSB driver works for AVRDUDE and Atmel Studio 7 under Windows
+  *   - Replaced the LUFA build system with its (compatible) successor, DMBS (Dean's Makefile Build System)
+  *   - Removed obsolete library TAR export and associated documentation
   *
   *  \section Sec_ChangeLog151115 Version 151115
   *  <b>New:</b>
diff --git a/LUFA/DoxygenPages/DevelopingWithLUFA.txt b/LUFA/DoxygenPages/DevelopingWithLUFA.txt
index 9a02f95b9..31b58fa2a 100644
--- a/LUFA/DoxygenPages/DevelopingWithLUFA.txt
+++ b/LUFA/DoxygenPages/DevelopingWithLUFA.txt
@@ -17,7 +17,6 @@
  *  \li \subpage Page_VIDPID - Allocated USB VID and PID Values
  *  \li \subpage Page_OSDrivers - Operating System Driver Information
  *  \li \subpage Page_BuildLibrary - Building as a Linkable Library
- *  \li \subpage Page_ExportingLibrary - Exporting LUFA for IDE Use
  *  \li \subpage Page_WritingBoardDrivers - How to Write Custom Board Drivers
  *  \li \subpage Page_SoftwareBootloaderStart - How to jump to the bootloader in software
  */
diff --git a/LUFA/DoxygenPages/ExportingLibrary.txt b/LUFA/DoxygenPages/ExportingLibrary.txt
deleted file mode 100644
index 095184862..000000000
--- a/LUFA/DoxygenPages/ExportingLibrary.txt
+++ /dev/null
@@ -1,112 +0,0 @@
-/** \file
- *
- *  This file contains special DoxyGen information for the generation of the main page and other special
- *  documentation pages. It is not a project source file.
- */
-
-/** \page Page_ExportingLibrary Exporting the Library for IDE Use
- *
- *  While LUFA was designed to allow for easy compilation in a makefile driven environment,
- *  it is possible to export the library into a form suitable for drop-in use inside of an
- *  IDE.
- *
- *  \note <b>LUFA is also available as a native Atmel Studio 6.1 extension</b>, which integrates LUFA into
- *        Atmel Studio including all demos and projects. If you are running Atmel Studio 6.1 or later, the
- *        below instructions are not required; download and install the native LUFA extension from the
- *        <a href="http://gallery.atmel.com">Atmel Gallery</a> instead.
- *
- *  \section Sec_LibraryExport Exporting the Library
- *  An export of the library is at its most basic, a direct copy of the main "LUFA" source folder from the
- *  root download folder; this contains the library core which can be re-used within external projects.
- *  However, as many IDEs attempt to automatically compile all included source files, it is necessary to
- *  exclude some directories and files from the library core export to allow for easier integration into
- *  an IDE project.
- *
- *  \subsection SSec_ManualExport Manual Export
- *  To manually export the library core, copy over the main LUFA library folder from the LUFA root directory,
- *  renaming as desired. Within the library core folder, the following directories should be removed or
- *  excluded from your IDE import:
- *   - Documentation/
- *   - DoxygenPages/
- *   - CodeTemplates/
- *   - StudioIntegration/
- *
- *  If required, files from the CodeTemplates/ subdirectory may be copied to your IDE project as needed.
- *
- *  The resulting copy of the library may then be imported into your chosen IDE according to the instructions
- *  shown in \ref Sec_LibraryImport.
- *
- *  \subsection SSec_AutomaticExport Automatic Export
- *  If desired, the steps indicated in \ref SSec_ManualExport may be automatically performed, by running the
- *  command <b><code>make export_tar</code></b> from the command line. This will generate two .tar files in the
- *  current directory, named <code>LUFA_YYMMDD.tar</code> and <code>LUFA_YYMMDD_Code_Templates.tar</code> (where
- *  "YYMMDD" is the version of the library being exported). The first archive contains the exported LUFA core
- *  with the non-required files removed, while the second contains an archived copy of the code template files
- *  for the current LUFA version.
- *
- *  The resulting archived copy of the library may then be extracted to your chosen IDE project source directory
- *  and imported according to the instructions shown in \ref Sec_LibraryImport.
- *
- *  \section Sec_LibraryImport Importing the Library
- *  An exported copy of the library may be imported wholesale into an IDE project, if the instructions detailed
- *  in \ref Sec_LibraryExport are followed.
- *
- *  Specific instructions for importing an exported version of LUFA into various IDEs are listed below.
- *
- *  \subsection SSec_AS56_Import Importing into AVRStudio 5.x/Atmel Studio 6.0
- *  To import LUFA into a new or existing project, the following steps must be followed.
- *
- *  \subsubsection SSSec_AS56_Import_Step1 Copy over the exported library
- *  Copy over the exported library archive created via the steps listed in \ref Sec_LibraryExport to your AS5/AS6
- *  project directory.
- *
- *  \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step1.png
- *
- *  \subsubsection SSSec_AS56_Import_Step2 Extract exported library
- *  Extract out the contents of the archive to a new folder. This may be any name you wish, however keep in mind
- *  that this name will need to be referenced within your user application under most circumstances. It is
- *  suggested that this folder be named "LUFA", or "LUFA" followed by the version string for easy reference.
- *
- *  \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step2.png
- *
- *  \subsubsection SSSec_AS56_Import_Step3 Add the library files
- *  Open your AVRStudio 5/Atmel Studio 6 project. From the "Solution Explorer" pane, click the "Show All Files"
- *  button on the toolbar to display ghosted icons of files and folders located in the project source directory
- *  that are not currently added to the project.
- *
- *  \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step3.png
- *
- *  Right-click the ghosted version of the extracted LUFA export folder in the Solution Explorer pane, and
- *  choose the "Add to Project" option from the context menu. This will add the entire LUFA source tree to the
- *  current project.
- *
- *  \subsubsection SSSec_AS56_Import_Step4 Open Project Toolchain Properties
- *  In the Solution Explorer pane, click the project node, and press the "Properties" button in the toolbar to
- *  open the Project Properties window. This window allows you to configure the various project global compiler,
- *  assembler and linker options.
- *
- *  \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step4.png
- *
- *  Click the "Toolchain" tab on the left side of the Project Properties window.
- *
- *  \subsubsection SSSec_AS56_Import_Step5 Configure Project Toolchain Properties
- *
- *  In the GNU C Compiler section, open the "Symbols" page. Click the "Add Item" button to the top-right of the
- *  "Defined Symbols" section to add new symbols.
- *
- *  At a minimum, you will need to define the following symbols (for more information on these symbols, see
- *  \ref Page_ConfiguringApps):
- *   - ARCH
- *   - F_CPU
- *   - F_USB
- *   - BOARD
- *  \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step5_1.png
- *
- *  Next, open the GNU C Compiler section's "Optimization" page. Ensure that the option to prepare functions for
- *  garbage collection is enabled.
- *  \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step5_2.png
- *
- *  Finally, in the GNU C Linker section, open the "Optimization" page. Ensure that the option to garbage collect
- *  unused sections is selected.
- *  \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step5_3.png
- */
diff --git a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step1.png b/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step1.png
deleted file mode 100644
index 4f0c26f37..000000000
Binary files a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step1.png and /dev/null differ
diff --git a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step2.png b/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step2.png
deleted file mode 100644
index 6e309ae41..000000000
Binary files a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step2.png and /dev/null differ
diff --git a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step3.png b/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step3.png
deleted file mode 100644
index 8192c9ae8..000000000
Binary files a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step3.png and /dev/null differ
diff --git a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step4.png b/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step4.png
deleted file mode 100644
index 2bb8f5fc8..000000000
Binary files a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step4.png and /dev/null differ
diff --git a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_1.png b/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_1.png
deleted file mode 100644
index f3a49ba9c..000000000
Binary files a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_1.png and /dev/null differ
diff --git a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_2.png b/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_2.png
deleted file mode 100644
index 078f4ec8d..000000000
Binary files a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_2.png and /dev/null differ
diff --git a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_3.png b/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_3.png
deleted file mode 100644
index 8a8571bd8..000000000
Binary files a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_3.png and /dev/null differ
diff --git a/LUFA/DoxygenPages/ProgrammingApps.txt b/LUFA/DoxygenPages/ProgrammingApps.txt
index 4759ac87a..653b4ad04 100644
--- a/LUFA/DoxygenPages/ProgrammingApps.txt
+++ b/LUFA/DoxygenPages/ProgrammingApps.txt
@@ -24,7 +24,4 @@
  *  If you wish to use the DFU bootloader to program in your application, refer to your DFU programmer's documentation.
  *  Atmel provides a free utility called FLIP which is USB AVR compatible, and an open source (Linux compatible)
  *  alternative exists called "dfu-programmer".
- *
- *  \see \ref Page_BuildModule_DFU for information on the LUFA build system DFU module, for automatic DFU bootloader
- *  programming makefile targets.
  */
diff --git a/LUFA/doxyfile b/LUFA/doxyfile
index 807511023..90b8ca2f7 100644
--- a/LUFA/doxyfile
+++ b/LUFA/doxyfile
@@ -806,6 +806,7 @@ RECURSIVE              = YES
 
 EXCLUDE                = Documentation/ \
                          StudioIntegration/ \
+                         Build/ \
                          License.txt
 
 # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
diff --git a/LUFA/makefile b/LUFA/makefile
index 14571ea29..a7f0b1192 100644
--- a/LUFA/makefile
+++ b/LUFA/makefile
@@ -9,45 +9,32 @@
 #  Makefile for the LUFA library itself.
 # ---------------------------------------
 
-LUFA_VERSION_NUM         = $(shell grep LUFA_VERSION_STRING $(LUFA_PATH)/Version.h | cut -d'"' -f2)
-EXCLUDE_FROM_EXPORT     := Documentation DoxygenPages CodeTemplates Build StudioIntegration doxyfile *.tar *.o *.d *.lss *.lst *.hex *.elf *.hex *.eep *.map *.bin
+LUFA_VERSION_NUM := $(shell grep LUFA_VERSION_STRING $(LUFA_PATH)/Version.h | cut -d'"' -f2)
 
 # Default target - no default action when attempting to build the core directly
 all:
 
-# Export the library core as a TAR archive for importing into an IDE
-export_tar:
-	@echo Exporting LUFA library to a TAR archive...
-	@tar -cf LUFA_$(LUFA_VERSION_NUM).tar --directory=. $(EXCLUDE_FROM_EXPORT:%=--exclude=%) *
-	@tar -cf LUFA_$(LUFA_VERSION_NUM)_Code_Templates.tar CodeTemplates
-	@echo Export LUFA_$(LUFA_VERSION_NUM).tar complete.
-
 # Display the LUFA version of this library copy
 version:
 	@echo "LUFA $(LUFA_VERSION_NUM)"
 
-# Check if this is being included from a legacy or non LUFA build system makefile
-ifneq ($(LUFA_PATH),)
-  LUFA_ROOT_PATH = $(patsubst %/,%,$(LUFA_PATH))/LUFA/
-
-  include $(patsubst %/,%,$(LUFA_PATH))/LUFA/Build/lufa_sources.mk
-else
-  LUFA_BUILD_MODULES     += MASTER
-  LUFA_BUILD_TARGETS     += export_tar version
+LUFA_PATH               := .
+ARCH                    := {AVR8,UC3,XMEGA}
+DOXYGEN_OVERRIDE_PARAMS := QUIET=YES PROJECT_NUMBER=$(LUFA_VERSION_NUM)
 
-  LUFA_PATH               = .
-  ARCH                    = {AVR8,UC3,XMEGA}
-  DOXYGEN_OVERRIDE_PARAMS = QUIET=YES PROJECT_NUMBER=$(LUFA_VERSION_NUM)
-
-  # Remove all object and associated files from the LUFA library core
-  clean:
+# Remove all object and associated files from the LUFA library core
+clean:
 	rm -f $(LUFA_SRC_ALL_FILES:%.c=%.o)
 	rm -f $(LUFA_SRC_ALL_FILES:%.c=%.d)
 	rm -f $(LUFA_SRC_ALL_FILES:%.c=%.lst)
 
-  include Build/lufa_core.mk
-  include Build/lufa_sources.mk
-  include Build/lufa_doxygen.mk
-endif
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/doxygen.mk
 
-.PHONY: all export_tar version clean
+.PHONY: all version
diff --git a/Projects/AVRISP-MKII/makefile b/Projects/AVRISP-MKII/makefile
index 70f0b37ba..725198df3 100644
--- a/Projects/AVRISP-MKII/makefile
+++ b/Projects/AVRISP-MKII/makefile
@@ -27,13 +27,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Projects/Benito/makefile b/Projects/Benito/makefile
index 424102ccb..c02e5ce79 100644
--- a/Projects/Benito/makefile
+++ b/Projects/Benito/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Projects/HIDReportViewer/makefile b/Projects/HIDReportViewer/makefile
index ebec1fae1..6ed46311b 100644
--- a/Projects/HIDReportViewer/makefile
+++ b/Projects/HIDReportViewer/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Projects/LEDNotifier/makefile b/Projects/LEDNotifier/makefile
index 4fd28ab12..b064b4ef4 100644
--- a/Projects/LEDNotifier/makefile
+++ b/Projects/LEDNotifier/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Projects/MIDIToneGenerator/makefile b/Projects/MIDIToneGenerator/makefile
index 2b245fb65..803da8d1d 100644
--- a/Projects/MIDIToneGenerator/makefile
+++ b/Projects/MIDIToneGenerator/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Projects/Magstripe/makefile b/Projects/Magstripe/makefile
index 77c10b290..4439fb40e 100644
--- a/Projects/Magstripe/makefile
+++ b/Projects/Magstripe/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Projects/MediaController/makefile b/Projects/MediaController/makefile
index 8039904ce..1529226a4 100644
--- a/Projects/MediaController/makefile
+++ b/Projects/MediaController/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Projects/MissileLauncher/makefile b/Projects/MissileLauncher/makefile
index dcc762bfc..f5379e7ed 100644
--- a/Projects/MissileLauncher/makefile
+++ b/Projects/MissileLauncher/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Projects/RelayBoard/makefile b/Projects/RelayBoard/makefile
index ae47ec228..218be635b 100644
--- a/Projects/RelayBoard/makefile
+++ b/Projects/RelayBoard/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Projects/SerialToLCD/makefile b/Projects/SerialToLCD/makefile
index 7e66892b0..41979c702 100644
--- a/Projects/SerialToLCD/makefile
+++ b/Projects/SerialToLCD/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Projects/TempDataLogger/makefile b/Projects/TempDataLogger/makefile
index 2b421e32f..317e12b67 100644
--- a/Projects/TempDataLogger/makefile
+++ b/Projects/TempDataLogger/makefile
@@ -27,13 +27,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Projects/USBtoSerial/makefile b/Projects/USBtoSerial/makefile
index 145e6ebbd..adb2a83d9 100644
--- a/Projects/USBtoSerial/makefile
+++ b/Projects/USBtoSerial/makefile
@@ -26,13 +26,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Projects/Webserver/makefile b/Projects/Webserver/makefile
index 3ef93104b..7e8619b95 100644
--- a/Projects/Webserver/makefile
+++ b/Projects/Webserver/makefile
@@ -29,13 +29,18 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
diff --git a/Projects/XPLAINBridge/makefile b/Projects/XPLAINBridge/makefile
index 39138012d..b40b212ba 100644
--- a/Projects/XPLAINBridge/makefile
+++ b/Projects/XPLAINBridge/makefile
@@ -39,13 +39,18 @@ OBJDIR      := obj
 # absolute path of the current project to the OBJDIR variable.
 override OBJDIR:=$(shell pwd)/$(OBJDIR)
 
-# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa_core.mk
-include $(LUFA_PATH)/Build/lufa_sources.mk
-include $(LUFA_PATH)/Build/lufa_build.mk
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk
-include $(LUFA_PATH)/Build/lufa_doxygen.mk
-include $(LUFA_PATH)/Build/lufa_dfu.mk
-include $(LUFA_PATH)/Build/lufa_hid.mk
-include $(LUFA_PATH)/Build/lufa_avrdude.mk
-include $(LUFA_PATH)/Build/lufa_atprogram.mk
+# Include LUFA-specific DMBS extension modules
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
+include $(DMBS_LUFA_PATH)/lufa-sources.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk
+
+# Include common DMBS build system modules
+DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/cppcheck.mk
+include $(DMBS_PATH)/doxygen.mk
+include $(DMBS_PATH)/dfu.mk
+include $(DMBS_PATH)/gcc.mk
+include $(DMBS_PATH)/hid.mk
+include $(DMBS_PATH)/avrdude.mk
+include $(DMBS_PATH)/atprogram.mk
-- 
cgit v1.2.3


From e3ff5516598e8d9258b7ce17f5ecb9496a93cd46 Mon Sep 17 00:00:00 2001
From: Dean Camera <dean@fourwalledcubicle.com>
Date: Sun, 3 Apr 2016 15:38:03 +1000
Subject: Don't run the AVRISP-MKII Windows Driver through Doxygen.

---
 Projects/AVRISP-MKII/doxyfile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Projects/AVRISP-MKII/doxyfile b/Projects/AVRISP-MKII/doxyfile
index 0f8c6f677..faba2c70d 100644
--- a/Projects/AVRISP-MKII/doxyfile
+++ b/Projects/AVRISP-MKII/doxyfile
@@ -805,7 +805,8 @@ RECURSIVE              = YES
 # Note that relative paths are relative to the directory from which doxygen is
 # run.
 
-EXCLUDE                = Documentation/
+EXCLUDE                = Documentation/ \
+                         WindowsDriver/
 
 # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
 # directories that are symbolic links (a Unix file system feature) are excluded
-- 
cgit v1.2.3


From 75b68126d01306347626215ec8ad1537c903e4cd Mon Sep 17 00:00:00 2001
From: Dean Camera <dean@fourwalledcubicle.com>
Date: Sun, 3 Apr 2016 17:26:37 +1000
Subject: Add missing BOARD_POLOLUMICRO definition.

---
 BuildTests/BoardDriverTest/BoardDeviceMap.cfg | 1 +
 LUFA/Common/BoardTypes.h                      | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/BuildTests/BoardDriverTest/BoardDeviceMap.cfg b/BuildTests/BoardDriverTest/BoardDeviceMap.cfg
index 18a502f58..096d88998 100644
--- a/BuildTests/BoardDriverTest/BoardDeviceMap.cfg
+++ b/BuildTests/BoardDriverTest/BoardDeviceMap.cfg
@@ -73,6 +73,7 @@ BOARD_STANGE_ISP        = AVR8  : at90usb162     :
 BOARD_U2S               = AVR8  : atmega32u2     :
 BOARD_YUN               = AVR8  : atmega32u4     :
 BOARD_MICRO             = AVR8  : atmega32u4     :
+BOARD_POLOLUMICRO       = AVR8  : atmega32u4     :
 BOARD_XPLAINED_MINI     = AVR8  : atmega32u4     :
 #
 # ----------------- XMEGA Boards -----------------
diff --git a/LUFA/Common/BoardTypes.h b/LUFA/Common/BoardTypes.h
index 2c1ea7ba3..212374ff3 100644
--- a/LUFA/Common/BoardTypes.h
+++ b/LUFA/Common/BoardTypes.h
@@ -240,8 +240,11 @@
 			/** Selects the Arduino Micro specific board drivers, including the driver for the board LEDs. */
 			#define BOARD_MICRO                58
 
+			/** Selects the Pololu A-Star Micro specific board drivers, including the driver for the board LEDs. */
+			#define BOARD_POLOLUMICRO          59
+
 			/** Selects the Atmel Xplained-MINI specific board drivers, including the driver for the board LEDs. */
-			#define BOARD_XPLAINED_MINI        59
+			#define BOARD_XPLAINED_MINI        60
 
 			#if !defined(__DOXYGEN__)
 				#define BOARD_                 BOARD_NONE
-- 
cgit v1.2.3


From 3126cbbf96a24afd447ece00248e5ece39dd088a Mon Sep 17 00:00:00 2001
From: Dean Camera <dean@fourwalledcubicle.com>
Date: Tue, 5 Apr 2016 21:10:07 +1000
Subject: Update to DMBS release-20160403 release.

---
 LUFA/Build/DMBS/DMBS/Modules.md               | 26 --------
 LUFA/Build/DMBS/DMBS/ModulesOverview.md       | 38 +++++++++++
 LUFA/Build/DMBS/DMBS/WritingYourOwnModules.md | 94 +++++++++++++++++++++++++++
 LUFA/Build/DMBS/DMBS/atprogram.md             |  8 +++
 LUFA/Build/DMBS/DMBS/atprogram.mk             | 10 +--
 LUFA/Build/DMBS/DMBS/avrdude.md               |  8 +++
 LUFA/Build/DMBS/DMBS/avrdude.mk               | 10 +--
 LUFA/Build/DMBS/DMBS/core.md                  | 26 +++++++-
 LUFA/Build/DMBS/DMBS/core.mk                  | 12 +++-
 LUFA/Build/DMBS/DMBS/cppcheck.md              |  8 +++
 LUFA/Build/DMBS/DMBS/cppcheck.mk              | 10 +--
 LUFA/Build/DMBS/DMBS/dfu.md                   |  8 +++
 LUFA/Build/DMBS/DMBS/dfu.mk                   | 10 +--
 LUFA/Build/DMBS/DMBS/doxygen.md               |  8 +++
 LUFA/Build/DMBS/DMBS/doxygen.mk               | 13 ++--
 LUFA/Build/DMBS/DMBS/gcc.md                   |  8 +++
 LUFA/Build/DMBS/DMBS/gcc.mk                   | 10 +--
 LUFA/Build/DMBS/DMBS/hid.md                   |  8 +++
 LUFA/Build/DMBS/DMBS/hid.mk                   | 10 ++-
 LUFA/Build/DMBS/Readme.md                     | 18 ++++-
 LUFA/Build/DMBS/Template/makefile             | 11 +---
 21 files changed, 276 insertions(+), 78 deletions(-)
 delete mode 100644 LUFA/Build/DMBS/DMBS/Modules.md
 create mode 100644 LUFA/Build/DMBS/DMBS/ModulesOverview.md
 create mode 100644 LUFA/Build/DMBS/DMBS/WritingYourOwnModules.md

diff --git a/LUFA/Build/DMBS/DMBS/Modules.md b/LUFA/Build/DMBS/DMBS/Modules.md
deleted file mode 100644
index 65caf8a60..000000000
--- a/LUFA/Build/DMBS/DMBS/Modules.md
+++ /dev/null
@@ -1,26 +0,0 @@
-DMBS - Dean's Makefile Build System
-===================================
-
-
-Modules Overview
----------------
-
-The following modules are currently included:
-
- - [ATPROGRAM](atprogram.md) - Device Programming
- - [AVRDUDE](avrdude.md) - Device Programming
- - [CORE](core.md) - DMBS Core Functionality
- - [CPPCHECK](cppcheck.md) - Static Code Analysis
- - [DFU](dfu.md) - Device Programming
- - [DOXYGEN](doxygen.md) - Automated Source Code Documentation
- - [GCC](gcc.md) - Compiling/Assembling/Linking with GCC
- - [HID](hid.md) - Device Programming
-
-To use a module, you will need to add the following boilerplate to your
-makefile:
-
-    # Include DMBS build script makefiles
-    DMBS_PATH   ?= ../DMBS
-
-Which is then used to indicate the location of your DMBS installation, relative
-to the current directory.
diff --git a/LUFA/Build/DMBS/DMBS/ModulesOverview.md b/LUFA/Build/DMBS/DMBS/ModulesOverview.md
new file mode 100644
index 000000000..1fd9cc11c
--- /dev/null
+++ b/LUFA/Build/DMBS/DMBS/ModulesOverview.md
@@ -0,0 +1,38 @@
+DMBS - Dean's Makefile Build System
+===================================
+
+
+Modules Overview
+----------------
+
+The following modules are currently included:
+
+ - [ATPROGRAM](atprogram.md) - Device Programming
+ - [AVRDUDE](avrdude.md) - Device Programming
+ - [CORE](core.md) - DMBS Core Functionality
+ - [CPPCHECK](cppcheck.md) - Static Code Analysis
+ - [DFU](dfu.md) - Device Programming
+ - [DOXYGEN](doxygen.md) - Automated Source Code Documentation
+ - [GCC](gcc.md) - Compiling/Assembling/Linking with GCC
+ - [HID](hid.md) - Device Programming
+
+## Importing modules into your project makefile
+
+To use a module, it is recommended to add the following boilerplate to your
+makefile:
+
+    # Include DMBS build script makefiles
+    DMBS_PATH   ?= ../DMBS
+
+Which can then used to indicate the location of your DMBS installation, relative
+to the current directory, when importing modules. For example:
+
+    DMBS_PATH   ?= ../DMBS
+    include $(DMBS_PATH)/core.mk
+    include $(DMBS_PATH)/gcc.mk
+
+Imports the `CORE` and `GCC` modules from DMBS using a single path relative to
+your project's makefile.
+
+If you wish to write your own DMBS module(s),
+[see the documentation here for more details.](WritingYourOwnModules.md)
diff --git a/LUFA/Build/DMBS/DMBS/WritingYourOwnModules.md b/LUFA/Build/DMBS/DMBS/WritingYourOwnModules.md
new file mode 100644
index 000000000..3ecbb3312
--- /dev/null
+++ b/LUFA/Build/DMBS/DMBS/WritingYourOwnModules.md
@@ -0,0 +1,94 @@
+DMBS - Dean's Makefile Build System
+===================================
+
+
+Writing Your Own Modules
+------------------------
+
+A DMBS module consists of the several boilerplate sections, explained below.
+
+## The DMBS module hooks
+
+Your module needs to advertise to DMBS its name, its makefile targets, the
+required and optional variables, and the variables and macros the module
+provides for use elsewhere. This is achieved with the following section:
+
+    DMBS_BUILD_MODULES         += EXAMPLE
+    DMBS_BUILD_TARGETS         += example-target another-target
+    DMBS_BUILD_MANDATORY_VARS  += MANDATORY_NAME ALSO_MANDATORY
+    DMBS_BUILD_OPTIONAL_VARS   += OPTIONAL_NAME ALSO_OPTIONAL
+    DMBS_BUILD_PROVIDED_VARS   += MEANING_OF_LIFE
+    DMBS_BUILD_PROVIDED_MACROS += STRIP_WHITESPACE
+
+The example above declares that this module is called `EXAMPLE`, and exposes the
+listed targets, variable requirements and provides variables and macros.
+
+Your module name and provided variable/macro names must be unique, however you
+can (and should) re-use variable names where appropriate if they apply to
+several modules (such as `ARCH` to specify the project's microcontroller
+architecture). Re-using targets is not recommended, but can be used to extend
+the dependencies of another module's targets.
+
+## Importing the CORE module
+
+Next, your module should always import the DMBS `CORE` module, via the
+following:
+
+    # Conditionally import the CORE module of DMBS if it is not already imported
+    DMBS_MODULE_PATH := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
+    ifeq ($(findstring CORE, $(DMBS_BUILD_MODULES)),)
+      include $(DMBS_MODULE_PATH)/core.mk
+    endif
+
+This ensures that the `make help` target is always available. In addition, the
+`CORE` module exposes some [commonly used macros and variables](core.md) to
+your module.
+
+## Setting optional variable's defaults
+
+If a variable is optional, you should provide a default value. Do this via the
+`?=` operator of `make`, which sets a variable's value if it has not yet been
+set:
+
+    MY_OPTIONAL_VARIABLE ?= some_default_value
+
+## Sanity checking user input
+
+Sanity checks are what make DMBS useful. Where possible, validate user input and
+convert generated errors to human-friendly messages. This can be achieved by
+enforcing that all the declared module mandatory variables have been set by the
+user:
+
+    # Sanity-check values of mandatory user-supplied variables
+    $(foreach MANDATORY_VAR, $(DMBS_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
+
+As well as complaining if they are set, but currently empty:
+    $(call ERROR_IF_EMPTY, SOME_MANDATORY_VARIABLE)
+    $(call ERROR_IF_EMPTY, SOME_OPTIONAL_BUT_NON_EMPTY_VARIABLE)
+
+Or even if they are boolean (`Y` or `N`) variables that have an invalid value:
+
+    $(call ERROR_IF_NONBOOL, SOME_BOOL_VARIABLE)
+
+## Adding targets
+
+The meat of a DMBS module is the targets, which are run when the user types
+`make {target name}` from the command line. These can be as complex or simple
+as you like. See the GNU make manual for information on writing make targets.
+
+    example-target:
+        echo "Your DMBS module works!"
+
+## And finally, list the PHONYs
+
+Important in GNU Make is the concept of phony targets; this special directive
+tells make that a given target should never be considered a valid file. Listing
+phonies ensures that, for example, if your module had a target called `build`,
+it would always run when the user types `make build` from the command line, even
+if a file called `build` existed in the user project folder.
+
+You can list module-internal targets here, as well as mark all public targets
+via the module header's `DMBS_BUILD_TARGETS` variable.
+
+    # Phony build targets for this module
+    .PHONY: $(DMBS_BUILD_TARGETS) some-module-internal-target another-internal-target
diff --git a/LUFA/Build/DMBS/DMBS/atprogram.md b/LUFA/Build/DMBS/DMBS/atprogram.md
index d84cc9860..ea1b0d919 100644
--- a/LUFA/Build/DMBS/DMBS/atprogram.md
+++ b/LUFA/Build/DMBS/DMBS/atprogram.md
@@ -109,3 +109,11 @@ this module.
    </tr>
  </tbody>
 </table>
+
+## Module Changelog:
+
+The changes to this module since its initial release are listed below, as of the
+DMBS version where the change was made.
+
+### 20160403
+Initial release.
diff --git a/LUFA/Build/DMBS/DMBS/atprogram.mk b/LUFA/Build/DMBS/DMBS/atprogram.mk
index 5c433d7db..a505275ae 100644
--- a/LUFA/Build/DMBS/DMBS/atprogram.mk
+++ b/LUFA/Build/DMBS/DMBS/atprogram.mk
@@ -13,11 +13,11 @@ DMBS_BUILD_OPTIONAL_VARS   += ATPROGRAM_PROGRAMMER ATPROGRAM_INTERFACE ATPROGRAM
 DMBS_BUILD_PROVIDED_VARS   +=
 DMBS_BUILD_PROVIDED_MACROS +=
 
-SHELL = /bin/sh
-
-ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
-ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
-ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
+# Conditionally import the CORE module of DMBS if it is not already imported
+DMBS_MODULE_PATH := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
+ifeq ($(findstring CORE, $(DMBS_BUILD_MODULES)),)
+  include $(DMBS_MODULE_PATH)/core.mk
+endif
 
 # Default values of optionally user-supplied variables
 ATPROGRAM_PROGRAMMER ?= atmelice
diff --git a/LUFA/Build/DMBS/DMBS/avrdude.md b/LUFA/Build/DMBS/DMBS/avrdude.md
index 6af6c70fd..d6c71ce6d 100644
--- a/LUFA/Build/DMBS/DMBS/avrdude.md
+++ b/LUFA/Build/DMBS/DMBS/avrdude.md
@@ -114,3 +114,11 @@ this module.
    </tr>
  </tbody>
 </table>
+
+## Module Changelog:
+
+The changes to this module since its initial release are listed below, as of the
+DMBS version where the change was made.
+
+### 20160403
+Initial release.
diff --git a/LUFA/Build/DMBS/DMBS/avrdude.mk b/LUFA/Build/DMBS/DMBS/avrdude.mk
index 6dba68de4..c4bac8fd0 100644
--- a/LUFA/Build/DMBS/DMBS/avrdude.mk
+++ b/LUFA/Build/DMBS/DMBS/avrdude.mk
@@ -13,11 +13,11 @@ DMBS_BUILD_OPTIONAL_VARS   += AVRDUDE_PROGRAMMER AVRDUDE_PORT AVRDUDE_FLAGS AVRD
 DMBS_BUILD_PROVIDED_VARS   +=
 DMBS_BUILD_PROVIDED_MACROS +=
 
-SHELL = /bin/sh
-
-ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
-ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
-ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
+# Conditionally import the CORE module of DMBS if it is not already imported
+DMBS_MODULE_PATH := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
+ifeq ($(findstring CORE, $(DMBS_BUILD_MODULES)),)
+  include $(DMBS_MODULE_PATH)/core.mk
+endif
 
 # Default values of optionally user-supplied variables
 AVRDUDE_PROGRAMMER ?= jtagicemkii
diff --git a/LUFA/Build/DMBS/DMBS/core.md b/LUFA/Build/DMBS/DMBS/core.md
index a6faf74d1..c7c976790 100644
--- a/LUFA/Build/DMBS/DMBS/core.md
+++ b/LUFA/Build/DMBS/DMBS/core.md
@@ -95,7 +95,7 @@ syntax) if desired, as they are provided by this module.
  <tbody>
    <tr>
     <td>DMBS_VERSION</td>
-    <td>Current version of this DMBS release.</td>
+    <td>Current version of this DMBS release, as a ISO 8601 integer (such as `160403` for `2016-04-03`).</td>
    </tr>
  </tbody>
 </table>
@@ -109,8 +109,28 @@ this module.
 <table>
  <tbody>
    <tr>
-    <td>N/A</td>
-    <td>This module provides no macros.</td>
+    <td>DMBS_CHECK_VERSION</td>
+    <td>Macro to check the current DMBS version against the first argument and abort if the required version is newer than the current version.</td>
+   </tr>
+   <tr>
+    <td>ERROR_IF_UNSET</td>
+    <td>Macro to check the given makefile variable name passed as the first argument, and abort if it has not been set by any makefile module.</td>
+   </tr>
+   <tr>
+    <td>ERROR_IF_EMPTY</td>
+    <td>Macro to check the given makefile variable name passed as the first argument, and abort if it has an empty value.</td>
+   </tr>
+   <tr>
+    <td>ERROR_IF_NONBOOL</td>
+    <td>Macro to check the given makefile variable name passed as the first argument, and abort if it has a value other than `Y` or `N`.</td>
    </tr>
  </tbody>
 </table>
+
+## Module Changelog:
+
+The changes to this module since its initial release are listed below, as of the
+DMBS version where the change was made.
+
+### 20160403
+Initial release.
diff --git a/LUFA/Build/DMBS/DMBS/core.mk b/LUFA/Build/DMBS/DMBS/core.mk
index 913731e69..7fdb7f229 100644
--- a/LUFA/Build/DMBS/DMBS/core.mk
+++ b/LUFA/Build/DMBS/DMBS/core.mk
@@ -11,12 +11,20 @@ DMBS_BUILD_TARGETS         += help list_targets list_modules list_mandatory list
 DMBS_BUILD_MANDATORY_VARS  +=
 DMBS_BUILD_OPTIONAL_VARS   +=
 DMBS_BUILD_PROVIDED_VARS   += DMBS_VERSION
-DMBS_BUILD_PROVIDED_MACROS +=
+DMBS_BUILD_PROVIDED_MACROS += DMBS_CHECK_VERSION ERROR_IF_UNSET ERROR_IF_EMPTY ERROR_IF_NONBOOL
 
 SHELL = /bin/sh
 
 # Current DMBS release version
-DMBS_VERSION = 0.4
+DMBS_VERSION       := 20160403
+
+# Macro to check the DMBS version, aborts if the given DMBS version is below the current version
+DMBS_CHECK_VERSION ?= $(if $(filter-out 0, $(shell test $(DMBS_VERSION) -lt $(1); echo $$?)), , $(error DMBS version $(1) or newer required, current version is $(DMBS_VERSION)))
+
+# Macros to use in other modules to check various conditions
+ERROR_IF_UNSET     ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
+ERROR_IF_EMPTY     ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
+ERROR_IF_NONBOOL   ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
 
 # Converts a given input to a printable output using "(None)" if no items are in the list
 CONVERT_TO_PRINTABLE           = $(if $(strip $(1)), $(1), (None))
diff --git a/LUFA/Build/DMBS/DMBS/cppcheck.md b/LUFA/Build/DMBS/DMBS/cppcheck.md
index d10e39040..ec0e38d02 100644
--- a/LUFA/Build/DMBS/DMBS/cppcheck.md
+++ b/LUFA/Build/DMBS/DMBS/cppcheck.md
@@ -124,3 +124,11 @@ this module.
    </tr>
  </tbody>
 </table>
+
+## Module Changelog:
+
+The changes to this module since its initial release are listed below, as of the
+DMBS version where the change was made.
+
+### 20160403
+Initial release.
diff --git a/LUFA/Build/DMBS/DMBS/cppcheck.mk b/LUFA/Build/DMBS/DMBS/cppcheck.mk
index 70b9ed721..9b82fc3b0 100644
--- a/LUFA/Build/DMBS/DMBS/cppcheck.mk
+++ b/LUFA/Build/DMBS/DMBS/cppcheck.mk
@@ -14,11 +14,11 @@ DMBS_BUILD_OPTIONAL_VARS   += CPPCHECK_INCLUDES CPPCHECK_EXCLUDES CPPCHECK_MSG_T
 DMBS_BUILD_PROVIDED_VARS   +=
 DMBS_BUILD_PROVIDED_MACROS +=
 
-SHELL = /bin/sh
-
-ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
-ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
-ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
+# Conditionally import the CORE module of DMBS if it is not already imported
+DMBS_MODULE_PATH := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
+ifeq ($(findstring CORE, $(DMBS_BUILD_MODULES)),)
+  include $(DMBS_MODULE_PATH)/core.mk
+endif
 
 # Default values of optionally user-supplied variables
 CPPCHECK_INCLUDES            ?=
diff --git a/LUFA/Build/DMBS/DMBS/dfu.md b/LUFA/Build/DMBS/DMBS/dfu.md
index a674d4e75..456bbf6f5 100644
--- a/LUFA/Build/DMBS/DMBS/dfu.md
+++ b/LUFA/Build/DMBS/DMBS/dfu.md
@@ -112,3 +112,11 @@ this module.
    </tr>
  </tbody>
 </table>
+
+## Module Changelog:
+
+The changes to this module since its initial release are listed below, as of the
+DMBS version where the change was made.
+
+### 20160403
+Initial release.
diff --git a/LUFA/Build/DMBS/DMBS/dfu.mk b/LUFA/Build/DMBS/DMBS/dfu.mk
index 1349e17a8..1eb22b864 100644
--- a/LUFA/Build/DMBS/DMBS/dfu.mk
+++ b/LUFA/Build/DMBS/DMBS/dfu.mk
@@ -13,11 +13,11 @@ DMBS_BUILD_OPTIONAL_VARS   +=
 DMBS_BUILD_PROVIDED_VARS   +=
 DMBS_BUILD_PROVIDED_MACROS +=
 
-SHELL = /bin/sh
-
-ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
-ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
-ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
+# Conditionally import the CORE module of DMBS if it is not already imported
+DMBS_MODULE_PATH := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
+ifeq ($(findstring CORE, $(DMBS_BUILD_MODULES)),)
+  include $(DMBS_MODULE_PATH)/core.mk
+endif
 
 # Sanity-check values of mandatory user-supplied variables
 $(foreach MANDATORY_VAR, $(DMBS_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
diff --git a/LUFA/Build/DMBS/DMBS/doxygen.md b/LUFA/Build/DMBS/DMBS/doxygen.md
index 11f6be5e3..837704aca 100644
--- a/LUFA/Build/DMBS/DMBS/doxygen.md
+++ b/LUFA/Build/DMBS/DMBS/doxygen.md
@@ -108,3 +108,11 @@ this module.
    </tr>
  </tbody>
 </table>
+
+## Module Changelog:
+
+The changes to this module since its initial release are listed below, as of the
+DMBS version where the change was made.
+
+### 20160403
+Initial release.
diff --git a/LUFA/Build/DMBS/DMBS/doxygen.mk b/LUFA/Build/DMBS/DMBS/doxygen.mk
index 73bc7ff40..45639ad15 100644
--- a/LUFA/Build/DMBS/DMBS/doxygen.mk
+++ b/LUFA/Build/DMBS/DMBS/doxygen.mk
@@ -13,11 +13,11 @@ DMBS_BUILD_OPTIONAL_VARS   += DOXYGEN_CONF DOXYGEN_FAIL_ON_WARNING DOXYGEN_OVERR
 DMBS_BUILD_PROVIDED_VARS   +=
 DMBS_BUILD_PROVIDED_MACROS +=
 
-SHELL = /bin/sh
-
-ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
-ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
-ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
+# Conditionally import the CORE module of DMBS if it is not already imported
+DMBS_MODULE_PATH := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
+ifeq ($(findstring CORE, $(DMBS_BUILD_MODULES)),)
+  include $(DMBS_MODULE_PATH)/core.mk
+endif
 
 # Default values of optionally user-supplied variables
 DOXYGEN_CONF            ?= doxyfile
@@ -59,5 +59,4 @@ doxygen-create: $(MAKEFILE_LIST)
 	@echo $(MSG_DOXYGEN_CMD) Creating new configuration file \"$(DOXYGEN_CONF)\" with latest template
 	doxygen -g $(DOXYGEN_CONF) > /dev/null
 
-# Phony build targets for this module
-.PHONY: $(DMBS_BUILD_TARGETS)
+
diff --git a/LUFA/Build/DMBS/DMBS/gcc.md b/LUFA/Build/DMBS/DMBS/gcc.md
index d25085fa6..f516da5ff 100644
--- a/LUFA/Build/DMBS/DMBS/gcc.md
+++ b/LUFA/Build/DMBS/DMBS/gcc.md
@@ -194,3 +194,11 @@ this module.
    </tr>
  </tbody>
 </table>
+
+## Module Changelog:
+
+The changes to this module since its initial release are listed below, as of the
+DMBS version where the change was made.
+
+### 20160403
+Initial release.
diff --git a/LUFA/Build/DMBS/DMBS/gcc.mk b/LUFA/Build/DMBS/DMBS/gcc.mk
index c7299edff..e33c9c084 100644
--- a/LUFA/Build/DMBS/DMBS/gcc.mk
+++ b/LUFA/Build/DMBS/DMBS/gcc.mk
@@ -13,11 +13,11 @@ DMBS_BUILD_OPTIONAL_VARS   += BOARD OPTIMIZATION C_STANDARD CPP_STANDARD F_CPU C
 DMBS_BUILD_PROVIDED_VARS   +=
 DMBS_BUILD_PROVIDED_MACROS +=
 
-SHELL = /bin/sh
-
-ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
-ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
-ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
+# Conditionally import the CORE module of DMBS if it is not already imported
+DMBS_MODULE_PATH := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
+ifeq ($(findstring CORE, $(DMBS_BUILD_MODULES)),)
+  include $(DMBS_MODULE_PATH)/core.mk
+endif
 
 # Default values of optionally user-supplied variables
 COMPILER_PATH      ?=
diff --git a/LUFA/Build/DMBS/DMBS/hid.md b/LUFA/Build/DMBS/DMBS/hid.md
index 691a422ba..b2dfbf713 100644
--- a/LUFA/Build/DMBS/DMBS/hid.md
+++ b/LUFA/Build/DMBS/DMBS/hid.md
@@ -119,3 +119,11 @@ this module.
    </tr>
  </tbody>
 </table>
+
+## Module Changelog:
+
+The changes to this module since its initial release are listed below, as of the
+DMBS version where the change was made.
+
+### 20160403
+Initial release.
diff --git a/LUFA/Build/DMBS/DMBS/hid.mk b/LUFA/Build/DMBS/DMBS/hid.mk
index 3575f3777..7a0ad9d0e 100644
--- a/LUFA/Build/DMBS/DMBS/hid.mk
+++ b/LUFA/Build/DMBS/DMBS/hid.mk
@@ -13,13 +13,11 @@ DMBS_BUILD_OPTIONAL_VARS   +=
 DMBS_BUILD_PROVIDED_VARS   +=
 DMBS_BUILD_PROVIDED_MACROS +=
 
-SHELL = /bin/sh
-
+# Conditionally import the CORE module of DMBS if it is not already imported
 DMBS_MODULE_PATH := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
-
-ERROR_IF_UNSET   ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
-ERROR_IF_EMPTY   ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
-ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
+ifeq ($(findstring CORE, $(DMBS_BUILD_MODULES)),)
+  include $(DMBS_MODULE_PATH)/core.mk
+endif
 
 # Sanity-check values of mandatory user-supplied variables
 $(foreach MANDATORY_VAR, $(DMBS_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
diff --git a/LUFA/Build/DMBS/Readme.md b/LUFA/Build/DMBS/Readme.md
index 05125ce5b..f4f7a5f15 100644
--- a/LUFA/Build/DMBS/Readme.md
+++ b/LUFA/Build/DMBS/Readme.md
@@ -35,7 +35,8 @@ are included via a GNU Make `include` directive. While the DMBS `core` module is
 always required, you can pick and choose what other modules you wish to add to
 your user project.
 
-[See here for the documentation on the individual modules provided by DMBS.](DMBS/Modules.md)
+[See here for the documentation on the individual modules provided by DMBS.](DMBS/ModulesOverview.md)
+If you're interested in writing your own DMBS module(s), [see here.](DMBS/WritingYourOwnModules.md)
 
 Here's an example user makefile:
 
@@ -72,6 +73,21 @@ As modules are added, you can get a list of available targets by simply typing
 as well as mandatory and optional variables and exposed variables and macros.
 
 
+Distribution
+----------------
+
+You can embed DMBS in your project any way you like - some options are:
+1. A git submodule
+2. A source tarball
+3. A manually copied extracted archive
+
+The intention of DMBS is that users can just import it from whatever source
+they like. If your project needs to extend the existing modules in an unusual
+manner, or if you want to provide your own modules, you can include them in
+your project repository (or submit a patch to DMBS if your module is generic
+enough to warrant wide use).
+
+
 License
 ----------------
 
diff --git a/LUFA/Build/DMBS/Template/makefile b/LUFA/Build/DMBS/Template/makefile
index ba60ab9c2..d88292388 100644
--- a/LUFA/Build/DMBS/Template/makefile
+++ b/LUFA/Build/DMBS/Template/makefile
@@ -20,18 +20,13 @@ LD_FLAGS     =
 # Default target
 all:
 
-# Include LUFA-specific DMBS extension modules
-DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
-include $(DMBS_LUFA_PATH)/lufa-sources.mk
-include $(DMBS_LUFA_PATH)/lufa-gcc.mk
-
-# Include common DMBS build system modules
-DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
+# Include DMBS build script makefiles
+DMBS_PATH   ?= ../DMBS
 include $(DMBS_PATH)/core.mk
+include $(DMBS_PATH)/gcc.mk
 include $(DMBS_PATH)/cppcheck.mk
 include $(DMBS_PATH)/doxygen.mk
 include $(DMBS_PATH)/dfu.mk
-include $(DMBS_PATH)/gcc.mk
 include $(DMBS_PATH)/hid.mk
 include $(DMBS_PATH)/avrdude.mk
 include $(DMBS_PATH)/atprogram.mk
-- 
cgit v1.2.3