aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Build
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2015-12-22 22:14:09 +1100
committerDean Camera <dean@fourwalledcubicle.com>2015-12-22 22:14:09 +1100
commit2fcd50ada8e0916d1ed5addb2567b4bfcee8497c (patch)
tree12f7a42f5d481cee4a76e1bb4db70653f14cb89a /LUFA/Build
parent09b6c80555bc17b1206ee688ccdfc76454b2dbd7 (diff)
downloadlufa-2fcd50ada8e0916d1ed5addb2567b4bfcee8497c.tar.gz
lufa-2fcd50ada8e0916d1ed5addb2567b4bfcee8497c.tar.bz2
lufa-2fcd50ada8e0916d1ed5addb2567b4bfcee8497c.zip
Fix C++ builds, XPLAINBridge project.
Diffstat (limited to 'LUFA/Build')
-rw-r--r--LUFA/Build/lufa_build.mk12
1 files changed, 8 insertions, 4 deletions
diff --git a/LUFA/Build/lufa_build.mk b/LUFA/Build/lufa_build.mk
index 1aae2a388..d20493ea2 100644
--- a/LUFA/Build/lufa_build.mk
+++ b/LUFA/Build/lufa_build.mk
@@ -66,15 +66,19 @@ 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
-# LUFA specific standard build options
-C_FLAGS += -I. -I$(patsubst %/,%,$(LUFA_PATH))/..
-C_FLAGS += -DARCH=ARCH_$(ARCH) -DBOARD=BOARD_$(BOARD) -DF_USB=$(F_USB)UL
+# 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.
-C_FLAGS += -fno-jump-tables
+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
include $(DMBS_PATH)/gcc.mk