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
1059
1059
endif
1060
1060
1061
1061
# 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 ) \
1063
1063
-I$(ARDUINO_CORE_PATH ) -I$(ARDUINO_VAR_PATH ) /$(VARIANT ) \
1064
1064
$(SYS_INCLUDES ) $(PLATFORM_INCLUDES ) $(USER_INCLUDES ) -Wall -ffunction-sections \
1065
1065
-fdata-sections
@@ -1068,19 +1068,23 @@ CPPFLAGS += -$(MCU_FLAG_NAME)=$(MCU) -DF_CPU=$(F_CPU) -DARDUINO=$(ARDUINO_V
1068
1068
# By placing it before the user-provided CPPFLAGS rather than after, we allow the
1069
1069
# the user to disable it if they like, by adding the negation of the flag
1070
1070
# (-U__PROG_TYPES_COMPAT__) to the user-provided CPPFLAGS.
1071
- CPPFLAGS := -D__PROG_TYPES_COMPAT__ $(CPPFLAGS )
1071
+ override CPPFLAGS := -D__PROG_TYPES_COMPAT__ $(CPPFLAGS )
1072
1072
1073
1073
ifdef DEBUG
1074
1074
OPTIMIZATION_FLAGS = $(DEBUG_FLAGS )
1075
1075
else
1076
1076
OPTIMIZATION_FLAGS = -O$(OPTIMIZATION_LEVEL )
1077
1077
endif
1078
1078
1079
- CPPFLAGS += $(OPTIMIZATION_FLAGS )
1079
+ override CPPFLAGS += $(OPTIMIZATION_FLAGS )
1080
1080
1081
1081
# USB IDs for the Caterina devices like leonardo or micro
1082
1082
ifneq ($(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 )
1084
1088
endif
1085
1089
1086
1090
# avr-gcc version that we can do maths on
You can’t perform that action at this time.
0 commit comments