Makefile.kmk revision 344115a50dfcaf97123d38b056161195a7e4e48c
# $Id$
## @file
# Top-level sub-makefile for the devices, drivers and services.
#
#
# Copyright (C) 2006-2011 Oracle Corporation
#
# 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 (GPL) 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.
#
SUB_DEPTH = ../../..
include $(KBUILD_PATH)/subheader.kmk
# Include sub-makefiles.
include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
if defined(VBOX_WITH_INTEL_PXE) || defined(VBOX_ONLY_EXTPACKS)
include $(PATH_SUB_CURRENT)/PC/PXE/Makefile.kmk
else if defined(VBOX_WITH_PXE_ROM) && !defined(VBOX_WITHOUT_ETHERBOOT)
include $(PATH_SUB_CURRENT)/PC/Etherboot-src/Makefile.kmk
endif
if !defined(VBOX_ONLY_EXTPACKS) # Goes on almost to the end of the file.
include $(PATH_SUB_CURRENT)/PC/BIOS/Makefile.kmk
include $(PATH_SUB_CURRENT)/Graphics/BIOS/Makefile.kmk
ifdef VBOX_WITH_EFI
include $(PATH_SUB_CURRENT)/EFI/Thunk/Makefile.kmk
endif
#
# Main targets.
#
LIBRARIES += DevicesR3 Drivers ServicesR0
DLLS += VBoxDDU VBoxDD VBoxDD2
SYSMODS += VBoxDDR0 VBoxDD2R0
ifdef VBOX_WITH_RAW_MODE
SYSMODS += VBoxDDGC VBoxDD2GC
endif
#
# VBoxDDU (shared object)
#
VBoxDDU_TEMPLATE = VBoxR3DllWarnNoPic
VBoxDDU_NAME = $(basename $(notdir $(LIB_DDU)))
VBoxDDU_INST.darwin = $(INST_DLL) $(INST_TESTCASE)
VBoxDDU_DEFS = IN_VBOXDDU
ifdef VBOX_WITH_VUSB
VBoxDDU_DEFS += VBOX_WITH_VUSB
endif
ifdef VBOX_WITH_USB
VBoxDDU_DEFS += VBOX_WITH_USB IN_USBLIB
VBoxDDU_SDKS.win = WINPSDK W2K3DDK
if defined(VBOX_WITH_EHCI) && !defined(VBOX_WITH_EXTPACK_PUEL)
VBoxDDU_DEFS += VBOX_WITH_EHCI
endif
ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
VBoxDDU_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
endif
else
VBoxDDU_SDKS.win = WINPSDK
endif
VBoxDDU_SOURCES = \
ifdef VBOX_WITH_USB
VBoxDDU_INCS.os2 += \
$(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
endif
VBoxDDU_LIBS = \
$(LIB_RUNTIME) \
$(PATH_LIB)/StorageLib$(VBOX_SUFF_LIB)
ifdef VBOX_WITH_USB
VBoxDDU_LIBS += \
$(PATH_LIB)/USBLib$(VBOX_SUFF_LIB)
VBoxDDU_LIBS.win += \
$(PATH_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB)
endif
ifeq ($(KBUILD_TARGET),l4)
VBoxDDU_LIBS += \
$(L4_LIBDIR)/libl4sys.p.a
endif
VBoxDDU_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDDU.dylib
ifdef VBOX_WITH_USB
ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
VBoxDDU_LDFLAGS.darwin += -framework IOKit
endif
endif
VBoxDDU_LDFLAGS.linux = -Wl,--no-undefined
VBoxDDU_LDFLAGS.l4 = -Wl,--no-undefined
#
# VBoxDDULnxHostR3 (Only needed for l4, currently for executing vditool on L4Linux.)
#
ifeq ($(KBUILD_TARGET),l4)
LIBRARIES += VBoxDDULnxHostR3
VBoxDDULnxHostR3_TEMPLATE = VBOXLNXHOSTR3LIB
VBoxDDULnxHostR3_DEFS = IN_VBOXDDU
VBoxDDULnxHostR3_SOURCES = $(VBoxDDU_SOURCES)
endif
#
# VBoxDD (shared object)
#
VBoxDD_TEMPLATE = VBoxR3DllWarnNoPic
VBoxDD_SDKS.win = WINPSDK DXSDK W2K3DDK VBOX_NTDLL
VBoxDD_INCS = build
VBoxDD_SOURCES = \
VBoxDD_DEFS = VBOX_ACPI
ifdef VBOX_WITH_USB
VBoxDD_DEFS += VBOX_WITH_USB
if defined(VBOX_WITH_EHCI) && !defined(VBOX_WITH_EXTPACK_PUEL)
VBoxDD_DEFS += VBOX_WITH_EHCI
endif
endif
ifdef VBOX_WITH_VUSB
VBoxDD_DEFS += VBOX_WITH_VUSB
endif
ifdef VBOX_WITH_AHCI
VBoxDD_DEFS += VBOX_WITH_AHCI
endif
ifdef VBOX_WITH_INIP
VBoxDD_DEFS += VBOX_WITH_INIP
endif
ifdef VBOX_WITH_E1000
VBoxDD_DEFS += VBOX_WITH_E1000
endif
ifdef VBOX_WITH_VIRTIO
VBoxDD_DEFS += VBOX_WITH_VIRTIO
endif
ifdef VBOX_WITH_BUSLOGIC
VBoxDD_DEFS += VBOX_WITH_BUSLOGIC
endif
ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
VBoxDD_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
endif
ifdef VBOX_WITH_SCSI
VBoxDD_DEFS += VBOX_WITH_SCSI
endif
ifdef VBOX_WITH_LSILOGIC
VBoxDD_DEFS += VBOX_WITH_LSILOGIC
endif
ifdef VBOX_WITH_EFI
VBoxDD_DEFS += VBOX_WITH_EFI
endif
ifdef VBOX_WITH_DRV_DISK_INTEGRITY
VBoxDD_DEFS += VBOX_WITH_DRV_DISK_INTEGRITY
endif
ifdef VBOX_WITH_UDPTUNNEL
VBoxDD_DEFS += VBOX_WITH_UDPTUNNEL
endif
ifdef VBOX_WITH_VDE
VBoxDD_DEFS += VBOX_WITH_VDE
endif
ifdef VBOX_WITH_PCI_PASSTHROUGH
VBoxDD_DEFS += VBOX_WITH_PCI_PASSTHROUGH
endif
VBoxDD_LIBS = \
$(PATH_LIB)/DevicesR3$(VBOX_SUFF_LIB) \
$(PATH_LIB)/Drivers$(VBOX_SUFF_LIB) \
$(PATH_LIB)/VgaDefBiosLogo$(VBOX_SUFF_LIB) \
$(LIB_VMM) \
$(LIB_RUNTIME)
ifeq ($(KBUILD_TARGET),win)
VBoxDD_LIBS += \
$(LIB_DDU) \
$(PATH_LIB)/VBoxDD2.lib \
$(PATH_SDK_DXSDK_LIB)/dxguid.lib
else
VBoxDD_LIBS += \
$(INSTARGET_VBoxDDU) \
$(INSTARGET_VBoxDD2)
endif
ifeq ($(KBUILD_TARGET),l4)
VBoxDD_LIBS += \
$(L4_LIBDIR)/libl4sys.p.a
endif
ifdef VBOX_WITH_HGSMI
VBoxDD_LIBS += \
$(PATH_LIB)/HGSMIHostR3Lib$(VBOX_SUFF_LIB)
endif
ifdef VBOX_WITH_NETFLT
VBoxDD_LIBS.win += $(PATH_LIB)/WinNetConfig.lib
endif
ifdef VBOX_WITH_EFI
VBoxDD_LIBS += $(PATH_LIB)/EfiThunkBin$(VBOX_SUFF_LIB)
endif
ifeq ($(KBUILD_TARGET),solaris)
VBoxDD_LIBS += adm
ifdef VBOX_WITH_SUID_WRAPPER
VBoxDD_LIBS += secdb
endif
ifdef VBOX_WITH_USB
VBoxDD_LIBS += aio
endif
endif
VBoxDD_LIBS.darwin += \
$(LIB_REM)
VBoxDD_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD.dylib \
-framework CoreAudio \
-framework AudioUnit \
-framework AudioToolbox \
-framework IOKit \
-framework Carbon \
-framework DiskArbitration
VBoxDD_LDFLAGS.linux = -Wl,--no-undefined
VBoxDD_LDFLAGS.l4 = -Wl,--no-undefined
#
# VBoxDD2 (shared object)
#
VBoxDD2_TEMPLATE = VBoxR3DllWarnNoPic
VBoxDD2_DEFS = IN_VBOXDD2
VBoxDD2_INCS := \
build \
$(PATH_SUB_CURRENT)
VBoxDD2_SOURCES = \
VBoxDD2_LIBS = \
$(PATH_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
$(PATH_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
$(if $(VBOX_WITH_PXE_ROM),$(PATH_LIB)/NetBiosBin$(VBOX_SUFF_LIB),) \
$(LIB_VMM) \
$(LIB_RUNTIME)
ifeq ($(KBUILD_TARGET),l4)
VBoxDD2_LIBS += \
$(L4_LIBDIR)/libl4sys.p.a
endif
VBoxDD2_LIBS.darwin += $(LIB_REM)
VBoxDD2_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD2.dylib
VBoxDD2_LDFLAGS.linux = -Wl,--no-undefined
VBoxDD2_LDFLAGS.l4 = -Wl,--no-undefined
ifdef VBOX_WITH_PXE_ROM
VBoxDD2_DEFS += VBOX_WITH_PXE_ROM
endif
#
# DevicesR3 (library)
#
DevicesR3_TEMPLATE = VBoxR3DllWarnNoPic
DevicesR3_SDKS.win = WINPSDK W2K3DDK
DevicesR3_DEFS.darwin.x86 = VBOX_WITH_2X_4GB_ADDR_SPACE
DevicesR3_DEFS += \
VBOX_HGCM_HOST_CODE \
VBOX_WITH_HGCM \
$(if $(VBOX_BIOS_DMI_FALLBACK),VBOX_BIOS_DMI_FALLBACK,) \
$(if $(VBOX_WITH_PCI_PASSTHROUGH),VBOX_WITH_PCI_PASSTHROUGH,)
DevicesR3_DEFS.linux += _GNU_SOURCE
DevicesR3_DEFS.l4 += _GNU_SOURCE
DevicesR3_INCS = \
build
DevicesR3_SOURCES = \
$(if $(VBOX_WITH_PCI_PASSTHROUGH),Bus/DevPciRaw.cpp,) \
ifdef VBOX_WITH_E1000
DevicesR3_DEFS += VBOX_WITH_E1000
DevicesR3_SOURCES += \
endif
ifdef VBOX_WITH_VIRTIO
DevicesR3_DEFS += VBOX_WITH_VIRTIO
DevicesR3_SOURCES += \
endif
ifdef VBOX_WITH_HGSMI
DevicesR3_DEFS += VBOX_WITH_HGSMI
DevicesR3_SOURCES += \
endif
ifdef VBOX_WITH_WDDM
DevicesR3_DEFS += VBOX_WITH_WDDM
DevicesR3_SOURCES += \
endif
ifdef VBOX_WITH_VDMA
DevicesR3_DEFS += VBOX_WITH_VDMA
DevicesR3_SOURCES += \
endif
ifdef VBOX_WITH_CRHGSMI
DevicesR3_DEFS += VBOX_WITH_CRHGSMI
endif
ifdef VBOXWDDM_TEST_UHGSMI
DevicesR3_DEFS += VBOXWDDM_TEST_UHGSMI
endif
ifdef VBOXWDDM_WITH_VBVA
DevicesR3_DEFS += VBOXWDDM_WITH_VBVA
endif
ifdef VBOX_WITH_VIDEOHWACCEL
DevicesR3_DEFS += VBOX_WITH_VIDEOHWACCEL
endif
ifdef VBOX_WITH_DMI_CHASSIS
DevicesR3_DEFS += VBOX_WITH_DMI_CHASSIS
endif
ifdef VBOX_WITH_DMI_OEMSTRINGS
DevicesR3_DEFS += VBOX_WITH_DMI_OEMSTRINGS
endif
ifdef VBOX_WITH_PXE_ROM
DevicesR3_DEFS += VBOX_WITH_PXE_ROM
endif
ifdef VBOX_WITH_INIP
DevicesR3_INCS += \
DevicesR3_SOURCES += \
DevicesR3_DEFS += VBOX_WITH_INIP
endif
ifdef VBOX_WITH_AHCI
DevicesR3_DEFS += VBOX_WITH_AHCI IN_AHCI_R3
DevicesR3_SOURCES += \
endif
ifdef VBOX_WITH_BUSLOGIC
DevicesR3_DEFS += VBOX_WITH_BUSLOGIC
DevicesR3_SOURCES += \
endif
ifdef VBOX_WITH_LSILOGIC
DevicesR3_DEFS += VBOX_WITH_LSILOGIC
DevicesR3_SOURCES += \
endif
ifdef VBOX_WITH_EFI
DevicesR3_DEFS += VBOX_WITH_EFI
ifdef VBOX_WITH_ALT_EFITHUNK
DevicesR3_DEFS += VBOX_WITH_ALT_EFITHUNK
endif
DevicesR3_SOURCES += EFI/DevEFI.cpp
endif
ifdef VBOX_WITH_MSI_DEVICES
DevicesR3_DEFS += VBOX_WITH_MSI_DEVICES
endif
ifdef VBOX_WITH_DYNAMIC_DSDT
DevicesR3_DEFS += VBOX_WITH_DYNAMIC_DSDT
endif
ifdef VBOX_WITH_VUSB
DevicesR3_DEFS += VBOX_WITH_VUSB
DevicesR3_SOURCES += \
endif
ifdef VBOX_WITH_USB
DevicesR3_DEFS += VBOX_WITH_USB
if defined(VBOX_WITH_EHCI) && !defined(VBOX_WITH_EXTPACK_PUEL)
DevicesR3_DEFS += VBOX_WITH_EHCI
DevicesR3_SOURCES += \
endif
endif
ifdef VBOX_WITH_DTRACE_R3
DevicesR3_DEFS += VBOX_WITH_DTRACE
DevicesR3_INCS += $(DevicesR3_0_OUTDIR)
DevicesR3_INTERMEDIATES += $(DevicesR3_0_OUTDIR)/VBoxDD-dtrace.h
$$(DevicesR3_0_OUTDIR)/VBoxDD-dtrace.h: $(PATH_SUB_CURRENT)/build/VBoxDD-dtrace.d | $$(dir $$@)
dtrace -C -h -o $@ -s $<
endif
ifdef VBOX_WITH_DYNAMIC_DSDT
DevicesR3_CLEAN += $(DevicesR3_0_OUTDIR)/vboxdsl.hex
PC/ACPI/VBoxAcpi.cpp_DEPS = $(DevicesR3_0_OUTDIR)/vboxdsl.hex
$$(DevicesR3_0_OUTDIR)/vboxdsl.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
$(call MSG_TOOL,bin2c,DevicesR3,$<,$@)
$(QUIET)$(VBOX_BIN2C) -export VboxDslSource $< $@
vboxdsl.hex:: $$(DevicesR3_0_OUTDIR)/vboxdsl.hex
else # !VBOX_WITH_DYNAMIC_DSDT
DevicesR3_CLEAN += \
$(DevicesR3_0_OUTDIR)/vboxaml.hex \
$(DevicesR3_0_OUTDIR)/vboxaml.aml \
$(DevicesR3_0_OUTDIR)/vboxssdt-standard.hex \
$(DevicesR3_0_OUTDIR)/vboxssdt-standard.aml \
$(DevicesR3_0_OUTDIR)/vboxssdt-standard.aml.tmp \
$(DevicesR3_0_OUTDIR)/vboxssdt-cpuhotplug.hex \
$(DevicesR3_0_OUTDIR)/vboxssdt-cpuhotplug.aml \
$(DevicesR3_0_OUTDIR)/vboxssdt-cpuhotplug.aml.tmp \
$(DevicesR3_0_OUTDIR)/vboxssdt-cpuhotplug.aml.pre
$(DevicesR3_0_OUTDIR)/vboxaml.hex \
$(DevicesR3_0_OUTDIR)/vboxssdt-standard.hex \
$(DevicesR3_0_OUTDIR)/vboxssdt-cpuhotplug.hex
$$(DevicesR3_0_OUTDIR)/vboxaml.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
$(call MSG_TOOL,iasl,DevicesR3,$<,$@)
$(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
vboxaml.hex:: $$(DevicesR3_0_OUTDIR)/vboxaml.hex
$$(DevicesR3_0_OUTDIR)/vboxssdt-standard.hex: $(PATH_SUB_CURRENT)/PC/vbox-standard.dsl | $$(dir $$@)
$(call MSG_TOOL,iasl,DevicesR3,$<,$@)
$(QUIET)$(RM) -f $@ $@.tmp
$(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
$(QUIET)$(MV) -f $@ $@.tmp
$(QUIET)$(SED) "s/AmlCode/AmlCodeSsdtStandard/g" \
--output $@ $@.tmp
$(QUIET)$(RM) -f $@.tmp
vboxssdt-standard.hex:: $$(DevicesR3_0_OUTDIR)/vboxssdt-standard.hex
$$(DevicesR3_0_OUTDIR)/vboxssdt-cpuhotplug.hex: $(PATH_SUB_CURRENT)/PC/vbox-cpuhotplug.dsl | $$(dir $$@)
$(call MSG_TOOL,iasl,DevicesR3,$<,$@)
$(QUIET)$(RM) -f $@ $@.tmp $@.pre
$(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -P -x c -o $@.pre $<
$(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $@.pre
$(QUIET)$(MV) -f $@ $@.tmp
$(QUIET)$(SED) "s/AmlCode/AmlCodeSsdtCpuHotPlug/g" \
--output $@ $@.tmp
$(QUIET)$(RM) -f $@.tmp $@.pre
vboxssdt-cpuhotplug.hex:: $$(DevicesR3_0_OUTDIR)/vboxssdt-cpuhotplug.hex
endif # !VBOX_WITH_DYNAMIC_DSDT
PC/ACPI/VBoxAcpi.cpp_INCS = $(DevicesR3_0_OUTDIR)
# For finding PCIInternal.h from VBox/pci.h.
Bus/DevPCI.cpp_INCS = Bus
Bus/DevPciIch9.cpp_INCS = Bus
Bus/MsiCommon.cpp_INCS = Bus
Bus/MsixCommon.cpp_INCS = Bus
Bus/DevPciRaw.cpp_INCS = Bus
# For finding and generating vbetables.h (see Graphics/BIOS/Makefile.kmk).
Graphics/DevVGA.cpp_INCS = $(VgaBiosBin_0_OUTDIR)
Graphics/DevVGA.cpp_DEPS = $(VgaBiosBin_0_OUTDIR)/vbetables.h
ifdef VBOX_WITH_RAW_MODE
#
# VBoxDDGC (sysmod)
#
VBoxDDGC_TEMPLATE = VBoxRc
ifeq ($(KBUILD_TARGET_ARCH),x86)
VBoxDDGC_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
endif
VBoxDDGC_DEFS = VBOX_WITH_HGCM
VBoxDDGC_INCS = build
VBoxDDGC_SOURCES = \
ifdef VBOX_WITH_E1000
VBoxDDGC_DEFS += VBOX_WITH_E1000
VBoxDDGC_SOURCES += \
endif
ifdef VBOX_WITH_VIRTIO
VBoxDDGC_DEFS += VBOX_WITH_VIRTIO
VBoxDDGC_SOURCES += \
endif
ifdef VBOX_WITH_HGSMI
VBoxDDGC_DEFS += VBOX_WITH_HGSMI
endif
ifdef VBOX_WITH_WDDM
VBoxDDGC_DEFS += VBOX_WITH_WDDM
endif
ifdef VBOX_WITH_VDMA
VBoxDDGC_DEFS += VBOX_WITH_VDMA
endif
ifdef VBOX_WITH_CRHGSMI
VBoxDDGC_DEFS += VBOX_WITH_CRHGSMI
endif
ifdef VBOXWDDM_WITH_VBVA
VBoxDDGC_DEFS += VBOXWDDM_WITH_VBVA
endif
ifdef VBOX_WITH_VUSB
VBoxDDGC_DEFS += VBOX_WITH_VUSB
VBoxDDGC_SOURCES += \
endif
ifdef VBOX_WITH_USB
VBoxDDGC_DEFS += VBOX_WITH_USB
if defined(VBOX_WITH_EHCI) && !defined(VBOX_WITH_EXTPACK_PUEL)
VBoxDDGC_DEFS += VBOX_WITH_EHCI
VBoxDDGC_SOURCES += \
endif
endif
ifdef VBOX_WITH_VIDEOHWACCEL
VBoxDDGC_DEFS += VBOX_WITH_VIDEOHWACCEL
endif
ifdef VBOX_WITH_AHCI
VBoxDDGC_DEFS += VBOX_WITH_AHCI IN_AHCI_GC
VBoxDDGC_SOURCES += \
endif
ifdef VBOX_WITH_BUSLOGIC
VBoxDDGC_DEFS += VBOX_WITH_BUSLOGIC
VBoxDDGC_SOURCES += \
endif
ifdef VBOX_WITH_LSILOGIC
VBoxDDGC_DEFS += VBOX_WITH_LSILOGIC
VBoxDDGC_SOURCES += \
endif
if1of ($(VBOX_LDR_FMT32), pe lx)
VBoxDDGC_LIBS = \
$(PATH_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
$(PATH_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
endif
endif # VBOX_WITH_RAW_MODE
#
# VBoxDDR0 (sysmod)
#
VBoxDDR0_TEMPLATE = VBoxR0
VBoxDDR0_DEFS.darwin.x86= VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 VBOX_WITH_2X_4GB_ADDR_SPACE
VBoxDDR0_DEFS = IN_RT_R0 VBOX_WITH_HGCM # - WTF is IN_RT_R0 doing here?
VBoxDDR0_INCS = build
VBoxDDR0_SOURCES = \
$(if $(VBOX_WITH_PCI_PASSTHROUGH),Bus/DevPciRaw.cpp,) \
\
ifdef VBOX_WITH_E1000
VBoxDDR0_DEFS += VBOX_WITH_E1000
VBoxDDR0_SOURCES += \
endif
ifdef VBOX_WITH_VIRTIO
VBoxDDR0_DEFS += VBOX_WITH_VIRTIO
VBoxDDR0_SOURCES += \
endif
ifdef VBOX_WITH_HGSMI
VBoxDDR0_DEFS += VBOX_WITH_HGSMI
endif
ifdef VBOX_WITH_WDDM
VBoxDDR0_DEFS += VBOX_WITH_WDDM
endif
ifdef VBOX_WITH_VDMA
VBoxDDR0_DEFS += VBOX_WITH_VDMA
endif
ifdef VBOX_WITH_CRHGSMI
VBoxDDR0_DEFS += VBOX_WITH_CRHGSMI
endif
ifdef VBOXWDDM_WITH_VBVA
VBoxDDR0_DEFS += VBOXWDDM_WITH_VBVA
endif
ifdef VBOX_WITH_VUSB
VBoxDDR0_DEFS += VBOX_WITH_VUSB
VBoxDDR0_SOURCES += \
endif
ifdef VBOX_WITH_USB
VBoxDDR0_DEFS += VBOX_WITH_USB
if defined(VBOX_WITH_EHCI) && !defined(VBOX_WITH_EXTPACK_PUEL)
VBoxDDR0_DEFS += VBOX_WITH_EHCI
VBoxDDR0_SOURCES += \
endif
endif
ifdef VBOX_WITH_AHCI
VBoxDDR0_DEFS += VBOX_WITH_AHCI IN_AHCI_R0
VBoxDDR0_SOURCES += \
endif
ifdef VBOX_WITH_BUSLOGIC
VBoxDDR0_DEFS += VBOX_WITH_BUSLOGIC
VBoxDDR0_SOURCES += \
endif
ifdef VBOX_WITH_LSILOGIC
VBoxDDR0_DEFS += VBOX_WITH_LSILOGIC
VBoxDDR0_SOURCES += \
endif
ifdef VBOX_WITH_HGSMI
VBoxDDR0_DEFS += VBOX_WITH_HGSMI
endif
ifdef VBOX_WITH_VIDEOHWACCEL
VBoxDDR0_DEFS += VBOX_WITH_VIDEOHWACCEL
endif
if1of ($(VBOX_LDR_FMT), pe lx)
VBoxDDR0_LIBS = \
$(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB) \
$(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
endif
ifdef VBOX_WITH_RAW_MODE
#
# VBoxDD2GC (LGPL sysmod)
#
VBoxDD2GC_TEMPLATE = VBoxRc
VBoxDD2GC_DEFS =
VBoxDD2GC_INCS = build
VBoxDD2GC_SOURCES = \
if1of ($(VBOX_LDR_FMT32), pe lx)
VBoxDD2GC_LIBS = \
$(PATH_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
$(PATH_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
endif
endif
#
# VBoxDD2R0 (LGPL sysmod)
#
VBoxDD2R0_TEMPLATE = VBoxR0
VBoxDD2R0_DEFS = IN_RT_R0
VBoxDD2R0_INCS = build
VBoxDD2R0_SOURCES = \
if1of ($(VBOX_LDR_FMT), pe lx)
VBoxDD2R0_LIBS = \
$(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB) \
$(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
endif
#
# Drivers (library)
#
ifeq ($(KBUILD_TARGET),l4) # We are using real Linux headers, not the cleaned up user space ones
Drivers_TEMPLATE = VBOXR3NP
else
Drivers_TEMPLATE = VBoxR3DllWarnNoPic
endif
Drivers_SDKS.win = WINPSDK W2K3DDK
Storage/DrvHostDVD.cpp_SDKS.win = W2K3DDK
Drivers_DEFS.win += _WIN32_WINNT=0x0510
Drivers_DEFS = \
IN_IDE_R3 \
$(if $(VBOX_WITH_NETFLT),VBOX_WITH_NETFLT,) \
$(if $(VBOX_WITH_INIP),VBOX_WITH_INIP,) \
$(if $(VBOX_WITH_DRV_DISK_INTEGRITY),VBOX_WITH_DRV_DISK_INTEGRITY,) \
Drivers_INCS := \
build \
Drivers_SOURCES = \
VBOX_SLIRP_SOURCES = \
ifdef VBOX_WITH_SLIRP_BSD_SBUF
VBOX_SLIRP_SOURCES += Network/slirp/bsd/kern/subr_sbuf.c
endif
VBOX_SLIRP_BSD_ARCH = $(subst x86,i386,$(KBUILD_TARGET_ARCH))
VBOX_SLIRP_BSD_SOURCES += \
Network/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/in_cksum.c
VBOX_SLIRP_ALIAS_SOURCES = \
# some day will be deleted
Drivers_SOURCES += $(VBOX_SLIRP_SOURCES)
define def_vbox_slirp_cflags
$(file)_DEFS += \
$(if $(VBOX_WITH_SLIRP_BSD_SBUF),VBOX_WITH_SLIRP_BSD_SBUF,) \
$(if $(VBOX_WITH_SLIRP_MEMORY_CHECK),RTMEM_WRAP_TO_EF_APIS,) \
$(if $(VBOX_WITH_DEBUG_NAT_SOCKETS),VBOX_WITH_DEBUG_NAT_SOCKETS,) \
$(if $(VBOX_WITH_SLIRP_MT),VBOX_WITH_SLIRP_MT,)
$(file)_INCS += $(1)/slirp/bsd/sys
$(file)_INCS += $(1)/slirp/bsd/sys/sys
$(file)_INCS += $(1)/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/include
$(file)_INCS += $(1)/slirp/bsd/netinet
$(file)_INCS += $(1)/slirp
$(file)_INCS += $(1)/slirp/libalias
ifeq ($(KBUILD_TARGET),win)
$(file)_CFLAGS = -wd4018
else
$(file)_CFLAGS += -Wno-sign-compare
$(file)_CFLAGS += -Wno-format
$(file)_CFLAGS += -Wno-bad-function-cast
endif
endef
$(foreach file,$(VBOX_SLIRP_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
Drivers_SOURCES += $(VBOX_SLIRP_ALIAS_SOURCES)
define def_vbox_slirp_alias_cflags
$(file)_DEFS += VBOX_SLIRP_ALIAS \
$(if $(VBOX_WITH_DEBUG_LIBALIAS),VBOX_WITH_DEBUG_LIBALIAS,)
$(file)_INCS += $(1)/slirp/libalias
$(file)_INCS += $(1)/slirp
$(file)_INCS += $(1)/slirp/dnsproxy
ifneq ($(KBUILD_TARGET),win)
$(file)_CFLAGS += -Wno-shadow
endif
endef
$(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
$(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_alias_cflags, Network)))
VBOX_SLIRP_BSD_SOURCES += $(VBOX_SLIRP_BSD_SOURCES.${KBUILD_TARGET_ARCH})
Drivers_SOURCES += $(VBOX_SLIRP_BSD_SOURCES)
define def_vbox_slirp_bsd_cflags
$(file)_DEFS += VBOX_SLIRP_BSD
$(file)_INCS += $(1)/slirp/dnsproxy
endef
$(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
$(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_bsd_cflags, Network)))
ifdef VBOX_WITH_DRV_DISK_INTEGRITY
Drivers_SOURCES += \
endif
ifdef VBOX_WITH_UDPTUNNEL
Drivers_SOURCES += \
Drivers_DEFS += VBOX_WITH_UDPTUNNEL
endif
ifdef VBOX_WITH_VDE
Drivers_SOURCES += \
Drivers_DEFS += VBOX_WITH_VDE
endif
# -- OS specific --
ifeq ($(KBUILD_TARGET),darwin)
Drivers_SOURCES := $(filter-out \
, $(Drivers_SOURCES)) \
endif # darwin
ifeq ($(KBUILD_TARGET),freebsd)
Drivers_SOURCES := $(filter-out \
, $(Drivers_SOURCES)) \
endif # freebsd
ifeq ($(KBUILD_TARGET),l4)
Drivers_SOURCES = \
endif # l4
ifeq ($(KBUILD_TARGET),os2)
Drivers_SOURCES := $(filter-out \
, $(Drivers_SOURCES))
endif
ifeq ($(KBUILD_TARGET),solaris)
Drivers_SOURCES := $(filter-out \
, $(Drivers_SOURCES))
ifdef VBOX_WITH_SOLARIS_OSS
Drivers_SOURCES += Audio/ossaudio.c
Drivers_DEFS += VBOX_WITH_SOLARIS_OSS
endif
ifdef VBOX_WITH_CROSSBOW
Drivers_SOURCES += Network/solaris/vbox-libdlpi.cpp
Drivers_DEFS += VBOX_WITH_CROSSBOW
endif
ifdef VBOX_WITH_SUID_WRAPPER
Drivers_DEFS += VBOX_WITH_SUID_WRAPPER
endif
endif
if defined(VBOX_WITH_NETFLT)
if defined(VBOX_NETFLT_ONDEMAND_BIND)
Drivers_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
endif
endif
# -- features --
ifdef VBOX_WITH_ISCSI
endif # VBOX_WITH_ISCSI
ifdef VBOX_WITH_ALSA
Drivers_DEFS.linux += VBOX_WITH_ALSA
endif
ifdef VBOX_WITH_PULSE
Drivers_DEFS.linux += VBOX_WITH_PULSE
Drivers_DEFS.freebsd += VBOX_WITH_PULSE
endif
ifdef VBOX_WITH_VUSB
Drivers_DEFS += VBOX_WITH_VUSB
Drivers_SOURCES += \
endif # VBOX_WITH_VUSB
ifdef VBOX_WITH_USB
Drivers_DEFS += VBOX_WITH_USB
Drivers_SOURCES += \
Drivers_DEFS.darwin += VUSB_HAVE_USBPROXY_DEVICE
ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
Drivers_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
endif
Drivers_DEFS.linux += \
VUSB_HAVE_USBPROXY_DEVICE \
$(if $(VBOX_WITH_LINUX_COMPILER_H),VBOX_WITH_LINUX_COMPILER_H,) \
$(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,)
Drivers_DEFS.l4 += VUSB_HAVE_USBPROXY_DEVICE
Drivers_SOURCES.l4 += \
Drivers_DEFS.os2 += VUSB_HAVE_USBPROXY_DEVICE
Drivers_INCS.os2 += $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
Drivers_SOURCES.os2 += \
Drivers_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
Drivers_SOURCES.win += \
Drivers_DEFS.solaris += VUSB_HAVE_USBPROXY_DEVICE
Drivers_DEFS.freebsd += VUSB_HAVE_USBPROXY_DEVICE
ifdef VBOX_WITH_SCSI
Drivers_SOURCES += \
endif
endif # VBOX_WITH_USB
ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
Drivers_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
endif #VBOX_WITH_PDM_ASYNC_COMPLETION
ifdef VBOX_WITH_SCSI
Drivers_DEFS += VBOX_WITH_SCSI
Drivers_SOURCES += \
endif # VBOX_WITH_SCSI
#
# Ring-0 Services (library, linked into VMMR0.r0)
#
ServicesR0_TEMPLATE = VBoxR0
ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0 $(if $(VBOX_WITH_PCI_PASSTHROUGH),IN_PCIRAW_R0,)
ServicesR0_SOURCES = \
$(if $(VBOX_WITH_PCI_PASSTHROUGH),Bus/SrvPciRawR0.cpp,)
Network/SrvIntNetR0.cpp_CXXFLAGS := $(if-expr $(KBUILD_TARGET) == "win",,$(VBOX_GCC_Wno-array_bounds))
#
# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
#
ifdef VBOX_WITH_TESTCASES
PROGRAMS += tstIntNetR0
tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
tstIntNetR0_DEFS = IN_INTNET_R0
tstIntNetR0_SOURCES = \
endif
#
# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
#
ifdef VBOX_WITH_TESTCASES
PROGRAMS += tstIntNet-1
tstIntNet-1_TEMPLATE = VBOXR3TSTEXE
tstIntNet-1_SOURCES = \
endif
#
# EEPROM device unit test requires cppunit
#
ifdef VBOX_WITH_CPPUNIT_TESTCASES
ifdef VBOX_WITH_E1000
PROGRAMS += tstDevEEPROM
tstDevEEPROM_TEMPLATE = VBOXCPPUNITEXE
tstDevEEPROM_SOURCES = \
tstDevEEPROM_LIBS = \
$(TARGET_DevicesR3)
PROGRAMS += tstDevPhy
tstDevPhy_TEMPLATE = VBOXCPPUNITEXE
tstDevPhy_SOURCES = \
tstDevPhy_DEFS = PHY_UNIT_TEST
endif
endif
endif # !VBOX_ONLY_EXTPACKS
ifdef VBOX_WITH_EXTPACK_PUEL
#
# The EHCI (USB 2.0) Extension Pack Modules.
#
if defined(VBOX_WITH_USB)
DLLS += VBoxEhciR3
VBoxEhciR3_TEMPLATE = VBoxR3ExtPackPuel
VBoxEhciR3_SOURCES = USB/DevEHCI.cpp
SYSMODS += VBoxEhciR0
VBoxEhciR0_TEMPLATE = VBoxR0ExtPackPuel
VBoxEhciR0_SOURCES = USB/DevEHCI.cpp
ifdef VBOX_WITH_RAW_MODE
SYSMODS += VBoxEhciRC
VBoxEhciRC_TEMPLATE = VBoxRcExtPackPuel
VBoxEhciRC_SOURCES = USB/DevEHCI.cpp
endif
endif
#
# The Intel PXE rom.
#
INSTALLS += VBoxExtPackPuelInsRoms
VBoxExtPackPuelInsRoms_TEMPLATE = VBoxInsExtPackPuel
VBoxExtPackPuelInsRoms_SOURCES = PC/PXE/PXE-Intel.rom=>PXE-Intel.rom
endif # VBOX_WITH_EXTPACK_PUEL
include $(KBUILD_PATH)/subfooter.kmk