X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fstaticlibrary.cpp;h=45ec3df5b64a0251ae00506706f7b4ae81314de6;hb=632361796a7ddadf8a726526c937fab22281fb7b;hp=56d857e02a1aa049fa4713faea44748223ea6f3a;hpb=654de39b62a9a58fd8e1b5a557361d628345788b;p=builder.git diff --git a/source/staticlibrary.cpp b/source/staticlibrary.cpp index 56d857e..45ec3df 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,18 @@ 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)), - comp(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()) { - buildable=true; + component = &c; for(list::const_iterator i=objs.begin(); i!=objs.end(); ++i) add_depend(*i); -} -Action *StaticLibrary::build() -{ - return Target::build(new Archive(builder, *this));; + install_location = "lib"; } -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"); }