Index: trunk/kBuild/footer.kmk
===================================================================
--- trunk/kBuild/footer.kmk	(revision 480)
+++ trunk/kBuild/footer.kmk	(revision 481)
@@ -35,27 +35,27 @@
 # all targets.
 ALL_TARGETS += \
-	$(BLDPROGS)    $(BLDPROGS.$(BUILD_PLATFORM)) \
-	$(LIBRARIES)   $(LIBRARIES.$(BUILD_TARGET)) \
-	$(IMPORT_LIBS) $(IMPORT_LIBS.$(BUILD_TARGET)) \
-	$(DLLS)        $(DLLS.$(BUILD_TARGET)) \
-	$(PROGRAMS)    $(PROGRAMS.$(BUILD_TARGET)) \
-	$(SYSMODS)     $(SYSMODS.$(BUILD_TARGET)) \
-	$(INSTALLS)    $(INSTALLS.$(BUILD_TARGET)) \
-	$(OTHERS)      $(OTHERS.$(BUILD_TARGET))
+	$(BLDPROGS)    $(BLDPROGS.$(BUILD_PLATFORM))    $(BLDPROGS.$(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH)) \
+	$(LIBRARIES)   $(LIBRARIES.$(BUILD_TARGET))     $(LIBRARIES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
+	$(IMPORT_LIBS) $(IMPORT_LIBS.$(BUILD_TARGET))   $(IMPORT_LIBS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
+	$(DLLS)        $(DLLS.$(BUILD_TARGET))          $(DLLS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
+	$(PROGRAMS)    $(PROGRAMS.$(BUILD_TARGET))      $(PROGRAMS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
+	$(SYSMODS)     $(SYSMODS.$(BUILD_TARGET))       $(SYSMODS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
+	$(INSTALLS)    $(INSTALLS.$(BUILD_TARGET))      $(INSTALLS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
+	$(OTHERS)      $(OTHERS.$(BUILD_TARGET))        $(OTHERS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH))
 
 # all $(BUILD_TARGET) targets.
 _ALL_BUILD_TARGET_TARGETS += \
-	$(BLDPROGS)    $(BLDPROGS.$(BUILD_PLATFORM)) \
-	$(LIBRARIES)   $(LIBRARIES.$(BUILD_TARGET)) \
-	$(IMPORT_LIBS) $(IMPORT_LIBS.$(BUILD_TARGET)) \
-	$(DLLS)        $(DLLS.$(BUILD_TARGET)) \
-	$(PROGRAMS)    $(PROGRAMS.$(BUILD_TARGET)) \
-	$(SYSMODS)     $(SYSMODS.$(BUILD_TARGET)) \
-	$(INSTALLS)    $(INSTALLS.$(BUILD_TARGET)) \
-	$(OTHERS)      $(OTHERS.$(BUILD_TARGET))
+	$(BLDPROGS)    $(BLDPROGS.$(BUILD_PLATFORM))    $(BLDPROGS.$(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH)) \ 
+	$(LIBRARIES)   $(LIBRARIES.$(BUILD_TARGET))     $(LIBRARIES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \  
+	$(IMPORT_LIBS) $(IMPORT_LIBS.$(BUILD_TARGET))   $(IMPORT_LIBS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
+	$(DLLS)        $(DLLS.$(BUILD_TARGET))          $(DLLS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \       
+	$(PROGRAMS)    $(PROGRAMS.$(BUILD_TARGET))      $(PROGRAMS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \   
+	$(SYSMODS)     $(SYSMODS.$(BUILD_TARGET))       $(SYSMODS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \    
+	$(INSTALLS)    $(INSTALLS.$(BUILD_TARGET))      $(INSTALLS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \   
+	$(OTHERS)      $(OTHERS.$(BUILD_TARGET))        $(OTHERS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH))       
 
 # all $(BUILD_TARGET) targets.
 _ALL_BUILD_PLATFORM_TARGETS += \
-	$(BLDPROGS)    $(BLDPROGS.$(BUILD_PLATFORM))
+	$(BLDPROGS)    $(BLDPROGS.$(BUILD_PLATFORM))    $(BLDPROGS.$(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH))
 
 # dependency files.
@@ -97,37 +97,51 @@
 
 ## Figure out the tool for a source
-# @param    $target      source file
-# @param    $source      normalized main target
-# @param    $type      tooltype
+# @param    target       source file
+# @param    source       normalized main target
+# @param    type         tooltype
 # @param    bld_trg      build target.
+# @param    bld_trg_arch build target architecture.
 _SOURCE_TOOL = $(strip $(firstword \
+	$($(target)_$(source)_$(type)TOOL.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_$(source)_$(type)TOOL.$(bld_trg)) \
 	$($(target)_$(source)_$(type)TOOL) \
+	$($(target)_$(source)_TOOL.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_$(source)_TOOL.$(bld_trg)) \
 	$($(target)_$(source)_TOOL) \
+	$($(target)_$(type)TOOL.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_$(type)TOOL.$(bld_trg)) \
 	$($(target)_$(type)TOOL) \
+	$($(target)_TOOL.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_TOOL.$(bld_trg)) \
 	$($(target)_TOOL) \
+	$($(source)_$(type)TOOL.$(bld_trg).$(bld_trg_arch)) \
 	$($(source)_$(type)TOOL.$(bld_trg)) \
 	$($(source)_$(type)TOOL) \
+	$($(source)_TOOL.$(bld_trg).$(bld_trg_arch)) \
 	$($(source)_TOOL.$(bld_trg)) \
 	$($(source)_TOOL) \
+	$($(type)TOOL.$(bld_trg).$(bld_trg_arch)) \
 	$($(type)TOOL.$(bld_trg)) \
 	$($(type)TOOL) \
+	$(TOOL.$(bld_trg).$(bld_trg_arch)) \
 	$(TOOL.$(bld_trg)) \
 	$(TOOL) ))
 
 ## Figure out the tool for a target.
-# @param    $target 		normalized target.
-# @param    $source      tooltype.
+# @param    target       normalized target.
+# @param    source       tooltype.
 # @param    bld_trg      build target.
+# @param    bld_trg_arch build target architecture.
 _TARGET_TOOL = $(strip $(firstword \
+	$($(target)_$(source)TOOL.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_$(source)TOOL.$(bld_trg)) \
 	$($(target)_$(source)TOOL) \
+	$($(target)_TOOL.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_TOOL.$(bld_trg)) \
 	$($(target)_TOOL) \
+	$($(source)TOOL.$(bld_trg).$(bld_trg_arch)) \
 	$($(source)TOOL.$(bld_trg)) \
 	$($(source)TOOL) \
+	$(TOOL.$(bld_trg).$(bld_trg_arch)) \
 	$(TOOL.$(bld_trg)) \
 	$(TOOL) \
@@ -216,8 +230,9 @@
 
 $(foreach prop, $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED)\
-$(addsuffix .$(BUILD_TARGET), $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED))\
-$(addsuffix .$(BUILD_TARGET_ARCH), $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED))\
-$(addsuffix .$(BUILD_TARGET_CPU), $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED))\
-$(addsuffix .$(BUILD_TYPE), $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED))\
+$(addsuffix .$(BUILD_TARGET),                      $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED))\
+$(addsuffix .$(BUILD_TARGET).$(BUILD_TARGET_ARCH), $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED))\
+$(addsuffix .$(BUILD_TARGET_ARCH),                 $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED))\
+$(addsuffix .$(BUILD_TARGET_CPU),                  $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED))\
+$(addsuffix .$(BUILD_TYPE),                        $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED))\
 ,$(eval $(def_template_extends_prop))) # exploits the 2 evaluation, so no value!
 endif
@@ -247,4 +262,10 @@
 #$ (warning dbgsource: $(target)_$(prop).$(bld_trg)="TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg)" TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg))
 $(target)_$(prop).$(bld_trg) := $(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg))
+endif
+endif
+ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch)
+ifndef $(target)_$(prop).$(bld_trg).$(bld_trg_arch)
+#$ (warning dbgsource: $(target)_$(prop).$(bld_trg).$(bld_trg_arch)="TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch)" TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch))
+$(target)_$(prop).$(bld_trg).$(bld_trg_arch) := $(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch))
 endif
 endif
@@ -281,4 +302,10 @@
 endif
 endif
+ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch)
+ifndef $(target)_$(prop).$(bld_trg).$(bld_trg_arch)
+#$ (warning dbgsource: $(target)_$(prop).$(bld_trg).$(bld_trg_arch)="TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch)" TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch))
+$(target)_$(prop).$(bld_trg).$(bld_trg_arch) = $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch))
+endif
+endif
 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_arch)
 ifndef $(target)_$(prop).$(bld_trg_arch)
