Commit b7e3c86e authored by Dean Camera's avatar Dean Camera
Browse files

Rename build system module makefiles from "lufa.MODULE.in" to "lufa_MODULE.mk"...

Rename build system module makefiles from "lufa.MODULE.in" to "lufa_MODULE.mk" to prevent makefile from assuming the include is an old style build rule, slowing down the build process.

Prevent the BUILD module from shell-executing multiple processes to determine the avr-size flags to speed up the build, unless the size rule is invoked.

Add warnings and set warnings as errors to the SingleUSBModeTest build test makefile.
parent d4980e58
...@@ -43,10 +43,10 @@ BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, signatures, Signatures, 8 ...@@ -43,10 +43,10 @@ BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, signatures, Signatures, 8
all: all:
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.core.in include $(LUFA_PATH)/Build/lufa_core.mk
include $(LUFA_PATH)/Build/lufa.sources.in include $(LUFA_PATH)/Build/lufa_sources.mk
include $(LUFA_PATH)/Build/lufa.build.in include $(LUFA_PATH)/Build/lufa_build.mk
include $(LUFA_PATH)/Build/lufa.cppcheck.in include $(LUFA_PATH)/Build/lufa_cppcheck.mk
include $(LUFA_PATH)/Build/lufa.doxygen.in include $(LUFA_PATH)/Build/lufa_doxygen.mk
include $(LUFA_PATH)/Build/lufa.avrdude.in include $(LUFA_PATH)/Build/lufa_avrdude.mk
include $(LUFA_PATH)/Build/lufa.atprogram.in include $(LUFA_PATH)/Build/lufa_atprogram.mk
...@@ -43,10 +43,10 @@ BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, signatures, Signatures, 8 ...@@ -43,10 +43,10 @@ BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, signatures, Signatures, 8
all: all:
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.core.in include $(LUFA_PATH)/Build/lufa_core.mk
include $(LUFA_PATH)/Build/lufa.sources.in include $(LUFA_PATH)/Build/lufa_sources.mk
include $(LUFA_PATH)/Build/lufa.build.in include $(LUFA_PATH)/Build/lufa_build.mk
include $(LUFA_PATH)/Build/lufa.cppcheck.in include $(LUFA_PATH)/Build/lufa_cppcheck.mk
include $(LUFA_PATH)/Build/lufa.doxygen.in include $(LUFA_PATH)/Build/lufa_doxygen.mk
include $(LUFA_PATH)/Build/lufa.avrdude.in include $(LUFA_PATH)/Build/lufa_avrdude.mk
include $(LUFA_PATH)/Build/lufa.atprogram.in include $(LUFA_PATH)/Build/lufa_atprogram.mk
...@@ -36,10 +36,10 @@ BOOT_SEC_OFFSET = 0x$(shell echo "obase=16; (($(FLASH_SIZE_KB) * 1024) - $ ...@@ -36,10 +36,10 @@ BOOT_SEC_OFFSET = 0x$(shell echo "obase=16; (($(FLASH_SIZE_KB) * 1024) - $
all: all:
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.core.in include $(LUFA_PATH)/Build/lufa_core.mk
include $(LUFA_PATH)/Build/lufa.sources.in include $(LUFA_PATH)/Build/lufa_sources.mk
include $(LUFA_PATH)/Build/lufa.build.in include $(LUFA_PATH)/Build/lufa_build.mk
include $(LUFA_PATH)/Build/lufa.cppcheck.in include $(LUFA_PATH)/Build/lufa_cppcheck.mk
include $(LUFA_PATH)/Build/lufa.doxygen.in include $(LUFA_PATH)/Build/lufa_doxygen.mk
include $(LUFA_PATH)/Build/lufa.avrdude.in include $(LUFA_PATH)/Build/lufa_avrdude.mk
include $(LUFA_PATH)/Build/lufa.atprogram.in include $(LUFA_PATH)/Build/lufa_atprogram.mk
...@@ -65,4 +65,4 @@ clean: ...@@ -65,4 +65,4 @@ clean:
.PHONY: all begin end makeboardlist testboards clean .PHONY: all begin end makeboardlist testboards clean
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.core.in include $(LUFA_PATH)/Build/lufa_core.mk
...@@ -21,4 +21,4 @@ LUFA_PATH = ../../LUFA ...@@ -21,4 +21,4 @@ LUFA_PATH = ../../LUFA
CC_FLAGS = -Werror CC_FLAGS = -Werror
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.build.in include $(LUFA_PATH)/Build/lufa_build.mk
\ No newline at end of file \ No newline at end of file
...@@ -60,4 +60,4 @@ clean: ...@@ -60,4 +60,4 @@ clean:
.PHONY: all begin end testbootloaders clean .PHONY: all begin end testbootloaders clean
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.core.in include $(LUFA_PATH)/Build/lufa_core.mk
...@@ -63,4 +63,4 @@ clean: ...@@ -63,4 +63,4 @@ clean:
.PHONY: all arch_avr8 arch_xmega arch_uc3 begin end .PHONY: all arch_avr8 arch_xmega arch_uc3 begin end
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.core.in include $(LUFA_PATH)/Build/lufa_core.mk
...@@ -61,5 +61,5 @@ C_FLAGS += -Wnested-externs ...@@ -61,5 +61,5 @@ C_FLAGS += -Wnested-externs
#CC_FLAGS += -pedantic #CC_FLAGS += -pedantic
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.sources.in include $(LUFA_PATH)/Build/lufa_sources.mk
include $(LUFA_PATH)/Build/lufa.build.in include $(LUFA_PATH)/Build/lufa_build.mk
\ No newline at end of file \ No newline at end of file
...@@ -53,4 +53,4 @@ clean: ...@@ -53,4 +53,4 @@ clean:
.PHONY: begin end compile clean .PHONY: begin end compile clean
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.core.in include $(LUFA_PATH)/Build/lufa_core.mk
...@@ -26,9 +26,41 @@ OPTIMIZATION = 1 ...@@ -26,9 +26,41 @@ OPTIMIZATION = 1
TARGET = Test TARGET = Test
SRC = Test.c Dummy.S $(LUFA_SRC_USB) SRC = Test.c Dummy.S $(LUFA_SRC_USB)
LUFA_PATH = ../../LUFA LUFA_PATH = ../../LUFA
CC_FLAGS =
# TODO: Add warnings and set warnings as errors # Generic C/C++ compiler flags
CC_FLAGS = -Wextra
CC_FLAGS += -Werror
CC_FLAGS += -Wformat=2
CC_FLAGS += -Winit-self
CC_FLAGS += -Wswitch-enum
CC_FLAGS += -Wunused
CC_FLAGS += -Wundef
CC_FLAGS += -Wpointer-arith
CC_FLAGS += -Wcast-align
CC_FLAGS += -Wwrite-strings
CC_FLAGS += -Wlogical-op
CC_FLAGS += -Wmissing-declarations
CC_FLAGS += -Wmissing-field-initializers
CC_FLAGS += -Wmissing-format-attribute
CC_FLAGS += -Woverlength-strings
# Only enable rendundant declaration warnings for AVR8 target (FIXME)
ifeq ($(ARCH), AVR8)
CC_FLAGS += -Wredundant-decls
endif
# C compiler only flags
C_FLAGS += -Wmissing-parameter-type
C_FLAGS += -Wnested-externs
# Potential additional warnings to enable in the future (FIXME)
#CC_FLAGS += -Wswitch-default
#CC_FLAGS += -Wc++-compat
#CC_FLAGS += -Wcast-qual
#CC_FLAGS += -Wconversion
#CC_FLAGS += -Wjump-misses-init
#CC_FLAGS += -pedantic
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.sources.in include $(LUFA_PATH)/Build/lufa_sources.mk
include $(LUFA_PATH)/Build/lufa.build.in include $(LUFA_PATH)/Build/lufa_build.mk
\ No newline at end of file \ No newline at end of file
...@@ -35,5 +35,5 @@ end: ...@@ -35,5 +35,5 @@ end:
.PHONY: all begin end .PHONY: all begin end
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.core.in include $(LUFA_PATH)/Build/lufa_core.mk
include $(LUFA_PATH)/Build/lufa.cppcheck.in include $(LUFA_PATH)/Build/lufa_cppcheck.mk
\ No newline at end of file \ No newline at end of file
...@@ -25,12 +25,12 @@ LD_FLAGS = ...@@ -25,12 +25,12 @@ LD_FLAGS =
all: all:
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.core.in include $(LUFA_PATH)/Build/lufa_core.mk
include $(LUFA_PATH)/Build/lufa.sources.in include $(LUFA_PATH)/Build/lufa_sources.mk
include $(LUFA_PATH)/Build/lufa.build.in include $(LUFA_PATH)/Build/lufa_build.mk
include $(LUFA_PATH)/Build/lufa.cppcheck.in include $(LUFA_PATH)/Build/lufa_cppcheck.mk
include $(LUFA_PATH)/Build/lufa.doxygen.in include $(LUFA_PATH)/Build/lufa_doxygen.mk
include $(LUFA_PATH)/Build/lufa.dfu.in include $(LUFA_PATH)/Build/lufa_dfu.mk
include $(LUFA_PATH)/Build/lufa.hid.in include $(LUFA_PATH)/Build/lufa_hid.mk
include $(LUFA_PATH)/Build/lufa.avrdude.in include $(LUFA_PATH)/Build/lufa_avrdude.mk
include $(LUFA_PATH)/Build/lufa.atprogram.in include $(LUFA_PATH)/Build/lufa_atprogram.mk
...@@ -25,12 +25,12 @@ LD_FLAGS = ...@@ -25,12 +25,12 @@ LD_FLAGS =
all: all:
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.core.in include $(LUFA_PATH)/Build/lufa_core.mk
include $(LUFA_PATH)/Build/lufa.sources.in include $(LUFA_PATH)/Build/lufa_sources.mk
include $(LUFA_PATH)/Build/lufa.build.in include $(LUFA_PATH)/Build/lufa_build.mk
include $(LUFA_PATH)/Build/lufa.cppcheck.in include $(LUFA_PATH)/Build/lufa_cppcheck.mk
include $(LUFA_PATH)/Build/lufa.doxygen.in include $(LUFA_PATH)/Build/lufa_doxygen.mk
include $(LUFA_PATH)/Build/lufa.dfu.in include $(LUFA_PATH)/Build/lufa_dfu.mk
include $(LUFA_PATH)/Build/lufa.hid.in include $(LUFA_PATH)/Build/lufa_hid.mk
include $(LUFA_PATH)/Build/lufa.avrdude.in include $(LUFA_PATH)/Build/lufa_avrdude.mk
include $(LUFA_PATH)/Build/lufa.atprogram.in include $(LUFA_PATH)/Build/lufa_atprogram.mk
...@@ -25,12 +25,12 @@ LD_FLAGS = ...@@ -25,12 +25,12 @@ LD_FLAGS =
all: all:
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.core.in include $(LUFA_PATH)/Build/lufa_core.mk
include $(LUFA_PATH)/Build/lufa.sources.in include $(LUFA_PATH)/Build/lufa_sources.mk
include $(LUFA_PATH)/Build/lufa.build.in include $(LUFA_PATH)/Build/lufa_build.mk
include $(LUFA_PATH)/Build/lufa.cppcheck.in include $(LUFA_PATH)/Build/lufa_cppcheck.mk
include $(LUFA_PATH)/Build/lufa.doxygen.in include $(LUFA_PATH)/Build/lufa_doxygen.mk
include $(LUFA_PATH)/Build/lufa.dfu.in include $(LUFA_PATH)/Build/lufa_dfu.mk
include $(LUFA_PATH)/Build/lufa.hid.in include $(LUFA_PATH)/Build/lufa_hid.mk
include $(LUFA_PATH)/Build/lufa.avrdude.in include $(LUFA_PATH)/Build/lufa_avrdude.mk
include $(LUFA_PATH)/Build/lufa.atprogram.in include $(LUFA_PATH)/Build/lufa_atprogram.mk
...@@ -25,12 +25,12 @@ LD_FLAGS = ...@@ -25,12 +25,12 @@ LD_FLAGS =
all: all:
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.core.in include $(LUFA_PATH)/Build/lufa_core.mk
include $(LUFA_PATH)/Build/lufa.sources.in include $(LUFA_PATH)/Build/lufa_sources.mk
include $(LUFA_PATH)/Build/lufa.build.in include $(LUFA_PATH)/Build/lufa_build.mk
include $(LUFA_PATH)/Build/lufa.cppcheck.in include $(LUFA_PATH)/Build/lufa_cppcheck.mk
include $(LUFA_PATH)/Build/lufa.doxygen.in include $(LUFA_PATH)/Build/lufa_doxygen.mk
include $(LUFA_PATH)/Build/lufa.dfu.in include $(LUFA_PATH)/Build/lufa_dfu.mk
include $(LUFA_PATH)/Build/lufa.hid.in include $(LUFA_PATH)/Build/lufa_hid.mk
include $(LUFA_PATH)/Build/lufa.avrdude.in include $(LUFA_PATH)/Build/lufa_avrdude.mk
include $(LUFA_PATH)/Build/lufa.atprogram.in include $(LUFA_PATH)/Build/lufa_atprogram.mk
...@@ -25,12 +25,12 @@ LD_FLAGS = ...@@ -25,12 +25,12 @@ LD_FLAGS =
all: all:
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.core.in include $(LUFA_PATH)/Build/lufa_core.mk
include $(LUFA_PATH)/Build/lufa.sources.in include $(LUFA_PATH)/Build/lufa_sources.mk
include $(LUFA_PATH)/Build/lufa.build.in include $(LUFA_PATH)/Build/lufa_build.mk
include $(LUFA_PATH)/Build/lufa.cppcheck.in include $(LUFA_PATH)/Build/lufa_cppcheck.mk
include $(LUFA_PATH)/Build/lufa.doxygen.in include $(LUFA_PATH)/Build/lufa_doxygen.mk
include $(LUFA_PATH)/Build/lufa.dfu.in include $(LUFA_PATH)/Build/lufa_dfu.mk
include $(LUFA_PATH)/Build/lufa.hid.in include $(LUFA_PATH)/Build/lufa_hid.mk
include $(LUFA_PATH)/Build/lufa.avrdude.in include $(LUFA_PATH)/Build/lufa_avrdude.mk
include $(LUFA_PATH)/Build/lufa.atprogram.in include $(LUFA_PATH)/Build/lufa_atprogram.mk
...@@ -25,12 +25,12 @@ LD_FLAGS = ...@@ -25,12 +25,12 @@ LD_FLAGS =
all: all:
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.core.in include $(LUFA_PATH)/Build/lufa_core.mk
include $(LUFA_PATH)/Build/lufa.sources.in include $(LUFA_PATH)/Build/lufa_sources.mk
include $(LUFA_PATH)/Build/lufa.build.in include $(LUFA_PATH)/Build/lufa_build.mk
include $(LUFA_PATH)/Build/lufa.cppcheck.in include $(LUFA_PATH)/Build/lufa_cppcheck.mk
include $(LUFA_PATH)/Build/lufa.doxygen.in include $(LUFA_PATH)/Build/lufa_doxygen.mk
include $(LUFA_PATH)/Build/lufa.dfu.in include $(LUFA_PATH)/Build/lufa_dfu.mk
include $(LUFA_PATH)/Build/lufa.hid.in include $(LUFA_PATH)/Build/lufa_hid.mk
include $(LUFA_PATH)/Build/lufa.avrdude.in include $(LUFA_PATH)/Build/lufa_avrdude.mk
include $(LUFA_PATH)/Build/lufa.atprogram.in include $(LUFA_PATH)/Build/lufa_atprogram.mk
...@@ -25,12 +25,12 @@ LD_FLAGS = ...@@ -25,12 +25,12 @@ LD_FLAGS =
all: all:
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.core.in include $(LUFA_PATH)/Build/lufa_core.mk
include $(LUFA_PATH)/Build/lufa.sources.in include $(LUFA_PATH)/Build/lufa_sources.mk
include $(LUFA_PATH)/Build/lufa.build.in include $(LUFA_PATH)/Build/lufa_build.mk
include $(LUFA_PATH)/Build/lufa.cppcheck.in include $(LUFA_PATH)/Build/lufa_cppcheck.mk
include $(LUFA_PATH)/Build/lufa.doxygen.in include $(LUFA_PATH)/Build/lufa_doxygen.mk
include $(LUFA_PATH)/Build/lufa.dfu.in include $(LUFA_PATH)/Build/lufa_dfu.mk
include $(LUFA_PATH)/Build/lufa.hid.in include $(LUFA_PATH)/Build/lufa_hid.mk
include $(LUFA_PATH)/Build/lufa.avrdude.in include $(LUFA_PATH)/Build/lufa_avrdude.mk
include $(LUFA_PATH)/Build/lufa.atprogram.in include $(LUFA_PATH)/Build/lufa_atprogram.mk
...@@ -25,12 +25,12 @@ LD_FLAGS = ...@@ -25,12 +25,12 @@ LD_FLAGS =
all: all:
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.core.in include $(LUFA_PATH)/Build/lufa_core.mk
include $(LUFA_PATH)/Build/lufa.sources.in include $(LUFA_PATH)/Build/lufa_sources.mk
include $(LUFA_PATH)/Build/lufa.build.in include $(LUFA_PATH)/Build/lufa_build.mk
include $(LUFA_PATH)/Build/lufa.cppcheck.in include $(LUFA_PATH)/Build/lufa_cppcheck.mk
include $(LUFA_PATH)/Build/lufa.doxygen.in include $(LUFA_PATH)/Build/lufa_doxygen.mk
include $(LUFA_PATH)/Build/lufa.dfu.in include $(LUFA_PATH)/Build/lufa_dfu.mk
include $(LUFA_PATH)/Build/lufa.hid.in include $(LUFA_PATH)/Build/lufa_hid.mk
include $(LUFA_PATH)/Build/lufa.avrdude.in include $(LUFA_PATH)/Build/lufa_avrdude.mk
include $(LUFA_PATH)/Build/lufa.atprogram.in include $(LUFA_PATH)/Build/lufa_atprogram.mk
...@@ -25,12 +25,12 @@ LD_FLAGS = ...@@ -25,12 +25,12 @@ LD_FLAGS =
all: all:
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.core.in include $(LUFA_PATH)/Build/lufa_core.mk
include $(LUFA_PATH)/Build/lufa.sources.in include $(LUFA_PATH)/Build/lufa_sources.mk
include $(LUFA_PATH)/Build/lufa.build.in include $(LUFA_PATH)/Build/lufa_build.mk
include $(LUFA_PATH)/Build/lufa.cppcheck.in include $(LUFA_PATH)/Build/lufa_cppcheck.mk
include $(LUFA_PATH)/Build/lufa.doxygen.in include $(LUFA_PATH)/Build/lufa_doxygen.mk
include $(LUFA_PATH)/Build/lufa.dfu.in include $(LUFA_PATH)/Build/lufa_dfu.mk
include $(LUFA_PATH)/Build/lufa.hid.in include $(LUFA_PATH)/Build/lufa_hid.mk
include $(LUFA_PATH)/Build/lufa.avrdude.in include $(LUFA_PATH)/Build/lufa_avrdude.mk
include $(LUFA_PATH)/Build/lufa.atprogram.in include $(LUFA_PATH)/Build/lufa_atprogram.mk
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment