1 # -exclude-all-symbols disables autoexporting all symbols *if none were found* (either in a DEF file or using __declspec(dllexport)
2 LDFLAG_DLL
:=-shared
-exclude-all-symbols
3 LDFLAG_DRIVER
:=-shared
--subsystem
=native
-exclude-all-symbols
4 LDFLAG_NOSTDLIB
:=-nostartfiles
-nostdlib
5 LDFLAG_CONSOLE
:=--subsystem
=console
6 LDFLAG_WINDOWS
:=--subsystem
=windows
7 LDFLAG_NATIVE
:=--subsystem
=native
9 #~ #(module, objs, deps, ldflags, output, def, libs, entry, base)
10 #(module, objs, deps, ldflags, output, def, libs, entry, base, extralibs)
14 ${call RBUILD_intermediate_dir
,$(5)}$$(SEP
)lib
${call RBUILD_name
,$(5)}.a
: $(6) |
${call RBUILD_intermediate_path
,$(5)}
16 $${dlltool} --def
$(6) --kill-at
--output-lib
=$$@
18 ${call RBUILD_intermediate_dir
,$(5)}$$(SEP
)lib
${call RBUILD_name
,$(5)}.delayimp.a
: $(6) |
${call RBUILD_intermediate_path
,$(5)}
20 $${dlltool} --def
$(6) --kill-at
--output-delaylib
=$$@
22 ${call RBUILD_intermediate_path_noext
,$(5)}.exp
: $(6) |
${call RBUILD_intermediate_path
,$(5)}
24 $${dlltool} --def
$(6) --kill-at
--output-exp
=$$@
27 ${call RBUILD_intermediate_dir
,$(5)}$$(SEP
)lib
$(notdir $(5)).a \
28 ${call RBUILD_intermediate_dir
,$(5)}$$(SEP
)lib
$(notdir $(5)).delayimp.a \
29 ${call RBUILD_intermediate_path_noext
,$(5)}.exp
32 # TODO: refactor this out of here and into rules.mak
33 ${call RBUILD_intermediate_dir
,$(5)}$$(SEP
)$(1)_objs.rsp
: $(2) $$(if
$(6),${call RBUILD_intermediate_path_noext
,$(5)}.exp
) $(3) |
${call RBUILD_intermediate_dir
,$(5)}
35 -@
$${rm} $$@
2>$$(NUL
)
36 $${cp} $$(NUL
) $$@
>$$(NUL
)
37 $$(foreach obj
,$(2) $$(if
$(6),${call RBUILD_intermediate_path_noext
,$(5)}.exp
),$$(Q
)echo
$$(QUOTE
)$$(subst \
,\\,$$(obj
))$$(QUOTE
)>>$$@
$$(NL
))
39 $(1)_CLEANFILES
+=${call RBUILD_intermediate_dir
,$(5)}$$(SEP
)$(1)_objs.rsp
41 $(5): ${call RBUILD_intermediate_dir
,$(5)}$$(SEP
)$(1)_objs.rsp
$(7) $(3) $$(RSYM_TARGET
) $$(PEFIXUP_TARGET
) |
${call RBUILD_dir
,$(5)}
43 #~ $${ld} --entry=$(8) --image-base=$(9) @${call RBUILD_intermediate_dir,$(5)}$$(SEP)$(1)_objs.rsp $(7) ${call RBUILD_ldflags,$(1),$(4)} -o $$@
44 $${ld} --entry
=$(8) --image-base
=$(9) @
${call RBUILD_intermediate_dir
,$(5)}$$(SEP
)$(1)_objs.rsp
--start-group
$(10) $(7) --end-group
${call RBUILD_ldflags
,$(1),$(4)} -o
$$@
45 ifneq ($(or
$(6),$$(MODULETYPE
$$($(1)_TYPE
)_KMODE
)),)
47 $$(Q
)$$(PEFIXUP_TARGET
) $$@
$(if
$(6),-exports
) $$(if
$$(MODULETYPE
$($(1)_TYPE
)_KMODE
),-sections
)
49 ifeq ($(ROS_BUILDMAP
),full
)
51 $${objdump} -d
-S
$$@
> ${call RBUILD_output_path_noext
,$(5)}.map
53 ifeq ($(ROS_BUILDMAP
),yes
)
55 $${nm} --numeric-sort
$$@
> ${call RBUILD_output_path_noext
,$(5)}.map
58 ifeq ($(ROS_BUILDNOSTRIP
),yes
)
60 $${cp} $(5) $(basename $(5)).nostrip
$(suffix $(5)) 1>$(NUL
)
62 ifneq ($(ROS_GENERATE_RSYM
),no
)
64 $$(Q
)$$(RSYM_TARGET
) $$@
$$@
66 ifeq ($(ROS_LEAN_AND_MEAN
),yes
)
68 $${strip} -s
-x
-X
$$@
71 ifneq ($(ROS_BUILDMAP
),)
72 $(1)_CLEANFILES
+=${call RBUILD_output_path_noext
,$(5)}.map
75 ifeq ($(ROS_BUILDNOSTRIP
),yes
)
76 $(1)_CLEANFILES
+=$(basename $(5)).nostrip
$(suffix $(5))
81 #~ #(module, def, deps, ldflags, libs, entry, base)
82 #~ RBUILD_LINK_RULE=${call RBUILD_LINK,$(1),$(value $(1)_OBJS),$(3),$(4),$(value $(1)_TARGET),$(2),$(5) $(value $(1)_LIBS) $(5),$(6),$(7)}
83 #(module, def, deps, ldflags, libs, entry, base, extralibs)
84 RBUILD_LINK_RULE
=${call RBUILD_LINK
,$(1),$(value
$(1)_OBJS
),$(3),$(4),$(value
$(1)_TARGET
),$(2),$(value
$(1)_LIBS
),$(6),$(7),$(5)}