Only add USB_PRODUCT and USB_MANUFACTURER to flags if defined

This commit is contained in:
John Whittington 2019-01-11 13:49:40 +00:00
parent 8a313c5d94
commit e3a99fdf4e

View file

@ -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