public Target(String base, String target) throws IOException {
    path = base + File.separator + target;
    String[] files = (new File(path)).list();
    
    if (files == null)
      throw new IOException("Target platform: \"" + target + "\" not found.\n" +
                            "Make sure that \"build.target\" in the \n" +
                            "preferences file points to a subdirectory of \n" +
                            base);
    
    for (int i = 0; i < files.length; i++) {
      if (files[i].endsWith(".c") || files[i].endsWith(".cpp"))
        sources.add(files[i]);
      if (files[i].endsWith(".avr.o"))
        objects.add(files[i]);
    }
  }