aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Build
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2015-12-22 21:17:19 +1100
committerDean Camera <dean@fourwalledcubicle.com>2015-12-22 21:17:19 +1100
commitb590350df0cb857bca8efdbd1be9c8532008aa54 (patch)
tree92a3b984c46636013684aee0c250d20f79333690 /LUFA/Build
parent231658362eca0f882f1fc28642ffe160926461f1 (diff)
downloadlufa-b590350df0cb857bca8efdbd1be9c8532008aa54.tar.gz
lufa-b590350df0cb857bca8efdbd1be9c8532008aa54.tar.bz2
lufa-b590350df0cb857bca8efdbd1be9c8532008aa54.zip
Clean up core build system DMBS subclass module.
Diffstat (limited to 'LUFA/Build')
-rw-r--r--LUFA/Build/lufa_build.mk37
-rw-r--r--LUFA/Build/lufa_sources.mk2
2 files changed, 37 insertions, 2 deletions
diff --git a/LUFA/Build/lufa_build.mk b/LUFA/Build/lufa_build.mk
index 3c41da000..1aae2a388 100644
--- a/LUFA/Build/lufa_build.mk
+++ b/LUFA/Build/lufa_build.mk
@@ -8,16 +8,51 @@
DMBS_BUILD_MODULES +=
DMBS_BUILD_TARGETS +=
-DMBS_BUILD_MANDATORY_VARS += F_USB
+DMBS_BUILD_MANDATORY_VARS += LUFA_PATH ARCH F_USB
DMBS_BUILD_OPTIONAL_VARS += BOARD
DMBS_BUILD_PROVIDED_VARS +=
DMBS_BUILD_PROVIDED_MACROS +=
+# -----------------------------------------------------------------------------
+# LUFA Core Build Buildsystem Makefile Module.
+# -----------------------------------------------------------------------------
+# DESCRIPTION:
+# Subclass of the standard DMBS GCC build module, with LUFA specific
+# extensions. This module provides the core build rules for the compilation
+# of LUFA projects using GCC.
+# -----------------------------------------------------------------------------
+# TARGETS:
+#
+# (None)
+#
+# MANDATORY PARAMETERS:
+#
+# LUFA_PATH - Path to the LUFA library core
+# ARCH - Device architecture name
+# F_USB - Speed of the USB core clock, in Hz
+#
+# OPTIONAL PARAMETERS:
+#
+# BOARD - LUFA board drivers to use
+#
+# PROVIDED VARIABLES:
+#
+# (None)
+#
+# PROVIDED MACROS:
+#
+# (None)
+#
+# -----------------------------------------------------------------------------
+
+SHELL = /bin/sh
+
ERROR_IF_UNSET ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
ERROR_IF_EMPTY ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
# Sanity check user supplied values
+$(call ERROR_IF_EMPTY, LUFA_PATH)
$(call ERROR_IF_EMPTY, ARCH)
$(call ERROR_IF_EMPTY, F_USB)
diff --git a/LUFA/Build/lufa_sources.mk b/LUFA/Build/lufa_sources.mk
index ad1a47711..0764d30f1 100644
--- a/LUFA/Build/lufa_sources.mk
+++ b/LUFA/Build/lufa_sources.mk
@@ -15,7 +15,7 @@ DMBS_BUILD_PROVIDED_VARS += LUFA_SRC_USB_DEVICE LUFA_SRC_USB_HOST \
LUFA_SRC_USBCLASS_HOST LUFA_SRC_USBCLASS \
LUFA_SRC_TEMPERATURE LUFA_SRC_SERIAL \
LUFA_SRC_TWI LUFA_SRC_PLATFORM
-LUFA_BUILD_PROVIDED_MACROS +=
+DMBS_BUILD_PROVIDED_MACROS +=
# -----------------------------------------------------------------------------
# LUFA Sources Buildsystem Makefile Module.