Index: trunk/src/VBox/Devices/Graphics/BIOS/Makefile
===================================================================
--- trunk/src/VBox/Devices/Graphics/BIOS/Makefile	(revision 2477)
+++ 	(revision )
@@ -1,91 +1,0 @@
-#
-# VGA BIOS Makefile
-#
-
-#
-# Copyright (C) 2006 InnoTek Systemberatung GmbH
-#
-# This file is part of VirtualBox Open Source Edition (OSE), as
-# available from http://www.virtualbox.org. This file is free software;
-# you can redistribute it and/or modify it under the terms of the GNU
-# General Public License as published by the Free Software Foundation,
-# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
-# distribution. VirtualBox OSE is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY of any kind.
-#
-# If you received this file as part of a commercial VirtualBox
-# distribution, then only the terms of your commercial VirtualBox
-# license agreement apply instead of the previous paragraph.
-#
-
-DEPTH = ../../../../..
-include	$(PATH_KBUILD)/header.kmk
-
-BLDPROGS    = biossums
-LIBRARIES   = VgaBiosBin
-OTHERS      = $(PATH_TARGET)/vgabios.bin
-OTHER_CLEAN = \
-	$(PATH_TARGET)/_vgabios_.c \
-	$(PATH_TARGET)/vgabios0.s \
-	$(PATH_TARGET)/vgabios1.s \
-	$(PATH_TARGET)/vgabios.tmp \
-	$(PATH_TARGET)/vgabios.lst \
-	$(PATH_TARGET)/vgabios.bin \
-	$(PATH_TARGET)/VgaBiosBin.c \
-	\
-	$(PATH_TARGET)/_vgabios-cirrus_.c \
-	$(PATH_TARGET)/vgabios-cirrus0.s \
-	$(PATH_TARGET)/vgabios-cirrus1.s \
-	$(PATH_TARGET)/vgabios-cirrus.tmp \
-	$(PATH_TARGET)/vgabios-cirrus.lst \
-	$(PATH_TARGET)/vgabios-cirrus.bin
-
-biossums_TEMPLATE   = VBOXBLDPROG
-biossums_SOURCES    = biossums.c
-
-VgaBiosBin_TEMPLATE = VBOXR3
-VgaBiosBin_DEFS     = IN_VBOXDD2
-VgaBiosBin_INCS     = ../..
-VgaBiosBin_SOURCES  = $(PATH_TARGET)/VgaBiosBin.c
-
-
-include	$(PATH_KBUILD)/footer.kmk
-
-
-#
-# Rule for making the bios.
-#
-$(PATH_TARGET)/VgaBiosBin.c: $(PATH_TARGET)/vgabios.bin $(VBOX_BIN2C)
-	$(call MSG_TOOL,bin2c,VgaBiosBin,$<,$@)
-	$(QUIET)$(VBOX_BIN2C) -min 32 -max 64 -mask 0x0fff -ascii -export VgaBiosBinary $< $@
-
-#
-# vgabios
-#
-
-# 1. precompile
-$(PATH_TARGET)/_vgabios_.c: vgabios.c vgabios.h vbe.h vgatables.h vgafonts.h vbe.c clext.c
-	$(call MSG_TOOL,cpp,VgaBiosBin,$<,$@)
-	$(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -DVBOX -DVBOX_VERSION_STRING=\"$(VBOX_VERSION_STRING)\" -E -P $< -DVBE -DVGABIOS_DATE="''" $(addprefix -D,$(DEFS) $(DEFS.$(BUILD_TYPE))) > $@
-
-# 2. compile
-$(PATH_TARGET)/vgabios0.s: $(PATH_TARGET)/_vgabios_.c
-	$(call MSG_COMPILE,VgaBiosBin,$<,$@,C)
-	$(QUIET)$(VBOX_BCC) -o $@ -C-c -D__i86__ -0 -S $^
-
-# 3. preprocess intermediate assembly.
-$(PATH_TARGET)/vgabios1.s: $(PATH_TARGET)/vgabios0.s
-	$(call MSG_TOOL,Adjusting BCC Assembly,VgaBiosBin,$<,$@)
-	$(QUIET)$(SED) -e 's/^\.text//' -e 's/^\.data//' $^ > $@
-
-# 4. assemble
-$(PATH_TARGET)/vgabios.tmp $(PATH_TARGET)/vgabios.lst: $(PATH_TARGET)/vgabios1.s
-	$(call MSG_COMPILE,VgaBiosBin,$<,$@,AS)
-	$(QUIET)$(VBOX_AS86) -b $(PATH_TARGET)/vgabios.tmp -u- -w- -g -0 -j -O -l $(PATH_TARGET)/vgabios.lst < $^
-
-# 5. checksums
-$(PATH_TARGET)/vgabios.bin: $(PATH_TARGET)/vgabios.tmp $(TARGET_biossums)
-	$(call MSG_TOOL,biossums,VgaBiosBin,$<,$@)
-	$(QUIET)$(CP) -f $(PATH_TARGET)/vgabios.tmp $@
-	$(QUIET)$(TARGET_biossums) $@
-
Index: trunk/src/VBox/Devices/Graphics/BIOS/Makefile.kmk
===================================================================
--- trunk/src/VBox/Devices/Graphics/BIOS/Makefile.kmk	(revision 2478)
+++ trunk/src/VBox/Devices/Graphics/BIOS/Makefile.kmk	(revision 2478)
@@ -0,0 +1,92 @@
+# $Id$
+## @file
+# VGA BIOS Makefile
+#
+
+#
+# Copyright (C) 2006 InnoTek Systemberatung GmbH
+#
+# This file is part of VirtualBox Open Source Edition (OSE), as
+# available from http://www.virtualbox.org. This file is free software;
+# you can redistribute it and/or modify it under the terms of the GNU
+# General Public License as published by the Free Software Foundation,
+# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
+# distribution. VirtualBox OSE is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY of any kind.
+#
+# If you received this file as part of a commercial VirtualBox
+# distribution, then only the terms of your commercial VirtualBox
+# license agreement apply instead of the previous paragraph.
+#
+
+DEPTH = ../../../../..
+include	$(PATH_KBUILD)/header.kmk
+
+BLDPROGS    = biossums
+LIBRARIES   = VgaBiosBin
+OTHERS      = $(PATH_TARGET)/vgabios.bin
+OTHER_CLEAN = \
+	$(PATH_TARGET)/_vgabios_.c \
+	$(PATH_TARGET)/vgabios0.s \
+	$(PATH_TARGET)/vgabios1.s \
+	$(PATH_TARGET)/vgabios.tmp \
+	$(PATH_TARGET)/vgabios.lst \
+	$(PATH_TARGET)/vgabios.bin \
+	$(PATH_TARGET)/VgaBiosBin.c \
+	\
+	$(PATH_TARGET)/_vgabios-cirrus_.c \
+	$(PATH_TARGET)/vgabios-cirrus0.s \
+	$(PATH_TARGET)/vgabios-cirrus1.s \
+	$(PATH_TARGET)/vgabios-cirrus.tmp \
+	$(PATH_TARGET)/vgabios-cirrus.lst \
+	$(PATH_TARGET)/vgabios-cirrus.bin
+
+biossums_TEMPLATE   = VBOXBLDPROG
+biossums_SOURCES    = biossums.c
+
+VgaBiosBin_TEMPLATE = VBOXR3
+VgaBiosBin_DEFS     = IN_VBOXDD2
+VgaBiosBin_INCS     = ../..
+VgaBiosBin_SOURCES  = $(PATH_TARGET)/VgaBiosBin.c
+
+
+include	$(PATH_KBUILD)/footer.kmk
+
+
+#
+# Rule for making the bios.
+#
+$(PATH_TARGET)/VgaBiosBin.c: $(PATH_TARGET)/vgabios.bin $(VBOX_BIN2C)
+	$(call MSG_TOOL,bin2c,VgaBiosBin,$<,$@)
+	$(QUIET)$(VBOX_BIN2C) -min 32 -max 64 -mask 0x0fff -ascii -export VgaBiosBinary $< $@
+
+#
+# vgabios
+#
+
+# 1. precompile
+$(PATH_TARGET)/_vgabios_.c: vgabios.c vgabios.h vbe.h vgatables.h vgafonts.h vbe.c clext.c
+	$(call MSG_TOOL,cpp,VgaBiosBin,$<,$@)
+	$(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -DVBOX -DVBOX_VERSION_STRING=\"$(VBOX_VERSION_STRING)\" -E -P $< -DVBE -DVGABIOS_DATE="''" $(addprefix -D,$(DEFS) $(DEFS.$(BUILD_TYPE))) > $@
+
+# 2. compile
+$(PATH_TARGET)/vgabios0.s: $(PATH_TARGET)/_vgabios_.c
+	$(call MSG_COMPILE,VgaBiosBin,$<,$@,C)
+	$(QUIET)$(VBOX_BCC) -o $@ -C-c -D__i86__ -0 -S $^
+
+# 3. preprocess intermediate assembly.
+$(PATH_TARGET)/vgabios1.s: $(PATH_TARGET)/vgabios0.s
+	$(call MSG_TOOL,Adjusting BCC Assembly,VgaBiosBin,$<,$@)
+	$(QUIET)$(SED) -e 's/^\.text//' -e 's/^\.data//' $^ > $@
+
+# 4. assemble
+$(PATH_TARGET)/vgabios.tmp $(PATH_TARGET)/vgabios.lst: $(PATH_TARGET)/vgabios1.s
+	$(call MSG_COMPILE,VgaBiosBin,$<,$@,AS)
+	$(QUIET)$(VBOX_AS86) -b $(PATH_TARGET)/vgabios.tmp -u- -w- -g -0 -j -O -l $(PATH_TARGET)/vgabios.lst < $^
+
+# 5. checksums
+$(PATH_TARGET)/vgabios.bin: $(PATH_TARGET)/vgabios.tmp $(TARGET_biossums)
+	$(call MSG_TOOL,biossums,VgaBiosBin,$<,$@)
+	$(QUIET)$(CP) -f $(PATH_TARGET)/vgabios.tmp $@
+	$(QUIET)$(TARGET_biossums) $@
+
Index: trunk/src/VBox/Devices/Makefile
===================================================================
--- trunk/src/VBox/Devices/Makefile	(revision 2477)
+++ 	(revision )
@@ -1,517 +1,0 @@
-#
-# Makefile for the devices, drivers and services.
-#
-
-#
-# Copyright (C) 2006 InnoTek Systemberatung GmbH
-#
-# This file is part of VirtualBox Open Source Edition (OSE), as
-# available from http://www.virtualbox.org. This file is free software;
-# you can redistribute it and/or modify it under the terms of the GNU
-# General Public License as published by the Free Software Foundation,
-# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
-# distribution. VirtualBox OSE is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY of any kind.
-#
-# If you received this file as part of a commercial VirtualBox
-# distribution, then only the terms of your commercial VirtualBox
-# license agreement apply instead of the previous paragraph.
-#
-
-DEPTH = ../../..
-include $(PATH_KBUILD)/header.kmk
-
-ifdef VBOX_WITH_TESTCASES
- PROGRAMS = tstIntNetR0
-endif
-LIBRARIES = DevicesR3 Drivers ServicesR0
-DLLS      = VBoxDDU VBoxDD VBoxDD2
-SYSMODS   = VBoxDDGC VBoxDD2GC VBoxDDR0 VBoxDD2R0
-
-OTHER_CLEAN = \
-	$(PATH_TARGET)/vboxaml.hex \
-	$(PATH_TARGET)/vboxaml.aml
-
-SUBDIRS   = \
-	testcase \
-	PC/BIOS \
-	PC/Etherboot-src \
-	Graphics/BIOS
-SUBDIRS_AFTER = \
-	Storage/testcase
-
-
-#
-# Check for VBOX_* stuff which governs defines.
-#
-ifdef VBOX_USE_IOAPIC
- DEFS += USE_IOAPIC
-endif
-ifdef VBOX_WITH_VRDP
- DEFS += VBOX_VRDP
-endif
-ifdef VBOX_WITH_INTERNAL_NETWORKING
- DEFS += VBOX_WITH_INTERNAL_NETWORKING
-endif
-
-# enable the pdm lock.
-#DEFS += VBOX_WITH_PDM_LOCK
-
-
-#
-# VBoxDDU (shared object)
-#
-VBoxDDU_TEMPLATE         = VBOXR3
-VBoxDDU_DEFS             = IN_VBOXDDU
-ifdef VBOX_WITH_USB
- VBoxDDU_DEFS.win        = VBOX_WITH_USB
- VBoxDDU_SDKS.win        = WINPSDK W2K3DDK
- VBoxDDU_SOURCES.win     = \
-	USB/win32/USBLib-win32.cpp
-else
- VBoxDDU_SDKS.win         = WINPSDK
-endif
-VBoxDDU_SOURCES          = \
-	Storage/VBoxHDD-new.cpp \
-	Storage/VDICore.cpp \
-	Storage/VmdkHDDCore.cpp
-VBoxDDU_LIBS             = \
-	$(LIB_RUNTIME)
-ifeq ($(BUILD_TARGET),l4)
- VBoxDDU_LIBS           += \
-	$(L4_LIBDIR)/libl4sys.p.a
-endif
-VBoxDDU_LDFLAGS.darwin   = -install_name @executable_path/VBoxDDU.dylib
-VBoxDDU_LDFLAGS.linux    = -Wl,--no-undefined
-VBoxDDU_LDFLAGS.l4       = -Wl,--no-undefined
-
-
-#
-# VBoxDD (shared object)
-#
-VBoxDD_TEMPLATE         = VBOXR3
-VBoxDD_SDKS.win         = WINPSDK DXSDK W2K3DDK VBOX_NTDLL
-VBoxDD_SOURCES          = \
-	Builtins.cpp
-VBoxDD_DEFS             = VBOX_ACPI
-ifdef VBOX_WITH_USB
- VBoxDD_DEFS           += VBOX_WITH_USB IN_USB_R3
-endif
-ifdef VBOX_WITH_ISCSI
- VBoxDD_DEFS           += VBOX_WITH_ISCSI
-endif
-VBoxDD_LIBS             = \
-	$(PATH_LIB)/DevicesR3$(VBOX_SUFF_LIB) \
-	$(PATH_LIB)/Drivers$(VBOX_SUFF_LIB) \
-	$(PATH_LIB)/PcDefBiosLogo$(VBOX_SUFF_LIB) \
-	$(LIB_VMM) \
-	$(LIB_RUNTIME)
-ifeq ($(BUILD_TARGET),win)
- VBoxDD_LIBS           += \
-	$(PATH_LIB)/VBoxDDU.lib \
-	$(PATH_LIB)/VBoxDD2.lib \
-	$(PATH_SDK_DXSDK_LIB)/dxguid.lib
-else
- VBoxDD_LIBS           += \
-	$(INSTARGET_VBoxDDU) \
-	$(INSTARGET_VBoxDD2)
-endif
-ifeq ($(BUILD_TARGET),l4)
- VBoxDD_LIBS           += \
-	$(L4_LIBDIR)/libl4sys.p.a
-endif
-VBoxDD_LIBS.darwin      = \
-	$(LIB_REM)
-VBoxDD_LDFLAGS.darwin   = -install_name @executable_path/VBoxDD.dylib \
-	-framework CoreAudio \
-	-framework IOKit \
-	-framework Carbon \
-	-framework DiskArbitration
-VBoxDD_LDFLAGS.linux    = -Wl,--no-undefined
-VBoxDD_LDFLAGS.l4       = -Wl,--no-undefined
-
-
-# damn, fix this.
-ifeq ($(BUILD_TARGET),win)
-$(PATH_LIB)/VBoxDD2.lib: $(PATH_BIN)/VBoxDD2.dll
-$(PATH_LIB)/VBoxDDU.lib: $(PATH_BIN)/VBoxDDU.dll
-endif
-
-
-#
-# VBoxDD2 (shared object)
-#
-VBoxDD2_TEMPLATE        = VBOXR3
-VBoxDD2_DEFS            = IN_VBOXDD2
-VBoxDD2_SOURCES         = \
-	Builtins2.cpp \
-	PC/DevAPIC.cpp
-VBoxDD2_LIBS            = \
-	$(PATH_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
-	$(PATH_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
-	$(PATH_LIB)/NetBiosBin$(VBOX_SUFF_LIB) \
-	$(LIB_VMM) \
-	$(LIB_RUNTIME)
-ifeq ($(BUILD_TARGET),l4)
-VBoxDD2_LIBS           += \
-	$(L4_LIBDIR)/libl4sys.p.a
-endif
-VBoxDD2_LIBS.darwin    += $(LIB_REM)
-VBoxDD2_LDFLAGS.darwin  = -install_name @executable_path/VBoxDD2.dylib
-VBoxDD2_LDFLAGS.linux   = -Wl,--no-undefined
-VBoxDD2_LDFLAGS.l4      = -Wl,--no-undefined
-
-
-#
-# DevicesR3 (library)
-#
-DevicesR3_TEMPLATE      = VBOXR3
-DevicesR3_SDKS.win      = WINPSDK W2K3DDK
-DevicesR3_INCS          = \
-	$(PATH_CURRENT)
-DevicesR3_SOURCES       = \
-	Input/DevPS2.cpp \
-	Bus/DevPCI.cpp \
-	Graphics/DevVGA.cpp \
-	Storage/DevATA.cpp \
-	PC/DevPit-i8254.cpp \
-	PC/DevPIC.cpp \
-	PC/DevACPI.cpp \
-	PC/DevRTC.cpp \
-	PC/DevPcBios.cpp \
-	PC/DevPcArch.c \
-	VMMDev/VBoxDev.cpp \
-	VMMDev/VMMDevHGCM.cpp \
-	Network/DevPCNet.cpp \
-	Audio/DevIchAc97.cpp \
-	PC/DevDMA.cpp \
-	Storage/fdc.c \
-	Serial/DevSerial.cpp
-
-ifeq (0,1)
-DevicesR3_SOURCES += \
-	Network/ne2000.c
-endif
-
-ifdef VBOX_WITH_USB
-DevicesR3_DEFS         += VBOX_WITH_USB IN_USB_R3
-DevicesR3_SOURCES      += \
-	USB/DevOHCI.cpp
-endif
-
-DevicesR3_DEFS         += VBOX_HGCM
-DevicesR3_DEFS.linux   += _GNU_SOURCE
-DevicesR3_DEFS.l4      += _GNU_SOURCE
-
-
-# DevACPI.cpp needs vboxaml.hex which we generate from PC/vbox.dsl.
-PC/DevACPI.cpp_DEPS     = $(PATH_TARGET)/vboxaml.hex
-PC/DevACPI.cpp_INCS     = $(PATH_TARGET)
-Bus/DevPCI.cpp_INCS     = Bus
-
-
-#
-# VBoxDDGC (sysmod)
-#
-VBoxDDGC_TEMPLATE       = VBOXGC
-VBoxDDGC_DEFS           =
-VBoxDDGC_SYSSUFF        = .gc
-VBoxDDGC_INCS           = \
-	$(PATH_CURRENT)
-VBoxDDGC_SOURCES        = \
-	Bus/DevPCI.cpp \
-	Graphics/DevVGA.cpp \
-	Input/DevPS2.cpp \
-	PC/DevACPI.cpp \
-	PC/DevPit-i8254.cpp \
-	PC/DevPIC.cpp \
-	PC/DevRTC.cpp \
-	Storage/DevATA.cpp \
-	Network/DevPCNet.cpp \
-	Serial/DevSerial.cpp
-
-ifdef VBOX_WITH_USB
-VBoxDDGC_DEFS          += VBOX_WITH_USB IN_USB_GC
-VBoxDDGC_SOURCES       += \
-	USB/DevOHCI.cpp
-endif
-
-ifeq ($(VBOX_LDR_FMT32),pe)
-VBoxDDGC_LDFLAGS        = -Entry:vgaMMIOWrite
-endif
-ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
-VBoxDDGC_LIBS           = \
-	$(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
-	$(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
-endif
-
-
-#
-# VBoxDDR0 (sysmod)
-#
-VBoxDDR0_TEMPLATE       = VBOXR0
-VBoxDDR0_SYSSUFF        = .r0
-VBoxDDR0_DEFS           = IN_RT_R0
-VBoxDDR0_INCS           = \
-	$(PATH_CURRENT)
-VBoxDDR0_SOURCES        = \
-	Bus/DevPCI.cpp \
-	Graphics/DevVGA.cpp \
-	Input/DevPS2.cpp \
-	PC/DevACPI.cpp \
-	PC/DevPit-i8254.cpp \
-	PC/DevPIC.cpp \
-	PC/DevRTC.cpp \
-	Storage/DevATA.cpp \
-	Network/DevPCNet.cpp \
-	Serial/DevSerial.cpp
-
-ifdef VBOX_WITH_USB
-VBoxDDR0_DEFS          += VBOX_WITH_USB IN_USB_R0
-VBoxDDR0_SOURCES       += \
-	USB/DevOHCI.cpp
-endif
-
-ifeq ($(VBOX_LDR_FMT32),pe)
-VBoxDDR0_LDFLAGS        = -Entry:vgaMMIOWrite
-endif
-ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
-VBoxDDR0_LIBS           = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
-endif
-VBoxDDR0_LIBS          += $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
-ifeq ($(VBOX_LDR_FMT32),elf) # this is template stuff!
-VBoxDDR0_LIBS          += $(VBOX_GCC_LIBGCC)
-endif
-
-
-#
-# VBoxDD2GC (LGPL sysmod)
-#
-VBoxDD2GC_TEMPLATE       = VBOXGC
-VBoxDD2GC_DEFS           =
-VBoxDD2GC_SYSSUFF        = .gc
-VBoxDD2GC_INCS           = \
-	$(PATH_CURRENT)
-VBoxDD2GC_SOURCES        = \
-	PC/DevAPIC.cpp
-ifeq ($(VBOX_LDR_FMT32),pe)
-VBoxDD2GC_LDFLAGS        = -Entry:apicMMIOWrite
-endif
-ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
-VBoxDD2GC_LIBS           = \
-	$(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
-	$(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
-endif
-
-
-#
-# VBoxDD2R0 (LGPL sysmod)
-#
-VBoxDD2R0_TEMPLATE       = VBOXR0
-VBoxDD2R0_DEFS           = IN_RT_R0
-VBoxDD2R0_SYSSUFF        = .r0
-VBoxDD2R0_INCS           = \
-	$(PATH_CURRENT)
-VBoxDD2R0_SOURCES        = \
-        PC/DevAPIC.cpp
-ifeq ($(VBOX_LDR_FMT),pe)
-VBoxDD2R0_LDFLAGS        = -Entry:apicMMIOWrite
-endif
-ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
-VBoxDD2R0_LIBS           = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
-endif
-VBoxDD2R0_LIBS          += $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
-ifeq ($(VBOX_LDR_FMT),elf)
-VBoxDD2R0_LIBS          += $(VBOX_GCC_LIBGCC)
-endif
-
-
-#
-# Drivers (library)
-#
-ifeq ($(BUILD_TARGET),l4) # We are using real Linux headers, not the cleaned up user space ones
-Drivers_TEMPLATE   = VBOXR3NP
-else
-Drivers_TEMPLATE   = VBOXR3
-endif
-Drivers_SDKS.win   = WINPSDK W2K3DDK
-Storage/DrvHostDVD.cpp_SDKS.win = W2K3DDK
-Drivers_DEFS       = IN_IDE_R3
-Drivers_INCS       = \
-	Network/slirp
-Drivers_SOURCES    = \
-	Audio/audio.c \
-	Audio/audiosniffer.c \
-	Audio/mixeng.c \
-	Audio/noaudio.c \
-	Input/DrvKeyboardQueue.cpp \
-	Input/DrvMouseQueue.cpp \
-	Network/DrvIntNet.cpp \
-	Network/DrvNAT.cpp \
-	Network/DrvNetSniffer.cpp \
-	Network/slirp/bootp.c \
-	Network/slirp/cksum.c \
-	Network/slirp/debug.c \
-	Network/slirp/if.c \
-	Network/slirp/ip_icmp.c \
-	Network/slirp/ip_input.c \
-	Network/slirp/ip_output.c \
-	Network/slirp/mbuf.c \
-	Network/slirp/misc.c \
-	Network/slirp/sbuf.c \
-	Network/slirp/slirp.c \
-	Network/slirp/socket.c \
-	Network/slirp/tcp_input.c \
-	Network/slirp/tcp_output.c \
-	Network/slirp/tcp_subr.c \
-	Network/slirp/tcp_timer.c \
-	Network/slirp/tftp.c \
-	Network/slirp/udp.c \
-	PC/DrvACPI.cpp \
-	Serial/DrvChar.cpp \
-	Serial/DrvNamedPipe.cpp \
-	Storage/DrvBlock.cpp \
-	Storage/DrvHostBase.cpp \
-	Storage/DrvHostDVD.cpp \
-	Storage/DrvHostFloppy.cpp \
-	Storage/DrvHostRawDisk.cpp \
-	Storage/DrvMediaISO.cpp \
-	Storage/DrvRawImage.cpp \
-	Storage/DrvVD.cpp \
-	Storage/DrvVmdk.cpp \
-	Storage/VBoxHDD.cpp
-
-# -- OS specific --
-
-ifeq ($(BUILD_TARGET),darwin)
-Drivers_SOURCES      := $(filter-out \
-	Storage/DrvHostRaw% \
-	Storage/DrvHostFloppy% \
-	, $(Drivers_SOURCES)) \
-	Audio/coreaudio.c
-Drivers_SOURCES.darwin =
-endif # darwin
-
-ifeq ($(BUILD_TARGET),freebsd)
-Drivers_SOURCES      := $(filter-out \
-	Storage/DrvHost% \
-	, $(Drivers_SOURCES))
-Drivers_SOURCES.freebsd =
-endif # freebsd
-
-
-ifeq ($(BUILD_TARGET),l4)
-Drivers_SOURCES       = \
-	Input/DrvMouseQueue.cpp \
-	Input/DrvKeyboardQueue.cpp \
-	Storage/VBoxHDD.cpp \
-	Storage/DrvBlock.cpp \
-	Storage/DrvMediaISO.cpp \
-	Storage/DrvRawImage.cpp \
-	Storage/DrvHostBase.cpp \
-	Storage/DrvHostDVD.cpp \
-	Storage/DrvVD.cpp \
-	PC/DrvACPI.cpp \
-	Network/DrvIntNet.cpp \
-	Network/DrvNetSniffer.cpp \
-	Audio/audio.c \
-	Audio/mixeng.c \
-	Audio/noaudio.c \
-	Audio/audiosniffer.c
-
-Drivers_SOURCES.l4    = \
-	Network/DrvTAP.cpp \
-	Audio/ossaudio.c
-endif # l4
-
-Drivers_SOURCES.linux = \
-	Network/DrvTAP.cpp \
-	Audio/ossaudio.c
-
-ifeq ($(BUILD_TARGET),os2)
-Drivers_SOURCES      := $(filter-out \
-	Storage/DrvHost% \
-	, $(Drivers_SOURCES))
-Drivers_SOURCES.os2   =
-endif
-
-Drivers_SOURCES.win   = \
-	Network/DrvTAPWin32.cpp \
-	Audio/dsoundaudio.c
-
-
-# -- features --
-
-ifdef VBOX_WITH_ISCSI
- Drivers_SOURCES      += \
-	Storage/DrvISCSI.cpp \
-	Storage/DrvISCSITransportTCP.cpp
- Drivers_DEFS         += VBOX_WITH_ISCSI
-endif # VBOX_WITH_ISCSI
-
-ifdef VBOX_WITH_ALSA
- Drivers_DEFS.linux   += VBOX_WITH_ALSA
- Drivers_SOURCES.linux+= \
-	Audio/alsaaudio.c
- VBoxDD_LIBS.linux    += asound
-endif
-
-ifdef VBOX_WITH_USB
- Drivers_DEFS         += VBOX_WITH_USB IN_USB_R3
- Drivers_SOURCES      += \
-	USB/DrvVUSBRootHub.cpp \
-	USB/VUSBDevice.cpp \
-	USB/VUSBUrb.cpp
- ifdef VBOX_WITH_VRDP
-  Drivers_SOURCES     += \
-	USB/vrdp/USBProxyDevice-vrdp.cpp
- endif
-
- Drivers_DEFS.linux   += VUSB_HAVE_USBPROXY_DEVICE
- ifdef VBOX_WITHOUT_LINUX_COMPILER_H
-  Drivers_DEFS.linux  += VBOX_WITHOUT_LINUX_COMPILER_H
- endif
- Drivers_SOURCES.linux+= \
-	USB/USBProxyDevice.cpp \
-	USB/linux/USBProxyDevice-linux.cpp
-
- Drivers_DEFS.l4      += VUSB_HAVE_USBPROXY_DEVICE
- Drivers_SOURCES.l4   += \
-	USB/USBProxyDevice.cpp \
-	USB/linux/USBProxyDevice-linux.cpp
-
- Drivers_DEFS.win     += VUSB_HAVE_USBPROXY_DEVICE
- Drivers_SOURCES.win  += \
-	USB/USBProxyDevice.cpp \
-	USB/win32/USBProxyDevice-win32.cpp
-endif # VBOX_WITH_USB
-
-
-
-#
-# Ring-0 Services (library, linked into VMMR0.r0)
-#
-ServicesR0_TEMPLATE  = VBOXR0
-ServicesR0_DEFS      = IN_INTNET_R0 IN_RT_R0
-ServicesR0_SOURCES   = \
-	Network/SrvIntNetR0.cpp
-
-#
-# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
-#
-tstIntNetR0_TEMPLATE    = VBOXR3TSTEXE
-tstIntNetR0_DEFS        = IN_INTNET_R0
-tstIntNetR0_SOURCES     = \
-	Network/testcase/tstIntNetR0.cpp
-tstIntNetR0_LIBS        = \
-	$(LIB_RUNTIME)
-
-
-include $(PATH_KBUILD)/footer.kmk
-
-
-# ACPI DSL generation
-$(PATH_TARGET)/vboxaml.hex: PC/vbox.dsl
-	$(call MSG_TOOL,iasl,DevACPI,$<,$@)
-	$(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
-
Index: trunk/src/VBox/Devices/Makefile.kmk
===================================================================
--- trunk/src/VBox/Devices/Makefile.kmk	(revision 2478)
+++ trunk/src/VBox/Devices/Makefile.kmk	(revision 2478)
@@ -0,0 +1,518 @@
+# $Id$
+## @file
+# Makefile for the devices, drivers and services.
+#
+
+#
+# Copyright (C) 2006 InnoTek Systemberatung GmbH
+#
+# This file is part of VirtualBox Open Source Edition (OSE), as
+# available from http://www.virtualbox.org. This file is free software;
+# you can redistribute it and/or modify it under the terms of the GNU
+# General Public License as published by the Free Software Foundation,
+# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
+# distribution. VirtualBox OSE is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY of any kind.
+#
+# If you received this file as part of a commercial VirtualBox
+# distribution, then only the terms of your commercial VirtualBox
+# license agreement apply instead of the previous paragraph.
+#
+
+DEPTH = ../../..
+include $(PATH_KBUILD)/header.kmk
+
+ifdef VBOX_WITH_TESTCASES
+ PROGRAMS = tstIntNetR0
+endif
+LIBRARIES = DevicesR3 Drivers ServicesR0
+DLLS      = VBoxDDU VBoxDD VBoxDD2
+SYSMODS   = VBoxDDGC VBoxDD2GC VBoxDDR0 VBoxDD2R0
+
+OTHER_CLEAN = \
+	$(PATH_TARGET)/vboxaml.hex \
+	$(PATH_TARGET)/vboxaml.aml
+
+SUBDIRS   = \
+	testcase \
+	PC/BIOS \
+	PC/Etherboot-src \
+	Graphics/BIOS
+SUBDIRS_AFTER = \
+	Storage/testcase
+
+
+#
+# Check for VBOX_* stuff which governs defines.
+#
+ifdef VBOX_USE_IOAPIC
+ DEFS += USE_IOAPIC
+endif
+ifdef VBOX_WITH_VRDP
+ DEFS += VBOX_VRDP
+endif
+ifdef VBOX_WITH_INTERNAL_NETWORKING
+ DEFS += VBOX_WITH_INTERNAL_NETWORKING
+endif
+
+# enable the pdm lock.
+#DEFS += VBOX_WITH_PDM_LOCK
+
+
+#
+# VBoxDDU (shared object)
+#
+VBoxDDU_TEMPLATE         = VBOXR3
+VBoxDDU_DEFS             = IN_VBOXDDU
+ifdef VBOX_WITH_USB
+ VBoxDDU_DEFS.win        = VBOX_WITH_USB
+ VBoxDDU_SDKS.win        = WINPSDK W2K3DDK
+ VBoxDDU_SOURCES.win     = \
+	USB/win32/USBLib-win32.cpp
+else
+ VBoxDDU_SDKS.win         = WINPSDK
+endif
+VBoxDDU_SOURCES          = \
+	Storage/VBoxHDD-new.cpp \
+	Storage/VDICore.cpp \
+	Storage/VmdkHDDCore.cpp
+VBoxDDU_LIBS             = \
+	$(LIB_RUNTIME)
+ifeq ($(BUILD_TARGET),l4)
+ VBoxDDU_LIBS           += \
+	$(L4_LIBDIR)/libl4sys.p.a
+endif
+VBoxDDU_LDFLAGS.darwin   = -install_name @executable_path/VBoxDDU.dylib
+VBoxDDU_LDFLAGS.linux    = -Wl,--no-undefined
+VBoxDDU_LDFLAGS.l4       = -Wl,--no-undefined
+
+
+#
+# VBoxDD (shared object)
+#
+VBoxDD_TEMPLATE         = VBOXR3
+VBoxDD_SDKS.win         = WINPSDK DXSDK W2K3DDK VBOX_NTDLL
+VBoxDD_SOURCES          = \
+	Builtins.cpp
+VBoxDD_DEFS             = VBOX_ACPI
+ifdef VBOX_WITH_USB
+ VBoxDD_DEFS           += VBOX_WITH_USB IN_USB_R3
+endif
+ifdef VBOX_WITH_ISCSI
+ VBoxDD_DEFS           += VBOX_WITH_ISCSI
+endif
+VBoxDD_LIBS             = \
+	$(PATH_LIB)/DevicesR3$(VBOX_SUFF_LIB) \
+	$(PATH_LIB)/Drivers$(VBOX_SUFF_LIB) \
+	$(PATH_LIB)/PcDefBiosLogo$(VBOX_SUFF_LIB) \
+	$(LIB_VMM) \
+	$(LIB_RUNTIME)
+ifeq ($(BUILD_TARGET),win)
+ VBoxDD_LIBS           += \
+	$(PATH_LIB)/VBoxDDU.lib \
+	$(PATH_LIB)/VBoxDD2.lib \
+	$(PATH_SDK_DXSDK_LIB)/dxguid.lib
+else
+ VBoxDD_LIBS           += \
+	$(INSTARGET_VBoxDDU) \
+	$(INSTARGET_VBoxDD2)
+endif
+ifeq ($(BUILD_TARGET),l4)
+ VBoxDD_LIBS           += \
+	$(L4_LIBDIR)/libl4sys.p.a
+endif
+VBoxDD_LIBS.darwin      = \
+	$(LIB_REM)
+VBoxDD_LDFLAGS.darwin   = -install_name @executable_path/VBoxDD.dylib \
+	-framework CoreAudio \
+	-framework IOKit \
+	-framework Carbon \
+	-framework DiskArbitration
+VBoxDD_LDFLAGS.linux    = -Wl,--no-undefined
+VBoxDD_LDFLAGS.l4       = -Wl,--no-undefined
+
+
+# damn, fix this.
+ifeq ($(BUILD_TARGET),win)
+$(PATH_LIB)/VBoxDD2.lib: $(PATH_BIN)/VBoxDD2.dll
+$(PATH_LIB)/VBoxDDU.lib: $(PATH_BIN)/VBoxDDU.dll
+endif
+
+
+#
+# VBoxDD2 (shared object)
+#
+VBoxDD2_TEMPLATE        = VBOXR3
+VBoxDD2_DEFS            = IN_VBOXDD2
+VBoxDD2_SOURCES         = \
+	Builtins2.cpp \
+	PC/DevAPIC.cpp
+VBoxDD2_LIBS            = \
+	$(PATH_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
+	$(PATH_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
+	$(PATH_LIB)/NetBiosBin$(VBOX_SUFF_LIB) \
+	$(LIB_VMM) \
+	$(LIB_RUNTIME)
+ifeq ($(BUILD_TARGET),l4)
+VBoxDD2_LIBS           += \
+	$(L4_LIBDIR)/libl4sys.p.a
+endif
+VBoxDD2_LIBS.darwin    += $(LIB_REM)
+VBoxDD2_LDFLAGS.darwin  = -install_name @executable_path/VBoxDD2.dylib
+VBoxDD2_LDFLAGS.linux   = -Wl,--no-undefined
+VBoxDD2_LDFLAGS.l4      = -Wl,--no-undefined
+
+
+#
+# DevicesR3 (library)
+#
+DevicesR3_TEMPLATE      = VBOXR3
+DevicesR3_SDKS.win      = WINPSDK W2K3DDK
+DevicesR3_INCS          = \
+	$(PATH_CURRENT)
+DevicesR3_SOURCES       = \
+	Input/DevPS2.cpp \
+	Bus/DevPCI.cpp \
+	Graphics/DevVGA.cpp \
+	Storage/DevATA.cpp \
+	PC/DevPit-i8254.cpp \
+	PC/DevPIC.cpp \
+	PC/DevACPI.cpp \
+	PC/DevRTC.cpp \
+	PC/DevPcBios.cpp \
+	PC/DevPcArch.c \
+	VMMDev/VBoxDev.cpp \
+	VMMDev/VMMDevHGCM.cpp \
+	Network/DevPCNet.cpp \
+	Audio/DevIchAc97.cpp \
+	PC/DevDMA.cpp \
+	Storage/fdc.c \
+	Serial/DevSerial.cpp
+
+ifeq (0,1)
+DevicesR3_SOURCES += \
+	Network/ne2000.c
+endif
+
+ifdef VBOX_WITH_USB
+DevicesR3_DEFS         += VBOX_WITH_USB IN_USB_R3
+DevicesR3_SOURCES      += \
+	USB/DevOHCI.cpp
+endif
+
+DevicesR3_DEFS         += VBOX_HGCM
+DevicesR3_DEFS.linux   += _GNU_SOURCE
+DevicesR3_DEFS.l4      += _GNU_SOURCE
+
+
+# DevACPI.cpp needs vboxaml.hex which we generate from PC/vbox.dsl.
+PC/DevACPI.cpp_DEPS     = $(PATH_TARGET)/vboxaml.hex
+PC/DevACPI.cpp_INCS     = $(PATH_TARGET)
+Bus/DevPCI.cpp_INCS     = Bus
+
+
+#
+# VBoxDDGC (sysmod)
+#
+VBoxDDGC_TEMPLATE       = VBOXGC
+VBoxDDGC_DEFS           =
+VBoxDDGC_SYSSUFF        = .gc
+VBoxDDGC_INCS           = \
+	$(PATH_CURRENT)
+VBoxDDGC_SOURCES        = \
+	Bus/DevPCI.cpp \
+	Graphics/DevVGA.cpp \
+	Input/DevPS2.cpp \
+	PC/DevACPI.cpp \
+	PC/DevPit-i8254.cpp \
+	PC/DevPIC.cpp \
+	PC/DevRTC.cpp \
+	Storage/DevATA.cpp \
+	Network/DevPCNet.cpp \
+	Serial/DevSerial.cpp
+
+ifdef VBOX_WITH_USB
+VBoxDDGC_DEFS          += VBOX_WITH_USB IN_USB_GC
+VBoxDDGC_SOURCES       += \
+	USB/DevOHCI.cpp
+endif
+
+ifeq ($(VBOX_LDR_FMT32),pe)
+VBoxDDGC_LDFLAGS        = -Entry:vgaMMIOWrite
+endif
+ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
+VBoxDDGC_LIBS           = \
+	$(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
+	$(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
+endif
+
+
+#
+# VBoxDDR0 (sysmod)
+#
+VBoxDDR0_TEMPLATE       = VBOXR0
+VBoxDDR0_SYSSUFF        = .r0
+VBoxDDR0_DEFS           = IN_RT_R0
+VBoxDDR0_INCS           = \
+	$(PATH_CURRENT)
+VBoxDDR0_SOURCES        = \
+	Bus/DevPCI.cpp \
+	Graphics/DevVGA.cpp \
+	Input/DevPS2.cpp \
+	PC/DevACPI.cpp \
+	PC/DevPit-i8254.cpp \
+	PC/DevPIC.cpp \
+	PC/DevRTC.cpp \
+	Storage/DevATA.cpp \
+	Network/DevPCNet.cpp \
+	Serial/DevSerial.cpp
+
+ifdef VBOX_WITH_USB
+VBoxDDR0_DEFS          += VBOX_WITH_USB IN_USB_R0
+VBoxDDR0_SOURCES       += \
+	USB/DevOHCI.cpp
+endif
+
+ifeq ($(VBOX_LDR_FMT32),pe)
+VBoxDDR0_LDFLAGS        = -Entry:vgaMMIOWrite
+endif
+ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
+VBoxDDR0_LIBS           = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
+endif
+VBoxDDR0_LIBS          += $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
+ifeq ($(VBOX_LDR_FMT32),elf) # this is template stuff!
+VBoxDDR0_LIBS          += $(VBOX_GCC_LIBGCC)
+endif
+
+
+#
+# VBoxDD2GC (LGPL sysmod)
+#
+VBoxDD2GC_TEMPLATE       = VBOXGC
+VBoxDD2GC_DEFS           =
+VBoxDD2GC_SYSSUFF        = .gc
+VBoxDD2GC_INCS           = \
+	$(PATH_CURRENT)
+VBoxDD2GC_SOURCES        = \
+	PC/DevAPIC.cpp
+ifeq ($(VBOX_LDR_FMT32),pe)
+VBoxDD2GC_LDFLAGS        = -Entry:apicMMIOWrite
+endif
+ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
+VBoxDD2GC_LIBS           = \
+	$(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
+	$(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
+endif
+
+
+#
+# VBoxDD2R0 (LGPL sysmod)
+#
+VBoxDD2R0_TEMPLATE       = VBOXR0
+VBoxDD2R0_DEFS           = IN_RT_R0
+VBoxDD2R0_SYSSUFF        = .r0
+VBoxDD2R0_INCS           = \
+	$(PATH_CURRENT)
+VBoxDD2R0_SOURCES        = \
+        PC/DevAPIC.cpp
+ifeq ($(VBOX_LDR_FMT),pe)
+VBoxDD2R0_LDFLAGS        = -Entry:apicMMIOWrite
+endif
+ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
+VBoxDD2R0_LIBS           = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
+endif
+VBoxDD2R0_LIBS          += $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
+ifeq ($(VBOX_LDR_FMT),elf)
+VBoxDD2R0_LIBS          += $(VBOX_GCC_LIBGCC)
+endif
+
+
+#
+# Drivers (library)
+#
+ifeq ($(BUILD_TARGET),l4) # We are using real Linux headers, not the cleaned up user space ones
+Drivers_TEMPLATE   = VBOXR3NP
+else
+Drivers_TEMPLATE   = VBOXR3
+endif
+Drivers_SDKS.win   = WINPSDK W2K3DDK
+Storage/DrvHostDVD.cpp_SDKS.win = W2K3DDK
+Drivers_DEFS       = IN_IDE_R3
+Drivers_INCS       = \
+	Network/slirp
+Drivers_SOURCES    = \
+	Audio/audio.c \
+	Audio/audiosniffer.c \
+	Audio/mixeng.c \
+	Audio/noaudio.c \
+	Input/DrvKeyboardQueue.cpp \
+	Input/DrvMouseQueue.cpp \
+	Network/DrvIntNet.cpp \
+	Network/DrvNAT.cpp \
+	Network/DrvNetSniffer.cpp \
+	Network/slirp/bootp.c \
+	Network/slirp/cksum.c \
+	Network/slirp/debug.c \
+	Network/slirp/if.c \
+	Network/slirp/ip_icmp.c \
+	Network/slirp/ip_input.c \
+	Network/slirp/ip_output.c \
+	Network/slirp/mbuf.c \
+	Network/slirp/misc.c \
+	Network/slirp/sbuf.c \
+	Network/slirp/slirp.c \
+	Network/slirp/socket.c \
+	Network/slirp/tcp_input.c \
+	Network/slirp/tcp_output.c \
+	Network/slirp/tcp_subr.c \
+	Network/slirp/tcp_timer.c \
+	Network/slirp/tftp.c \
+	Network/slirp/udp.c \
+	PC/DrvACPI.cpp \
+	Serial/DrvChar.cpp \
+	Serial/DrvNamedPipe.cpp \
+	Storage/DrvBlock.cpp \
+	Storage/DrvHostBase.cpp \
+	Storage/DrvHostDVD.cpp \
+	Storage/DrvHostFloppy.cpp \
+	Storage/DrvHostRawDisk.cpp \
+	Storage/DrvMediaISO.cpp \
+	Storage/DrvRawImage.cpp \
+	Storage/DrvVD.cpp \
+	Storage/DrvVmdk.cpp \
+	Storage/VBoxHDD.cpp
+
+# -- OS specific --
+
+ifeq ($(BUILD_TARGET),darwin)
+Drivers_SOURCES      := $(filter-out \
+	Storage/DrvHostRaw% \
+	Storage/DrvHostFloppy% \
+	, $(Drivers_SOURCES)) \
+	Audio/coreaudio.c
+Drivers_SOURCES.darwin =
+endif # darwin
+
+ifeq ($(BUILD_TARGET),freebsd)
+Drivers_SOURCES      := $(filter-out \
+	Storage/DrvHost% \
+	, $(Drivers_SOURCES))
+Drivers_SOURCES.freebsd =
+endif # freebsd
+
+
+ifeq ($(BUILD_TARGET),l4)
+Drivers_SOURCES       = \
+	Input/DrvMouseQueue.cpp \
+	Input/DrvKeyboardQueue.cpp \
+	Storage/VBoxHDD.cpp \
+	Storage/DrvBlock.cpp \
+	Storage/DrvMediaISO.cpp \
+	Storage/DrvRawImage.cpp \
+	Storage/DrvHostBase.cpp \
+	Storage/DrvHostDVD.cpp \
+	Storage/DrvVD.cpp \
+	PC/DrvACPI.cpp \
+	Network/DrvIntNet.cpp \
+	Network/DrvNetSniffer.cpp \
+	Audio/audio.c \
+	Audio/mixeng.c \
+	Audio/noaudio.c \
+	Audio/audiosniffer.c
+
+Drivers_SOURCES.l4    = \
+	Network/DrvTAP.cpp \
+	Audio/ossaudio.c
+endif # l4
+
+Drivers_SOURCES.linux = \
+	Network/DrvTAP.cpp \
+	Audio/ossaudio.c
+
+ifeq ($(BUILD_TARGET),os2)
+Drivers_SOURCES      := $(filter-out \
+	Storage/DrvHost% \
+	, $(Drivers_SOURCES))
+Drivers_SOURCES.os2   =
+endif
+
+Drivers_SOURCES.win   = \
+	Network/DrvTAPWin32.cpp \
+	Audio/dsoundaudio.c
+
+
+# -- features --
+
+ifdef VBOX_WITH_ISCSI
+ Drivers_SOURCES      += \
+	Storage/DrvISCSI.cpp \
+	Storage/DrvISCSITransportTCP.cpp
+ Drivers_DEFS         += VBOX_WITH_ISCSI
+endif # VBOX_WITH_ISCSI
+
+ifdef VBOX_WITH_ALSA
+ Drivers_DEFS.linux   += VBOX_WITH_ALSA
+ Drivers_SOURCES.linux+= \
+	Audio/alsaaudio.c
+ VBoxDD_LIBS.linux    += asound
+endif
+
+ifdef VBOX_WITH_USB
+ Drivers_DEFS         += VBOX_WITH_USB IN_USB_R3
+ Drivers_SOURCES      += \
+	USB/DrvVUSBRootHub.cpp \
+	USB/VUSBDevice.cpp \
+	USB/VUSBUrb.cpp
+ ifdef VBOX_WITH_VRDP
+  Drivers_SOURCES     += \
+	USB/vrdp/USBProxyDevice-vrdp.cpp
+ endif
+
+ Drivers_DEFS.linux   += VUSB_HAVE_USBPROXY_DEVICE
+ ifdef VBOX_WITHOUT_LINUX_COMPILER_H
+  Drivers_DEFS.linux  += VBOX_WITHOUT_LINUX_COMPILER_H
+ endif
+ Drivers_SOURCES.linux+= \
+	USB/USBProxyDevice.cpp \
+	USB/linux/USBProxyDevice-linux.cpp
+
+ Drivers_DEFS.l4      += VUSB_HAVE_USBPROXY_DEVICE
+ Drivers_SOURCES.l4   += \
+	USB/USBProxyDevice.cpp \
+	USB/linux/USBProxyDevice-linux.cpp
+
+ Drivers_DEFS.win     += VUSB_HAVE_USBPROXY_DEVICE
+ Drivers_SOURCES.win  += \
+	USB/USBProxyDevice.cpp \
+	USB/win32/USBProxyDevice-win32.cpp
+endif # VBOX_WITH_USB
+
+
+
+#
+# Ring-0 Services (library, linked into VMMR0.r0)
+#
+ServicesR0_TEMPLATE  = VBOXR0
+ServicesR0_DEFS      = IN_INTNET_R0 IN_RT_R0
+ServicesR0_SOURCES   = \
+	Network/SrvIntNetR0.cpp
+
+#
+# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
+#
+tstIntNetR0_TEMPLATE    = VBOXR3TSTEXE
+tstIntNetR0_DEFS        = IN_INTNET_R0
+tstIntNetR0_SOURCES     = \
+	Network/testcase/tstIntNetR0.cpp
+tstIntNetR0_LIBS        = \
+	$(LIB_RUNTIME)
+
+
+include $(PATH_KBUILD)/footer.kmk
+
+
+# ACPI DSL generation
+$(PATH_TARGET)/vboxaml.hex: PC/vbox.dsl
+	$(call MSG_TOOL,iasl,DevACPI,$<,$@)
+	$(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
+
Index: trunk/src/VBox/Devices/PC/BIOS/Makefile
===================================================================
--- trunk/src/VBox/Devices/PC/BIOS/Makefile	(revision 2477)
+++ 	(revision )
@@ -1,107 +1,0 @@
-#
-# PC BIOS Makefile
-#
-
-# Copyright (C) 2006 InnoTek Systemberatung GmbH
-#
-# This file is part of VirtualBox Open Source Edition (OSE), as
-# available from http://www.virtualbox.org. This file is free software;
-# you can redistribute it and/or modify it under the terms of the GNU
-# General Public License as published by the Free Software Foundation,
-# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
-# distribution. VirtualBox OSE is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY of any kind.
-#
-# If you received this file as part of a commercial VirtualBox
-# distribution, then only the terms of your commercial VirtualBox
-# license agreement apply instead of the previous paragraph.
-#
-
-DEPTH = ../../../../../
-include	$(PATH_KBUILD)/header.kmk
-
-BLDPROGS    = biossums
-LIBRARIES   = PcBiosBin PcDefBiosLogo
-
-OTHERS      = $(PATH_TARGET)/bios.bin
-
-OTHER_CLEAN = \
-	$(PATH_TARGET)/_rombios_.c \
-	$(PATH_TARGET)/rombios0.s \
-	$(PATH_TARGET)/rombios1.s \
-	$(PATH_TARGET)/bios.lst \
-	$(PATH_TARGET)/bios.tmp \
-	$(PATH_TARGET)/bios.bin \
-	$(PATH_TARGET)/PcBiosBin.c \
-	$(PATH_TARGET)/PcDefBiosLogo.c \
-	$(PATH_TARGET)/bios-syms.h
-
-TEMPLATE = VBOXBLDPROG
-biossums_SOURCES    = biossums.c
-
-PcBiosBin_TEMPLATE  = VBOXR3
-PcBiosBin_DEFS      = IN_VBOXDD2
-PcBiosBin_INCS      = ../..
-PcBiosBin_SOURCES   = $(PATH_TARGET)/PcBiosBin.c
-$(PATH_TARGET)/PcBiosBin.c_DEPS = $(PATH_TARGET)/bios-syms.h
-
-PcDefBiosLogo_TEMPLATE  = VBOXR3
-PcDefBiosLogo_INCS      = ../..
-PcDefBiosLogo_SOURCES   = $(PATH_TARGET)/PcDefBiosLogo.c
-
-
-include	$(PATH_KBUILD)/footer.kmk
-
-
-#
-# Rule for making the bios.
-#
-$(PATH_TARGET)/PcBiosBin.c: $(PATH_TARGET)/bios.bin $(VBOX_BIN2C)
-	$(call MSG_TOOL,bin2c,PcBiosBin,$<,$@)
-	$(QUIET)$(VBOX_BIN2C) -min 64 -max 256 -mask 0xffff -ascii -export PcBiosBinary $< $@
-
-#
-# Rule for making the bios logo.
-#
-$(PATH_TARGET)/PcDefBiosLogo.c: innotek_logo.bmp $(VBOX_BIN2C)
-	$(call MSG_TOOL,bin2c,PcBiosBin,$<,$@)
-	$(QUIET)$(VBOX_BIN2C) -max 64 PcDefBiosLogo $< $@
-
-#
-# Six steps to bios.bin and bios-syms.h
-#
-
-# 1. precompile rombios.c
-$(PATH_TARGET)/_rombios_.c: rombios.c logo.c apmbios.S | $(call DIRDEP,$(TARGET_PATH))
-	$(call MSG_TOOL,cpp,PcBiosBin,$<,$@)
-	$(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -I$(PATH_TARGET) -I$(PATH_CURRENT)/.. -I$(PATH_ROOT)/include -I$(PATH_OUT) -DBX_SMP_PROCESSORS=1 -DVBOX $(addprefix -D,$(DEFS) $(DEFS.$(BUILD_TYPE))) -P $< > $@
-
-# 2. compile to intermediate asm file.
-$(PATH_TARGET)/rombios0.s: $(PATH_TARGET)/_rombios_.c
-	$(call MSG_COMPILE,PcBiosBin,$<,$@,C)
-	$(QUIET)$(VBOX_BCC) -o $@ -C-c -D__i86__ -0 -S $^
-
-# 3. post process intermediate asm file.
-$(PATH_TARGET)/rombios1.s: $(PATH_TARGET)/rombios0.s
-	$(call MSG_TOOL,Adjusting BCC Assembly,PcBiosBin,$<,$@)
-	$(QUIET)$(SED) -e 's/^\.text//' -e 's/^\.data//' $^ > $@
-
-# 4. assemble the intermediate asm file. (also creates a listing rombios.lst)
-$(PATH_TARGET)/bios.tmp $(PATH_TARGET)/bios.lst: $(PATH_TARGET)/rombios1.s
-	$(call MSG_COMPILE,PcBiosBin,$<,$@,AS)
-	$(QUIET)$(VBOX_AS86) -b $(PATH_TARGET)/bios.tmp -u- -w- -g -0 -j -O -l $(PATH_TARGET)/bios.lst - < $^
-
-# 5. calculate checksums for the final BIOS image.
-$(PATH_TARGET)/bios.bin: $(PATH_TARGET)/bios.tmp $(TARGET_biossums)
-	$(call MSG_TOOL,biossums,PcBiosBin,$<,$@)
-	$(QUIET)$(CP) -f $(PATH_TARGET)/bios.tmp $(PATH_TARGET)/bios.bin
-	$(QUIET)$(TARGET_biossums) $(PATH_TARGET)/bios.bin
-
-# 6. create the symbol table.
-$(PATH_TARGET)/bios-syms.h: $(PATH_TARGET)/bios.lst Makefile
-	$(call MSG_TOOL,symtable,PcBiosBin,$<,$@)
-	$(QUIET)$(SED) \
-		-e  '/^[0-9][0-9][0-9][0-9][0-9]                       000[0-9A-F]*            [[:space:]]*[a-zA-Z0-9_]*:/!d' \
-		-e 's/^[0-9][0-9][0-9][0-9][0-9]                       \(000[0-9A-F]*\)            [[:space:]]*\([a-zA-Z0-9_]*\):.*$$/    DEFSYM(0x\1, "\2"),/' \
-		$(PATH_TARGET)/bios.lst > $@
-
Index: trunk/src/VBox/Devices/PC/BIOS/Makefile.kmk
===================================================================
--- trunk/src/VBox/Devices/PC/BIOS/Makefile.kmk	(revision 2478)
+++ trunk/src/VBox/Devices/PC/BIOS/Makefile.kmk	(revision 2478)
@@ -0,0 +1,109 @@
+# $Id$
+## @file
+# PC BIOS makefile.
+#
+
+#
+# Copyright (C) 2006 InnoTek Systemberatung GmbH
+#
+# This file is part of VirtualBox Open Source Edition (OSE), as
+# available from http://www.virtualbox.org. This file is free software;
+# you can redistribute it and/or modify it under the terms of the GNU
+# General Public License as published by the Free Software Foundation,
+# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
+# distribution. VirtualBox OSE is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY of any kind.
+#
+# If you received this file as part of a commercial VirtualBox
+# distribution, then only the terms of your commercial VirtualBox
+# license agreement apply instead of the previous paragraph.
+#
+
+DEPTH = ../../../../../
+include	$(PATH_KBUILD)/header.kmk
+
+BLDPROGS    = biossums
+LIBRARIES   = PcBiosBin PcDefBiosLogo
+
+OTHERS      = $(PATH_TARGET)/bios.bin
+
+OTHER_CLEAN = \
+	$(PATH_TARGET)/_rombios_.c \
+	$(PATH_TARGET)/rombios0.s \
+	$(PATH_TARGET)/rombios1.s \
+	$(PATH_TARGET)/bios.lst \
+	$(PATH_TARGET)/bios.tmp \
+	$(PATH_TARGET)/bios.bin \
+	$(PATH_TARGET)/PcBiosBin.c \
+	$(PATH_TARGET)/PcDefBiosLogo.c \
+	$(PATH_TARGET)/bios-syms.h
+
+TEMPLATE = VBOXBLDPROG
+biossums_SOURCES    = biossums.c
+
+PcBiosBin_TEMPLATE  = VBOXR3
+PcBiosBin_DEFS      = IN_VBOXDD2
+PcBiosBin_INCS      = ../..
+PcBiosBin_SOURCES   = $(PATH_TARGET)/PcBiosBin.c
+$(PATH_TARGET)/PcBiosBin.c_DEPS = $(PATH_TARGET)/bios-syms.h
+
+PcDefBiosLogo_TEMPLATE  = VBOXR3
+PcDefBiosLogo_INCS      = ../..
+PcDefBiosLogo_SOURCES   = $(PATH_TARGET)/PcDefBiosLogo.c
+
+
+include	$(PATH_KBUILD)/footer.kmk
+
+
+#
+# Rule for making the bios.
+#
+$(PATH_TARGET)/PcBiosBin.c: $(PATH_TARGET)/bios.bin $(VBOX_BIN2C)
+	$(call MSG_TOOL,bin2c,PcBiosBin,$<,$@)
+	$(QUIET)$(VBOX_BIN2C) -min 64 -max 256 -mask 0xffff -ascii -export PcBiosBinary $< $@
+
+#
+# Rule for making the bios logo.
+#
+$(PATH_TARGET)/PcDefBiosLogo.c: innotek_logo.bmp $(VBOX_BIN2C)
+	$(call MSG_TOOL,bin2c,PcBiosBin,$<,$@)
+	$(QUIET)$(VBOX_BIN2C) -max 64 PcDefBiosLogo $< $@
+
+#
+# Six steps to bios.bin and bios-syms.h
+#
+
+# 1. precompile rombios.c
+$(PATH_TARGET)/_rombios_.c: rombios.c logo.c apmbios.S | $(call DIRDEP,$(TARGET_PATH))
+	$(call MSG_TOOL,cpp,PcBiosBin,$<,$@)
+	$(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -I$(PATH_TARGET) -I$(PATH_CURRENT)/.. -I$(PATH_ROOT)/include -I$(PATH_OUT) -DBX_SMP_PROCESSORS=1 -DVBOX $(addprefix -D,$(DEFS) $(DEFS.$(BUILD_TYPE))) -P $< > $@
+
+# 2. compile to intermediate asm file.
+$(PATH_TARGET)/rombios0.s: $(PATH_TARGET)/_rombios_.c
+	$(call MSG_COMPILE,PcBiosBin,$<,$@,C)
+	$(QUIET)$(VBOX_BCC) -o $@ -C-c -D__i86__ -0 -S $^
+
+# 3. post process intermediate asm file.
+$(PATH_TARGET)/rombios1.s: $(PATH_TARGET)/rombios0.s
+	$(call MSG_TOOL,Adjusting BCC Assembly,PcBiosBin,$<,$@)
+	$(QUIET)$(SED) -e 's/^\.text//' -e 's/^\.data//' $^ > $@
+
+# 4. assemble the intermediate asm file. (also creates a listing rombios.lst)
+$(PATH_TARGET)/bios.tmp $(PATH_TARGET)/bios.lst: $(PATH_TARGET)/rombios1.s
+	$(call MSG_COMPILE,PcBiosBin,$<,$@,AS)
+	$(QUIET)$(VBOX_AS86) -b $(PATH_TARGET)/bios.tmp -u- -w- -g -0 -j -O -l $(PATH_TARGET)/bios.lst - < $^
+
+# 5. calculate checksums for the final BIOS image.
+$(PATH_TARGET)/bios.bin: $(PATH_TARGET)/bios.tmp $(TARGET_biossums)
+	$(call MSG_TOOL,biossums,PcBiosBin,$<,$@)
+	$(QUIET)$(CP) -f $(PATH_TARGET)/bios.tmp $(PATH_TARGET)/bios.bin
+	$(QUIET)$(TARGET_biossums) $(PATH_TARGET)/bios.bin
+
+# 6. create the symbol table.
+$(PATH_TARGET)/bios-syms.h: $(PATH_TARGET)/bios.lst Makefile.kmk
+	$(call MSG_TOOL,symtable,PcBiosBin,$<,$@)
+	$(QUIET)$(SED) \
+		-e  '/^[0-9][0-9][0-9][0-9][0-9]                       000[0-9A-F]*            [[:space:]]*[a-zA-Z0-9_]*:/!d' \
+		-e 's/^[0-9][0-9][0-9][0-9][0-9]                       \(000[0-9A-F]*\)            [[:space:]]*\([a-zA-Z0-9_]*\):.*$$/    DEFSYM(0x\1, "\2"),/' \
+		$(PATH_TARGET)/bios.lst > $@
+
Index: trunk/src/VBox/Devices/Storage/testcase/Makefile
===================================================================
--- trunk/src/VBox/Devices/Storage/testcase/Makefile	(revision 2477)
+++ 	(revision )
@@ -1,44 +1,0 @@
-#
-# Makefile for the storage device & driver testcases.
-#
-
-#
-# Copyright (C) 2006 InnoTek Systemberatung GmbH
-#
-# This file is part of VirtualBox Open Source Edition (OSE), as
-# available from http://www.virtualbox.org. This file is free software;
-# you can redistribute it and/or modify it under the terms of the GNU
-# General Public License as published by the Free Software Foundation,
-# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
-# distribution. VirtualBox OSE is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY of any kind.
-#
-# If you received this file as part of a commercial VirtualBox
-# distribution, then only the terms of your commercial VirtualBox
-# license agreement apply instead of the previous paragraph.
-#
-
-DEPTH = ../../../../..
-include	$(PATH_KBUILD)/header.kmk
-
-PROGRAMS        += vditool
-vditool_TEMPLATE = VBOXR3EXE
-vditool_SOURCES  = vditool.cpp
-ifeq ($(BUILD_TARGET),win)
- vditool_LIBS    = $(PATH_LIB)/VBoxDDU$(VBOX_SUFF_LIB)
-else
- vditool_LIBS    = $(PATH_BIN)/VBoxDDU$(VBOX_SUFF_DLL)
-endif
-vditool_LIBS    += $(LIB_RUNTIME)
-
-
-ifdef VBOX_WITH_TESTCASES
- PROGRAMS       += tstVDI
- tstVDI_TEMPLATE = VBOXR3TSTEXE
- tstVDI_SOURCES  = tstVDI.cpp
- tstVDI_LIBS     = $(vditool_LIBS)
-endif
-
-
-include	$(PATH_KBUILD)/footer.kmk
-
Index: trunk/src/VBox/Devices/Storage/testcase/Makefile.kmk
===================================================================
--- trunk/src/VBox/Devices/Storage/testcase/Makefile.kmk	(revision 2478)
+++ trunk/src/VBox/Devices/Storage/testcase/Makefile.kmk	(revision 2478)
@@ -0,0 +1,45 @@
+# $Id$
+## @file
+# Makefile for the storage device & driver testcases.
+#
+
+#
+# Copyright (C) 2006 InnoTek Systemberatung GmbH
+#
+# This file is part of VirtualBox Open Source Edition (OSE), as
+# available from http://www.virtualbox.org. This file is free software;
+# you can redistribute it and/or modify it under the terms of the GNU
+# General Public License as published by the Free Software Foundation,
+# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
+# distribution. VirtualBox OSE is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY of any kind.
+#
+# If you received this file as part of a commercial VirtualBox
+# distribution, then only the terms of your commercial VirtualBox
+# license agreement apply instead of the previous paragraph.
+#
+
+DEPTH = ../../../../..
+include	$(PATH_KBUILD)/header.kmk
+
+PROGRAMS        += vditool
+vditool_TEMPLATE = VBOXR3EXE
+vditool_SOURCES  = vditool.cpp
+ifeq ($(BUILD_TARGET),win)
+ vditool_LIBS    = $(PATH_LIB)/VBoxDDU$(VBOX_SUFF_LIB)
+else
+ vditool_LIBS    = $(PATH_BIN)/VBoxDDU$(VBOX_SUFF_DLL)
+endif
+vditool_LIBS    += $(LIB_RUNTIME)
+
+
+ifdef VBOX_WITH_TESTCASES
+ PROGRAMS       += tstVDI
+ tstVDI_TEMPLATE = VBOXR3TSTEXE
+ tstVDI_SOURCES  = tstVDI.cpp
+ tstVDI_LIBS     = $(vditool_LIBS)
+endif
+
+
+include	$(PATH_KBUILD)/footer.kmk
+
Index: trunk/src/VBox/Devices/testcase/Makefile
===================================================================
--- trunk/src/VBox/Devices/testcase/Makefile	(revision 2477)
+++ 	(revision )
@@ -1,93 +1,0 @@
-#
-# Makefile for the Devices testcases.
-#
-
-#
-# Copyright (C) 2006 InnoTek Systemberatung GmbH
-#
-# This file is part of VirtualBox Open Source Edition (OSE), as
-# available from http://www.virtualbox.org. This file is free software;
-# you can redistribute it and/or modify it under the terms of the GNU
-# General Public License as published by the Free Software Foundation,
-# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
-# distribution. VirtualBox OSE is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY of any kind.
-#
-# If you received this file as part of a commercial VirtualBox
-# distribution, then only the terms of your commercial VirtualBox
-# license agreement apply instead of the previous paragraph.
-#
-
-DEPTH = ../../../..
-include	$(PATH_KBUILD)/header.kmk
-
-#
-# Target lists.
-#
-PROGRAMS = tstDeviceStructSize tstDeviceStructSizeGC
-
-
-#
-# We setup one 'other' targets for executing the structure & alignment
-# validation testcases. Perhaps a bit hackish, but extremely useful.
-#
-ifeq ($(BUILD_TARGET),$(BUILD_PLATFORM))
- ifeq ($(filter-out x86.x86 amd64.amd64 x86.amd64, $(BUILD_TARGET_ARCH).$(BUILD_PLATFORM_ARCH)),)
-  OTHERS          += \
-	$(PATH_TARGET)/tstDeviceStructSize.run
- endif
-endif
-OTHER_CLEAN     += \
-	$(PATH_TARGET)/tstDeviceStructSizeGC.h \
-	$(PATH_TARGET)/tstDeviceStructSize.run \
-
-#
-# The testcase generator.
-#
-tstDeviceStructSizeGC_TEMPLATE  = VBOXGCEXE
-tstDeviceStructSizeGC_DEFS      =
-ifdef VBOX_WITH_USB
-tstDeviceStructSizeGC_DEFS     += VBOX_WITH_USB IN_USB_GC
-endif
-tstDeviceStructSizeGC_SOURCES   = tstDeviceStructSizeGC.cpp
-tstDeviceStructSizeGC_INCS      = .. ../Bus
-
-#
-# The testcase it self.
-#
-tstDeviceStructSize_TEMPLATE = VBOXR3EXE
-tstDeviceStructSize_DEFS     =
-ifdef VBOX_WITH_USB
-tstDeviceStructSize_DEFS    += VBOX_WITH_USB IN_USB_GC
-endif
-tstDeviceStructSize_INCS     = .. ../Bus $(PATH_TARGET)
-tstDeviceStructSize_SOURCES  = tstDeviceStructSize.cpp
-tstDeviceStructSize_LIBS.l4  = $(LIB_RUNTIME)
-tstDeviceStructSize.cpp_DEPS = $(PATH_TARGET)/tstDeviceStructSizeGC.h
-
-
-include	$(PATH_KBUILD)/footer.kmk
-
-
-#
-# Run rule for tstDeviceStructSize.
-#
-
-# 1. Dump selected structure in the VMMGC.gc debug info.
-# 2. Generate a testcase from the dump
-## future
-
-# 1&2. Manually dump selected structures and members.
-$(PATH_TARGET)/tstDeviceStructSizeGC.h: $(INSTARGET_tstDeviceStructSizeGC)
-	$(call MSG_GENERATE,,$@)
-	$(QUIET)$(INSTARGET_tstDeviceStructSizeGC) > $@
-
-# 3. run it.
-$(PATH_TARGET)/tstDeviceStructSize.run: $(INSTARGET_tstDeviceStructSize)
-	$(QUIET)$(RM) -f $@
-	$^
-	$(QUIET)$(APPEND) "$@" "done"
-
-# alias for the struct test.
-run-struct-tests: $(PATH_TARGET)/tstDeviceStructSize.run
-
Index: trunk/src/VBox/Devices/testcase/Makefile.kmk
===================================================================
--- trunk/src/VBox/Devices/testcase/Makefile.kmk	(revision 2478)
+++ trunk/src/VBox/Devices/testcase/Makefile.kmk	(revision 2478)
@@ -0,0 +1,94 @@
+# $Id$
+## @file
+# Makefile for the Devices testcases.
+#
+
+#
+# Copyright (C) 2006 InnoTek Systemberatung GmbH
+#
+# This file is part of VirtualBox Open Source Edition (OSE), as
+# available from http://www.virtualbox.org. This file is free software;
+# you can redistribute it and/or modify it under the terms of the GNU
+# General Public License as published by the Free Software Foundation,
+# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
+# distribution. VirtualBox OSE is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY of any kind.
+#
+# If you received this file as part of a commercial VirtualBox
+# distribution, then only the terms of your commercial VirtualBox
+# license agreement apply instead of the previous paragraph.
+#
+
+DEPTH = ../../../..
+include	$(PATH_KBUILD)/header.kmk
+
+#
+# Target lists.
+#
+PROGRAMS = tstDeviceStructSize tstDeviceStructSizeGC
+
+
+#
+# We setup one 'other' targets for executing the structure & alignment
+# validation testcases. Perhaps a bit hackish, but extremely useful.
+#
+ifeq ($(BUILD_TARGET),$(BUILD_PLATFORM))
+ ifeq ($(filter-out x86.x86 amd64.amd64 x86.amd64, $(BUILD_TARGET_ARCH).$(BUILD_PLATFORM_ARCH)),)
+  OTHERS          += \
+	$(PATH_TARGET)/tstDeviceStructSize.run
+ endif
+endif
+OTHER_CLEAN     += \
+	$(PATH_TARGET)/tstDeviceStructSizeGC.h \
+	$(PATH_TARGET)/tstDeviceStructSize.run \
+
+#
+# The testcase generator.
+#
+tstDeviceStructSizeGC_TEMPLATE  = VBOXGCEXE
+tstDeviceStructSizeGC_DEFS      =
+ifdef VBOX_WITH_USB
+tstDeviceStructSizeGC_DEFS     += VBOX_WITH_USB IN_USB_GC
+endif
+tstDeviceStructSizeGC_SOURCES   = tstDeviceStructSizeGC.cpp
+tstDeviceStructSizeGC_INCS      = .. ../Bus
+
+#
+# The testcase it self.
+#
+tstDeviceStructSize_TEMPLATE = VBOXR3EXE
+tstDeviceStructSize_DEFS     =
+ifdef VBOX_WITH_USB
+tstDeviceStructSize_DEFS    += VBOX_WITH_USB IN_USB_GC
+endif
+tstDeviceStructSize_INCS     = .. ../Bus $(PATH_TARGET)
+tstDeviceStructSize_SOURCES  = tstDeviceStructSize.cpp
+tstDeviceStructSize_LIBS.l4  = $(LIB_RUNTIME)
+tstDeviceStructSize.cpp_DEPS = $(PATH_TARGET)/tstDeviceStructSizeGC.h
+
+
+include	$(PATH_KBUILD)/footer.kmk
+
+
+#
+# Run rule for tstDeviceStructSize.
+#
+
+# 1. Dump selected structure in the VMMGC.gc debug info.
+# 2. Generate a testcase from the dump
+## future
+
+# 1&2. Manually dump selected structures and members.
+$(PATH_TARGET)/tstDeviceStructSizeGC.h: $(INSTARGET_tstDeviceStructSizeGC)
+	$(call MSG_GENERATE,,$@)
+	$(QUIET)$(INSTARGET_tstDeviceStructSizeGC) > $@
+
+# 3. run it.
+$(PATH_TARGET)/tstDeviceStructSize.run: $(INSTARGET_tstDeviceStructSize)
+	$(QUIET)$(RM) -f $@
+	$^
+	$(QUIET)$(APPEND) "$@" "done"
+
+# alias for the struct test.
+run-struct-tests: $(PATH_TARGET)/tstDeviceStructSize.run
+
