2 #include "executable.h"
4 #include "objectfile.h"
9 Executable::Executable(Builder &b, const Component &c, const list<ObjectFile *> &objs):
10 Target(b, &c.get_package(), generate_target_name(c)),
14 for(list<ObjectFile *>::const_iterator i=objs.begin(); i!=objs.end(); ++i)
18 Action *Executable::build()
20 return Target::build(new Link(builder, *this, comp));;
23 string Executable::generate_target_name(const Component &comp)
28 if(comp.get_type()==Component::LIBRARY)
34 return (comp.get_package().get_source()/(prefix+comp.get_name()+suffix)).str();