aboutsummaryrefslogtreecommitdiff
path: root/LUFA/Build
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2012-06-02 21:45:51 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2012-06-02 21:45:51 +0000
commita741b8aeadc8313483f03a2f149029607e08a984 (patch)
treec73db6ff85714280a38f853813fee6a89fe0a049 /LUFA/Build
parent44f1979025ee8542d54a562485cb6a41f49ba695 (diff)
Clean up CORE build system module, use simple rather than recursive make variables for internal constants and $(shell) derived values.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@2289 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'LUFA/Build')
-rw-r--r--LUFA/Build/lufa.avrdude.in2
-rw-r--r--LUFA/Build/lufa.build.in26
-rw-r--r--LUFA/Build/lufa.core.in38
-rw-r--r--LUFA/Build/lufa.dfu.in6
-rw-r--r--LUFA/Build/lufa.doxygen.in2
5 files changed, 38 insertions, 36 deletions
diff --git a/LUFA/Build/lufa.avrdude.in b/LUFA/Build/lufa.avrdude.in
index dcffe84f..01485045 100644
--- a/LUFA/Build/lufa.avrdude.in
+++ b/LUFA/Build/lufa.avrdude.in
@@ -48,7 +48,7 @@ AVRDUDE_PORT ?= usb
AVRDUDE_FLAGS ?=
# Output Messages
-MSG_AVRDUDE_CMD = ' [AVRDUDE] :'
+MSG_AVRDUDE_CMD := ' [AVRDUDE] :'
AVRDUDE_FLASH_FLAGS = -U flash:w:$< $(AVRDUDE_FLAGS)
AVRDUDE_EEP_FLAGS = -U eeprom:w:$< $(AVRDUDE_FLAGS)
diff --git a/LUFA/Build/lufa.build.in b/LUFA/Build/lufa.build.in
index a4b5c363..3b28db9e 100644
--- a/LUFA/Build/lufa.build.in
+++ b/LUFA/Build/lufa.build.in
@@ -76,24 +76,24 @@ CC_FLAGS ?=
# Determine the utility prefix to use for the selected architecture
ifeq ($(ARCH), AVR8)
- CROSS = avr-
+ CROSS := avr-
else ifeq ($(ARCH), XMEGA)
- CROSS = avr-
+ CROSS := avr-
else ifeq ($(ARCH), UC3)
- CROSS = avr32-
+ CROSS := avr32-
else
$(error Unsupported architecture.)
endif
# 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_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
C_SOURCE = $(filter %.c, $(SRC))
@@ -138,8 +138,8 @@ ifneq ($(UNKNOWN_SOURCE),)
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 )
+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:
diff --git a/LUFA/Build/lufa.core.in b/LUFA/Build/lufa.core.in
index bc07a940..f403b9ed 100644
--- a/LUFA/Build/lufa.core.in
+++ b/LUFA/Build/lufa.core.in
@@ -7,7 +7,7 @@
#
LUFA_BUILD_MODULES += CORE
-LUFA_BUILD_TARGETS += info help list_targets list_modules list_mandatory list_optional
+LUFA_BUILD_TARGETS += help list_targets list_modules list_mandatory list_optional
LUFA_BUILD_MANDATORY_VARS +=
LUFA_BUILD_OPTIONAL_VARS +=
@@ -19,7 +19,6 @@ LUFA_BUILD_OPTIONAL_VARS +=
# -----------------------------------------------------------------------------
# TARGETS:
#
-# info - Build system information
# help - Build system help
# list_targets - List all build targets
# list_modules - List all build modules
@@ -38,14 +37,17 @@ LUFA_BUILD_OPTIONAL_VARS +=
#
# -----------------------------------------------------------------------------
-info:
+# 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 { dean @ fourwalledcubicle . com } "
+ @echo " LUFA Build System 2.0 "
+ @echo " (C) Dean Camera, 2012 { dean @ fourwalledcubicle . com } "
@echo "==================================================================="
-
-.PHONY: info
-help: info
@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. "
@@ -61,35 +63,35 @@ help: info
@echo "==================================================================="
@echo " Currently used modules in this application: "
@echo " "
- @echo " [" $(sort $(LUFA_BUILD_MODULES)) "]"
+ @echo " [" $(SORTED_LUFA_BUILD_MODULES) "]"
@echo " "
@echo " "
@echo " Currently available build targets in this application: "
@echo " "
- @echo " [" $(sort $(LUFA_BUILD_TARGETS)) "]"
+ @echo " [" $(SORTED_LUFA_BUILD_TARGETS) "]"
@echo " "
@echo " "
@echo " Mandatory variables required by the selected build Modules: "
@echo " "
- @echo " [" $(sort $(LUFA_BUILD_MANDATORY_VARS)) "]"
+ @echo " [" $(SORTED_LUFA_MANDATORY_VARS) "]"
@echo " "
@echo " "
@echo " Optional variables required by the selected build Modules: "
@echo " "
- @echo " [" $(filter-out $(LUFA_BUILD_MANDATORY_VARS), $(sort $(LUFA_BUILD_OPTIONAL_VARS))) "]"
+ @echo " [" $(SORTED_LUFA_OPTIONAL_VARS) "]"
@echo " "
@echo "==================================================================="
@echo " The LUFA BuildSystem 2.0 - Powered By Unicorns (tm) "
@echo "==================================================================="
-list_targets:
- @echo Currently Available Build Targets: $(sort $(LUFA_BUILD_TARGETS))
-
list_modules:
- @echo Currently Build Modules: $(sort $(LUFA_BUILD_MODULES))
+ @echo Currently Build Modules: $(SORTED_LUFA_BUILD_MODULES)
+
+list_targets:
+ @echo Currently Available Build Targets: $(SORTED_LUFA_BUILD_TARGETS)
list_mandatory:
- @echo Mandatory Variables for Included Modules: $(sort $(LUFA_BUILD_MANDATORY_VARS))
+ @echo Mandatory Variables for Included Modules: $(SORTED_LUFA_MANDATORY_VARS)
list_optional:
- @echo Optional Variables for Included Modules: $(filter-out $(LUFA_BUILD_MANDATORY_VARS), $(sort $(LUFA_BUILD_OPTIONAL_VARS)))
+ @echo Optional Variables for Included Modules: $(SORTED_LUFA_OPTIONAL_VARS)
diff --git a/LUFA/Build/lufa.dfu.in b/LUFA/Build/lufa.dfu.in
index c3a102be..f855bf7b 100644
--- a/LUFA/Build/lufa.dfu.in
+++ b/LUFA/Build/lufa.dfu.in
@@ -41,9 +41,9 @@ MCU ?= $(error Makefile MCU value not set.)
TARGET ?= $(error Makefile TARGET value not set.)
# Output Messages
-MSG_COPY_CMD = ' [CP] :'
-MSG_REMOVE_CMD = ' [RM] :'
-MSG_DFU_CMD = ' [DFU] :'
+MSG_COPY_CMD := ' [CP] :'
+MSG_REMOVE_CMD := ' [RM] :'
+MSG_DFU_CMD := ' [DFU] :'
flip: $(TARGET).hex
@echo $(MSG_DFU_CMD) Programming FLASH with batchisp using \"$(TARGET).hex\"
diff --git a/LUFA/Build/lufa.doxygen.in b/LUFA/Build/lufa.doxygen.in
index f1b9a9d6..7d4f8ae3 100644
--- a/LUFA/Build/lufa.doxygen.in
+++ b/LUFA/Build/lufa.doxygen.in
@@ -44,7 +44,7 @@ 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] :'
+MSG_DOXYGEN_CMD := ' [DOXYGEN] :'
# Determine Doxygen invocation command
BASE_DOXYGEN_CMD = ( cat Doxygen.conf $(DOXYGEN_OVERRIDE_PARAMS:%=; echo "%") ) | doxygen -