Add MPC_LIB_MODIFIER
[MPC.git] / templates / ghs.mpd
blob45e254e1485fa75d6c41abaae04dc9d27249865d
1 #!gbuild
2 #primaryTarget=<%primaryTarget("ppc_integrity.tgt")%>
3 <%if(exename)%>
4         [Program]
5         -o <%if(exeout)%><%reltop_exeout%><%else%><%reltop%><%endif%>/<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%exe_ext%>
6 <%if(need_staticflags)%>
7         {optional} -non_shared
8 <%endif%>
9 <%else%>
10 <%if(sharedname)%>
11         [Shared Object]
12         -o <%if(dllout)%><%reltop_dllout%><%else%><%reltop_libout%><%endif%>/<%lib_prefix%><%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%libext(".so")%>
13 <%else%>
14 <%if(staticname)%>
15         [Library]
16         -o <%reltop_libout%>/<%lib_prefix%><%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%libext(".a")%>
17 <%else%>
18         [Subproject]
19 <%endif%>
20 <%endif%>
21 <%endif%>
22 <%if(bsp)%>
23         -bsp <%bsp%>
24 <%endif%>
25 <%if(os_dir)%>
26         -os_dir <%os_dir%>
27 <%endif%>
28 <%if(optimize)%>
29         -Ospeed
30         -OI
31 <%else%>
32         -G
33 <%endif%>
34 <%if(exceptions)%>
35         --exceptions
36 <%endif%>
37 <%if(pch_header && !no_use_pch)%>
38         --pch
39 <%foreach(pch_defines)%>
40         -D<%pch_define%>
41 <%endfor%>
42 <%endif%>
43 <%foreach(reltop_includes)%>
44         -I<%reltop_include%>
45 <%endfor%>
46 <%foreach(reltop_libpaths)%>
47         -L<%reltop_libpath%>
48 <%endfor%>
49 <%if(libs || lit_libs || pure_libs)%>
50 <%if(exename || sharedname)%>
51 <%foreach(libs)%>
52         -l<%libname_prefix%><%lib%><%if(use_lib_modifier)%><%lib_modifier%><%endif%>
53 <%endfor%>
54 <%foreach(lit_libs)%>
55         -l<%lit_lib%>
56 <%endfor%>
57 <%foreach(pure_libs)%>
58         <%pure_lib%>
59 <%endfor%>
60 <%endif%>
61 <%endif%>
62 <%if(sharedname)%>
63 <%foreach(dynamicflags)%>
64         -D<%dynamicflag%>
65 <%endfor%>
66 <%endif%>
67 <%if(need_staticflags)%>
68 <%foreach(staticflags)%>
69         -D<%staticflag%>
70 <%endfor%>
71 <%endif%>
72 <%if(macros)%>
73 <%foreach(macros)%>
74         -D<%macro%>
75 <%endfor%>
76 <%endif%>
77 <%if(compile_flags)%>
78 <%foreach(compile_flags)%>
79         <%compile_flag%>
80 <%endfor%>
81 <%endif%>
82 <%if(custom_only || !source_files && custom_types)%>
83 .custom_build_rule              [HTML Source]
84 <%endif%>
85 <%scope(enter, escape, \\)%>
86 <%foreach(custom_types)%>
87 <%foreach(custom_type->input_files)%>
88 <%if(!custom_only && source_files)%>
89 <%custom_type->input_file%>             [Text]
90 <%endif%>
91 <%if(custom_type->input_file->output_files)%>
92 <%if(custom_type->output_option)%>
93 <%foreach(custom_type->input_file->output_files)%>
94 <%if(!custom_only && source_files)%>
95 <%custom_type->input_file->output_file%>
96 <%endif%>
97 <%if(flag_overrides(custom_type->input_file, dependent))%>
98 <%foreach(dep, flag_overrides(custom_type->input_file, dependent))%>
99         :dependsRelative=<%dep%><%if(!has_extension(dep))%><%exe_ext%><%endif%>
100 <%endfor%>
101 <%else%>
102 <%foreach(custom_type->dependent)%>
103         :dependsRelative=<%custom_type->dependent%><%if(!has_extension(custom_type->dependent))%><%exe_ext%><%endif%>
104 <%endfor%>
105 <%endif%>
106         :dependsRelative=<%custom_type->input_file%>
107 <%if(custom_type->input_file->dependencies)%>
108 <%foreach(custom_type->input_file->dependencies)%>
109         :dependsRelative=<%custom_type->input_file->dependencie%>
110 <%endfor%>
111 <%endif%>
112 <%if(!need_staticflags)%>
113 <%if(flag_overrides(custom_type->input_file, dependent_libs))%>
114 <%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%>
115         :dependsRelative=<%dirname(dep_lib)%>/<%lib_prefix%><%libname_prefix%><%basename(dep_lib)%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%libext(".so")%>
116 <%endfor%>
117 <%else%>
118 <%if(custom_type->dependent_libs)%>
119 <%foreach(custom_type->dependent_libs)%>
120         :dependsRelative=<%dirname(custom_type->dependent_lib)%>/<%lib_prefix%><%libname_prefix%><%basename(custom_type->dependent_lib)%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%libext(".so")%>
121 <%endfor%>
122 <%endif%>
123 <%endif%>
124 <%endif%>
125 <%if(flag_overrides(custom_type->input_file, gendir))%>
126         :preexecShell='cd <%reltop%> && <%mkdir%> <%flag_overrides(custom_type->input_file, gendir)%><%postmkdir%>'
127 <%endif%>
128         :preexecShell='cd <%reltop%> && <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%><%if(custom_type->output_option)%> <%custom_type->input_file%> <%custom_type->output_option%> <%custom_type->input_file->output_file%><%else%> <%custom_type->input_file%><%endif%>'
129 <%endfor%>
130 <%else%>
131 <%if(!custom_only && source_files)%>
132 <%foreach(custom_type->input_file->source_output_files)%>
133 <%if(forfirst)%>
134 <%custom_type->input_file->source_output_file%>
135 <%endif%>
136 <%endfor%>
137 <%endif%>
138 <%if(flag_overrides(custom_type->input_file, dependent))%>
139 <%foreach(dep, flag_overrides(custom_type->input_file, dependent))%>
140         :dependsRelative=<%dep%><%if(!has_extension(dep))%><%exe_ext%><%endif%>
141 <%endfor%>
142 <%else%>
143 <%foreach(custom_type->dependent)%>
144         :dependsRelative=<%custom_type->dependent%><%if(!has_extension(custom_type->dependent))%><%exe_ext%><%endif%>
145 <%endfor%>
146 <%endif%>
147         :dependsRelative=<%custom_type->input_file%>
148 <%if(custom_type->input_file->dependencies)%>
149 <%foreach(custom_type->input_file->dependencies)%>
150         :dependsRelative=<%custom_type->input_file->dependencie%>
151 <%endfor%>
152 <%endif%>
153 <%if(flag_overrides(custom_type->input_file, gendir))%>
154         :preexecShell='cd <%reltop%> && <%mkdir%> <%flag_overrides(custom_type->input_file, gendir)%><%postmkdir%>'
155 <%endif%>
156         :preexecShell='cd <%reltop%> && <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%custom_type->input_file%>'
157 <%if(flag_overrides(custom_type->input_file, postcommand))%>
158 <%foreach(custom_type->input_file)%>
159         :preexecShell='cd <%reltop%> && <%flag_overrides(custom_type->input_file, postcommand)%>'
160 <%endfor%>
161 <%else%>
162 <%if(custom_type->postcommand)%>
163 <%foreach(custom_type->input_file)%>
164         :preexecShell='cd <%reltop%> && <%custom_type->postcommand%>'
165 <%endfor%>
166 <%endif%>
167 <%endif%>
168 <%if(pch_header && !no_use_pch && custom_type->pch_postrule)%>
169 <%foreach(custom_type->input_file->source_output_files)%>
170         :preexecShell='cd <%reltop%> && echo #include "<%pch_header%>" > temporary.src'
171         :preexecShell='cd <%reltop%> && <%cat%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%> >> temporary.src'
172         :preexecShell='cd <%reltop%> && <%mv%> temporary.src <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>'
173 <%endfor%>
174 <%endif%>
175 <%endif%>
176 <%foreach(custom_type->input_file->output_files)%>
177         :extraOutputFile=<%custom_type->input_file->output_file%>
178 <%endfor%>
179 <%if(custom_only || !source_files)%>
180         -c
181         :postexecShell='<%rm%> .c && <%rm%> .h'
182 <%endif%>
183 <%endif%>
184 <%endfor%>
185 <%endfor%>
186 <%scope(leave)%>
187 <%foreach(source_files)%>
188 <%source_file%>
189 <%if(compile_flags)%>
190         -cxx_compiler.args=<%compile_flags%><%if(flag_overrides(source_file, buildflags))%> <%flag_overrides(source_file, buildflags)%><%endif%>
191 <%else%>
192 <%if(flag_overrides(source_file, buildflags))%>
193         -cxx_compiler.args=<%flag_overrides(source_file, buildflags)%>
194 <%endif%>
195 <%endif%>
196 <%endfor%>
197 <%foreach(header_files)%>
198 <%header_file%>
199 <%endfor%>
200 <%foreach(inline_files)%>
201 <%inline_file%>
202 <%endfor%>
203 <%foreach(resource_files)%>
204 <%resource_file%>
205 <%endfor%>
206 <%foreach(documentation_files)%>
207 <%documentation_file%>          [Documentation]
208 <%endfor%>