X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fsharedlibrary.cpp;h=c25c6f213f3e7c791525aad240259384335c60ac;hb=HEAD;hp=a3225171836eafb10a67f30e3191ccc660d8901c;hpb=05a2b9dabd01414e9e9a91f9d69babaca4ccb32d;p=builder.git diff --git a/source/sharedlibrary.cpp b/source/sharedlibrary.cpp deleted file mode 100644 index a322517..0000000 --- a/source/sharedlibrary.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* $Id$ - -This file is part of builder -Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - -#include -#include "component.h" -#include "sharedlibrary.h" -#include "sourcepackage.h" - -using namespace std; -using namespace Msp; - -SharedLibrary::SharedLibrary(Builder &b, const Component &c, const list &objs): - FileTarget(b, &c.get_package(), generate_target_path(c)), - Binary(b, c, objs), - Library(b, &c.get_package(), path, c.get_name()), - soname(create_soname(c)) -{ } - -string SharedLibrary::create_soname(const Component &c) -{ - const string &ver = c.get_package().get_version(); - if(ver.empty()) - return string(); - - unsigned dots = 0; - unsigned i = 0; - for(; i=2) - break; - } - - return format("%s.%s", name, ver.substr(0, i)); -}