@@ -312,4 +339,8 @@
 $(target)_$(prop).$(bld_trg) += $(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg))
 endif
+ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch)
+#$ (warning dbg4: TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch))
+$(target)_$(prop).$(bld_trg).$(bld_trg_arch) += $(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch))
+endif
 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_cpu)
 #$ (warning dbg5: TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_cpu))
@@ -354,10 +385,12 @@
 # Include tools & sdks
 #
-_TOOLS := $(TOOL.$(BUILD_TARGET)) $(TOOL.$(BUILD_TARGET_ARCH)) $(TOOL.$(BUILD_PLATFORM)) $(TOOL.$(BUILD_PLATFORM_ARCH)) $(TOOL)
-_SDKS  := $(SDKS.$(BUILD_TARGET)) $(SDKS.$(BUILD_TARGET_ARCH)) $(SDKS.$(BUILD_PLATFORM)) $(SDKS.$(BUILD_PLATFORM_ARCH)) $(SDKS)
+_TOOLS := $(TOOL.$(BUILD_TARGET)) $(TOOL.$(BUILD_TARGET_ARCH)) $(TOOL.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) $(TOOL.$(BUILD_PLATFORM)) $(TOOL.$(BUILD_PLATFORM_ARCH)) $(TOOL.$(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH)) $(TOOL)
+_SDKS  := $(SDKS.$(BUILD_TARGET)) $(SDKS.$(BUILD_TARGET_ARCH)) $(SDKS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) $(SDKS.$(BUILD_PLATFORM)) $(SDKS.$(BUILD_PLATFORM_ARCH)) $(SDKS.$(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH)) $(SDKS)
 define def_tools_sdks_target_source
 $(eval _TOOLS += $(foreach prop, $(PROPS_TOOLS), \
 	$($(source)_$(prop).$(_bld_trg)) \
 	$($(target)_$(source)_$(prop).$(_bld_trg)) \
+	$($(source)_$(prop).$(_bld_trg).$(_bld_trg_arch)) \
+	$($(target)_$(source)_$(prop).$(_bld_trg).$(_bld_trg_arch)) \
 	$($(source)_$(prop).$(_bld_trg_arch)) \
 	$($(target)_$(source)_$(prop).$(_bld_trg_arch)) \
@@ -367,4 +400,6 @@
 	$($(source)_SDKS.$(_bld_trg)) \
 	$($(target)_$(source)_SDKS.$(_bld_trg)) \
+	$($(source)_SDKS.$(_bld_trg).$(_bld_trg_arch)) \
+	$($(target)_$(source)_SDKS.$(_bld_trg).$(_bld_trg_arch)) \
 	$($(source)_SDKS.$(_bld_trg_arch)) \
 	$($(target)_$(source)_SDKS.$(_bld_trg_arch)) \
@@ -381,12 +416,15 @@
 	$($(target)_$(prop).$(_bld_trg)) \
 	$($(target)_$(prop).$(_bld_trg_arch)) \
+	$($(target)_$(prop).$(_bld_trg).$(_bld_trg_arch)) \
 	$($(target)_$(prop))))
 $(eval _SDKS += \
 	$($(target)_SDKS.$(_bld_trg)) \
 	$($(target)_SDKS.$(_bld_trg_arch)) \
+	$($(target)_SDKS.$(_bld_trg).$(_bld_trg_arch)) \
 	$($(target)_SDKS))
 $(foreach source, \
 	$($(target)_SOURCES.$(_bld_trg)) \
 	$($(target)_SOURCES.$(_bld_trg_arch)) \
+	$($(target)_SOURCES.$(_bld_trg).$(_bld_trg_arch)) \
 	$($(target)_SOURCES.$(_bld_trg_cpu)) \
 	$($(target)_SOURCES.$(BUILD_TYPE)) \
@@ -553,8 +591,10 @@
 	$(TOOL_$(tool)_DEFS.$(bld_trg))\
 	$(TOOL_$(tool)_DEFS.$(bld_trg_arch))\
+	$(TOOL_$(tool)_DEFS.$(bld_trg).$(bld_trg_arch))\
 	$(TOOL_$(tool)_DEFS.$(bld_trg_cpu))\
 	$(TOOL_$(tool)_$(type)DEFS)\
 	$(TOOL_$(tool)_$(type)DEFS.$(bld_type))\
 	$(foreach sdk, $(SDKS.$(bld_trg)) \
+				   $(SDKS.$(bld_trg).$(bld_trg_arch)) \
 				   $(SDKS.$(bld_type)) \
 				   $(SDKS),\
@@ -563,4 +603,5 @@
 		$(SDK_$(sdk)_DEFS.$(bld_trg))\
 		$(SDK_$(sdk)_DEFS.$(bld_trg_arch))\
+		$(SDK_$(sdk)_DEFS.$(bld_trg).$(bld_trg_arch))\
 		$(SDK_$(sdk)_DEFS.$(bld_trg_cpu))\
 		$(SDK_$(sdk)_$(type)DEFS)\
@@ -568,4 +609,5 @@
 		$(SDK_$(sdk)_$(type)DEFS.$(bld_trg))\
 		$(SDK_$(sdk)_$(type)DEFS.$(bld_trg_arch))\
+		$(SDK_$(sdk)_$(type)DEFS.$(bld_trg).$(bld_trg_arch))\
 		$(SDK_$(sdk)_$(type)DEFS.$(bld_trg_cpu)))\
 	$(DEFS)\
@@ -573,4 +615,5 @@
 	$(DEFS.$(bld_trg))\
 	$(DEFS.$(bld_trg_arch))\
+	$(DEFS.$(bld_trg).$(bld_trg_arch))\
 	$(DEFS.$(bld_trg_cpu))\
 	$($(type)DEFS)\
@@ -578,6 +621,8 @@
 	$($(type)DEFS.$(bld_trg))\
 	$($(type)DEFS.$(bld_trg_arch))\
+	$($(type)DEFS.$(bld_trg).$(bld_trg_arch))\
 	$($(type)DEFS.$(bld_trg_cpu))\
 	$(foreach sdk, $($(target)_SDKS.$(bld_trg)) \
+				   $($(target)_SDKS.$(bld_trg).$(bld_trg_arch)) \
 				   $($(target)_SDKS.$(bld_type)) \
 				   $($(target)_SDKS),\
@@ -586,4 +631,5 @@
 		$(SDK_$(sdk)_DEFS.$(bld_trg))\
 		$(SDK_$(sdk)_DEFS.$(bld_trg_arch))\
+		$(SDK_$(sdk)_DEFS.$(bld_trg).$(bld_trg_arch))\
 		$(SDK_$(sdk)_DEFS.$(bld_trg_cpu))\
 		$(SDK_$(sdk)_$(type)DEFS)\
@@ -591,4 +637,5 @@
 		$(SDK_$(sdk)_$(type)DEFS.$(bld_trg))\
 		$(SDK_$(sdk)_$(type)DEFS.$(bld_trg_arch))\
+		$(SDK_$(sdk)_$(type)DEFS.$(bld_trg).$(bld_trg_arch))\
 		$(SDK_$(sdk)_$(type)DEFS.$(bld_trg_cpu)))\
 	$($(target)_DEFS)\
@@ -596,4 +643,5 @@
 	$($(target)_DEFS.$(bld_trg))\
 	$($(target)_DEFS.$(bld_trg_arch))\
+	$($(target)_DEFS.$(bld_trg).$(bld_trg_arch))\
 	$($(target)_DEFS.$(bld_trg_cpu))\
 	$($(target)_$(type)DEFS)\
@@ -601,6 +649,8 @@
 	$($(target)_$(type)DEFS.$(bld_trg))\
 	$($(target)_$(type)DEFS.$(bld_trg_arch))\
+	$($(target)_$(type)DEFS.$(bld_trg).$(bld_trg_arch))\
 	$($(target)_$(type)DEFS.$(bld_trg_cpu))\
 	$(foreach sdk, $($(source)_SDKS.$(bld_trg)) \
+				   $($(source)_SDKS.$(bld_trg).$(bld_trg_arch)) \
 				   $($(source)_SDKS.$(bld_type)) \
 				   $($(source)_SDKS),\
@@ -609,4 +659,5 @@
 		$(SDK_$(sdk)_DEFS.$(bld_trg))\
 		$(SDK_$(sdk)_DEFS.$(bld_trg_arch))\
+		$(SDK_$(sdk)_DEFS.$(bld_trg).$(bld_trg_arch))\
 		$(SDK_$(sdk)_DEFS.$(bld_trg_cpu))\
 		$(SDK_$(sdk)_$(type)DEFS)\
@@ -614,4 +665,5 @@
 		$(SDK_$(sdk)_$(type)DEFS.$(bld_trg))\
 		$(SDK_$(sdk)_$(type)DEFS.$(bld_trg_arch))\
+		$(SDK_$(sdk)_$(type)DEFS.$(bld_trg).$(bld_trg_arch))\
 		$(SDK_$(sdk)_$(type)DEFS.$(bld_trg_cpu)))\
 	$($(source)_DEFS)\
@@ -619,4 +671,5 @@
 	$($(source)_DEFS.$(bld_trg))\
 	$($(source)_DEFS.$(bld_trg_arch))\
+	$($(source)_DEFS.$(bld_trg).$(bld_trg_arch))\
 	$($(source)_DEFS.$(bld_trg_cpu))\
 	$($(source)_$(type)DEFS)\
@@ -624,6 +677,8 @@
 	$($(source)_$(type)DEFS.$(bld_trg))\
 	$($(source)_$(type)DEFS.$(bld_trg_arch))\
+	$($(source)_$(type)DEFS.$(bld_trg).$(bld_trg_arch))\
 	$($(source)_$(type)DEFS.$(bld_trg_cpu))\
 	$(foreach sdk, $($(target)_$(source)_SDKS.$(bld_trg)) \
+				   $($(target)_$(source)_SDKS.$(bld_trg).$(bld_trg_arch)) \
 				   $($(target)_$(source)_SDKS.$(bld_type)) \
 				   $($(target)_$(source)_SDKS),\
@@ -632,4 +687,5 @@
 		$(SDK_$(sdk)_DEFS.$(bld_trg))\
 		$(SDK_$(sdk)_DEFS.$(bld_trg_arch))\
+		$(SDK_$(sdk)_DEFS.$(bld_trg).$(bld_trg_arch))\
 		$(SDK_$(sdk)_DEFS.$(bld_trg_cpu))\
 		$(SDK_$(sdk)_$(type)DEFS)\
@@ -637,4 +693,5 @@
 		$(SDK_$(sdk)_$(type)DEFS.$(bld_trg))\
 		$(SDK_$(sdk)_$(type)DEFS.$(bld_trg_arch))\
+		$(SDK_$(sdk)_$(type)DEFS.$(bld_trg).$(bld_trg_arch))\
 		$(SDK_$(sdk)_$(type)DEFS.$(bld_trg_cpu)))\
 	$($(target)_$(source)_DEFS)\
@@ -642,4 +699,5 @@
 	$($(target)_$(source)_DEFS.$(bld_trg))\
 	$($(target)_$(source)_DEFS.$(bld_trg_arch))\
+	$($(target)_$(source)_DEFS.$(bld_trg).$(bld_trg_arch))\
 	$($(target)_$(source)_DEFS.$(bld_trg_cpu))\
 	$($(target)_$(source)_$(type)DEFS)\
@@ -647,7 +705,9 @@
 	$($(target)_$(source)_$(type)DEFS.$(bld_trg))\
 	$($(target)_$(source)_$(type)DEFS.$(bld_trg_arch))\
+	$($(target)_$(source)_$(type)DEFS.$(bld_trg).$(bld_trg_arch))\
 	$($(target)_$(source)_$(type)DEFS.$(bld_trg_cpu))
 incs        :=\
 	$($(target)_$(source)_$(type)INCS.$(bld_trg_cpu))\
+	$($(target)_$(source)_$(type)INCS.$(bld_trg).$(bld_trg_arch))\
 	$($(target)_$(source)_$(type)INCS.$(bld_trg_arch))\
 	$($(target)_$(source)_$(type)INCS.$(bld_trg))\
@@ -655,4 +715,5 @@
 	$($(target)_$(source)_$(type)INCS)\
 	$($(target)_$(source)_INCS.$(bld_trg_cpu))\
+	$($(target)_$(source)_INCS.$(bld_trg).$(bld_trg_arch))\
 	$($(target)_$(source)_INCS.$(bld_trg_arch))\
 	$($(target)_$(source)_INCS.$(bld_trg))\
@@ -660,7 +721,9 @@
 	$($(target)_$(source)_INCS)\
 	$(foreach sdk, $($(target)_$(source)_SDKS.$(bld_trg)) \
+				   $($(target)_$(source)_SDKS.$(bld_trg).$(bld_trg_arch)) \
 				   $($(target)_$(source)_SDKS.$(bld_type)) \
 				   $($(target)_$(source)_SDKS),\
 		$(SDK_$(sdk)_$(type)INCS.$(bld_trg_cpu))\
+		$(SDK_$(sdk)_$(type)INCS.$(bld_trg).$(bld_trg_arch))\
 		$(SDK_$(sdk)_$(type)INCS.$(bld_trg_arch))\
 		$(SDK_$(sdk)_$(type)INCS.$(bld_trg))\
@@ -668,4 +731,5 @@
 		$(SDK_$(sdk)_$(type)INCS)\
 		$(SDK_$(sdk)_INCS.$(bld_trg_cpu))\
+		$(SDK_$(sdk)_INCS.$(bld_trg).$(bld_trg_arch))\
 		$(SDK_$(sdk)_INCS.$(bld_trg_arch))\
 		$(SDK_$(sdk)_INCS.$(bld_trg))\
@@ -673,4 +737,5 @@
 		$(SDK_$(sdk)_INCS))\
 	$($(source)_$(type)INCS.$(bld_trg_cpu))\
+	$($(source)_$(type)INCS.$(bld_trg).$(bld_trg_arch))\
 	$($(source)_$(type)INCS.$(bld_trg_arch))\
 	$($(source)_$(type)INCS.$(bld_trg))\
@@ -678,4 +743,5 @@
 	$($(source)_$(type)INCS)\
 	$($(source)_INCS.$(bld_trg_cpu))\
+	$($(source)_INCS.$(bld_trg).$(bld_trg_arch))\
 	$($(source)_INCS.$(bld_trg_arch))\
 	$($(source)_INCS.$(bld_trg))\
@@ -683,7 +749,9 @@
 	$($(source)_INCS)\
 	$(foreach sdk, $($(source)_SDKS.$(bld_trg)) \
+				   $($(source)_SDKS.$(bld_trg).$(bld_trg_arch)) \
 				   $($(source)_SDKS.$(bld_type)) \
 				   $($(source)_SDKS),\
 		$(SDK_$(sdk)_$(type)INCS.$(bld_trg_cpu))\
+		$(SDK_$(sdk)_$(type)INCS.$(bld_trg).$(bld_trg_arch))\
 		$(SDK_$(sdk)_$(type)INCS.$(bld_trg_arch))\
 		$(SDK_$(sdk)_$(type)INCS.$(bld_trg))\
@@ -691,4 +759,5 @@
 		$(SDK_$(sdk)_$(type)INCS)\
 		$(SDK_$(sdk)_INCS.$(bld_trg_cpu))\
+		$(SDK_$(sdk)_INCS.$(bld_trg).$(bld_trg_arch))\
 		$(SDK_$(sdk)_INCS.$(bld_trg_arch))\
 		$(SDK_$(sdk)_INCS.$(bld_trg))\
@@ -696,4 +765,5 @@
 		$(SDK_$(sdk)_INCS))\
 	$($(target)_$(type)INCS.$(bld_trg_cpu))\
+	$($(target)_$(type)INCS.$(bld_trg).$(bld_trg_arch))\
 	$($(target)_$(type)INCS.$(bld_trg_arch))\
 	$($(target)_$(type)INCS.$(bld_trg))\
@@ -701,4 +771,5 @@
 	$($(target)_$(type)INCS)\
 	$($(target)_INCS.$(bld_trg_cpu))\
+	$($(target)_INCS.$(bld_trg).$(bld_trg_arch))\
 	$($(target)_INCS.$(bld_trg_arch))\
 	$($(target)_INCS.$(bld_trg))\
@@ -706,7 +777,9 @@
 	$($(target)_INCS)\
 	$(foreach sdk, $($(target)_SDKS.$(bld_trg)) \
+				   $($(target)_SDKS.$(bld_trg).$(bld_trg_arch)) \
 				   $($(target)_SDKS.$(bld_type)) \
 				   $($(target)_SDKS),\
 		$(SDK_$(sdk)_$(type)INCS.$(bld_trg_cpu))\
+		$(SDK_$(sdk)_$(type)INCS.$(bld_trg).$(bld_trg_arch))\
 		$(SDK_$(sdk)_$(type)INCS.$(bld_trg_arch))\
 		$(SDK_$(sdk)_$(type)INCS.$(bld_trg))\
@@ -714,4 +787,5 @@
 		$(SDK_$(sdk)_$(type)INCS)\
 		$(SDK_$(sdk)_INCS.$(bld_trg_cpu))\
+		$(SDK_$(sdk)_INCS.$(bld_trg).$(bld_trg_arch))\
 		$(SDK_$(sdk)_INCS.$(bld_trg_arch))\
 		$(SDK_$(sdk)_INCS.$(bld_trg))\
@@ -719,4 +793,5 @@
 		$(SDK_$(sdk)_INCS))\
 	$(INCS.$(bld_trg_cpu))\
+	$(INCS.$(bld_trg).$(bld_trg_arch))\
 	$(INCS.$(bld_trg_arch))\
 	$(INCS.$(bld_trg))\
@@ -724,7 +799,9 @@
 	$(INCS)\
 	$(foreach sdk, $(SDKS.$(bld_trg)) \
+				   $(SDKS.$(bld_trg).$(bld_trg_arch)) \
 				   $(SDKS.$(bld_type)) \
 				   $(SDKS),\
 		$(SDK_$(sdk)_$(type)INCS.$(bld_trg_cpu))\
+		$(SDK_$(sdk)_$(type)INCS.$(bld_trg).$(bld_trg_arch))\
 		$(SDK_$(sdk)_$(type)INCS.$(bld_trg_arch))\
 		$(SDK_$(sdk)_$(type)INCS.$(bld_trg))\
@@ -732,4 +809,5 @@
 		$(SDK_$(sdk)_$(type)INCS)\
 		$(SDK_$(sdk)_INCS.$(bld_trg_cpu))\
+		$(SDK_$(sdk)_INCS.$(bld_trg).$(bld_trg_arch))\
 		$(SDK_$(sdk)_INCS.$(bld_trg_arch))\
 		$(SDK_$(sdk)_INCS.$(bld_trg))\
@@ -737,4 +815,5 @@
 		$(SDK_$(sdk)_INCS))\
 	$(TOOL_$(tool)_$(type)INCS.$(bld_trg_cpu))\
+	$(TOOL_$(tool)_$(type)INCS.$(bld_trg).$(bld_trg_arch))\
 	$(TOOL_$(tool)_$(type)INCS.$(bld_trg_arch))\
 	$(TOOL_$(tool)_$(type)INCS.$(bld_trg))\
@@ -746,4 +825,5 @@
 	$(TOOL_$(tool)_$(type)FLAGS.$(bld_trg))\
 	$(TOOL_$(tool)_$(type)FLAGS.$(bld_trg_arch))\
+	$(TOOL_$(tool)_$(type)FLAGS.$(bld_trg).$(bld_trg_arch))\
 	$(TOOL_$(tool)_$(type)FLAGS.$(bld_trg_cpu))\
 	$($(type)FLAGS)\
@@ -751,4 +831,5 @@
 	$($(type)FLAGS.$(bld_trg))\
 	$($(type)FLAGS.$(bld_trg_arch))\
+	$($(type)FLAGS.$(bld_trg).$(bld_trg_arch))\
 	$($(type)FLAGS.$(bld_trg_cpu))\
 	$($(target)_$(type)FLAGS)\
@@ -756,4 +837,5 @@
 	$($(target)_$(type)FLAGS.$(bld_trg))\
 	$($(target)_$(type)FLAGS.$(bld_trg_arch))\
+	$($(target)_$(type)FLAGS.$(bld_trg).$(bld_trg_arch))\
 	$($(target)_$(type)FLAGS.$(bld_trg_cpu))\
 	$($(source)_$(type)FLAGS)\
@@ -761,4 +843,5 @@
 	$($(source)_$(type)FLAGS.$(bld_trg))\
 	$($(source)_$(type)FLAGS.$(bld_trg_arch))\
+	$($(source)_$(type)FLAGS.$(bld_trg).$(bld_trg_arch))\
 	$($(source)_$(type)FLAGS.$(bld_trg_cpu))\
 	$($(target)_$(source)_$(type)FLAGS)\
@@ -766,12 +849,17 @@
 	$($(target)_$(source)_$(type)FLAGS.$(bld_trg))\
 	$($(target)_$(source)_$(type)FLAGS.$(bld_trg_arch))\
+	$($(target)_$(source)_$(type)FLAGS.$(bld_trg).$(bld_trg_arch))\
 	$($(target)_$(source)_$(type)FLAGS.$(bld_trg_cpu))
 objsuff     := $(firstword \
+	$($(target)_$(source)_OBJSUFF.$(bld_trg).$(bld_trg_arch))\
 	$($(target)_$(source)_OBJSUFF.$(bld_trg))\
 	$($(target)_$(source)_OBJSUFF)\
+	$($(source)_OBJSUFF.$(bld_trg).$(bld_trg_arch))\
 	$($(source)_OBJSUFF.$(bld_trg))\
 	$($(source)_OBJSUFF)\
+	$($(target)_OBJSUFF.$(bld_trg).$(bld_trg_arch))\
 	$($(target)_OBJSUFF.$(bld_trg))\
 	$($(target)_OBJSUFF)\
+	$(TOOL_$(tool)_$(type)OBJSUFF.$(bld_trg).$(bld_trg_arch))\
 	$(TOOL_$(tool)_$(type)OBJSUFF.$(bld_trg))\
 	$(TOOL_$(tool)_$(type)OBJSUFF)\
@@ -783,4 +871,5 @@
 	$($(target)_$(source)_DEPS.$(bld_trg))\
 	$($(target)_$(source)_DEPS.$(bld_trg_arch))\
+	$($(target)_$(source)_DEPS.$(bld_trg).$(bld_trg_arch))\
 	$($(target)_$(source)_DEPS.$(bld_trg_cpu))\
 	$($(source)_DEPS)\
@@ -788,8 +877,11 @@
 	$($(source)_DEPS.$(bld_trg))\
 	$($(source)_DEPS.$(bld_trg_arch))\
+	$($(source)_DEPS.$(bld_trg).$(bld_trg_arch))\
 	$($(source)_DEPS.$(bld_trg_cpu))\
 	$($(target)_DEPS)\
 	$($(target)_DEPS.$(bld_type))\
+	$($(target)_DEPS.$(bld_trg))\
 	$($(target)_DEPS.$(bld_trg_arch))\
+	$($(target)_DEPS.$(bld_trg).$(bld_trg_arch))\
 	$($(target)_DEPS.$(bld_trg_cpu))
 
@@ -804,20 +896,28 @@
 ifndef TOOL_$(tool)_COMPILE_$(type)_CMDS
 $(warning kBuild: tools: \
-	1 $($(target)_$(source)_$(type)TOOL.$(bld_trg)) \
-	2 $($(target)_$(source)_$(type)TOOL) \
-	3 $($(target)_$(source)_TOOL.$(bld_trg)) \
-	4 $($(target)_$(source)_TOOL) \
-	5 $($(target)_$(type)TOOL.$(bld_trg)) \
-	6 $($(target)_$(type)TOOL) \
-	7 $($(target)_TOOL.$(bld_trg)) \
-	8 $($(target)_TOOL) \
-	9 $($(source)_$(type)TOOL.$(bld_trg)) \
-	10 $($(source)_$(type)TOOL) \
-	11 $($(source)_TOOL.$(bld_trg)) \
-	12 $($(source)_TOOL) \
-	13 $($(type)TOOL.$(bld_trg)) \
-	14 $($(type)TOOL) \
-	15 $(TOOL.$(bld_trg)) \
-	16 $(TOOL) )
+	1 $($(target)_$(source)_$(type)TOOL.$(bld_trg).$(bld_trg_arch)) \
+	2 $($(target)_$(source)_$(type)TOOL.$(bld_trg)) \
+	3 $($(target)_$(source)_$(type)TOOL) \
+	4 $($(target)_$(source)_TOOL.$(bld_trg).$(bld_trg_arch)) \
+	5 $($(target)_$(source)_TOOL.$(bld_trg)) \
+	6 $($(target)_$(source)_TOOL) \
+	7 $($(target)_$(type)TOOL.$(bld_trg).$(bld_trg_arch)) \
+	8 $($(target)_$(type)TOOL.$(bld_trg)) \
+	9 $($(target)_$(type)TOOL) \
+	10 $($(target)_TOOL.$(bld_trg).$(bld_trg_arch)) \
+	11 $($(target)_TOOL.$(bld_trg)) \
+	12 $($(target)_TOOL) \
+	13 $($(source)_$(type)TOOL.$(bld_trg).$(bld_trg_arch)) \
+	14 $($(source)_$(type)TOOL.$(bld_trg)) \
+	15 $($(source)_$(type)TOOL) \
+	16 $($(source)_TOOL.$(bld_trg).$(bld_trg_arch)) \
+	17 $($(source)_TOOL.$(bld_trg)) \
+	18 $($(source)_TOOL) \
+	19 $($(type)TOOL.$(bld_trg).$(bld_trg_arch)) \
+	20 $($(type)TOOL.$(bld_trg)) \
+	21 $($(type)TOOL) \
+	22 $(TOOL.$(bld_trg).$(bld_trg_arch)) \
+	23 $(TOOL.$(bld_trg)) \
+	24 $(TOOL) )
 $(error kBuild: TOOL_$(tool)_COMPILE_$(type)_CMDS is not defined. source=$(source) target=$(target) )
 endif
@@ -843,15 +943,15 @@
 # C sources
 type := C
-$(foreach source, $(filter %.c, $($(target)_SOURCES) $($(target)_SOURCES.$(bld_trg)) $($(target)_SOURCES.$(bld_trg_arch)) $($(target)_SOURCES.$(bld_trg_cpu)) $($(target)_SOURCES.$(bld_type)))\
+$(foreach source, $(filter %.c             , $($(target)_SOURCES) $($(target)_SOURCES.$(bld_trg)) $($(target)_SOURCES.$(bld_trg).$(bld_trg_arch)) $($(target)_SOURCES.$(bld_trg_arch)) $($(target)_SOURCES.$(bld_trg_cpu)) $($(target)_SOURCES.$(bld_type)))\
 	,$(eval $(value def_target_source_c_cpp_asm)) )
 
 # C++ sources
 type := CXX
-$(foreach source, $(filter %.cpp %.cxx %.xx, $($(target)_SOURCES) $($(target)_SOURCES.$(bld_trg)) $($(target)_SOURCES.$(bld_trg_arch)) $($(target)_SOURCES.$(bld_trg_cpu)) $($(target)_SOURCES.$(bld_type)))\
+$(foreach source, $(filter %.cpp %.cxx %.xx, $($(target)_SOURCES) $($(target)_SOURCES.$(bld_trg)) $($(target)_SOURCES.$(bld_trg).$(bld_trg_arch)) $($(target)_SOURCES.$(bld_trg_arch)) $($(target)_SOURCES.$(bld_trg_cpu)) $($(target)_SOURCES.$(bld_type)))\
 	,$(eval $(value def_target_source_c_cpp_asm)) )
 
 # ASM sources
 type := AS
-$(foreach source, $(filter %.asm %.s %.S, $($(target)_SOURCES) $($(target)_SOURCES.$(bld_trg)) $($(target)_SOURCES.$(bld_trg_arch)) $($(target)_SOURCES.$(bld_trg_cpu)) $($(target)_SOURCES.$(bld_type)))\
+$(foreach source, $(filter %.asm %.s %.S   , $($(target)_SOURCES) $($(target)_SOURCES.$(bld_trg)) $($(target)_SOURCES.$(bld_trg).$(bld_trg_arch)) $($(target)_SOURCES.$(bld_trg_arch)) $($(target)_SOURCES.$(bld_trg_cpu)) $($(target)_SOURCES.$(bld_type)))\
 	,$(eval $(value def_target_source_c_cpp_asm)) )
 
@@ -914,6 +1014,8 @@
 PATH_$(target) := $(patsubst %/,%,$(dir $(outbase)))
 suff        := $(firstword\
+	$($(target)_LIBSUFF.$(bld_trg).$(bld_trg_arch))\
 	$($(target)_LIBSUFF.$(bld_trg))\
 	$($(target)_LIBSUFF)\
+	$(TOOL_$(tool)_ARLIBSUFF.$(bld_trg).$(bld_trg_arch))\
 	$(TOOL_$(tool)_ARLIBSUFF.$(bld_trg))\
 	$(TOOL_$(tool)_ARLIBSUFF)\
@@ -925,4 +1027,5 @@
 	$($(target)_SOURCES.$(bld_trg)) \
 	$($(target)_SOURCES.$(bld_trg_arch)) \
+	$($(target)_SOURCES.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_SOURCES.$(bld_trg_cpu)) \
 	$($(target)_SOURCES.$(bld_type)))
@@ -941,9 +1044,14 @@
 	$(ARFLAGS.$(bld_type))\
 	$($(target)_ARFLAGS)\
-	$($(target)_ARFLAGS.$(bld_type))
+	$($(target)_ARFLAGS.$(bld_type)) \
+	$($(target)_ARFLAGS.$(bld_trg)) \
+	$($(target)_ARFLAGS.$(bld_trg_arch)) \
+	$($(target)_ARFLAGS.$(bld_trg).$(bld_trg_arch)) \
+	$($(target)_ARFLAGS.$(bld_trg_cpu))
 othersrc    := $(filter-out %.c %.cpp %.cxx %.cc %.s %.S %.asm %.o %.obj,\
 	$($(target)_SOURCES) \
 	$($(target)_SOURCES.$(bld_trg)) \
 	$($(target)_SOURCES.$(bld_trg_arch)) \
+	$($(target)_SOURCES.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_SOURCES.$(bld_trg_cpu)) \
 	$($(target)_SOURCES.$(bld_type)))
@@ -963,12 +1071,16 @@
 ifndef TOOL_$(tool)_LINK_LIBRARY_CMDS
 $(warning kBuild: tools: \
-	1 $($(target)_$(source)TOOL.$(bld_trg)) \
-	2 $($(target)_$(source)TOOL) \
-	3 $($(target)_TOOL.$(bld_trg)) \
-	4 $($(target)_TOOL) \
-	5 $($(source)TOOL) \
-	6 $($(source)TOOL.$(bld_trg)) \
-	7 $(TOOL.$(bld_trg)) \
-	8 $(TOOL) )
+	1 $($(target)_$(source)TOOL.$(bld_trg).$(bld_trg_arch)) \
+	2 $($(target)_$(source)TOOL.$(bld_trg)) \
+	3 $($(target)_$(source)TOOL) \
+	4 $($(target)_TOOL.$(bld_trg).$(bld_trg_arch)) \
+	5 $($(target)_TOOL.$(bld_trg)) \
+	6 $($(target)_TOOL) \
+	7 $($(source)TOOL) \
+	8 $($(source)TOOL.$(bld_trg).$(bld_trg_arch)) \
+	9 $($(source)TOOL.$(bld_trg)) \
+	10 $(TOOL.$(bld_trg).$(bld_trg_arch)) \
+	11 $(TOOL.$(bld_trg)) \
+	12 $(TOOL) )
 $(error kBuild: TOOL_$(tool)_LINK_LIBRARY_CMDS isn't defined! target=$(target) )
 endif
@@ -991,5 +1103,5 @@
 # Process libraries
 mode := 0644
-$(foreach target, $(LIBRARIES) $(LIBRARIES.$(BUILD_TARGET)), $(eval $(value def_lib)))
+$(foreach target, $(LIBRARIES) $(LIBRARIES.$(BUILD_TARGET)) $(LIBRARIES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)), $(eval $(value def_lib)))
 
 
@@ -1026,4 +1138,5 @@
 	$($(target)_SOURCES.$(bld_trg)) \
 	$($(target)_SOURCES.$(bld_trg_arch)) \
+	$($(target)_SOURCES.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_SOURCES.$(bld_trg_cpu)) \
 	$($(target)_SOURCES.$(bld_type)))
@@ -1040,4 +1153,5 @@
 	$(TOOL_$(tool)_LDFLAGS.$(bld_trg))\
 	$(TOOL_$(tool)_LDFLAGS.$(bld_trg_arch))\
+	$(TOOL_$(tool)_LDFLAGS.$(bld_trg).$(bld_trg_arch))\
 	$(TOOL_$(tool)_LDFLAGS.$(bld_trg_cpu))\
 	$(LDFLAGS)\
@@ -1045,4 +1159,5 @@
 	$(LDFLAGS.$(bld_trg))\
 	$(LDFLAGS.$(bld_trg_arch))\
+	$(LDFLAGS.$(bld_trg).$(bld_trg_arch))\
 	$(LDFLAGS.$(bld_trg_cpu))\
 	$($(target)_LDFLAGS)\
@@ -1050,4 +1165,5 @@
 	$($(target)_LDFLAGS.$(bld_trg))\
 	$($(target)_LDFLAGS.$(bld_trg_arch))\
+	$($(target)_LDFLAGS.$(bld_trg).$(bld_trg_arch))\
 	$($(target)_LDFLAGS.$(bld_trg_cpu))
 othersrc    := $(filter-out %.c %.cpp %.cxx %.cc %.s %.S %.asm %.o %.obj,\
@@ -1055,4 +1171,5 @@
 	$($(target)_SOURCES.$(bld_trg)) \
 	$($(target)_SOURCES.$(bld_trg_arch)) \
+	$($(target)_SOURCES.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_SOURCES.$(bld_trg_cpu)) \
 	$($(target)_SOURCES.$(bld_type)))
@@ -1060,4 +1177,5 @@
 libs        :=\
 	$($(target)_LIBS.$(bld_trg_cpu))\
+	$($(target)_LIBS.$(bld_trg).$(bld_trg_arch))\
 	$($(target)_LIBS.$(bld_trg_arch))\
 	$($(target)_LIBS.$(bld_trg))\
@@ -1065,7 +1183,9 @@
 	$($(target)_LIBS)\
 	$(foreach sdk, $($(target)_SDKS.$(bld_trg)) \
+				   $($(target)_SDKS.$(bld_trg).$(bld_trg_arch)) \
 				   $($(target)_SDKS.$(bld_type)) \
 				   $($(target)_SDKS),\
 		$(SDK_$(sdk)_LIBS.$(bld_trg_cpu))\
+		$(SDK_$(sdk)_LIBS.$(bld_trg).$(bld_trg_arch))\
 		$(SDK_$(sdk)_LIBS.$(bld_trg_arch))\
 		$(SDK_$(sdk)_LIBS.$(bld_trg))\
@@ -1073,4 +1193,5 @@
 		$(SDK_$(sdk)_LIBS))\
 	$(LIBS.$(bld_trg_cpu))\
+	$(LIBS.$(bld_trg).$(bld_trg_arch))\
 	$(LIBS.$(bld_trg_arch))\
 	$(LIBS.$(bld_trg))\
@@ -1078,7 +1199,9 @@
 	$(LIBS)\
 	$(foreach sdk, $(SDKS.$(bld_trg)) \
+				   $(SDKS.$(bld_trg).$(bld_trg_arch)) \
 				   $(SDKS.$(bld_type)) \
 				   $(SDKS),\
 		$(SDK_$(sdk)_LIBS.$(bld_trg_cpu))\
+		$(SDK_$(sdk)_LIBS.$(bld_trg).$(bld_trg_arch))\
 		$(SDK_$(sdk)_LIBS.$(bld_trg_arch))\
 		$(SDK_$(sdk)_LIBS.$(bld_trg))\
@@ -1086,4 +1209,5 @@
 		$(SDK_$(sdk)_LIBS))\
 	$(TOOL_$(tool)_LIBS.$(bld_trg_cpu))\
+	$(TOOL_$(tool)_LIBS.$(bld_trg).$(bld_trg_arch))\
 	$(TOOL_$(tool)_LIBS.$(bld_trg_arch))\
 	$(TOOL_$(tool)_LIBS.$(bld_trg))\
@@ -1092,4 +1216,5 @@
 libpath    :=\
 	$($(target)_LIBPATH.$(bld_trg_cpu))\
+	$($(target)_LIBPATH.$(bld_trg).$(bld_trg_arch))\
 	$($(target)_LIBPATH.$(bld_trg_arch))\
 	$($(target)_LIBPATH.$(bld_trg))\
@@ -1097,7 +1222,9 @@
 	$($(target)_LIBPATH)\
 	$(foreach sdk, $($(target)_SDKS.$(bld_trg)) \
+				   $($(target)_SDKS.$(bld_trg).$(bld_trg_arch)) \
 				   $($(target)_SDKS.$(bld_type)) \
 				   $($(target)_SDKS),\
 		$(SDK_$(sdk)_LIBPATH.$(bld_trg_cpu))\
+		$(SDK_$(sdk)_LIBPATH.$(bld_trg).$(bld_trg_arch))\
 		$(SDK_$(sdk)_LIBPATH.$(bld_trg_arch))\
 		$(SDK_$(sdk)_LIBPATH.$(bld_trg))\
@@ -1105,4 +1232,5 @@
 		$(SDK_$(sdk)_LIBPATH))\
 	$(LIBPATH.$(bld_trg_cpu))\
+	$(LIBPATH.$(bld_trg).$(bld_trg_arch))\
 	$(LIBPATH.$(bld_trg_arch))\
 	$(LIBPATH.$(bld_trg))\
@@ -1110,7 +1238,9 @@
 	$(LIBPATH)\
 	$(foreach sdk, $(SDKS.$(bld_trg)) \
+				   $(SDKS.$(bld_trg).$(bld_trg_arch)) \
 				   $(SDKS.$(bld_type)) \
 				   $(SDKS),\
 		$(SDK_$(sdk)_LIBPATH.$(bld_trg_cpu))\
+		$(SDK_$(sdk)_LIBPATH.$(bld_trg).$(bld_trg_arch))\
 		$(SDK_$(sdk)_LIBPATH.$(bld_trg_arch))\
 		$(SDK_$(sdk)_LIBPATH.$(bld_trg))\
@@ -1118,4 +1248,5 @@
 		$(SDK_$(sdk)_LIBPATH))\
 	$(TOOL_$(tool)_LIBPATH.$(bld_trg_cpu))\
+	$(TOOL_$(tool)_LIBPATH.$(bld_trg).$(bld_trg_arch))\
 	$(TOOL_$(tool)_LIBPATH.$(bld_trg_arch))\
 	$(TOOL_$(tool)_LIBPATH.$(bld_trg))\
@@ -1128,8 +1259,10 @@
 ## @todo this stuff can't be working.
 custom_pre  := $(strip $(firstword \
+	$($(target)_CUSTOM_PRE.$(bld_trg).$(bld_trg_arch))\
 	$($(target)_CUSTOM_PRE.$(bld_trg).$(bld_type))\
 	$($(target)_CUSTOM_PRE.$(bld_trg))\
 	$($(target)_CUSTOM_PRE.$(bld_type))\
 	$($(target)_CUSTOM_PRE)\
+	$(CUSTOM_PRE.$(bld_trg).$(bld_trg_arch))\
 	$(CUSTOM_PRE.$(bld_trg).$(bld_type))\
 	$(CUSTOM_PRE.$(bld_trg))\
@@ -1138,8 +1271,10 @@
 ))
 custom_post    := $(strip $(firstword \
+	$($(target)_CUSTOM_POST.$(bld_trg).$(bld_trg_arch))\
 	$($(target)_CUSTOM_POST.$(bld_trg).$(bld_type))\
 	$($(target)_CUSTOM_POST.$(bld_trg))\
 	$($(target)_CUSTOM_POST.$(bld_type))\
 	$($(target)_CUSTOM_POST)\
+	$(CUSTOM_POST.$(bld_trg).$(bld_trg_arch))\
 	$(CUSTOM_POST.$(bld_trg).$(bld_type))\
 	$(CUSTOM_POST.$(bld_trg))\
@@ -1175,12 +1310,16 @@
 ifndef TOOL_$(tool)_$(tool_do)_CMDS
 $(warning kBuild: tools: \
-	1 $($(target)_$(source)TOOL.$(bld_trg)) \
-	2 $($(target)_$(source)TOOL) \
-	3 $($(target)_TOOL.$(bld_trg)) \
-	4 $($(target)_TOOL) \
-	5 $($(source)TOOL) \
-	6 $($(source)TOOL.$(bld_trg)) \
-	7 $(TOOL.$(bld_trg)) \
-	8 $(TOOL) )
+	1 $($(target)_$(source)TOOL.$(bld_trg).$(bld_trg_arch)) \
+	2 $($(target)_$(source)TOOL.$(bld_trg)) \
+	3 $($(target)_$(source)TOOL) \
+	4 $($(target)_TOOL.$(bld_trg).$(bld_trg_arch)) \
+	5 $($(target)_TOOL.$(bld_trg)) \
+	6 $($(target)_TOOL) \
+	7 $($(source)TOOL.$(bld_trg).$(bld_trg_arch)) \
+	8 $($(source)TOOL.$(bld_trg)) \
+	9 $($(source)TOOL) \
+	10 $(TOOL.$(bld_trg).$(bld_trg_arch)) \
+	11 $(TOOL.$(bld_trg)) \
+	12 $(TOOL) )
 $(error kBuild: TOOL_$(tool)_$(tool_do)_CMDS isn't defined! target=$(target) )
 endif
@@ -1231,5 +1370,5 @@
 mode    := 0755
 bld_trg_base_var := PLATFORM
-$(foreach target, $(BLDPROGS) $(BLDPROGS.$(BUILD_PLATFORM)), $(eval $(value def_bldprog)))
+$(foreach target, $(BLDPROGS) $(BLDPROGS.$(BUILD_PLATFORM)) $(BLDPROGS.$(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH)), $(eval $(value def_bldprog)))
 
 
@@ -1247,5 +1386,5 @@
 mode    := 0755
 bld_trg_base_var := TARGET
-$(foreach target, $(DLLS) $(DLLS.$(BUILD_TARGET)), $(eval $(value def_link_common)))
+$(foreach target, $(DLLS) $(DLLS.$(BUILD_TARGET)) $(DLLS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)), $(eval $(value def_link_common)))
 
 
@@ -1255,10 +1394,10 @@
 #   - On OS/2 and windows these are libraries.
 #   - On other platforms they are fake DLLs.
-ifeq ($(filter-out win64 win32 os2,$(BUILD_TARGET)),)
-$(foreach target, $(IMPORT_LIBS) $(IMPORT_LIBS.$(BUILD_TARGET)), $(eval $(value def_lib)))
+ifeq ($(filter-out nt os2 win win64 win32,$(BUILD_TARGET)),)
+$(foreach target, $(IMPORT_LIBS) $(IMPORT_LIBS.$(BUILD_TARGET)) $(IMPORT_LIBS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)), $(eval $(value def_lib)))
 else
-$(foreach target, $(IMPORT_LIBS) $(IMPORT_LIBS.$(BUILD_TARGET)), $(eval $(value def_link_common)))
-endif
-$(foreach target, $(IMPORT_LIBS) $(IMPORT_LIBS.$(BUILD_TARGET)), \
+$(foreach target, $(IMPORT_LIBS) $(IMPORT_LIBS.$(BUILD_TARGET)) $(IMPORT_LIBS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)), $(eval $(value def_link_common)))
+endif
+$(foreach target, $(IMPORT_LIBS) $(IMPORT_LIBS.$(BUILD_TARGET)) $(IMPORT_LIBS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)), \
 	$(eval _IMPORT_LIBS += $(if $(INSTARGET_$(target)),$(INSTARGET_$(target)), $(TARGET_$(target)))))
 
@@ -1276,5 +1415,5 @@
 mode    := 0755
 bld_trg_base_var := TARGET
-$(foreach target, $(PROGRAMS) $(PROGRAMS.$(BUILD_TARGET)), $(eval $(value def_link_common)))
+$(foreach target, $(PROGRAMS) $(PROGRAMS.$(BUILD_TARGET)) $(PROGRAMS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)), $(eval $(value def_link_common)))
 
 
@@ -1292,5 +1431,5 @@
 mode    := 0644
 bld_trg_base_var := TARGET
