]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/Cpptasks/net/sf/antcontrib/cpptasks/devstudio/DevStudioCompatibleLibrarian.java
Changed spelling to manifest
[mirror_edk2.git] / Tools / Source / Cpptasks / net / sf / antcontrib / cpptasks / devstudio / DevStudioCompatibleLibrarian.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.devstudio;
18 import java.io.File;
19 import java.util.Vector;
20
21 import net.sf.antcontrib.cpptasks.compiler.CommandLineLinker;
22 import net.sf.antcontrib.cpptasks.compiler.LinkType;
23 import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;
24 /**
25 * Abstract base adapter for librarians with command line options compatible
26 * with the Microsoft(r) Library Manager
27 *
28 * @author Curt Arnold
29 */
30 public abstract class DevStudioCompatibleLibrarian extends CommandLineLinker {
31 private static String[] defaultflags = new String[]{"/nologo"};
32 public DevStudioCompatibleLibrarian(String command, String identifierArg) {
33 super(command, identifierArg, new String[]{".obj"}, new String[0],
34 ".lib", false, null);
35 }
36 protected void addBase(long base, Vector args) {
37 }
38 protected void addFixed(Boolean fixed, Vector args) {
39 }
40 protected void addImpliedArgs(boolean debug, LinkType linkType,
41 Vector args, Boolean defaultflag) {
42 if(defaultflag != null && defaultflag.booleanValue()){
43 for (int i = 0; i < defaultflags.length; i++) {
44 args.addElement(defaultflags[i]);
45 }
46 }
47 }
48 protected void addIncremental(boolean incremental, Vector args) {
49 }
50 protected void addMap(boolean map, Vector args) {
51 }
52 protected void addStack(int stack, Vector args) {
53 }
54 /* (non-Javadoc)
55 * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addEntry(int, java.util.Vector)
56 */
57 protected void addEntry(String entry, Vector args) {
58 }
59
60 protected String getCommandFileSwitch(String cmdFile) {
61 return "@" + cmdFile;
62 }
63 public File[] getLibraryPath() {
64 return new File[0];
65 }
66 public String[] getLibraryPatterns(String[] libnames, LibraryTypeEnum libType) {
67 return new String[0];
68 }
69 public int getMaximumCommandLength() {
70 return 4096;
71 }
72 public String[] getOutputFileSwitch(String outFile) {
73 StringBuffer buf = new StringBuffer("/OUT:");
74 if (outFile.indexOf(' ') >= 0) {
75 buf.append('"');
76 buf.append(outFile);
77 buf.append('"');
78 } else {
79 buf.append(outFile);
80 }
81 return new String[]{buf.toString()};
82 }
83 public boolean isCaseSensitive() {
84 return false;
85 }
86 }