aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Build
diff options
context:
space:
mode:
Diffstat (limited to 'LUFA/Build')
-rw-r--r--LUFA/Build/lufa.atprogram.in178
-rw-r--r--LUFA/Build/lufa.avrdude.in138
-rw-r--r--LUFA/Build/lufa.build.in480
-rw-r--r--LUFA/Build/lufa.core.in218
-rw-r--r--LUFA/Build/lufa.cppcheck.in176
-rw-r--r--LUFA/Build/lufa.dfu.in166
-rw-r--r--LUFA/Build/lufa.doxygen.in128
-rw-r--r--LUFA/Build/lufa.sources.in190
8 files changed, 837 insertions, 837 deletions
diff --git a/LUFA/Build/lufa.atprogram.in b/LUFA/Build/lufa.atprogram.in
index 48d1e5c1f..59fedcd43 100644
--- a/LUFA/Build/lufa.atprogram.in
+++ b/LUFA/Build/lufa.atprogram.in
@@ -1,89 +1,89 @@
-#
-# LUFA Library
-# Copyright (C) Dean Camera, 2012.
-#
-# dean [at] fourwalledcubicle [dot] com
-# 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 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
-#
-# -----------------------------------------------------------------------------
-
-# Sanity-check values of mandatory user-supplied variables
-MCU ?= $(error Makefile MCU value not set)
-TARGET ?= $(error Makefile TARGET value not set)
-
-ifeq ($(MCU),)
- $(error Makefile MCU option cannot be blank)
-endif
-ifeq ($(TARGET),)
- $(error Makefile TARGET option cannot be blank)
-endif
-
-# Default values of optionally user-supplied variables
-ATPROGRAM_PROGRAMMER ?= jtagice3
-ATPROGRAM_INTERFACE ?= jtag
-ATPROGRAM_PORT ?=
-
-# 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
-
-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 $<
-
-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
+#
+# LUFA Library
+# Copyright (C) Dean Camera, 2012.
+#
+# dean [at] fourwalledcubicle [dot] com
+# 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 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
+#
+# -----------------------------------------------------------------------------
+
+# Sanity-check values of mandatory user-supplied variables
+MCU ?= $(error Makefile MCU value not set)
+TARGET ?= $(error Makefile TARGET value not set)
+
+ifeq ($(MCU),)
+ $(error Makefile MCU option cannot be blank)
+endif
+ifeq ($(TARGET),)
+ $(error Makefile TARGET option cannot be blank)
+endif
+
+# Default values of optionally user-supplied variables
+ATPROGRAM_PROGRAMMER ?= jtagice3
+ATPROGRAM_INTERFACE ?= jtag
+ATPROGRAM_PORT ?=
+
+# 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
+
+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 $<
+
+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
diff --git a/LUFA/Build/lufa.avrdude.in b/LUFA/Build/lufa.avrdude.in
index e650ee4ae..1f0812b35 100644
--- a/LUFA/Build/lufa.avrdude.in
+++ b/LUFA/Build/lufa.avrdude.in
@@ -1,69 +1,69 @@
-#
-# LUFA Library
-# Copyright (C) Dean Camera, 2012.
-#
-# dean [at] fourwalledcubicle [dot] com
-# 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 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
-#
-# -----------------------------------------------------------------------------
-
-# Sanity-check values of mandatory user-supplied variables
-MCU ?= $(error Makefile MCU value not set)
-TARGET ?= $(error Makefile TARGET value not set)
-
-ifeq ($(MCU),)
- $(error Makefile MCU option cannot be blank)
-endif
-ifeq ($(TARGET),)
- $(error Makefile TARGET option cannot be blank)
-endif
-
-# Default values of optionally user-supplied variables
-AVRDUDE_PROGRAMMER ?= jtagicemkii
-AVRDUDE_PORT ?= usb
-AVRDUDE_FLAGS ?=
-
-# Output Messages
-MSG_AVRDUDE_CMD := ' [AVRDUDE] :'
-
-avrdude: $(TARGET).hex $(MAKEFILE_LIST)
- @echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" FLASH with settings \"$(AVRDUDE_FLASH_FLAGS)\" using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\"
- avrdude -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -U flash:w:$< $(AVRDUDE_FLAGS)
-
-avrdude-ee: $(TARGET).eep $(MAKEFILE_LIST)
- @echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" EEPROM with settings \"$(AVRDUDE_EEP_FLAGS)\" using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\"
- avrdude -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -U eeprom:w:$< $(AVRDUDE_FLAGS)
-
-# Phony build targets for this module
-.PHONY: avrdude avrdude-ee
+#
+# LUFA Library
+# Copyright (C) Dean Camera, 2012.
+#
+# dean [at] fourwalledcubicle [dot] com
+# 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 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
+#
+# -----------------------------------------------------------------------------
+
+# Sanity-check values of mandatory user-supplied variables
+MCU ?= $(error Makefile MCU value not set)
+TARGET ?= $(error Makefile TARGET value not set)
+
+ifeq ($(MCU),)
+ $(error Makefile MCU option cannot be blank)
+endif
+ifeq ($(TARGET),)
+ $(error Makefile TARGET option cannot be blank)
+endif
+
+# Default values of optionally user-supplied variables
+AVRDUDE_PROGRAMMER ?= jtagicemkii
+AVRDUDE_PORT ?= usb
+AVRDUDE_FLAGS ?=
+
+# Output Messages
+MSG_AVRDUDE_CMD := ' [AVRDUDE] :'
+
+avrdude: $(TARGET).hex $(MAKEFILE_LIST)
+ @echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" FLASH with settings \"$(AVRDUDE_FLASH_FLAGS)\" using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\"
+ avrdude -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -U flash:w:$< $(AVRDUDE_FLAGS)
+
+avrdude-ee: $(TARGET).eep $(MAKEFILE_LIST)
+ @echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" EEPROM with settings \"$(AVRDUDE_EEP_FLAGS)\" using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\"
+ avrdude -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -U eeprom:w:$< $(AVRDUDE_FLAGS)
+
+# Phony build targets for this module
+.PHONY: avrdude avrdude-ee
diff --git a/LUFA/Build/lufa.build.in b/LUFA/Build/lufa.build.in
index bfbd7d811..59b81d939 100644
--- a/LUFA/Build/lufa.build.in
+++ b/LUFA/Build/lufa.build.in
@@ -1,240 +1,240 @@
-#
-# LUFA Library
-# Copyright (C) Dean Camera, 2012.
-#
-# dean [at] fourwalledcubicle [dot] com
-# www.lufa-lib.org
-#
-
-LUFA_BUILD_MODULES += BUILD
-LUFA_BUILD_TARGETS += size symbol-sizes all elf hex lss clean
-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
-
-# -----------------------------------------------------------------------------
-# 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
-# elf - Build application ELF debug object file
-# hex - Build application HEX object files
-# lss - Build application LSS assembly listing file
-# clean - Remove output files
-#
-# 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
-#
-# -----------------------------------------------------------------------------
-
-# Sanity-check values of mandatory user-supplied variables
-MCU ?= $(error Makefile MCU value not set)
-TARGET ?= $(error Makefile TARGET value not set)
-ARCH ?= $(error Makefile ARCH value not set)
-SRC ?= $(error Makefile SRC value not set)
-F_USB ?= $(error Makefile F_USB value not set)
-LUFA_PATH ?= $(error Makefile LUFA_PATH value not set)
-
-ifeq ($(MCU),)
- $(error Makefile MCU option cannot be blank)
-endif
-ifeq ($(TARGET),)
- $(error Makefile TARGET option cannot be blank)
-endif
-ifeq ($(ARCH),)
- $(error Makefile ARCH option cannot be blank)
-endif
-ifeq ($(F_USB),)
- $(error Makefile F_USB option cannot be blank)
-endif
-
-# Default values of optionally user-supplied variables
-BOARD ?= NONE
-OPTIMIZATION ?= s
-F_CPU ?=
-C_STANDARD ?= gnu99
-CPP_STANDARD ?= gnu++98
-C_FLAGS ?=
-CPP_FLAGS ?=
-ASM_FLAGS ?=
-CC_FLAGS ?=
-
-# Determine the utility prefix to use for the selected architecture
-ifeq ($(ARCH), AVR8)
- CROSS := avr-
-else ifeq ($(ARCH), XMEGA)
- CROSS := avr-
-else ifeq ($(ARCH), UC3)
- CROSS := avr32-
-else
- $(error Unsupported architecture "$(ARCH)".)
-endif
-
-# Output Messages
-MSG_BUILD_BEGIN := Begin compilation of project \"$(TARGET)\"...
-MSG_BUILD_END := Finished building project \"$(TARGET)\".
-MSG_COMPILE_CMD := ' [CC] :'
-MSG_ASSEMBLE_CMD := ' [AS] :'
-MSG_NM_CMD := ' [NM] :'
-MSG_REMOVE_CMD := ' [RM] :'
-MSG_LINKER_CMD := ' [LNK] :'
-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 formats: $(UNKNOWN_SOURCE))
-endif
-
-# Convert input source filenames into a list of required output object files
-OBJECT_FILES = $(filter %.o, $(C_SOURCE:%.c=%.o) $(CPP_SOURCE:%.cpp=%.o) $(ASM_SOURCE:%.S=%.o))
-DEPENDENCY_FILES = $(OBJECT_FILES:%.o=%.d)
-
-# Create a list of common flags to pass to the compiler/linker/assembler
-BASE_CC_FLAGS :=
-ifeq ($(ARCH), AVR8)
- BASE_CC_FLAGS += -mmcu=$(MCU) -gdwarf-2 -fshort-enums -fno-inline-small-functions -fpack-struct
-else ifeq ($(ARCH), XMEGA)
- BASE_CC_FLAGS += -mmcu=$(MCU) -gdwarf-2 -fshort-enums -fno-inline-small-functions -fpack-struct
-else ifeq ($(ARCH), UC3)
- BASE_CC_FLAGS += -mpart=$(MCU:at32%=%) -g3 -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
-
-# 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 ($(ARCH), UC3)
- BASE_LD_FLAGS += --rodata-writable --direct-data
-else
- BASE_LD_FLAGS += -Wl,--relax
-endif
-
-# Determine flags to pass to the size utility based on its reported features
-SIZE_MCU_FLAG := $(shell $(CROSS)size --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
-SIZE_FORMAT_FLAG := $(shell $(CROSS)size --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
-
-
-begin:
- @echo ""
- @echo $(MSG_BUILD_BEGIN)
- @echo ""
-
-end:
- @echo ""
- @echo $(MSG_BUILD_END)
- @echo ""
-
-gcc_version:
- @$(CROSS)gcc --version
-
-check_source:
- @for f in $(SRC); do \
- if [ ! -f $$f ]; then \
- echo "Error: Source file not found: $$f"; \
- exit 1; \
- fi; \
- done
-
-size: $(TARGET).elf
- @echo $(MSG_SIZE_CMD) Determining size of \"$<\"
- @if test -f $(TARGET).elf; then \
- $(CROSS)size $(SIZE_MCU_FLAG) $(SIZE_FORMAT_FLAG) $< ; 2>/dev/null; \
- fi
-
-symbol-sizes: $(TARGET).elf
- @echo $(MSG_NM_CMD) Extracting \"$<\" symbols with decimal byte sizes
- avr-nm --size-sort --demangle --radix=d $<
-
-clean:
- @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)
- @echo $(MSG_REMOVE_CMD) Removing output files of \"$(TARGET)\"
- rm -f $(TARGET).elf $(TARGET).hex $(TARGET).eep $(TARGET).map $(TARGET).lss
-
-all: begin check_source gcc_version elf hex lss size end
-
-elf: $(TARGET).elf
-hex: $(TARGET).hex $(TARGET).eep
-lss: $(TARGET).lss
-
-%.o: %.c $(MAKEFILE_LIST)
- @echo $(MSG_COMPILE_CMD) Compiling C file \"$<\"
- $(CROSS)gcc -c $(BASE_CC_FLAGS) $(BASE_C_FLAGS) $(CC_FLAGS) $(C_FLAGS) -MMD -MP -MF $(@:%.o=%.d) $< -o $@
-
-%.o: %.cpp $(MAKEFILE_LIST)
- @echo $(MSG_COMPILE_CMD) Compiling C++ file \"$<\"
- $(CROSS)gcc -c $(BASE_CC_FLAGS) $(BASE_CPP_FLAGS) $(CC_FLAGS) $(CPP_FLAGS) -MMD -MP -MF $(@:%.o=%.d) $< -o $@
-
-%.o: %.S $(MAKEFILE_LIST)
- @echo $(MSG_ASSEMBLE_CMD) Assembling \"$<\"
- $(CROSS)gcc -c $(BASE_CC_FLAGS) $(BASE_ASM_FLAGS) $(CC_FLAGS) $(ASM_FLAGS) $< -o $@
-
-.PRECIOUS : $(OBJECT_FILES)
-%.elf: $(OBJECT_FILES)
- @echo $(MSG_LINKER_CMD) Linking object files into \"$@\"
- $(CROSS)gcc $(BASE_CC_FLAGS) $(BASE_LD_FLAGS) $(CC_FLAGS) $(LD_FLAGS) $^ -o $@
-
-%.hex: %.elf
- @echo $(MSG_OBJCPY_CMD) Extracting HEX file data from \"$<\"
- $(CROSS)objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature $< $@
-
-%.eep: %.elf
- @echo $(MSG_OBJCPY_CMD) Extracting EEP file data from \"$<\"
- $(CROSS)objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O ihex $< $@ || exit 0
-
-%.lss: %.elf
- @echo $(MSG_OBJDMP_CMD) Extracting LSS file data from \"$<\"
- $(CROSS)objdump -h -S -z $< > $@
-
-# Include build dependency files
--include $(DEPENDENCY_FILES)
-
-# Phony build targets for this module
-.PHONY: begin end gcc_version check_source size symbol-sizes elf hex lss clean
+#
+# LUFA Library
+# Copyright (C) Dean Camera, 2012.
+#
+# dean [at] fourwalledcubicle [dot] com
+# www.lufa-lib.org
+#
+
+LUFA_BUILD_MODULES += BUILD
+LUFA_BUILD_TARGETS += size symbol-sizes all elf hex lss clean
+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
+
+# -----------------------------------------------------------------------------
+# 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
+# elf - Build application ELF debug object file
+# hex - Build application HEX object files
+# lss - Build application LSS assembly listing file
+# clean - Remove output files
+#
+# 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
+#
+# -----------------------------------------------------------------------------
+
+# Sanity-check values of mandatory user-supplied variables
+MCU ?= $(error Makefile MCU value not set)
+TARGET ?= $(error Makefile TARGET value not set)
+ARCH ?= $(error Makefile ARCH value not set)
+SRC ?= $(error Makefile SRC value not set)
+F_USB ?= $(error Makefile F_USB value not set)
+LUFA_PATH ?= $(error Makefile LUFA_PATH value not set)
+
+ifeq ($(MCU),)
+ $(error Makefile MCU option cannot be blank)
+endif
+ifeq ($(TARGET),)
+ $(error Makefile TARGET option cannot be blank)
+endif
+ifeq ($(ARCH),)
+ $(error Makefile ARCH option cannot be blank)
+endif
+ifeq ($(F_USB),)
+ $(error Makefile F_USB option cannot be blank)
+endif
+
+# Default values of optionally user-supplied variables
+BOARD ?= NONE
+OPTIMIZATION ?= s
+F_CPU ?=
+C_STANDARD ?= gnu99
+CPP_STANDARD ?= gnu++98
+C_FLAGS ?=
+CPP_FLAGS ?=
+ASM_FLAGS ?=
+CC_FLAGS ?=
+
+# Determine the utility prefix to use for the selected architecture
+ifeq ($(ARCH), AVR8)
+ CROSS := avr-
+else ifeq ($(ARCH), XMEGA)
+ CROSS := avr-
+else ifeq ($(ARCH), UC3)
+ CROSS := avr32-
+else
+ $(error Unsupported architecture "$(ARCH)".)
+endif
+
+# Output Messages
+MSG_BUILD_BEGIN := Begin compilation of project \"$(TARGET)\"...
+MSG_BUILD_END := Finished building project \"$(TARGET)\".
+MSG_COMPILE_CMD := ' [CC] :'
+MSG_ASSEMBLE_CMD := ' [AS] :'
+MSG_NM_CMD := ' [NM] :'
+MSG_REMOVE_CMD := ' [RM] :'
+MSG_LINKER_CMD := ' [LNK] :'
+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 formats: $(UNKNOWN_SOURCE))
+endif
+
+# Convert input source filenames into a list of required output object files
+OBJECT_FILES = $(filter %.o, $(C_SOURCE:%.c=%.o) $(CPP_SOURCE:%.cpp=%.o) $(ASM_SOURCE:%.S=%.o))
+DEPENDENCY_FILES = $(OBJECT_FILES:%.o=%.d)
+
+# Create a list of common flags to pass to the compiler/linker/assembler
+BASE_CC_FLAGS :=
+ifeq ($(ARCH), AVR8)
+ BASE_CC_FLAGS += -mmcu=$(MCU) -gdwarf-2 -fshort-enums -fno-inline-small-functions -fpack-struct
+else ifeq ($(ARCH), XMEGA)
+ BASE_CC_FLAGS += -mmcu=$(MCU) -gdwarf-2 -fshort-enums -fno-inline-small-functions -fpack-struct
+else ifeq ($(ARCH), UC3)
+ BASE_CC_FLAGS += -mpart=$(MCU:at32%=%) -g3 -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
+
+# 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 ($(ARCH), UC3)
+ BASE_LD_FLAGS += --rodata-writable --direct-data
+else
+ BASE_LD_FLAGS += -Wl,--relax
+endif
+
+# Determine flags to pass to the size utility based on its reported features
+SIZE_MCU_FLAG := $(shell $(CROSS)size --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+SIZE_FORMAT_FLAG := $(shell $(CROSS)size --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
+
+begin:
+ @echo ""
+ @echo $(MSG_BUILD_BEGIN)
+ @echo ""
+
+end:
+ @echo ""
+ @echo $(MSG_BUILD_END)
+ @echo ""
+
+gcc_version:
+ @$(CROSS)gcc --version
+
+check_source:
+ @for f in $(SRC); do \
+ if [ ! -f $$f ]; then \
+ echo "Error: Source file not found: $$f"; \
+ exit 1; \
+ fi; \
+ done
+
+size: $(TARGET).elf
+ @echo $(MSG_SIZE_CMD) Determining size of \"$<\"
+ @if test -f $(TARGET).elf; then \
+ $(CROSS)size $(SIZE_MCU_FLAG) $(SIZE_FORMAT_FLAG) $< ; 2>/dev/null; \
+ fi
+
+symbol-sizes: $(TARGET).elf
+ @echo $(MSG_NM_CMD) Extracting \"$<\" symbols with decimal byte sizes
+ avr-nm --size-sort --demangle --radix=d $<
+
+clean:
+ @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)
+ @echo $(MSG_REMOVE_CMD) Removing output files of \"$(TARGET)\"
+ rm -f $(TARGET).elf $(TARGET).hex $(TARGET).eep $(TARGET).map $(TARGET).lss
+
+all: begin check_source gcc_version elf hex lss size end
+
+elf: $(TARGET).elf
+hex: $(TARGET).hex $(TARGET).eep
+lss: $(TARGET).lss
+
+%.o: %.c $(MAKEFILE_LIST)
+ @echo $(MSG_COMPILE_CMD) Compiling C file \"$<\"
+ $(CROSS)gcc -c $(BASE_CC_FLAGS) $(BASE_C_FLAGS) $(CC_FLAGS) $(C_FLAGS) -MMD -MP -MF $(@:%.o=%.d) $< -o $@
+
+%.o: %.cpp $(MAKEFILE_LIST)
+ @echo $(MSG_COMPILE_CMD) Compiling C++ file \"$<\"
+ $(CROSS)gcc -c $(BASE_CC_FLAGS) $(BASE_CPP_FLAGS) $(CC_FLAGS) $(CPP_FLAGS) -MMD -MP -MF $(@:%.o=%.d) $< -o $@
+
+%.o: %.S $(MAKEFILE_LIST)
+ @echo $(MSG_ASSEMBLE_CMD) Assembling \"$<\"
+ $(CROSS)gcc -c $(BASE_CC_FLAGS) $(BASE_ASM_FLAGS) $(CC_FLAGS) $(ASM_FLAGS) $< -o $@
+
+.PRECIOUS : $(OBJECT_FILES)
+%.elf: $(OBJECT_FILES)
+ @echo $(MSG_LINKER_CMD) Linking object files into \"$@\"
+ $(CROSS)gcc $(BASE_CC_FLAGS) $(BASE_LD_FLAGS) $(CC_FLAGS) $(LD_FLAGS) $^ -o $@
+
+%.hex: %.elf
+ @echo $(MSG_OBJCPY_CMD) Extracting HEX file data from \"$<\"
+ $(CROSS)objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature $< $@
+
+%.eep: %.elf
+ @echo $(MSG_OBJCPY_CMD) Extracting EEP file data from \"$<\"
+ $(CROSS)objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O ihex $< $@ || exit 0
+
+%.lss: %.elf
+ @echo $(MSG_OBJDMP_CMD) Extracting LSS file data from \"$<\"
+ $(CROSS)objdump -h -S -z $< > $@
+
+# Include build dependency files
+-include $(DEPENDENCY_FILES)
+
+# Phony build targets for this module
+.PHONY: begin end gcc_version check_source size symbol-sizes elf hex lss clean
diff --git a/LUFA/Build/lufa.core.in b/LUFA/Build/lufa.core.in
index 722e92fd7..6c124d81f 100644
--- a/LUFA/Build/lufa.core.in
+++ b/LUFA/Build/lufa.core.in
@@ -1,109 +1,109 @@
-#
-# LUFA Library
-# Copyright (C) Dean Camera, 2012.
-#
-# dean [at] fourwalledcubicle [dot] com
-# www.lufa-lib.org
-#
-
-LUFA_BUILD_MODULES += CORE
-LUFA_BUILD_TARGETS += help list_targets list_modules list_mandatory list_optional
-LUFA_BUILD_MANDATORY_VARS +=
-LUFA_BUILD_OPTIONAL_VARS +=
-
-# -----------------------------------------------------------------------------
-# LUFA Core Buildsystem Makefile Module.
-# -----------------------------------------------------------------------------
-# DESCRIPTION:
-# Provides a set of core build targets for the LUFA buildsystem
-# -----------------------------------------------------------------------------
-# 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
-#
-# MANDATORY PARAMETERS:
-#
-# (None)
-#
-# OPTIONAL PARAMETERS:
-#
-# (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)))
-
-help:
- @echo "==================================================================="
- @echo " LUFA Build System 2.0 "
- @echo " (C) Dean Camera, 2012 { 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 " Currently used build system modules in this application: "
- @echo " "
- @printf " %b" "$(SORTED_LUFA_BUILD_MODULES:%= - %\n)"
- @echo " "
- @echo " "
- @echo " Currently available build targets in this application: "
- @echo " "
- @printf " %b" "$(SORTED_LUFA_BUILD_TARGETS:%= - %\n)"
- @echo " "
- @echo " "
- @echo " Mandatory variables required by the selected build Modules: "
- @echo " "
- @printf " %b" "$(SORTED_LUFA_MANDATORY_VARS:%= - %\n)"
- @echo " "
- @echo " "
- @echo " Optional variables required by the selected build Modules: "
- @echo " "
- @printf " %b" "$(SORTED_LUFA_OPTIONAL_VARS:%= - %\n)"
- @echo " "
- @echo "==================================================================="
- @echo " The LUFA BuildSystem 2.0 - Powered By Unicorns (tm) "
- @echo "==================================================================="
-
-list_modules:
- @echo Currently Used Build System Modules: $(SORTED_LUFA_BUILD_MODULES)
-
-list_targets:
- @echo Currently Available Build Targets: $(SORTED_LUFA_BUILD_TARGETS)
-
-list_mandatory:
- @echo Mandatory Variables for Included Modules: $(SORTED_LUFA_MANDATORY_VARS)
-
-list_optional:
- @echo Optional Variables for Included Modules: $(SORTED_LUFA_OPTIONAL_VARS)
-
-# Disable default in-built make rules (those that are needed are explicitly
-# defined, and doing so has performance benefits when recursively building)
-.SUFFIXES:
-
-# Phony build targets for this module
-.PHONY: help list_modules list_targets list_mandatory list_optional
+#
+# LUFA Library
+# Copyright (C) Dean Camera, 2012.
+#
+# dean [at] fourwalledcubicle [dot] com
+# www.lufa-lib.org
+#
+
+LUFA_BUILD_MODULES += CORE
+LUFA_BUILD_TARGETS += help list_targets list_modules list_mandatory list_optional
+LUFA_BUILD_MANDATORY_VARS +=
+LUFA_BUILD_OPTIONAL_VARS +=
+
+# -----------------------------------------------------------------------------
+# LUFA Core Buildsystem Makefile Module.
+# -----------------------------------------------------------------------------
+# DESCRIPTION:
+# Provides a set of core build targets for the LUFA buildsystem
+# -----------------------------------------------------------------------------
+# 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
+#
+# MANDATORY PARAMETERS:
+#
+# (None)
+#
+# OPTIONAL PARAMETERS:
+#
+# (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)))
+
+help:
+ @echo "==================================================================="
+ @echo " LUFA Build System 2.0 "
+ @echo " (C) Dean Camera, 2012 { 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 " Currently used build system modules in this application: "
+ @echo " "
+ @printf " %b" "$(SORTED_LUFA_BUILD_MODULES:%= - %\n)"
+ @echo " "
+ @echo " "
+ @echo " Currently available build targets in this application: "
+ @echo " "
+ @printf " %b" "$(SORTED_LUFA_BUILD_TARGETS:%= - %\n)"
+ @echo " "
+ @echo " "
+ @echo " Mandatory variables required by the selected build Modules: "
+ @echo " "
+ @printf " %b" "$(SORTED_LUFA_MANDATORY_VARS:%= - %\n)"
+ @echo " "
+ @echo " "
+ @echo " Optional variables required by the selected build Modules: "
+ @echo " "
+ @printf " %b" "$(SORTED_LUFA_OPTIONAL_VARS:%= - %\n)"
+ @echo " "
+ @echo "==================================================================="
+ @echo " The LUFA BuildSystem 2.0 - Powered By Unicorns (tm) "
+ @echo "==================================================================="
+
+list_modules:
+ @echo Currently Used Build System Modules: $(SORTED_LUFA_BUILD_MODULES)
+
+list_targets:
+ @echo Currently Available Build Targets: $(SORTED_LUFA_BUILD_TARGETS)
+
+list_mandatory:
+ @echo Mandatory Variables for Included Modules: $(SORTED_LUFA_MANDATORY_VARS)
+
+list_optional:
+ @echo Optional Variables for Included Modules: $(SORTED_LUFA_OPTIONAL_VARS)
+
+# Disable default in-built make rules (those that are needed are explicitly
+# defined, and doing so has performance benefits when recursively building)
+.SUFFIXES:
+
+# Phony build targets for this module
+.PHONY: help list_modules list_targets list_mandatory list_optional
diff --git a/LUFA/Build/lufa.cppcheck.in b/LUFA/Build/lufa.cppcheck.in
index 35ec1e4aa..330ec1d49 100644
--- a/LUFA/Build/lufa.cppcheck.in
+++ b/LUFA/Build/lufa.cppcheck.in
@@ -1,88 +1,88 @@
-#
-# LUFA Library
-# Copyright (C) Dean Camera, 2012.
-#
-# dean [at] fourwalledcubicle [dot] com
-# www.lufa-lib.org
-#
-
-LUFA_BUILD_MODULES += CPPCHECK
-LUFA_BUILD_TARGETS += cppcheck cppcheck-config
-LUFA_BUILD_MANDATORY_VARS +=
-LUFA_BUILD_OPTIONAL_VARS += CPPCHECK_PATH CPPCHECK_INCLUDES CPPCHECK_EXCLUDES CPPCHECK_MSG_TEMPLATE \
- CPPCHECK_ENABLE CPPCHECK_SUPPRESS CPPCHECK_FAIL_ON_WARNING CPPCHECK_QUIET \
- CPPCHECK_FLAGS
-
-# -----------------------------------------------------------------------------
-# 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:
-#
-# (None)
-#
-# OPTIONAL PARAMETERS:
-#
-# CPPCHECK_PATH - Path of the files to statically analyze
-# 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
-#
-# -----------------------------------------------------------------------------
-
-# Default values of optionally user-supplied variables
-CPPCHECK_PATH ?= .
-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 ?=
-
-# 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
-else ifneq ($(CPPCHECK_FAIL_ON_WARNING), N)
- $(error CPPCHECK_FAIL_ON_WARNING must be Y or N)
-endif
-ifeq ($(CPPCHECK_QUIET), Y)
- BASE_CPPCHECK_FLAGS += --quiet
-else ifneq ($(CPPCHECK_QUIET), N)
- $(error CPPCHECK_QUIET must be Y or N)
-endif
-
-# Output Messages
-MSG_CPPCHECK_CMD := ' [CPPCHECK]:'
-
-cppcheck-config:
- @echo $(MSG_CPPCHECK_CMD) Checking cppcheck configuration for path \"$(CPPCHECK_PATH)\"
- cppcheck $(BASE_CPPCHECK_FLAGS) --check-config $(CPPCHECK_FLAGS) $(CPPCHECK_PATH)
-
-cppcheck:
- @echo $(MSG_CPPCHECK_CMD) Performing cppcheck analysis on path \"$(CPPCHECK_PATH)\"
- cppcheck $(BASE_CPPCHECK_FLAGS) --enable=$(CPPCHECK_ENABLE) $(CPPCHECK_SUPPRESS:%=--suppress=%) $(CPPCHECK_FLAGS) $(CPPCHECK_PATH)
-
-# Phony build targets for this module
-.PHONY: cppcheck-config cppcheck
+#
+# LUFA Library
+# Copyright (C) Dean Camera, 2012.
+#
+# dean [at] fourwalledcubicle [dot] com
+# www.lufa-lib.org
+#
+
+LUFA_BUILD_MODULES += CPPCHECK
+LUFA_BUILD_TARGETS += cppcheck cppcheck-config
+LUFA_BUILD_MANDATORY_VARS +=
+LUFA_BUILD_OPTIONAL_VARS += CPPCHECK_PATH CPPCHECK_INCLUDES CPPCHECK_EXCLUDES CPPCHECK_MSG_TEMPLATE \
+ CPPCHECK_ENABLE CPPCHECK_SUPPRESS CPPCHECK_FAIL_ON_WARNING CPPCHECK_QUIET \
+ CPPCHECK_FLAGS
+
+# -----------------------------------------------------------------------------
+# 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:
+#
+# (None)
+#
+# OPTIONAL PARAMETERS:
+#
+# CPPCHECK_PATH - Path of the files to statically analyze
+# 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
+#
+# -----------------------------------------------------------------------------
+
+# Default values of optionally user-supplied variables
+CPPCHECK_PATH ?= .
+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 ?=
+
+# 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
+else ifneq ($(CPPCHECK_FAIL_ON_WARNING), N)
+ $(error CPPCHECK_FAIL_ON_WARNING must be Y or N)
+endif
+ifeq ($(CPPCHECK_QUIET), Y)
+ BASE_CPPCHECK_FLAGS += --quiet
+else ifneq ($(CPPCHECK_QUIET), N)
+ $(error CPPCHECK_QUIET must be Y or N)
+endif
+
+# Output Messages
+MSG_CPPCHECK_CMD := ' [CPPCHECK]:'
+
+cppcheck-config:
+ @echo $(MSG_CPPCHECK_CMD) Checking cppcheck configuration for path \"$(CPPCHECK_PATH)\"
+ cppcheck $(BASE_CPPCHECK_FLAGS) --check-config $(CPPCHECK_FLAGS) $(CPPCHECK_PATH)
+
+cppcheck:
+ @echo $(MSG_CPPCHECK_CMD) Performing cppcheck analysis on path \"$(CPPCHECK_PATH)\"
+ cppcheck $(BASE_CPPCHECK_FLAGS) --enable=$(CPPCHECK_ENABLE) $(CPPCHECK_SUPPRESS:%=--suppress=%) $(CPPCHECK_FLAGS) $(CPPCHECK_PATH)
+
+# Phony build targets for this module
+.PHONY: cppcheck-config cppcheck
diff --git a/LUFA/Build/lufa.dfu.in b/LUFA/Build/lufa.dfu.in
index f57c20bcf..8122bfde3 100644
--- a/LUFA/Build/lufa.dfu.in
+++ b/LUFA/Build/lufa.dfu.in
@@ -1,83 +1,83 @@
-#
-# LUFA Library
-# Copyright (C) Dean Camera, 2012.
-#
-# dean [at] fourwalledcubicle [dot] com
-# 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 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)
-#
-# -----------------------------------------------------------------------------
-
-# Sanity-check values of mandatory user-supplied variables
-MCU ?= $(error Makefile MCU value not set)
-TARGET ?= $(error Makefile TARGET value not set)
-
-ifeq ($(MCU),)
- $(error Makefile MCU option cannot be blank)
-endif
-ifeq ($(TARGET),)
- $(error Makefile TARGET option cannot be blank)
-endif
-
-# Output Messages
-MSG_COPY_CMD := ' [CP] :'
-MSG_REMOVE_CMD := ' [RM] :'
-MSG_DFU_CMD := ' [DFU] :'
-
-flip: $(TARGET).hex $(MAKEFILE_LIST)
- @echo $(MSG_DFU_CMD) Programming FLASH with batchisp using \"$<\"
- batchisp -hardware usb -device $(MCU) -operation erase f
- batchisp -hardware usb -device $(MCU) -operation loadbuffer $< program
- batchisp -hardware usb -device $(MCU) -operation start reset 0
-
-flip-ee: $(TARGET).eep $(MAKEFILE_LIST)
- @echo $(MSG_DFU_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 erase
- batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $<.hex program
- batchisp -hardware usb -device $(MCU) -operation start reset 0
- @echo $(MSG_DFU_CMD) Removing temporary file \"$<.hex\"
- rm $<.hex
-
-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
-
-dfu-ee: $(TARGET).eep $(MAKEFILE_LIST)
- @echo $(MSG_DFU_CMD) Programming EEPROM with dfu-programmer using \"$<\"
- dfu-programmer $(MCU) eeprom-flash $<
- dfu-programmer $(MCU) reset
-
-# Phony build targets for this module
-.PHONY: flip flip-ee dfu dfu-ee
+#
+# LUFA Library
+# Copyright (C) Dean Camera, 2012.
+#
+# dean [at] fourwalledcubicle [dot] com
+# 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 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)
+#
+# -----------------------------------------------------------------------------
+
+# Sanity-check values of mandatory user-supplied variables
+MCU ?= $(error Makefile MCU value not set)
+TARGET ?= $(error Makefile TARGET value not set)
+
+ifeq ($(MCU),)
+ $(error Makefile MCU option cannot be blank)
+endif
+ifeq ($(TARGET),)
+ $(error Makefile TARGET option cannot be blank)
+endif
+
+# Output Messages
+MSG_COPY_CMD := ' [CP] :'
+MSG_REMOVE_CMD := ' [RM] :'
+MSG_DFU_CMD := ' [DFU] :'
+
+flip: $(TARGET).hex $(MAKEFILE_LIST)
+ @echo $(MSG_DFU_CMD) Programming FLASH with batchisp using \"$<\"
+ batchisp -hardware usb -device $(MCU) -operation erase f
+ batchisp -hardware usb -device $(MCU) -operation loadbuffer $< program
+ batchisp -hardware usb -device $(MCU) -operation start reset 0
+
+flip-ee: $(TARGET).eep $(MAKEFILE_LIST)
+ @echo $(MSG_DFU_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 erase
+ batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $<.hex program
+ batchisp -hardware usb -device $(MCU) -operation start reset 0
+ @echo $(MSG_DFU_CMD) Removing temporary file \"$<.hex\"
+ rm $<.hex
+
+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
+
+dfu-ee: $(TARGET).eep $(MAKEFILE_LIST)
+ @echo $(MSG_DFU_CMD) Programming EEPROM with dfu-programmer using \"$<\"
+ dfu-programmer $(MCU) eeprom-flash $<
+ dfu-programmer $(MCU) reset
+
+# Phony build targets for this module
+.PHONY: flip flip-ee dfu dfu-ee
diff --git a/LUFA/Build/lufa.doxygen.in b/LUFA/Build/lufa.doxygen.in
index f4a5db705..3fb950bc3 100644
--- a/LUFA/Build/lufa.doxygen.in
+++ b/LUFA/Build/lufa.doxygen.in
@@ -1,64 +1,64 @@
-#
-# LUFA Library
-# Copyright (C) Dean Camera, 2012.
-#
-# dean [at] fourwalledcubicle [dot] com
-# www.lufa-lib.org
-#
-
-LUFA_BUILD_MODULES += DOXYGEN
-LUFA_BUILD_TARGETS += doxygen
-LUFA_BUILD_MANDATORY_VARS += LUFA_PATH
-LUFA_BUILD_OPTIONAL_VARS += DOXYGEN_CONF DOXYGEN_FAIL_ON_WARNING DOXYGEN_OVERRIDE_PARAMS
-
-# -----------------------------------------------------------------------------
-# 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
-#
-# 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
-# -----------------------------------------------------------------------------
-
-# Sanity-check values of mandatory user-supplied variables
-LUFA_PATH ?= $(error Makefile LUFA_PATH value not set)
-
-# Default values of optionally user-supplied variables
-DOXYGEN_CONF ?= Doxygen.conf
-DOXYGEN_FAIL_ON_WARNING ?= Y
-DOXYGEN_OVERRIDE_PARAMS ?= QUIET=YES HTML_STYLESHEET=$(patsubst %/,%,$(LUFA_PATH))/DoxygenPages/Style/Style.css
-
-# 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 ifeq ($(DOXYGEN_FAIL_ON_WARNING), N)
- DOXYGEN_CMD = $(BASE_DOXYGEN_CMD)
-else
- $(error DOXYGEN_FAIL_ON_WARNING must be Y or N.)
-endif
-
-doxygen:
- @echo $(MSG_DOXYGEN_CMD) Configuration file \"$(DOXYGEN_CONF)\" with parameters \"$(DOXYGEN_OVERRIDE_PARAMS)\"
- $(DOXYGEN_CMD)
-
-# Phony build targets for this module
-.PHONY: doxygen
+#
+# LUFA Library
+# Copyright (C) Dean Camera, 2012.
+#
+# dean [at] fourwalledcubicle [dot] com
+# www.lufa-lib.org
+#
+
+LUFA_BUILD_MODULES += DOXYGEN
+LUFA_BUILD_TARGETS += doxygen
+LUFA_BUILD_MANDATORY_VARS += LUFA_PATH
+LUFA_BUILD_OPTIONAL_VARS += DOXYGEN_CONF DOXYGEN_FAIL_ON_WARNING DOXYGEN_OVERRIDE_PARAMS
+
+# -----------------------------------------------------------------------------
+# 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
+#
+# 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
+# -----------------------------------------------------------------------------
+
+# Sanity-check values of mandatory user-supplied variables
+LUFA_PATH ?= $(error Makefile LUFA_PATH value not set)
+
+# Default values of optionally user-supplied variables
+DOXYGEN_CONF ?= Doxygen.conf
+DOXYGEN_FAIL_ON_WARNING ?= Y
+DOXYGEN_OVERRIDE_PARAMS ?= QUIET=YES HTML_STYLESHEET=$(patsubst %/,%,$(LUFA_PATH))/DoxygenPages/Style/Style.css
+
+# 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 ifeq ($(DOXYGEN_FAIL_ON_WARNING), N)
+ DOXYGEN_CMD = $(BASE_DOXYGEN_CMD)
+else
+ $(error DOXYGEN_FAIL_ON_WARNING must be Y or N.)
+endif
+
+doxygen:
+ @echo $(MSG_DOXYGEN_CMD) Configuration file \"$(DOXYGEN_CONF)\" with parameters \"$(DOXYGEN_OVERRIDE_PARAMS)\"
+ $(DOXYGEN_CMD)
+
+# Phony build targets for this module
+.PHONY: doxygen
diff --git a/LUFA/Build/lufa.sources.in b/LUFA/Build/lufa.sources.in
index 9df85c2ae..6d28056cc 100644
--- a/LUFA/Build/lufa.sources.in
+++ b/LUFA/Build/lufa.sources.in
@@ -1,95 +1,95 @@
-#
-# LUFA Library
-# Copyright (C) Dean Camera, 2012.
-#
-# dean [at] fourwalledcubicle [dot] com
-# www.lufa-lib.org
-#
-
-LUFA_BUILD_MODULES += SOURCES
-LUFA_BUILD_TARGETS +=
-LUFA_BUILD_MANDATORY_VARS += LUFA_PATH ARCH
-LUFA_BUILD_OPTIONAL_VARS +=
-
-# -----------------------------------------------------------------------------
-# 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)
-#
-# -----------------------------------------------------------------------------
-
-# Sanity-check values of mandatory user-supplied variables
-ARCH ?= $(error Makefile ARCH value not set)
-LUFA_PATH ?= $(error Makefile LUFA_PATH value not set)
-
-ifeq ($(ARCH),)
- $(error Makefile ARCH option cannot be blank)
-endif
-
-# 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 = $(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)/Host_$(ARCH).c \
- $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Pipe_$(ARCH).c \
- $(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/$(ARCH)/EndpointStream_$(ARCH).c \
- $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/PipeStream_$(ARCH).c \
- $(LUFA_ROOT_PATH)/Drivers/USB/Core/ConfigDescriptor.c \
- $(LUFA_ROOT_PATH)/Drivers/USB/Core/DeviceStandardReq.c \
- $(LUFA_ROOT_PATH)/Drivers/USB/Core/Events.c \
- $(LUFA_ROOT_PATH)/Drivers/USB/Core/HostStandardReq.c \
- $(LUFA_ROOT_PATH)/Drivers/USB/Core/USBTask.c \
- $(LUFA_ROOT_PATH)/Drivers/USB/Class/Common/HIDParser.c
-LUFA_SRC_USBCLASS = $(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/RNDISClassDevice.c \
- $(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_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_PATH)/Platform/UC3/Exception.S $(LUFA_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)
+#
+# LUFA Library
+# Copyright (C) Dean Camera, 2012.
+#
+# dean [at] fourwalledcubicle [dot] com
+# www.lufa-lib.org
+#
+
+LUFA_BUILD_MODULES += SOURCES
+LUFA_BUILD_TARGETS +=
+LUFA_BUILD_MANDATORY_VARS += LUFA_PATH ARCH
+LUFA_BUILD_OPTIONAL_VARS +=
+
+# -----------------------------------------------------------------------------
+# 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)
+#
+# -----------------------------------------------------------------------------
+
+# Sanity-check values of mandatory user-supplied variables
+ARCH ?= $(error Makefile ARCH value not set)
+LUFA_PATH ?= $(error Makefile LUFA_PATH value not set)
+
+ifeq ($(ARCH),)
+ $(error Makefile ARCH option cannot be blank)
+endif
+
+# 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 = $(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)/Host_$(ARCH).c \
+ $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Pipe_$(ARCH).c \
+ $(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/$(ARCH)/EndpointStream_$(ARCH).c \
+ $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/PipeStream_$(ARCH).c \
+ $(LUFA_ROOT_PATH)/Drivers/USB/Core/ConfigDescriptor.c \
+ $(LUFA_ROOT_PATH)/Drivers/USB/Core/DeviceStandardReq.c \
+ $(LUFA_ROOT_PATH)/Drivers/USB/Core/Events.c \
+ $(LUFA_ROOT_PATH)/Drivers/USB/Core/HostStandardReq.c \
+ $(LUFA_ROOT_PATH)/Drivers/USB/Core/USBTask.c \
+ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Common/HIDParser.c
+LUFA_SRC_USBCLASS = $(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/RNDISClassDevice.c \
+ $(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_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_PATH)/Platform/UC3/Exception.S $(LUFA_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)