-$(foreach target, $(SYSMODS) $(SYSMODS.$(BUILD_TARGET)), $(eval $(value def_link_common)))
+$(foreach target, $(SYSMODS) $(SYSMODS.$(BUILD_TARGET)) $(SYSMODS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)), $(eval $(value def_link_common)))
 
 
@@ -1298,5 +1437,5 @@
 # OTHERS
 #
-_OTHERS = $(OTHERS) $(OTHERS.$(BUILD_TARGET))
+_OTHERS = $(OTHERS) $(OTHERS.$(BUILD_TARGET)) $(OTHERS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH))
 
 
@@ -1350,34 +1489,49 @@
 # mode, uid and gid
 mode := $(firstword \
+	$($(target)_$(srcsrc)_MODE.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_$(srcsrc)_MODE.$(bld_trg)) \
 	$($(target)_$(srcsrc)_MODE) \
+	$($(target)_$(srcdst)_MODE.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_$(srcdst)_MODE.$(bld_trg)) \
 	$($(target)_$(srcdst)_MODE) \
+	$($(srcsrc)_MODE.$(bld_trg).$(bld_trg_arch)) \
 	$($(srcsrc)_MODE.$(bld_trg)) \
 	$($(srcsrc)_MODE) \
+	$($(srcdst)_MODE.$(bld_trg).$(bld_trg_arch)) \
 	$($(srcdst)_MODE.$(bld_trg)) \
 	$($(srcdst)_MODE) \
+	$($(target)_MODE.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_MODE.$(bld_trg)) \
 	$($(target)_MODE))
 uid := $(firstword \
+	$($(target)_$(srcsrc)_UID.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_$(srcsrc)_UID.$(bld_trg)) \
 	$($(target)_$(srcsrc)_UID) \
+	$($(target)_$(srcdst)_UID.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_$(srcdst)_UID.$(bld_trg)) \
 	$($(target)_$(srcdst)_UID) \
+	$($(srcsrc)_UID.$(bld_trg).$(bld_trg_arch)) \
 	$($(srcsrc)_UID.$(bld_trg)) \
 	$($(srcsrc)_UID) \
+	$($(srcdst)_UID.$(bld_trg).$(bld_trg_arch)) \
 	$($(srcdst)_UID.$(bld_trg)) \
 	$($(srcdst)_UID) \
+	$($(target)_UID.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_UID.$(bld_trg)) \
 	$($(target)_UID))
 gid := $(firstword \
+	$($(target)_$(srcsrc)_GID.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_$(srcsrc)_GID.$(bld_trg)) \
 	$($(target)_$(srcsrc)_GID) \
+	$($(target)_$(srcdst)_GID.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_$(srcdst)_GID.$(bld_trg)) \
 	$($(target)_$(srcdst)_GID) \
+	$($(srcsrc)_GID.$(bld_trg).$(bld_trg_arch)) \
 	$($(srcsrc)_GID.$(bld_trg)) \
 	$($(srcsrc)_GID) \
+	$($(srcdst)_GID.$(bld_trg).$(bld_trg_arch)) \
 	$($(srcdst)_GID.$(bld_trg)) \
 	$($(srcdst)_GID) \
+	$($(target)_GID.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_GID.$(bld_trg)) \
 	$($(target)_GID))
