]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/LinkerEnum.java
Restructuring for better separation of Tool packages.
[mirror_edk2.git] / Tools / Java / Source / Cpptasks / net / sf / antcontrib / cpptasks / LinkerEnum.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.ADSLinker;
19 import net.sf.antcontrib.cpptasks.borland.BorlandLinker;
20 import net.sf.antcontrib.cpptasks.compaq.CompaqVisualFortranLinker;
21 import net.sf.antcontrib.cpptasks.compiler.Linker;
22 import net.sf.antcontrib.cpptasks.devstudio.DevStudioLinker;
23 import net.sf.antcontrib.cpptasks.gcc.GccLibrarian;
24 import net.sf.antcontrib.cpptasks.gcc.GccLinker;
25 import net.sf.antcontrib.cpptasks.gcc.GppLinker;
26 import net.sf.antcontrib.cpptasks.gcc.LdLinker;
27 import net.sf.antcontrib.cpptasks.hp.aCCLinker;
28 import net.sf.antcontrib.cpptasks.ibm.VisualAgeLinker;
29 import net.sf.antcontrib.cpptasks.intel.IntelLinux32Linker;
30 import net.sf.antcontrib.cpptasks.intel.IntelLinux64Linker;
31 import net.sf.antcontrib.cpptasks.intel.IntelWin32Linker;
32 import net.sf.antcontrib.cpptasks.os390.OS390Linker;
33 import net.sf.antcontrib.cpptasks.os400.IccLinker;
34 import net.sf.antcontrib.cpptasks.sun.C89Linker;
35 import net.sf.antcontrib.cpptasks.sun.ForteCCLinker;
36 import net.sf.antcontrib.cpptasks.ti.ClxxLinker;
37 import org.apache.tools.ant.types.EnumeratedAttribute;
38 /**
39 * Enumeration of supported linkers
40 *
41 * @author Curt Arnold
42 *
43 */
44 public class LinkerEnum extends EnumeratedAttribute {
45 private final static ProcessorEnumValue[] linkers = new ProcessorEnumValue[]{
46 new ProcessorEnumValue("gcc", GccLinker.getInstance()),
47 new ProcessorEnumValue("g++", GppLinker.getInstance()),
48 new ProcessorEnumValue("ld", LdLinker.getInstance()),
49 new ProcessorEnumValue("ar", GccLibrarian.getInstance()),
50 new ProcessorEnumValue("msvc", DevStudioLinker.getInstance()),
51 new ProcessorEnumValue("bcc", BorlandLinker.getInstance()),
52 new ProcessorEnumValue("df", CompaqVisualFortranLinker
53 .getInstance()),
54 new ProcessorEnumValue("icl", IntelWin32Linker.getInstance()),
55 new ProcessorEnumValue("ecl", IntelWin32Linker.getInstance()),
56 new ProcessorEnumValue("icc", IntelLinux32Linker.getInstance()),
57 new ProcessorEnumValue("ecc", IntelLinux64Linker.getInstance()),
58 new ProcessorEnumValue("CC", ForteCCLinker.getInstance()),
59 new ProcessorEnumValue("aCC", aCCLinker.getInstance()),
60 new ProcessorEnumValue("os390", OS390Linker.getInstance()),
61 new ProcessorEnumValue("os390batch", OS390Linker
62 .getDataSetInstance()),
63 new ProcessorEnumValue("os400", IccLinker.getInstance()),
64 new ProcessorEnumValue("sunc89", C89Linker.getInstance()),
65 new ProcessorEnumValue("xlC", VisualAgeLinker.getInstance()),
66 new ProcessorEnumValue("cl6x", ClxxLinker.getCl6xInstance()),
67 new ProcessorEnumValue("cl55", ClxxLinker.getCl55Instance()),
68 new ProcessorEnumValue("armcc", ADSLinker.getInstance()),
69 new ProcessorEnumValue("armcpp", ADSLinker.getInstance()),
70 new ProcessorEnumValue("tcc", ADSLinker.getInstance()),
71 new ProcessorEnumValue("tcpp", ADSLinker.getInstance()),
72 // gcc cross compilers
73 new ProcessorEnumValue(
74 "sparc-sun-solaris2-gcc",
75 net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2.GccLinker
76 .getInstance()),
77 new ProcessorEnumValue(
78 "sparc-sun-solaris2-g++",
79 net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2.GppLinker
80 .getInstance()),
81 new ProcessorEnumValue(
82 "sparc-sun-solaris2-ld",
83 net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2.LdLinker
84 .getInstance()),
85 new ProcessorEnumValue(
86 "sparc-sun-solaris2-ar",
87 net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2.GccLibrarian
88 .getInstance()),
89 new ProcessorEnumValue("gcc-cross",
90 net.sf.antcontrib.cpptasks.gcc.cross.GccLinker
91 .getInstance()),
92 new ProcessorEnumValue("g++-cross",
93 net.sf.antcontrib.cpptasks.gcc.cross.GppLinker
94 .getInstance()),
95 new ProcessorEnumValue("ld-cross",
96 net.sf.antcontrib.cpptasks.gcc.cross.LdLinker.getInstance()),
97 new ProcessorEnumValue("ar-cross",
98 net.sf.antcontrib.cpptasks.gcc.cross.GccLibrarian
99 .getInstance()),};
100 public Linker getLinker() {
101 return (Linker) linkers[getIndex()].getProcessor();
102 }
103 public String[] getValues() {
104 return ProcessorEnumValue.getValues(linkers);
105 }
106 }