// XXX Add specific code for Linux and platforms where things are
// clean, libtool should be just a fallback.
public void execute() throws BuildException {
compiler=findCompilerAdapter();
// co_mapper=compiler.getOMapper();
LinkerAdapter linker=findLinkerAdapter();
if( soFile==null )
throw new BuildException("No target ( " + soExt + " file )");
if (src == null)
throw new BuildException("No source files");
// XXX makedepend-type dependencies - how ??
// We could generate a dummy Makefile and parse the content...
findSourceFiles();
// Copy all settings into compiler
this.duplicateTo(compiler);
compiler.compile( srcList );
// XXX move this checking to linker
File soTarget=new File( buildDir, soFile + soExt );
if( compiler.getCompiledFiles().size() == 0 && soTarget.exists()) {
// No dependency, no need to relink
return;
}
this.duplicateTo(linker);
linker.link(srcList);
}