Class AbstractCompiler
java.lang.Object
org.codehaus.plexus.logging.AbstractLogEnabled
org.codehaus.mojo.natives.compiler.AbstractCompiler
- All Implemented Interfaces:
Compiler
,org.codehaus.plexus.logging.LogEnabled
- Direct Known Subclasses:
AbstractCCompiler
,AbstractGccCompiler
public abstract class AbstractCompiler
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements Compiler
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
private class
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncompile
(CompilerConfiguration config, File[] sourceFiles) protected abstract org.codehaus.plexus.util.cli.Commandline
getCommandLine
(File src, File dest, CompilerConfiguration config) protected static File
getObjectFile
(File sourceFile, File outputDirectory, String objectFileExtension) Figure out the object file relative path from a given source fileprotected static String
getObjectFileExtension
(String fileExtension) return "obj" or "o" when file extension is not given based on current platformprotected abstract Parser
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
AbstractCompiler
public AbstractCompiler()
-
-
Method Details
-
getParser
-
getCommandLine
protected abstract org.codehaus.plexus.util.cli.Commandline getCommandLine(File src, File dest, CompilerConfiguration config) throws NativeBuildException - Throws:
NativeBuildException
-
compile
public List<File> compile(CompilerConfiguration config, File[] sourceFiles) throws NativeBuildException - Specified by:
compile
in interfaceCompiler
- Returns:
- List of compiler ouput files (ie, .o, .obj )
- Throws:
NativeBuildException
-
getObjectFileExtension
return "obj" or "o" when file extension is not given based on current platform- Returns:
-
getObjectFile
protected static File getObjectFile(File sourceFile, File outputDirectory, String objectFileExtension) throws NativeBuildException Figure out the object file relative path from a given source file- Parameters:
sourceFile
-workingDirectory
-outputDirectory
-config
-- Returns:
- Throws:
NativeBuildException
-