]> git.tdb.fi Git - builder.git/blobdiff - source/sharedlibrary.h
Split Binary filename generation to Executable and SharedLibrary
[builder.git] / source / sharedlibrary.h
index 13e358fe069f21def86727194abc8195aa21a76f..c2fa985c7dcfd5d6d84ea76e09180a7c226c8ebe 100644 (file)
@@ -1,25 +1,31 @@
-/* $Id$
-
-This file is part of builder
-Copyright © 2006-2007, 2009  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifndef SHAREDLIB_H_
 #define SHAREDLIB_H_
 
 #include "binary.h"
-#include "library.h"
 
 /**
-Represents a shared library.  Mainly exists to give extra information to the
-user.
+Represents a shared library.  It has two special properties: libname and
+soname.  Libname is the name used by the linker.  Soname is the canonical
+filename of the library, including version number.  If the owning package has
+no version, soname will be empty.
 */
-class SharedLibrary: public Binary, public Library
+class SharedLibrary: public Binary
 {
+private:
+       std::string libname;
+       std::string soname;
+
 public:
+       SharedLibrary(Builder &, const Msp::FS::Path &);
        SharedLibrary(Builder &, const Component &, const std::list<ObjectFile *> &);
+
        virtual const char *get_type() const { return "SharedLibrary"; }
+       const std::string &get_libname() const { return libname; }
+       const std::string &get_soname() const { return soname; }
+
+private:
+       static std::string generate_filename(const Component &);
+       std::string create_soname(const Component &);
 };
 
 #endif