]> git.tdb.fi Git - builder.git/blob - source/sharedlibrary.h
Move soname generation to constructor
[builder.git] / source / sharedlibrary.h
1 #ifndef SHAREDLIB_H_
2 #define SHAREDLIB_H_
3
4 #include "binary.h"
5
6 /**
7 Represents a shared library.  It has two special properties: libname and
8 soname.  Libname is the name used by the linker.  Soname is the canonical
9 filename of the library, including version number.  If the owning package has
10 no version, soname will be empty.
11 */
12 class SharedLibrary: public Binary
13 {
14 private:
15         std::string libname;
16         std::string soname;
17
18 public:
19         SharedLibrary(Builder &, const Msp::FS::Path &);
20         SharedLibrary(Builder &, const Component &, const std::list<ObjectFile *> &);
21
22         virtual const char *get_type() const { return "SharedLibrary"; }
23         const std::string &get_libname() const { return libname; }
24         const std::string &get_soname() const { return soname; }
25
26 private:
27         static std::string generate_filename(const Component &);
28 };
29
30 #endif