aboutsummaryrefslogtreecommitdiff
path: root/arduino-mk
diff options
context:
space:
mode:
Diffstat (limited to 'arduino-mk')
-rw-r--r--arduino-mk/Arduino.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk
index f2dc959..70637ca 100644
--- a/arduino-mk/Arduino.mk
+++ b/arduino-mk/Arduino.mk
@@ -564,9 +564,11 @@ $(OBJDIR)/%.d: %.S
$(OBJDIR)/%.d: %.s
$(CC) -MM $(CPPFLAGS) $(ASFLAGS) $< -MF $@ -MT $(@:.d=.o)
+#backward compatibility for .pde files
+# We should check for Arduino version, if the file is .pde because a .pde file might be used in Arduino 1.0
# the pde -> cpp -> o file
$(OBJDIR)/%.cpp: %.pde
- $(ECHO) '#include "WProgram.h"' > $@
+ $(ECHO) '#if ARDUINO >= 100\n #include "Arduino.h"\n#else\n #include "WProgram.h"\n#endif' > $@
$(CAT) $< >> $@
# the ino -> cpp -> o file