summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Mitz <mitza-oci@users.noreply.github.com>2010-06-16 18:56:19 +0000
committerAdam Mitz <mitza-oci@users.noreply.github.com>2010-06-16 18:56:19 +0000
commit5f10f919859a021e88ae74394905e2ce6b52e729 (patch)
tree2ad9da31f55d11f79b56856bdb8b0213bc1fe429
parent9eeb43e7eb2cdc028a2e839e27985791af2c19d7 (diff)
downloadMPC-5f10f919859a021e88ae74394905e2ce6b52e729.tar.gz
added platform_libs for win32 (ws2_32, etc); removed the implicit -I../.. because it didn't turn out to be required; started support for customizing general compiler flags (-m32 example); fixed some bugs in the options to the C compiler
-rw-r--r--templates/cdt6cproject.mpd26
-rw-r--r--templates/cdt6platforms.mpt19
2 files changed, 25 insertions, 20 deletions
diff --git a/templates/cdt6cproject.mpd b/templates/cdt6cproject.mpd
index fd8a38eb..7cc1f5ca 100644
--- a/templates/cdt6cproject.mpd
+++ b/templates/cdt6cproject.mpd
@@ -82,15 +82,9 @@
<%endfor%>
</option>
<option id="mpc.generated.link.option.libs.1" name="Libraries (-l)" superClass="<%linker_option_superclass%>.libs" valueType="libs">
-<%foreach(libs)%>
+<%foreach(libs lit_libs pure_libs platform_libs)%>
<listOptionValue builtIn="false" value="<%lib%>"/>
<%endfor%>
-<%foreach(lit_libs)%>
-<listOptionValue builtIn="false" value="<%lit_lib%>"/>
-<%endfor%>
-<%foreach(pure_libs)%>
-<listOptionValue builtIn="false" value="<%pure_lib%>"/>
-<%endfor%>
</option>
<option id="mpc.generated.linkflags.1" superClass="<%linker_option_superclass%>.flags" value="<%if(linkflags)%> <%linkflags%><%endif%><%if(build64bit && linkflags64)%> <%linkflags64%><%endif%>" valueType="string"/>
<%if(type_is_dynamic)%>
@@ -110,12 +104,11 @@
<tool id="cdt.managedbuild.tool.gnu.archiver.<%if(platform_specializer)%><%platform_specializer%>.<%endif%>base.134329701" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.<%if(platform_specializer)%><%platform_specializer%>.<%endif%>base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.1373363011" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>">
<option id="mpc.generated.cc.include.paths.1" superClass="<%cpp_compiler_option_superclass%>.include.paths" valueType="includePath">
-<listOptionValue builtIn="false" value="../.."/>
<%foreach(includes)%>
<listOptionValue builtIn="false" value="<%if(!starts_with(include, [/\\\$]))%>../../<%endif%><%translate_vars(include, 1)%>"/>
<%endfor%>
</option>
-<option id="gnu.cpp.compiler.option.other.other.375481234" superClass="gnu.cpp.compiler.option.other.other" value="-c -fmessage-length=0 <%comment(here's where we can put in all the extra compiler flags)%>" valueType="string"/>
+<option id="gnu.cpp.compiler.option.other.other.375481234" superClass="gnu.cpp.compiler.option.other.other" value="-c -fmessage-length=0 <%comment(here's where we can put in all the extra compiler flags)%><%cxxflags%>" valueType="string"/>
<option id="gnu.cpp.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.optimization.level.886842330" name="Optimization Level" superClass="gnu.cpp.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.optimization.level" value="gnu.cpp.compiler.optimization.level.<%optimization_level%>" valueType="enumerated"/>
<option id="gnu.cpp.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.debugging.level.63360527" name="Debug Level" superClass="gnu.cpp.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.debugging.level" value="gnu.cpp.compiler.debugging.level.<%debugging_level%>" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.preprocessor.def.1310953196" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
@@ -138,13 +131,24 @@
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.1634417374" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>">
<option id="mpc.generated.c.compiler.option.include.paths.1" superClass="<%c_compiler_option_superclass%>.include.paths" valueType="includePath">
-<listOptionValue builtIn="false" value="../.."/>
<%foreach(includes)%>
<listOptionValue builtIn="false" value="<%if(!starts_with(include, [/\\\$]))%>../../<%endif%><%translate_vars(include, 1)%>"/>
<%endfor%>
</option>
-<option id="gnu.c.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.optimization.level.1822406061" name="Optimization Level" superClass="gnu.c.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.optimization.level" value="gnu.c.optimization.level.<%debugging_level%>" valueType="enumerated"/>
+<option id="gnu.c.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.optimization.level.1822406061" name="Optimization Level" superClass="gnu.c.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.optimization.level" value="gnu.c.optimization.level.<%optimization_level%>" valueType="enumerated"/>
<option id="gnu.c.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.debugging.level.1766929" name="Debug Level" superClass="gnu.c.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.debugging.level" value="gnu.c.debugging.level.<%debugging_level%>" valueType="enumerated"/>
+<option id="gnu.c.compiler.miscoptions.<%platform%>.<%configuration%>" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 <%ccflags%>" valueType="string"/>
+<option id="gnu.c.compiler.option.preprocessor.def.<%platform%>.<%configuration%>" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
+<%foreach(defines common_defines cpu_defines platform_defines macros)%>
+<listOptionValue builtIn="false" value="<%define%>"/>
+<%endfor%>
+<%if(type_is_dynamic)%><%foreach(dynamicflags)%>
+<listOptionValue builtIn="false" value="<%dynamicflag%>"/>
+<%endfor%><%endif%>
+<%if(need_static_flags)%><%foreach(staticflags)%>
+<listOptionValue builtIn="false" value="<%staticflag%>"/>
+<%endfor%><%endif%>
+</option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1596535093" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<%endif%><%comment(custom_only)%>
diff --git a/templates/cdt6platforms.mpt b/templates/cdt6platforms.mpt
index c4f6cba4..f38751ef 100644
--- a/templates/cdt6platforms.mpt
+++ b/templates/cdt6platforms.mpt
@@ -52,9 +52,9 @@ linux {
linux_m32 {
binary_parsers = org.eclipse.cdt.core.ELF
error_parsers = org.eclipse.cdt.core.GASErrorParser org.eclipse.cdt.core.GLDErrorParser org.eclipse.cdt.core.GCCErrorParser
- platform_ccflags = -m32
- platform_cxxflags = -m32
- platform_ldflags = -m32
+ ccflags += -m32
+ cxxflags += -m32
+ linkflags += -m32
}
macosx {
@@ -87,20 +87,21 @@ win32 {
dll_ext_nodot = dll
lib_ext_nodot = lib
+ platform_libs =
+
binary_parsers = org.eclipse.cdt.core.PE
error_parsers = org.eclipse.cdt.core.GASErrorParser org.eclipse.cdt.core.GLDErrorParser org.eclipse.cdt.core.GCCErrorParser
host_platform = host_win32
project_element_type_id = cdt.managedbuild.target.gnu.mingw
platform_specializer = mingw
tool_name_prefix = MinGW
-linker_option_superclass = gnu.cpp.link.option // must have .XXX appended
-c_compiler_superclass = cdt.managedbuild.tool.gnu.c.compiler.mingw
-c_compiler_option_superclass = gnu.c.compiler.mingw.option
-c_linker_dynamiclib_superclass = gnu.c.link.mingw.so.debug.option.shared
-cpp_linker_dynamiclib_superclass = gnu.cpp.link.mingw.so.debug.option.shared
+ linker_option_superclass = gnu.cpp.link.option // must have .XXX appended
+ c_compiler_superclass = cdt.managedbuild.tool.gnu.c.compiler.mingw
+ c_linker_dynamiclib_superclass = gnu.c.link.mingw.so.debug.option.shared
+ cpp_linker_dynamiclib_superclass = gnu.cpp.link.mingw.so.debug.option.shared
c_linker_tool_superclass_root = cdt.managedbuild.tool.gnu.c.linker.mingw // must have .so.debug appended
cpp_linker_tool_superclass_root = cdt.managedbuild.tool.gnu.cpp.linker.mingw // must have .so.debug appended
-cpp_linker_tool_input_superclass = cdt.managedbuild.tool.mingw.cpp.linker.input
+ cpp_linker_tool_input_superclass = cdt.managedbuild.tool.mingw.cpp.linker.input
}
cygwin {