Index: trunk/src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk
===================================================================
--- trunk/src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk	(revision 92966)
+++ trunk/src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk	(revision 92967)
@@ -248,18 +248,25 @@
  WinNetConfigNonStatic_SOURCES  = win/cfg/VBoxNetCfg.cpp
 
- #
- # NetFltInstall
- #
- PROGRAMS.win  += NetFltInstall
- NetFltInstall_TEMPLATE = VBOXR3STATIC
- NetFltInstall_SDKS     = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
- NetFltInstall_SOURCES  = win/tools/VBoxNetFltInstall.cpp
- NetFltInstall_LIBS     = \
+
+ #
+ # Template for NetFltInstall and friends.
+ #
+ TEMPLATE_VBoxNetFltR3 = Template for NetFltInstall, NetFltUninstall, NetAdpInstall, NetAdpUninstall, ++
+ TEMPLATE_VBoxNetFltR3_EXTENDS  = VBOXR3STATIC
+ TEMPLATE_VBoxNetFltR3_SDKS     = $(TEMPLATE_VBOXR3STATIC_SDKS) ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL VBOX_WIN_NEWDEV
+ TEMPLATE_VBoxNetFltR3_CXXFLAGS = $(TEMPLATE_VBOXR3STATIC_CXXFLAGS) -Gz
+ TEMPLATE_VBoxNetFltR3_CFLAGS   = $(TEMPLATE_VBOXR3STATIC_CFLAGS) -Gz
+ TEMPLATE_VBoxNetFltR3_LIBS     = $(TEMPLATE_VBOXR3STATIC_LIBS) \
  	$(WinNetConfig_1_TARGET) \
 	$(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
- 	$(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
   	$(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
  	$(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
 
+ #
+ # NetFltInstall
+ #
+ PROGRAMS.win  += NetFltInstall
+ NetFltInstall_TEMPLATE = VBoxNetFltR3
+ NetFltInstall_SOURCES  = win/tools/VBoxNetFltInstall.cpp
 
  #
@@ -267,13 +274,6 @@
  #
  PROGRAMS.win  += NetFltUninstall
- NetFltUninstall_TEMPLATE = VBOXR3STATIC
- NetFltUninstall_SDKS     = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
+ NetFltUninstall_TEMPLATE = VBoxNetFltR3
  NetFltUninstall_SOURCES  = win/tools/VBoxNetFltUninstall.cpp
- NetFltUninstall_LIBS     = \
- 	$(WinNetConfig_1_TARGET) \
-	$(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
- 	$(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
-  	$(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
- 	$(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
 
  #
@@ -281,14 +281,6 @@
  #
  PROGRAMS.win  += NetAdpInstall
- NetAdpInstall_TEMPLATE = VBOXR3STATIC
- NetAdpInstall_SDKS     = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
+ NetAdpInstall_TEMPLATE = VBoxNetFltR3
  NetAdpInstall_SOURCES  = win/tools/VBoxNetAdpInstall.cpp
- NetAdpInstall_LIBS     = \
- 	$(WinNetConfig_1_TARGET) \
-	$(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
- 	$(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
-  	$(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
- 	$(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
-
 
  #
@@ -296,13 +288,6 @@
  #
  PROGRAMS.win  += NetAdpUninstall
- NetAdpUninstall_TEMPLATE = VBOXR3STATIC
- NetAdpUninstall_SDKS     = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
+ NetAdpUninstall_TEMPLATE = VBoxNetFltR3
  NetAdpUninstall_SOURCES  = win/tools/VBoxNetAdpUninstall.cpp
- NetAdpUninstall_LIBS     = \
- 	$(WinNetConfig_1_TARGET) \
-	$(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
- 	$(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
-  	$(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
- 	$(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
 
  #
@@ -310,15 +295,7 @@
  #
  PROGRAMS.win  += NetAdp6Install
- NetAdp6Install_TEMPLATE = VBOXR3STATIC
- NetAdp6Install_SDKS     = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
+ NetAdp6Install_TEMPLATE = VBoxNetFltR3
  NetAdp6Install_SOURCES  = win/tools/VBoxNetAdpInstall.cpp
- NetAdp6Install_DEFS    += NDIS60=1
- NetAdp6Install_LIBS     = \
- 	$(WinNetConfig_1_TARGET) \
-	$(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
- 	$(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
-  	$(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
- 	$(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
-
+ NetAdp6Install_DEFS     = NDIS60=1
 
  #
@@ -326,14 +303,7 @@
  #
  PROGRAMS.win  += NetAdp6Uninstall
- NetAdp6Uninstall_TEMPLATE = VBOXR3STATIC
- NetAdp6Uninstall_SDKS     = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
+ NetAdp6Uninstall_TEMPLATE = VBoxNetFltR3
  NetAdp6Uninstall_SOURCES  = win/tools/VBoxNetAdpUninstall.cpp
- NetAdp6Uninstall_DEFS    += NDIS60=1
- NetAdp6Uninstall_LIBS     = \
- 	$(WinNetConfig_1_TARGET) \
-	$(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
- 	$(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
-  	$(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
- 	$(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
+ NetAdp6Uninstall_DEFS     = NDIS60=1
 
  #
@@ -341,14 +311,6 @@
  #
  PROGRAMS.win  += NetLwfInstall
- NetLwfInstall_TEMPLATE = VBOXR3STATIC
- NetLwfInstall_SDKS     = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
+ NetLwfInstall_TEMPLATE = VBoxNetFltR3
  NetLwfInstall_SOURCES  = win/tools/VBoxNetLwfInstall.cpp
- NetLwfInstall_LIBS     = \
- 	$(WinNetConfig_1_TARGET) \
-	$(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
- 	$(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
-  	$(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
- 	$(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
-
 
  #
@@ -356,13 +318,6 @@
  #
  PROGRAMS.win  += NetLwfUninstall
- NetLwfUninstall_TEMPLATE = VBOXR3STATIC
- NetLwfUninstall_SDKS     = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
+ NetLwfUninstall_TEMPLATE = VBoxNetFltR3
  NetLwfUninstall_SOURCES  = win/tools/VBoxNetLwfUninstall.cpp
- NetLwfUninstall_LIBS     = \
- 	$(WinNetConfig_1_TARGET) \
-	$(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
- 	$(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
-  	$(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
- 	$(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
 
  #
