diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2008-12-01 14:51:33 +0000 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2008-12-01 14:51:33 +0000 |
commit | dbe1bc4be25ddeb442e13d7de21be68cdffd3679 (patch) | |
tree | 3aaed7674ffbb63bdd20e7a258ae125ce30f79f2 | |
parent | Fixed problem with '-B' GCC option. (diff) | |
download | rtems-eclipse-plug-in-dbe1bc4be25ddeb442e13d7de21be68cdffd3679.tar.bz2 |
Added toolchains for Cygwin and MinGW.
-rw-r--r-- | org.rtems.cdt.toolchain2/org/rtems/cdt/build/CommandLineGenerator.java | 12 | ||||
-rw-r--r-- | org.rtems.cdt.toolchain2/plugin.xml | 234 |
2 files changed, 213 insertions, 33 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 index fbe7420..6276708 100644 --- a/org.rtems.cdt.toolchain2/org/rtems/cdt/build/CommandLineGenerator.java +++ b/org.rtems.cdt.toolchain2/org/rtems/cdt/build/CommandLineGenerator.java @@ -41,14 +41,14 @@ public class CommandLineGenerator extends ManagedCommandLineGenerator implements toolKey = Constants.TOOL_ARCHIVER_KEY; } else if (id.contains( "assembler")) { toolKey = Constants.TOOL_ASSEMBLER_KEY; - } else if (id.contains( "c.compiler")) { - toolKey = Constants.TOOL_COMPILER_C_KEY; - } else if (id.contains( "cpp.compiler")) { + } else if (id.contains( "compiler.cpp")) { toolKey = Constants.TOOL_COMPILER_CPP_KEY; - } else if (id.contains( "c.linker")) { - toolKey = Constants.TOOL_LINKER_C_KEY; - } else if (id.contains( "cpp.linker")) { + } 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 diff --git a/org.rtems.cdt.toolchain2/plugin.xml b/org.rtems.cdt.toolchain2/plugin.xml index 10aa114..16849ad 100644 --- a/org.rtems.cdt.toolchain2/plugin.xml +++ b/org.rtems.cdt.toolchain2/plugin.xml @@ -15,7 +15,7 @@ <!-- Scanner Configuration Discovery Profiles --> <extension id="RtemsSCDProfile" - name="RTEMS Scanner Configuration Discovery Profile (UNIX)" + name="RTEMS Scanner Configuration Discovery Profile" point="org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfile"> <scannerInfoCollector class="org.eclipse.cdt.make.internal.core.scannerconfig2.PerProjectSICollector" @@ -33,7 +33,7 @@ </extension> <extension id="RtemsSCDProfileC" - name="RTEMS Scanner Configuration Discovery Profile (UNIX)" + name="RTEMS Scanner Configuration Discovery Profile" point="org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfile"> <scannerInfoCollector class="org.eclipse.cdt.make.internal.core.scannerconfig2.PerProjectSICollector" @@ -51,7 +51,7 @@ </extension> <extension id="RtemsSCDProfileCPP" - name="RTEMS Scanner Configuration Discovery Profile (UNIX)" + name="RTEMS Scanner Configuration Discovery Profile" point="org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfile"> <scannerInfoCollector class="org.eclipse.cdt.make.internal.core.scannerconfig2.PerProjectSICollector" @@ -126,6 +126,8 @@ <extension id="org.rtems.cdt.build" point="org.eclipse.cdt.managedbuilder.core.buildDefinitions"> + + <!-- Configuration --> <configuration id="org.rtems.cdt.config.base" name="RTEMS Configuration" @@ -140,12 +142,14 @@ value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/> </enablement> </configuration> + + <!-- Toolchain (Standard) --> <toolChain id="org.rtems.cdt.toolchain" - name="RTEMS Toolchain (UNIX)" + name="RTEMS Toolchain" archList="all" osList="linux,solaris,hpux,aix,qnx,macosx" - targetTool="org.rtems.cdt.c.linker;org.rtems.cdt.cpp.linker;org.rtems.cdt.archiver" + targetTool="org.rtems.cdt.linker.c;org.rtems.cdt.linker.cpp;org.rtems.cdt.archiver" scannerConfigDiscoveryProfileId="org.rtems.cdt.toolchain2.RtemsSCDProfile"> <targetPlatform id="org.rtems.cdt.target" @@ -158,30 +162,188 @@ id="org.rtems.cdt.builder" superClass="cdt.managedbuild.target.gnu.builder"/> <tool - id="org.rtems.cdt.c.compiler" + id="org.rtems.cdt.assembler" + superClass="cdt.managedbuild.tool.gnu.assembler" + commandLineGenerator="org.rtems.cdt.build.CommandLineGenerator"> + </tool> + <tool + id="org.rtems.cdt.compiler.c" superClass="cdt.managedbuild.tool.gnu.c.compiler" commandLineGenerator="org.rtems.cdt.build.CommandLineGenerator"> <inputType - id="org.rtems.cdt.c.compiler.input" + id="org.rtems.cdt.compiler.input.c" superClass="cdt.managedbuild.tool.gnu.c.compiler.input" scannerConfigDiscoveryProfileId="org.rtems.cdt.toolchain2.RtemsSCDProfileC"/> </tool> <tool - id="org.rtems.cdt.cpp.compiler" + id="org.rtems.cdt.compiler.cpp" superClass="cdt.managedbuild.tool.gnu.cpp.compiler" commandLineGenerator="org.rtems.cdt.build.CommandLineGenerator"> <inputType - id="org.rtems.cdt.cpp.compiler.input" + id="org.rtems.cdt.compiler.cpp.input" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input" scannerConfigDiscoveryProfileId="org.rtems.cdt.toolchain2.RtemsSCDProfileCPP"/> </tool> <tool - id="org.rtems.cdt.assembler" + id="org.rtems.cdt.linker.c" + superClass="cdt.managedbuild.tool.gnu.c.linker" + commandLineGenerator="org.rtems.cdt.build.CommandLineGenerator"> + <enablement type="ALL"> + <not> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildArtefactType" + value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/> + </not> + </enablement> + </tool> + <tool + id="org.rtems.cdt.linker.cpp" + superClass="cdt.managedbuild.tool.gnu.cpp.linker" + commandLineGenerator="org.rtems.cdt.build.CommandLineGenerator"> + <enablement type="ALL"> + <not> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildArtefactType" + value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/> + </not> + </enablement> + </tool> + <tool + id="org.rtems.cdt.archiver" + superClass="cdt.managedbuild.tool.gnu.archiver" + commandLineGenerator="org.rtems.cdt.build.CommandLineGenerator"> + <enablement type="ALL"> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildArtefactType" + value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/> + </enablement> + </tool> + </toolChain> + + <!-- Toolchain (Cygwin) --> + <toolChain + id="org.rtems.cdt.toolchain.cygwin" + name="RTEMS Toolchain (Cygwin)" + archList="all" + osList="win32" + targetTool="org.rtems.cdt.linker.c.cygwin;org.rtems.cdt.linker.cpp.cygwin;org.rtems.cdt.archiver.cygwin" + configurationEnvironmentSupplier="org.eclipse.cdt.managedbuilder.gnu.cygwin.GnuCygwinConfigurationEnvironmentSupplier" + isToolChainSupported="org.eclipse.cdt.managedbuilder.gnu.cygwin.IsGnuCygwinToolChainSupported" + scannerConfigDiscoveryProfileId="org.rtems.cdt.toolchain2.RtemsSCDProfileWin"> + <targetPlatform + id="org.rtems.cdt.target.cygwin" + name="RTEMS Target" + binaryParser="org.eclipse.cdt.core.ELF" + osList="all" + archList="all"> + </targetPlatform> + <builder + id="org.rtems.cdt.builder.cygwin" + superClass="cdt.managedbuild.target.gnu.builder"/> + <tool + id="org.rtems.cdt.assembler.cygwin" superClass="cdt.managedbuild.tool.gnu.assembler" commandLineGenerator="org.rtems.cdt.build.CommandLineGenerator"> </tool> <tool - id="org.rtems.cdt.c.linker" + id="org.rtems.cdt.compiler.c.cygwin" + superClass="cdt.managedbuild.tool.gnu.c.compiler.cygwin" + commandLineGenerator="org.rtems.cdt.build.CommandLineGenerator"> + <inputType + id="org.rtems.cdt.compiler.input.c.cygwin" + superClass="cdt.managedbuild.tool.gnu.c.compiler.input" + scannerConfigDiscoveryProfileId="org.rtems.cdt.toolchain2.RtemsSCDProfileWinC"/> + </tool> + <tool + id="org.rtems.cdt.compiler.cpp.cygwin" + superClass="cdt.managedbuild.tool.gnu.cpp.compiler.cygwin" + commandLineGenerator="org.rtems.cdt.build.CommandLineGenerator"> + <inputType + id="org.rtems.cdt.compiler.cpp.input.cygwin" + superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input" + scannerConfigDiscoveryProfileId="org.rtems.cdt.toolchain2.RtemsSCDProfileWinCPP"/> + </tool> + <tool + id="org.rtems.cdt.linker.c.cygwin" + superClass="cdt.managedbuild.tool.gnu.c.linker.cygwin" + commandLineGenerator="org.rtems.cdt.build.CommandLineGenerator"> + <enablement type="ALL"> + <not> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildArtefactType" + value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/> + </not> + </enablement> + </tool> + <tool + id="org.rtems.cdt.linker.cpp.cygwin" + superClass="cdt.managedbuild.tool.gnu.cpp.linker.cygwin" + commandLineGenerator="org.rtems.cdt.build.CommandLineGenerator"> + <enablement type="ALL"> + <not> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildArtefactType" + value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/> + </not> + </enablement> + </tool> + <tool + id="org.rtems.cdt.archiver.cygwin" + superClass="cdt.managedbuild.tool.gnu.archiver" + commandLineGenerator="org.rtems.cdt.build.CommandLineGenerator"> + <enablement type="ALL"> + <checkBuildProperty + property="org.eclipse.cdt.build.core.buildArtefactType" + value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/> + </enablement> + </tool> + </toolChain> + + <!-- Toolchain (MinGW) --> + <toolChain + id="org.rtems.cdt.toolchain.mingw" + name="RTEMS Toolchain (MinGW)" + archList="all" + osList="win32" + targetTool="org.rtems.cdt.linker.c.mingw;org.rtems.cdt.linker.cpp.mingw;org.rtems.cdt.archiver.mingw" + configurationEnvironmentSupplier="org.eclipse.cdt.managedbuilder.gnu.mingw.MingwEnvironmentVariableSupplier" + isToolChainSupported="org.eclipse.cdt.managedbuilder.gnu.mingw.MingwIsToolChainSupported" + scannerConfigDiscoveryProfileId="org.rtems.cdt.toolchain2.RtemsSCDProfileWin"> + <targetPlatform + id="org.rtems.cdt.target.mingw" + name="RTEMS Target" + binaryParser="org.eclipse.cdt.core.ELF" + osList="all" + archList="all"> + </targetPlatform> + <builder + id="org.rtems.cdt.builder.mingw" + superClass="cdt.managedbuild.target.gnu.builder"/> + <tool + id="org.rtems.cdt.assembler.mingw" + superClass="cdt.managedbuild.tool.gnu.assembler" + commandLineGenerator="org.rtems.cdt.build.CommandLineGenerator"> + </tool> + <tool + id="org.rtems.cdt.compiler.c.mingw" + superClass="cdt.managedbuild.tool.gnu.c.compiler" + commandLineGenerator="org.rtems.cdt.build.CommandLineGenerator"> + <inputType + id="org.rtems.cdt.compiler.input.c.mingw" + superClass="cdt.managedbuild.tool.gnu.c.compiler.input" + scannerConfigDiscoveryProfileId="org.rtems.cdt.toolchain2.RtemsSCDProfileWinC"/> + </tool> + <tool + id="org.rtems.cdt.compiler.cpp.mingw" + superClass="cdt.managedbuild.tool.gnu.cpp.compiler" + commandLineGenerator="org.rtems.cdt.build.CommandLineGenerator"> + <inputType + id="org.rtems.cdt.compiler.cpp.input.mingw" + superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input" + scannerConfigDiscoveryProfileId="org.rtems.cdt.toolchain2.RtemsSCDProfileWinCPP"/> + </tool> + <tool + id="org.rtems.cdt.linker.c.mingw" superClass="cdt.managedbuild.tool.gnu.c.linker" commandLineGenerator="org.rtems.cdt.build.CommandLineGenerator"> <enablement type="ALL"> @@ -193,7 +355,7 @@ </enablement> </tool> <tool - id="org.rtems.cdt.cpp.linker" + id="org.rtems.cdt.linker.cpp.mingw" superClass="cdt.managedbuild.tool.gnu.cpp.linker" commandLineGenerator="org.rtems.cdt.build.CommandLineGenerator"> <enablement type="ALL"> @@ -205,7 +367,7 @@ </enablement> </tool> <tool - id="org.rtems.cdt.archiver" + id="org.rtems.cdt.archiver.mingw" superClass="cdt.managedbuild.tool.gnu.archiver" commandLineGenerator="org.rtems.cdt.build.CommandLineGenerator"> <enablement type="ALL"> @@ -215,26 +377,45 @@ </enablement> </tool> </toolChain> + + <!-- Project Type --> <projectType buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" - id="org.rtems.cdt.project.exe" + id="org.rtems.cdt.projectType" name="RTEMS Executable" projectEnvironmentSupplier="org.rtems.cdt.build.EnvironmentSupplier" projectMacroSupplier="org.rtems.cdt.build.MacroSupplier"> <configuration - id="org.rtems.cdt.config.exe" + id="org.rtems.cdt.config" name="RTEMS Executable Configuration" - parent="org.rtems.cdt.config.base" - buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release"> + parent="org.rtems.cdt.config.base"> <toolChain - id="org.rtems.cdt.toolchain.exe" + id="org.rtems.cdt.config.toolchain" superClass="org.rtems.cdt.toolchain"> </toolChain> </configuration> + <configuration + id="org.rtems.cdt.config.cygwin" + name="RTEMS Executable Configuration" + parent="org.rtems.cdt.config.base"> + <toolChain + id="org.rtems.cdt.config.toolchain.cygwin" + superClass="org.rtems.cdt.toolchain.cygwin"> + </toolChain> + </configuration> + <configuration + id="org.rtems.cdt.config.mingw" + name="RTEMS Executable Configuration" + parent="org.rtems.cdt.config.base"> + <toolChain + id="org.rtems.cdt.config.toolchain.mingw" + superClass="org.rtems.cdt.toolchain.mingw"> + </toolChain> + </configuration> </projectType> </extension> - <!-- New Project Wizards --> + <!-- New Project Wizard --> <extension point="org.eclipse.cdt.managedbuilder.ui.newWizardPages"> <wizardPage @@ -256,8 +437,7 @@ <extension point="org.eclipse.core.runtime.preferences"> <initializer - class="org.rtems.cdt.preferences.PreferenceInitializer"> - </initializer> + class="org.rtems.cdt.preferences.PreferenceInitializer"/> </extension> <!-- Properties --> @@ -273,13 +453,13 @@ value="org.eclipse.cdt.managedbuilder.core.managedBuildNature"/> <enabledWhen> <or> - <instanceof value="org.eclipse.core.resources.IProject"/> - <instanceof value="org.eclipse.cdt.core.model.ICProject"/> - <instanceof value="org.eclipse.core.resources.IFolder"/> - <instanceof value="org.eclipse.cdt.core.model.ICContainer"/> + <instanceof value="org.eclipse.cdt.core.model.ICContainer"/> + <instanceof value="org.eclipse.cdt.core.model.ICProject"/> <instanceof value="org.eclipse.cdt.core.model.ITranslationUnit"/> - <instanceof value="org.eclipse.core.resources.IFile"/> - </or> + <instanceof value="org.eclipse.core.resources.IFile"/> + <instanceof value="org.eclipse.core.resources.IFolder"/> + <instanceof value="org.eclipse.core.resources.IProject"/> + </or> </enabledWhen> </page> </extension> |