]> git.tdb.fi Git - builder.git/blobdiff - source/staticlibrary.cpp
Rework the Target class hierarchy
[builder.git] / source / staticlibrary.cpp
index 56d857e02a1aa049fa4713faea44748223ea6f3a..b7e4eff1d43941391393986f92c1acecd1bdab43 100644 (file)
@@ -1,7 +1,7 @@
 /* $Id$
 
 This file is part of builder
-Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
+Copyright © 2006-200 Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
@@ -13,8 +13,9 @@ Distributed under the LGPL
 
 using namespace std;
 
-StaticLibrary::StaticLibrary(Builder &b, const Component &c, const std::list<ObjectFile *> &objs):
-       Target(b, &c.get_package(), generate_target_name(c)),
+StaticLibrary::StaticLibrary(Builder &b, const Component &c, const list<ObjectFile *> &objs):
+       FileTarget(b, &c.get_package(), generate_target_path(c)),
+       Library(b, package, path, c.get_name()),
        comp(c)
 {
        buildable=true;
@@ -22,12 +23,12 @@ StaticLibrary::StaticLibrary(Builder &b, const Component &c, const std::list<Obj
                add_depend(*i);
 }
 
-Action *StaticLibrary::build()
+Action *StaticLibrary::create_action()
 {
-       return Target::build(new Archive(builder, *this));;
+       return new Archive(builder, *this);
 }
 
-string StaticLibrary::generate_target_name(const Component &c)
+Msp::FS::Path StaticLibrary::generate_target_path(const Component &c)
 {
-       return (c.get_package().get_out_dir()/("lib"+c.get_name()+".a")).str();
+       return c.get_package().get_out_dir()/("lib"+c.get_name()+".a");
 }