1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00

Fixed new changes to work with header files and multiple non-extension files in sketches.

This commit is contained in:
David A. Mellis
2007-01-12 20:28:32 +00:00
parent f29050aa25
commit accbc3b44f

View File

@ -242,13 +242,14 @@ public class Compiler implements MessageConsumer {
int sketchCount = 0; int sketchCount = 0;
for (int i = 0; i < sketch.codeCount; i++) { for (int i = 0; i < sketch.codeCount; i++) {
if (sketch.code[i].preprocName != null) { if (sketch.code[i].preprocName != null) {
sketchObjectNames[sketchCount++] = buildPath + File.separator + sketch.code[i].preprocName + ".o";
if (sketch.code[i].preprocName.endsWith(".c")) { if (sketch.code[i].preprocName.endsWith(".c")) {
sourceNames[fileCount] = buildPath + File.separator + sketch.code[i].preprocName; sourceNames[fileCount] = buildPath + File.separator + sketch.code[i].preprocName;
objectNames[fileCount++] = buildPath + File.separator + sketch.code[i].preprocName + ".o"; objectNames[fileCount++] = buildPath + File.separator + sketch.code[i].preprocName + ".o";
sketchObjectNames[sketchCount++] = buildPath + File.separator + sketch.code[i].preprocName + ".o";
} else if (sketch.code[i].preprocName.endsWith(".cpp")) { } else if (sketch.code[i].preprocName.endsWith(".cpp")) {
sourceNamesCPP[fileCountCPP] = buildPath + File.separator + sketch.code[i].preprocName; sourceNamesCPP[fileCountCPP] = buildPath + File.separator + sketch.code[i].preprocName;
objectNamesCPP[fileCountCPP++] = buildPath + File.separator + sketch.code[i].preprocName + ".o"; objectNamesCPP[fileCountCPP++] = buildPath + File.separator + sketch.code[i].preprocName + ".o";
sketchObjectNames[sketchCount++] = buildPath + File.separator + sketch.code[i].preprocName + ".o";
} }
} }
} }