]> git.proxmox.com Git - mirror_edk2.git/blame - Tools/Source/Cpptasks/net/sf/antcontrib/cpptasks/userdefine/UserDefineMapping.java
Changed spelling to manifest
[mirror_edk2.git] / Tools / Source / Cpptasks / net / sf / antcontrib / cpptasks / userdefine / UserDefineMapping.java
CommitLineData
878ddf1f 1/*\r
2 * \r
3 * Copyright 2001-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
17package net.sf.antcontrib.cpptasks.userdefine;\r
878ddf1f 18\r
e6225e3c 19/**\r
20 * Relationship between {family, command type} and flags\r
21 * \r
22 */\r
23public class UserDefineMapping {\r
878ddf1f 24\r
e6225e3c 25 /**\r
26 * Mapping info: include path delimiter <--> family (vendor) + command type\r
27 */\r
28 public static final String[][] includePathFlag = { { "MSFT_CC", "/I" },\r
29 { "GCC_CC", "-I" }, { "INTEL_CC", "/I" },\r
30 { "WINDDK_CC", "/I" }, { "MSFT_ASM", "/I" },\r
31 { "GCC_ASM", "-I" }, { "WINDDK_CC", "/I" },\r
32 { "MSFT_PP", "/I" }, { "GCC_PP", "-I" },\r
33 { "WINDDK_PP", "/I" } };\r
878ddf1f 34\r
e6225e3c 35 /**\r
36 * Mapping info: output file flag <--> family (vendor) + command type\r
37 */\r
38 public static final String[][] outputFileFlag = { { "MSFT_CC", "/Fo" },\r
39 { "GCC_CC", "-o" }, { "INTEL_CC", "/Fo" },\r
40 { "WINDDK_CC", "/Fo" }, { "MSFT_SLINK", "/OUT:" },\r
41 { "GCC_SLINK", "-cr" }, { "INTEL_SLINK", "/OUT:" },\r
42 { "WINDDK_SLINK", "/OUT:" }, { "MSFT_DLINK", "/OUT:" },\r
43 { "GCC_DLINK", "-o" }, { "INTEL_DLINK", "/OUT:" },\r
44 { "WINDDK_DLINK", "/OUT:" }, { "MSFT_ASM", "/Fo" },\r
45 { "GCC_ASM", "-o" }, { "WINDDK_ASM", "/Fo" },\r
46 { "WINDDK_IPF_ASM", "-o" } };\r
878ddf1f 47\r
e6225e3c 48 /**\r
49 * Get include delimiter with vendow and command type.\r
50 * \r
51 * @param vendor\r
52 * Vendor\r
53 * @param commandType\r
54 * Command Type\r
55 * @return include path delimiter\r
56 */\r
57 public static String getIncludePathDelimiter(String vendor,\r
58 String commandType) {\r
878ddf1f 59 String key = vendor + "_" + commandType;\r
60 for (int i = 0; i < includePathFlag.length; i++) {\r
61 if (includePathFlag[i][0].equalsIgnoreCase(key)) {\r
62 return includePathFlag[i][1];\r
63 }\r
64 }\r
509693cc 65 return "/I";\r
878ddf1f 66 }\r
67\r
e6225e3c 68 /**\r
69 * Get Output Flag with vendor and command type.\r
70 * \r
71 * @param vendor\r
72 * Vendor\r
73 * @param commandType\r
74 * Command Type\r
75 * @return Output File Flag\r
76 */\r
77 public static String getOutputFileFlag(String vendor, String commandType) {\r
509693cc 78 String key = vendor + "_" + commandType;\r
878ddf1f 79 for (int i = 0; i < outputFileFlag.length; i++) {\r
80 if (outputFileFlag[i][0].equalsIgnoreCase(key)) {\r
81 return outputFileFlag[i][1];\r
82 }\r
83 }\r
509693cc 84 return "/Fo";\r
878ddf1f 85 }\r
86\r
87}