]> git.tdb.fi Git - builder.git/blob - source/objectfile.h
21a988d4ce5abe093ee3968e40c7163fd5931064
[builder.git] / source / objectfile.h
1 /* $Id$
2
3 This file is part of builder
4 Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef OBJECTFILE_H_
9 #define OBJECTFILE_H_
10
11 #include "target.h"
12
13 class Component;
14 class SourceFile;
15
16 /**
17 Object files are compiled from source files.
18 */
19 class ObjectFile: public Target
20 {
21 public:
22         ObjectFile(Builder &, const Component &, SourceFile &);
23         const char      *get_type() const      { return "ObjectFile"; }
24         const Component &get_component() const { return comp; }
25         void            find_depends();
26         Action          *build();
27 private:
28         const Component ∁
29         TargetList      new_deps;
30         
31         void find_depends(Target *);
32         void add_depend(Target *);
33
34         static std::string generate_target_name(const Component &, const std::string &);
35 };
36
37 #endif