]> git.tdb.fi Git - builder.git/blob - source/staticlibrary.cpp
Big rewrite for a more tool-centric approach
[builder.git] / source / staticlibrary.cpp
1 #include "component.h"
2 #include "objectfile.h"
3 #include "sourcepackage.h"
4 #include "staticlibrary.h"
5
6 using namespace std;
7
8 StaticLibrary::StaticLibrary(Builder &b, const Component &c, const list<ObjectFile *> &objs):
9         FileTarget(b, &c.get_package(), generate_target_path(c)),
10         Library(b, package, path, c.get_name()),
11         comp(c)
12 {
13         buildable = true;
14         for(list<ObjectFile *>::const_iterator i=objs.begin(); i!=objs.end(); ++i)
15                 add_depend(*i);
16 }
17
18 Msp::FS::Path StaticLibrary::generate_target_path(const Component &c)
19 {
20         return c.get_package().get_out_dir()/("lib"+c.get_name()+".a");
21 }