Merge pull request #20 from jwillemsen/master
[MPC.git] / templates / cdt6platforms.mpt
blobfb7b88684a16b6fac2f617c085eb384635c4d800
1 // -*- MPC -*-
2 // Any of these platforms can be set using
3 //   -value_template platforms="blah blah blah"
4 // when generating a CDT project/workspace combo.  The default is to use the
5 // platform that matches the host that's running MPC (see fill_value() in
6 // CDT6ProjectCreator.pm).
7 //
9 //
10 // Platforms
13 conditional_include "common"
14 conditional_include "unixcommon" // We include this at the global b/c most
15                                  // platforms are unix-ish.  windowscommon
16                                  // overrides these in the relevant scopes.
18 // These will have platform_specializer appended if it's defined
19 configuration_parent_root = cdt.managedbuild.config.gnu
20 toolchain_superclass_root = cdt.managedbuild.toolchain.gnu
21 toolchain_internal_builder_root = cdt.managedbuild.target.gnu.builder
22 targetplatform_superclass = cdt.managedbuild.target.gnu.platform
23 outputtype_superclass = cdt.managedbuild.tool.gnu.cpp.linker.output
25 // These are just defaults
26 exe_ext_nodot =
27 dll_ext_nodot = so
28 lib_ext_nodot = a
29 tool_name_prefix = GNU
30 c_linker_tool_superclass_root = cdt.managedbuild.tool.gnu.c.linker // must have .so.debug appended
31 cpp_linker_tool_superclass_root = cdt.managedbuild.tool.gnu.cpp.linker // must have .so.debug appended
32 linker_option_superclass = gnu.cpp.link.option // must have .XXX appended
33 cpp_compiler_option_superclass = gnu.cpp.compiler.option
34 c_compiler_superclass = ???
35 c_compiler_option_superclass = gnu.c.compiler.option
36 project_element_type_id = cdt.managedbuild.target.gnu
37 c_linker_dynamiclib_superclass = gnu.c.link.so.debug.option.shared
38 cpp_linker_dynamiclib_superclass = gnu.cpp.link.so.debug.option.shared
39 cpp_linker_tool_input_superclass = cdt.managedbuild.tool.gnu.cpp.linker.input
41 linux {
42   binary_parsers = org.eclipse.cdt.core.ELF
43   error_parsers = org.eclipse.cdt.core.GASErrorParser org.eclipse.cdt.core.GLDErrorParser org.eclipse.cdt.core.GCCErrorParser
44   threadflags = -pthread
45   platform_libs += rt dl
48 // cellppu is an example for how to do a cross-compile (or, really, any compile using
49 // tools with non-standard names).
50 cellppu {
51   as = ppu-as
52   ar = ppu-ar
53   cc = ppu-gcc
54   // can set ccld to name of C Linker if different from cc
55   cxx = ppu-g++
56   // can set cxxld to name of C++ Linker if different from cxx
58   binary_parsers = org.eclipse.cdt.core.ELF
59   error_parsers = org.eclipse.cdt.core.GASErrorParser org.eclipse.cdt.core.GLDErrorParser org.eclipse.cdt.core.GCCErrorParser
60   threadflags = -pthread
61   platform_libs += rt dl
64 // This scope serves as an example of a custom platform.  On 64-bit linux,
65 // you can compile a 32-bit binary by passing -m32 to gcc.  Using this custom
66 // platform, MPC can generate CDT projects that have "Build Configurations"
67 // for both 64-bit and 32-bit.  This would be enabled by running mwc.pl with
68 // -value_template platforms="linux linux_m32"
69 linux_m32 {
70   binary_parsers = org.eclipse.cdt.core.ELF
71   error_parsers = org.eclipse.cdt.core.GASErrorParser org.eclipse.cdt.core.GLDErrorParser org.eclipse.cdt.core.GCCErrorParser
72   ccflags += -m32
73   cxxflags += -m32
74   linkflags += -m32
75   threadflags = -pthread
76   platform_libs += rt dl
79 macosx {
80   dll_ext = .dylib
81   exe_ext_nodot =
82   dll_ext_nodot = dylib
83   lib_ext_nodot = a
85   binary_parsers = org.eclipse.cdt.core.MachO64
86   error_parsers = org.eclipse.cdt.core.GASErrorParser org.eclipse.cdt.core.GLDErrorParser org.eclipse.cdt.core.GCCErrorParser
87   host_platform = host_macosx
88   project_element_type_id = cdt.managedbuild.target.macosx
89   // platform_specializer gets added on to various things like configuration_parent_root, etc.
90   configuration_parent_root = cdt.managedbuild.config
91   platform_specializer = macosx
92   tool_name_prefix = "MacOS X"
93   linker_option_superclass = macosx.cpp.link.option
94   c_linker_dynamiclib_superclass = macosx.c.link.macosx.so.debug.option.shared
95   cpp_linker_dynamiclib_superclass = macosx.cpp.link.macosx.so.debug.option.shared
96   c_linker_tool_superclass_root = cdt.managedbuild.tool.macosx.c.linker.macosx // must have .so.debug appended
97   cpp_linker_tool_superclass_root = cdt.managedbuild.tool.macosx.cpp.linker.macosx // must have .so.debug appended
98 cpp_linker_tool_input_superclass = cdt.managedbuild.tool.macosx.cpp.linker.input
99   outputtype_superclass = cdt.managedbuild.tool.macosx.cpp.linker.output.so
102 win32 {
103   conditional_include "windowscommon"
105   lib_prefix = lib // this is different from VC++ b/c we're using mingw
107   exe_ext_nodot = exe
108   dll_ext_nodot = dll
109   lib_ext_nodot = lib
111   platform_libs =
112   threadflags = -mthreads
114   binary_parsers = org.eclipse.cdt.core.PE
115   error_parsers = org.eclipse.cdt.core.GASErrorParser org.eclipse.cdt.core.GLDErrorParser org.eclipse.cdt.core.GCCErrorParser
116   host_platform = host_win32
117   project_element_type_id = cdt.managedbuild.target.gnu.mingw
118   platform_specializer = mingw
119   tool_name_prefix = MinGW
120   linker_option_superclass = gnu.cpp.link.option // must have .XXX appended
121   c_compiler_superclass = cdt.managedbuild.tool.gnu.c.compiler.mingw
122   c_linker_dynamiclib_superclass = gnu.c.link.mingw.so.debug.option.shared
123   cpp_linker_dynamiclib_superclass = gnu.cpp.link.mingw.so.debug.option.shared
124   c_linker_tool_superclass_root = cdt.managedbuild.tool.gnu.c.linker.mingw // must have .so.debug appended
125   cpp_linker_tool_superclass_root = cdt.managedbuild.tool.gnu.cpp.linker.mingw // must have .so.debug appended
126   cpp_linker_tool_input_superclass = cdt.managedbuild.tool.mingw.cpp.linker.input
129 cygwin {
130   binary_parsers = org.eclipse.cdt.core.PE
131   error_parsers = org.eclipse.cdt.core.GASErrorParser org.eclipse.cdt.core.GLDErrorParser org.eclipse.cdt.core.GCCErrorParser
132   host_platform = host_win32
133   platform_specializer = cygwin
136 solaris {
137   binary_parsers = org.eclipse.cdt.core.ELF
138   error_parsers = org.eclipse.cdt.core.GASErrorParser org.eclipse.cdt.core.GLDErrorParser org.eclipse.cdt.core.GCCErrorParser
139   platform_specializer = solaris
142 // default values for the host-specific variables, overridden below
143 host_platform = linux
144 libenv = LD_LIBRARY_PATH
145 shell = sh
146 script_ext = .sh
147 script_hdr = #!/bin/sh
148 script_tmpfile = temporary$$.src
149 makefile_tmpfile = temporary$$$$.src
150 setenv = export
151 envvar_pre = $
152 pathsep = :
153 quote_echo = '
154 ln = ln -sf
156 host_macosx {
157   libenv = DYLD_LIBRARY_PATH
160 host_win32 {
161   libenv = PATH
162   shell = cmd /c
163   script_ext = .cmd
164   script_hdr = "@echo off & set TMPFILE=temporary%RANDOM%.src"
165   script_tmpfile = %TMPFILE%
166   makefile_tmpfile = temporary_mpc.src
167   setenv = set
168   envvar_pre = %
169   envvar_post = %
170   pathsep = ;
171   mkdir_pre = if not exist
172   ln = copy /y
173   quote_echo =
176 // Abstractions for different configurations
177 release {
178   optimization_level = max
179   debugging_level = none
182 debug {
183   optimization_level = none
184   debugging_level = max