net.sf.antcontrib.cpptasks.devstudio

Class DevStudioCompatibleLinker

Implemented Interfaces:
Cloneable, Linker, Processor
Known Direct Subclasses:
CompaqVisualFortranLinker, DevStudioLinker, IntelWin32Linker

public abstract class DevStudioCompatibleLinker
extends CommandLineLinker

Abstract base class for linkers that try to mimic the command line arguments for the Microsoft (r) Incremental Linker
Author:
Curt Arnold

Field Summary

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

DEFAULT_DISCARD_BID, DEFAULT_PROCESS_BID

Constructor Summary

DevStudioCompatibleLinker(String command, String identifierArg, String outputSuffix)

Method Summary

protected void
addBase(long base, Vector args)
protected void
addEntry(String entry, Vector args)
protected void
addFixed(Boolean fixed, Vector args)
protected void
addImpliedArgs(boolean debug, LinkType linkType, Vector args)
protected void
addIncremental(boolean incremental, Vector args)
protected void
addMap(boolean map, Vector args)
protected void
addStack(int stack, Vector args)
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)
File[]
getLibraryPath()
returns the library path for the linker
String[]
getLibraryPatterns(String[] libnames, LibraryTypeEnum libType)
Returns a set of filename patterns corresponding to library names.
int
getMaximumCommandLength()
String[]
getOutputFileSwitch(String outputFile)
boolean
isCaseSensitive()
Returns true if the linker is case-sensitive

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

DevStudioCompatibleLinker

public DevStudioCompatibleLinker(String command,
                                 String identifierArg,
                                 String outputSuffix)

Method Details

addBase

protected void addBase(long base,
                       Vector args)
Overrides:
addBase in interface CommandLineLinker

addEntry

protected void addEntry(String entry,
                        Vector args)
Overrides:
addEntry in interface CommandLineLinker

addFixed

protected void addFixed(Boolean fixed,
                        Vector args)
Overrides:
addFixed in interface CommandLineLinker

addImpliedArgs

protected void addImpliedArgs(boolean debug,
                              LinkType linkType,
                              Vector args)
Overrides:
addImpliedArgs in interface CommandLineLinker

addIncremental

protected void addIncremental(boolean incremental,
                              Vector args)
Overrides:
addIncremental in interface CommandLineLinker

addMap

protected void addMap(boolean map,
                      Vector args)
Overrides:
addMap in interface CommandLineLinker

addStack

protected void addStack(int stack,
                        Vector args)
Overrides:
addStack in interface CommandLineLinker

addVersionFiles

public 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
isDebug - true if debug build
objDir - directory for generated files
matcher - bidded fileset

getCommandFileSwitch

public String getCommandFileSwitch(String commandFile)
Overrides:
getCommandFileSwitch in interface CommandLineLinker

getLibraryPath

public File[] getLibraryPath()
returns the library path for the linker
Specified by:
getLibraryPath in interface Linker

getLibraryPatterns

public String[] getLibraryPatterns(String[] libnames,
                                   LibraryTypeEnum libType)
Returns a set of filename patterns corresponding to library names. For example, "advapi32" would be expanded to "advapi32.dll" by DevStudioLinker and to "libadvapi32.a" and "libadvapi32.so" by GccLinker.
Specified by:
getLibraryPatterns in interface Linker
Parameters:
libnames - array of library names

getMaximumCommandLength

public int getMaximumCommandLength()
Overrides:
getMaximumCommandLength in interface CommandLineLinker

getOutputFileSwitch

public String[] getOutputFileSwitch(String outputFile)
Overrides:
getOutputFileSwitch in interface CommandLineLinker

isCaseSensitive

public boolean isCaseSensitive()
Returns true if the linker is case-sensitive
Specified by:
isCaseSensitive in interface Linker

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