]> git.tdb.fi Git - builder.git/blob - source/gnucompiler.h
4b82e6f4f7ad30d47c8a9b0e5e7eadb53f931b76
[builder.git] / source / gnucompiler.h
1 #ifndef GNUCOMPILER_H_
2 #define GNUCOMPILER_H_
3
4 #include "tool.h"
5
6 /**
7 Common base class for GNU compilers.  Turns SourceFiles into ObjectFiles.
8
9 Since invocation is mostly the same for all language frontends, most of the
10 logic is here and the individual tools only handle creating source files of
11 appropriate type.
12 */
13 class GnuCompiler: public Tool
14 {
15 public:
16         GnuCompiler(Builder &, const Architecture &, const std::string &, const Msp::FS::Path & = Msp::FS::Path());
17
18         virtual Target *create_source(const Component &, const Msp::FS::Path &) const;
19         virtual Target *create_source(const Msp::FS::Path &) const;
20         virtual Target *create_target(const std::list<Target *> &, const std::string &);
21         virtual std::string create_build_signature(const BuildInfo &) const;
22 protected:
23         virtual void do_prepare();
24 public:
25         virtual Task *run(const Target &) const;
26 };
27
28 #endif