]> git.tdb.fi Git - builder.git/blobdiff - source/lib/binary.h
Rearrange sources into subdirectories
[builder.git] / source / lib / binary.h
diff --git a/source/lib/binary.h b/source/lib/binary.h
new file mode 100644 (file)
index 0000000..ac5a855
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef BINARY_H_
+#define BINARY_H_
+
+#include "buildinfo.h"
+#include "filetarget.h"
+
+class Component;
+class ObjectFile;
+
+/**
+Produces a binary file, which may be either a standalone executable or a shared
+library.
+*/
+class Binary: public FileTarget
+{
+private:
+       BuildInfo static_binfo;
+
+protected:
+       std::vector<ObjectFile *> objects;
+
+       Binary(Builder &b, const Msp::FS::Path &p): FileTarget(b, p) { }
+       Binary(Builder &, const Component &, const std::string &, const std::vector<ObjectFile *> &);
+
+public:
+       void collect_build_info(BuildInfo &) const override;
+
+protected:
+       void find_dependencies() override;
+private:
+       void find_dependencies(Target *, std::vector<Target *> &, std::vector<Target *> &, std::vector<std::string> &);
+};
+
+#endif