+++ /dev/null
-/*\r
- * \r
- * Copyright 2001-2005 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.gcc;\r
-\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.CommandLineAssembler;\r
-import net.sf.antcontrib.cpptasks.compiler.LinkType;\r
-import net.sf.antcontrib.cpptasks.compiler.Linker;\r
-\r
-/**\r
- * Adapter for gcc assemble\r
- * \r
- */\r
-public final class GccAssembler extends CommandLineAssembler {\r
- private final static String[] sourceExtensions = new String[] { ".asm" };\r
-\r
- private final static String[] headerExtensions = new String[] { ".h",\r
- ".inc" };\r
-\r
- private static final GccAssembler instance = new GccAssembler("gas",\r
- sourceExtensions, headerExtensions, false);\r
-\r
- /**\r
- * Gets gcc adapter\r
- */\r
- public static GccAssembler getInstance() {\r
- return instance;\r
- }\r
-\r
- /**\r
- * Private constructor. Use GccAssembler.getInstance() to get singleton\r
- * instance of this class.\r
- */\r
- private GccAssembler (String command, String[] sourceExtensions,\r
- String[] headerExtensions, boolean isLibtool) {\r
- super(command, null, sourceExtensions, headerExtensions,\r
- isLibtool ? ".fo" : ".o");\r
- }\r
-\r
- public void addImpliedArgs(Vector args, boolean debug, Boolean defaultflag) {\r
-\r
- }\r
-\r
- public int getMaximumCommandLength() {\r
- return Integer.MAX_VALUE;\r
- }\r
-\r
- public Linker getLinker(LinkType linkType) {\r
- return GccLinker.getInstance().getLinker(linkType);\r
- }\r
-\r
- protected File[] getEnvironmentIncludePath() {\r
- return CUtil.getPathFromEnvironment("INCLUDE", ":");\r
- }\r
-\r
- protected String getIncludeDirSwitch(String includeDir) {\r
- return "-I" + includeDir;\r
- }\r
-}\r