Clean up ordering of build system module sanity checks.

pull/1469/head
Dean Camera 13 years ago
parent 29874f6db7
commit fc3768733e

@ -35,17 +35,17 @@ LUFA_BUILD_OPTIONAL_VARS += AVRDUDE_PROGRAMMER AVRDUDE_PORT AVRDUDE_FLAGS
# #
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Output Messages # Sanity-check values of mandatory user-supplied variables
MSG_AVRDUDE_CMD = ' [AVRDUDE] :' MCU ?= $(error Makefile MCU value not set.)
TARGET ?= $(error Makefile TARGET value not set.)
# Default values of user-supplied variables # Default values of optionally user-supplied variables
AVRDUDE_PROGRAMMER ?= jtagicemkii AVRDUDE_PROGRAMMER ?= jtagicemkii
AVRDUDE_PORT ?= usb AVRDUDE_PORT ?= usb
AVRDUDE_FLAGS ?= -U flash:w:$(TARGET).hex AVRDUDE_FLAGS ?= -U flash:w:$(TARGET).hex
# Sanity check the user MCU and TARGET makefile options # Output Messages
MCU ?= $(error Makefile MCU value not set.) MSG_AVRDUDE_CMD = ' [AVRDUDE] :'
TARGET ?= $(error Makefile TARGET value not set.)
program: $(TARGET).hex program: $(TARGET).hex
@echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" with settings \"$(AVRDUDE_FLAGS)\" using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\" @echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" with settings \"$(AVRDUDE_FLAGS)\" using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\"

@ -53,17 +53,7 @@ LUFA_BUILD_OPTIONAL_VARS += BOARD OPTIMIZATION C_STANDARD CPP_STANDARD F_CPU C_
# #
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Output Messages # Sanity-check values of mandatory user-supplied variables
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] :'
# Sanity check the user MCU, TARGET, ARCH, SRC, F_USB and LUFA_PATH makefile options
MCU ?= $(error Makefile MCU value not set.) MCU ?= $(error Makefile MCU value not set.)
TARGET ?= $(error Makefile TARGET value not set.) TARGET ?= $(error Makefile TARGET value not set.)
ARCH ?= $(error Makefile ARCH value not set.) ARCH ?= $(error Makefile ARCH value not set.)
@ -71,7 +61,7 @@ SRC ?= $(error Makefile SRC value not set.)
F_USB ?= $(error Makefile F_USB value not set.) F_USB ?= $(error Makefile F_USB value not set.)
LUFA_PATH ?= $(error Makefile LUFA_PATH value not set.) LUFA_PATH ?= $(error Makefile LUFA_PATH value not set.)
# Default values of user-supplied variables # Default values of optionally user-supplied variables
BOARD ?= NONE BOARD ?= NONE
OPTIMIZATION ?= s OPTIMIZATION ?= s
F_CPU ?= F_CPU ?=
@ -82,6 +72,16 @@ CPP_FLAGS ?=
ASM_FLAGS ?= ASM_FLAGS ?=
CC_FLAGS ?= CC_FLAGS ?=
# 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] :'
# Convert input source file list to differentiate them by type # Convert input source file list to differentiate them by type
C_SOURCE = $(filter %.c, $(SRC)) C_SOURCE = $(filter %.c, $(SRC))
CPP_SOURCE = $(filter %.cpp, $(SRC)) CPP_SOURCE = $(filter %.cpp, $(SRC))

@ -36,15 +36,15 @@ LUFA_BUILD_OPTIONAL_VARS +=
# #
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Sanity-check values of mandatory user-supplied variables
MCU ?= $(error Makefile MCU value not set.)
TARGET ?= $(error Makefile TARGET value not set.)
# Output Messages # Output Messages
MSG_COPY_CMD = ' [CP] :' MSG_COPY_CMD = ' [CP] :'
MSG_REMOVE_CMD = ' [RM] :' MSG_REMOVE_CMD = ' [RM] :'
MSG_DFU_CMD = ' [DFU] :' MSG_DFU_CMD = ' [DFU] :'
# Sanity check the user MCU and TARGET makefile options
MCU ?= $(error Makefile MCU value not set.)
TARGET ?= $(error Makefile TARGET value not set.)
flip: $(TARGET).hex flip: $(TARGET).hex
@echo $(MSG_DFU_CMD) Programming FLASH with batchisp using \"$(TARGET).hex\" @echo $(MSG_DFU_CMD) Programming FLASH with batchisp using \"$(TARGET).hex\"
batchisp -hardware usb -device $(MCU) -operation erase f batchisp -hardware usb -device $(MCU) -operation erase f

@ -35,14 +35,14 @@ LUFA_BUILD_OPTIONAL_VARS += DOXYGEN_CONF DOXYGEN_FAIL_ON_WARNING DOXYGEN_OVERRI
# configuration file # configuration file
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Output Messages # Default values of optionally user-supplied variables
MSG_DOXYGEN_CMD = ' [DOXYGEN] :'
# Default values of user-supplied variables
DOXYGEN_CONF ?= Doxygen.conf DOXYGEN_CONF ?= Doxygen.conf
DOXYGEN_FAIL_ON_WARNING ?= Y DOXYGEN_FAIL_ON_WARNING ?= Y
DOXYGEN_OVERRIDE_PARAMS ?= QUIET=YES DOXYGEN_OVERRIDE_PARAMS ?= QUIET=YES
# Output Messages
MSG_DOXYGEN_CMD = ' [DOXYGEN] :'
# Determine Doxygen invocation command # Determine Doxygen invocation command
DOXYGEN_CMD = ( cat Doxygen.conf ; $(DOXYGEN_OVERRIDE_PARAMS:%=echo "%";)) | doxygen - DOXYGEN_CMD = ( cat Doxygen.conf ; $(DOXYGEN_OVERRIDE_PARAMS:%=echo "%";)) | doxygen -
ifeq ($(DOXYGEN_FAIL_ON_WARNING), Y) ifeq ($(DOXYGEN_FAIL_ON_WARNING), Y)

@ -35,7 +35,7 @@ LUFA_BUILD_OPTIONAL_VARS +=
# #
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Sanity check the user LUFA_PATH and ARCH makefile options # Sanity-check values of mandatory user-supplied variables
ARCH ?= $(error Makefile ARCH value not set.) ARCH ?= $(error Makefile ARCH value not set.)
LUFA_PATH ?= $(error Makefile LUFA_PATH value not set.) LUFA_PATH ?= $(error Makefile LUFA_PATH value not set.)

Loading…
Cancel
Save