1 RBUILD_fullpath
=${subst <<<,,${subst $(SEP
)<<<,,${subst /,$(SEP
),${subst \\,$(SEP
),$(1)}}<<<}}
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
}
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
}}}
10 RBUILD_intermediate_path_noext
=${call RBUILD_intermediate_dir
,$(1)}$(SEP
)$(basename $(notdir $(1)))
13 RBUILD_intermediate_path_unique
=${call RBUILD_intermediate_path_noext
,$(2)}_
$(1)
16 RBUILD_intermediate_dir
=${call RBUILD_fullpath
,$(value INTERMEDIATE
)$(SEP
)$(dir ${call RBUILD_strip_prefixes
,$(1)})}
19 RBUILD_source_name
=$(basename $(notdir $(1)))
22 RBUILD_dir
=${call RBUILD_fullpath
,$(dir ${call RBUILD_compress_prefixes
,$(1)})}
24 # FIXME: when RosBE stops hijacking HOST_CFLAGS etc., add CFLAGS etc.
26 #(module, flags, includes, compiler, prefix)
27 RBUILD_compiler_flags
=\
28 $$(BUILTIN_
$(5)$(4)FLAGS
) \
29 $$(PROJECT_
$(5)$(4)FLAGS
) \
30 $$(MODULETYPE
$($(1)_TYPE
)_
$(4)FLAGS
) \
34 #(module, flags, includes, compiler, prefix)
35 RBUILD_compiler_flags_with_cpp
=\
37 $$($(1)_
$(4)INCLUDES
) $$($(1)_CPPINCLUDES
) \
38 $$(MODULETYPE
$($(1)_TYPE
)_
$(4)INCLUDES
) $$(MODULETYPE
$($(1)_TYPE
)_CPPINCLUDES
) \
39 $$(PROJECT_
$(5)$(4)INCLUDES
) $$(PROJECT_
$(5)CPPINCLUDES
) \
40 $$(BUILTIN_
$(5)$(4)INCLUDES
) $$(BUILTIN_
$(5)CPPINCLUDES
) \
41 $$(BUILTIN_
$(5)CPPDEFINES
) $$(BUILTIN_
$(5)CPPFLAGS
) $$(BUILTIN_
$(5)$(4)DEFINES
) $$(BUILTIN_
$(5)$(4)FLAGS
) \
42 $$(PROJECT_
$(5)CPPDEFINES
) $$(PROJECT_
$(5)CPPFLAGS
) $$(PROJECT_
$(5)$(4)DEFINES
) $$(PROJECT_
$(5)$(4)FLAGS
) \
43 $$(MODULETYPE
$($(1)_TYPE
)_CPPDEFINES
) $$(MODULETYPE
$($(1)_TYPE
)_CPPFLAGS
) $$(MODULETYPE
$($(1)_TYPE
)_
$(4)DEFINES
) $$(MODULETYPE
$($(1)_TYPE
)_
$(4)FLAGS
) \
44 $$($(1)_CPPDEFINES
) $$($(1)_CPPFLAGS
) $$($(1)_
$(4)DEFINES
) $$($(1)_
$(4)FLAGS
) \
47 #(module, flags, includes, compiler, prefix)
48 RBUILD_compiler_flags_builtin_cpp
=\
50 $$($(1)_
$(4)INCLUDES
) $$($(1)_CPPINCLUDES
) \
51 $$(MODULETYPE
$($(1)_TYPE
)_
$(4)INCLUDES
) $$(MODULETYPE
$($(1)_TYPE
)_CPPINCLUDES
) \
52 $$(PROJECT_
$(5)$(4)INCLUDES
) $$(PROJECT_
$(5)CPPINCLUDES
) \
53 $$(BUILTIN_
$(5)$(4)INCLUDES
) $$(BUILTIN_
$(5)CPPINCLUDES
) \
54 $$(BUILTIN_
$(5)CPPDEFINES
) $$(BUILTIN_
$(5)$(4)DEFINES
) $$(BUILTIN_
$(5)$(4)FLAGS
) \
55 $$(PROJECT_
$(5)CPPDEFINES
) $$(PROJECT_
$(5)$(4)DEFINES
) $$(PROJECT_
$(5)$(4)FLAGS
) \
56 $$(MODULETYPE
$($(1)_TYPE
)_CPPDEFINES
) $$(MODULETYPE
$($(1)_TYPE
)_
$(4)DEFINES
) $$(MODULETYPE
$($(1)_TYPE
)_
$(4)FLAGS
) \
57 $$($(1)_CPPDEFINES
) $$($(1)_
$(4)DEFINES
) $$($(1)_
$(4)FLAGS
) \
60 #(module, flags, includes, compiler, prefix)
61 RBUILD_compiler_flags_with_includes
=\
63 $$($(1)_
$(4)INCLUDES
) $$($(1)_CPPINCLUDES
) \
64 $$(MODULETYPE
$($(1)_TYPE
)_
$(4)INCLUDES
) \
65 $$(PROJECT_
$(5)$(4)INCLUDES
) \
66 $$(BUILTIN_
$(5)$(4)INCLUDES
) \
67 $$(BUILTIN_
$(5)$(4)FLAGS
) \
68 $$(PROJECT_
$(5)$(4)FLAGS
) \
69 $$(MODULETYPE
$($(1)_TYPE
)_
$(4)FLAGS
) \
73 #(module, flags, includes, compiler, prefix)
74 RBUILD_compiler_flags_cpp
=\
76 $$($(1)_
$(4)INCLUDES
) $$($(1)_CPPINCLUDES
) \
77 $$(MODULETYPE
$($(1)_TYPE
)_
$(4)INCLUDES
) $$(MODULETYPE
$($(1)_TYPE
)_CPPINCLUDES
) \
78 $$(PROJECT_
$(5)$(4)INCLUDES
) $$(PROJECT_
$(5)CPPINCLUDES
) \
79 $$(BUILTIN_
$(5)$(4)INCLUDES
) $$(BUILTIN_
$(5)CPPINCLUDES
) \
80 $$(BUILTIN_
$(5)CPPFLAGS
) $$(BUILTIN_
$(5)CPPDEFINES
) $$(BUILTIN_
$(5)$(4)DEFINES
) \
81 $$(PROJECT_
$(5)CPPFLAGS
) $$(PROJECT_
$(5)CPPDEFINES
) $$(PROJECT_
$(5)$(4)DEFINES
) \
82 $$(MODULETYPE
$($(1)_TYPE
)_CPPFLAGS
) $$(MODULETYPE
$($(1)_TYPE
)_CPPDEFINES
) $$(MODULETYPE
$($(1)_TYPE
)_
$(4)DEFINES
) \
83 $$($(1)_CPPFLAGS
) $$($(1)_CPPDEFINES
) $$($(1)_
$(4)DEFINES
) \
86 #(module, flags, includes)
87 RBUILD_cflags
=${call RBUILD_compiler_flags_with_cpp
,$(1),$(2),$(3),C
}
88 RBUILD_cxxflags
=${call RBUILD_compiler_flags_with_cpp
,$(1),$(2),$(3),CXX
}
89 RBUILD_asflags
=${call RBUILD_compiler_flags_with_cpp
,$(1),$(2),$(3),AS
}
90 RBUILD_nasmflags
=${call RBUILD_compiler_flags_builtin_cpp
,$(1),$(2),$(3),NASM
}
91 RBUILD_rc_pp_flags
=${call RBUILD_compiler_flags_cpp
,$(1),-DRC_INVOKED
=1 -D__WIN32__
=1 -D__FLAT__
=1,$(3) -I.
,RC
}
92 RBUILD_rc_flags
=${call RBUILD_compiler_flags_with_includes
,$(1),$(2),$(3),RC
}
93 RBUILD_spec_pp_flags
=${call RBUILD_compiler_flags_cpp
,$(1),,$(3),SPEC
}
94 RBUILD_spec_flags
=${call RBUILD_compiler_flags
,$(1),$(2),,SPEC
}
95 RBUILD_midlflags
=${call RBUILD_compiler_flags_builtin_cpp
,$(1),$(2),$(3),MIDL
}
96 RBUILD_host_cflags
=${call RBUILD_compiler_flags_with_cpp
,$(1),$(2),$(3),C
,HOST_
}
97 RBUILD_host_cxxflags
=${call RBUILD_compiler_flags_with_cpp
,$(1),$(2),$(3),CXX
,HOST_
}
100 CFLAG_CRTDLL
:=-D_DLL
-D__USE_CRTIMP
102 CXXFLAG_WERROR
:=-Werror
103 CXXFLAG_CRTDLL
:=-D_DLL
-D__USE_CRTIMP
105 CPPFLAG_WERROR
:=-Werror
106 CPPFLAG_UNICODE
:=-DUNICODE
-D_UNICODE
108 RCFLAG_UNICODE
:=-DUNICODE
-D_UNICODE
110 BUILTIN_ASDEFINES
+= -D__ASM__
111 BUILTIN_CPPFLAGS
+= -nostdinc
112 BUILTIN_CFLAGS
+= -fno-optimize-sibling-calls
113 BUILTIN_CXXFLAGS
+= -fno-optimize-sibling-calls
114 BUILTIN_RCFLAGS
+= --nostdinc
115 BUILTIN_RCDEFINES
+= -DRC_INVOKED
116 BUILTIN_NASMFLAGS
+= -f win32
118 #(module, source, dependencies, cflags, output)
121 $(2): $${$(1)_precondition
}
123 ifeq ($(ROS_BUILDDEPS
),full
)
125 $(5).d
: $(2) |
${call RBUILD_dir
,$(5)}
127 $${gcc} -MF
$$@
${call RBUILD_cflags
,$(1),$(4)} -M
-MP
-MT
$$@
$$<
131 $(5): $(2) $(5).d
$(3) |
${call RBUILD_dir
,$(5)}
133 $${gcc} -o
$$@
${call RBUILD_cflags
,$(1),$(4)} -c
$$<
137 $(5): $(2) $(3) |
${call RBUILD_dir
,$(5)}
139 $${gcc} -o
$$@
${call RBUILD_cflags
,$(1),$(4)} -c
$$<
145 #(module, source, dependencies, cflags, output)
148 $(2): $${$(1)_precondition
}
150 ifeq ($(ROS_BUILDDEPS
),full
)
152 $(5).d
: $(2) |
${call RBUILD_dir
,$(5)}
154 $${gas} -MF
$$@
${call RBUILD_asflags
,$(1),$(4)} -M
-MP
-MT
$$@
$$<
158 $(5): $(2) $(5).d
$(3) |
${call RBUILD_dir
,$(5)}
160 $${gas} -o
$$@
${call RBUILD_asflags
,$(1),$(4)} -c
$$<
164 $(5): $(2) $(3) |
${call RBUILD_dir
,$(5)}
166 $${gas} -o
$$@
${call RBUILD_asflags
,$(1),$(4)} -c
$$<
172 #(module, source, dependencies, cflags, output)
175 $(2): $${$(1)_precondition
}
177 ifeq ($(ROS_BUILDDEPS
),full
)
179 $(5).d
: $(2) |
${call RBUILD_dir
,$(5)}
181 $${gpp} -MF
$$@
${call RBUILD_cxxflags
,$(1),$(4)} -M
-MP
-MT
$$@
$$<
185 $(5): $(2) $(5).d
$(3) |
${call RBUILD_dir
,$(5)}
187 $${gpp} -o
$$@
${call RBUILD_cxxflags
,$(1),$(4)} -c
$$<
191 $(5): $(2) $(3) |
${call RBUILD_dir
,$(5)}
193 $${gpp} -o
$$@
${call RBUILD_cxxflags
,$(1),$(4)} -c
$$<
199 #(module, source, dependencies, cflags)
200 RBUILD_GCC_RULE
=${call RBUILD_GCC
,$(1),$(2),$(3),$(4),${call RBUILD_intermediate_path_unique
,$(1),$(2)}.o
}
201 RBUILD_GPP_RULE
=${call RBUILD_GPP
,$(1),$(2),$(3),$(4),${call RBUILD_intermediate_path_unique
,$(1),$(2)}.o
}
202 RBUILD_GAS_RULE
=${call RBUILD_GAS
,$(1),$(2),$(3),$(4),${call RBUILD_intermediate_path_unique
,$(1),$(2)}.o
}
204 #(module, source, dependencies, cflags)
205 define RBUILD_GPP_RULE
207 $(2): $${$(1)_precondition
}
209 ifeq ($(ROS_BUILDDEPS
),full
)
211 ${call RBUILD_intermediate_path_unique
,$(1),$(2)}.o.d
: $(2) |
${call RBUILD_intermediate_dir
,$(2)}
213 $${gpp} -MF
$$@
${call RBUILD_cxxflags
,$(1),$(4)} -M
-MP
-MT
$$@
$$<
215 -include ${call RBUILD_intermediate_path_unique
,$(1),$(2)}.o.d
217 ${call RBUILD_intermediate_path_unique
,$(1),$(2)}.o
: $(2) ${call RBUILD_intermediate_path_unique
,$(1),$(2)}.o.d
$(3) |
${call RBUILD_intermediate_dir
,$(2)}
219 $${gpp} -o
$$@
${call RBUILD_cxxflags
,$(1),$(4)} -c
$$<
223 ${call RBUILD_intermediate_path_unique
,$(1),$(2)}.o
: $(2) $(3) |
${call RBUILD_intermediate_dir
,$(2)}
225 $${gpp} -o
$$@
${call RBUILD_cxxflags
,$(1),$(4)} -c
$$<
231 #(module, source, dependencies, cflags)
232 define RBUILD_GCC_PCH_RULE
234 $(2): $${$(1)_precondition
}
236 ifeq ($$(ROS_BUILDDEPS
),full
)
238 ${call RBUILD_intermediate_dir
,$(2)}$$(SEP
).gch_
$(1)$$(SEP
)$(notdir $(2)).gch.d
: $(2) |
${call RBUILD_intermediate_dir
,$(2)}
240 $${gcc} -MF
$$@
${call RBUILD_cflags
,$(1),$(4)} -x c-header
-M
-MP
-MT
$$@
$$<
242 -include $$(intermediate_dir
)$$(SEP
).gch_
$$(module_name
)$$(SEP
)$(notdir $(2)).gch.d
244 ${call RBUILD_intermediate_dir
,$(2)}$$(SEP
).gch_
$(1)$$(SEP
)$(notdir $(2)).gch
: $(2) ${call RBUILD_intermediate_dir
,$(2)}$$(SEP
).gch_
$(1)$$(SEP
)$(notdir $(2)).gch.d
$(3) |
${call RBUILD_intermediate_dir
,$(2)}$$(SEP
).gch_
$(1)
246 $${gcc} -MF
$$@
${call RBUILD_cflags
,$(1),$(4)} -x c-header
-M
-MP
-MT
$$@
$$<
250 ${call RBUILD_intermediate_dir
,$(2)}$$(SEP
).gch_
$(1)$$(SEP
)$(notdir $(2)).gch
: $(2) $(3) |
${call RBUILD_intermediate_dir
,$(2)}$$(SEP
).gch_
$(1)
252 $${gcc} -MF
$$@
${call RBUILD_cflags
,$(1),$(4)} -x c-header
-M
-MP
-MT
$$@
$$<
258 #(module, source, dependencies, cflags)
259 define RBUILD_GPP_PCH_RULE
261 $(2): $${$(1)_precondition
}
263 ifeq ($$(ROS_BUILDDEPS
),full
)
265 ${call RBUILD_intermediate_dir
,$(2)}$$(SEP
).gch_
$(1)$$(SEP
)$(notdir $(2)).gch.d
: $(2) |
${call RBUILD_intermediate_dir
,$(2)}
267 $${gpp} -MF
$$@
${call RBUILD_cxxflags
,$(1),$(4)} -x c
++-header
-M
-MP
-MT
$$@
$$<
269 -include $$(intermediate_dir
)$$(SEP
).gch_
$$(module_name
)$$(SEP
)$(notdir $(2)).gch.d
271 ${call RBUILD_intermediate_dir
,$(2)}$$(SEP
).gch_
$(1)$$(SEP
)$(notdir $(2)).gch
: $(2) ${call RBUILD_intermediate_dir
,$(2)}$$(SEP
).gch_
$(1)$$(SEP
)$(notdir $(2)).gch.d
$(3) |
${call RBUILD_intermediate_dir
,$(2)}$$(SEP
).gch_
$(1)
273 $${gpp} -MF
$$@
${call RBUILD_cxxflags
,$(1),$(4)} -x c
++-header
-M
-MP
-MT
$$@
$$<
277 ${call RBUILD_intermediate_dir
,$(2)}$$(SEP
).gch_
$(1)$$(SEP
)$(notdir $(2)).gch
: $(2) $(3) |
${call RBUILD_intermediate_dir
,$(2)}$$(SEP
).gch_
$(1)
279 $${gpp} -MF
$$@
${call RBUILD_cxxflags
,$(1),$(4)} -x c
++-header
-M
-MP
-MT
$$@
$$<
285 #(module, source, dependencies, cflags, output)
288 $(2): $${$(1)_precondition
}
290 $(5): $(2) $(3) |
${call RBUILD_dir
,$(5)}
292 $${nasm} -o
$$@
${call RBUILD_nasmflags
,$(1),$(4)} $$<
296 # TODO: module_dllname -> ${call RBUILD_module_dllname,$(1)}
298 #(module, source, dependencies, cflags, module_dllname, output)
299 define RBUILD_WINEBUILD_DEF
301 $(6): $(2) $$(WINEBUILD_TARGET
) |
${call RBUILD_intermediate_dir
,$(6)}
303 $$(Q
)$$(WINEBUILD_TARGET
) -o
$$@
--def
-E
$$< --filename
$(5) ${call RBUILD_spec_flags
,$(1),$(4)}
307 #(module, source, dependencies, cflags, module_dllname, output)
308 define RBUILD_WINEBUILD_STUBS
310 $(6): $(2) $$(WINEBUILD_TARGET
) |
${call RBUILD_intermediate_dir
,$(6)}
312 $$(Q
)$$(WINEBUILD_TARGET
) -o
$$@
--pedll
$$< --filename
$(5) ${call RBUILD_spec_flags
,$(1),$(4)}
316 #(module, source, dependencies, cflags, module_dllname)
317 define RBUILD_WINEBUILD_WITH_CPP_RULE
319 ifeq ($$(ROS_BUILDDEPS
),full
)
321 ${call RBUILD_intermediate_path_unique
,$(1),$(2)}.spec.d
: $(2) |
${call RBUILD_intermediate_dir
,$(2)}
323 $${gcc} -xc
-MF
$$@
${call RBUILD_spec_pp_flags
,$(1),$(4)} -M
-MP
-MT
$$@
$$<
325 -include ${call RBUILD_intermediate_path_unique
,$(1),$(2)}.spec.d
327 ${call RBUILD_intermediate_path_unique
,$(1),$(2)}.spec
: $(2) ${call RBUILD_intermediate_path_unique
,$(1),$(2)}.spec.d
$(3) |
${call RBUILD_intermediate_dir
,$(2)}
329 $${gcc} -xc
-E
${call RBUILD_spec_pp_flags
,$(1),$(4)} $$< > $$@
333 ${call RBUILD_intermediate_path_unique
,$(1),$(2)}.spec
: $(2) $(3) |
${call RBUILD_intermediate_dir
,$(2)}
335 $${gcc} -xc
-E
${call RBUILD_spec_pp_flags
,$(1),$(4)} $$< > $$@
339 ${call RBUILD_WINEBUILD_DEF
,$(1),${call RBUILD_intermediate_path_unique
,$(1),$(2)}.spec
,,$(4),$(5),${call RBUILD_intermediate_path_unique
,$(1),$(2)}.auto.def
}
340 ${call RBUILD_WINEBUILD_STUBS
,$(1),${call RBUILD_intermediate_path_unique
,$(1),$(2)}.spec
,,$(4),$(5),${call RBUILD_intermediate_path_unique
,$(1),$(2)}.stubs.c
}
341 ${call RBUILD_GCC
,$(1),${call RBUILD_intermediate_path_unique
,$(1),$(2)}.stubs.c
,,,${call RBUILD_intermediate_path_unique
,$(1),$(2)}.stubs.o
}
345 #(module, source, dependencies, cflags, module_dllname)
346 define RBUILD_WINEBUILD_RULE
348 ${call RBUILD_WINEBUILD_DEF
,$(1),$(2),$(3),$(4),$(5),${call RBUILD_intermediate_path_unique
,$(1),$(2)}.auto.def
}
349 ${call RBUILD_WINEBUILD_STUBS
,$(1),$(2),$(3),$(4),$(5),${call RBUILD_intermediate_path_unique
,$(1),$(2)}.stubs.c
}
350 ${call RBUILD_GCC
,$(1),${call RBUILD_intermediate_path_unique
,$(1),$(2)}.stubs.c
,,,${call RBUILD_intermediate_path_unique
,$(1),$(2)}.stubs.o
}
354 # FIXME: wrc butchers localized strings and doesn't implement -M, so we have to use an external preprocessor
355 #(module, source, dependencies, cflags)
356 define RBUILD_WRC_RULE
358 $(2): $${$(1)_precondition
}
360 ifeq ($$(ROS_BUILDDEPS
),full
)
362 ${call RBUILD_intermediate_path_unique
,$(1),$(2)}.res.d
: $(2) |
${call RBUILD_intermediate_dir
,$(2)} $$(TEMPORARY
)
364 $${gcc} -xc
-MF
$$@
${call RBUILD_rc_pp_flags
,$(1),$(4)} -M
-MP
-MT
$$@
$$<
366 -include ${call RBUILD_intermediate_path_unique
,$(1),$(2)}.coff.d
368 ${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)}
370 $${gcc} -xc
${call RBUILD_rc_pp_flags
,$(1),$(4)} -E
$$< |
$$(WRC_TARGET
) -o
$$@
${call RBUILD_rc_flags
,$(1),$(4),-I
${call RBUILD_dir
,$(2)}}
374 ${call RBUILD_intermediate_path_unique
,$(1),$(2)}.res
: $(2) $(3) $$(WRC_TARGET
) |
${call RBUILD_intermediate_dir
,$(2)}
376 $${gcc} -xc
${call RBUILD_rc_pp_flags
,$(1),$(4)} -E
$$< |
$$(WRC_TARGET
) -o
$$@
${call RBUILD_rc_flags
,$(1),$(4),-I
${call RBUILD_dir
,$(2)}}
380 ${call RBUILD_intermediate_path_unique
,$(1),$(2)}.coff
: ${call RBUILD_intermediate_path_unique
,$(1),$(2)}.res |
${call RBUILD_intermediate_dir
,$(2)}
382 $${windres} -i
$$< -o
$$@
-J res
-O coff
390 define RBUILD_WIDL_HEADER_RULE
392 $(2): $${$(1)_precondition
}
394 ${call RBUILD_intermediate_path_noext
,$(2)}.h
: $(2) $(3) $$(WIDL_TARGET
) |
${call RBUILD_intermediate_dir
,$(2)}
396 $$(Q
)$$(WIDL_TARGET
) ${call RBUILD_midlflags
,$(1),$(4),-I
${call RBUILD_dir
,$(2)}} -h
-H
$$@
$$<
400 #(module, source, dependencies, cflags)
401 define RBUILD_WIDL_CLIENT_RULE
403 $(2): $${$(1)_precondition
}
405 ${call RBUILD_intermediate_path_noext
,$(2)}_c.c
${call RBUILD_intermediate_path_noext
,$(2)}_c.h
: $(2) $(3) $$(WIDL_TARGET
) |
${call RBUILD_intermediate_dir
,$(2)}
407 $$(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)
409 ${call RBUILD_GCC
,$(1),${call RBUILD_intermediate_path_noext
,$(2)}_c.c
,,-fno-unit-at-a-time
,${call RBUILD_intermediate_path_noext
,$(2)}_c.o
}
413 #(module, source, dependencies, cflags)
414 define RBUILD_WIDL_SERVER_RULE
416 $(2): $${$(1)_precondition
}
418 ${call RBUILD_intermediate_path_noext
,$(2)}_s.c
${call RBUILD_intermediate_path_noext
,$(2)}_s.h
: $(2) $(3) $$(WIDL_TARGET
) |
${call RBUILD_intermediate_dir
,$(2)}
420 $$(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)
422 ${call RBUILD_GCC
,$(1),${call RBUILD_intermediate_path_noext
,$(2)}_s.c
,,-fno-unit-at-a-time
,${call RBUILD_intermediate_path_noext
,$(2)}_s.o
}
426 #(module, source, dependencies, cflags)
427 define RBUILD_WIDL_PROXY_RULE
429 $(2): $${$(1)_precondition
}
431 ${call RBUILD_intermediate_path_noext
,$(2)}_p.c
${call RBUILD_intermediate_path_noext
,$(2)}_p.h
: $(2) $(3) $$(WIDL_TARGET
) |
${call RBUILD_intermediate_dir
,$(2)}
433 $$(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)
435 ${call RBUILD_GCC
,$(1),${call RBUILD_intermediate_path_noext
,$(2)}_p.c
,,-fno-unit-at-a-time
,${call RBUILD_intermediate_path_noext
,$(2)}_p.o
}
439 #(module, source, dependencies, cflags)
440 define RBUILD_WIDL_INTERFACE_RULE
442 $(2): $${$(1)_precondition
}
444 ${call RBUILD_intermediate_path_noext
,$(2)}_i.c
: $(2) $(3) $$(WIDL_TARGET
) |
${call RBUILD_intermediate_dir
,$(2)}
446 $$(Q
)$$(WIDL_TARGET
) ${call RBUILD_midlflags
,$(1),$(4),-I
${call RBUILD_dir
,$(2)}} -u
-U
$$@
$$<
448 ${call RBUILD_GCC
,$(1),${call RBUILD_intermediate_path_noext
,$(2)}_i.c
,,-fno-unit-at-a-time
,${call RBUILD_intermediate_path_noext
,$(2)}_i.o
}
452 # FIXME: this rule sucks
453 #(module, source, dependencies, cflags, bare_dependencies)
454 define RBUILD_WIDL_DLLDATA_RULE
456 $(2): $(3) ${$(1)_precondition
} $$(WIDL_TARGET
) |
${call RBUILD_intermediate_dir
,$(2)}
458 $$(Q
)$$(WIDL_TARGET
) ${call RBUILD_midlflags
,$(1),$(4)} --dlldata-only
--dlldata
=$(2) $(5)
460 ${call RBUILD_GCC
,$(1),$(2),,,${call RBUILD_intermediate_path_noext
,$(2)}.o
}
464 #(module, source, dependencies, cflags)
465 define RBUILD_WIDL_TLB_RULE
467 $(2): $${$(1)_precondition
}
469 ${call RBUILD_intermediate_dir
,$(2)}$$(SEP
)$(1).tlb
: $(2) $(3) $$(WIDL_TARGET
) |
${call RBUILD_intermediate_dir
,$(2)}
471 $$(Q
)$$(WIDL_TARGET
) ${call RBUILD_midlflags
,$(1),$(4),-I
${call RBUILD_dir
,$(2)}} -t
-T
$$@
$$<
475 #(module, source, dependencies, cflags)
476 define RBUILD_HOST_GCC_RULE
478 $(2): $${$(1)_precondition
}
480 ${call RBUILD_intermediate_path_unique
,$(1),$(2)}.o
: $(2) $(3) |
${call RBUILD_intermediate_dir
,$(2)}
482 $${host_gcc} -o
$$@
${call RBUILD_host_cflags
,$(1),$(4)} -c
$$<
486 #(module, source, dependencies, cflags)
487 define RBUILD_HOST_GPP_RULE
489 $(2): $${$(1)_precondition
}
491 ${call RBUILD_intermediate_path_unique
,$(1),$(2)}.o
: $(2) $(3) |
${call RBUILD_intermediate_dir
,$(2)}
493 $${host_gpp} -o
$$@
${call RBUILD_host_cxxflags
,$(1),$(4)} -c
$$<