summaryrefslogtreecommitdiffstats
path: root/org.rtems.cdt.toolchain2/org/rtems/cdt/build/CommandLineGenerator.java
diff options
context:
space:
mode:
Diffstat (limited to 'org.rtems.cdt.toolchain2/org/rtems/cdt/build/CommandLineGenerator.java')
-rw-r--r--org.rtems.cdt.toolchain2/org/rtems/cdt/build/CommandLineGenerator.java82
1 files changed, 0 insertions, 82 deletions
diff --git a/org.rtems.cdt.toolchain2/org/rtems/cdt/build/CommandLineGenerator.java b/org.rtems.cdt.toolchain2/org/rtems/cdt/build/CommandLineGenerator.java
deleted file mode 100644
index 9fa7bdd..0000000
--- a/org.rtems.cdt.toolchain2/org/rtems/cdt/build/CommandLineGenerator.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2008
- * Embedded Brains GmbH
- * Obere Lagerstr. 30
- * D-82178 Puchheim
- * Germany
- * rtems@embedded-brains.de
- *
- * The license and distribution terms for this file may be found in the file
- * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE.
- */
-
-package org.rtems.cdt.build;
-
-import org.eclipse.cdt.managedbuilder.core.IManagedCommandLineGenerator;
-import org.eclipse.cdt.managedbuilder.core.IManagedCommandLineInfo;
-import org.eclipse.cdt.managedbuilder.core.ITool;
-import org.eclipse.cdt.managedbuilder.internal.core.ManagedCommandLineGenerator;
-import org.eclipse.core.resources.IProject;
-import org.rtems.cdt.Constants;
-import org.rtems.cdt.Storage;
-
-public class CommandLineGenerator extends ManagedCommandLineGenerator implements IManagedCommandLineGenerator {
- protected String getPlatform() {
- return Constants.PLATFORM_DEFAULT;
- }
-
- public IManagedCommandLineInfo generateCommandLineInfo(
- ITool tool,
- String commandName,
- String [] userOptions,
- String outputFlag,
- String outputPrefix,
- String outputName,
- String [] inputResources,
- String commandLinePattern
- ) {
- // Get associated project of the tool
- IProject project = (IProject) tool.getParentResourceInfo().getParent().getOwner();
-
- // Change platform
- Storage.changePlatform( project, getPlatform());
-
- // Determine tool key via the tool ID
- String id = tool.getId();
- String toolKey = "gcc";
- if (id.contains( "archiver")) {
- toolKey = Constants.TOOL_ARCHIVER_KEY;
- } else if (id.contains( "assembler")) {
- toolKey = Constants.TOOL_ASSEMBLER_KEY;
- } else if (id.contains( "compiler.cpp")) {
- toolKey = Constants.TOOL_COMPILER_CPP_KEY;
- } else if (id.contains( "compiler.c")) {
- toolKey = Constants.TOOL_COMPILER_C_KEY;
- } else if (id.contains( "linker.cpp")) {
- toolKey = Constants.TOOL_LINKER_CPP_KEY;
- } else if (id.contains( "linker.c")) {
- toolKey = Constants.TOOL_LINKER_C_KEY;
- }
-
- // Set command name
- commandName = Storage.getProperty( project, toolKey);
- tool.setToolCommand( commandName);
-
- // Combine tool and user options
- String [] toolOptions = Storage.getToolOptions( project, toolKey);
- String options [] = new String [toolOptions.length + userOptions.length];
- System.arraycopy( toolOptions, 0, options, 0, toolOptions.length);
- System.arraycopy( userOptions, 0, options, toolOptions.length, userOptions.length);
-
- return super.generateCommandLineInfo(
- tool,
- commandName,
- options,
- outputFlag,
- outputPrefix,
- outputName,
- inputResources,
- commandLinePattern
- );
- }
-}