X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fstaticlibrary.cpp;h=13c4e6798bbc519f100f7bde175f1dceecabdf8c;hb=7e5ac6af8987bf12f3e338d00e96e8cb74f3534b;hp=df0cc7cb5811e9b2386f7fa398d9356a91ab1906;hpb=4fcc283a4bb1f695bd124006906bcdaba053193f;p=builder.git diff --git a/source/staticlibrary.cpp b/source/staticlibrary.cpp index df0cc7c..13c4e67 100644 --- a/source/staticlibrary.cpp +++ b/source/staticlibrary.cpp @@ -1,26 +1,22 @@ -#include "archive.h" #include "component.h" #include "objectfile.h" -#include "package.h" +#include "sourcepackage.h" #include "staticlibrary.h" 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; 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_source()/("lib"+c.get_name()+".a")).str(); + return c.get_package().get_out_dir()/("lib"+c.get_name()+".a"); }