code: private void writeLdArgs(final PropertyWriter writer, final String linkID, final String[] preArgs)
        throws SAXException {
      int objnameIndex = 1;
      int libnameIndex = 1;
      int libpathIndex = 1;
      for (final String preArg : preArgs) {
        if (preArg.startsWith("-o")) {
          writer.write(linkID, "option.o.arg." + objnameIndex++, preArg.substring(2));
        } else if (preArg.startsWith("-l")) {
          writer.write(linkID, "option.l.arg." + libnameIndex++, preArg.substring(2));
        } else if (preArg.startsWith("-L")) {
          writer.write(linkID, "option.L.arg." + libpathIndex++, preArg.substring(2));
        } else {
          //
          // any others
          //
          writer.write(linkID, "option." + preArg.substring(1) + ".enabled", "1");
        }
      }
      if (objnameIndex > 1) {
        writer.write(linkID, "option.o.enabled", "1");
      }
      if (libnameIndex > 1) {
        writer.write(linkID, "option.l.enabled", "1");
      }
      if (libpathIndex > 1) {
        writer.write(linkID, "option.L.enabled", "1");
      }
    }
docs: Writes ld linker options to project file.
  
  @param writer
  PropertyWriter property writer
  @param linkID
  String linker identifier
  @param preArgs
  String[] linker arguments
  @throws SAXException
  thrown if unable to write option