[72] | 1 | # $Id: footer-pass2-compiling-targets.kmk 2521 2011-07-26 18:18:19Z bird $
|
---|
| 2 | ## @file
|
---|
[2521] | 3 | # kBuild - Footer - Target lists - Pass 2 - Compiling Targets.
|
---|
[72] | 4 | #
|
---|
[1547] | 5 |
|
---|
| 6 | #
|
---|
[2521] | 7 | # Copyright (c) 2004-2011 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
|
---|
[72] | 8 | #
|
---|
| 9 | # This file is part of kBuild.
|
---|
| 10 | #
|
---|
| 11 | # kBuild is free software; you can redistribute it and/or modify
|
---|
| 12 | # it under the terms of the GNU General Public License as published by
|
---|
[106] | 13 | # the Free Software Foundation; either version source of the License, or
|
---|
[72] | 14 | # (at your option) any later version.
|
---|
| 15 | #
|
---|
| 16 | # kBuild is distributed in the hope that it will be useful,
|
---|
| 17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 19 | # GNU General Public License for more details.
|
---|
| 20 | #
|
---|
| 21 | # You should have received a copy of the GNU General Public License
|
---|
| 22 | # along with kBuild; if not, write to the Free Software
|
---|
[353] | 23 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
[72] | 24 | #
|
---|
| 25 | #
|
---|
[1547] | 26 | # As a special exception you are granted permission to include this file, via
|
---|
[1599] | 27 | # the kmk include directive, as you wish without this in itself causing the
|
---|
| 28 | # resulting makefile, program or whatever to be covered by the GPL license.
|
---|
[1547] | 29 | # This exception does not however invalidate any other reasons why the makefile,
|
---|
| 30 | # program, whatever should not be covered the GPL.
|
---|
| 31 | #
|
---|
| 32 | #
|
---|
[72] | 33 |
|
---|
| 34 |
|
---|
| 35 | #
|
---|
[73] | 36 | # Object processing.
|
---|
| 37 | #
|
---|
[72] | 38 |
|
---|
[380] | 39 | ## wrapper the compile command dependency check.
|
---|
| 40 | ifndef NO_COMPILE_CMDS_DEPS
|
---|
[2026] | 41 | if1of ($(KMK_FEATURES),dot-must-make)
|
---|
| 42 | _DEP_COMPILE_CMDS =
|
---|
| 43 | # for debugging: $$(warning MUST_MAKE=$$$$(comp-cmds-ex $$$$($(target)_$(subst :,_,$(source))_CMDS_PREV_), $$$$(commands $$@)) -> $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_CMDS_PREV_),$$(commands $$@),FORCE))
|
---|
| 44 | else
|
---|
| 45 | _DEP_COMPILE_CMDS = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_CMDS_PREV_),$$(commands $(obj)),FORCE)
|
---|
| 46 | endif
|
---|
[380] | 47 | else
|
---|
[730] | 48 | _DEP_COMPILE_CMDS =
|
---|
[380] | 49 | endif
|
---|
| 50 |
|
---|
[2026] | 51 |
|
---|
[749] | 52 | ## Generates the rules for building a specific object, and the aliases
|
---|
[380] | 53 | # for building a source file.
|
---|
[353] | 54 | # @param $(obj) The object file.
|
---|
[380] | 55 | define def_target_source_rule
|
---|
[2026] | 56 | ifndef NO_COMPILE_CMDS_DEPS
|
---|
| 57 | $(obj): .MUST_MAKE = $$(comp-cmds-ex $$($(target)_$(subst :,_,$(source))_CMDS_PREV_),$$(commands $$@),FORCE)
|
---|
| 58 | endif
|
---|
[1012] | 59 | ifdef TOOL_$(tool)_COMPILE_$(type)_USES_KOBJCACHE
|
---|
[2196] | 60 | _OUT_FILES += $(outbase).koc
|
---|
[1030] | 61 | $(outbase).koc +| $(obj) $($(target)_$(source)_OUTPUT_) $($(target)_$(source)_OUTPUT_MAYBE_) : \
|
---|
[1007] | 62 | $($(target)_$(source)_DEPEND_) \
|
---|
[1456] | 63 | $(value _DEP_COMPILE_CMDS) \
|
---|
[1007] | 64 | | \
|
---|
[1426] | 65 | $($(target)_$(source)_DEPORD_) \
|
---|
[2355] | 66 | $$$$($(target)_INTERMEDIATES) \
|
---|
| 67 | $$$$($(target)_INTERMEDIATES.$(bld_trg)) \
|
---|
| 68 | $$$$($(target)_INTERMEDIATES.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 69 | $$$$($(target)_INTERMEDIATES.$(bld_trg_arch)) \
|
---|
| 70 | $$$$($(target)_INTERMEDIATES.$(bld_trg_cpu)) \
|
---|
| 71 | $$$$($(target)_INTERMEDIATES.$(bld_type))
|
---|
[1496] | 72 | %$$(call MSG_COMPILE,$(target),$(source),$$@,$(type))
|
---|
[1007] | 73 | else
|
---|
[1030] | 74 | $(obj) + $($(target)_$(source)_OUTPUT_) +| $($(target)_$(source)_OUTPUT_MAYBE_) : \
|
---|
[380] | 75 | $($(target)_$(source)_DEPEND_) \
|
---|
[1456] | 76 | $(value _DEP_COMPILE_CMDS) \
|
---|
[380] | 77 | | \
|
---|
[1426] | 78 | $($(target)_$(source)_DEPORD_) \
|
---|
[2355] | 79 | $$$$($(target)_INTERMEDIATES) \
|
---|
| 80 | $$$$($(target)_INTERMEDIATES.$(bld_trg)) \
|
---|
| 81 | $$$$($(target)_INTERMEDIATES.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 82 | $$$$($(target)_INTERMEDIATES.$(bld_trg_arch)) \
|
---|
| 83 | $$$$($(target)_INTERMEDIATES.$(bld_trg_cpu)) \
|
---|
| 84 | $$$$($(target)_INTERMEDIATES.$(bld_type))
|
---|
[1496] | 85 | %$$(call MSG_COMPILE,$(target),$(source),$$@,$(type))
|
---|
[1012] | 86 | ifdef TOOL_$(tool)_COMPILE_$(type)_DONT_PURGE_OUTPUT
|
---|
[1599] | 87 | $$(QUIET)$$(RM) -f -- $(dep) $(obj) $($(target)_$(source)_OUTPUT_) $($(target)_OUTPUT_MAYBE_)
|
---|
[1007] | 88 | endif
|
---|
[1012] | 89 | endif
|
---|
[412] | 90 |
|
---|
[380] | 91 | $($(target)_$(source)_CMDS_)
|
---|
| 92 |
|
---|
| 93 | ifndef NO_COMPILE_CMDS_DEPS
|
---|
[1496] | 94 | %$$(QUIET2)$$(APPEND) '$(dep)'
|
---|
[1520] | 95 | %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_CMDS_PREV_'
|
---|
[1496] | 96 | %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(obj)'
|
---|
| 97 | %$$(QUIET2)$$(APPEND) '$(dep)' 'endef'
|
---|
[770] | 98 | endif
|
---|
[380] | 99 |
|
---|
[749] | 100 | $(basename $(notdir $(obj))).o: $(obj)
|
---|
| 101 | $(basename $(notdir $(obj))).obj: $(obj)
|
---|
[1496] | 102 |
|
---|
[2234] | 103 | ## @todo make this 'local cmds,output,output_maybe,depend and depord' in 0.2.x or when a new kb-src-one is added.
|
---|
[1496] | 104 | $(target)_$(source)_CMDS_ :=
|
---|
[2234] | 105 | $(target)_$(source)_OUTPUT_ :=
|
---|
| 106 | $(target)_$(source)_OUTPUT_MAYBE_ :=
|
---|
| 107 | $(target)_$(source)_DEPEND_ :=
|
---|
| 108 | $(target)_$(source)_DEPORD_ :=
|
---|
[1936] | 109 | endef # def_target_source_rule
|
---|
| 110 | $(eval-opt-var def_target_source_rule)
|
---|
[205] | 111 |
|
---|
[353] | 112 |
|
---|
[380] | 113 | ## wrapper the link command dependency check.
|
---|
[1502] | 114 | ifndef NO_LINK_CMDS_DEPS
|
---|
[2026] | 115 | if1of ($(KMK_FEATURES),dot-must-make)
|
---|
| 116 | _DEP_LINK_CMDS =
|
---|
| 117 | else
|
---|
| 118 | _DEP_LINK_CMDS = $$(comp-cmds-ex $$($(target)_CMDS_PREV_),$$(commands $(out)),FORCE)
|
---|
| 119 | endif
|
---|
[380] | 120 | else
|
---|
[730] | 121 | _DEP_LINK_CMDS =
|
---|
[380] | 122 | endif
|
---|
| 123 |
|
---|
| 124 | ## Generate the link rule for a target.
|
---|
| 125 | # @param $(target) The normalized target name.
|
---|
| 126 | # @param $(dirdep) Directories we depend upon begin created before linking.
|
---|
| 127 | # @param $(dep) The name of the dependency file.
|
---|
| 128 | # @param $(out)
|
---|
[2234] | 129 | # @param $($(target)_2_OUTPUT) Output files from the link.
|
---|
| 130 | # @param $($(target)_2_OUTPUT_MAYBE) Output files that the link may perhaps create.
|
---|
| 131 | # @param $($(target)_2_DEPEND) Dependencies.
|
---|
| 132 | # @param $($(target)_2_DEPORD) Dependencies which should only affect build order.
|
---|
[1496] | 133 | # @param $(cmds) The link commands.
|
---|
[380] | 134 | # @param $($(target)_CMDS_PREV_) The link commands from the previous run.
|
---|
| 135 | define def_link_rule
|
---|
[2026] | 136 | ifndef NO_LINK_CMDS_DEPS
|
---|
| 137 | $(out): .MUST_MAKE = $$(comp-cmds-ex $$($(target)_CMDS_PREV_),$$(commands $$@),FORCE)
|
---|
| 138 | endif
|
---|
[2234] | 139 | $(out) + $($(target)_2_OUTPUT) +| $($(target)_2_OUTPUT_MAYBE) : \
|
---|
| 140 | $$$$($(target)_2_DEPEND) \
|
---|
[1456] | 141 | $(value _DEP_LINK_CMDS) \
|
---|
[380] | 142 | | \
|
---|
[2234] | 143 | $$$$($(target)_2_DEPORD)
|
---|
[1496] | 144 | %$$(call MSG_LINK,$(target),$$@,$(tool_do))
|
---|
[2234] | 145 | $$(QUIET)$$(RM) -f -- $(dep) $(out) $($(target)_2_OUTPUT) $($(target)_2_OUTPUT_MAYBE)
|
---|
[412] | 146 |
|
---|
[1496] | 147 | $(cmds)
|
---|
[380] | 148 |
|
---|
[524] | 149 | ifndef NO_LINK_CMDS_DEPS
|
---|
[1496] | 150 | %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_CMDS_PREV_'
|
---|
| 151 | %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(out)'
|
---|
| 152 | %$$(QUIET2)$$(APPEND) '$(dep)' 'endef'
|
---|
[770] | 153 | endif
|
---|
[380] | 154 |
|
---|
[1686] | 155 | $(basename $(notdir $(out))):: $(out)
|
---|
[719] | 156 |
|
---|
[1936] | 157 | endef # def_link_rule
|
---|
| 158 | $(eval-opt-var def_link_rule)
|
---|
[380] | 159 |
|
---|
| 160 |
|
---|
| 161 | ## Generate the link & lib install rule
|
---|
[2475] | 162 | # Implicit parameters: target, out, $(target)_1_STAGE_TARGET, mode,
|
---|
| 163 | # pre_install_cmds, post_install_cmds
|
---|
[380] | 164 | define def_link_install_rule
|
---|
[2488] | 165 | $($(target)_1_INST_TARGET): $(out) | $$$$(dir $$$$@)
|
---|
[1496] | 166 | %$$(call MSG_INST_TRG,$(target),$(out),$$@)
|
---|
[2475] | 167 | $(pre_install_cmds)
|
---|
| 168 |
|
---|
[2225] | 169 | $$(QUIET)$$(INSTALL) $(if $(mode),-m $(mode)) $(if $(uid),-o $(uid)) $(if $(gid),-g $(gid)) -- $(out) $$@
|
---|
[2475] | 170 | $(post_install_cmds)
|
---|
[719] | 171 |
|
---|
[2475] | 172 | endef
|
---|
[380] | 173 |
|
---|
[2475] | 174 |
|
---|
| 175 | ## Generate the link & lib stage installation rule
|
---|
| 176 | # Implicit parameters: target, out, $(target)_1_STAGE_TARGET, mode,
|
---|
| 177 | # pre_install_cmds, post_install_cmds
|
---|
| 178 | define def_link_stage_rule
|
---|
[2488] | 179 | $($(target)_1_STAGE_TARGET): $(out) | $$$$(dir $$$$@)
|
---|
[2475] | 180 | %$$(call MSG_INST_TRG,$(target),$(out),$$@)
|
---|
| 181 | $(pre_install_cmds)
|
---|
| 182 |
|
---|
[2479] | 183 | $$(QUIET)$$(INSTALL_STAGING) $(if $(mode),-m $(mode)) $(if $(uid),-o $(uid)) $(if $(gid),-g $(gid)) -- $(out) $$@
|
---|
[2475] | 184 | $(post_install_cmds)
|
---|
| 185 |
|
---|
| 186 |
|
---|
| 187 | $(basename $(notdir $(out))):: $($(target)_1_STAGE_TARGET)
|
---|
| 188 |
|
---|
| 189 | endef
|
---|
| 190 |
|
---|
| 191 |
|
---|
[1424] | 192 | ## def_src_handler_*
|
---|
| 193 | #
|
---|
| 194 | # @{
|
---|
| 195 | define def_src_handler_c
|
---|
[1496] | 196 | local type := C
|
---|
[1795] | 197 | $(kb-src-one 2)
|
---|
[1424] | 198 | endef
|
---|
[73] | 199 |
|
---|
[1424] | 200 | define def_src_handler_cxx
|
---|
[1496] | 201 | local type := CXX
|
---|
[1795] | 202 | $(kb-src-one 2)
|
---|
[1424] | 203 | endef
|
---|
[73] | 204 |
|
---|
[1424] | 205 | define def_src_handler_objc
|
---|
[1496] | 206 | local type := OBJC
|
---|
[1795] | 207 | $(kb-src-one 2)
|
---|
[1424] | 208 | endef
|
---|
[1256] | 209 |
|
---|
[2356] | 210 | define def_src_handler_objcxx
|
---|
[2359] | 211 | local type := OBJCXX
|
---|
[2356] | 212 | $(kb-src-one 2)
|
---|
| 213 | endef
|
---|
| 214 |
|
---|
[1424] | 215 | define def_src_handler_asm
|
---|
[1496] | 216 | local type := AS
|
---|
[1795] | 217 | $(kb-src-one 2)
|
---|
[1424] | 218 | endef
|
---|
[353] | 219 |
|
---|
[1424] | 220 | define def_src_handler_rc
|
---|
[1496] | 221 | local type := RC
|
---|
[1795] | 222 | $(kb-src-one 2)
|
---|
[1424] | 223 | endef
|
---|
[641] | 224 |
|
---|
[1424] | 225 | define def_src_handler_obj
|
---|
[1434] | 226 | ifeq ($(defpath),)
|
---|
[2080] | 227 | $(target)_2_OBJS += $(source)
|
---|
| 228 | else
|
---|
| 229 | $(target)_2_OBJS += $(abspathex $(source), $(defpath))
|
---|
| 230 | endif
|
---|
| 231 | endef
|
---|
[1424] | 232 | ## @}
|
---|
[73] | 233 |
|
---|
[1424] | 234 | ## Handle one source.
|
---|
| 235 | # .
|
---|
| 236 | define def_src_handler_one
|
---|
[1496] | 237 | local suff := $(suffix $(source))
|
---|
| 238 | local src_handler := $(firstword $(filter $(suff):%, $($(target)_$(source)_SRC_HANDLERS) $($(source)_SRC_HANDLERS) $(target_src_handlers) ))
|
---|
| 239 | local handler := $(patsubst $(suff):%,%,$(src_handler))
|
---|
[1424] | 240 | ifneq ($(handler),)
|
---|
[1625] | 241 | $(evalvalctx $(handler))
|
---|
[1424] | 242 | else
|
---|
[1434] | 243 | othersrc += $(source)
|
---|
[1424] | 244 | endif
|
---|
[2475] | 245 | endef # def_src_handler_one
|
---|
[73] | 246 |
|
---|
[1424] | 247 | ## Generic macro for processing all target sources.
|
---|
| 248 | # @param $(target) Normalized target name.
|
---|
| 249 | # @param $(defpath)
|
---|
| 250 | # @param much-more...
|
---|
[2236] | 251 | # @returns othersrc, $(target)_2_OBJS, ++
|
---|
[1424] | 252 | define def_target_sources
|
---|
[1496] | 253 | local target_src_handlers := $($(target)_SRC_HANDLERS) $(KBUILD_SRC_HANDLERS)
|
---|
[1424] | 254 | $(foreach source,\
|
---|
[1429] | 255 | $($(target)_SOURCES)\
|
---|
| 256 | $($(target)_SOURCES.$(bld_trg))\
|
---|
[2433] | 257 | $($(target)_SOURCES.$(bld_trg).$(bld_type))\
|
---|
[1429] | 258 | $($(target)_SOURCES.$(bld_trg).$(bld_trg_arch))\
|
---|
[2433] | 259 | $($(target)_SOURCES.$(bld_trg).$(bld_trg_arch).$(bld_type))\
|
---|
[1429] | 260 | $($(target)_SOURCES.$(bld_trg_arch))\
|
---|
| 261 | $($(target)_SOURCES.$(bld_trg_cpu))\
|
---|
| 262 | $($(target)_SOURCES.$(bld_type))\
|
---|
[1496] | 263 | ,$(evalval def_src_handler_one) )
|
---|
[1621] | 264 |
|
---|
| 265 | $(foreach source,\
|
---|
| 266 | $($(target)_GEN_SOURCES_)\
|
---|
| 267 | $($(target)_GEN_SOURCES_.$(bld_trg))\
|
---|
[2433] | 268 | $($(target)_GEN_SOURCES_.$(bld_trg).$(bld_type))\
|
---|
[1621] | 269 | $($(target)_GEN_SOURCES_.$(bld_trg).$(bld_trg_arch))\
|
---|
[2433] | 270 | $($(target)_GEN_SOURCES_.$(bld_trg).$(bld_trg_arch).$(bld_type))\
|
---|
[1621] | 271 | $($(target)_GEN_SOURCES_.$(bld_trg_arch))\
|
---|
| 272 | $($(target)_GEN_SOURCES_.$(bld_trg_cpu))\
|
---|
| 273 | $($(target)_GEN_SOURCES_.$(bld_type))\
|
---|
| 274 | ,$(evalval def_src_handler_one) )
|
---|
[1936] | 275 | endef # def_target_sources
|
---|
| 276 | $(eval-opt-var def_target_sources)
|
---|
[1424] | 277 |
|
---|
| 278 |
|
---|
[2475] | 279 | ##
|
---|
| 280 | # Function for getting the first defined propert value.
|
---|
| 281 | #
|
---|
| 282 | # @param 1 The property name.
|
---|
| 283 | # @note Implicit parameters: target, bld_trg, bld_trg_arch, bld_trg_cpu, bld_type.
|
---|
| 284 | # @returns Expanded property value.
|
---|
| 285 | #
|
---|
| 286 | ## @todo bld_trg_cpu is missing here.
|
---|
| 287 | define def_fn_prop_get_first_defined
|
---|
| 288 | ifdef $(target)_$(1).$(bld_trg).$(bld_trg_arch).$(bld_type)
|
---|
| 289 | local .RETURN := $($(target)_$(1).$(bld_trg).$(bld_trg_arch).$(bld_type))
|
---|
| 290 | else ifdef $(target)_$(1).$(bld_trg).$(bld_trg_arch)
|
---|
| 291 | local .RETURN := $($(target)_$(1).$(bld_trg).$(bld_trg_arch))
|
---|
| 292 | else ifdef $(target)_$(1).$(bld_trg).$(bld_type)
|
---|
| 293 | local .RETURN := $($(target)_$(1).$(bld_trg).$(bld_type))
|
---|
| 294 | else ifdef $(target)_$(1).$(bld_trg_arch)
|
---|
| 295 | local .RETURN := $($(target)_$(1).$(bld_trg_arch))
|
---|
| 296 | else ifdef $(target)_$(1).$(bld_trg)
|
---|
| 297 | local .RETURN := $($(target)_$(1).$(bld_trg))
|
---|
| 298 | else ifdef $(target)_$(1).$(bld_type)
|
---|
| 299 | local .RETURN := $($(target)_$(1).$(bld_type))
|
---|
| 300 | else ifdef $(target)_$(1)
|
---|
| 301 | local .RETURN := $($(target)_$(1))
|
---|
| 302 | else ifdef $(1).$(bld_trg).$(bld_trg_arch).$(bld_type)
|
---|
| 303 | local .RETURN := $($(1).$(bld_trg).$(bld_trg_arch).$(bld_type))
|
---|
| 304 | else ifdef $(1).$(bld_trg).$(bld_trg_arch)
|
---|
| 305 | local .RETURN := $($(1).$(bld_trg).$(bld_trg_arch))
|
---|
| 306 | else ifdef $(1).$(bld_trg).$(bld_type)
|
---|
| 307 | local .RETURN := $($(1).$(bld_trg).$(bld_type))
|
---|
| 308 | else ifdef $(1).$(bld_trg_arch)
|
---|
| 309 | local .RETURN := $($(1).$(bld_trg_arch))
|
---|
| 310 | else ifdef $(1).$(bld_trg)
|
---|
| 311 | local .RETURN := $($(1).$(bld_trg))
|
---|
| 312 | else ifdef $(1).$(bld_type)
|
---|
| 313 | local .RETURN := $($(1).$(bld_type))
|
---|
| 314 | else
|
---|
| 315 | local .RETURN := $($(1))
|
---|
| 316 | endif
|
---|
| 317 | endef # def_fn_prop_get_first_defined
|
---|
[1424] | 318 |
|
---|
[2475] | 319 |
|
---|
| 320 | ## Generic macro for generating the install rule(s) for a target.
|
---|
[219] | 321 | #
|
---|
[353] | 322 | # @param $(target) Normalized target name.
|
---|
| 323 | # @param $(out) The output file.
|
---|
| 324 | # @param $(typevar) The name of the variable with all the root targets of its type.
|
---|
[2481] | 325 | # @param $(target_type_mode) The default file mode implied by the target type.
|
---|
[2475] | 326 | define def_target_install_only
|
---|
| 327 | ifneq ($($(target)_1_INSTTYPE),none)
|
---|
[2225] | 328 | local mode := $(firstword \
|
---|
| 329 | $($(target)_MODE.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
|
---|
| 330 | $($(target)_MODE.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 331 | $($(target)_MODE.$(bld_trg).$(bld_type)) \
|
---|
| 332 | $($(target)_MODE.$(bld_trg_arch)) \
|
---|
| 333 | $($(target)_MODE.$(bld_trg)) \
|
---|
| 334 | $($(target)_MODE.$(bld_type)) \
|
---|
[2483] | 335 | $($(target)_MODE) \
|
---|
| 336 | $(target_type_mode) )
|
---|
[2225] | 337 | local uid := $(firstword \
|
---|
| 338 | $($(target)_UID.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
|
---|
| 339 | $($(target)_UID.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 340 | $($(target)_UID.$(bld_trg).$(bld_type)) \
|
---|
| 341 | $($(target)_UID.$(bld_trg_arch)) \
|
---|
| 342 | $($(target)_UID.$(bld_trg)) \
|
---|
| 343 | $($(target)_UID.$(bld_type)) \
|
---|
| 344 | $($(target)_UID) )
|
---|
| 345 | local gid := $(firstword \
|
---|
| 346 | $($(target)_GID.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
|
---|
| 347 | $($(target)_GID.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 348 | $($(target)_GID.$(bld_trg).$(bld_type)) \
|
---|
| 349 | $($(target)_GID.$(bld_trg_arch)) \
|
---|
| 350 | $($(target)_GID.$(bld_trg)) \
|
---|
| 351 | $($(target)_GID.$(bld_type)) \
|
---|
| 352 | $($(target)_GID) )
|
---|
[2475] | 353 | local pre_install_cmds := $(evalcall def_fn_prop_get_first_defined,PRE_INST_CMDS)
|
---|
| 354 | local post_install_cmds := $(evalcall def_fn_prop_get_first_defined,POST_INST_CMDS)
|
---|
[219] | 355 |
|
---|
[2475] | 356 | # Generate the rules
|
---|
| 357 | ifeq ($($(target)_1_INSTTYPE),both)
|
---|
[353] | 358 | $(eval $(def_link_install_rule))
|
---|
[2475] | 359 | _INSTALLS_FILES += $($(target)_1_INST_TARGET)
|
---|
[1697] | 360 | endif
|
---|
[2475] | 361 | $(eval $(def_link_stage_rule))
|
---|
| 362 | _STAGE_FILES += $($(target)_1_STAGE_TARGET)
|
---|
| 363 | $(typevar) += $($(target)_1_STAGE_TARGET)
|
---|
| 364 | else # INSTTYPE == none
|
---|
[1697] | 365 | $(typevar) += $(out)
|
---|
[2475] | 366 | endif # INSTTYPE == none
|
---|
[353] | 367 |
|
---|
[2475] | 368 | endef # def_target_install_only
|
---|
[353] | 369 |
|
---|
[219] | 370 |
|
---|
| 371 |
|
---|
| 372 | #
|
---|
[72] | 373 | # LIBRARIES
|
---|
[73] | 374 | #
|
---|
[72] | 375 |
|
---|
| 376 | ## Library (one).
|
---|
[74] | 377 | # @param $(target) Normalized library (target) name.
|
---|
[72] | 378 | define def_lib
|
---|
[145] | 379 | # library basics
|
---|
[222] | 380 | ## @todo prefix
|
---|
[1504] | 381 | local bld_type := $(firstword $($(target)_BLD_TYPE) $(KBUILD_TYPE))
|
---|
| 382 | local bld_trg := $(firstword $($(target)_BLD_TRG) $(KBUILD_TARGET))
|
---|
| 383 | local bld_trg_arch:= $(firstword $($(target)_BLD_TRG_ARCH) $(KBUILD_TARGET_ARCH))
|
---|
| 384 | local bld_trg_cpu := $(firstword $($(target)_BLD_TRG_CPU) $(KBUILD_TARGET_CPU))
|
---|
[1496] | 385 | local tool := $(call _TARGET_TOOL,$(target),AR)
|
---|
[78] | 386 | ifeq ($(tool),)
|
---|
[353] | 387 | $(error kBuild: Library target $(target) does not have a tool defined!)
|
---|
[78] | 388 | endif
|
---|
[1496] | 389 | local name := $(firstword\
|
---|
[2433] | 390 | $($(target)_NAME.$(bld_trg).$(bld_trg_arch).$(bld_type))\
|
---|
[889] | 391 | $($(target)_NAME.$(bld_trg).$(bld_trg_arch))\
|
---|
[2433] | 392 | $($(target)_NAME.$(bld_trg).$(bld_type))\
|
---|
[889] | 393 | $($(target)_NAME.$(bld_trg_arch))\
|
---|
| 394 | $($(target)_NAME.$(bld_trg))\
|
---|
| 395 | $($(target)_NAME.$(bld_type))\
|
---|
| 396 | $($(target)_NAME)\
|
---|
| 397 | $(target))
|
---|
[1496] | 398 | local outbase := $(call TARGET_BASE,$(name),$(target))
|
---|
[2239] | 399 | $(target)_0_OUTDIR:= $(patsubst %/,%,$(dir $(outbase)))
|
---|
[2436] | 400 | $(call KB_FN_ASSIGN_DEPRECATED,PATH_$(target),$($(target)_0_OUTDIR), $(target)_0_OUTDIR)
|
---|
[1496] | 401 | local suff := $(firstword\
|
---|
[481] | 402 | $($(target)_LIBSUFF.$(bld_trg).$(bld_trg_arch))\
|
---|
[221] | 403 | $($(target)_LIBSUFF.$(bld_trg))\
|
---|
[126] | 404 | $($(target)_LIBSUFF)\
|
---|
[481] | 405 | $(TOOL_$(tool)_ARLIBSUFF.$(bld_trg).$(bld_trg_arch))\
|
---|
[221] | 406 | $(TOOL_$(tool)_ARLIBSUFF.$(bld_trg))\
|
---|
[126] | 407 | $(TOOL_$(tool)_ARLIBSUFF)\
|
---|
[353] | 408 | $(SUFF_LIB))
|
---|
[1496] | 409 | local out := $(outbase)$(suff)
|
---|
[2434] | 410 | local defpath := $($(target)_DEFPATH)
|
---|
| 411 | ifeq ($(defpath),)
|
---|
| 412 | local defpath := $($(target)_PATH)
|
---|
| 413 | endif
|
---|
[2238] | 414 | $(target)_1_TARGET:= $(out)
|
---|
[2436] | 415 | $(call KB_FN_ASSIGN_DEPRECATED,TARGET_$(target),$($(target)_1_TARGET), $(target)_1_TARGET)
|
---|
[1496] | 416 | # no local here - must be writable across some foreachs.
|
---|
| 417 | othersrc :=
|
---|
[2236] | 418 | $(target)_2_OBJS :=
|
---|
[145] | 419 |
|
---|
[1672] | 420 | # Do units pre source callouts.
|
---|
| 421 | local units := \
|
---|
| 422 | $($(target)_USES.$(bld_trg).$(bld_trg_arch))\
|
---|
| 423 | $($(target)_USES.$(bld_trg_arch))\
|
---|
| 424 | $($(target)_USES.$(bld_trg))\
|
---|
| 425 | $($(target)_USES.$(bld_type))\
|
---|
| 426 | $($(target)_USES)
|
---|
| 427 | $(foreach unit,$(units),$(evalval def_unit_$(unit)_target_pre))
|
---|
| 428 |
|
---|
[145] | 429 | # source -> object
|
---|
[1496] | 430 | $(evalval def_target_sources)
|
---|
[145] | 431 |
|
---|
| 432 | # library linking
|
---|
[1496] | 433 | local tool := $(call _TARGET_TOOL,$(target),AR)
|
---|
| 434 | local name := $(firstword\
|
---|
[2433] | 435 | $($(target)_NAME.$(bld_trg).$(bld_trg_arch).$(bld_type))\
|
---|
[889] | 436 | $($(target)_NAME.$(bld_trg).$(bld_trg_arch))\
|
---|
[2433] | 437 | $($(target)_NAME.$(bld_trg).$(bld_type))\
|
---|
[889] | 438 | $($(target)_NAME.$(bld_trg_arch))\
|
---|
| 439 | $($(target)_NAME.$(bld_trg))\
|
---|
| 440 | $($(target)_NAME.$(bld_type))\
|
---|
| 441 | $($(target)_NAME)\
|
---|
| 442 | $(target))
|
---|
[1496] | 443 | local outbase := $(call TARGET_BASE,$(name),$(target))
|
---|
| 444 | local flags :=\
|
---|
[74] | 445 | $(TOOL_$(tool)_ARFLAGS)\
|
---|
[221] | 446 | $(TOOL_$(tool)_ARFLAGS.$(bld_type))\
|
---|
[74] | 447 | $(ARFLAGS)\
|
---|
[221] | 448 | $(ARFLAGS.$(bld_type))\
|
---|
[74] | 449 | $($(target)_ARFLAGS)\
|
---|
[481] | 450 | $($(target)_ARFLAGS.$(bld_type)) \
|
---|
| 451 | $($(target)_ARFLAGS.$(bld_trg)) \
|
---|
| 452 | $($(target)_ARFLAGS.$(bld_trg_arch)) \
|
---|
| 453 | $($(target)_ARFLAGS.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 454 | $($(target)_ARFLAGS.$(bld_trg_cpu))
|
---|
[1496] | 455 | local dirdep := $(call DIRDEP,$(dir $(out)))
|
---|
[1702] | 456 | local deps := \
|
---|
| 457 | $($(target)_DEPS.$(bld_trg_cpu)) \
|
---|
| 458 | $($(target)_DEPS.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
|
---|
| 459 | $($(target)_DEPS.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 460 | $($(target)_DEPS.$(bld_trg).$(bld_type)) \
|
---|
| 461 | $($(target)_DEPS.$(bld_trg_arch)) \
|
---|
| 462 | $($(target)_DEPS.$(bld_trg)) \
|
---|
| 463 | $($(target)_DEPS.$(bld_type)) \
|
---|
| 464 | $($(target)_DEPS) \
|
---|
| 465 | $($(target)_LNK_DEPS.$(bld_trg_cpu)) \
|
---|
| 466 | $($(target)_LNK_DEPS.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
|
---|
| 467 | $($(target)_LNK_DEPS.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 468 | $($(target)_LNK_DEPS.$(bld_trg).$(bld_type)) \
|
---|
| 469 | $($(target)_LNK_DEPS.$(bld_trg_arch)) \
|
---|
| 470 | $($(target)_LNK_DEPS.$(bld_trg)) \
|
---|
| 471 | $($(target)_LNK_DEPS.$(bld_type)) \
|
---|
| 472 | $($(target)_LNK_DEPS)
|
---|
| 473 | local orderdeps := \
|
---|
| 474 | $($(target)_ORDERDEPS.$(bld_trg_cpu)) \
|
---|
| 475 | $($(target)_ORDERDEPS.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
|
---|
| 476 | $($(target)_ORDERDEPS.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 477 | $($(target)_ORDERDEPS.$(bld_trg).$(bld_type)) \
|
---|
| 478 | $($(target)_ORDERDEPS.$(bld_trg_arch)) \
|
---|
| 479 | $($(target)_ORDERDEPS.$(bld_trg)) \
|
---|
| 480 | $($(target)_ORDERDEPS.$(bld_type)) \
|
---|
| 481 | $($(target)_ORDERDEPS) \
|
---|
| 482 | $($(target)_LNK_ORDERDEPS.$(bld_trg_cpu)) \
|
---|
| 483 | $($(target)_LNK_ORDERDEPS.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
|
---|
| 484 | $($(target)_LNK_ORDERDEPS.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 485 | $($(target)_LNK_ORDERDEPS.$(bld_trg).$(bld_type)) \
|
---|
| 486 | $($(target)_LNK_ORDERDEPS.$(bld_trg_arch)) \
|
---|
| 487 | $($(target)_LNK_ORDERDEPS.$(bld_trg)) \
|
---|
| 488 | $($(target)_LNK_ORDERDEPS.$(bld_type)) \
|
---|
| 489 | $($(target)_LNK_ORDERDEPS)
|
---|
[72] | 490 |
|
---|
[725] | 491 | # Adjust paths if we got a default path.
|
---|
| 492 | ifneq ($(defpath),)
|
---|
[1496] | 493 | local deps := $(abspathex $(deps),$(defpath))
|
---|
| 494 | local orderdeps := $(abspathex $(orderdeps),$(defpath))
|
---|
[1472] | 495 | othersrc := $(abspathex $(othersrc),$(defpath))
|
---|
[725] | 496 | endif
|
---|
| 497 |
|
---|
[859] | 498 |
|
---|
| 499 | # Custom pre-link actions.
|
---|
[2475] | 500 | local pre_cmds := $(evalcall def_fn_prop_get_first_defined,PRE_CMDS)
|
---|
| 501 | local post_cmds := $(evalcall def_fn_prop_get_first_defined,POST_CMDS)
|
---|
[859] | 502 |
|
---|
[1424] | 503 | # eliminate this guy?
|
---|
[2236] | 504 | local objs = $($(target)_2_OBJS)
|
---|
[1424] | 505 |
|
---|
[380] | 506 | # dependency file
|
---|
[1496] | 507 | local dep := $(out)$(SUFF_DEP)
|
---|
[524] | 508 | ifndef NO_LINK_CMDS_DEPS
|
---|
[1798] | 509 | _DEPFILES_INCLUDED += $(dep)
|
---|
| 510 | ifdef KB_HAVE_INCLUDEDEP_QUEUE
|
---|
| 511 | includedep-queue $(dep)
|
---|
[1795] | 512 | else
|
---|
[1798] | 513 | includedep $(dep)
|
---|
[1795] | 514 | endif
|
---|
[380] | 515 | endif
|
---|
[72] | 516 |
|
---|
[380] | 517 | # check that the tool is defined.
|
---|
| 518 | ifndef TOOL_$(tool)_LINK_LIBRARY_CMDS
|
---|
| 519 | $(warning kBuild: tools: \
|
---|
[481] | 520 | 1 $($(target)_$(source)TOOL.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 521 | 2 $($(target)_$(source)TOOL.$(bld_trg)) \
|
---|
| 522 | 3 $($(target)_$(source)TOOL) \
|
---|
| 523 | 4 $($(target)_TOOL.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 524 | 5 $($(target)_TOOL.$(bld_trg)) \
|
---|
| 525 | 6 $($(target)_TOOL) \
|
---|
| 526 | 7 $($(source)TOOL) \
|
---|
| 527 | 8 $($(source)TOOL.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 528 | 9 $($(source)TOOL.$(bld_trg)) \
|
---|
| 529 | 10 $(TOOL.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 530 | 11 $(TOOL.$(bld_trg)) \
|
---|
| 531 | 12 $(TOOL) )
|
---|
[380] | 532 | $(error kBuild: TOOL_$(tool)_LINK_LIBRARY_CMDS isn't defined! target=$(target) )
|
---|
| 533 | endif
|
---|
| 534 |
|
---|
| 535 | # call the tool
|
---|
[1496] | 536 | local cmds := $(TOOL_$(tool)_LINK_LIBRARY_CMDS)
|
---|
[859] | 537 | ifneq ($(pre_cmds),)
|
---|
[1496] | 538 | local cmds := $(TAB)$(pre_cmds)$(NL)$(TAB)$(cmds)
|
---|
[859] | 539 | endif
|
---|
| 540 | ifneq ($(post_cmds),)
|
---|
[1496] | 541 | local cmds := $(cmds)$(NL)$(TAB)$(post_cmds)
|
---|
[859] | 542 | endif
|
---|
[2234] | 543 | $(target)_2_OUTPUT := $(TOOL_$(tool)_LINK_LIBRARY_OUTPUT)
|
---|
| 544 | $(target)_2_OUTPUT_MAYBE := $(TOOL_$(tool)_LINK_LIBRARY_OUTPUT_MAYBE)
|
---|
[2236] | 545 | $(target)_2_DEPEND := $(TOOL_$(tool)_LINK_LIBRARY_DEPEND) $(deps) $($(target)_2_OBJS)
|
---|
[2234] | 546 | $(target)_2_DEPORD := $(TOOL_$(tool)_LINK_LIBRARY_DEPORD) $(dirdep) $(orderdeps)
|
---|
[380] | 547 |
|
---|
[412] | 548 | # generate the link rule.
|
---|
[380] | 549 | $(eval $(def_link_rule))
|
---|
| 550 |
|
---|
[2475] | 551 | # installing and globals.
|
---|
[2483] | 552 | local target_type_mode := a+r,u+w
|
---|
[2475] | 553 | $(evalval def_target_install_only)
|
---|
| 554 |
|
---|
| 555 | _OUT_FILES += $($(target)_2_OUTPUT) $($(target)_2_OUTPUT_MAYBE) $(out)
|
---|
| 556 | _CLEAN_FILES += $($(target)_CLEAN) $($(target)_CLEAN.$(bld_trg)) $($(target)_CLEAN.$(bld_trg).$(bld_trg_arch)) $($(target)_CLEAN.$(bld_trg_arch)) $($(target)_CLEAN.$(bld_trg_cpu)) $($(target)_CLEAN.$(bld_type))
|
---|
| 557 | _DIRS += $($(target)_BLDDIRS) $($(target)_BLDDIRS.$(bld_trg)) $($(target)_BLDDIRS.$(bld_trg).$(bld_trg_arch)) $($(target)_BLDDIRS.$(bld_trg_arch)) $($(target)_BLDDIRS.$(bld_trg_cpu)) $($(target)_BLDDIRS.$(bld_type))
|
---|
| 558 | _OBJS += $($(target)_2_OBJS)
|
---|
| 559 |
|
---|
| 560 | endef # def_lib
|
---|
[1936] | 561 | $(eval-opt-var def_lib)
|
---|
[72] | 562 |
|
---|
| 563 | # Process libraries
|
---|
[859] | 564 | typevar := _LIBS
|
---|
[776] | 565 | tool_do := LINK_LIBRARY
|
---|
[380] | 566 | mode := 0644
|
---|
[1648] | 567 | $(foreach target, $(_ALL_LIBRARIES), $(evalval def_lib))
|
---|
[72] | 568 |
|
---|
[988] | 569 | ifdef KBUILD_PROFILE_SELF
|
---|
[2008] | 570 | $(evalcall def_profile_self, done library targets)
|
---|
[988] | 571 | endif
|
---|
[72] | 572 |
|
---|
[988] | 573 |
|
---|
[72] | 574 | #
|
---|
[353] | 575 | # Link operations.
|
---|
[72] | 576 | #
|
---|
| 577 |
|
---|
[353] | 578 | ##
|
---|
| 579 | # Link prolog
|
---|
| 580 | #
|
---|
| 581 | # @param $(target) Normalized target name.
|
---|
| 582 | # @param $(EXT) EXE,DLL,SYS.
|
---|
| 583 | # @param $(typevar) The name of the variable with all the root targets of its type.
|
---|
[380] | 584 | define def_link_common
|
---|
[353] | 585 | # basics
|
---|
[1504] | 586 | local bld_type := $(firstword $($(target)_BLD_TYPE) $(KBUILD_TYPE))
|
---|
[1496] | 587 | local bld_trg := $(firstword $($(target)_BLD_TRG) $(BUILD_$(bld_trg_base_var)))
|
---|
| 588 | local bld_trg_arch:= $(firstword $($(target)_BLD_TRG_ARCH) $(BUILD_$(bld_trg_base_var)_ARCH))
|
---|
| 589 | local bld_trg_cpu := $(firstword $($(target)_BLD_TRG_CPU) $(BUILD_$(bld_trg_base_var)_CPU))
|
---|
[145] | 590 |
|
---|
[1496] | 591 | local tool := $(call _TARGET_TOOL,$(target),LD)
|
---|
| 592 | local name := $(firstword\
|
---|
[2433] | 593 | $($(target)_NAME.$(bld_trg).$(bld_trg_arch).$(bld_type))\
|
---|
[889] | 594 | $($(target)_NAME.$(bld_trg).$(bld_trg_arch))\
|
---|
[2433] | 595 | $($(target)_NAME.$(bld_trg).$(bld_type))\
|
---|
[889] | 596 | $($(target)_NAME.$(bld_trg_arch))\
|
---|
| 597 | $($(target)_NAME.$(bld_trg))\
|
---|
| 598 | $($(target)_NAME.$(bld_type))\
|
---|
| 599 | $($(target)_NAME)\
|
---|
| 600 | $(target))
|
---|
[1496] | 601 | local outbase := $(call TARGET_BASE,$(name),$(target))
|
---|
[2239] | 602 | $(target)_0_OUTDIR:= $(patsubst %/,%,$(dir $(outbase)))
|
---|
[2436] | 603 | $(call KB_FN_ASSIGN_DEPRECATED,PATH_$(target),$($(target)_0_OUTDIR), $(target)_0_OUTDIR)
|
---|
[2143] | 604 | local suff := $(firstword \
|
---|
| 605 | $($(target)_$(EXT)SUFF.$(bld_trg).$(bld_trg_arch))\
|
---|
| 606 | $($(target)_$(EXT)SUFF.$(bld_trg))\
|
---|
| 607 | $($(target)_$(EXT)SUFF)\
|
---|
| 608 | $(TOOL_$(tool)_LD$(EXT)SUFF.$(bld_trg).$(bld_trg_arch))\
|
---|
| 609 | $(TOOL_$(tool)_LD$(EXT)SUFF.$(bld_trg))\
|
---|
| 610 | $(TOOL_$(tool)_LD$(EXT)SUFF)\
|
---|
| 611 | $($(EXTPRE)SUFF_$(EXT)) )
|
---|
[1496] | 612 | local out := $(outbase)$(suff)
|
---|
[2238] | 613 | $(target)_1_TARGET:= $(out)
|
---|
[2436] | 614 | $(call KB_FN_ASSIGN_DEPRECATED,TARGET_$(target),$($(target)_1_TARGET), $(target)_1_TARGET)
|
---|
[2434] | 615 | local defpath := $($(target)_DEFPATH)
|
---|
| 616 | ifeq ($(defpath),)
|
---|
| 617 | local defpath := $($(target)_PATH)
|
---|
| 618 | endif
|
---|
[1496] | 619 | # no local here - must be writable across some foreachs.
|
---|
| 620 | othersrc :=
|
---|
[2236] | 621 | $(target)_2_OBJS :=
|
---|
[353] | 622 |
|
---|
[1672] | 623 | # Do units pre source callouts.
|
---|
| 624 | local units := \
|
---|
| 625 | $($(target)_USES.$(bld_trg).$(bld_trg_arch))\
|
---|
| 626 | $($(target)_USES.$(bld_trg_arch))\
|
---|
| 627 | $($(target)_USES.$(bld_trg))\
|
---|
| 628 | $($(target)_USES.$(bld_type))\
|
---|
| 629 | $($(target)_USES)
|
---|
| 630 | $(foreach unit,$(units),$(evalval def_unit_$(unit)_target_pre))
|
---|
| 631 |
|
---|
[145] | 632 | # source -> object
|
---|
[1496] | 633 | $(evalval def_target_sources)
|
---|
[145] | 634 |
|
---|
[744] | 635 | # more link stuff.
|
---|
[1496] | 636 | local tool := $(call _TARGET_TOOL,$(target),LD)
|
---|
| 637 | local name := $(firstword\
|
---|
[2433] | 638 | $($(target)_NAME.$(bld_trg).$(bld_trg_arch).$(bld_type))\
|
---|
[889] | 639 | $($(target)_NAME.$(bld_trg).$(bld_trg_arch))\
|
---|
[2433] | 640 | $($(target)_NAME.$(bld_trg).$(bld_type))\
|
---|
[889] | 641 | $($(target)_NAME.$(bld_trg_arch))\
|
---|
| 642 | $($(target)_NAME.$(bld_trg))\
|
---|
| 643 | $($(target)_NAME.$(bld_type))\
|
---|
| 644 | $($(target)_NAME)\
|
---|
| 645 | $(target))
|
---|
[1496] | 646 | local outbase := $(call TARGET_BASE,$(name),$(target))
|
---|
| 647 | local flags :=\
|
---|
[74] | 648 | $(TOOL_$(tool)_LDFLAGS)\
|
---|
[221] | 649 | $(TOOL_$(tool)_LDFLAGS.$(bld_type))\
|
---|
| 650 | $(TOOL_$(tool)_LDFLAGS.$(bld_trg))\
|
---|
| 651 | $(TOOL_$(tool)_LDFLAGS.$(bld_trg_arch))\
|
---|
[481] | 652 | $(TOOL_$(tool)_LDFLAGS.$(bld_trg).$(bld_trg_arch))\
|
---|
[221] | 653 | $(TOOL_$(tool)_LDFLAGS.$(bld_trg_cpu))\
|
---|
[1242] | 654 | $(foreach sdk, $(SDKS) \
|
---|
| 655 | $(SDKS.$(bld_type)) \
|
---|
| 656 | $(SDKS.$(bld_trg)) \
|
---|
| 657 | $(SDKS.$(bld_trg_arch)) \
|
---|
| 658 | $(SDKS.$(bld_trg).$(bld_trg_arch)),\
|
---|
| 659 | $(SDK_$(sdk)_LDFLAGS)\
|
---|
| 660 | $(SDK_$(sdk)_LDFLAGS.$(bld_type))\
|
---|
| 661 | $(SDK_$(sdk)_LDFLAGS.$(bld_trg))\
|
---|
| 662 | $(SDK_$(sdk)_LDFLAGS.$(bld_trg_arch))\
|
---|
| 663 | $(SDK_$(sdk)_LDFLAGS.$(bld_trg).$(bld_trg_arch))\
|
---|
| 664 | $(SDK_$(sdk)_LDFLAGS.$(bld_trg_cpu)))\
|
---|
[74] | 665 | $(LDFLAGS)\
|
---|
[221] | 666 | $(LDFLAGS.$(bld_type))\
|
---|
| 667 | $(LDFLAGS.$(bld_trg))\
|
---|
| 668 | $(LDFLAGS.$(bld_trg_arch))\
|
---|
[481] | 669 | $(LDFLAGS.$(bld_trg).$(bld_trg_arch))\
|
---|
[221] | 670 | $(LDFLAGS.$(bld_trg_cpu))\
|
---|
[1242] | 671 | $(foreach sdk, $($(target)_SDKS) \
|
---|
| 672 | $($(target)_SDKS.$(bld_type)) \
|
---|
| 673 | $($(target)_SDKS.$(bld_trg)) \
|
---|
| 674 | $($(target)_SDKS.$(bld_trg_arch)) \
|
---|
| 675 | $($(target)_SDKS.$(bld_trg).$(bld_trg_arch)),\
|
---|
| 676 | $(SDK_$(sdk)_LDFLAGS)\
|
---|
| 677 | $(SDK_$(sdk)_LDFLAGS.$(bld_type))\
|
---|
| 678 | $(SDK_$(sdk)_LDFLAGS.$(bld_trg))\
|
---|
| 679 | $(SDK_$(sdk)_LDFLAGS.$(bld_trg_arch))\
|
---|
| 680 | $(SDK_$(sdk)_LDFLAGS.$(bld_trg).$(bld_trg_arch))\
|
---|
| 681 | $(SDK_$(sdk)_LDFLAGS.$(bld_trg_cpu)))\
|
---|
[74] | 682 | $($(target)_LDFLAGS)\
|
---|
[221] | 683 | $($(target)_LDFLAGS.$(bld_type))\
|
---|
| 684 | $($(target)_LDFLAGS.$(bld_trg))\
|
---|
| 685 | $($(target)_LDFLAGS.$(bld_trg_arch))\
|
---|
[481] | 686 | $($(target)_LDFLAGS.$(bld_trg).$(bld_trg_arch))\
|
---|
[353] | 687 | $($(target)_LDFLAGS.$(bld_trg_cpu))
|
---|
[1496] | 688 | local libs :=\
|
---|
[221] | 689 | $($(target)_LIBS.$(bld_trg_cpu))\
|
---|
[481] | 690 | $($(target)_LIBS.$(bld_trg).$(bld_trg_arch))\
|
---|
[221] | 691 | $($(target)_LIBS.$(bld_trg_arch))\
|
---|
| 692 | $($(target)_LIBS.$(bld_trg))\
|
---|
| 693 | $($(target)_LIBS.$(bld_type))\
|
---|
[74] | 694 | $($(target)_LIBS)\
|
---|
[592] | 695 | $(foreach sdk, $($(target)_SDKS.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 696 | $($(target)_SDKS.$(bld_trg_arch)) \
|
---|
| 697 | $($(target)_SDKS.$(bld_trg)) \
|
---|
| 698 | $($(target)_SDKS.$(bld_type)) \
|
---|
| 699 | $($(target)_SDKS),\
|
---|
[353] | 700 | $(SDK_$(sdk)_LIBS.$(bld_trg_cpu))\
|
---|
[481] | 701 | $(SDK_$(sdk)_LIBS.$(bld_trg).$(bld_trg_arch))\
|
---|
[353] | 702 | $(SDK_$(sdk)_LIBS.$(bld_trg_arch))\
|
---|
| 703 | $(SDK_$(sdk)_LIBS.$(bld_trg))\
|
---|
| 704 | $(SDK_$(sdk)_LIBS.$(bld_type))\
|
---|
| 705 | $(SDK_$(sdk)_LIBS))\
|
---|
[221] | 706 | $(LIBS.$(bld_trg_cpu))\
|
---|
[481] | 707 | $(LIBS.$(bld_trg).$(bld_trg_arch))\
|
---|
[221] | 708 | $(LIBS.$(bld_trg_arch))\
|
---|
| 709 | $(LIBS.$(bld_trg))\
|
---|
| 710 | $(LIBS.$(bld_type))\
|
---|
[74] | 711 | $(LIBS)\
|
---|
[592] | 712 | $(foreach sdk, $(SDKS.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 713 | $(SDKS.$(bld_trg_arch)) \
|
---|
| 714 | $(SDKS.$(bld_trg)) \
|
---|
| 715 | $(SDKS.$(bld_type)) \
|
---|
| 716 | $(SDKS),\
|
---|
[353] | 717 | $(SDK_$(sdk)_LIBS.$(bld_trg_cpu))\
|
---|
[481] | 718 | $(SDK_$(sdk)_LIBS.$(bld_trg).$(bld_trg_arch))\
|
---|
[353] | 719 | $(SDK_$(sdk)_LIBS.$(bld_trg_arch))\
|
---|
| 720 | $(SDK_$(sdk)_LIBS.$(bld_trg))\
|
---|
| 721 | $(SDK_$(sdk)_LIBS.$(bld_type))\
|
---|
| 722 | $(SDK_$(sdk)_LIBS))\
|
---|
[221] | 723 | $(TOOL_$(tool)_LIBS.$(bld_trg_cpu))\
|
---|
[481] | 724 | $(TOOL_$(tool)_LIBS.$(bld_trg).$(bld_trg_arch))\
|
---|
[221] | 725 | $(TOOL_$(tool)_LIBS.$(bld_trg_arch))\
|
---|
| 726 | $(TOOL_$(tool)_LIBS.$(bld_trg))\
|
---|
| 727 | $(TOOL_$(tool)_LIBS.$(bld_type))\
|
---|
[353] | 728 | $(TOOL_$(tool)_LIBS)
|
---|
[1496] | 729 | local libpath :=\
|
---|
[221] | 730 | $($(target)_LIBPATH.$(bld_trg_cpu))\
|
---|
[481] | 731 | $($(target)_LIBPATH.$(bld_trg).$(bld_trg_arch))\
|
---|
[221] | 732 | $($(target)_LIBPATH.$(bld_trg_arch))\
|
---|
| 733 | $($(target)_LIBPATH.$(bld_trg))\
|
---|
| 734 | $($(target)_LIBPATH.$(bld_type))\
|
---|
[74] | 735 | $($(target)_LIBPATH)\
|
---|
[592] | 736 | $(foreach sdk, $($(target)_SDKS.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 737 | $($(target)_SDKS.$(bld_trg_arch)) \
|
---|
| 738 | $($(target)_SDKS.$(bld_trg)) \
|
---|
| 739 | $($(target)_SDKS.$(bld_type)) \
|
---|
| 740 | $($(target)_SDKS),\
|
---|
[353] | 741 | $(SDK_$(sdk)_LIBPATH.$(bld_trg_cpu))\
|
---|
[481] | 742 | $(SDK_$(sdk)_LIBPATH.$(bld_trg).$(bld_trg_arch))\
|
---|
[353] | 743 | $(SDK_$(sdk)_LIBPATH.$(bld_trg_arch))\
|
---|
| 744 | $(SDK_$(sdk)_LIBPATH.$(bld_trg))\
|
---|
| 745 | $(SDK_$(sdk)_LIBPATH.$(bld_type))\
|
---|
| 746 | $(SDK_$(sdk)_LIBPATH))\
|
---|
[221] | 747 | $(LIBPATH.$(bld_trg_cpu))\
|
---|
[481] | 748 | $(LIBPATH.$(bld_trg).$(bld_trg_arch))\
|
---|
[221] | 749 | $(LIBPATH.$(bld_trg_arch))\
|
---|
| 750 | $(LIBPATH.$(bld_trg))\
|
---|
| 751 | $(LIBPATH.$(bld_type))\
|
---|
[74] | 752 | $(LIBPATH)\
|
---|
[592] | 753 | $(foreach sdk, $(SDKS.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 754 | $(SDKS.$(bld_trg_arch)) \
|
---|
| 755 | $(SDKS.$(bld_trg)) \
|
---|
| 756 | $(SDKS.$(bld_type)) \
|
---|
| 757 | $(SDKS),\
|
---|
[353] | 758 | $(SDK_$(sdk)_LIBPATH.$(bld_trg_cpu))\
|
---|
[481] | 759 | $(SDK_$(sdk)_LIBPATH.$(bld_trg).$(bld_trg_arch))\
|
---|
[353] | 760 | $(SDK_$(sdk)_LIBPATH.$(bld_trg_arch))\
|
---|
| 761 | $(SDK_$(sdk)_LIBPATH.$(bld_trg))\
|
---|
| 762 | $(SDK_$(sdk)_LIBPATH.$(bld_type))\
|
---|
| 763 | $(SDK_$(sdk)_LIBPATH))\
|
---|
[221] | 764 | $(TOOL_$(tool)_LIBPATH.$(bld_trg_cpu))\
|
---|
[481] | 765 | $(TOOL_$(tool)_LIBPATH.$(bld_trg).$(bld_trg_arch))\
|
---|
[221] | 766 | $(TOOL_$(tool)_LIBPATH.$(bld_trg_arch))\
|
---|
| 767 | $(TOOL_$(tool)_LIBPATH.$(bld_trg))\
|
---|
| 768 | $(TOOL_$(tool)_LIBPATH.$(bld_type))\
|
---|
[353] | 769 | $(TOOL_$(tool)_LIBPATH)
|
---|
[1496] | 770 | local dirdep := $(call DIRDEP,$(dir $(out)))
|
---|
[1702] | 771 | local deps := \
|
---|
| 772 | $($(target)_DEPS.$(bld_trg_cpu)) \
|
---|
| 773 | $($(target)_DEPS.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
|
---|
| 774 | $($(target)_DEPS.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 775 | $($(target)_DEPS.$(bld_trg).$(bld_type)) \
|
---|
| 776 | $($(target)_DEPS.$(bld_trg_arch)) \
|
---|
| 777 | $($(target)_DEPS.$(bld_trg)) \
|
---|
| 778 | $($(target)_DEPS.$(bld_type)) \
|
---|
| 779 | $($(target)_DEPS) \
|
---|
| 780 | $($(target)_LNK_DEPS.$(bld_trg_cpu)) \
|
---|
| 781 | $($(target)_LNK_DEPS.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
|
---|
| 782 | $($(target)_LNK_DEPS.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 783 | $($(target)_LNK_DEPS.$(bld_trg).$(bld_type)) \
|
---|
| 784 | $($(target)_LNK_DEPS.$(bld_trg_arch)) \
|
---|
| 785 | $($(target)_LNK_DEPS.$(bld_trg)) \
|
---|
| 786 | $($(target)_LNK_DEPS.$(bld_type)) \
|
---|
| 787 | $($(target)_LNK_DEPS)
|
---|
| 788 | local orderdeps := \
|
---|
| 789 | $($(target)_ORDERDEPS.$(bld_trg_cpu)) \
|
---|
| 790 | $($(target)_ORDERDEPS.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
|
---|
| 791 | $($(target)_ORDERDEPS.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 792 | $($(target)_ORDERDEPS.$(bld_trg).$(bld_type)) \
|
---|
| 793 | $($(target)_ORDERDEPS.$(bld_trg_arch)) \
|
---|
| 794 | $($(target)_ORDERDEPS.$(bld_trg)) \
|
---|
| 795 | $($(target)_ORDERDEPS.$(bld_type)) \
|
---|
| 796 | $($(target)_ORDERDEPS) \
|
---|
| 797 | $($(target)_LNK_ORDERDEPS.$(bld_trg_cpu)) \
|
---|
| 798 | $($(target)_LNK_ORDERDEPS.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
|
---|
| 799 | $($(target)_LNK_ORDERDEPS.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 800 | $($(target)_LNK_ORDERDEPS.$(bld_trg).$(bld_type)) \
|
---|
| 801 | $($(target)_LNK_ORDERDEPS.$(bld_trg_arch)) \
|
---|
| 802 | $($(target)_LNK_ORDERDEPS.$(bld_trg)) \
|
---|
| 803 | $($(target)_LNK_ORDERDEPS.$(bld_type)) \
|
---|
| 804 | $($(target)_LNK_ORDERDEPS)
|
---|
[353] | 805 |
|
---|
[725] | 806 | # Adjust paths if we got a default path.
|
---|
| 807 | ifneq ($(defpath),)
|
---|
[1496] | 808 | local libpath := $(abspathex $(libpath),$(defpath))
|
---|
| 809 | local deps := $(abspathex $(deps),$(defpath))
|
---|
| 810 | local orderdeps := $(abspathex $(orderdeps),$(defpath))
|
---|
[1472] | 811 | othersrc := $(abspathex $(othersrc),$(defpath))
|
---|
[1755] | 812 | # libs are not subject to this because of the the -l<lib> stuff. Use $(<target>_DEFPATH)/lib if relative to current dir!
|
---|
[725] | 813 | endif
|
---|
| 814 |
|
---|
[2475] | 815 | # Custom pre/post-link actions.
|
---|
| 816 | local pre_cmds := $(evalcall def_fn_prop_get_first_defined,PRE_CMDS)
|
---|
| 817 | local post_cmds := $(evalcall def_fn_prop_get_first_defined,POST_CMDS)
|
---|
[72] | 818 |
|
---|
[1424] | 819 | # eliminate this guy?
|
---|
[2236] | 820 | local objs = $($(target)_2_OBJS)
|
---|
[1424] | 821 |
|
---|
[353] | 822 | # installation targets
|
---|
[2481] | 823 | local target_type_mode :=
|
---|
[2475] | 824 | $(evalval def_target_install_only)
|
---|
[2225] | 825 |
|
---|
[380] | 826 | # dependency file
|
---|
[1496] | 827 | local dep := $(outbase)$(SUFF_DEP)
|
---|
[524] | 828 | ifndef NO_LINK_CMDS_DEPS
|
---|
[2188] | 829 | _DEPFILES_INCLUDED += $(dep)
|
---|
[1798] | 830 | ifdef KB_HAVE_INCLUDEDEP_QUEUE
|
---|
| 831 | includedep-queue $(dep)
|
---|
[1795] | 832 | else
|
---|
[1798] | 833 | includedep $(dep)
|
---|
[1795] | 834 | endif
|
---|
[380] | 835 | endif
|
---|
[353] | 836 |
|
---|
[380] | 837 | # check that the tool is defined.
|
---|
| 838 | ifndef TOOL_$(tool)_$(tool_do)_CMDS
|
---|
| 839 | $(warning kBuild: tools: \
|
---|
[481] | 840 | 1 $($(target)_$(source)TOOL.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 841 | 2 $($(target)_$(source)TOOL.$(bld_trg)) \
|
---|
| 842 | 3 $($(target)_$(source)TOOL) \
|
---|
| 843 | 4 $($(target)_TOOL.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 844 | 5 $($(target)_TOOL.$(bld_trg)) \
|
---|
| 845 | 6 $($(target)_TOOL) \
|
---|
| 846 | 7 $($(source)TOOL.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 847 | 8 $($(source)TOOL.$(bld_trg)) \
|
---|
| 848 | 9 $($(source)TOOL) \
|
---|
| 849 | 10 $(TOOL.$(bld_trg).$(bld_trg_arch)) \
|
---|
| 850 | 11 $(TOOL.$(bld_trg)) \
|
---|
| 851 | 12 $(TOOL) )
|
---|
[380] | 852 | $(error kBuild: TOOL_$(tool)_$(tool_do)_CMDS isn't defined! target=$(target) )
|
---|
| 853 | endif
|
---|
[353] | 854 |
|
---|
[380] | 855 | # call the tool
|
---|
[1496] | 856 | local cmds := $(TOOL_$(tool)_$(tool_do)_CMDS)
|
---|
[859] | 857 | ifneq ($(pre_cmds),)
|
---|
[1496] | 858 | local cmds := $(TAB)$(pre_cmds)$(NL)$(TAB)$(cmds)
|
---|
[859] | 859 | endif
|
---|
| 860 | ifneq ($(post_cmds),)
|
---|
[1496] | 861 | local cmds := $(cmds)$(NL)$(TAB)$(post_cmds)
|
---|
[859] | 862 | endif
|
---|
[2234] | 863 | $(target)_2_OUTPUT := $(TOOL_$(tool)_$(tool_do)_OUTPUT)
|
---|
| 864 | $(target)_2_OUTPUT_MAYBE := $(TOOL_$(tool)_$(tool_do)_OUTPUT_MAYBE)
|
---|
[2236] | 865 | $(target)_2_DEPEND := $(TOOL_$(tool)_$(tool_do)_DEPEND) $(deps) $($(target)_2_OBJS)
|
---|
[2234] | 866 | $(target)_2_DEPORD := $(TOOL_$(tool)_$(tool_do)_DEPORD) $(dirdep) $(orderdeps)
|
---|
[353] | 867 |
|
---|
[412] | 868 | # generate the link rule.
|
---|
[380] | 869 | $(eval $(def_link_rule))
|
---|
| 870 |
|
---|
[412] | 871 |
|
---|
[380] | 872 | # Update globals.
|
---|
[2236] | 873 | _OBJS += $($(target)_2_OBJS)
|
---|
[2234] | 874 | _OUT_FILES += $($(target)_2_OUTPUT) $($(target)_2_OUTPUT_MAYBE) $(out)
|
---|
[905] | 875 | _CLEAN_FILES += $($(target)_CLEAN) $($(target)_CLEAN.$(bld_trg)) $($(target)_CLEAN.$(bld_trg).$(bld_trg_arch)) $($(target)_CLEAN.$(bld_trg_arch)) $($(target)_CLEAN.$(bld_trg_cpu)) $($(target)_CLEAN.$(bld_type))
|
---|
| 876 | _DIRS += $($(target)_BLDDIRS) $($(target)_BLDDIRS.$(bld_trg)) $($(target)_BLDDIRS.$(bld_trg).$(bld_trg_arch)) $($(target)_BLDDIRS.$(bld_trg_arch)) $($(target)_BLDDIRS.$(bld_trg_cpu)) $($(target)_BLDDIRS.$(bld_type))
|
---|
[827] | 877 | _INSTALLS_FILES += $(INSTARGET_$(target))
|
---|
[353] | 878 |
|
---|
[1936] | 879 | endef # def_link_common
|
---|
| 880 | $(eval-opt-var def_link_common)
|
---|
[353] | 881 |
|
---|
| 882 |
|
---|
| 883 | #
|
---|
| 884 | # BLDPROGS
|
---|
| 885 | #
|
---|
| 886 |
|
---|
| 887 | # Process build programs.
|
---|
| 888 | EXT := EXE
|
---|
| 889 | EXTPRE := HOST
|
---|
[380] | 890 | tool_do := LINK_PROGRAM
|
---|
[353] | 891 | typevar := _BLDPROGS
|
---|
[380] | 892 | mode := 0755
|
---|
[353] | 893 | bld_trg_base_var := PLATFORM
|
---|
[2475] | 894 | $(foreach target, $(_ALL_BLDPROGS), $(evalval def_link_common))
|
---|
[353] | 895 |
|
---|
[988] | 896 | ifdef KBUILD_PROFILE_SELF
|
---|
[2008] | 897 | $(evalcall def_profile_self, done build program targets)
|
---|
[988] | 898 | endif
|
---|
[353] | 899 |
|
---|
| 900 |
|
---|
| 901 | #
|
---|
| 902 | # DLLS
|
---|
| 903 | #
|
---|
| 904 |
|
---|
[189] | 905 | # Process dlls
|
---|
[353] | 906 | EXT := DLL
|
---|
| 907 | EXTPRE :=
|
---|
[380] | 908 | tool_do := LINK_DLL
|
---|
[353] | 909 | typevar := _DLLS
|
---|
[830] | 910 | mode := 0644
|
---|
[353] | 911 | bld_trg_base_var := TARGET
|
---|
[1648] | 912 | $(foreach target, $(_ALL_DLLS), $(evalval def_link_common))
|
---|
[74] | 913 |
|
---|
[988] | 914 | ifdef KBUILD_PROFILE_SELF
|
---|
[2008] | 915 | $(evalcall def_profile_self, done dll targets)
|
---|
[988] | 916 | endif
|
---|
[74] | 917 |
|
---|
[988] | 918 |
|
---|
[72] | 919 | #
|
---|
[830] | 920 | # IMPORT LIBRARIES
|
---|
[72] | 921 | #
|
---|
[219] | 922 | # - On OS/2 and windows these are libraries.
|
---|
[189] | 923 | # - On other platforms they are fake DLLs.
|
---|
[830] | 924 | #
|
---|
| 925 | EXTPRE :=
|
---|
| 926 | typevar := _IMPORT_LIBS
|
---|
| 927 | mode := 0644
|
---|
| 928 | bld_trg_base_var := TARGET
|
---|
[1504] | 929 | ifeq ($(filter-out nt os2 win win64 win32,$(KBUILD_TARGET)),)
|
---|
[830] | 930 | EXT := LIB
|
---|
| 931 | tool_do := LINK_LIBRARY
|
---|
[1648] | 932 | $(foreach target, $(_ALL_IMPORT_LIBS), $(evalval def_lib))
|
---|
[189] | 933 | else
|
---|
[830] | 934 | EXT := DLL
|
---|
| 935 | tool_do := LINK_DLL
|
---|
[1648] | 936 | $(foreach target, $(_ALL_IMPORT_LIBS), $(evalval def_link_common))
|
---|
[189] | 937 | endif
|
---|
[72] | 938 |
|
---|
[988] | 939 | ifdef KBUILD_PROFILE_SELF
|
---|
[2008] | 940 | $(evalcall def_profile_self, done import library targets)
|
---|
[988] | 941 | endif
|
---|
[189] | 942 |
|
---|
[988] | 943 |
|
---|
[189] | 944 | #
|
---|
| 945 | # PROGRAMS
|
---|
| 946 | #
|
---|
| 947 |
|
---|
[353] | 948 | # Process programs
|
---|
| 949 | EXT := EXE
|
---|
| 950 | EXTPRE :=
|
---|
[380] | 951 | tool_do := LINK_PROGRAM
|
---|
[353] | 952 | typevar := _PROGRAMS
|
---|
[380] | 953 | mode := 0755
|
---|
[353] | 954 | bld_trg_base_var := TARGET
|
---|
[1648] | 955 | $(foreach target, $(_ALL_PROGRAMS), $(evalval def_link_common))
|
---|
[130] | 956 |
|
---|
[988] | 957 | ifdef KBUILD_PROFILE_SELF
|
---|
[2008] | 958 | $(evalcall def_profile_self, done program targets)
|
---|
[988] | 959 | endif
|
---|
[130] | 960 |
|
---|
[189] | 961 |
|
---|
[72] | 962 | #
|
---|
[83] | 963 | # SYSMODS
|
---|
[72] | 964 | #
|
---|
| 965 |
|
---|
[130] | 966 | # Process sysmods
|
---|
[353] | 967 | EXT := SYS
|
---|
| 968 | EXTPRE :=
|
---|
[380] | 969 | tool_do := LINK_SYSMOD
|
---|
[353] | 970 | typevar := _SYSMODS
|
---|
[380] | 971 | mode := 0644
|
---|
[353] | 972 | bld_trg_base_var := TARGET
|
---|
[1648] | 973 | $(foreach target, $(_ALL_SYSMODS), $(evalval def_link_common))
|
---|
[83] | 974 |
|
---|
[988] | 975 | ifdef KBUILD_PROFILE_SELF
|
---|
[2008] | 976 | $(evalcall def_profile_self, done sysmod targets)
|
---|
[988] | 977 | endif
|
---|
[83] | 978 |
|
---|
[988] | 979 |
|
---|
[72] | 980 | #
|
---|
[2084] | 981 | # MISCBINS
|
---|
| 982 | #
|
---|
| 983 |
|
---|
| 984 | # Process MISCBINS
|
---|
| 985 | EXT := BIN
|
---|
| 986 | EXTPRE :=
|
---|
| 987 | tool_do := LINK_MISCBIN
|
---|
| 988 | typevar := _MISCBINS
|
---|
| 989 | mode := 0644
|
---|
| 990 | bld_trg_base_var := TARGET
|
---|
| 991 | $(foreach target, $(_ALL_MISCBINS), $(evalval def_link_common))
|
---|
| 992 |
|
---|
| 993 | ifdef KBUILD_PROFILE_SELF
|
---|
| 994 | $(evalcall def_profile_self, done misc binary targets)
|
---|
| 995 | endif
|
---|
| 996 |
|
---|