3 This file is part of builder
4 Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
10 #include "objectfile.h"
11 #include "sourcepackage.h"
12 #include "staticlibrary.h"
16 StaticLibrary::StaticLibrary(Builder &b, const Component &c, const std::list<ObjectFile *> &objs):
17 Target(b, &c.get_package(), generate_target_name(c)),
21 for(list<ObjectFile *>::const_iterator i=objs.begin(); i!=objs.end(); ++i)
25 Action *StaticLibrary::build()
27 return Target::build(new Archive(builder, *this));;
30 string StaticLibrary::generate_target_name(const Component &c)
32 return (c.get_package().get_out_dir()/("lib"+c.get_name()+".a")).str();