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
1 changed files with 2 additions and 1 deletions

View File

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