net.sf.antcontrib.cpptasks.openwatcom

Class OpenWatcomLinker

Implemented Interfaces:
Cloneable, Linker, Processor
Known Direct Subclasses:
OpenWatcomCLinker, OpenWatcomFortranLinker

public abstract class OpenWatcomLinker
extends CommandLineLinker

Adapter for the OpenWatcom linker.
Author:
Curt Arnold

Field Summary

Fields inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor

DEFAULT_DISCARD_BID, DEFAULT_PROCESS_BID

Constructor Summary

OpenWatcomLinker(String command, String outputSuffix)
Constructor.

Method Summary

protected void
addBase(long base, Vector args)
Add specified base address to linker options.
protected void
addEntry(String entry, Vector args)
Adds non-default entry point.
protected void
addFixed(Boolean fixed, Vector args)
Adds fixed option.
protected void
addImpliedArgs(boolean debug, LinkType linkType, Vector args)
Adds other command line parameters.
protected void
addIncremental(boolean incremental, Vector args)
Add command line switch to force incremental linking.
protected void
addMap(boolean map, Vector args)
Add command line switch to force map generation.
protected void
addStack(int stack, Vector args)
Add command line switch for stack reservation.
void
addVersionFiles(VersionInfo versionInfo, LinkType linkType, File outputFile, boolean isDebug, File objDir, TargetMatcher matcher)
Adds source or object files to the bidded fileset to support version information.
String
getCommandFileSwitch(String commandFile)
Get command file switch.
File[]
getLibraryPath()
Get search path for libraries.
String[]
getLibraryPatterns(String[] libnames, LibraryTypeEnum libType)
Get file selectors for libraries.
int
getMaximumCommandLength()
Get maximum command line length.
String[]
getOutputFileSwitch(String outFile)
Get output file switch.
boolean
isCaseSensitive()
Gets file name sensitivity of processors.

Methods inherited from class net.sf.antcontrib.cpptasks.compiler.CommandLineLinker

addBase, addEntry, addFixed, addImpliedArgs, addIncremental, addLibrarySets, addMap, addStack, createConfiguration, decorateLinkerOption, getCommand, getCommandFileSwitch, getIdentifier, getLibtoolLinker, getMaximumCommandLength, getOutputFileNames, getOutputFileSwitch, getOutputFileSwitch, getStartupObject, link, prepareArguments, prepareFilename, prepareResponseFile, quoteFilename, runCommand, setCommand

Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractLinker

addVersionFiles, bid, changeEnvironment, createConfiguration, createConfiguration, getLibraryKey, getOutputFileNames

Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor

bid, changeEnvironment, clone, getHeaderExtensions, getIdentifier, getIdentifier, getOSArch, getOSName, getSourceExtensions, isDarwin, toString

Constructor Details

OpenWatcomLinker

protected OpenWatcomLinker(String command,
                           String outputSuffix)
Constructor.
Parameters:
command - String command string (wcl386 or wfl386)
outputSuffix - String output suffix

Method Details

addBase

protected final void addBase(long base,
                             Vector args)
Add specified base address to linker options.
Overrides:
addBase in interface CommandLineLinker
Parameters:
base - long base address
args - Vector command options

addEntry

protected final void addEntry(String entry,
                              Vector args)
Adds non-default entry point.
Overrides:
addEntry in interface CommandLineLinker
Parameters:
entry - entry point name
args - command line parameters

addFixed

protected final void addFixed(Boolean fixed,
                              Vector args)
Adds fixed option.
Overrides:
addFixed in interface CommandLineLinker
Parameters:
fixed - if executable is fixed
args - command line parameters

addImpliedArgs

protected final void addImpliedArgs(boolean debug,
                                    LinkType linkType,
                                    Vector args)
Adds other command line parameters.
Overrides:
addImpliedArgs in interface CommandLineLinker
Parameters:
debug - boolean is debug
linkType - LinkType link type
args - Vector command line arguments

addIncremental

protected final void addIncremental(boolean incremental,
                                    Vector args)
Add command line switch to force incremental linking.
Overrides:
addIncremental in interface CommandLineLinker
Parameters:
incremental - boolean do incremental linking
args - Vector command line arguments

addMap

protected final void addMap(boolean map,
                            Vector args)
Add command line switch to force map generation.
Overrides:
addMap in interface CommandLineLinker
Parameters:
map - boolean build map
args - Vector command line arguments

addStack

protected final void addStack(int stack,
                              Vector args)
Add command line switch for stack reservation.
Overrides:
addStack in interface CommandLineLinker
Parameters:
stack - int stack size.
args - Vector command line arguments.

addVersionFiles

public final void addVersionFiles(VersionInfo versionInfo,
                                  LinkType linkType,
                                  File outputFile,
                                  boolean isDebug,
                                  File objDir,
                                  TargetMatcher matcher)
            throws IOException
Adds source or object files to the bidded fileset to support version information.
Specified by:
addVersionFiles in interface Linker
Overrides:
addVersionFiles in interface AbstractLinker
Parameters:
versionInfo - version information
linkType - link type
outputFile - name of generated executable
isDebug - true if debug build
objDir - directory for generated files
matcher - bidded fileset

getCommandFileSwitch

public final String getCommandFileSwitch(String commandFile)
Get command file switch.
Overrides:
getCommandFileSwitch in interface CommandLineLinker
Parameters:
commandFile - String command file name
Returns:
String command line option

getLibraryPath

public final File[] getLibraryPath()
Get search path for libraries.
Specified by:
getLibraryPath in interface Linker
Returns:
File[] library path

getLibraryPatterns

public final String[] getLibraryPatterns(String[] libnames,
                                         LibraryTypeEnum libType)
Get file selectors for libraries.
Specified by:
getLibraryPatterns in interface Linker
Parameters:
libnames - String[]
libType - LibraryTypeEnum
Returns:
String[]

getMaximumCommandLength

public final int getMaximumCommandLength()
Get maximum command line length.
Overrides:
getMaximumCommandLength in interface CommandLineLinker
Returns:
int command line length

getOutputFileSwitch

public final String[] getOutputFileSwitch(String outFile)
Get output file switch.
Overrides:
getOutputFileSwitch in interface CommandLineLinker
Parameters:
outFile - Output file name
Returns:
String[] command line switches

isCaseSensitive

public final boolean isCaseSensitive()
Gets file name sensitivity of processors.
Specified by:
isCaseSensitive in interface Linker
Returns:
boolean true if case sensitive.

Copyright B) 2001-2006 Ant-Contrib project. All Rights Reserved.