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