cbp2make
Makefile generation tool for Code::Blocks IDE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cbptarget.h
Go to the documentation of this file.
1 /*
2  cbp2make : Makefile generation tool for the Code::Blocks IDE
3  Copyright (C) 2010-2013 Mirai Computing (mirai.computing@gmail.com)
4 
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 //------------------------------------------------------------------------------
20 #ifndef CBP_TARGET_H
21 #define CBP_TARGET_H
22 //------------------------------------------------------------------------------
23 #include "stlstrings.h"
24 #include "platforms.h"
25 //------------------------------------------------------------------------------
26 
27 class TiXmlNode;
28 class TiXmlElement;
29 class CCodeBlocksProject;
30 
32 {
33  public:
35  {
41  ttNative // windows-only ".sys" files
42  };
44  {
49  };
50  private:
78  //
83  public:
84  CString Title(void) const { return m_Title; }
85  CStringList Platforms(void) const { return m_Platforms; }
86  CString Output(void) const { return m_Output; }
87  CString ObjectOutput(void) const { return m_ObjectOutput; }
88  TargetType Type(void) const { return m_Type; }
89  bool AutoPrefix(void) const { return m_AutoPrefix; }
90  bool AutoExtension(void) const { return m_AutoExtension; }
91  CString Compiler(void) const { return m_Compiler; }
97  int& NameCase(void) { return m_NameCase; }
98  CString UCName(void) const { return m_UCName; }
99  CString LCName(void) const { return m_LCName; }
100  CString MFName(void) const { return m_MFName; }
101  CString Name(const CString& Prefix, const int Case) const;
102  CString Name(const CString& Prefix) const;
103  //
105  CString TargetTypeName(void);
109  CString AutoFileExtension(CString& Platform);
110  CString AutoFileExtension(const int Platform);
111  CString MakeOptions(const OptionsRelation Relation,
112  const CString& ProjectOptions,
113  const CString& TargetOptions);
114  CString CFlags(void);
115  CString CFlags(const CString& ProjectCFlags);
116  CString RCFlags(void);
117  CString RCFlags(const CString& ProjectRCFlags);
118  CString LdFlags(void);
119  CString LdFlags(const CString& ProjectLdFlags);
120  CString IncDirs(const CString& IncDirSwitch);
121  CString IncDirs(const CString& ProjectIncDirs, const CString& IncDirSwitch);
122  CString ResDirs(const CString& IncDirSwitch);
123  CString ResDirs(const CString& ProjectResDirs, const CString& IncDirSwitch);
124  CString LibDirs(const CString& LibDirSwitch);
125  CString LibDirs(const CString& ProjectLibDirs, const CString& LibDirSwitch);
126  CString Libs(const CPlatform& Platform, const CString& LinkLibSwitch);
127  CString ExtDeps(void);
128  public:
129  void Clear(void);
130  void Read(const TiXmlElement *TargetRoot);
131  void Show(void);
132  public:
133  CBuildTarget(void);
134  ~CBuildTarget(void);
135 };
136 
138 {
139  //friend class CCodeBlocksProject;
140  private:
143  //
148  public:
149  CString Alias(void) const { return m_Alias; }
150  CStringList& Targets(void) { return m_Targets; }
151  int& NameCase(void) { return m_NameCase; }
152  CString UCName(void) const { return m_UCName; }
153  CString LCName(void) const { return m_LCName; }
154  CString MFName(void) const { return m_MFName; }
155  CString Name(const CString& Prefix) const;
156  CString Name(const CString& Prefix, const int TargetIndex) const;
157  //
158  void Clear(void);
159  void Read(const TiXmlElement *TargetRoot);
160  void Show(void);
161  public:
162  CVirtualTarget(void);
163  ~CVirtualTarget(void);
164 };
165 
166 #endif
167 //------------------------------------------------------------------------------