File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1059,7 +1059,7 @@ else
10591059endif
10601060
10611061# Using += instead of =, so that CPPFLAGS can be set per sketch level
1062- CPPFLAGS += -$(MCU_FLAG_NAME ) =$(MCU ) -DF_CPU=$(F_CPU ) -DARDUINO=$(ARDUINO_VERSION ) $(ARDUINO_ARCH_FLAG ) \
1062+ override CPPFLAGS += -$(MCU_FLAG_NAME ) =$(MCU ) -DF_CPU=$(F_CPU ) -DARDUINO=$(ARDUINO_VERSION ) $(ARDUINO_ARCH_FLAG ) \
10631063 -I$(ARDUINO_CORE_PATH ) -I$(ARDUINO_VAR_PATH ) /$(VARIANT ) \
10641064 $(SYS_INCLUDES ) $(PLATFORM_INCLUDES ) $(USER_INCLUDES ) -Wall -ffunction-sections \
10651065 -fdata-sections
@@ -1068,19 +1068,23 @@ CPPFLAGS += -$(MCU_FLAG_NAME)=$(MCU) -DF_CPU=$(F_CPU) -DARDUINO=$(ARDUINO_V
10681068# By placing it before the user-provided CPPFLAGS rather than after, we allow the
10691069# the user to disable it if they like, by adding the negation of the flag
10701070# (-U__PROG_TYPES_COMPAT__) to the user-provided CPPFLAGS.
1071- CPPFLAGS := -D__PROG_TYPES_COMPAT__ $(CPPFLAGS )
1071+ override CPPFLAGS := -D__PROG_TYPES_COMPAT__ $(CPPFLAGS )
10721072
10731073ifdef DEBUG
10741074OPTIMIZATION_FLAGS = $(DEBUG_FLAGS )
10751075else
10761076OPTIMIZATION_FLAGS = -O$(OPTIMIZATION_LEVEL )
10771077endif
10781078
1079- CPPFLAGS += $(OPTIMIZATION_FLAGS )
1079+ override CPPFLAGS += $(OPTIMIZATION_FLAGS )
10801080
10811081# USB IDs for the Caterina devices like leonardo or micro
10821082ifneq ($(CATERINA ) ,)
1083- CPPFLAGS += -DUSB_VID=$(USB_VID ) -DUSB_PID=$(USB_PID )
1083+ override CPPFLAGS += -DUSB_VID=$(USB_VID ) -DUSB_PID=$(USB_PID )
1084+ endif
1085+
1086+ ifdef CUSTOM_DEFINES
1087+ override CPPFLAGS += $(CUSTOM_DEFINES )
10841088endif
10851089
10861090# avr-gcc version that we can do maths on
You can’t perform that action at this time.
0 commit comments