]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelLinux64Linker.java
Restructuring for better separation of Tool packages.
[mirror_edk2.git] / Tools / Java / Source / Cpptasks / net / sf / antcontrib / cpptasks / intel / IntelLinux64Linker.java
diff --git a/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelLinux64Linker.java b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelLinux64Linker.java
new file mode 100644 (file)
index 0000000..f381403
--- /dev/null
@@ -0,0 +1,55 @@
+/*\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 for IA-64\r
+ * \r
+ * @author Curt Arnold\r
+ */\r
+public final class IntelLinux64Linker 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 IntelLinux64Linker dllLinker = new IntelLinux64Linker(\r
+            "lib", ".so", false, new IntelLinux64Linker("lib", ".so", true,\r
+                    null));\r
+    private static final IntelLinux64Linker instance = new IntelLinux64Linker(\r
+            "", "", false, null);\r
+    public static IntelLinux64Linker getInstance() {\r
+        return instance;\r
+    }\r
+    private IntelLinux64Linker(String outputPrefix, String outputSuffix,\r
+            boolean isLibtool, IntelLinux64Linker libtoolLinker) {\r
+        super("ecc", "-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