Class OpenWatcomLibrarian

All Implemented Interfaces:
Cloneable, Linker, Processor

public final class OpenWatcomLibrarian extends CommandLineLinker
Adapter for the OpenWatcom Librarian.
  • Field Details

  • Constructor Details

    • OpenWatcomLibrarian

      private OpenWatcomLibrarian()
      Constructor.
  • Method Details

    • getInstance

      public static OpenWatcomLibrarian getInstance()
      Singleton accessor.
      Returns:
      OpenWatcomLibrarian librarian instance
    • addBase

      protected void addBase(long base, Vector args)
      Add base address.
      Specified by:
      addBase in class CommandLineLinker
      Parameters:
      base - long base address
      args - Vector command line arguments
    • addEntry

      protected void addEntry(String entry, Vector args)
      Add alternative entry point.
      Specified by:
      addEntry in class CommandLineLinker
      Parameters:
      entry - String entry point
      args - Vector command line arguments
    • addFixed

      protected void addFixed(Boolean fixed, Vector args)
      Add fixed parameter.
      Specified by:
      addFixed in class CommandLineLinker
      Parameters:
      fixed - Boolean true if fixed
      args - Vector command line arguments
    • addImpliedArgs

      protected void addImpliedArgs(boolean debug, LinkType linkType, Vector args)
      Add implied arguments.
      Specified by:
      addImpliedArgs in class CommandLineLinker
      Parameters:
      debug - boolean true if debugging
      linkType - LinkType link type
      args - Vector command line arguments
    • addIncremental

      protected void addIncremental(boolean incremental, Vector args)
      Add incremental option.
      Specified by:
      addIncremental in class CommandLineLinker
      Parameters:
      incremental - boolean true if incremental
      args - Vector command line arguments
    • addMap

      protected void addMap(boolean map, Vector args)
      Add map option.
      Specified by:
      addMap in class CommandLineLinker
      Parameters:
      map - boolean true to create map file
      args - Vector command line argument
    • addStack

      protected void addStack(int stack, Vector args)
      Add stack size option.
      Specified by:
      addStack in class CommandLineLinker
      Parameters:
      stack - int stack size
      args - Vector command line arguments
    • getCommandFileSwitch

      protected String getCommandFileSwitch(String cmdFile)
      Get command file switch.
      Specified by:
      getCommandFileSwitch in class CommandLineLinker
      Parameters:
      cmdFile - String command file
      Returns:
      String command file switch
    • getLibraryPath

      public File[] getLibraryPath()
      Get library search path.
      Returns:
      File[] library search path
    • getLibraryPatterns

      public String[] getLibraryPatterns(String[] libnames, LibraryTypeEnum libType)
      Get file selectors for specified library names.
      Parameters:
      libnames - String[] library names
      libType - LibraryTypeEnum library type enum
      Returns:
      String[] file selection patterns
    • getLinker

      public Linker getLinker(LinkType type)
      Get linker.
      Parameters:
      type - LinkType link type
      Returns:
      Linker linker
    • getMaximumCommandLength

      public int getMaximumCommandLength()
      Gets maximum command line.
      Specified by:
      getMaximumCommandLength in class CommandLineLinker
      Returns:
      int maximum command line
    • getOutputFileSwitch

      public String[] getOutputFileSwitch(String outFile)
      Create output file switch.
      Specified by:
      getOutputFileSwitch in class CommandLineLinker
      Parameters:
      outFile - String output file switch
      Returns:
      String[] output file switch
    • isCaseSensitive

      public boolean isCaseSensitive()
      Gets case-sensisitivity of processor.
      Returns:
      boolean true if case sensitive
    • link

      public void link(CCTask task, File outputFile, String[] sourceFiles, CommandLineLinkerConfiguration config)
      Builds a library.
      Overrides:
      link in class CommandLineLinker
      Parameters:
      task - task
      outputFile - generated library
      sourceFiles - object files
      config - linker configuration
    • prepareArguments

      protected String[] prepareArguments(CCTask task, String outputDir, String outputName, String[] sourceFiles, CommandLineLinkerConfiguration config)
      Prepares argument list for exec command.
      Overrides:
      prepareArguments in class CommandLineLinker
      Parameters:
      task - task
      outputDir - output directory
      outputName - output file name
      sourceFiles - object files
      config - linker configuration
      Returns:
      arguments for runTask