|
|
|
@ -56,43 +56,31 @@ LUFA_BUILD_OPTIONAL_VARS += BOARD OPTIMIZATION C_STANDARD CPP_STANDARD F_CPU C_
|
|
|
|
|
# Output Messages
|
|
|
|
|
MSG_BUILD_BEGIN = Begin compilation of project \"$(TARGET)\"...
|
|
|
|
|
MSG_BUILD_END = Finished building project \"$(TARGET)\"...
|
|
|
|
|
MSG_COMPILE_CMD = ' [CC] :'
|
|
|
|
|
MSG_REMOVE_CMD = ' [RM] :'
|
|
|
|
|
MSG_LINKER_CMD = ' [LNK] :'
|
|
|
|
|
MSG_SIZE_CMD = ' [SIZE] :'
|
|
|
|
|
MSG_OBJCPY_CMD = ' [OBJCPY] :'
|
|
|
|
|
MSG_OBJDMP_CMD = ' [OBJDMP] :'
|
|
|
|
|
MSG_COMPILE_CMD = ' [CC] :'
|
|
|
|
|
MSG_REMOVE_CMD = ' [RM] :'
|
|
|
|
|
MSG_LINKER_CMD = ' [LNK] :'
|
|
|
|
|
MSG_SIZE_CMD = ' [SIZE] :'
|
|
|
|
|
MSG_OBJCPY_CMD = ' [OBJCPY] :'
|
|
|
|
|
MSG_OBJDMP_CMD = ' [OBJDMP] :'
|
|
|
|
|
|
|
|
|
|
# Sanity check the user MCU, TARGET, ARCH, SRC, F_USB and LUFA_PATH makefile options
|
|
|
|
|
ifeq ($(TARGET),)
|
|
|
|
|
$(error Makefile TARGET value not set.)
|
|
|
|
|
endif
|
|
|
|
|
ifeq ($(ARCH),)
|
|
|
|
|
$(error Makefile ARCH value not set.)
|
|
|
|
|
endif
|
|
|
|
|
ifeq ($(MCU),)
|
|
|
|
|
$(error Makefile MCU value not set.)
|
|
|
|
|
endif
|
|
|
|
|
ifeq ($(SRC),)
|
|
|
|
|
$(error Makefile SRC value not set.)
|
|
|
|
|
endif
|
|
|
|
|
ifeq ($(F_USB),)
|
|
|
|
|
$(error Makefile F_USB value not set.)
|
|
|
|
|
endif
|
|
|
|
|
ifeq ($(LUFA_PATH),)
|
|
|
|
|
$(error Makefile LUFA_PATH value not set.)
|
|
|
|
|
endif
|
|
|
|
|
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.)
|
|
|
|
|
|
|
|
|
|
# Default values of user-supplied variables
|
|
|
|
|
BOARD ?= NONE
|
|
|
|
|
OPTIMIZATION ?= s
|
|
|
|
|
F_CPU ?=
|
|
|
|
|
C_STANDARD ?= gnu99
|
|
|
|
|
CPP_STANDARD ?= gnu++98
|
|
|
|
|
C_FLAGS ?=
|
|
|
|
|
CPP_FLAGS ?=
|
|
|
|
|
ASM_FLAGS ?=
|
|
|
|
|
CC_FLAGS ?=
|
|
|
|
|
BOARD ?= NONE
|
|
|
|
|
OPTIMIZATION ?= s
|
|
|
|
|
F_CPU ?=
|
|
|
|
|
C_STANDARD ?= gnu99
|
|
|
|
|
CPP_STANDARD ?= gnu++98
|
|
|
|
|
C_FLAGS ?=
|
|
|
|
|
CPP_FLAGS ?=
|
|
|
|
|
ASM_FLAGS ?=
|
|
|
|
|
CC_FLAGS ?=
|
|
|
|
|
|
|
|
|
|
# Convert input source file list to differentiate them by type
|
|
|
|
|
C_SOURCE = $(filter %.c, $(SRC))
|
|
|
|
|