cbp2make
Makefile generation tool for Code::Blocks IDE
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
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
31
class
CBuildTarget
32
{
33
public
:
34
enum
TargetType
35
{
36
ttExecutable
,
37
ttConsoleExecutable
,
38
ttStaticLibrary
,
39
ttDynamicLibrary
,
40
ttCommands
,
41
ttNative
// windows-only ".sys" files
42
};
43
enum
OptionsRelation
44
{
45
orProject
,
46
orTarget
,
47
orTargetProject
,
48
orProjectTarget
49
};
50
private
:
51
CString
m_Title
;
52
CStringList
m_Platforms
;
53
CString
m_Output
;
54
CString
m_WorkingDirectory
;
55
CString
m_ObjectOutput
;
56
CStringList
m_ExternalDependencies
;
57
TargetType
m_Type
;
58
bool
m_AutoPrefix
;
59
bool
m_AutoExtension
;
60
CString
m_Compiler
;
61
CStringList
m_CompilerOptions
;
62
CStringList
m_CompilerDirectories
;
63
CStringList
m_LinkerOptions
;
64
CStringList
m_LinkerLibraries
;
65
CStringList
m_LinkerDirectories
;
66
CStringList
m_BeforeBuildCommands
;
67
CStringList
m_AfterBuildCommands
;
68
bool
m_ForceBeforeBuildCommands
;
69
bool
m_ForceAfterBuildCommands
;
70
CStringList
m_ResourceCompilerDirectories
;
71
CStringList
m_ResourceCompilerOptions
;
72
OptionsRelation
m_CompilerOptionsRelation
;
73
OptionsRelation
m_LinkerOptionsRelation
;
74
OptionsRelation
m_IncludeDirectoriesRelation
;
75
OptionsRelation
m_ResourceIncludeDirectoriesRelation
;
76
OptionsRelation
m_LibraryDirectoriesRelation
;
77
OptionsRelation
m_ResourceCompilerOptionsRelation
;
78
//
79
int
m_NameCase
;
80
CString
m_UCName
;
81
CString
m_LCName
;
82
CString
m_MFName
;
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
; }
92
CStringList
CompilerDirectories
(
void
)
const
{
return
m_CompilerDirectories
; }
93
CStringList
BeforeBuildCommands
(
void
)
const
{
return
m_BeforeBuildCommands
; }
94
CStringList
AfterBuildCommands
(
void
)
const
{
return
m_AfterBuildCommands
; }
95
bool
ForceBeforeBuildCommands
(
void
)
const
{
return
m_ForceBeforeBuildCommands
; }
96
bool
ForceAfterBuildCommands
(
void
)
const
{
return
m_ForceAfterBuildCommands
; }
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
//
104
CString
TargetTypeName
(
const
TargetType
Type
);
105
CString
TargetTypeName
(
void
);
106
CString
OptionsRelationName
(
const
OptionsRelation
Relation);
107
CString
AutoFilePrefix
(
const
CPlatform::OS_Type
OS);
108
CString
AutoFileExtension
(
const
CPlatform::OS_Type
OS,
const
CBuildTarget::TargetType
Type
);
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
137
class
CVirtualTarget
138
{
139
//friend class CCodeBlocksProject;
140
private
:
141
CString
m_Alias
;
142
CStringList
m_Targets
;
143
//
144
int
m_NameCase
;
145
CString
m_UCName
;
146
CString
m_LCName
;
147
CString
m_MFName
;
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
//------------------------------------------------------------------------------
Generated on Sun Jun 9 2013 10:55:52 for cbp2make by
1.8.4