-
-Action *Binary::create_action()
-{
- return new Link(builder, *this);
-}
-
-FS::Path Binary::generate_target_path(const Component &c)
-{
- const SourcePackage &pkg = c.get_package();
- string prefix, suffix;
- const string &arch = pkg.get_builder().get_current_arch().get_name();
-
- if(c.get_type()==Component::LIBRARY)
- {
- prefix = "lib";
- if(arch=="win32")
- suffix = ".dll";
- else
- suffix = ".so";
- }
- else if(c.get_type()==Component::MODULE)
- suffix = ".m";
- else if(c.get_type()==Component::PROGRAM)
- {
- if(arch=="win32")
- suffix = ".exe";
- }
-
- return pkg.get_out_dir()/(prefix+c.get_name()+suffix);
-}