+++ /dev/null
-/*\r
- * \r
- * Copyright 2003-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.arm;\r
-import java.io.File;\r
-import java.util.Vector;\r
-\r
-import net.sf.antcontrib.cpptasks.CUtil;\r
-import net.sf.antcontrib.cpptasks.compiler.CommandLineLinker;\r
-import net.sf.antcontrib.cpptasks.compiler.LinkType;\r
-import net.sf.antcontrib.cpptasks.compiler.Linker;\r
-import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum;\r
-\r
-/**\r
- * Adapter for the ARM Linker\r
- * \r
- * @author CurtA\r
- */\r
-public class ADSLinker extends CommandLineLinker {\r
- private static final ADSLinker dllInstance = new ADSLinker(".o");\r
- private static final ADSLinker instance = new ADSLinker(".axf");\r
- public static ADSLinker getDllInstance() {\r
- return dllInstance;\r
- }\r
- public static ADSLinker getInstance() {\r
- return instance;\r
- }\r
- private ADSLinker(String outputSuffix) {\r
- super("armlink", "-vsn", new String[]{".o", ".lib", ".res"},\r
- new String[]{".map", ".pdb", ".lnk"}, outputSuffix, false, null);\r
- }\r
- /*\r
- * (non-Javadoc)\r
- * \r
- * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addBase(long,\r
- * java.util.Vector)\r
- */\r
- protected void addBase(long base, Vector args) {\r
- // TODO Auto-generated method stub\r
- }\r
- /*\r
- * (non-Javadoc)\r
- * \r
- * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addFixed(java.lang.Boolean,\r
- * java.util.Vector)\r
- */\r
- protected void addFixed(Boolean fixed, Vector args) {\r
- // TODO Auto-generated method stub\r
- }\r
- /*\r
- * (non-Javadoc)\r
- * \r
- * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addImpliedArgs(boolean,\r
- * net.sf.antcontrib.cpptasks.compiler.LinkType, java.util.Vector)\r
- */\r
- protected void addImpliedArgs(boolean debug, LinkType linkType, Vector args, Boolean defaultflag) {\r
- if (debug) {\r
- args.addElement("-debug");\r
- }\r
- }\r
- /*\r
- * (non-Javadoc)\r
- * \r
- * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addIncremental(boolean,\r
- * java.util.Vector)\r
- */\r
- protected void addIncremental(boolean incremental, Vector args) {\r
- // TODO Auto-generated method stub\r
- }\r
- /*\r
- * (non-Javadoc)\r
- * \r
- * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addMap(boolean,\r
- * java.util.Vector)\r
- */\r
- protected void addMap(boolean map, Vector args) {\r
- // TODO Auto-generated method stub\r
- }\r
- /*\r
- * (non-Javadoc)\r
- * \r
- * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addStack(int,\r
- * java.util.Vector)\r
- */\r
- protected void addStack(int stack, Vector args) {\r
- // TODO Auto-generated method stub\r
- }\r
- /* (non-Javadoc)\r
- * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#addEntry(int, java.util.Vector)\r
- */\r
- protected void addEntry(String entry, Vector args) {\r
- // TODO Auto-generated method stub\r
-\r
- }\r
- \r
- /**\r
- * May have to make this String array return\r
- * \r
- * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#getCommandFileSwitch(java.lang.String)\r
- */\r
- protected String getCommandFileSwitch(String commandFile) {\r
- return "-via" + commandFile;\r
- }\r
- /*\r
- * (non-Javadoc)\r
- * \r
- * @see net.sf.antcontrib.cpptasks.compiler.Linker#getLibraryPath()\r
- */\r
- public File[] getLibraryPath() {\r
- return CUtil.getPathFromEnvironment("ARMLIB", ";");\r
- }\r
- /*\r
- * @see net.sf.antcontrib.cpptasks.compiler.Linker#getLibraryPatterns(java.lang.String[])\r
- */\r
- public String[] getLibraryPatterns(String[] libnames, LibraryTypeEnum libType) {\r
- //\r
- // TODO: looks like bad extension\r
- //\r
- return new String[]{".o"};\r
- }\r
- /*\r
- * (non-Javadoc)\r
- * \r
- * @see net.sf.antcontrib.cpptasks.compiler.Processor#getLinker(net.sf.antcontrib.cpptasks.compiler.LinkType)\r
- */\r
- public Linker getLinker(LinkType linkType) {\r
- return this;\r
- }\r
- /*\r
- * (non-Javadoc)\r
- * \r
- * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#getMaximumCommandLength()\r
- */\r
- protected int getMaximumCommandLength() {\r
- return 1024;\r
- }\r
- /*\r
- * (non-Javadoc)\r
- * \r
- * @see net.sf.antcontrib.cpptasks.compiler.CommandLineLinker#getOutputFileSwitch(java.lang.String)\r
- */\r
- protected String[] getOutputFileSwitch(String outputFile) {\r
- return new String[]{"-output", outputFile};\r
- }\r
- /*\r
- * (non-Javadoc)\r
- * \r
- * @see net.sf.antcontrib.cpptasks.compiler.Linker#isCaseSensitive()\r
- */\r
- public boolean isCaseSensitive() {\r
- return false;\r
- }\r
-}\r