@@ -1483,22 +1637,31 @@
 
 mode := $(firstword \
+	$($(target)_$(directory)_MODE.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_$(directory)_MODE.$(bld_trg)) \
 	$($(target)_$(directory)_MODE) \
+	$($(directory)_MODE.$(bld_trg).$(bld_trg_arch)) \
 	$($(directory)_MODE.$(bld_trg)) \
 	$($(directory)_MODE) \
+	$($(target)_MODE.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_MODE.$(bld_trg)) \
 	$($(target)_MODE))
 uid := $(firstword \
+	$($(target)_$(directory)_UID.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_$(directory)_UID.$(bld_trg)) \
 	$($(target)_$(directory)_UID) \
+	$($(directory)_UID.$(bld_trg).$(bld_trg_arch)) \
 	$($(directory)_UID.$(bld_trg)) \
 	$($(directory)_UID) \
+	$($(target)_UID.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_UID.$(bld_trg)) \
 	$($(target)_UID))
 gid := $(firstword \
+	$($(target)_$(directory)_GID.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_$(directory)_GID.$(bld_trg)) \
 	$($(target)_$(directory)_GID) \
+	$($(directory)_GID.$(bld_trg).$(bld_trg_arch)) \
 	$($(directory)_GID.$(bld_trg)) \
 	$($(directory)_GID) \
+	$($(target)_GID.$(bld_trg).$(bld_trg_arch)) \
 	$($(target)_GID.$(bld_trg)) \
 	$($(target)_GID))
