From 1381c87965ab669820a4a7b48c09aca026f5b478 Mon Sep 17 00:00:00 2001 From: Mark Donszelmann Date: Fri, 18 Nov 2005 21:02:34 +0000 Subject: --- src/net/sf/antcontrib/cpptasks/intel/CVS/Entries | 10 ++++ .../sf/antcontrib/cpptasks/intel/CVS/Repository | 1 + src/net/sf/antcontrib/cpptasks/intel/CVS/Root | 1 + .../cpptasks/intel/IntelLinux32CCompiler.java | 59 ++++++++++++++++++++++ .../cpptasks/intel/IntelLinux32CLinker.java | 35 +++++++++++++ .../cpptasks/intel/IntelLinux32Compiler.java | 36 +++++++++++++ .../cpptasks/intel/IntelLinux32Linker.java | 56 ++++++++++++++++++++ .../cpptasks/intel/IntelLinux64CCompiler.java | 59 ++++++++++++++++++++++ .../cpptasks/intel/IntelLinux64CLinker.java | 36 +++++++++++++ .../cpptasks/intel/IntelLinux64Compiler.java | 36 +++++++++++++ .../cpptasks/intel/IntelLinux64Linker.java | 56 ++++++++++++++++++++ .../antcontrib/cpptasks/intel/IntelProcessor.java | 51 +++++++++++++++++++ .../cpptasks/intel/IntelWin32CCompiler.java | 53 +++++++++++++++++++ .../cpptasks/intel/IntelWin32Librarian.java | 38 ++++++++++++++ .../cpptasks/intel/IntelWin32Linker.java | 46 +++++++++++++++++ .../cpptasks/intel/IntelWin64CCompiler.java | 53 +++++++++++++++++++ 16 files changed, 626 insertions(+) create mode 100644 src/net/sf/antcontrib/cpptasks/intel/CVS/Entries create mode 100644 src/net/sf/antcontrib/cpptasks/intel/CVS/Repository create mode 100644 src/net/sf/antcontrib/cpptasks/intel/CVS/Root create mode 100644 src/net/sf/antcontrib/cpptasks/intel/IntelLinux32CCompiler.java create mode 100644 src/net/sf/antcontrib/cpptasks/intel/IntelLinux32CLinker.java create mode 100644 src/net/sf/antcontrib/cpptasks/intel/IntelLinux32Compiler.java create mode 100644 src/net/sf/antcontrib/cpptasks/intel/IntelLinux32Linker.java create mode 100644 src/net/sf/antcontrib/cpptasks/intel/IntelLinux64CCompiler.java create mode 100644 src/net/sf/antcontrib/cpptasks/intel/IntelLinux64CLinker.java create mode 100644 src/net/sf/antcontrib/cpptasks/intel/IntelLinux64Compiler.java create mode 100644 src/net/sf/antcontrib/cpptasks/intel/IntelLinux64Linker.java create mode 100644 src/net/sf/antcontrib/cpptasks/intel/IntelProcessor.java create mode 100644 src/net/sf/antcontrib/cpptasks/intel/IntelWin32CCompiler.java create mode 100644 src/net/sf/antcontrib/cpptasks/intel/IntelWin32Librarian.java create mode 100644 src/net/sf/antcontrib/cpptasks/intel/IntelWin32Linker.java create mode 100644 src/net/sf/antcontrib/cpptasks/intel/IntelWin64CCompiler.java (limited to 'src/net/sf/antcontrib/cpptasks/intel') diff --git a/src/net/sf/antcontrib/cpptasks/intel/CVS/Entries b/src/net/sf/antcontrib/cpptasks/intel/CVS/Entries new file mode 100644 index 0000000..644406b --- /dev/null +++ b/src/net/sf/antcontrib/cpptasks/intel/CVS/Entries @@ -0,0 +1,10 @@ +/IntelLinux32CCompiler.java/1.9/Sat Feb 28 19:02:03 2004// +/IntelLinux32Linker.java/1.7/Sat Feb 28 19:02:03 2004// +/IntelLinux64CCompiler.java/1.9/Sat Feb 28 19:02:03 2004// +/IntelLinux64Linker.java/1.6/Sat Feb 28 19:02:03 2004// +/IntelProcessor.java/1.9/Sat Feb 28 19:02:03 2004// +/IntelWin32CCompiler.java/1.9/Sat Feb 28 19:02:03 2004// +/IntelWin32Librarian.java/1.7/Sat Feb 28 19:02:03 2004// +/IntelWin32Linker.java/1.7/Sat Feb 28 19:02:03 2004// +/IntelWin64CCompiler.java/1.9/Sat Feb 28 19:02:03 2004// +D diff --git a/src/net/sf/antcontrib/cpptasks/intel/CVS/Repository b/src/net/sf/antcontrib/cpptasks/intel/CVS/Repository new file mode 100644 index 0000000..526020a --- /dev/null +++ b/src/net/sf/antcontrib/cpptasks/intel/CVS/Repository @@ -0,0 +1 @@ +cpptasks/src/net/sf/antcontrib/cpptasks/intel diff --git a/src/net/sf/antcontrib/cpptasks/intel/CVS/Root b/src/net/sf/antcontrib/cpptasks/intel/CVS/Root new file mode 100644 index 0000000..1ac95cd --- /dev/null +++ b/src/net/sf/antcontrib/cpptasks/intel/CVS/Root @@ -0,0 +1 @@ +:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ant-contrib diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelLinux32CCompiler.java b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux32CCompiler.java new file mode 100644 index 0000000..1513f23 --- /dev/null +++ b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux32CCompiler.java @@ -0,0 +1,59 @@ +/* + * + * Copyright 2002-2004 The Ant-Contrib project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.sf.antcontrib.cpptasks.intel; +import net.sf.antcontrib.cpptasks.compiler.LinkType; +import net.sf.antcontrib.cpptasks.compiler.Linker; +import net.sf.antcontrib.cpptasks.compiler.Processor; +import net.sf.antcontrib.cpptasks.gcc.GccCompatibleCCompiler; + +import org.apache.tools.ant.types.Environment; +/** + * Adapter for the Intel (r) C/C++ compiler for IA-32 Linux (r) + * + * The Intel (r) C/C++ compiler for IA32 Linux mimics the command options for + * gcc compiler. + * + * @author Curt Arnold + */ +public final class IntelLinux32CCompiler extends GccCompatibleCCompiler { + private static final IntelLinux32CCompiler instance = new IntelLinux32CCompiler( + false, new IntelLinux32CCompiler(true, null, false, null), false, + null); + public static IntelLinux32CCompiler getInstance() { + return instance; + } + private IntelLinux32CCompiler(boolean isLibtool, + IntelLinux32CCompiler libtoolCompiler, boolean newEnvironment, + Environment env) { + super("icc", "-V", isLibtool, libtoolCompiler, newEnvironment, env); + } + public Processor changeEnvironment(boolean newEnvironment, Environment env) { + if (newEnvironment || env != null) { + return new IntelLinux32CCompiler(getLibtool(), + (IntelLinux32CCompiler) getLibtoolCompiler(), + newEnvironment, env); + } + return this; + } + public Linker getLinker(LinkType type) { + // FREEHEP + return IntelLinux32CLinker.getInstance().getLinker(type); + } + public int getMaximumCommandLength() { + return Integer.MAX_VALUE; + } +} diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelLinux32CLinker.java b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux32CLinker.java new file mode 100644 index 0000000..49a8a57 --- /dev/null +++ b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux32CLinker.java @@ -0,0 +1,35 @@ +// FREEHEP +package net.sf.antcontrib.cpptasks.intel; +import net.sf.antcontrib.cpptasks.compiler.LinkType; +import net.sf.antcontrib.cpptasks.compiler.Linker; +import net.sf.antcontrib.cpptasks.gcc.AbstractLdLinker; +import net.sf.antcontrib.cpptasks.gcc.GccLibrarian; +public final class IntelLinux32CLinker extends AbstractLdLinker { + private static final String[] discardFiles = new String[0]; + private static final String[] libtoolObjFiles = new String[]{".fo", ".a", + ".lib", ".dll", ".so", ".sl"}; + private static final String[] objFiles = new String[]{".o", ".a", ".lib", + ".dll", ".so", ".sl"}; + private static final IntelLinux32CLinker dllLinker = new IntelLinux32CLinker( + "lib", ".so", false, new IntelLinux32CLinker("lib", ".so", true, + null)); + private static final IntelLinux32CLinker instance = new IntelLinux32CLinker( + "", "", false, null); + public static IntelLinux32CLinker getInstance() { + return instance; + } + private IntelLinux32CLinker(String outputPrefix, String outputSuffix, + boolean isLibtool, IntelLinux32CLinker libtoolLinker) { + super("icc", "-V", objFiles, discardFiles, outputPrefix, outputSuffix, + isLibtool, libtoolLinker); + } + public Linker getLinker(LinkType type) { + if (type.isStaticLibrary()) { + return GccLibrarian.getInstance(); + } + if (type.isSharedLibrary()) { + return dllLinker; + } + return instance; + } +} diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelLinux32Compiler.java b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux32Compiler.java new file mode 100644 index 0000000..d4feac3 --- /dev/null +++ b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux32Compiler.java @@ -0,0 +1,36 @@ +// FREEHEP +package net.sf.antcontrib.cpptasks.intel; +import net.sf.antcontrib.cpptasks.compiler.LinkType; +import net.sf.antcontrib.cpptasks.compiler.Linker; +import net.sf.antcontrib.cpptasks.compiler.Processor; +import net.sf.antcontrib.cpptasks.gcc.GccCompatibleCCompiler; + +import org.apache.tools.ant.types.Environment; + +public final class IntelLinux32Compiler extends GccCompatibleCCompiler { + private static final IntelLinux32Compiler instance = new IntelLinux32Compiler( + false, new IntelLinux32Compiler(true, null, false, null), false, + null); + public static IntelLinux32Compiler getInstance() { + return instance; + } + private IntelLinux32Compiler(boolean isLibtool, + IntelLinux32Compiler libtoolCompiler, boolean newEnvironment, + Environment env) { + super("icpc", "-V", isLibtool, libtoolCompiler, newEnvironment, env); + } + public Processor changeEnvironment(boolean newEnvironment, Environment env) { + if (newEnvironment || env != null) { + return new IntelLinux32Compiler(getLibtool(), + (IntelLinux32Compiler) getLibtoolCompiler(), + newEnvironment, env); + } + return this; + } + public Linker getLinker(LinkType type) { + return IntelLinux32Linker.getInstance().getLinker(type); + } + public int getMaximumCommandLength() { + return Integer.MAX_VALUE; + } +} diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelLinux32Linker.java b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux32Linker.java new file mode 100644 index 0000000..e6ddee1 --- /dev/null +++ b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux32Linker.java @@ -0,0 +1,56 @@ +/* + * + * Copyright 2002-2004 The Ant-Contrib project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.sf.antcontrib.cpptasks.intel; +import net.sf.antcontrib.cpptasks.compiler.LinkType; +import net.sf.antcontrib.cpptasks.compiler.Linker; +import net.sf.antcontrib.cpptasks.gcc.AbstractLdLinker; +import net.sf.antcontrib.cpptasks.gcc.GccLibrarian; +/** + * Adapter for the Intel (r) Linker for Linux (r) for IA-32 + * + * @author Curt Arnold + */ +public final class IntelLinux32Linker extends AbstractLdLinker { + private static final String[] discardFiles = new String[0]; + private static final String[] libtoolObjFiles = new String[]{".fo", ".a", + ".lib", ".dll", ".so", ".sl"}; + private static final String[] objFiles = new String[]{".o", ".a", ".lib", + ".dll", ".so", ".sl"}; + private static final IntelLinux32Linker dllLinker = new IntelLinux32Linker( + "lib", ".so", false, new IntelLinux32Linker("lib", ".so", true, + null)); + private static final IntelLinux32Linker instance = new IntelLinux32Linker( + "", "", false, null); + public static IntelLinux32Linker getInstance() { + return instance; + } + private IntelLinux32Linker(String outputPrefix, String outputSuffix, + boolean isLibtool, IntelLinux32Linker libtoolLinker) { +// FREEHEP + super("icpc", "-V", objFiles, discardFiles, outputPrefix, outputSuffix, + isLibtool, libtoolLinker); + } + public Linker getLinker(LinkType type) { + if (type.isStaticLibrary()) { + return GccLibrarian.getInstance(); + } + if (type.isSharedLibrary()) { + return dllLinker; + } + return instance; + } +} diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelLinux64CCompiler.java b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux64CCompiler.java new file mode 100644 index 0000000..1d9f6c5 --- /dev/null +++ b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux64CCompiler.java @@ -0,0 +1,59 @@ +/* + * + * Copyright 2002-2004 The Ant-Contrib project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.sf.antcontrib.cpptasks.intel; +import net.sf.antcontrib.cpptasks.compiler.LinkType; +import net.sf.antcontrib.cpptasks.compiler.Linker; +import net.sf.antcontrib.cpptasks.compiler.Processor; +import net.sf.antcontrib.cpptasks.gcc.GccCompatibleCCompiler; + +import org.apache.tools.ant.types.Environment; +/** + * Adapter for the Intel (r) C/C++ compiler for IA-64 Linux (r) + * + * The Intel C/C++ compiler for IA-64 Linux mimics the command options for gcc + * compiler. + * + * @author Curt Arnold + */ +public final class IntelLinux64CCompiler extends GccCompatibleCCompiler { + private static final IntelLinux64CCompiler instance = new IntelLinux64CCompiler( + false, new IntelLinux64CCompiler(true, null, false, null), false, + null); + public static IntelLinux64CCompiler getInstance() { + return instance; + } + private IntelLinux64CCompiler(boolean isLibtool, + IntelLinux64CCompiler libtoolCompiler, boolean newEnvironment, + Environment env) { + super("ecc", "-V", isLibtool, libtoolCompiler, newEnvironment, env); + } + public Processor changeEnvironment(boolean newEnvironment, Environment env) { + if (newEnvironment || env != null) { + return new IntelLinux64CCompiler(getLibtool(), + (IntelLinux64CCompiler) this.getLibtoolCompiler(), + newEnvironment, env); + } + return this; + } + public Linker getLinker(LinkType type) { +// FREEHEP + return IntelLinux64CLinker.getInstance().getLinker(type); + } + public int getMaximumCommandLength() { + return Integer.MAX_VALUE; + } +} diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelLinux64CLinker.java b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux64CLinker.java new file mode 100644 index 0000000..ec25e9e --- /dev/null +++ b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux64CLinker.java @@ -0,0 +1,36 @@ +// FREEHEP +package net.sf.antcontrib.cpptasks.intel; +import net.sf.antcontrib.cpptasks.compiler.LinkType; +import net.sf.antcontrib.cpptasks.compiler.Linker; +import net.sf.antcontrib.cpptasks.gcc.AbstractLdLinker; +import net.sf.antcontrib.cpptasks.gcc.GccLibrarian; + +public final class IntelLinux64CLinker extends AbstractLdLinker { + private static final String[] discardFiles = new String[0]; + private static final String[] libtoolObjFiles = new String[]{".fo", ".a", + ".lib", ".dll", ".so", ".sl"}; + private static final String[] objFiles = new String[]{".o", ".a", ".lib", + ".dll", ".so", ".sl"}; + private static final IntelLinux64CLinker dllLinker = new IntelLinux64CLinker( + "lib", ".so", false, new IntelLinux64CLinker("lib", ".so", true, + null)); + private static final IntelLinux64CLinker instance = new IntelLinux64CLinker( + "", "", false, null); + public static IntelLinux64CLinker getInstance() { + return instance; + } + private IntelLinux64CLinker(String outputPrefix, String outputSuffix, + boolean isLibtool, IntelLinux64CLinker libtoolLinker) { + super("ecc", "-V", objFiles, discardFiles, outputPrefix, outputSuffix, + isLibtool, libtoolLinker); + } + public Linker getLinker(LinkType type) { + if (type.isStaticLibrary()) { + return GccLibrarian.getInstance(); + } + if (type.isSharedLibrary()) { + return dllLinker; + } + return instance; + } +} diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelLinux64Compiler.java b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux64Compiler.java new file mode 100644 index 0000000..531de0c --- /dev/null +++ b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux64Compiler.java @@ -0,0 +1,36 @@ +// FREEHEP +package net.sf.antcontrib.cpptasks.intel; +import net.sf.antcontrib.cpptasks.compiler.LinkType; +import net.sf.antcontrib.cpptasks.compiler.Linker; +import net.sf.antcontrib.cpptasks.compiler.Processor; +import net.sf.antcontrib.cpptasks.gcc.GccCompatibleCCompiler; + +import org.apache.tools.ant.types.Environment; + +public final class IntelLinux64Compiler extends GccCompatibleCCompiler { + private static final IntelLinux64Compiler instance = new IntelLinux64Compiler( + false, new IntelLinux64Compiler(true, null, false, null), false, + null); + public static IntelLinux64Compiler getInstance() { + return instance; + } + private IntelLinux64Compiler(boolean isLibtool, + IntelLinux64Compiler libtoolCompiler, boolean newEnvironment, + Environment env) { + super("ecpc", "-V", isLibtool, libtoolCompiler, newEnvironment, env); + } + public Processor changeEnvironment(boolean newEnvironment, Environment env) { + if (newEnvironment || env != null) { + return new IntelLinux64Compiler(getLibtool(), + (IntelLinux64Compiler) this.getLibtoolCompiler(), + newEnvironment, env); + } + return this; + } + public Linker getLinker(LinkType type) { + return IntelLinux64Linker.getInstance().getLinker(type); + } + public int getMaximumCommandLength() { + return Integer.MAX_VALUE; + } +} diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelLinux64Linker.java b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux64Linker.java new file mode 100644 index 0000000..6798c3f --- /dev/null +++ b/src/net/sf/antcontrib/cpptasks/intel/IntelLinux64Linker.java @@ -0,0 +1,56 @@ +/* + * + * Copyright 2002-2004 The Ant-Contrib project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.sf.antcontrib.cpptasks.intel; +import net.sf.antcontrib.cpptasks.compiler.LinkType; +import net.sf.antcontrib.cpptasks.compiler.Linker; +import net.sf.antcontrib.cpptasks.gcc.AbstractLdLinker; +import net.sf.antcontrib.cpptasks.gcc.GccLibrarian; +/** + * Adapter for the Intel (r) linker for Linux for IA-64 + * + * @author Curt Arnold + */ +public final class IntelLinux64Linker extends AbstractLdLinker { + private static final String[] discardFiles = new String[0]; + private static final String[] libtoolObjFiles = new String[]{".fo", ".a", + ".lib", ".dll", ".so", ".sl"}; + private static final String[] objFiles = new String[]{".o", ".a", ".lib", + ".dll", ".so", ".sl"}; + private static final IntelLinux64Linker dllLinker = new IntelLinux64Linker( + "lib", ".so", false, new IntelLinux64Linker("lib", ".so", true, + null)); + private static final IntelLinux64Linker instance = new IntelLinux64Linker( + "", "", false, null); + public static IntelLinux64Linker getInstance() { + return instance; + } + private IntelLinux64Linker(String outputPrefix, String outputSuffix, + boolean isLibtool, IntelLinux64Linker libtoolLinker) { +// FREEHEP + super("ecpc", "-V", objFiles, discardFiles, outputPrefix, outputSuffix, + isLibtool, libtoolLinker); + } + public Linker getLinker(LinkType type) { + if (type.isStaticLibrary()) { + return GccLibrarian.getInstance(); + } + if (type.isSharedLibrary()) { + return dllLinker; + } + return instance; + } +} diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelProcessor.java b/src/net/sf/antcontrib/cpptasks/intel/IntelProcessor.java new file mode 100644 index 0000000..ed7c61a --- /dev/null +++ b/src/net/sf/antcontrib/cpptasks/intel/IntelProcessor.java @@ -0,0 +1,51 @@ +/* + * + * Copyright 2002-2004 The Ant-Contrib project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.sf.antcontrib.cpptasks.intel; +import java.util.Vector; + +import net.sf.antcontrib.cpptasks.devstudio.DevStudioProcessor; +/** + * A add-in class for Intel (r) compilers and linkers + * + * + */ +public class IntelProcessor { + public static void addWarningSwitch(Vector args, int level) { + DevStudioProcessor.addWarningSwitch(args, level); + } + public static String getCommandFileSwitch(String cmdFile) { + return DevStudioProcessor.getCommandFileSwitch(cmdFile); + } + public static void getDefineSwitch(StringBuffer buffer, String define, + String value) { + DevStudioProcessor.getDefineSwitch(buffer, define, value); + } + public static String getIncludeDirSwitch(String includeDir) { + return DevStudioProcessor.getIncludeDirSwitch(includeDir); + } + public static String[] getOutputFileSwitch(String outPath) { + return DevStudioProcessor.getOutputFileSwitch(outPath); + } + public static void getUndefineSwitch(StringBuffer buffer, String define) { + DevStudioProcessor.getUndefineSwitch(buffer, define); + } + public static boolean isCaseSensitive() { + return false; + } + private IntelProcessor() { + } +} diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelWin32CCompiler.java b/src/net/sf/antcontrib/cpptasks/intel/IntelWin32CCompiler.java new file mode 100644 index 0000000..e006af2 --- /dev/null +++ b/src/net/sf/antcontrib/cpptasks/intel/IntelWin32CCompiler.java @@ -0,0 +1,53 @@ +/* + * + * Copyright 2002-2004 The Ant-Contrib project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.sf.antcontrib.cpptasks.intel; +import net.sf.antcontrib.cpptasks.compiler.LinkType; +import net.sf.antcontrib.cpptasks.compiler.Linker; +import net.sf.antcontrib.cpptasks.compiler.Processor; +import net.sf.antcontrib.cpptasks.devstudio.DevStudioCompatibleCCompiler; + +import org.apache.tools.ant.types.Environment; +/** + * Adapter for the Intel (r) C++ compiler for 32-bit applications + * + * The Intel (r) C++ compiler for IA32 Windows mimics the command options for + * the Microsoft (r) C++ compiler. + * + * @author Curt Arnold + */ +public final class IntelWin32CCompiler extends DevStudioCompatibleCCompiler { + private static final IntelWin32CCompiler instance = new IntelWin32CCompiler( + false, null); + public static IntelWin32CCompiler getInstance() { + return instance; + } + private IntelWin32CCompiler(boolean newEnvironment, Environment env) { + super("icl", null, newEnvironment, env); + } + public Processor changeEnvironment(boolean newEnvironment, Environment env) { + if (newEnvironment || env != null) { + return new IntelWin32CCompiler(newEnvironment, env); + } + return this; + } + public Linker getLinker(LinkType type) { + return IntelWin32Linker.getInstance().getLinker(type); + } + public int getMaximumCommandLength() { + return 1024; + } +} diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelWin32Librarian.java b/src/net/sf/antcontrib/cpptasks/intel/IntelWin32Librarian.java new file mode 100644 index 0000000..39353d4 --- /dev/null +++ b/src/net/sf/antcontrib/cpptasks/intel/IntelWin32Librarian.java @@ -0,0 +1,38 @@ +/* + * + * Copyright 2002-2004 The Ant-Contrib project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.sf.antcontrib.cpptasks.intel; +import net.sf.antcontrib.cpptasks.compiler.LinkType; +import net.sf.antcontrib.cpptasks.compiler.Linker; +import net.sf.antcontrib.cpptasks.devstudio.DevStudioCompatibleLibrarian; +/** + * Adapter for the xilib from the Intel(r) C++ Compiler for IA-32 or IA-64 + * systems running Microsoft (r) operating systems + * + * @author Curt Arnold + */ +public class IntelWin32Librarian extends DevStudioCompatibleLibrarian { + private static final IntelWin32Librarian instance = new IntelWin32Librarian(); + public static IntelWin32Librarian getInstance() { + return instance; + } + protected IntelWin32Librarian() { + super("xilib", "/bogus"); + } + public Linker getLinker(LinkType type) { + return IntelWin32Linker.getInstance().getLinker(type); + } +} diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelWin32Linker.java b/src/net/sf/antcontrib/cpptasks/intel/IntelWin32Linker.java new file mode 100644 index 0000000..fe0642f --- /dev/null +++ b/src/net/sf/antcontrib/cpptasks/intel/IntelWin32Linker.java @@ -0,0 +1,46 @@ +/* + * + * Copyright 2002-2004 The Ant-Contrib project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.sf.antcontrib.cpptasks.intel; +import net.sf.antcontrib.cpptasks.compiler.LinkType; +import net.sf.antcontrib.cpptasks.compiler.Linker; +import net.sf.antcontrib.cpptasks.devstudio.DevStudioCompatibleLinker; +/** + * Adapter for the Intel (r) linker for 32-bit applications + * + * @author Curt Arnold + */ +public final class IntelWin32Linker extends DevStudioCompatibleLinker { + private static final IntelWin32Linker dllLinker = new IntelWin32Linker( + ".dll"); + private static final IntelWin32Linker instance = new IntelWin32Linker( + ".exe"); + public static IntelWin32Linker getInstance() { + return instance; + } + private IntelWin32Linker(String outputSuffix) { + super("xilink", "/bogus", outputSuffix); + } + public Linker getLinker(LinkType type) { + if (type.isStaticLibrary()) { + return IntelWin32Librarian.getInstance(); + } + if (type.isSharedLibrary()) { + return dllLinker; + } + return instance; + } +} diff --git a/src/net/sf/antcontrib/cpptasks/intel/IntelWin64CCompiler.java b/src/net/sf/antcontrib/cpptasks/intel/IntelWin64CCompiler.java new file mode 100644 index 0000000..5927d0f --- /dev/null +++ b/src/net/sf/antcontrib/cpptasks/intel/IntelWin64CCompiler.java @@ -0,0 +1,53 @@ +/* + * + * Copyright 2002-2004 The Ant-Contrib project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.sf.antcontrib.cpptasks.intel; +import net.sf.antcontrib.cpptasks.compiler.LinkType; +import net.sf.antcontrib.cpptasks.compiler.Linker; +import net.sf.antcontrib.cpptasks.compiler.Processor; +import net.sf.antcontrib.cpptasks.devstudio.DevStudioCompatibleCCompiler; + +import org.apache.tools.ant.types.Environment; +/** + * Adapter for the Intel C++ compiler for Itanium(TM) Applications + * + * @author Curt Arnold + */ +public final class IntelWin64CCompiler extends DevStudioCompatibleCCompiler { + private static final IntelWin64CCompiler instance = new IntelWin64CCompiler( + false, null); + public static IntelWin64CCompiler getInstance() { + return instance; + } + private IntelWin64CCompiler(boolean newEnvironment, Environment env) { + super("ecl", null, newEnvironment, env); + } + public Processor changeEnvironment(boolean newEnvironment, Environment env) { + if (newEnvironment || env != null) { + return new IntelWin64CCompiler(newEnvironment, env); + } + return this; + } + public Linker getLinker(LinkType type) { + // + // currently the Intel Win32 and Win64 linkers + // are command line equivalent + return IntelWin32Linker.getInstance().getLinker(type); + } + public int getMaximumCommandLength() { + return 1024; + } +} -- cgit v1.2.3