2 CFLAG_CRTDLL
:=-D_DLL
-D__USE_CRTIMP
4 CXXFLAG_WERROR
:=-Werror
5 CXXFLAG_CRTDLL
:=-D_DLL
-D__USE_CRTIMP
7 CPPFLAG_WERROR
:=-Werror
8 CPPFLAG_UNICODE
:=-DUNICODE
-D_UNICODE
10 # FIXME: disabled until RosBE stops sucking
11 # BUILTIN_CPPFLAGS+= -nostdinc
12 BUILTIN_CFLAGS
+= -fno-optimize-sibling-calls
13 BUILTIN_CXXFLAGS
+= -fno-optimize-sibling-calls
15 # Add -fno-set-stack-executable required for x86/MinGW
16 ifneq (,$(filter $(ARCH
),amd64 i386
))
17 BUILTIN_CFLAGS
+= -fno-set-stack-executable
18 BUILTIN_CXXFLAGS
+= -fno-set-stack-executable
21 #(module, source, dependencies, cflags, output)
24 $(5): $(2) $(3) |
${call RBUILD_dir
,$(5)}
26 $${gcc} -xc
-MF
$$@
$(4) -M
-MP
-MT
$$@
$$<
30 #(module, source, dependencies, cflags, output)
31 define RBUILD_CXX_DEPENDS
33 $(5): $(2) $(3) |
${call RBUILD_dir
,$(5)}
35 $${gpp} -MF
$$@
$(4) -M
-MP
-MT
$$@
$$<
40 RBUILD_PIPE_CPP
=$${gcc} $(2) -xc
-E
$(1)
41 RBUILD_PIPE_CXX_CPP
=$${gpp} $(2) -E
$(1)
43 #(module, source, dependencies, cflags, output)
46 $(5): $(2) $(3) |
${call RBUILD_dir
,$(5)}
48 ${call RBUILD_PIPE_CPP
,$$<,$(4)} > $$@
52 #(module, source, dependencies, cflags, output)
55 $(5): $(2) $(3) |
${call RBUILD_dir
,$(5)}
57 ${call RBUILD_PIPE_CXX_CPP
,$$<,$(4)} > $$@
61 #(module, source, dependencies, cflags, output)
64 $(2): $${$(1)_precondition
}
66 ifeq ($(ROS_BUILDDEPS
),full
)
68 ${call RBUILD_DEPENDS
,$(1),$(2),,${call RBUILD_cflags
,$(1),$(4)},$(5).d
}
71 $(5): $(2) $(5).d
$(3) |
${call RBUILD_dir
,$(5)}
73 $${gcc} -o
$$@
${call RBUILD_cflags
,$(1),$(4)} -c
$$<
77 $(5): $(2) $(3) |
${call RBUILD_dir
,$(5)}
79 $${gcc} -o
$$@
${call RBUILD_cflags
,$(1),$(4)} -c
$$<
85 #(module, source, dependencies, cflags, output)
88 $(2): $${$(1)_precondition
}
90 ifeq ($(ROS_BUILDDEPS
),full
)
92 ${call RBUILD_CXX_DEPENDS
,$(1),$(2),,${call RBUILD_cxxflags
,$(1),$(4)},$(5).d
}
95 $(5): $(2) $(5).d
$(3) |
${call RBUILD_dir
,$(5)}
97 $${gpp} -o
$$@
${call RBUILD_cxxflags
,$(1),$(4)} -c
$$<
101 $(5): $(2) $(3) |
${call RBUILD_dir
,$(5)}
103 $${gpp} -o
$$@
${call RBUILD_cxxflags
,$(1),$(4)} -c
$$<
109 #(module, source, dependencies, cflags)
110 RBUILD_CC_RULE
=${call RBUILD_CC
,$(1),$(2),$(3),$(4),${call RBUILD_intermediate_path_unique
,$(1),$(2)}.o
}
111 RBUILD_CXX_RULE
=${call RBUILD_CXX
,$(1),$(2),$(3),$(4),${call RBUILD_intermediate_path_unique
,$(1),$(2)}.o
}
113 #(module, source, dependencies, cflags)
114 define RBUILD_CC_PCH_RULE
116 $(2): $${$(1)_precondition
}
118 ifeq ($$(ROS_BUILDDEPS
),full
)
120 ${call RBUILD_intermediate_dir
,$(2)}$$(SEP
).gch_
$(1)$$(SEP
)$(notdir $(2)).gch.d
: $(2) |
${call RBUILD_intermediate_dir
,$(2)}
122 $${gcc} -MF
$$@
${call RBUILD_cflags
,$(1),$(4)} -x c-header
-M
-MP
-MT
$$@
$$<
124 -include $$(intermediate_dir
)$$(SEP
).gch_
$$(module_name
)$$(SEP
)$(notdir $(2)).gch.d
126 ${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)
128 $${gcc} -MF
$$@
${call RBUILD_cflags
,$(1),$(4)} -x c-header
-M
-MP
-MT
$$@
$$<
132 ${call RBUILD_intermediate_dir
,$(2)}$$(SEP
).gch_
$(1)$$(SEP
)$(notdir $(2)).gch
: $(2) $(3) |
${call RBUILD_intermediate_dir
,$(2)}$$(SEP
).gch_
$(1)
134 $${gcc} -MF
$$@
${call RBUILD_cflags
,$(1),$(4)} -x c-header
-M
-MP
-MT
$$@
$$<
140 #(module, source, dependencies, cflags)
141 define RBUILD_CXX_PCH_RULE
143 $(2): $${$(1)_precondition
}
145 ifeq ($$(ROS_BUILDDEPS
),full
)
147 ${call RBUILD_intermediate_dir
,$(2)}$$(SEP
).gch_
$(1)$$(SEP
)$(notdir $(2)).gch.d
: $(2) |
${call RBUILD_intermediate_dir
,$(2)}
149 $${gpp} -MF
$$@
${call RBUILD_cxxflags
,$(1),$(4)} -x c
++-header
-M
-MP
-MT
$$@
$$<
151 -include $$(intermediate_dir
)$$(SEP
).gch_
$$(module_name
)$$(SEP
)$(notdir $(2)).gch.d
153 ${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)
155 $${gpp} -MF
$$@
${call RBUILD_cxxflags
,$(1),$(4)} -x c
++-header
-M
-MP
-MT
$$@
$$<
159 ${call RBUILD_intermediate_dir
,$(2)}$$(SEP
).gch_
$(1)$$(SEP
)$(notdir $(2)).gch
: $(2) $(3) |
${call RBUILD_intermediate_dir
,$(2)}$$(SEP
).gch_
$(1)
161 $${gpp} -MF
$$@
${call RBUILD_cxxflags
,$(1),$(4)} -x c
++-header
-M
-MP
-MT
$$@
$$<