]> git.tdb.fi Git - builder.git/blob - source/binary.h
Rework the Target class hierarchy
[builder.git] / source / binary.h
1 /* $Id$
2
3 This file is part of builder
4 Copyright © 2006-2009  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef BINARY_H_
9 #define BINARY_H_
10
11 #include "filetarget.h"
12
13 class Component;
14 class ObjectFile;
15
16 /**
17 Produces a binary file, which may be either a standalone executable or a shared
18 library.
19 */
20 class Binary: public virtual FileTarget
21 {
22 protected:
23         const Component ∁
24
25         Binary(Builder &, const Component &, const std::list<ObjectFile *> &);
26 public:
27         const Component &get_component() const { return comp; }
28         virtual void find_depends();
29 protected:
30         virtual Action *create_action();
31
32         /** Returns the path for the binary.  We can't do this in the constructor
33         since we need to pass the value to the Target c'tor. */
34         static Msp::FS::Path generate_target_path(const Component &);
35 };
36
37 #endif