[WIDL]
[reactos.git] / reactos / tools / rbuild / backend / mingw / rules.mak
1 RBUILD_fullpath=${subst <<<,,${subst $(SEP)<<<,,${subst /,$(SEP),${subst \\,$(SEP),$(1)}}<<<}}
2
3 RBUILD_compress_prefix=${subst >>>,,${subst >>>$($(2)),$$($(2)),>>>$(1)}}
4 RBUILD_compress_prefixes=${call RBUILD_compress_prefix,${call RBUILD_compress_prefix,${call RBUILD_compress_prefix,${call RBUILD_compress_prefix,${call RBUILD_compress_prefix,$(1),INTERMEDIATE},OUTPUT},CDOUTPUT},TEMPORARY},INSTALL}
5
6 RBUILD_strip_prefix=${subst >>>,,${subst >>>$($(2)),,>>>$(1)}}
7 RBUILD_strip_prefixes=${subst >>>,,${subst >>>$(SEP),,>>>${call RBUILD_strip_prefix,${call RBUILD_strip_prefix,${call RBUILD_strip_prefix,${call RBUILD_strip_prefix,${call RBUILD_strip_prefix,$(1),INTERMEDIATE},OUTPUT},CDOUTPUT},TEMPORARY},INSTALL}}}
8
9 #(source)
10 RBUILD_intermediate_path_noext=${call RBUILD_intermediate_dir,$(1)}$(SEP)$(basename $(notdir $(1)))
11 RBUILD_output_path_noext=${call RBUILD_output_dir,$(1)}$(SEP)$(basename $(notdir $(1)))
12
13 #(module, source)
14 RBUILD_intermediate_path_unique=${call RBUILD_intermediate_path_noext,$(2)}_$(1)
15 RBUILD_output_dir=${call RBUILD_output_path_noext,$(2)}_$(1)
16
17 #(source)
18 RBUILD_intermediate_dir=${call RBUILD_fullpath,$(value INTERMEDIATE)$(SEP)$(dir ${call RBUILD_strip_prefixes,$(1)})}
19 RBUILD_output_dir=${call RBUILD_fullpath,$(value OUTPUT)$(SEP)$(dir ${call RBUILD_strip_prefixes,$(1)})}
20
21 #(source)
22 RBUILD_name=$(basename $(notdir $(1)))
23 RBUILD_noext=$(dir $(1))$(basename $(notdir $(1)))
24
25 #(source)
26 RBUILD_dir=${call RBUILD_fullpath,$(dir ${call RBUILD_compress_prefixes,$(1)})}
27
28 #(module, flags, includes, compiler, prefix)
29 RBUILD_compiler_flags=\
30 $$(BUILTIN_$(5)$(4)FLAGS) \
31 $$(PROJECT_$(5)$(4)FLAGS) \
32 $$(MODULETYPE$($(1)_TYPE)_$(4)FLAGS) \
33 $$($(1)_$(4)FLAGS) \
34 $(2) \
35 $$($(5)$(4)FLAGS)
36
37 #(module, flags, includes, compiler, prefix)
38 RBUILD_compiler_flags_with_cpp=\
39 $$($(5)$(4)INCLUDES) $$(CPPINCLUDES) \
40 $(3) \
41 $$($(1)_$(4)INCLUDES) $$($(1)_CPPINCLUDES) \
42 $$(MODULETYPE$($(1)_TYPE)_$(4)INCLUDES) $$(MODULETYPE$($(1)_TYPE)_CPPINCLUDES) \
43 $$(PROJECT_$(5)$(4)INCLUDES) $$(PROJECT_$(5)CPPINCLUDES) \
44 $$(BUILTIN_$(5)$(4)INCLUDES) $$(BUILTIN_$(5)CPPINCLUDES) \
45 $$(BUILTIN_$(5)CPPDEFINES) $$(BUILTIN_$(5)CPPFLAGS) $$(BUILTIN_$(5)$(4)DEFINES) $$(BUILTIN_$(5)$(4)FLAGS) \
46 $$(PROJECT_$(5)CPPDEFINES) $$(PROJECT_$(5)CPPFLAGS) $$(PROJECT_$(5)$(4)DEFINES) $$(PROJECT_$(5)$(4)FLAGS) \
47 $$(MODULETYPE$($(1)_TYPE)_CPPDEFINES) $$(MODULETYPE$($(1)_TYPE)_CPPFLAGS) $$(MODULETYPE$($(1)_TYPE)_$(4)DEFINES) $$(MODULETYPE$($(1)_TYPE)_$(4)FLAGS) \
48 $$($(1)_CPPDEFINES) $$($(1)_CPPFLAGS) $$($(1)_$(4)DEFINES) $$($(1)_$(4)FLAGS) \
49 $(2) \
50 $$(CPPDEFINES) $$(CPPFLAGS) $$($(5)$(4)DEFINES) $$($(5)$(4)FLAGS)
51
52 #(module, flags, includes, compiler, prefix)
53 RBUILD_compiler_flags_builtin_cpp=\
54 $$($(5)$(4)INCLUDES) $$(CPPINCLUDES) \
55 $(3) \
56 $$($(1)_$(4)INCLUDES) $$($(1)_CPPINCLUDES) \
57 $$(MODULETYPE$($(1)_TYPE)_$(4)INCLUDES) $$(MODULETYPE$($(1)_TYPE)_CPPINCLUDES) \
58 $$(PROJECT_$(5)$(4)INCLUDES) $$(PROJECT_$(5)CPPINCLUDES) \
59 $$(BUILTIN_$(5)$(4)INCLUDES) $$(BUILTIN_$(5)CPPINCLUDES) \
60 $$(BUILTIN_$(5)CPPDEFINES) $$(BUILTIN_$(5)$(4)DEFINES) $$(BUILTIN_$(5)$(4)FLAGS) \
61 $$(PROJECT_$(5)CPPDEFINES) $$(PROJECT_$(5)$(4)DEFINES) $$(PROJECT_$(5)$(4)FLAGS) \
62 $$(MODULETYPE$($(1)_TYPE)_CPPDEFINES) $$(MODULETYPE$($(1)_TYPE)_$(4)DEFINES) $$(MODULETYPE$($(1)_TYPE)_$(4)FLAGS) \
63 $$($(1)_CPPDEFINES) $$($(1)_$(4)DEFINES) $$($(1)_$(4)FLAGS) \
64 $(2) \
65 $$(CPPDEFINES) $$($(5)$(4)DEFINES) $$($(5)$(4)FLAGS)
66
67 #(module, flags, includes, compiler, prefix)
68 RBUILD_compiler_flags_with_includes=\
69 $$($(5)$(4)INCLUDES) \
70 $(3) \
71 $$($(1)_$(4)INCLUDES) $$($(1)_CPPINCLUDES) \
72 $$(MODULETYPE$($(1)_TYPE)_$(4)INCLUDES) \
73 $$(PROJECT_$(5)$(4)INCLUDES) \
74 $$(BUILTIN_$(5)$(4)INCLUDES) \
75 $$(BUILTIN_$(5)$(4)FLAGS) \
76 $$(PROJECT_$(5)$(4)FLAGS) \
77 $$(MODULETYPE$($(1)_TYPE)_$(4)FLAGS) \
78 $$($(1)_$(4)FLAGS) \
79 $(2) \
80 $$($(5)$(4)FLAGS)
81
82 #(module, flags, includes, compiler, prefix)
83 RBUILD_compiler_flags_cpp=\
84 $$($(5)$(4)INCLUDES) $$(CPPINCLUDES) \
85 $(3) \
86 $$($(1)_$(4)INCLUDES) $$($(1)_CPPINCLUDES) \
87 $$(MODULETYPE$($(1)_TYPE)_$(4)INCLUDES) $$(MODULETYPE$($(1)_TYPE)_CPPINCLUDES) \
88 $$(PROJECT_$(5)$(4)INCLUDES) $$(PROJECT_$(5)CPPINCLUDES) \
89 $$(BUILTIN_$(5)$(4)INCLUDES) $$(BUILTIN_$(5)CPPINCLUDES) \
90 $$(BUILTIN_$(5)CPPFLAGS) $$(BUILTIN_$(5)CPPDEFINES) $$(BUILTIN_$(5)$(4)DEFINES) \
91 $$(PROJECT_$(5)CPPFLAGS) $$(PROJECT_$(5)CPPDEFINES) $$(PROJECT_$(5)$(4)DEFINES) \
92 $$(MODULETYPE$($(1)_TYPE)_CPPFLAGS) $$(MODULETYPE$($(1)_TYPE)_CPPDEFINES) $$(MODULETYPE$($(1)_TYPE)_$(4)DEFINES) \
93 $$($(1)_CPPFLAGS) $$($(1)_CPPDEFINES) $$($(1)_$(4)DEFINES) \
94 $(2) \
95 $$(CPPFLAGS) $$(CPPDEFINES) $$($(5)$(4)DEFINES)
96
97 #(module, flags, includes)
98 RBUILD_cflags=${call RBUILD_compiler_flags_with_cpp,$(1),$(2),$(3),C}
99 RBUILD_cxxflags=${call RBUILD_compiler_flags_with_cpp,$(1),$(2),$(3),CXX}
100 #~ RBUILD_asflags=${call RBUILD_compiler_flags_with_cpp,$(1),$(2),$(3),AS}
101 RBUILD_asflags=${call RBUILD_compiler_flags_builtin_cpp,$(1),$(2),$(3),AS}
102 RBUILD_nasmflags=${call RBUILD_compiler_flags_builtin_cpp,$(1),$(2),$(3),NASM}
103 RBUILD_rc_pp_flags=${call RBUILD_compiler_flags_cpp,$(1),-DRC_INVOKED=1 -D__WIN32__=1 -D__FLAT__=1,$(3) -I.,RC}
104 RBUILD_rc_flags=${call RBUILD_compiler_flags_with_includes,$(1),$(2),$(3),RC}
105 RBUILD_spec_pp_flags=${call RBUILD_compiler_flags_cpp,$(1),,$(3),SPEC}
106 RBUILD_spec_flags=${call RBUILD_compiler_flags,$(1),$(2),,SPEC}
107 RBUILD_midlflags=${call RBUILD_compiler_flags_builtin_cpp,$(1),$(2),$(3),MIDL}
108 RBUILD_host_cflags=${call RBUILD_compiler_flags_with_cpp,$(1),$(2),$(3),C,HOST_}
109 RBUILD_host_cxxflags=${call RBUILD_compiler_flags_with_cpp,$(1),$(2),$(3),CXX,HOST_}
110 RBUILD_ldflags=${call RBUILD_compiler_flags,$(1),$(2),,LD}
111
112 RCFLAG_UNICODE:=-DUNICODE -D_UNICODE
113
114 BUILTIN_ASDEFINES+= -D__ASM__
115 BUILTIN_RCFLAGS+= --nostdinc
116 BUILTIN_RCDEFINES+= -DRC_INVOKED
117 BUILTIN_NASMFLAGS+= -f win32
118
119 #(module, source, dependencies, cflags, output)
120 define RBUILD_GAS
121
122 $(2): $${$(1)_precondition}
123
124 ifeq ($(ROS_BUILDDEPS),full)
125
126 $(5).d: $(2) | ${call RBUILD_dir,$(5)}
127 $$(ECHO_DEPENDS)
128 $${gas} -MF $$@ ${call RBUILD_asflags,$(1),$(4)} -M -MP -MT $$@ $$<
129
130 -include $(5).d
131
132 $(5): $(2) $(5).d $(3) | ${call RBUILD_dir,$(5)}
133 $$(ECHO_AS)
134 $${gas} -o $$@ ${call RBUILD_asflags,$(1),$(4)} -c $$<
135
136 else
137
138 $(5): $(2) $(3) | ${call RBUILD_dir,$(5)}
139 $$(ECHO_AS)
140 $${gas} -o $$@ ${call RBUILD_asflags,$(1),$(4)} -c $$<
141
142 endif
143
144 endef
145
146 #(module, source, dependencies, cflags)
147 RBUILD_GAS_RULE=${call RBUILD_GAS,$(1),$(2),$(3),$(4),${call RBUILD_intermediate_path_unique,$(1),$(2)}.o}
148
149 #(module, source, dependencies, cflags, output)
150 define RBUILD_NASM
151
152 $(2): $${$(1)_precondition}
153
154 $(5): $(2) $(3) | ${call RBUILD_dir,$(5)}
155 $$(ECHO_NASM)
156 $${nasm} -o $$@ ${call RBUILD_nasmflags,$(1),$(4)} $$<
157
158 endef
159
160 # TODO: module_dllname -> ${call RBUILD_module_dllname,$(1)}
161
162 #(module, source, dependencies, cflags, module_dllname, output)
163 define RBUILD_WINEBUILD_DEF
164
165 $(6): $(2) $$(winebuild_TARGET) | ${call RBUILD_intermediate_dir,$(6)}
166 $$(ECHO_WINEBLD)
167 $$(Q)$$(winebuild_TARGET) $$(WINEBUILD_FLAGS) -o $$@ --def -E $$< --filename $(5) ${call RBUILD_spec_flags,$(1),$(4)}
168
169 endef
170
171 #(module, source, dependencies, cflags, module_dllname, output)
172 define RBUILD_WINEBUILD_STUBS
173
174 $(6): $(2) $$(winebuild_TARGET) | ${call RBUILD_intermediate_dir,$(6)}
175 $$(ECHO_WINEBLD)
176 $$(Q)$$(winebuild_TARGET) $$(WINEBUILD_FLAGS) -o $$@ --pedll $$< --filename $(5) ${call RBUILD_spec_flags,$(1),$(4)}
177
178 endef
179
180 #(module, source, dependencies, cflags, module_dllname)
181 define RBUILD_WINEBUILD_WITH_CPP_RULE
182
183 ifeq ($$(ROS_BUILDDEPS),full)
184
185 ${call RBUILD_DEPENDS,$(1),$(2),,${call RBUILD_spec_pp_flags,$(1),$(4)},${call RBUILD_intermediate_path_unique,$(1),$(2)}.spec.d}
186 -include ${call RBUILD_intermediate_path_unique,$(1),$(2)}.spec.d
187
188 ${call RBUILD_CPP,$(1),$(2),${call RBUILD_intermediate_path_unique,$(1),$(2)}.spec.d $(3),${call RBUILD_spec_pp_flags,$(1),$(4)},${call RBUILD_intermediate_path_unique,$(1),$(2)}.spec}
189
190 else
191
192 ${call RBUILD_CPP,$(1),$(2),$(3),${call RBUILD_spec_pp_flags,$(1),$(4)},${call RBUILD_intermediate_path_unique,$(1),$(2)}.spec}
193
194 endif
195
196 ${call RBUILD_WINEBUILD_DEF,$(1),${call RBUILD_intermediate_path_unique,$(1),$(2)}.spec,,$(4),$(5),${call RBUILD_intermediate_path_unique,$(1),$(2)}.auto.def}
197 ${call RBUILD_WINEBUILD_STUBS,$(1),${call RBUILD_intermediate_path_unique,$(1),$(2)}.spec,,$(4),$(5),${call RBUILD_intermediate_path_unique,$(1),$(2)}.stubs.c}
198 ${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_unique,$(1),$(2)}.stubs.c,,,${call RBUILD_intermediate_path_unique,$(1),$(2)}.stubs.o}
199
200 endef
201
202 #(module, source, dependencies, cflags, module_dllname)
203 define RBUILD_WINEBUILD_RULE
204
205 ${call RBUILD_WINEBUILD_DEF,$(1),$(2),$(3),$(4),$(5),${call RBUILD_intermediate_path_unique,$(1),$(2)}.auto.def}
206 ${call RBUILD_WINEBUILD_STUBS,$(1),$(2),$(3),$(4),$(5),${call RBUILD_intermediate_path_unique,$(1),$(2)}.stubs.c}
207 ${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_unique,$(1),$(2)}.stubs.c,,,${call RBUILD_intermediate_path_unique,$(1),$(2)}.stubs.o}
208
209 endef
210
211 # FIXME: wrc butchers localized strings and doesn't implement -M, so we have to use an external preprocessor
212 #(module, source, dependencies, cflags)
213 define RBUILD_WRC_RULE
214
215 $(2): $${$(1)_precondition}
216
217 ifeq ($$(ROS_BUILDDEPS),full)
218
219 ${call RBUILD_DEPENDS,$(1),$(2),,${call RBUILD_rc_pp_flags,$(1),$(4)},${call RBUILD_intermediate_path_unique,$(1),$(2)}.res.d}
220 -include ${call RBUILD_intermediate_path_unique,$(1),$(2)}.coff.d
221
222 ${call RBUILD_intermediate_path_unique,$(1),$(2)}.res: $(2) ${call RBUILD_intermediate_path_unique,$(1),$(2)}.res.d $(3) $$(wrc_TARGET) | ${call RBUILD_intermediate_dir,$(2)}
223 $$(ECHO_RC)
224 ${call RBUILD_PIPE_CPP,$$<,${call RBUILD_rc_pp_flags,$(1),$(4)}} | $$(wrc_TARGET) -o $$@ ${call RBUILD_rc_flags,$(1),$(4),-I${call RBUILD_dir,$(2)}}
225
226 else
227
228 ${call RBUILD_intermediate_path_unique,$(1),$(2)}.res: $(2) $(3) $$(wrc_TARGET) | ${call RBUILD_intermediate_dir,$(2)}
229 $$(ECHO_RC)
230 ifeq ($(ARCH),amd64)
231 $$(Q)$$(wrc_TARGET) --input=$$< -o $$@ ${call RBUILD_rc_pp_flags,$(1),$(4)} ${call RBUILD_rc_flags,$(1),$(4),-I${call RBUILD_dir,$(2)}}
232 else
233 ${call RBUILD_PIPE_CPP,$$<,${call RBUILD_rc_pp_flags,$(1),$(4)}} | $$(wrc_TARGET) -o $$@ ${call RBUILD_rc_flags,$(1),$(4),-I${call RBUILD_dir,$(2)}}
234 endif
235
236 endif
237
238 ${call RBUILD_intermediate_path_unique,$(1),$(2)}.coff: ${call RBUILD_intermediate_path_unique,$(1),$(2)}.res | ${call RBUILD_intermediate_dir,$(2)}
239 $$(ECHO_CVTRES)
240 $${windres} -i $$< -o $$@ -J res -O coff
241
242 endef
243
244 define RBUILD_WIDL
245
246 endef
247
248 define RBUILD_WIDL_HEADER_RULE
249
250 $(2): $${$(1)_precondition}
251
252 ${call RBUILD_intermediate_path_noext,$(2)}.h: $(2) $(3) $$(widl_TARGET) | ${call RBUILD_intermediate_dir,$(2)}
253 $$(ECHO_WIDL)
254 $$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -h -o $$@ $$<
255
256 endef
257
258 #(module, source, dependencies, cflags)
259 define RBUILD_WIDL_CLIENT_RULE
260
261 $(2): $${$(1)_precondition}
262
263 ${call RBUILD_intermediate_path_noext,$(2)}_c.c ${call RBUILD_intermediate_path_noext,$(2)}_c.h: ${call RBUILD_intermediate_path_noext,$(2)}_c
264
265 ${call RBUILD_intermediate_path_noext,$(2)}_c: $(2) $(3) $$(widl_TARGET) | ${call RBUILD_intermediate_dir,$(2)}
266 $$(ECHO_WIDL)
267 $$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -h -H ${call RBUILD_intermediate_path_noext,$(2)}_c.h -c -C ${call RBUILD_intermediate_path_noext,$(2)}_c.c $(2)
268 $${checkpoint} $$@>$(NUL)
269
270 ${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_c.c,,,${call RBUILD_intermediate_path_noext,$(2)}_c.o}
271
272 endef
273
274 #(module, source, dependencies, cflags)
275 define RBUILD_WIDL_SERVER_RULE
276
277 $(2): $${$(1)_precondition}
278
279 ${call RBUILD_intermediate_path_noext,$(2)}_s.c ${call RBUILD_intermediate_path_noext,$(2)}_s.h: ${call RBUILD_intermediate_path_noext,$(2)}_s
280
281 ${call RBUILD_intermediate_path_noext,$(2)}_s: $(2) $(3) $$(widl_TARGET) | ${call RBUILD_intermediate_dir,$(2)}
282 $$(ECHO_WIDL)
283 $$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -h -H ${call RBUILD_intermediate_path_noext,$(2)}_s.h -s -S ${call RBUILD_intermediate_path_noext,$(2)}_s.c $(2)
284 $${checkpoint} $$@>$(NUL)
285
286 ${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_s.c,,,${call RBUILD_intermediate_path_noext,$(2)}_s.o}
287
288 endef
289
290 #(module, source, dependencies, cflags)
291 define RBUILD_WIDL_PROXY_RULE
292
293 $(2): $${$(1)_precondition}
294
295 ${call RBUILD_intermediate_path_noext,$(2)}_p.c ${call RBUILD_intermediate_path_noext,$(2)}_p.h: ${call RBUILD_intermediate_path_noext,$(2)}_p
296
297 ${call RBUILD_intermediate_path_noext,$(2)}_p: $(2) $(3) $$(widl_TARGET) | ${call RBUILD_intermediate_dir,$(2)}
298 $$(ECHO_WIDL)
299 $$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -h -H ${call RBUILD_intermediate_path_noext,$(2)}_p.h -p -P ${call RBUILD_intermediate_path_noext,$(2)}_p.c $(2)
300 $${checkpoint} $$@>$(NUL)
301
302 ${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_p.c,,,${call RBUILD_intermediate_path_noext,$(2)}_p.o}
303
304 endef
305
306 #(module, source, dependencies, cflags)
307 define RBUILD_WIDL_INTERFACE_RULE
308
309 $(2): $${$(1)_precondition}
310
311 ${call RBUILD_intermediate_path_noext,$(2)}_i.c: $(2) $(3) $$(widl_TARGET) | ${call RBUILD_intermediate_dir,$(2)}
312 $$(ECHO_WIDL)
313 $$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -u -o $$@ $$<
314
315 ${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_i.c,,,${call RBUILD_intermediate_path_noext,$(2)}_i.o}
316
317 endef
318
319 # FIXME: this rule sucks
320 #(module, source, dependencies, cflags, bare_dependencies)
321 define RBUILD_WIDL_DLLDATA_RULE
322
323 $(2): $(3) ${$(1)_precondition} $$(widl_TARGET) | ${call RBUILD_intermediate_dir,$(2)}
324 $$(ECHO_WIDL)
325 $$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4)} --dlldata-only -o $(2) $(5)
326
327 ${call RBUILD_CC,$(1),$(2),,,${call RBUILD_intermediate_path_noext,$(2)}.o}
328
329 endef
330
331 #(module, source, dependencies, cflags)
332 define RBUILD_WIDL_TLB_RULE
333
334 $(2): $${$(1)_precondition}
335
336 ${call RBUILD_intermediate_dir,$(2)}$$(SEP)$(1).tlb: $(2) $(3) $$(widl_TARGET) | ${call RBUILD_intermediate_dir,$(2)}
337 $$(ECHO_WIDL)
338 $$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -t -o $$@ $$<
339
340 endef
341
342 #(module, source, dependencies, cflags)
343 define RBUILD_HOST_GCC_RULE
344
345 $(2): $${$(1)_precondition}
346
347 ${call RBUILD_intermediate_path_unique,$(1),$(2)}.o: $(2) $(3) | ${call RBUILD_intermediate_dir,$(2)}
348 $$(ECHO_HOSTCC)
349 $${host_gcc} -o $$@ ${call RBUILD_host_cflags,$(1),$(4)} -c $$<
350
351 endef
352
353 #(module, source, dependencies, cflags)
354 define RBUILD_HOST_GPP_RULE
355
356 $(2): $${$(1)_precondition}
357
358 ${call RBUILD_intermediate_path_unique,$(1),$(2)}.o: $(2) $(3) | ${call RBUILD_intermediate_dir,$(2)}
359 $$(ECHO_HOSTCC)
360 $${host_gpp} -o $$@ ${call RBUILD_host_cxxflags,$(1),$(4)} -c $$<
361
362 endef
363
364 # EOF