Index: trunk/kBuild/footer.kmk
===================================================================
--- trunk/kBuild/footer.kmk	(revision 829)
+++ trunk/kBuild/footer.kmk	(revision 830)
@@ -1763,5 +1763,5 @@
 definst := $(PATH_DLL)
 typevar := _DLLS
-mode    := 0755
+mode    := 0644
 bld_trg_base_var := TARGET
 $(foreach target, $(DLLS) $(DLLS.$(BUILD_TARGET)) $(DLLS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)), $(eval $(value def_link_common)))
@@ -1769,15 +1769,24 @@
 
 #
-# Process import libraries.
+# IMPORT LIBRARIES
 #
 #   - On OS/2 and windows these are libraries.
 #   - On other platforms they are fake DLLs.
+#
+EXTPRE  :=
+typevar := _IMPORT_LIBS
+mode    := 0644
+bld_trg_base_var := TARGET
 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)))
+ EXT     := LIB
+ tool_do := LINK_LIBRARY
+ definst := $(PATH_LIB)
+ $(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)) $(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)))))
+ EXT     := DLL
+ tool_do := LINK_DLL
+ definst := $(PATH_DLL)
+ $(foreach target, $(IMPORT_LIBS) $(IMPORT_LIBS.$(BUILD_TARGET)) $(IMPORT_LIBS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)), $(eval $(value def_link_common)))
+endif
 
 
@@ -1916,4 +1925,20 @@
 	$($(target)_GID.$(bld_trg)) \
 	$($(target)_GID))
+flags := \
+	$($(target)_IFFLAGS) \
+	$($(target)_IFFLAGS.$(bld_trg)) \
+	$($(target)_IFFLAGS.$(bld_trg).$(bld_trg_arch)) \
+	$($(srcdst)_IFFLAGS) \
+	$($(srcdst)_IFFLAGS.$(bld_trg)) \
+	$($(srcdst)_IFFLAGS.$(bld_trg).$(bld_trg_arch)) \
+	$($(srcsrc)_IFFLAGS) \
+	$($(srcsrc)_IFFLAGS.$(bld_trg)) \
+	$($(srcsrc)_IFFLAGS.$(bld_trg).$(bld_trg_arch)) \
+	$($(target)_$(srcdst)_IFFLAGS) \
+	$($(target)_$(srcdst)_IFFLAGS.$(bld_trg)) \
+	$($(target)_$(srcdst)_IFFLAGS.$(bld_trg).$(bld_trg_arch)) \
+	$($(target)_$(srcsrc)_IFFLAGS) \
+	$($(target)_$(srcsrc)_IFFLAGS.$(bld_trg)) \
+	$($(target)_$(srcsrc)_IFFLAGS.$(bld_trg).$(bld_trg_arch))
 
 
@@ -1925,15 +1950,14 @@
 # create the command
 ifdef $(srcsrc)_INSTALLER
- inscmd := $(call $(srcsrc)_INSTALLER,$(srcsrc),$(insdst),$(target))
+ inscmd := $(call $(srcsrc)_INSTALLER,$(srcsrc),$(insdst),$(target),$(flags))
+else ifdef $(target)_INSTALLER
+ inscmd := $(call $(target)_INSTALLER,$(srcsrc),$(insdst),$(target),$(flags))
 else
- ifdef $(target)_INSTALLER
-  inscmd := $(call $(target)_INSTALLER,$(srcsrc),$(insdst),$(target))
- else
-  inscmd := $$(INSTALL)\
+ inscmd := $$(INSTALL)\
 		$(if $(uid),-o $(uid))\
 		$(if $(gid),-g $(gid))\
 		$(if $(mode),-m $(mode))\
+		$(flags)\
 		$(srcsrc) $(insdst)
- endif
 endif
 
@@ -1966,5 +1990,5 @@
  instfun := $(symlnk)_INSTFUN
 else ifdef $(target)_INSTFUN
-instfun := $(target)_INSTFUN
+ instfun := $(target)_INSTFUN
 else
  instfun := _INSTALL_FILE
@@ -2000,4 +2024,5 @@
 		$(if $(gid),-g $(gid))\
 		$(if $(mode),-m $(mode))\
+		$(flags)\
 		$(insdst)
 
@@ -2048,4 +2073,14 @@
 	$($(target)_GID.$(bld_trg)) \
 	$($(target)_GID))
+flags := \
+	$($(target)_IDFLAGS)\
+	$($(target)_IDFLAGS.$(bld_trg)) \
+	$($(target)_IDFLAGS.$(bld_trg).$(bld_trg_arch)) \
+	$($(directory)_IDFLAGS) \
+	$($(directory)_IDFLAGS.$(bld_trg)) \
+	$($(directory)_IDFLAGS.$(bld_trg).$(bld_trg_arch)) \
+	$($(target)_$(directory)_IDFLAGS) \
+	$($(target)_$(directory)_IDFLAGS.$(bld_trg)) \
+	$($(target)_$(directory)_IDFLAGS.$(bld_trg).$(bld_trg_arch))
 
 insdst := $(inst)/$(directory)/
Index: trunk/kBuild/header.kmk
===================================================================
--- trunk/kBuild/header.kmk	(revision 829)
+++ trunk/kBuild/header.kmk	(revision 830)
@@ -565,4 +565,5 @@
 	RCFLAGS RCDEFS \
 	LDFLAGS \
+	IDFLAGS IFDLAGS ISFLAGS \
 	FETCHFLAGS UNPACKFLAGS PATCHFLAGS
 
