3 This file is part of builder
4 Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #include <msp/strings/formatter.h>
10 #include "sharedlibrary.h"
11 #include "sourcepackage.h"
16 SharedLibrary::SharedLibrary(Builder &b, const Component &c, const list<ObjectFile *> &objs):
17 FileTarget(b, &c.get_package(), generate_target_path(c)),
19 Library(b, &c.get_package(), path, c.get_name()),
20 soname(create_soname(c))
23 string SharedLibrary::create_soname(const Component &c)
25 const string &ver = c.get_package().get_version();
31 for(; i<ver.size(); ++i)
39 return format("%s.%s", name, ver.substr(0, i));