Index: /trunk/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk	(revision 22682)
+++ /trunk/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk	(revision 22683)
@@ -26,7 +26,9 @@
 # Target config.
 #
-LIBRARIES += \
-	VBoxGuestR0Lib \
-	VBoxGuestR0LibBase
+ifdef VBOX_WITH_ADDITION_DRIVERS
+ LIBRARIES += \
+ 	VBoxGuestR0Lib \
+ 	VBoxGuestR0LibBase
+endif
 LIBRARIES += \
 	VBoxGuestR3Lib \
@@ -34,11 +36,5 @@
 if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd)
  LIBRARIES += \
-  	VBoxGuestR3LibXFree86
-endif
-
-ifndef VBOX_WITH_ADDITION_DRIVERS
- if1of ($(KBUILD_TARGET), linux l4) # All drivers are optional, can skip RuntimeGuestR0.
-  LIBRARIES := $(filter-out VBoxGuestR0Lib VBoxGuestR0LibBase, $(LIBRARIES))
- endif
+ 	VBoxGuestR3LibXFree86
 endif
 
Index: /trunk/src/VBox/GuestHost/HGSMI/Makefile.kmk
===================================================================
--- /trunk/src/VBox/GuestHost/HGSMI/Makefile.kmk	(revision 22682)
+++ /trunk/src/VBox/GuestHost/HGSMI/Makefile.kmk	(revision 22683)
@@ -23,34 +23,22 @@
 include	$(KBUILD_PATH)/subheader.kmk
 
-#
-# HGSMIGuestR0Lib - for guest additions drivers
-#
-LIBRARIES += \
-	HGSMIGuestR0Lib
 
-#
-# HGSMIHostLib - for host devices (R3 only)
-#
-LIBRARIES += \
-	HGSMIHostR3Lib
-
-ifndef VBOX_WITH_ADDITION_DRIVERS
- if1of ($(KBUILD_TARGET), linux l4) # All drivers are optional, can skip HGSMIGuestR0Lib.
-  LIBRARIES := $(filter-out HGSMIGuestR0Lib, $(LIBRARIES))
- endif
-endif
 
 
 #
-# HGSMIGuestR0Lib
+# HGSMIGuestR0Lib - For guest additions drivers.
 #
+ifdef VBOX_WITH_ADDITION_DRIVERS
+LIBRARIES += HGSMIGuestR0Lib
 HGSMIGuestR0Lib_TEMPLATE     = VBOXGUESTR0LIB
 HGSMIGuestR0Lib_DEFS         =
 HGSMIGuestR0Lib_SOURCES      = \
 	HGSMICommon.cpp
+endif
 
 #
-# HGSMIHostR3Lib
+# HGSMIHostLib - For host devices (R3 only).
 #
+LIBRARIES += HGSMIHostR3Lib
 HGSMIHostR3Lib_TEMPLATE      = VBOXR3
 HGSMIHostR3Lib_DEFS          =
Index: /trunk/src/VBox/Runtime/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Runtime/Makefile.kmk	(revision 22682)
+++ /trunk/src/VBox/Runtime/Makefile.kmk	(revision 22683)
@@ -36,12 +36,10 @@
  # Only build the additions, sort out the legacy names first.
  #
- LIBRARIES += RuntimeGuestR0 RuntimeGuestR3 RuntimeGuestR3Shared RuntimeGuestR3Mini
- #LIBRARIES.os2 = RuntimeGuestR0OS2Warp3
+ LIBRARIES += RuntimeGuestR3 RuntimeGuestR3Shared RuntimeGuestR3Mini
+ ifdef VBOX_WITH_ADDITION_DRIVERS
+  LIBRARIES += RuntimeGuestR0
+ endif
+ #LIBRARIES.os2 += RuntimeGuestR0OS2Warp3
  LIBRARIES.win.x86 += RuntimeGuestR0NT4
- ifndef VBOX_WITH_ADDITION_DRIVERS
-  if1of ($(KBUILD_TARGET), linux l4) # All drivers are optional, can skip RuntimeGuestR0.
-   LIBRARIES := $(filter-out RuntimeGuestR0, $(LIBRARIES))
-  endif
- endif
 
 else ifdef VBOX_ONLY_DOCS
@@ -65,12 +63,10 @@
  endif
  ifdef VBOX_WITH_ADDITIONS
-  LIBRARIES += RuntimeGuestR0 RuntimeGuestR3 RuntimeGuestR3Shared RuntimeGuestR3Mini
+  LIBRARIES += RuntimeGuestR3 RuntimeGuestR3Shared RuntimeGuestR3Mini
+  ifdef VBOX_WITH_ADDITION_DRIVERS
+   LIBRARIES += RuntimeGuestR0
+  endif
   #LIBRARIES.os2 += RuntimeGuestR0OS2Warp3
   LIBRARIES.win.x86 += RuntimeGuestR0NT4
-  ifndef VBOX_WITH_ADDITION_DRIVERS
-   if1of ($(KBUILD_TARGET), linux l4) # All drivers are optional, can skip RuntimeGuestR0.
-    LIBRARIES := $(filter-out RuntimeGuestR0, $(LIBRARIES))
-   endif
-  endif
  endif # VBOX_WITH_ADDITIONS
  LIBRARIES.l4 += RuntimeR3L4 RuntimeLnxHostR3
