net.sf.antcontrib.cpptasks.openwatcom
Class OpenWatcomLibrarian

java.lang.Object
  extended by net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
      extended by net.sf.antcontrib.cpptasks.compiler.AbstractLinker
          extended by net.sf.antcontrib.cpptasks.compiler.CommandLineLinker
              extended by net.sf.antcontrib.cpptasks.openwatcom.OpenWatcomLibrarian
All Implemented Interfaces:
java.lang.Cloneable, Linker, Processor

public final class OpenWatcomLibrarian
extends CommandLineLinker

Adapter for the OpenWatcom Librarian.

Author:
Curt Arnold

Field Summary
 
Fields inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
DEFAULT_DISCARD_BID, DEFAULT_PROCESS_BID
 
Method Summary
protected  void addBase(long base, java.util.Vector args)
          Add base address.
protected  void addEntry(java.lang.String entry, java.util.Vector args)
          Add alternative entry point.
protected  void addFixed(java.lang.Boolean fixed, java.util.Vector args)
          Add fixed parameter.
protected  void addImpliedArgs(boolean debug, LinkType linkType, java.util.Vector args)
          Add implied arguments.
protected  void addIncremental(boolean incremental, java.util.Vector args)
          Add incremental option.
protected  void addMap(boolean map, java.util.Vector args)
          Add map option.
protected  void addStack(int stack, java.util.Vector args)
          Add stack size option.
protected  java.lang.String getCommandFileSwitch(java.lang.String cmdFile)
          Get command file switch.
static OpenWatcomLibrarian getInstance()
          Singleton accessor.
 java.io.File[] getLibraryPath()
          Get library search path.
 java.lang.String[] getLibraryPatterns(java.lang.String[] libnames, LibraryTypeEnum libType)
          Get file selectors for specified library names.
 Linker getLinker(LinkType type)
          Get linker.
 int getMaximumCommandLength()
          Gets maximum command line.
 java.lang.String[] getOutputFileSwitch(java.lang.String outFile)
          Create output file switch.
 boolean isCaseSensitive()
          Gets case-sensisitivity of processor.
 void link(CCTask task, java.io.File outputFile, java.lang.String[] sourceFiles, CommandLineLinkerConfiguration config)
          Builds a library.
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.
 
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.CommandLineLinker
addLibrarySets, createConfiguration, decorateLinkerOption, getCommand, getIdentifier, getLibtoolLinker, getOutputFileNames, getOutputFileSwitch, getStartupObject, prepareFilename, prepareResponseFile, quoteFilename, runCommand, setCommand
 
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractLinker
addVersionFiles, bid, changeEnvironment, createConfiguration, getLibraryKey
 
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
clone, getHeaderExtensions, getIdentifier, getOSArch, getOSName, getSourceExtensions, isDarwin, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

getMaximumCommandLength

public int getMaximumCommandLength()
Gets maximum command line.

Specified by:
getMaximumCommandLength in class CommandLineLinker
Returns:
int maximum command line

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


Copyright © 2001-2008 Ant-Contrib Project. All Rights Reserved.