]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/Cpptasks/net/sf/antcontrib/cpptasks/CompilerEnum.java
Changed spelling to manifest
[mirror_edk2.git] / Tools / Source / Cpptasks / net / sf / antcontrib / cpptasks / CompilerEnum.java
1 /*
2 *
3 * Copyright 2002-2004 The Ant-Contrib project
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17 package net.sf.antcontrib.cpptasks;
18 import net.sf.antcontrib.cpptasks.arm.ADSCCompiler;
19 import net.sf.antcontrib.cpptasks.borland.BorlandCCompiler;
20 import net.sf.antcontrib.cpptasks.borland.BorlandResourceCompiler;
21 import net.sf.antcontrib.cpptasks.compaq.CompaqVisualFortranCompiler;
22 import net.sf.antcontrib.cpptasks.compiler.Compiler;
23 import net.sf.antcontrib.cpptasks.devstudio.DevStudioCCompiler;
24 import net.sf.antcontrib.cpptasks.devstudio.DevStudioMIDLCompiler;
25 import net.sf.antcontrib.cpptasks.devstudio.DevStudioResourceCompiler;
26 import net.sf.antcontrib.cpptasks.gcc.GccCCompiler;
27 import net.sf.antcontrib.cpptasks.hp.aCCCompiler;
28 import net.sf.antcontrib.cpptasks.ibm.VisualAgeCCompiler;
29 import net.sf.antcontrib.cpptasks.intel.IntelLinux32CCompiler;
30 import net.sf.antcontrib.cpptasks.intel.IntelLinux64CCompiler;
31 import net.sf.antcontrib.cpptasks.intel.IntelWin32CCompiler;
32 import net.sf.antcontrib.cpptasks.intel.IntelWin64CCompiler;
33 import net.sf.antcontrib.cpptasks.os390.OS390CCompiler;
34 import net.sf.antcontrib.cpptasks.os400.IccCompiler;
35 import net.sf.antcontrib.cpptasks.sun.C89CCompiler;
36 import net.sf.antcontrib.cpptasks.sun.ForteCCCompiler;
37 import net.sf.antcontrib.cpptasks.ti.ClxxCCompiler;
38
39 import org.apache.tools.ant.types.EnumeratedAttribute;
40 /**
41 * Enumeration of supported compilers
42 *
43 * <table width="100%" border="1"> <thead>Supported compilers </thead>
44 * <tr>
45 * <td>gcc (default)</td>
46 * <td>GCC C++ compiler</td>
47 * </tr>
48 * <tr>
49 * <td>g++</td>
50 * <td>GCC C++ compiler</td>
51 * </tr>
52 * <tr>
53 * <td>c++</td>
54 * <td>GCC C++ compiler</td>
55 * </tr>
56 * <tr>
57 * <td>g77</td>
58 * <td>GNU FORTRAN compiler</td>
59 * </tr>
60 * <tr>
61 * <td>msvc</td>
62 * <td>Microsoft Visual C++</td>
63 * </tr>
64 * <tr>
65 * <td>bcc</td>
66 * <td>Borland C++ Compiler</td>
67 * </tr>
68 * <tr>
69 * <td>msrc</td>
70 * <td>Microsoft Resource Compiler</td>
71 * </tr>
72 * <tr>
73 * <td>brc</td>
74 * <td>Borland Resource Compiler</td>
75 * </tr>
76 * <tr>
77 * <td>df</td>
78 * <td>Compaq Visual Fortran Compiler</td>
79 * </tr>
80 * <tr>
81 * <td>midl</td>
82 * <td>Microsoft MIDL Compiler</td>
83 * </tr>
84 * <tr>
85 * <td>icl</td>
86 * <td>Intel C++ compiler for Windows (IA-32)</td>
87 * </tr>
88 * <tr>
89 * <td>ecl</td>
90 * <td>Intel C++ compiler for Windows (IA-64)</td>
91 * </tr>
92 * <tr>
93 * <td>icc</td>
94 * <td>Intel C++ compiler for Linux (IA-32)</td>
95 * </tr>
96 * <tr>
97 * <td>ecc</td>
98 * <td>Intel C++ compiler for Linux (IA-64)</td>
99 * </tr>
100 * <tr>
101 * <td>CC</td>
102 * <td>Sun ONE C++ compiler</td>
103 * </tr>
104 * <tr>
105 * <td>aCC</td>
106 * <td>HP aC++ C++ Compiler</td>
107 * </tr>
108 * <tr>
109 * <td>os390</td>
110 * <td>OS390 C Compiler</td>
111 * </tr>
112 * <tr>
113 * <td>os400</td>
114 * <td>Icc Compiler</td>
115 * </tr>
116 * <tr>
117 * <td>sunc89</td>
118 * <td>Sun C89 C Compiler</td>
119 * </tr>
120 * <tr>
121 * <td>xlC</td>
122 * <td>VisualAge C Compiler</td>
123 * </tr>
124 * <tr>
125 * <td>cl6x</td>
126 * <td>TI TMS320C6000 Optimizing Compiler</td>
127 * </tr>
128 * <tr>
129 * <td>cl55</td>
130 * <td>TI TMS320C55x Optimizing C/C++ Compiler</td>
131 * </tr>
132 * <tr>
133 * <td>armcpp</td>
134 * <td>ARM 32-bit C++ compiler</td>
135 * </tr>
136 * <tr>
137 * <td>armcc</td>
138 * <td>ARM 32-bit C compiler</td>
139 * </tr>
140 * <tr>
141 * <td>tcpp</td>
142 * <td>ARM 16-bit C++ compiler</td>
143 * </tr>
144 * <tr>
145 * <td>tcc</td>
146 * <td>ARM 16-bit C compiler</td>
147 * </tr>
148 * </table>
149 *
150 * @author Curt Arnold
151 *
152 */
153 public class CompilerEnum extends EnumeratedAttribute {
154 private final static ProcessorEnumValue[] compilers = new ProcessorEnumValue[]{
155 new ProcessorEnumValue("gcc", GccCCompiler.getInstance()),
156 new ProcessorEnumValue("g++", GccCCompiler.getGppInstance()),
157 new ProcessorEnumValue("c++", GccCCompiler.getCppInstance()),
158 new ProcessorEnumValue("g77", GccCCompiler.getG77Instance()),
159 new ProcessorEnumValue("msvc", DevStudioCCompiler.getInstance()),
160 new ProcessorEnumValue("bcc", BorlandCCompiler.getInstance()),
161 new ProcessorEnumValue("msrc", DevStudioResourceCompiler
162 .getInstance()),
163 new ProcessorEnumValue("brc", BorlandResourceCompiler.getInstance()),
164 new ProcessorEnumValue("df", CompaqVisualFortranCompiler
165 .getInstance()),
166 new ProcessorEnumValue("midl", DevStudioMIDLCompiler.getInstance()),
167 new ProcessorEnumValue("icl", IntelWin32CCompiler.getInstance()),
168 new ProcessorEnumValue("ecl", IntelWin64CCompiler.getInstance()),
169 new ProcessorEnumValue("icc", IntelLinux32CCompiler.getInstance()),
170 new ProcessorEnumValue("ecc", IntelLinux64CCompiler.getInstance()),
171 new ProcessorEnumValue("CC", ForteCCCompiler.getInstance()),
172 new ProcessorEnumValue("aCC", aCCCompiler.getInstance()),
173 new ProcessorEnumValue("os390", OS390CCompiler.getInstance()),
174 new ProcessorEnumValue("os400", IccCompiler.getInstance()),
175 new ProcessorEnumValue("sunc89", C89CCompiler.getInstance()),
176 new ProcessorEnumValue("xlC", VisualAgeCCompiler.getInstance()),
177 new ProcessorEnumValue("cl6x", ClxxCCompiler.getCl6xInstance()),
178 new ProcessorEnumValue("cl55", ClxxCCompiler.getCl55Instance()),
179 new ProcessorEnumValue("armcc", ADSCCompiler.getArmCC()),
180 new ProcessorEnumValue("armcpp", ADSCCompiler.getArmCpp()),
181 new ProcessorEnumValue("tcc", ADSCCompiler.getThumbCC()),
182 new ProcessorEnumValue("tcpp", ADSCCompiler.getThumbCpp()),
183 // userdefined
184 //new ProcessorEnumValue("userdefine", UserdefineCompiler.getInstance()),
185 // GCC Cross Compilers
186 new ProcessorEnumValue(
187 "sparc-sun-solaris2-gcc",
188 net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2.GccCCompiler
189 .getInstance()),
190 new ProcessorEnumValue(
191 "sparc-sun-solaris2-g++",
192 net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2.GccCCompiler
193 .getGppInstance()),
194 new ProcessorEnumValue(
195 "sparc-sun-solaris2-c++",
196 net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2.GccCCompiler
197 .getCppInstance()),
198 new ProcessorEnumValue(
199 "sparc-sun-solaris2-g77",
200 net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2.GccCCompiler
201 .getG77Instance()),
202 // GCC Cross Compilers
203 new ProcessorEnumValue("gcc-cross",
204 net.sf.antcontrib.cpptasks.gcc.cross.GccCCompiler
205 .getInstance()),
206 new ProcessorEnumValue("g++-cross",
207 net.sf.antcontrib.cpptasks.gcc.cross.GccCCompiler
208 .getGppInstance()),
209 new ProcessorEnumValue("c++-cross",
210 net.sf.antcontrib.cpptasks.gcc.cross.GccCCompiler
211 .getCppInstance()),
212 new ProcessorEnumValue("g77-cross",
213 net.sf.antcontrib.cpptasks.gcc.cross.GccCCompiler
214 .getG77Instance()),};
215 public Compiler getCompiler() {
216 return (Compiler) compilers[getIndex()].getProcessor();
217 }
218 public String[] getValues() {
219 return ProcessorEnumValue.getValues(compilers);
220 }
221 }