Changeset 79 for trunk/kBuild


Ignore:
Timestamp:
Jun 1, 2004, 3:39:33 AM (21 years ago)
Author:
bird
Message:

..

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/footer.kmk

    r78 r79  
    6666# @param    $2      normalized main target
    6767# @param    $3      tooltype
    68 _SOURCE_TOOL = $(strip $(firstword $($1_$2_$(3)TOOL) $($1_$2_TOOL) $($1_$(3)TOOL) $($1_TOOL) $($2_$(3)TOOL) $($2_TOOL) $($(3)TOOL) $(TOOL) ))
     68_SOURCE_TOOL = $(strip $(firstword \
     69        $($1_$2_$(3)TOOL.$(BUILD_TARGET))       $($1_$2_TOOL.$(BUILD_TARGET)) \
     70        $($1_$2_$(3)TOOL) $($1_$2_TOOL) \
     71        $($1_$(3)TOOL.$(BUILD_TARGET)) $($1_TOOL.$(BUILD_TARGET)) \
     72        $($1_$(3)TOOL) $($1_TOOL) \
     73        $($2_$(3)TOOL.$(BUILD_TARGET)) $($2_TOOL.$(BUILD_TARGET)) \
     74        $($2_$(3)TOOL) $($2_TOOL) \
     75        $($(3)TOOL.$(BUILD_TARGET)) $(TOOL.$(BUILD_TARGET)) \
     76        $($(3)TOOL) $(TOOL) ))
    6977
    7078## Figure out the tool for a target.
    7179# @param    $1          normalized target.
    7280# @param    $2      tooltype.
    73 _TARGET_TOOL = $(strip $(firstword $($(1)_$(2)TOOL) $($(1)_TOOL) $($(2)TOOL) $(TOOL) ))
     81_TARGET_TOOL = $(strip $(firstword \
     82        $($(1)_$(2)TOOL.$(BUILD_TARGET)) $($(1)_$(2)TOOL) \
     83        $($(1)_TOOL.$(BUILD_TARGET)) $($(1)_TOOL) \
     84        $($(2)TOOL) $($(2)TOOL.$(BUILD_TARGET)) \
     85        $(TOOL.$(BUILD_TARGET)) $(TOOL) \
     86        ))
    7487
    7588## Figure out where to put object files.
     
    151164endif
    152165endif
     166ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET)
     167ifndef $(target)_$(prop).$(BUILD_TARGET)
     168$(eval $(target)_$(prop).$(BUILD_TARGET) := $(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET)))
     169endif
     170endif
    153171endef
    154172
     
    160178$(eval $(target)_$(prop) := $($(target)_$(prop)) $(TEMPLATE_$($(target)_TEMPLATE)_$(prop)))
    161179endif
    162 #$ (warning 1b $(target)_$(prop)=$($(target)_$(prop)) org=$(origin $(target)_$(prop))  TEMPLATE_$($(target)_TEMPLATE)_$(prop)=$(TEMPLATE_$($(target)_TEMPLATE)_$(prop)) org=$(origin TEMPLATE_$($(target)_TEMPLATE)_$(prop)))
     180ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET)
     181$(eval $(target)_$(prop).$(BUILD_TARGET) := $($(target)_$(prop).$(BUILD_TARGET)) $(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET)))
     182endif
     183ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET_CPU)
     184$(eval $(target)_$(prop).$(BUILD_TARGET_CPU) := $($(target)_$(prop).$(BUILD_TARGET)) $(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET_CPU)))
     185endif
     186ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET_ARCH)
     187$(eval $(target)_$(prop).$(BUILD_TARGET_ARCH) := $($(target)_$(prop).$(BUILD_TARGET)) $(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET_ARCH)))
     188endif
    163189endef
    164190
     
    166192# @param    $(target)    Target name.
    167193define def_inherit_template
    168 $(foreach prop,TOOL ARTOOL CTOOL CXXTOOL ASTOOL\
     194$(foreach prop, TOOL ARTOOL CTOOL CXXTOOL ASTOOL LDTOOL\
    169195        ,$(eval $(def_inherit_template_one)))
    170196$(foreach prop,SDKS DEFS INCS COPTS CFLAGS CDEFS CINCS CXXOPTS CXXFLAGS CXXDEFS CXXINCS ASOPTS ASFLAGS ASDEFS ASINCS\
     
    182208define def_tools_target_source
    183209$(foreach tool,\
     210        $($(source)_TOOL.$(BUILD_TARGET)) $($(target)_$(source)_TOOL.$(BUILD_TARGET))\
    184211        $($(source)_TOOL) $($(target)_$(source)_TOOL)\
     212        $($(source)_CTOOL.$(BUILD_TARGET)) $($(target)_$(source)_CTOOL.$(BUILD_TARGET))\
    185213        $($(source)_CTOOL) $($(target)_$(source)_CTOOL)\
     214        $($(source)_CXXTOOL.$(BUILD_TARGET)) $($(target)_$(source)_CXXTOOL.$(BUILD_TARGET))\
    186215        $($(source)_CXXTOOL) $($(target)_$(source)_CXXTOOL)\
     216        $($(source)_ASTOOL.$(BUILD_TARGET)) $($(target)_$(source)_ASTOOL.$(BUILD_TARGET))\
    187217        $($(source)_ASTOOL) $($(target)_$(source)_ASTOOL)\
     218        $($(source)_ARTOOL.$(BUILD_TARGET)) $($(target)_$(source)_ARTOOL.$(BUILD_TARGET))\
    188219        $($(source)_ARTOOL) $($(target)_$(source)_ARTOOL)\
     220        $($(source)_LDTOOL.$(BUILD_TARGET)) $($(target)_$(source)_LDTOOL.$(BUILD_TARGET))\
    189221        $($(source)_LDTOOL) $($(target)_$(source)_LDTOOL)\
    190222        ,$(eval _TOOLS += $(tool)))
     
    192224define def_tools_target
    193225$(foreach tool,\
     226        $($(target)_TOOL.$(BUILD_TARGET))\
    194227        $($(target)_TOOL)\
     228        $($(target)_CTOOL.$(BUILD_TARGET))\
    195229        $($(target)_CTOOL)\
     230        $($(target)_CXXTOOL.$(BUILD_TARGET))\
    196231        $($(target)_CXXTOOL)\
     232        $($(target)_ASTOOL.$(BUILD_TARGET))\
    197233        $($(target)_ASTOOL)\
     234        $($(target)_ARTOOL.$(BUILD_TARGET))\
    198235        $($(target)_ARTOOL)\
     236        $($(target)_LDTOOL.$(BUILD_TARGET))\
    199237        $($(target)_LDTOOL)\
    200         , $(eval _TOOLS += $(tool)))
     238        ,$(eval _TOOLS += $(tool)))
    201239$(foreach source, $($(target)_SOURCES), $(eval $(def_tools_target_source)))
    202240endef
     
    205243
    206244define def_tools_include
     245$(warning tool=$(tool))
    207246ifndef TOOL_$(tool)
    208247include $(firstword $(wildcard $(PATH_KBUILD)/tools/$(tool).kmk))
Note: See TracChangeset for help on using the changeset viewer.