+++ /dev/null
-/*\r
- * \r
- * Copyright 2001-2004 The Ant-Contrib project\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package net.sf.antcontrib.cpptasks.ibm;\r
-import java.util.Vector;\r
-\r
-import net.sf.antcontrib.cpptasks.compiler.LinkType;\r
-import net.sf.antcontrib.cpptasks.compiler.Linker;\r
-import net.sf.antcontrib.cpptasks.gcc.AbstractLdLinker;\r
-import net.sf.antcontrib.cpptasks.gcc.GccLibrarian;\r
-/**\r
- * Adapter for IBM(r) Visual Age(tm) Linker for AIX(tm)\r
- * \r
- * @author Curt Arnold\r
- */\r
-public final class VisualAgeLinker extends AbstractLdLinker {\r
- private static final String[] discardFiles = new String[]{};\r
- private static final String[] objFiles = new String[]{".o", ".a", ".lib",\r
- ".dll", ".so", ".sl"};\r
- private static final VisualAgeLinker dllLinker = new VisualAgeLinker(\r
- "makeC++SharedLib", objFiles, discardFiles, "lib", ".so");\r
- private static final VisualAgeLinker instance = new VisualAgeLinker("xlC",\r
- objFiles, discardFiles, "", "");\r
- public static VisualAgeLinker getInstance() {\r
- return instance;\r
- }\r
- private VisualAgeLinker(String command, String[] extensions,\r
- String[] ignoredExtensions, String outputPrefix, String outputSuffix) {\r
- //\r
- // just guessing that -? might display something useful\r
- //\r
- super(command, "-?", extensions, ignoredExtensions, outputPrefix,\r
- outputSuffix, false, null);\r
- }\r
- public void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {\r
- if (debug) {\r
- //args.addElement("-g");\r
- }\r
- if (linkType.isSharedLibrary()) {\r
- //args.addElement("-G");\r
- }\r
- }\r
- public Linker getLinker(LinkType type) {\r
- if (type.isStaticLibrary()) {\r
- return GccLibrarian.getInstance();\r
- }\r
- if (type.isSharedLibrary()) {\r
- return dllLinker;\r
- }\r
- return instance;\r
- }\r
- /**\r
- * Gets identifier for the compiler.\r
- * \r
- * Initial attempt at extracting version information\r
- * would lock up. Using a stock response.\r
- */\r
- public String getIdentifier() {\r
- return "VisualAge linker - unidentified version";\r
- }\r
- \r
-}\r