1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-08-01 03:47:23 +03:00

More cleanup:

- fixing import library
- changing compilation to only look for source files in the root and utility/ folders of a library; also adding utility/ sub-folder to the include path
- removing export to application
- renaming run to verify / compile and export to upload
This commit is contained in:
David A. Mellis
2009-06-01 18:11:25 +00:00
parent df4f1629c4
commit 89139d1f77
5 changed files with 24 additions and 60 deletions

View File

@ -76,6 +76,7 @@ public class Compiler implements MessageConsumer {
// use lib directories as include paths
for (File file : sketch.getImportedLibraries()) {
includePaths.add(file.getPath());
includePaths.add(file.getPath() + File.separator + "utility");
}
List baseCommandLinker = new ArrayList(Arrays.asList(new String[] {
@ -111,8 +112,10 @@ public class Compiler implements MessageConsumer {
sourceFilesCPP.addAll(findFilesInPath(target.getPath(), "cpp", true));
for (File file : sketch.getImportedLibraries()) {
sourceFiles.addAll(findFilesInFolder(file, "c", true));
sourceFilesCPP.addAll(findFilesInFolder(file, "cpp", true));
sourceFiles.addAll(findFilesInFolder(file, "c", false));
sourceFiles.addAll(findFilesInFolder(new File(file, "utility"), "c", false));
sourceFilesCPP.addAll(findFilesInFolder(file, "cpp", false));
sourceFilesCPP.addAll(findFilesInFolder(new File(file, "utility"), "cpp", false));
}
firstErrorFound = false; // haven't found any errors yet
@ -485,6 +488,8 @@ public class Compiler implements MessageConsumer {
boolean recurse) {
ArrayList<File> files = new ArrayList<File>();
if (folder.listFiles() == null) return files;
for (File file : folder.listFiles()) {
if (file.getName().equals(".") || file.getName().equals("..")) continue;