3 #include "executable.h"
5 #include "objectfile.h"
10 Executable::Executable(Builder &b, const Component &c, const list<ObjectFile *> &objs):
11 Target(b, &c.get_package(), generate_target_name(c)),
15 for(list<ObjectFile *>::const_iterator i=objs.begin(); i!=objs.end(); ++i)
19 void Executable::find_depends()
21 const list<string> &libs=comp.get_build_info().libs;
22 for(list<string>::const_iterator i=libs.begin(); i!=libs.end(); ++i)
24 Target *lib=builder.get_library(*i, comp.get_build_info().libpath);
32 Action *Executable::build()
34 return Target::build(new Link(builder, *this, comp));;
37 string Executable::generate_target_name(const Component &comp)
42 if(comp.get_type()==Component::LIBRARY)
48 return (comp.get_package().get_source()/(prefix+comp.get_name()+suffix)).str();