Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorDoug Schaefer2004-07-07 15:19:42 -0400
committerDoug Schaefer2004-07-07 15:19:42 -0400
commit04c74b6af0e7c93689c09af9719be1af03dca1fc (patch)
treee73ac55d37c00ca0124dfff7053aae4352a392a5 /build
parent7a40c545527a9b2e14bfe5841e20818a72325787 (diff)
downloadorg.eclipse.cdt-04c74b6af0e7c93689c09af9719be1af03dca1fc.tar.gz
org.eclipse.cdt-04c74b6af0e7c93689c09af9719be1af03dca1fc.tar.xz
org.eclipse.cdt-04c74b6af0e7c93689c09af9719be1af03dca1fc.zip
Initial contribution of Mac Port from Greg Watson.
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/plugin.properties11
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/plugin.xml449
3 files changed, 457 insertions, 7 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java
index 080ebe4a344..fda02ca13f0 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java
@@ -347,7 +347,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator {
outputPrefix = info.getOutputPrefix(outputExtension);
// The command to build
- String buildCmd = cmd + WHITESPACE + buildFlags + WHITESPACE + outflag + outputPrefix + OUT_MACRO + WHITESPACE + IN_MACRO;
+ String buildCmd = cmd + WHITESPACE + buildFlags + WHITESPACE + outflag + WHITESPACE + outputPrefix + OUT_MACRO + WHITESPACE + IN_MACRO;
buffer.append(TAB + AT + ECHO + WHITESPACE + buildCmd + NEWLINE);
buffer.append(TAB + AT + buildCmd);
@@ -583,7 +583,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator {
}
buffer.append(NEWLINE);
buffer.append(TAB + AT + ECHO + WHITESPACE + SINGLE_QUOTE + MESSAGE_START_BUILD + WHITESPACE + OUT_MACRO + SINGLE_QUOTE + NEWLINE);
- buffer.append(TAB + cmd + WHITESPACE + flags + WHITESPACE + outflag + OUT_MACRO + WHITESPACE + "$(OBJS) $(USER_OBJS) $(LIBS)" + NEWLINE); //$NON-NLS-1$
+ buffer.append(TAB + cmd + WHITESPACE + flags + WHITESPACE + outflag + WHITESPACE + OUT_MACRO + WHITESPACE + "$(OBJS) $(USER_OBJS) $(LIBS)" + NEWLINE); //$NON-NLS-1$
buffer.append(TAB + AT + ECHO + WHITESPACE + SINGLE_QUOTE + MESSAGE_FINISH_FILE + WHITESPACE + OUT_MACRO + SINGLE_QUOTE + NEWLINE + NEWLINE);
// Always add a clean target
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/plugin.properties b/build/org.eclipse.cdt.managedbuilder.ui/plugin.properties
index d141c037daa..624440fdfb0 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/plugin.properties
+++ b/build/org.eclipse.cdt.managedbuilder.ui/plugin.properties
@@ -29,7 +29,9 @@ TargetName.gnu.lib=Static Library (Gnu)
TargetName.cygw.exe=Executable (Gnu on Windows)
TargetName.cygw.so=Shared Library (Gnu on Windows)
TargetName.cygw.lib=Static Library (Gnu on Windows)
-
+TargetName.macosx.exe=Executable (MacOS X)
+TargetName.macosx.so=Shared Library (MacOS X)
+TargetName.macosx.lib=Static Library (MacOS X)
# No longer needed post-2.0
TargetName.cygw=Cygwin
@@ -64,6 +66,10 @@ ToolName.linker.gnu.cpp = GCC C++ Linker
ToolName.archiver.gnu = GCC Archiver
ToolName.assembler.gnu = GCC Assembler
+# Mach-O tool names
+ToolName.linker.macosx.c = MacOS X C Linker
+ToolName.linker.macosx.cpp = MacOS X C++ Linker
+
# Generic Category Names
OptionCategory.Symbols = Symbols
OptionCategory.Preproc = Preprocessor
@@ -138,4 +144,5 @@ Option.Gnu.Assembler.version=Announce version (-v)
Option.Windows.Windres.OutputFormat = Output format
Option.Windows.Windres.OutputFormat.Coff = coff (--output-format coff)
Option.Windows.Windres.OutputFormat.RC = rc (--output-format rc)
-Option.Windows.Windres.OutputFormat.Res = res (--output-format res) \ No newline at end of file
+Option.Windows.Windres.OutputFormat.Res = res (--output-format res)
+Option.MacOSX.Linker.Shared=Shared (-Wl,-dylib) \ No newline at end of file
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/plugin.xml b/build/org.eclipse.cdt.managedbuilder.ui/plugin.xml
index b61720b00a3..635d34ab4d8 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/plugin.xml
+++ b/build/org.eclipse.cdt.managedbuilder.ui/plugin.xml
@@ -479,6 +479,224 @@
name="%Option.Gnu.Assembler.version"
id="gnu.both.asm.option.version"/>
</tool>
+ <tool
+ natureFilter="cnature"
+ sources="o"
+ name="%ToolName.linker.macosx.c"
+ outputFlag="-o"
+ command="gcc"
+ dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.internal.DefaultNoDependencyCalculator"
+ id="cdt.managedbuild.tool.macosx.c.linker">
+ <optionCategory
+ owner="cdt.managedbuild.tool.macosx.c.linker"
+ name="%OptionCategory.General"
+ id="macosx.c.link.category.general">
+ </optionCategory>
+ <option
+ defaultValue="false"
+ name="%Option.Posix.Linker.NoStartFiles"
+ category="macosx.c.link.category.general"
+ command="-nostartfiles"
+ id="macosx.c.link.option.nostart"
+ valueType="boolean">
+ </option>
+ <option
+ defaultValue="false"
+ name="%Option.Posix.Linker.NoDefLibs"
+ category="macosx.c.link.category.general"
+ command="-nodefaultlibs"
+ id="macosx.c.link.option.nodeflibs"
+ valueType="boolean">
+ </option>
+ <option
+ defaultValue="false"
+ name="%Option.Posix.Linker.NoStdLibs"
+ category="macosx.c.link.category.general"
+ command="-nostdlib"
+ id="macosx.c.link.option.nostdlibs"
+ valueType="boolean">
+ </option>
+ <option
+ defaultValue="false"
+ name="%Option.Posix.Linker.Strip"
+ category="macosx.c.link.category.general"
+ command="--strip-all"
+ id="macosx.c.link.option.strip"
+ valueType="boolean">
+ </option>
+ <option
+ defaultValue="false"
+ name="%Option.Posix.Linker.Static"
+ category="macosx.c.link.category.general"
+ command="-static"
+ id="macosx.c.link.option.noshared"
+ valueType="boolean">
+ </option>
+ <optionCategory
+ owner="cdt.managedbuild.tool.macosx.c.linker"
+ name="%OptionCategory.Libs"
+ id="macosx.c.link.category.libs">
+ </optionCategory>
+ <option
+ name="%Option.Posix.Libs"
+ category="macosx.c.link.category.libs"
+ command="-l"
+ id="macosx.c.link.option.libs"
+ browseType="file"
+ valueType="libs">
+ </option>
+ <option
+ name="%Option.Posix.Libsearch"
+ category="macosx.c.link.category.libs"
+ command="-L"
+ id="macosx.c.link.option.paths"
+ browseType="directory"
+ valueType="stringList">
+ </option>
+ <optionCategory
+ owner="cdt.managedbuild.tool.macosx.c.linker"
+ name="%OptionCategory.Misc"
+ id="macosx.c.link.category.other">
+ </optionCategory>
+ <option
+ name="%Option.Posix.Linker.Flags"
+ category="macosx.c.link.category.other"
+ valueType="string"
+ id="macosx.c.link.option.ldflags">
+ </option>
+ <option
+ name="%Option.Posix.Linker.XLinker"
+ category="macosx.c.link.category.other"
+ command="-Xlinker,"
+ valueType="stringList"
+ id="macosx.c.link.option.other">
+ </option>
+ <option
+ name="%Option.Posix.UserObjs"
+ category="macosx.c.link.category.other"
+ browseType="file"
+ valueType="userObjs"
+ id="macosx.c.link.option.userobjs">
+ </option>
+ <optionCategory
+ owner="cdt.managedbuild.tool.macosx.c.linker"
+ name="%OptionCategory.Shared.Settings"
+ id="macosx.c.link.category.shared">
+ </optionCategory>
+ <option
+ defaultValue="false"
+ name="%Option.MacOSX.Linker.Shared"
+ category="macosx.c.link.category.shared"
+ command="-Wl,-dylib"
+ id="macosx.c.link.option.shared"
+ valueType="boolean">
+ </option>
+ </tool>
+ <tool
+ natureFilter="ccnature"
+ sources="o"
+ name="%ToolName.linker.macosx.cpp"
+ outputFlag="-o"
+ command="g++"
+ dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.internal.DefaultNoDependencyCalculator"
+ id="cdt.managedbuild.tool.macosx.cpp.linker">
+ <optionCategory
+ owner="cdt.managedbuild.tool.macosx.cpp.linker"
+ name="%OptionCategory.General"
+ id="macosx.cpp.link.category.options">
+ </optionCategory>
+ <option
+ defaultValue="false"
+ name="%Option.Posix.Linker.NoStartFiles"
+ category="macosx.cpp.link.category.options"
+ command="-nostartfiles"
+ id="macosx.cpp.link.option.nostart"
+ valueType="boolean">
+ </option>
+ <option
+ defaultValue="false"
+ name="%Option.Posix.Linker.NoDefLibs"
+ category="macosx.cpp.link.category.options"
+ command="-nodefaultlibs"
+ id="macosx.cpp.link.option.nodeflibs"
+ valueType="boolean">
+ </option>
+ <option
+ defaultValue="false"
+ name="%Option.Posix.Linker.NoStdLibs"
+ category="macosx.cpp.link.category.options"
+ command="-nostdlib"
+ id="macosx.cpp.link.option.nostdlibs"
+ valueType="boolean">
+ </option>
+ <option
+ defaultValue="false"
+ name="%Option.Posix.Linker.Strip"
+ category="macosx.cpp.link.category.options"
+ command="--strip-all"
+ id="macosx.cpp.link.option.strip"
+ valueType="boolean">
+ </option>
+ <optionCategory
+ owner="cdt.managedbuild.tool.macosx.cpp.linker"
+ name="%OptionCategory.Libs"
+ id="macosx.cpp.link.category.libs">
+ </optionCategory>
+ <option
+ name="%Option.Posix.Libs"
+ category="macosx.cpp.link.category.libs"
+ command="-l"
+ id="macosx.cpp.link.option.libs"
+ browseType="file"
+ valueType="libs">
+ </option>
+ <option
+ name="%Option.Posix.Libsearch"
+ category="macosx.cpp.link.category.libs"
+ command="-L"
+ id="macosx.cpp.link.option.paths"
+ browseType="directory"
+ valueType="stringList">
+ </option>
+ <optionCategory
+ owner="cdt.managedbuild.tool.macosx.cpp.linker"
+ name="%OptionCategory.Misc"
+ id="macosx.cpp.link.category.other">
+ </optionCategory>
+ <option
+ name="%Option.Posix.Linker.Flags"
+ category="macosx.cpp.link.category.other"
+ valueType="string"
+ id="macosx.cpp.link.option.flags">
+ </option>
+ <option
+ name="%Option.Posix.Linker.XLinker"
+ category="macosx.cpp.link.category.other"
+ command="-Xlinker "
+ valueType="stringList"
+ id="macosx.cpp.link.option.other">
+ </option>
+ <option
+ name="%Option.Posix.UserObjs"
+ category="macosx.cpp.link.category.other"
+ browseType="file"
+ valueType="userObjs"
+ id="macosx.cpp.link.option.userobjs">
+ </option>
+ <optionCategory
+ owner="cdt.managedbuild.tool.macosx.cpp.linker"
+ name="%OptionCategory.Shared.Settings"
+ id="macosx.cpp.link.category.shared">
+ </optionCategory>
+ <option
+ defaultValue="false"
+ name="%Option.MacOSX.Linker.Shared"
+ category="macosx.cpp.link.category.shared"
+ command="-Wl,-dylib"
+ valueType="boolean"
+ id="macosx.cpp.link.option.shared">
+ </option>
+ </tool>
<target
name="%TargetName.gnu"
id="cdt.managedbuild.target.gnu"
@@ -959,7 +1177,7 @@
</target>
<target
isAbstract="false"
- osList="solaris,linux,hpux,aix,macosx,qnx"
+ osList="solaris,linux,hpux,aix,qnx"
scannerInfoCollector="org.eclipse.cdt.managedbuilder.internal.scannerconfig.DefaultGCCScannerInfoCollector"
isTest="false"
makefileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator"
@@ -1027,7 +1245,7 @@
</target>
<target
isTest="false"
- osList="solaris,linux,hpux,aix,macosx,qnx"
+ osList="solaris,linux,hpux,aix,qnx"
scannerInfoCollector="org.eclipse.cdt.managedbuilder.internal.scannerconfig.DefaultGCCScannerInfoCollector"
makefileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator"
name="%TargetName.gnu.so"
@@ -1106,7 +1324,7 @@
</target>
<target
isTest="false"
- osList="solaris,linux,hpux,aix,macosx,qnx"
+ osList="solaris,linux,hpux,aix,qnx"
scannerInfoCollector="org.eclipse.cdt.managedbuilder.internal.scannerconfig.DefaultGCCScannerInfoCollector"
makefileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator"
name="%TargetName.gnu.lib"
@@ -1392,6 +1610,231 @@
id="cdt.managedbuild.tool.gnu.archiver">
</toolReference>
</target>
+ <target
+ name="%TargetName.macosx.exe"
+ id="cdt.managedbuild.target.macosx.exe"
+ isTest="false"
+ scannerInfoCollector="org.eclipse.cdt.managedbuilder.internal.scannerconfig.DefaultGCCScannerInfoCollector"
+ makefileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator"
+ isAbstract="false"
+ binaryParser="org.eclipse.cdt.core.MachO"
+ parent="cdt.managedbuild.target.gnu"
+ osList="macosx">
+ <configuration
+ name="%ConfigName.Dbg"
+ id="cdt.managedbuild.config.gnu.macosx.exe.debug">
+ <toolReference
+ id="cdt.managedbuild.tool.gnu.c.compiler">
+ <optionReference
+ defaultValue="gnu.c.optimization.level.none"
+ id="gnu.c.compiler.option.optimization.level">
+ </optionReference>
+ <optionReference
+ defaultValue="gnu.c.debugging.level.max"
+ id="gnu.c.compiler.option.debugging.level">
+ </optionReference>
+ </toolReference>
+ <toolReference
+ id="cdt.managedbuild.tool.gnu.cpp.compiler">
+ <optionReference
+ defaultValue="gnu.cpp.compiler.optimization.level.none"
+ id="gnu.cpp.compiler.option.optimization.level">
+ </optionReference>
+ <optionReference
+ defaultValue="gnu.cpp.compiler.debugging.level.max"
+ id="gnu.cpp.compiler.option.debugging.level">
+ </optionReference>
+ </toolReference>
+ </configuration>
+ <configuration
+ name="%ConfigName.Rel"
+ id="cdt.managedbuild.config.macosx.exe.release">
+ <toolReference
+ id="cdt.managedbuild.tool.gnu.c.compiler">
+ <optionReference
+ defaultValue="gnu.c.optimization.level.most"
+ id="gnu.c.compiler.option.optimization.level">
+ </optionReference>
+ <optionReference
+ defaultValue="gnu.c.debugging.level.none"
+ id="gnu.c.compiler.option.debugging.level">
+ </optionReference>
+ </toolReference>
+ <toolReference
+ id="cdt.managedbuild.tool.gnu.cpp.compiler">
+ <optionReference
+ defaultValue="gnu.cpp.compiler.optimization.level.most"
+ id="gnu.cpp.compiler.option.optimization.level">
+ </optionReference>
+ <optionReference
+ defaultValue="gnu.cpp.compiler.debugging.level.none"
+ id="gnu.cpp.compiler.option.debugging.level">
+ </optionReference>
+ </toolReference>
+ </configuration>
+ <toolReference
+ outputs="exe"
+ id="cdt.managedbuild.tool.macosx.c.linker">
+ </toolReference>
+ <toolReference
+ outputs="exe"
+ id="cdt.managedbuild.tool.macosx.cpp.linker">
+ </toolReference>
+ </target>
+ <target
+ name="%TargetName.macosx.so"
+ id="cdt.managedbuild.target.macosx.so"
+ isTest="false"
+ defaultExtension="dylib"
+ scannerInfoCollector="org.eclipse.cdt.managedbuilder.internal.scannerconfig.DefaultGCCScannerInfoCollector"
+ makefileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator"
+ isAbstract="false"
+ binaryParser="org.eclipse.cdt.core.MachO"
+ parent="cdt.managedbuild.target.gnu"
+ osList="macosx">
+ <configuration
+ name="%ConfigName.Dbg"
+ id="cdt.managedbuild.config.macosx.so.debug">
+ <toolReference
+ id="cdt.managedbuild.tool.gnu.c.compiler">
+ <optionReference
+ defaultValue="gnu.c.optimization.level.none"
+ id="gnu.c.compiler.option.optimization.level">
+ </optionReference>
+ <optionReference
+ defaultValue="gnu.c.debugging.level.max"
+ id="gnu.c.compiler.option.debugging.level">
+ </optionReference>
+ </toolReference>
+ <toolReference
+ id="cdt.managedbuild.tool.gnu.cpp.compiler">
+ <optionReference
+ defaultValue="gnu.cpp.compiler.optimization.level.none"
+ id="gnu.cpp.compiler.option.optimization.level">
+ </optionReference>
+ <optionReference
+ defaultValue="gnu.cpp.compiler.debugging.level.max"
+ id="gnu.cpp.compiler.option.debugging.level">
+ </optionReference>
+ </toolReference>
+ </configuration>
+ <configuration
+ name="%ConfigName.Rel"
+ id="cdt.managedbuild.config.macosx.so.release">
+ <toolReference
+ id="cdt.managedbuild.tool.gnu.c.compiler">
+ <optionReference
+ defaultValue="gnu.c.optimization.level.most"
+ id="gnu.c.compiler.option.optimization.level">
+ </optionReference>
+ <optionReference
+ defaultValue="gnu.c.debugging.level.none"
+ id="gnu.c.compiler.option.debugging.level">
+ </optionReference>
+ </toolReference>
+ <toolReference
+ id="cdt.managedbuild.tool.gnu.cpp.compiler">
+ <optionReference
+ defaultValue="gnu.cpp.compiler.optimization.level.most"
+ id="gnu.cpp.compiler.option.optimization.level">
+ </optionReference>
+ <optionReference
+ defaultValue="gnu.cpp.compiler.debugging.level.none"
+ id="gnu.cpp.compiler.option.debugging.level">
+ </optionReference>
+ </toolReference>
+ </configuration>
+ <toolReference
+ outputs="dylib"
+ outputPrefix="lib"
+ id="cdt.managedbuild.tool.macosx.c.linker">
+ <optionReference
+ defaultValue="true"
+ id="macosx.c.link.option.shared"/>
+ <optionReference
+ defaultValue="true"
+ id="macosx.c.link.option.nostart"/>
+ <optionReference
+ defaultValue="true"
+ id="macosx.c.link.option.nodeflibs"/>
+ </toolReference>
+ <toolReference
+ outputs="dylib"
+ id="cdt.managedbuild.tool.macosx.cpp.linker">
+ <optionReference
+ defaultValue="true"
+ id="macosx.cpp.link.option.shared"/>
+ </toolReference>
+ </target>
+ <target
+ name="%TargetName.macosx.lib"
+ id="cdt.managedbuild.target.macosx.lib"
+ isTest="false"
+ makefileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator"
+ defaultExtension="a"
+ scannerInfoCollector="org.eclipse.cdt.managedbuilder.internal.scannerconfig.DefaultGCCScannerInfoCollector"
+ isAbstract="false"
+ binaryParser="org.eclipse.cdt.core.MachO"
+ parent="cdt.managedbuild.target.gnu"
+ osList="macosx">
+ <configuration
+ name="%ConfigName.Dbg"
+ id="cdt.managedbuild.config.macosx.lib.debug">
+ <toolReference
+ id="cdt.managedbuild.tool.gnu.c.compiler">
+ <optionReference
+ defaultValue="gnu.c.optimization.level.none"
+ id="gnu.c.compiler.option.optimization.level">
+ </optionReference>
+ <optionReference
+ defaultValue="gnu.c.debugging.level.max"
+ id="gnu.c.compiler.option.debugging.level">
+ </optionReference>
+ </toolReference>
+ <toolReference
+ id="cdt.managedbuild.tool.gnu.cpp.compiler">
+ <optionReference
+ defaultValue="gnu.cpp.compiler.optimization.level.none"
+ id="gnu.cpp.compiler.option.optimization.level">
+ </optionReference>
+ <optionReference
+ defaultValue="gnu.cpp.compiler.debugging.level.max"
+ id="gnu.cpp.compiler.option.debugging.level">
+ </optionReference>
+ </toolReference>
+ </configuration>
+ <configuration
+ name="%ConfigName.Rel"
+ id="cdt.managedbuild.config.macosxlib.release">
+ <toolReference
+ id="cdt.managedbuild.tool.gnu.c.compiler">
+ <optionReference
+ defaultValue="gnu.c.optimization.level.most"
+ id="gnu.c.compiler.option.optimization.level">
+ </optionReference>
+ <optionReference
+ defaultValue="gnu.c.debugging.level.none"
+ id="gnu.c.compiler.option.debugging.level">
+ </optionReference>
+ </toolReference>
+ <toolReference
+ id="cdt.managedbuild.tool.gnu.cpp.compiler">
+ <optionReference
+ defaultValue="gnu.cpp.compiler.optimization.level.most"
+ id="gnu.cpp.compiler.option.optimization.level">
+ </optionReference>
+ <optionReference
+ defaultValue="gnu.cpp.compiler.debugging.level.none"
+ id="gnu.cpp.compiler.option.debugging.level">
+ </optionReference>
+ </toolReference>
+ </configuration>
+ <toolReference
+ outputPrefix="lib"
+ outputs="a"
+ id="cdt.managedbuild.tool.gnu.archiver">
+ </toolReference>
+ </target>
</extension>
</plugin>

Back to the top