+++ /dev/null
-/*\r
- * \r
- * Copyright 2002-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.intel;\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 the Intel (r) Linker for Linux (r) for IA-32\r
- * \r
- * @author Curt Arnold\r
- */\r
-public final class IntelLinux32Linker extends AbstractLdLinker {\r
- private static final String[] discardFiles = new String[0];\r
- private static final String[] libtoolObjFiles = new String[]{".fo", ".a",\r
- ".lib", ".dll", ".so", ".sl"};\r
- private static final String[] objFiles = new String[]{".o", ".a", ".lib",\r
- ".dll", ".so", ".sl"};\r
- private static final IntelLinux32Linker dllLinker = new IntelLinux32Linker(\r
- "lib", ".so", false, new IntelLinux32Linker("lib", ".so", true,\r
- null));\r
- private static final IntelLinux32Linker instance = new IntelLinux32Linker(\r
- "", "", false, null);\r
- public static IntelLinux32Linker getInstance() {\r
- return instance;\r
- }\r
- private IntelLinux32Linker(String outputPrefix, String outputSuffix,\r
- boolean isLibtool, IntelLinux32Linker libtoolLinker) {\r
- super("icc", "-V", objFiles, discardFiles, outputPrefix, outputSuffix,\r
- isLibtool, libtoolLinker);\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