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 ifeq ($(ROS_ARCH
),i386
)
13 BUILTIN_CFLAGS
+= -fno-optimize-sibling-calls
-fno-set-stack-executable
15 BUILTIN_CFLAGS
+= -fno-optimize-sibling-calls
17 BUILTIN_CXXFLAGS
+= -fno-optimize-sibling-calls
19 #(module, source, dependencies, cflags, output)
22 $(5): $(2) $(3) |
${call RBUILD_dir
,$(5)}
24 $${gcc} -xc
-MF
$$@
$(4) -M
-MP
-MT
$$@
$$<
28 #(module, source, dependencies, cflags, output)
29 define RBUILD_CXX_DEPENDS
31 $(5): $(2) $(3) |
${call RBUILD_dir
,$(5)}
33 $${gpp} -MF
$$@
$(4) -M
-MP
-MT
$$@
$$<
38 RBUILD_PIPE_CPP
=$${gcc} $(2) -xc
-E
$(1)
39 RBUILD_PIPE_CXX_CPP
=$${gpp} $(2) -E
$(1)
41 #(module, source, dependencies, cflags, output)
44 $(5): $(2) $(3) |
${call RBUILD_dir
,$(5)}
46 ${call RBUILD_PIPE_CPP
,$$<,$(4)} > $$@
50 #(module, source, dependencies, cflags, output)
53 $(5): $(2) $(3) |
${call RBUILD_dir
,$(5)}
55 ${call RBUILD_PIPE_CXX_CPP
,$$<,$(4)} > $$@
59 #(module, source, dependencies, cflags, output)
62 $(2): $${$(1)_precondition
}
64 ifeq ($(ROS_BUILDDEPS
),full
)
66 ${call RBUILD_DEPENDS
,$(1),$(2),,${call RBUILD_cflags
,$(1),$(4)},$(5).d
}
69 $(5): $(2) $(5).d
$(3) |
${call RBUILD_dir
,$(5)}
71 $${gcc} -o
$$@
${call RBUILD_cflags
,$(1),$(4)} -c
$$<
75 $(5): $(2) $(3) |
${call RBUILD_dir
,$(5)}
77 $${gcc} -o
$$@
${call RBUILD_cflags
,$(1),$(4)} -c
$$<
83 #(module, source, dependencies, cflags, output)
86 $(2): $${$(1)_precondition
}
88 ifeq ($(ROS_BUILDDEPS
),full
)
90 ${call RBUILD_CXX_DEPENDS
,$(1),$(2),,${call RBUILD_cxxflags
,$(1),$(4)},$(5).d
}
93 $(5): $(2) $(5).d
$(3) |
${call RBUILD_dir
,$(5)}
95 $${gpp} -o
$$@
${call RBUILD_cxxflags
,$(1),$(4)} -c
$$<
99 $(5): $(2) $(3) |
${call RBUILD_dir
,$(5)}
101 $${gpp} -o
$$@
${call RBUILD_cxxflags
,$(1),$(4)} -c
$$<
107 #(module, source, dependencies, cflags)
108 RBUILD_CC_RULE
=${call RBUILD_CC
,$(1),$(2),$(3),$(4),${call RBUILD_intermediate_path_unique
,$(1),$(2)}.o
}
109 RBUILD_CXX_RULE
=${call RBUILD_CXX
,$(1),$(2),$(3),$(4),${call RBUILD_intermediate_path_unique
,$(1),$(2)}.o
}
111 #(module, source, dependencies, cflags)
112 define RBUILD_CC_PCH_RULE
114 $(2): $${$(1)_precondition
}
116 ifeq ($$(ROS_BUILDDEPS
),full
)
118 ${call RBUILD_intermediate_dir
,$(2)}$$(SEP
).gch_
$(1)$$(SEP
)$(notdir $(2)).gch.d
: $(2) |
${call RBUILD_intermediate_dir
,$(2)}
120 $${gcc} -MF
$$@
${call RBUILD_cflags
,$(1),$(4)} -x c-header
-M
-MP
-MT
$$@
$$<
122 -include $$(intermediate_dir
)$$(SEP
).gch_
$$(module_name
)$$(SEP
)$(notdir $(2)).gch.d
124 ${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)
126 $${gcc} -MF
$$@
${call RBUILD_cflags
,$(1),$(4)} -x c-header
-M
-MP
-MT
$$@
$$<
130 ${call RBUILD_intermediate_dir
,$(2)}$$(SEP
).gch_
$(1)$$(SEP
)$(notdir $(2)).gch
: $(2) $(3) |
${call RBUILD_intermediate_dir
,$(2)}$$(SEP
).gch_
$(1)
132 $${gcc} -MF
$$@
${call RBUILD_cflags
,$(1),$(4)} -x c-header
-M
-MP
-MT
$$@
$$<
138 #(module, source, dependencies, cflags)
139 define RBUILD_CXX_PCH_RULE
141 $(2): $${$(1)_precondition
}
143 ifeq ($$(ROS_BUILDDEPS
),full
)
145 ${call RBUILD_intermediate_dir
,$(2)}$$(SEP
).gch_
$(1)$$(SEP
)$(notdir $(2)).gch.d
: $(2) |
${call RBUILD_intermediate_dir
,$(2)}
147 $${gpp} -MF
$$@
${call RBUILD_cxxflags
,$(1),$(4)} -x c
++-header
-M
-MP
-MT
$$@
$$<
149 -include $$(intermediate_dir
)$$(SEP
).gch_
$$(module_name
)$$(SEP
)$(notdir $(2)).gch.d
151 ${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)
153 $${gpp} -MF
$$@
${call RBUILD_cxxflags
,$(1),$(4)} -x c
++-header
-M
-MP
-MT
$$@
$$<
157 ${call RBUILD_intermediate_dir
,$(2)}$$(SEP
).gch_
$(1)$$(SEP
)$(notdir $(2)).gch
: $(2) $(3) |
${call RBUILD_intermediate_dir
,$(2)}$$(SEP
).gch_
$(1)
159 $${gpp} -MF
$$@
${call RBUILD_cxxflags
,$(1),$(4)} -x c
++-header
-M
-MP
-MT
$$@
$$<