]> git.tdb.fi Git - builder.git/blob - source/buildinfo.h
ccd4b86798db7cc4a8c96eafffaef56c0ea82f82
[builder.git] / source / buildinfo.h
1 #ifndef BUILDINFO_H_
2 #define BUILDINFO_H_
3
4 #include <list>
5 #include <string>
6 #include <msp/parser/loader.h>
7 #include "misc.h"
8
9 class BuildInfo
10 {
11 public:
12         class Loader: public Msp::Parser::Loader
13         {
14         public:
15                 Loader(BuildInfo &);
16         private:
17                 BuildInfo &binfo;
18                 
19                 void cflag(const std::string &s)   { binfo.cflags.push_back(s); }
20                 void incpath(const std::string &s) { binfo.incpath.push_back(s); }
21                 void define(const std::string &s)  { binfo.defines.push_back(s); }
22                 void ldflag(const std::string &s)  { binfo.ldflags.push_back(s); }
23                 void libpath(const std::string &s) { binfo.libpath.push_back(s); }
24                 void library(const std::string &s) { binfo.libs.push_back(s); }
25         };
26         
27         StringList cflags;
28         StringList defines;
29         StringList incpath;
30         StringList ldflags;
31         StringList libpath;
32         StringList libs;
33
34         void add(const BuildInfo &);
35         void unique();
36 private:
37         void unique(StringList &);
38 };
39
40 #endif