]>
Commit | Line | Data |
---|---|---|
878ddf1f | 1 | /*\r |
2 | * \r | |
3 | * Copyright 2002-2004 The Ant-Contrib project\r | |
4 | *\r | |
5 | * Licensed under the Apache License, Version 2.0 (the "License");\r | |
6 | * you may not use this file except in compliance with the License.\r | |
7 | * You may obtain a copy of the License at\r | |
8 | *\r | |
9 | * http://www.apache.org/licenses/LICENSE-2.0\r | |
10 | *\r | |
11 | * Unless required by applicable law or agreed to in writing, software\r | |
12 | * distributed under the License is distributed on an "AS IS" BASIS,\r | |
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r | |
14 | * See the License for the specific language governing permissions and\r | |
15 | * limitations under the License.\r | |
16 | */\r | |
17 | package net.sf.antcontrib.cpptasks;\r | |
18 | import net.sf.antcontrib.cpptasks.arm.ADSLinker;\r | |
19 | import net.sf.antcontrib.cpptasks.borland.BorlandLinker;\r | |
20 | import net.sf.antcontrib.cpptasks.compaq.CompaqVisualFortranLinker;\r | |
21 | import net.sf.antcontrib.cpptasks.compiler.Linker;\r | |
22 | import net.sf.antcontrib.cpptasks.devstudio.DevStudioLinker;\r | |
23 | import net.sf.antcontrib.cpptasks.gcc.GccLibrarian;\r | |
24 | import net.sf.antcontrib.cpptasks.gcc.GccLinker;\r | |
25 | import net.sf.antcontrib.cpptasks.gcc.GppLinker;\r | |
26 | import net.sf.antcontrib.cpptasks.gcc.LdLinker;\r | |
27 | import net.sf.antcontrib.cpptasks.hp.aCCLinker;\r | |
28 | import net.sf.antcontrib.cpptasks.ibm.VisualAgeLinker;\r | |
29 | import net.sf.antcontrib.cpptasks.intel.IntelLinux32Linker;\r | |
30 | import net.sf.antcontrib.cpptasks.intel.IntelLinux64Linker;\r | |
31 | import net.sf.antcontrib.cpptasks.intel.IntelWin32Linker;\r | |
32 | import net.sf.antcontrib.cpptasks.os390.OS390Linker;\r | |
33 | import net.sf.antcontrib.cpptasks.os400.IccLinker;\r | |
34 | import net.sf.antcontrib.cpptasks.sun.C89Linker;\r | |
35 | import net.sf.antcontrib.cpptasks.sun.ForteCCLinker;\r | |
36 | import net.sf.antcontrib.cpptasks.ti.ClxxLinker;\r | |
37 | import org.apache.tools.ant.types.EnumeratedAttribute;\r | |
38 | /**\r | |
39 | * Enumeration of supported linkers\r | |
40 | * \r | |
41 | * @author Curt Arnold\r | |
42 | * \r | |
43 | */\r | |
44 | public class LinkerEnum extends EnumeratedAttribute {\r | |
45 | private final static ProcessorEnumValue[] linkers = new ProcessorEnumValue[]{\r | |
46 | new ProcessorEnumValue("gcc", GccLinker.getInstance()),\r | |
47 | new ProcessorEnumValue("g++", GppLinker.getInstance()),\r | |
48 | new ProcessorEnumValue("ld", LdLinker.getInstance()),\r | |
49 | new ProcessorEnumValue("ar", GccLibrarian.getInstance()),\r | |
50 | new ProcessorEnumValue("msvc", DevStudioLinker.getInstance()),\r | |
51 | new ProcessorEnumValue("bcc", BorlandLinker.getInstance()),\r | |
52 | new ProcessorEnumValue("df", CompaqVisualFortranLinker\r | |
53 | .getInstance()),\r | |
54 | new ProcessorEnumValue("icl", IntelWin32Linker.getInstance()),\r | |
55 | new ProcessorEnumValue("ecl", IntelWin32Linker.getInstance()),\r | |
56 | new ProcessorEnumValue("icc", IntelLinux32Linker.getInstance()),\r | |
57 | new ProcessorEnumValue("ecc", IntelLinux64Linker.getInstance()),\r | |
58 | new ProcessorEnumValue("CC", ForteCCLinker.getInstance()),\r | |
59 | new ProcessorEnumValue("aCC", aCCLinker.getInstance()),\r | |
60 | new ProcessorEnumValue("os390", OS390Linker.getInstance()),\r | |
61 | new ProcessorEnumValue("os390batch", OS390Linker\r | |
62 | .getDataSetInstance()),\r | |
63 | new ProcessorEnumValue("os400", IccLinker.getInstance()),\r | |
64 | new ProcessorEnumValue("sunc89", C89Linker.getInstance()),\r | |
65 | new ProcessorEnumValue("xlC", VisualAgeLinker.getInstance()),\r | |
66 | new ProcessorEnumValue("cl6x", ClxxLinker.getCl6xInstance()),\r | |
67 | new ProcessorEnumValue("cl55", ClxxLinker.getCl55Instance()),\r | |
68 | new ProcessorEnumValue("armcc", ADSLinker.getInstance()),\r | |
69 | new ProcessorEnumValue("armcpp", ADSLinker.getInstance()),\r | |
70 | new ProcessorEnumValue("tcc", ADSLinker.getInstance()),\r | |
71 | new ProcessorEnumValue("tcpp", ADSLinker.getInstance()),\r | |
72 | // gcc cross compilers\r | |
73 | new ProcessorEnumValue(\r | |
74 | "sparc-sun-solaris2-gcc",\r | |
75 | net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2.GccLinker\r | |
76 | .getInstance()),\r | |
77 | new ProcessorEnumValue(\r | |
78 | "sparc-sun-solaris2-g++",\r | |
79 | net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2.GppLinker\r | |
80 | .getInstance()),\r | |
81 | new ProcessorEnumValue(\r | |
82 | "sparc-sun-solaris2-ld",\r | |
83 | net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2.LdLinker\r | |
84 | .getInstance()),\r | |
85 | new ProcessorEnumValue(\r | |
86 | "sparc-sun-solaris2-ar",\r | |
87 | net.sf.antcontrib.cpptasks.gcc.cross.sparc_sun_solaris2.GccLibrarian\r | |
88 | .getInstance()),\r | |
89 | new ProcessorEnumValue("gcc-cross",\r | |
90 | net.sf.antcontrib.cpptasks.gcc.cross.GccLinker\r | |
91 | .getInstance()),\r | |
92 | new ProcessorEnumValue("g++-cross",\r | |
93 | net.sf.antcontrib.cpptasks.gcc.cross.GppLinker\r | |
94 | .getInstance()),\r | |
95 | new ProcessorEnumValue("ld-cross",\r | |
96 | net.sf.antcontrib.cpptasks.gcc.cross.LdLinker.getInstance()),\r | |
97 | new ProcessorEnumValue("ar-cross",\r | |
98 | net.sf.antcontrib.cpptasks.gcc.cross.GccLibrarian\r | |
99 | .getInstance()),};\r | |
100 | public Linker getLinker() {\r | |
101 | return (Linker) linkers[getIndex()].getProcessor();\r | |
102 | }\r | |
103 | public String[] getValues() {\r | |
104 | return ProcessorEnumValue.getValues(linkers);\r | |
105 | }\r | |
106 | }\r |