@@ -703,11 +703,11 @@ ifeq ($(strip $(NO_CORE)),)
703703endif
704704
705705# #######################################################################
706- # Include file to use for old .pde files
706+ # Include Arduino Header file
707707
708708ifndef ARDUINO_HEADER
709- # We should check for Arduino version, if the file is .pde because a
710- # .pde file might be used in Arduino 1.0
709+ # We should check for Arduino version, not just the file extension
710+ # because, a .pde file can be used in Arduino 1.0 as well
711711 ifeq ($(shell expr $(ARDUINO_VERSION) '<' 100), 1)
712712 ARDUINO_HEADER =WProgram.h
713713 else
@@ -931,7 +931,7 @@ $(OBJDIR)/%.o: %.pde $(COMMON_DEPS) | $(OBJDIR)
931931# the ino -> o file
932932$(OBJDIR ) /% .o : % .ino $(COMMON_DEPS ) | $(OBJDIR )
933933 @$(MKDIR ) $(dir $@ )
934- $(CXX ) -x c++ -include Arduino.h -MMD -c $(CPPFLAGS ) $(CXXFLAGS ) $< -o $@
934+ $(CXX ) -x c++ -include $( ARDUINO_HEADER ) -MMD -c $(CPPFLAGS ) $(CXXFLAGS ) $< -o $@
935935
936936# generated assembly
937937$(OBJDIR ) /% .s : % .pde $(COMMON_DEPS ) | $(OBJDIR )
@@ -940,7 +940,7 @@ $(OBJDIR)/%.s: %.pde $(COMMON_DEPS) | $(OBJDIR)
940940
941941$(OBJDIR ) /% .s : % .ino $(COMMON_DEPS ) | $(OBJDIR )
942942 @$(MKDIR ) $(dir $@ )
943- $(CXX ) -x c++ -include Arduino.h -MMD -S -fverbose-asm $(CPPFLAGS ) $(CXXFLAGS ) $< -o $@
943+ $(CXX ) -x c++ -include $( ARDUINO_HEADER ) -MMD -S -fverbose-asm $(CPPFLAGS ) $(CXXFLAGS ) $< -o $@
944944
945945# $(OBJDIR)/%.lst: $(OBJDIR)/%.s
946946# $(AS) -$(MCU_FLAG_NAME)=$(MCU) -alhnd $< > $@
0 commit comments