Class OpenWatcomLibrarian

  • All Implemented Interfaces:
    java.lang.Cloneable, Linker, Processor

    public final class OpenWatcomLibrarian
    extends CommandLineLinker
    Adapter for the OpenWatcom Librarian.
    Author:
    Curt Arnold
    • Method Detail

      • getInstance

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

        protected void addBase​(long base,
                               java.util.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​(java.lang.String entry,
                                java.util.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​(java.lang.Boolean fixed,
                                java.util.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,
                                      java.util.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,
                                      java.util.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,
                              java.util.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,
                                java.util.Vector args)
        Add stack size option.
        Specified by:
        addStack in class CommandLineLinker
        Parameters:
        stack - int stack size
        args - Vector command line arguments
      • getCommandFileSwitch

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

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

        public java.lang.String[] getLibraryPatterns​(java.lang.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
      • getOutputFileSwitch

        public java.lang.String[] getOutputFileSwitch​(java.lang.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,
                         java.io.File outputFile,
                         java.lang.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 java.lang.String[] prepareArguments​(CCTask task,
                                                      java.lang.String outputDir,
                                                      java.lang.String outputName,
                                                      java.lang.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