]> git.tdb.fi Git - builder.git/blob - source/staticlibrary.h
Use build info to store static library dependencies
[builder.git] / source / staticlibrary.h
1 #ifndef STATICLIBRARY_H_
2 #define STATICLIBRARY_H_
3
4 #include "filetarget.h"
5
6 class Component;
7 class ObjectFile;
8
9 /**
10 A static library target.
11 */
12 class StaticLibrary: public FileTarget
13 {
14 private:
15         /* TODO this really belongs in a Component, but some refactoring is required
16         to allow non-builder packages to have components.  Rename BinaryPackage to
17         ExternalPackage, add BuildableComponent and ExternalComponent classes. */
18         BuildInfo build_info;
19
20 public:
21         StaticLibrary(Builder &, const Msp::FS::Path &);
22         StaticLibrary(Builder &, const Component &, const std::list<ObjectFile *> &);
23 private:
24         static std::string generate_filename(const Component &);
25
26 public:
27         virtual const char *get_type() const { return "StaticLibrary"; }
28
29         void add_required_library(const std::string &);
30         virtual void collect_build_info(BuildInfo &) const;
31 };
32
33 #endif