From e3a99fdf4e1484f47f7cb3d9cc0da835804ecf90 Mon Sep 17 00:00:00 2001 From: John Whittington Date: Fri, 11 Jan 2019 13:49:40 +0000 Subject: [PATCH] Only add USB_PRODUCT and USB_MANUFACTURER to flags if defined --- Arduino.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Arduino.mk b/Arduino.mk index 9cfbe75..808c6a9 100644 --- a/Arduino.mk +++ b/Arduino.mk @@ -1176,7 +1176,10 @@ CPPFLAGS += $(OPTIMIZATION_FLAGS) # USB IDs for the Caterina devices like leonardo or micro ifneq ($(CATERINA),) - CPPFLAGS += -DUSB_VID=$(USB_VID) -DUSB_PID=$(USB_PID) '-DUSB_PRODUCT=$(USB_PRODUCT)' '-DUSB_MANUFACTURER=$(USB_MANUFACTURER)' + CPPFLAGS += -DUSB_VID=$(USB_VID) -DUSB_PID=$(USB_PID) + ifdef USB_PRODUCT + CPPFLAGS += -DUSB_PRODUCT='$(USB_PRODUCT)' -DUSB_MANUFACTURER='$(USB_MANUFACTURER)' + endif endif # $(TOOL_PREFIX)-gcc version that we can do maths on