@@ -1524,11 +1687,11 @@
 INSTARGET_DIRS_$(target) :=
 
-$(foreach directory,$($(target)_DIRS) $($(target)_DIRS.$(bld_trg)) $($(target)_DIRS.$(bld_trg_arch)) $($(target)_DIRS.$(bld_trg_cpu)) $($(target)_DIRS.$(bld_type)), \
+$(foreach directory,$($(target)_DIRS) $($(target)_DIRS.$(bld_trg)) $($(target)_DIRS.$(bld_trg).$(bld_trg_arch)) $($(target)_DIRS.$(bld_trg_arch)) $($(target)_DIRS.$(bld_trg_cpu)) $($(target)_DIRS.$(bld_type)), \
 	$(eval $(value def_install_directory)))
 
-$(foreach src,$($(target)_SOURCES) $($(target)_SOURCES.$(bld_trg)) $($(target)_SOURCES.$(bld_trg_arch)) $($(target)_SOURCES.$(bld_trg_cpu)) $($(target)_SOURCES.$(bld_type)), \
+$(foreach src,$($(target)_SOURCES) $($(target)_SOURCES.$(bld_trg)) $($(target)_SOURCES.$(bld_trg).$(bld_trg_arch)) $($(target)_SOURCES.$(bld_trg_arch)) $($(target)_SOURCES.$(bld_trg_cpu)) $($(target)_SOURCES.$(bld_type)), \
 	$(eval $(value def_install_src)))
 
-$(foreach src,$($(target)_SYMLINKS) $($(target)_SYMLINKS.$(bld_trg)) $($(target)_SYMLINKS.$(bld_trg_arch)) $($(target)_SYMLINKS.$(bld_trg_cpu)) $($(target)_SYMLINKS.$(bld_type)), \
+$(foreach src,$($(target)_SYMLINKS) $($(target)_SYMLINKS.$(bld_trg)) $($(target)_SYMLINKS.$(bld_trg).$(bld_trg_arch)) $($(target)_SYMLINKS.$(bld_trg_arch)) $($(target)_SYMLINKS.$(bld_trg_cpu)) $($(target)_SYMLINKS.$(bld_type)), \
 	$(eval $(value def_install_symlink)))
 
@@ -1538,5 +1701,5 @@
 
 ## process all install targets
-$(foreach target, $(INSTALLS) $(INSTALLS.$(BUILD_TARGET)), \
+$(foreach target, $(INSTALLS) $(INSTALLS.$(BUILD_TARGET)) $(INSTALLS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)), \
 	$(eval $(value def_install)))
 
@@ -1545,5 +1708,5 @@
 # PACKING
 #
-_PACKING += $(PACKING) $(PACKING.$(BUILD_TARGET))
+_PACKING += $(PACKING) $(PACKING.$(BUILD_TARGET)) $(PACKING.$(BUILD_TARGET).$(BUILD_TARGET_ARCH))
 
 
@@ -1611,18 +1774,18 @@
 # @param	$(PASS)		Uppercase pass name.
 define def_pass_old
-$(eval SUBDIRS_$(PASS)          ?= $(SUBDIRS)          $(SUBDIRS.$(BUILD_TARGET)))
-$(eval SUBDIRS_AFTER_$(PASS)    ?= $(SUBDIRS_AFTER)    $(SUBDIRS_AFTER.$(BUILD_TARGET)))
-$(eval MAKEFILES_BEFORE_$(PASS) ?= $(MAKEFILES_BEFORE) $(MAKEFILES_BEFORE.$(BUILD_TARGET)))
-$(eval MAKEFILES_AFTER_$(PASS)  ?= $(MAKEFILES_AFTER)  $(MAKEFILES_AFTER.$(BUILD_TARGET)))
+$(eval SUBDIRS_$(PASS)          ?= $(SUBDIRS)          $(SUBDIRS.$(BUILD_TARGET))           $(SUBDIRS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH))          )
+$(eval SUBDIRS_AFTER_$(PASS)    ?= $(SUBDIRS_AFTER)    $(SUBDIRS_AFTER.$(BUILD_TARGET))     $(SUBDIRS_AFTER.$(BUILD_TARGET).$(BUILD_TARGET_ARCH))    )
+$(eval MAKEFILES_BEFORE_$(PASS) ?= $(MAKEFILES_BEFORE) $(MAKEFILES_BEFORE.$(BUILD_TARGET))  $(MAKEFILES_BEFORE.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) )
+$(eval MAKEFILES_AFTER_$(PASS)  ?= $(MAKEFILES_AFTER)  $(MAKEFILES_AFTER.$(BUILD_TARGET))   $(MAKEFILES_AFTER.$(BUILD_TARGET).$(BUILD_TARGET_ARCH))  )
 
 $(eval tag:=_before)
 $(eval dep:=)
-$(foreach subdir,$(SUBDIRS_$(PASS))            $(SUBDIRS_$(PASS).$(BUILD_TARGET))         ,$(eval $(def_pass_subdir)))
-$(foreach makefile,$(MAKEFILES_BEFORE_$(PASS)) $(MAKEFILES_BEFORE_$(PASS).$(BUILD_TARGET)),$(eval $(def_pass_makefile)))
+$(foreach subdir,$(SUBDIRS_$(PASS))            $(SUBDIRS_$(PASS).$(BUILD_TARGET))           $(SUBDIRS_$(PASS).$(BUILD_TARGET).$(BUILD_TARGET_ARCH))         ,$(eval $(def_pass_subdir)))
+$(foreach makefile,$(MAKEFILES_BEFORE_$(PASS)) $(MAKEFILES_BEFORE_$(PASS).$(BUILD_TARGET))  $(MAKEFILES_BEFORE_$(PASS).$(BUILD_TARGET).$(BUILD_TARGET_ARCH)),$(eval $(def_pass_makefile)))
 
 $(eval tag:=_after)
 $(eval dep:=pass_$(pass)_doit)
-$(foreach subdir,$(SUBDIRS_AFTER_$(PASS))      $(SUBDIRS_AFTER_$(PASS).$(BUILD_TARGET))   ,$(eval $(def_pass_subdir)))
-$(foreach makefile,$(MAKEFILES_AFTER_$(PASS))  $(MAKEFILES_AFTER_$(PASS).$(BUILD_TARGET)) ,$(eval $(def_pass_makefile)))
+$(foreach subdir,$(SUBDIRS_AFTER_$(PASS))      $(SUBDIRS_AFTER_$(PASS).$(BUILD_TARGET))     $(SUBDIRS_AFTER_$(PASS).$(BUILD_TARGET).$(BUILD_TARGET_ARCH))   ,$(eval $(def_pass_subdir)))
+$(foreach makefile,$(MAKEFILES_AFTER_$(PASS))  $(MAKEFILES_AFTER_$(PASS).$(BUILD_TARGET))   $(MAKEFILES_AFTER_$(PASS).$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) ,$(eval $(def_pass_makefile)))
 
 .NOTPARALLEL: pass_$(pass)_before pass_$(pass)_after
@@ -1637,18 +1800,18 @@
 
 define def_pass
-$(eval SUBDIRS_$(PASS)          ?= $(SUBDIRS)          $(SUBDIRS.$(BUILD_TARGET)))
-$(eval SUBDIRS_AFTER_$(PASS)    ?= $(SUBDIRS_AFTER)    $(SUBDIRS_AFTER.$(BUILD_TARGET)))
-$(eval MAKEFILES_BEFORE_$(PASS) ?= $(MAKEFILES_BEFORE) $(MAKEFILES_BEFORE.$(BUILD_TARGET)))
-$(eval MAKEFILES_AFTER_$(PASS)  ?= $(MAKEFILES_AFTER)  $(MAKEFILES_AFTER.$(BUILD_TARGET)))
+$(eval SUBDIRS_$(PASS)          ?= $(SUBDIRS)          $(SUBDIRS.$(BUILD_TARGET))          $(SUBDIRS.$(BUILD_TARGET.$(BUILD_TARGET_ARCH)))          )
+$(eval SUBDIRS_AFTER_$(PASS)    ?= $(SUBDIRS_AFTER)    $(SUBDIRS_AFTER.$(BUILD_TARGET))    $(SUBDIRS_AFTER.$(BUILD_TARGET).$(BUILD_TARGET_ARCH))    )
+$(eval MAKEFILES_BEFORE_$(PASS) ?= $(MAKEFILES_BEFORE) $(MAKEFILES_BEFORE.$(BUILD_TARGET)) $(MAKEFILES_BEFORE.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) )
+$(eval MAKEFILES_AFTER_$(PASS)  ?= $(MAKEFILES_AFTER)  $(MAKEFILES_AFTER.$(BUILD_TARGET))  $(MAKEFILES_AFTER.$(BUILD_TARGET).$(BUILD_TARGET_ARCH))  )
 
 $(eval tag:=_before)
 $(eval dep:=)
-$(foreach subdir,$(SUBDIRS_$(PASS))            $(SUBDIRS_$(PASS).$(BUILD_TARGET))         ,$(eval $(def_pass_subdir)))
-$(foreach makefile,$(MAKEFILES_BEFORE_$(PASS)) $(MAKEFILES_BEFORE_$(PASS).$(BUILD_TARGET)),$(eval $(def_pass_makefile)))
+$(foreach subdir,$(SUBDIRS_$(PASS))            $(SUBDIRS_$(PASS).$(BUILD_TARGET))          $(SUBDIRS_$(PASS).$(BUILD_TARGET).$(BUILD_TARGET_ARCH))         ,$(eval $(def_pass_subdir)))
+$(foreach makefile,$(MAKEFILES_BEFORE_$(PASS)) $(MAKEFILES_BEFORE_$(PASS).$(BUILD_TARGET)) $(MAKEFILES_BEFORE_$(PASS).$(BUILD_TARGET).$(BUILD_TARGET_ARCH)),$(eval $(def_pass_makefile)))
 
 $(eval tag:=_after)
 $(eval dep:=pass_$(pass)_doit)
-$(foreach subdir,$(SUBDIRS_AFTER_$(PASS))      $(SUBDIRS_AFTER_$(PASS).$(BUILD_TARGET))   ,$(eval $(def_pass_subdir)))
-$(foreach makefile,$(MAKEFILES_AFTER_$(PASS))  $(MAKEFILES_AFTER_$(PASS).$(BUILD_TARGET)) ,$(eval $(def_pass_makefile)))
+$(foreach subdir,$(SUBDIRS_AFTER_$(PASS))      $(SUBDIRS_AFTER_$(PASS).$(BUILD_TARGET))    $(SUBDIRS_AFTER_$(PASS).$(BUILD_TARGET).$(BUILD_TARGET_ARCH))   ,$(eval $(def_pass_subdir)))
+$(foreach makefile,$(MAKEFILES_AFTER_$(PASS))  $(MAKEFILES_AFTER_$(PASS).$(BUILD_TARGET))  $(MAKEFILES_AFTER_$(PASS).$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) ,$(eval $(def_pass_makefile)))
 
 ifdef KBUILD_SAFE_PARALLEL
