]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/Cpptasks/net/sf/antcontrib/cpptasks/userdefine/UserDefineMapping.java
Change to new XML Schema.
[mirror_edk2.git] / Tools / Source / Cpptasks / net / sf / antcontrib / cpptasks / userdefine / UserDefineMapping.java
1 /*
2 *
3 * Copyright 2001-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.userdefine;
18 public class UserDefineMapping {
19
20
21 // list of Vendor: Microsoft, Intel, Gcc
22 public final String[] families = { "MSFT", "INTEL", "GCC"};
23
24 // list of Command Type: CC, SLINK, DLINK, ASL, ASM, ASMLINK, PP
25 public final String[] commandType = { "CC", "SLINK", "DLINK", "ASL",
26 "ASM", "ASMLINK", "PP" };
27
28 public final String[][] includePathFlag = { { "MSFT_CC", "/I" },
29 { "GCC_CC", "-I" }, { "INTEL_CC", "/I" }, { "WINDDK_CC", "/I" },
30 { "MSFT_ASM", "/I" }, { "GCC_ASM", "-I" }, { "WINDDK_CC", "/I" },
31 { "MSFT_PP", "/I" }, { "GCC_PP", "-I" }, { "WINDDK_PP", "/I" } };
32
33 public final String[][] outputFileFlag = { { "MSFT_CC", "/Fo" },
34 { "GCC_CC", "-o" }, { "INTEL_CC", "/Fo" }, { "WINDDK_CC", "/Fo" },
35 { "MSFT_SLINK", "/OUT:" }, { "GCC_SLINK", "-cr" },
36 { "INTEL_SLINK", "/OUT:" }, { "WINDDK_SLINK", "/OUT:" },
37 { "MSFT_DLINK", "/OUT:" }, { "GCC_DLINK", "-o" },
38 { "INTEL_DLINK", "/OUT:" }, { "WINDDK_DLINK", "/OUT:" },
39 { "MSFT_ASM", "/Fo" }, { "GCC_ASM", "-o" },
40 { "WINDDK_ASM", "/Fo" },{"WINDDK_IPF_ASM", "-o"} };
41
42 public String getIncludePathDelimiter(String vendor,
43 String commandType) {
44 String key = vendor + "_" + commandType;
45 for (int i = 0; i < includePathFlag.length; i++) {
46 if (includePathFlag[i][0].equalsIgnoreCase(key)) {
47 return includePathFlag[i][1];
48 }
49 }
50 return "/I";
51 }
52
53 public String getOutputFileFlag(String vendor, String commandType) {
54 String key = vendor + "_" + commandType;
55 for (int i = 0; i < outputFileFlag.length; i++) {
56 if (outputFileFlag[i][0].equalsIgnoreCase(key)) {
57 return outputFileFlag[i][1];
58 }
59 }
60 return "/Fo";
61 }
62
63 }