aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Build/lufa_build.mk
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2016-04-03 14:51:48 +1000
committerDean Camera <dean@fourwalledcubicle.com>2016-04-03 15:24:34 +1000
commit0ecd09c3e1d1ed47c940541c41b79815b16bd627 (patch)
tree92981428a8988dac8b71d07fd02d2927ebdec607 /LUFA/Build/lufa_build.mk
parent51d3adfe1869e4a45c8368bb00a485be052eecdb (diff)
downloadlufa-0ecd09c3e1d1ed47c940541c41b79815b16bd627.tar.gz
lufa-0ecd09c3e1d1ed47c940541c41b79815b16bd627.tar.bz2
lufa-0ecd09c3e1d1ed47c940541c41b79815b16bd627.zip
Add LUFA DMBS extension modules, use DMBS in project makefiles.
Diffstat (limited to 'LUFA/Build/lufa_build.mk')
-rw-r--r--LUFA/Build/lufa_build.mk78
1 files changed, 3 insertions, 75 deletions
diff --git a/LUFA/Build/lufa_build.mk b/LUFA/Build/lufa_build.mk
index d20493ea2..f7c496e18 100644
--- a/LUFA/Build/lufa_build.mk
+++ b/LUFA/Build/lufa_build.mk
@@ -6,79 +6,7 @@
# www.lufa-lib.org
#
-DMBS_BUILD_MODULES +=
-DMBS_BUILD_TARGETS +=
-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)
-
-# Default values of optionally user-supplied variables
-BOARD ?= NONE
-
-# Determine the utility prefix to use for the selected architecture
-ifeq ($(ARCH), XMEGA)
- $(warning The XMEGA device support is currently EXPERIMENTAL (incomplete and/or non-functional), and is included for preview purposes only.)
-else ifeq ($(ARCH), UC3)
- $(warning The UC3 device support is currently EXPERIMENTAL (incomplete and/or non-functional), and is included for preview purposes only.)
-endif
-
-# Common LUFA C/C++ includes/definitions
-LUFA_CXX_INCLUDES = -I. -I$(patsubst %/,%,$(LUFA_PATH))/..
-LUFA_CXX_DEFINES = -DARCH=ARCH_$(ARCH) -DBOARD=BOARD_$(BOARD) -DF_USB=$(F_USB)UL
-
-# This flag is required for bootloaders as GCC will emit invalid jump table
-# assembly code for devices with large amounts of flash; the jump table target
-# is extracted from FLASH without using the correct ELPM instruction, resulting
-# in a pseudo-random jump target.
-LUFA_CXX_FLAGS = -fno-jump-tables
-
-# LUFA specific standard build options
-C_FLAGS += $(LUFA_CXX_INCLUDES) $(LUFA_CXX_DEFINES) $(LUFA_CXX_FLAGS)
-CPP_FLAGS += $(LUFA_CXX_INCLUDES) $(LUFA_CXX_DEFINES) $(LUFA_CXX_FLAGS)
-
-DMBS_PATH := $(LUFA_PATH)/Build/DMBS/DMBS
+DMBS_PATH ?= $(LUFA_PATH)/Build/DMBS/DMBS
+DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
include $(DMBS_PATH)/gcc.mk
+include $(DMBS_LUFA_PATH)/lufa-gcc.mk