X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fstaticlibrary.cpp;h=f69f98f85fd141e7e0a386d7be01c6c3bf44780e;hb=bd2a50ecb9f582c6e9569ffc9f33d41f10363c5f;hp=9a35677efcd3891d1a61e097e15e57016fbd6529;hpb=be8a901dfc026f61db46d5d64a41cecc619bc97d;p=builder.git diff --git a/source/staticlibrary.cpp b/source/staticlibrary.cpp index 9a35677..f69f98f 100644 --- a/source/staticlibrary.cpp +++ b/source/staticlibrary.cpp @@ -1,11 +1,3 @@ -/* $Id$ - -This file is part of builder -Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - -#include "archive.h" #include "component.h" #include "objectfile.h" #include "sourcepackage.h" @@ -13,21 +5,17 @@ Distributed under the LGPL using namespace std; -StaticLibrary::StaticLibrary(Builder &b, const Component &c, const std::list &objs): - Target(b, &c.get_package(), generate_target_name(c)), +StaticLibrary::StaticLibrary(Builder &b, const Component &c, const list &objs): + FileTarget(b, &c.get_package(), generate_target_path(c)), + Library(b, package, path, c.get_name()), comp(c) { - buildable=true; + buildable = true; for(list::const_iterator i=objs.begin(); i!=objs.end(); ++i) add_depend(*i); } -Action *StaticLibrary::create_action() -{ - 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"); }