3 * Copyright 2002-2004 The Ant-Contrib project
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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package net
.sf
.antcontrib
.cpptasks
.compaq
;
19 import java
.util
.Vector
;
21 import net
.sf
.antcontrib
.cpptasks
.compiler
.CommandLineLinker
;
22 import net
.sf
.antcontrib
.cpptasks
.compiler
.LinkType
;
23 import net
.sf
.antcontrib
.cpptasks
.compiler
.Linker
;
24 import net
.sf
.antcontrib
.cpptasks
.devstudio
.DevStudioLibrarian
;
25 import net
.sf
.antcontrib
.cpptasks
.devstudio
.DevStudioProcessor
;
26 import net
.sf
.antcontrib
.cpptasks
.types
.LibraryTypeEnum
;
29 * Adapter for the Compaq(r) Visual Fortran Librarian
33 public class CompaqVisualFortranLibrarian
extends CommandLineLinker
{
34 private static final CompaqVisualFortranLibrarian instance
= new CompaqVisualFortranLibrarian();
35 public static CompaqVisualFortranLibrarian
getInstance() {
38 private CompaqVisualFortranLibrarian() {
39 super("lib", "/bogus", new String
[]{".obj"}, new String
[0], ".lib",
42 protected void addBase(long base
, Vector args
) {
44 protected void addFixed(Boolean fixed
, Vector args
) {
46 protected void addImpliedArgs(boolean debug
, LinkType linkType
, Vector args
, Boolean defaultflag
) {
47 args
.addElement("/nologo");
49 protected void addIncremental(boolean incremental
, Vector args
) {
51 protected void addMap(boolean map
, Vector args
) {
53 protected void addStack(int stack
, Vector args
) {
56 * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addEntry(int, java.util.Vector)
58 protected void addEntry(String entry
, Vector args
) {
61 protected String
getCommandFileSwitch(String commandFile
) {
62 return DevStudioProcessor
.getCommandFileSwitch(commandFile
);
64 public File
[] getLibraryPath() {
67 public String
[] getLibraryPatterns(String
[] libnames
, LibraryTypeEnum libType
) {
70 public Linker
getLinker(LinkType type
) {
71 return CompaqVisualFortranLinker
.getInstance().getLinker(type
);
73 protected int getMaximumCommandLength() {
74 return DevStudioLibrarian
.getInstance().getMaximumCommandLength();
76 protected String
[] getOutputFileSwitch(String outputFile
) {
77 return DevStudioLibrarian
.getInstance().getOutputFileSwitch(outputFile
);
79 public boolean isCaseSensitive() {