]> git.tdb.fi Git - builder.git/blob - source/objectfile.h
Don't store component locally in object and source files
[builder.git] / source / objectfile.h
1 #ifndef OBJECTFILE_H_
2 #define OBJECTFILE_H_
3
4 #include "filetarget.h"
5
6 class SourceFile;
7
8 /**
9 Object files are compiled from source files.
10 */
11 class ObjectFile: public FileTarget
12 {
13 private:
14         SourceFile &source;
15         
16 public:
17         ObjectFile(Builder &, const Component &, SourceFile &);
18 private:
19         static Msp::FS::Path generate_target_path(const Component &, const std::string &);
20
21 public:
22         virtual const char *get_type() const { return "ObjectFile"; }
23         SourceFile &get_source() const { return source; }
24
25         /** Processes as many new dependences as possible.  Some may be created on
26         the fly and can't be processed until their own dependencies are ready.  In
27         such cases this function needs to be called again. */
28         virtual void find_depends();
29
30 private:
31         /** Recursively looks for header targets and adds them as dependencies. */
32         void find_depends(FileTarget *);
33 };
34
35 #endif