Makefile.kmk revision 1cbd986cba1fb6da5e65c44868b54f231836295e
# $Id$
## @file
# Top-level sub-makefile for the devices, drivers and services.
#
#
# Copyright (C) 2006-2014 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
# Make sure our Config.kmk is included.
ifndef VBOX_DEVICES_CONFIG_KMK_INCLUDED
include $(PATH_SUB_CURRENT)/Config.kmk
endif
# Include sub-makefiles.
include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
include $(PATH_SUB_CURRENT)/Input/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)
if !defined(VBOX_WITHOUT_IPXE)
include $(PATH_SUB_CURRENT)/PC/ipxe/Makefile.kmk
endif
endif
if !defined(VBOX_ONLY_EXTPACKS) # Goes on almost to the end of the file.
include $(PATH_SUB_CURRENT)/BiosCommonCode/Makefile.kmk
include $(PATH_SUB_CURRENT)/PC/BIOS/Makefile.kmk
include $(PATH_SUB_CURRENT)/Graphics/BIOS/Makefile.kmk
#
# Main targets.
#
LIBRARIES += 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 = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK)
if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
VBoxDDU_DEFS += VBOX_WITH_EHCI_IMPL
endif
if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
VBoxDDU_DEFS += VBOX_WITH_XHCI_IMPL
endif
ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
VBoxDDU_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
endif
else
VBoxDDU_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK)
endif
VBoxDDU_SOURCES = \
Storage/VSCSI/VSCSIDevice.cpp \
Storage/VSCSI/VSCSILun.cpp \
Storage/VSCSI/VSCSILunSbc.cpp \
Storage/VSCSI/VSCSILunMmc.cpp \
Storage/VSCSI/VSCSISense.cpp \
Storage/VSCSI/VSCSIIoReq.cpp \
Storage/VSCSI/VSCSIVpdPagePool.cpp \
build/VBoxDDUDeps.cpp
ifdef VBOX_WITH_USB
VBoxDDU_INCS.os2 += \
$(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
endif
VBoxDDU_LIBS = \
$(LIB_RUNTIME) \
$(PATH_STAGE_LIB)/StorageLib$(VBOX_SUFF_LIB)
ifdef VBOX_WITH_USB
VBoxDDU_LIBS += \
$(PATH_STAGE_LIB)/USBLib$(VBOX_SUFF_LIB)
VBoxDDU_LIBS.win += \
$(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
$(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib
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
#
# VBoxDD (shared object)
#
VBoxDD_TEMPLATE = VBoxR3DllWarnNoPic
VBoxDD_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
Storage/DrvHostDVD.cpp_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK)
VBoxDD_INCS = \
build \
Network/slirp
VBoxDD_DEFS = \
VBOX_ACPI \
VBOX_HGCM_HOST_CODE \
$(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
$(if $(VBOX_BIOS_DMI_FALLBACK),VBOX_BIOS_DMI_FALLBACK,) \
VBOX_WITH_DMI_CHASSIS \
VBOX_WITH_DMI_OEMSTRINGS
VBoxDD_DEFS.win = _WIN32_WINNT=0x0510
ifeq ($(KBUILD_TARGET_ARCH),x86)
VBoxDD_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
endif
VBoxDD_SOURCES = \
build/VBoxDD.cpp \
\
Input/DevPS2.cpp \
Input/PS2K.cpp \
Input/PS2M.cpp \
Input/UsbKbd.cpp \
Input/UsbMouse.cpp \
Bus/DevPCI.cpp \
Bus/DevPciIch9.cpp \
Bus/MsiCommon.cpp \
Bus/MsixCommon.cpp \
EFI/DevSmc.cpp \
Graphics/DevVGA.cpp \
Storage/DevATA.cpp \
PC/DevPit-i8254.cpp \
PC/DevPIC.cpp \
PC/DevACPI.cpp \
PC/ACPI/VBoxAcpi.cpp \
PC/DevRTC.cpp \
PC/DevPcBios.cpp \
PC/DevFwCommon.cpp \
PC/DevPcArch.cpp \
GIMDev/GIMDev.cpp \
VMMDev/VMMDev.cpp \
$(if $(VBOX_WITH_HGCM),VMMDev/VMMDevHGCM.cpp,) \
VMMDev/VMMDevTesting.cpp \
Network/DevPCNet.cpp \
Audio/DevIchAc97.cpp \
Audio/DevSB16.cpp \
Audio/DevIchHda.cpp \
Audio/DevIchHdaCodec.cpp \
PC/DevDMA.cpp \
PC/DevHPET.cpp \
Storage/DevFdc.cpp \
Serial/DevSerial.cpp \
Parallel/DevParallel.cpp \
\
Audio/mixeng.c \
Input/DrvKeyboardQueue.cpp \
Input/DrvMouseQueue.cpp \
Network/DrvIntNet.cpp \
Network/DrvDedicatedNic.cpp \
PC/DrvACPI.cpp \
PC/DrvAcpiCpu.cpp \
Serial/DrvChar.cpp \
Serial/DrvNamedPipe.cpp \
Serial/DrvRawFile.cpp \
Storage/DrvBlock.cpp \
Storage/DrvHostBase.cpp \
Storage/DrvHostDVD.cpp \
Storage/DrvHostFloppy.cpp \
Storage/DrvMediaISO.cpp \
Storage/DrvRawImage.cpp \
Storage/Debug.cpp \
Storage/DrvVD.cpp \
Storage/ATAPIPassthrough.cpp \
Network/DrvNetSniffer.cpp \
Network/Pcap.cpp
VBoxDD_LIBS = # more later.
VBoxDD_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD.dylib \
-framework CoreAudio \
-framework AudioUnit \
-framework AudioToolbox \
-framework IOKit \
-framework Carbon \
-framework DiskArbitration \
-framework SystemConfiguration
VBoxDD_LDFLAGS.linux = -Wl,--no-undefined
# --- Tracing bits. ---
ifdef VBOX_WITH_DTRACE_R3
VBoxDD_DEFS += VBOX_WITH_DTRACE
VBoxDD_USES += dtrace
VBoxDD_SOURCES += build/VBoxDD.d
endif
# --- Graphics bits. ---
ifdef VBOX_WITH_CRHGSMI
VBoxDD_DEFS += VBOX_WITH_CRHGSMI
endif
ifdef VBOXWDDM_TEST_UHGSMI
VBoxDD_DEFS += VBOXWDDM_TEST_UHGSMI
endif
ifdef VBOXWDDM_WITH_VBVA
VBoxDD_DEFS += VBOXWDDM_WITH_VBVA
endif
ifdef VBOX_WITH_VIDEOHWACCEL
VBoxDD_DEFS += VBOX_WITH_VIDEOHWACCEL
endif
ifdef VBOX_WITH_HGSMI
VBoxDD_DEFS += VBOX_WITH_HGSMI
VBoxDD_SOURCES += \
Graphics/DevVGA_VBVA.cpp \
Graphics/HGSMI/HGSMIHost.cpp
VBoxDD_LIBS += \
$(PATH_STAGE_LIB)/HGSMIHostR3Lib$(VBOX_SUFF_LIB)
endif
ifdef VBOX_WITH_WDDM
VBoxDD_DEFS += VBOX_WITH_WDDM
VBoxDD_SOURCES += \
Graphics/HGSMI/SHGSMIHost.cpp
endif
ifdef VBOX_WITH_VMSVGA
VBoxDD_DEFS += VBOX_WITH_VMSVGA
VBoxDD_SOURCES += Graphics/DevVGA-SVGA.cpp
endif
ifdef VBOX_WITH_VMSVGA3D
VBoxDD_DEFS += VBOX_WITH_VMSVGA3D
VBoxDD_SOURCES += Graphics/DevVGA-SVGA3d-shared.cpp
ifeq ($(KBUILD_TARGET),win)
VBoxDD_SOURCES += Graphics/DevVGA-SVGA3d-win.cpp
else
VBoxDD_SOURCES += Graphics/DevVGA-SVGA3d-ogl.cpp
VBoxDD_LIBS += $(PATH_STAGE_BIN)/VBoxSVGA3D$(VBOX_SUFF_DLL)
endif
VBoxDD_LIBS.win += d3d9.lib
VBoxDD_LIBS.linux += GL X11
VBoxDD_LDFLAGS.darwin += -framework OpenGL
endif
ifdef VBOX_WITH_VDMA
VBoxDD_DEFS += VBOX_WITH_VDMA
VBoxDD_SOURCES += \
Graphics/DevVGA_VDMA.cpp
endif
ifdef VBOX_VDMA_WITH_WATCHDOG
VBoxDD_DEFS += VBOX_VDMA_WITH_WATCHDOG
endif
ifdef VBOX_WITH_PXE_ROM
VBoxDD_DEFS += VBOX_WITH_PXE_ROM
endif
# --- USB bits. ---
ifdef VBOX_WITH_USB
VBoxDD_DEFS += VBOX_WITH_USB
VBoxDD_SOURCES += \
USB/vrdp/USBProxyDevice-vrdp.cpp
VBoxDD_DEFS.darwin += VUSB_HAVE_USBPROXY_DEVICE
ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
VBoxDD_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
endif
VBoxDD_SOURCES.darwin += \
USB/USBProxyDevice.cpp \
USB/darwin/USBProxyDevice-darwin.cpp
VBoxDD_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,)
VBoxDD_SOURCES.linux += \
USB/USBProxyDevice.cpp \
USB/linux/USBProxyDevice-linux.cpp
VBoxDD_DEFS.os2 += VUSB_HAVE_USBPROXY_DEVICE
VBoxDD_INCS.os2 += $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
VBoxDD_SOURCES.os2 += \
USB/USBProxyDevice.cpp \
USB/os2/USBProxyDevice-os2.cpp
VBoxDD_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
VBoxDD_SOURCES.win += \
USB/USBProxyDevice.cpp \
USB/win/USBProxyDevice-win.cpp
VBoxDD_DEFS.solaris += VUSB_HAVE_USBPROXY_DEVICE
VBoxDD_SOURCES.solaris+= \
USB/USBProxyDevice.cpp \
USB/solaris/USBProxyDevice-solaris.cpp
VBoxDD_DEFS.freebsd += VUSB_HAVE_USBPROXY_DEVICE
VBoxDD_SOURCES.freebsd+= \
USB/USBProxyDevice.cpp \
USB/freebsd/USBProxyDevice-freebsd.cpp
ifdef VBOX_WITH_SCSI
VBoxDD_SOURCES += \
Storage/UsbMsd.cpp
endif
if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
VBoxDD_DEFS += VBOX_WITH_EHCI_IMPL
VBoxDD_SOURCES += \
USB/DevEHCI.cpp
endif
if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
VBoxDD_DEFS += VBOX_WITH_XHCI_IMPL
VBoxDD_SOURCES += \
USB/DevXHCI.cpp
endif
if defined(VBOX_WITH_USB_VIDEO_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
if1of ($(KBUILD_TARGET), linux)
VBoxDD_DEFS += VBOX_WITH_USB_VIDEO_IMPL
VBoxDD_SOURCES += \
$(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/UsbWebcam.cpp \
$(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/UsbWebcamDesc.cpp \
$(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/jpggen.cpp \
$(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/DrvHostWebcam/DrvHostWebcam.cpp \
$(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/DrvHostWebcam/JPEGEnc.cpp
$(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/DrvHostWebcam/JPEGEnc.cpp_INCS = \
$(PATH_ROOT)/src/libs/jpeg-8a
VBoxDD_SOURCES.linux += \
$(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/DrvHostWebcam/HostWebcam-v4l2.cpp
VBoxDD_LIBS += \
$(PATH_STAGE_LIB)/VBox-libjpeg$(VBOX_SUFF_LIB)
endif
endif
endif # VBOX_WITH_USB
ifdef VBOX_WITH_VUSB
VBoxDD_DEFS += VBOX_WITH_VUSB
VBoxDD_SOURCES += \
USB/DevOHCI.cpp \
USB/DrvVUSBRootHub.cpp \
USB/VUSBDevice.cpp \
USB/VUSBReadAhead.cpp \
USB/VUSBUrb.cpp \
USB/VUSBSniffer.cpp
endif
# --- Networking bits. ---
ifdef VBOX_WITH_INIP
VBoxDD_DEFS += VBOX_WITH_INIP
VBoxDD_SOURCES += \
Network/DevINIP.cpp
ifndef VBOX_WITH_NEW_LWIP
include $(PATH_SUB_CURRENT)/Network/lwip/Makefile.kmk
VBoxDD_INCS += $(LWIP_INCS)
VBoxDD_SOURCES += $(LWIP_SOURCES)
else
# XXX: do not depend on order
ifndef LWIP_SOURCES
include $(PATH_SUB_CURRENT)/Network/lwip-new/Makefile.kmk
endif
Network/DevINIP.cpp_DEFS += VBOX_WITH_NEW_LWIP
VBoxDD_LWIP_INCS += Network # for lwipopts.h
$(eval $(call def_vbox_lwip_private, \
VBoxDD, Network/lwip-new))
$(eval $(call def_vbox_lwip_flags, \
VBoxDD, Network/DevINIP.cpp, Network/lwip-new))
endif
endif # VBOX_WITH_INIP
ifdef VBOX_WITH_E1000
VBoxDD_DEFS += VBOX_WITH_E1000
VBoxDD_SOURCES += \
Network/DevE1000.cpp \
Network/DevE1000Phy.cpp \
Network/DevEEPROM.cpp
endif
ifdef VBOX_WITH_VIRTIO
VBoxDD_DEFS += VBOX_WITH_VIRTIO
VBoxDD_SOURCES += \
VirtIO/Virtio.cpp \
Network/DevVirtioNet.cpp
endif
ifdef VBOX_WITH_UDPTUNNEL
VBoxDD_DEFS += VBOX_WITH_UDPTUNNEL
VBoxDD_SOURCES += \
Network/DrvUDPTunnel.cpp
endif
ifdef VBOX_WITH_VDE
VBoxDD_DEFS += VBOX_WITH_VDE
VBoxDD_SOURCES += \
Network/DrvVDE.cpp \
Network/VDEPlug.cpp
endif
ifdef VBOX_WITH_NETSHAPER
VBoxDD_DEFS += VBOX_WITH_NETSHAPER
VBoxDD_SOURCES += \
Network/DrvNetShaper.cpp
endif
# --- Storage bits. ---
ifdef VBOX_WITH_AHCI
VBoxDD_DEFS += VBOX_WITH_AHCI IN_AHCI_R3
VBoxDD_SOURCES += \
Storage/DevAHCI.cpp
endif
ifdef VBOX_WITH_BUSLOGIC
VBoxDD_DEFS += VBOX_WITH_BUSLOGIC
VBoxDD_SOURCES += \
Storage/DevBusLogic.cpp \
Storage/VBoxSCSI.cpp
endif
ifdef VBOX_WITH_LSILOGIC
VBoxDD_DEFS += VBOX_WITH_LSILOGIC
VBoxDD_SOURCES += \
Storage/DevLsiLogicSCSI.cpp
endif
ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
VBoxDD_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
endif
ifdef VBOX_WITH_SCSI
VBoxDD_DEFS += VBOX_WITH_SCSI
VBoxDD_SOURCES += \
Storage/DrvSCSI.cpp
VBoxDD_SOURCES.linux += \
Storage/DrvSCSIHost.cpp
endif
ifdef VBOX_WITH_ISCSI
ifdef VBOX_WITH_NEW_LWIP
Storage/DrvVD.cpp_DEFS += VBOX_WITH_NEW_LWIP
$(eval $(call def_vbox_lwip_flags, \
VBoxDD, Storage/DrvVD.cpp, Network/lwip-new))
else
Storage/DrvVD.cpp_INCS = $(LWIP_INCS)
endif
endif
ifdef VBOX_WITH_DRV_DISK_INTEGRITY
VBoxDD_DEFS += VBOX_WITH_DRV_DISK_INTEGRITY
VBoxDD_SOURCES += \
Storage/DrvDiskIntegrity.cpp
VBoxDD_LIBS += \
$(PATH_STAGE_LIB)/StorageDbgLib$(VBOX_SUFF_LIB)
endif
ifdef VBOX_WITH_EFI
VBoxDD_DEFS += VBOX_WITH_EFI
VBoxDD_SOURCES += EFI/DevEFI.cpp
EFI/DevEFI.cpp_INCS += EFI/Firmware/BaseTools/Source/C/Include
EFI/DevEFI.cpp_INCS.x86 += EFI/Firmware/BaseTools/Source/C/Include/Ia32
EFI/DevEFI.cpp_INCS.amd64 += EFI/Firmware/BaseTools/Source/C/Include/X64
endif
if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
VBoxDD_DEFS += VBOX_WITH_PCI_PASSTHROUGH_IMPL
VBoxDD_SOURCES += \
Bus/DevPciRaw.cpp \
Bus/DrvPciRaw.cpp
endif
ifdef VBOX_WITH_MSI_DEVICES
VBoxDD_DEFS += VBOX_WITH_MSI_DEVICES
endif
ifdef VBOX_WITH_DYNAMIC_DSDT
VBoxDD_DEFS += VBOX_WITH_DYNAMIC_DSDT
endif
# --- Input bits. ---
ifdef VBOX_WITH_NEW_PS2M
VBoxDD_DEFS += VBOX_WITH_NEW_PS2M
endif
# --- Audio bits. ---
ifdef VBOX_WITH_PDM_AUDIO_DRIVER
VBoxDD_DEFS +=VBOX_WITH_PDM_AUDIO_DRIVER
endif
ifdef VBOX_WITH_PDM_AUDIO_DRIVER
VBoxDD_SOURCES += Audio/DrvAudio.c \
Audio/DrvAudioUtil.c \
Audio/DrvHostNullAudio.c
else
VBoxDD_SOURCES += Audio/audio.c \
Audio/audiosniffer.c \
Audio/noaudio.c \
Audio/filteraudio.c
endif
ifdef VBOX_WITH_ALSA
VBoxDD_DEFS.linux += VBOX_WITH_ALSA
ifdef VBOX_WITH_PDM_AUDIO_DRIVER
VBoxDD_DEFS.linux += VBOX_WITH_WITH_PDM_AUDIO_DRIVER
VBoxDD_SOURCES.linux += \
Audio/DrvHostAlsaAudio.c \
Audio/alsa_stubs.c
else
VBoxDD_SOURCES.linux += \
Audio/alsaaudio.c \
Audio/alsa_stubs.c
endif
endif
ifdef VBOX_WITH_PULSE
VBoxDD_DEFS.linux += VBOX_WITH_PULSE
ifdef VBOX_WITH_PDM_AUDIO_DRIVER
VBoxDD_DEFS.linux += VBOX_WITH_PDM_AUDIO_DRIVER
VBoxDD_SOURCES.linux += \
Audio/DrvHostPulseAudio.c \
Audio/pulse_stubs.c
else
VBoxDD_SOURCES.linux += \
Audio/pulseaudio.c \
Audio/pulse_stubs.c
endif
VBoxDD_DEFS.freebsd += VBOX_WITH_PULSE
ifdef VBOX_WITH_PDM_AUDIO_DRIVER
VBoxDD_SOURCES.freebsd+= \
Audio/DrvHostPulseAudio.c \
Audio/pulse_stubs.c
else
VBoxDD_SOURCES.freebsd+= \
Audio/pulseaudio.c \
Audio/pulse_stubs.c
endif
endif
# --- WARNING! SLIRP MESS AHEAD! ;-) ---
VBOX_SLIRP_SOURCES = \
Network/DrvNAT.cpp \
Network/slirp/bootp.c \
Network/slirp/debug.c \
Network/slirp/ip_icmp.c \
Network/slirp/ip_input.c \
Network/slirp/ip_output.c \
Network/slirp/misc.c \
Network/slirp/sbuf.c \
Network/slirp/slirp.c \
Network/slirp/slirp_dns.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/udp.c \
Network/slirp/dnsproxy/hash.c \
Network/slirp/tftp.c \
Network/slirp/dnsproxy/dnsproxy.c
ifneq ($(KBUILD_TARGET), win)
VBOX_SLIRP_SOURCES += Network/slirp/resolv_conf_parser.c
endif
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/kern/kern_mbuf.c \
Network/slirp/bsd/kern/uipc_mbuf.c \
Network/slirp/bsd/kern/uipc_mbuf2.c \
Network/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/in_cksum.c
VBOX_SLIRP_ALIAS_SOURCES = \
Network/slirp/libalias/alias.c \
Network/slirp/libalias/alias_db.c \
Network/slirp/libalias/alias_mod.c \
Network/slirp/libalias/alias_proxy.c \
Network/slirp/libalias/alias_ftp.c \
Network/slirp/libalias/alias_dns.c \
Network/slirp/libalias/alias_nbt.c \
Network/slirp/libalias/alias_util.c
# Enable VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER here for a while, then move to
# $(file)_DEFS or clean the code disabled with this definition.
VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER=1
# dump memory related operations.
Network/slirp/misc.c_DEFS += $(if $(VBOX_NAT_MEM_DEBUG),VBOX_NAT_MEM_DEBUG,)
VBoxDD_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_DNSMAPPING_IN_HOSTRESOLVER),VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER,) \
$(if $(VBOX_WITH_NAT_UDP_SOCKET_CLONE),VBOX_WITH_NAT_UDP_SOCKET_CLONE,) \
$(if $(VBOX_WITH_NAT_SEND2HOME),VBOX_WITH_NAT_SEND2HOME,) \
$(if $(VBOX_WITH_HIDDEN_TCPTEMPLATE),VBOX_WITH_HIDDEN_TCPTEMPLATE,) \
$(if $(VBOX_WITH_SLIRP_MT),VBOX_WITH_SLIRP_MT,)
$(file)_INCS += \
$(1)/slirp/bsd/sys \
$(1)/slirp/bsd/sys/sys \
$(1)/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/include \
$(1)/slirp/bsd/netinet \
$(1)/slirp \
$(1)/slirp/libalias
ifeq ($(KBUILD_TARGET),win)
$(file)_CFLAGS = -wd4018
else
$(file)_CFLAGS += -Wno-sign-compare -Wno-format -Wno-bad-function-cast
endif
endef
$(foreach file,$(VBOX_SLIRP_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
VBoxDD_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 \
$(1)/slirp \
$(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})
VBoxDD_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)))
# --- OS specific driver hacks. ---
ifeq ($(KBUILD_TARGET),darwin)
VBoxDD_SOURCES := \
$(filter-out Storage/DrvHostRaw% Storage/DrvHostFloppy%, $(VBoxDD_SOURCES)) \
Audio/coreaudio.c
VBoxDD_SOURCES.darwin += \
Serial/DrvHostSerial.cpp
endif # darwin
ifeq ($(KBUILD_TARGET),freebsd)
ifdef VBOX_WITH_PDM_AUDIO_DRIVER
VBoxDD_SOURCES := \
$(filter-out Storage/DrvHostFloppy%, $(VBoxDD_SOURCES)) \
Audio/DrvHostOssAudio.c \
Serial/DrvHostSerial.cpp
VBoxDD_SOURCES.freebsd += \
Network/DrvTAP.cpp
else
VBoxDD_SOURCES := \
$(filter-out Storage/DrvHostFloppy%, $(VBoxDD_SOURCES)) \
Audio/ossaudio.c \
Serial/DrvHostSerial.cpp
VBoxDD_SOURCES.freebsd += \
Network/DrvTAP.cpp
endif
endif # freebsd
VBoxDD_SOURCES.linux += \
Network/DrvTAP.cpp \
Parallel/DrvHostParallel.cpp \
Serial/DrvHostSerial.cpp
ifdef VBOX_WITH_PDM_AUDIO_DRIVER
VBoxDD_SOURCES.linux += \
Audio/DrvHostOssAudio.c
else
VBoxDD_SOURCES.linux += \
Audio/ossaudio.c
endif
ifeq ($(KBUILD_TARGET),os2)
VBoxDD_SOURCES := $(filter-out Storage/DrvHost%, $(VBoxDD_SOURCES))
endif
ifeq ($(KBUILD_TARGET),solaris)
VBoxDD_SOURCES := $(filter-out Storage/DrvHostFloppy%, $(VBoxDD_SOURCES))
VBoxDD_SOURCES.solaris += \
Serial/DrvHostSerial.cpp
ifdef VBOX_WITH_PDM_AUDIO_DRIVER
VBoxDD_SOURCES.solaris += \
Audio/DrvHostSolAudio.c
else
VBoxDD_SOURCES.solaris += \
Audio/solaudio.c
endif
ifdef VBOX_WITH_SOLARIS_OSS
ifdef VBOX_WITH_PDM_AUDIO_DRIVER
VBoxDD_SOURCES += Audio/DrvHostOssAudio.c
else
VBoxDD_SOURCES += Audio/ossaudio.c
endif
VBoxDD_DEFS += VBOX_WITH_SOLARIS_OSS
endif
ifdef VBOX_WITH_SUID_WRAPPER
VBoxDD_DEFS += VBOX_WITH_SUID_WRAPPER
endif
endif
VBoxDD_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
ifdef VBOX_WITH_PDM_AUDIO_DRIVER
VBoxDD_DEFS.win += VBOX_WITH_PDM_AUDIO_DRIVER
endif
VBoxDD_SOURCES.win += \
Serial/DrvHostSerial.cpp \
Parallel/DrvHostParallel.cpp
ifdef VBOX_WITH_PDM_AUDIO_DRIVER
VBoxDD_SOURCES.win += \
Audio/DrvHostDSound.c
else
VBoxDD_SOURCES.win += \
Audio/dsoundaudio.c
endif
ifdef VBOX_WITH_VIRTUALKD
VBoxDD_DEFS.win += VBOX_WITH_VIRTUALKD
VBoxDD_SOURCES.win += \
Misc/VirtualKD.cpp
endif
if defined(VBOX_WITH_NETFLT)
VBoxDD_DEFS += VBOX_WITH_NETFLT
if defined(VBOX_NETFLT_ONDEMAND_BIND)
VBoxDD_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
endif
endif
# --- Final bits, mostly libraries for order dependant linkers. ---
VBoxDD_LIBS += \
$(PATH_STAGE_LIB)/VgaDefBiosLogo$(VBOX_SUFF_LIB) \
$(LIB_VMM) \
$(LIB_RUNTIME)
ifeq ($(KBUILD_TARGET),win)
VBoxDD_LIBS += \
$(LIB_DDU) \
$(PATH_STAGE_LIB)/VBoxDD2.lib \
$(PATH_SDK_$(VBOX_WINDDK)_LIB)/dxguid.lib
else
VBoxDD_LIBS += \
$(VBoxDDU_1_STAGE_TARGET) \
$(VBoxDD2_1_STAGE_TARGET)
endif
ifdef VBOX_WITH_NETFLT
VBoxDD_LIBS.win += $(PATH_STAGE_LIB)/WinNetConfig.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)
ifdef VBOX_WITH_DYNAMIC_DSDT
VBoxDD_CLEAN += $(VBoxDD_0_OUTDIR)/vboxdsl.hex
PC/ACPI/VBoxAcpi.cpp_DEPS = $(VBoxDD_0_OUTDIR)/vboxdsl.hex
$$(VBoxDD_0_OUTDIR)/vboxdsl.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
$(call MSG_TOOL,bin2c,VBoxDD,$<,$@)
$(QUIET)$(VBOX_BIN2C) -export VboxDslSource $< $@
vboxdsl.hex:: $$(VBoxDD_0_OUTDIR)/vboxdsl.hex
else # !VBOX_WITH_DYNAMIC_DSDT
# VBoxAcpi.cpp needs vboxaml.hex which we generate from PC/vbox.dsl
VBoxDD_CLEAN += \
$(VBoxDD_0_OUTDIR)/vboxaml.hex \
$(VBoxDD_0_OUTDIR)/vboxaml.aml \
$(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex \
$(VBoxDD_0_OUTDIR)/vboxssdt-standard.aml \
$(VBoxDD_0_OUTDIR)/vboxssdt-standard.aml.tmp \
$(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex \
$(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.aml \
$(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.aml.tmp \
$(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.aml.pre
PC/ACPI/VBoxAcpi.cpp_DEPS = \
$(VBoxDD_0_OUTDIR)/vboxaml.hex \
$(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex \
$(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex
$$(VBoxDD_0_OUTDIR)/vboxaml.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
$(call MSG_TOOL,iasl,VBoxDD,$<,$@)
$(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
vboxaml.hex:: $$(VBoxDD_0_OUTDIR)/vboxaml.hex
$$(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex: $(PATH_SUB_CURRENT)/PC/vbox-standard.dsl | $$(dir $$@)
$(call MSG_TOOL,iasl,VBoxDD,$<,$@)
$(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:: $$(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex
$$(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex: $(PATH_SUB_CURRENT)/PC/vbox-cpuhotplug.dsl | $$(dir $$@)
$(call MSG_TOOL,iasl,VBoxDD,$<,$@)
$(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:: $$(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex
endif # !VBOX_WITH_DYNAMIC_DSDT
PC/ACPI/VBoxAcpi.cpp_INCS = $(VBoxDD_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 = $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,)
VBoxDDGC_INCS = build
VBoxDDGC_SOURCES = \
Audio/DevIchHda.cpp \
Bus/DevPCI.cpp \
Bus/DevPciIch9.cpp \
Bus/MsiCommon.cpp \
Bus/MsixCommon.cpp \
EFI/DevSmc.cpp \
Graphics/DevVGA.cpp \
Input/DevPS2.cpp \
Input/PS2K.cpp \
Input/PS2M.cpp \
PC/DevACPI.cpp \
PC/DevPit-i8254.cpp \
PC/DevPIC.cpp \
PC/DevRTC.cpp \
PC/DevHPET.cpp \
Storage/DevATA.cpp \
Network/DevPCNet.cpp \
Serial/DevSerial.cpp \
Parallel/DevParallel.cpp \
VMMDev/VMMDevTesting.cpp
ifdef VBOX_WITH_E1000
VBoxDDGC_DEFS += VBOX_WITH_E1000
VBoxDDGC_SOURCES += \
Network/DevE1000.cpp \
Network/DevE1000Phy.cpp
endif
ifdef VBOX_WITH_VIRTIO
VBoxDDGC_DEFS += VBOX_WITH_VIRTIO
VBoxDDGC_SOURCES += \
VirtIO/Virtio.cpp \
Network/DevVirtioNet.cpp
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_VMSVGA
VBoxDDGC_DEFS += VBOX_WITH_VMSVGA
VBoxDDGC_SOURCES += \
Graphics/DevVGA-SVGA.cpp
endif
ifdef VBOX_WITH_VMSVGA3D
VBoxDDGC_DEFS += VBOX_WITH_VMSVGA3D
endif
ifdef VBOX_VDMA_WITH_WATCHDOG
VBoxDDGC_DEFS += VBOX_VDMA_WITH_WATCHDOG
endif
ifdef VBOX_WITH_VUSB
VBoxDDGC_DEFS += VBOX_WITH_VUSB
VBoxDDGC_SOURCES += \
USB/DevOHCI.cpp
endif
ifdef VBOX_WITH_USB
VBoxDDGC_DEFS += VBOX_WITH_USB
if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
VBoxDDGC_DEFS += VBOX_WITH_EHCI_IMPL
VBoxDDGC_SOURCES += \
USB/DevEHCI.cpp
endif
if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
VBoxDDGC_DEFS += VBOX_WITH_XHCI_IMPL
VBoxDDGC_SOURCES += \
USB/DevXHCI.cpp
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 += \
Storage/DevAHCI.cpp
endif
ifdef VBOX_WITH_BUSLOGIC
VBoxDDGC_DEFS += VBOX_WITH_BUSLOGIC
VBoxDDGC_SOURCES += \
Storage/DevBusLogic.cpp
endif
ifdef VBOX_WITH_LSILOGIC
VBoxDDGC_DEFS += VBOX_WITH_LSILOGIC
VBoxDDGC_SOURCES += \
Storage/DevLsiLogicSCSI.cpp
endif
ifdef VBOX_WITH_NEW_PS2M
VBoxDDGC_DEFS += VBOX_WITH_NEW_PS2M
endif
if1of ($(VBOX_LDR_FMT32), pe lx)
VBoxDDGC_LIBS = \
$(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
$(PATH_STAGE_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
endif
endif # VBOX_WITH_RAW_MODE
#
# VBoxDD2 (shared object)
#
VBoxDD2_TEMPLATE = VBoxR3DllWarnNoPic
VBoxDD2_DEFS = IN_VBOXDD2
VBoxDD2_INCS := \
build \
$(PATH_SUB_CURRENT)
VBoxDD2_SOURCES = \
build/VBoxDD2.cpp \
PC/DevAPIC.cpp \
PC/DevIoApic.cpp \
PC/DevLPC.cpp
VBoxDD2_LIBS = \
$(PATH_STAGE_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
$(PATH_STAGE_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
$(if $(VBOX_WITH_PXE_ROM),\
$(if $(VBOX_WITH_INTEL_PXE),\
$(PATH_STAGE_LIB)/NetBiosBin$(VBOX_SUFF_LIB),\
$(PATH_STAGE_LIB)/iPxeBiosBin$(VBOX_SUFF_LIB)),) \
$(LIB_VMM) \
$(LIB_RUNTIME)
VBoxDD2_LIBS.darwin += $(LIB_REM)
VBoxDD2_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD2.dylib
VBoxDD2_LDFLAGS.linux = -Wl,--no-undefined
ifdef VBOX_WITH_PXE_ROM
VBoxDD2_DEFS += VBOX_WITH_PXE_ROM
endif
#
# 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 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) # - WTF is IN_RT_R0 doing here?
VBoxDDR0_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
VBoxDDR0_INCS = build
VBoxDDR0_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK)
VBoxDDR0_SOURCES = \
build/VBoxDDR0.cpp \
Audio/DevIchHda.cpp \
Bus/DevPCI.cpp \
Bus/DevPciIch9.cpp \
Bus/MsiCommon.cpp \
Bus/MsixCommon.cpp \
EFI/DevSmc.cpp \
Graphics/DevVGA.cpp \
Input/DevPS2.cpp \
Input/PS2K.cpp \
Input/PS2M.cpp \
PC/DevACPI.cpp \
PC/DevPit-i8254.cpp \
PC/DevPIC.cpp \
PC/DevRTC.cpp \
PC/DevHPET.cpp \
Storage/DevATA.cpp \
Network/DevPCNet.cpp \
Serial/DevSerial.cpp \
Parallel/DevParallel.cpp \
VMMDev/VMMDevTesting.cpp \
\
Network/DrvIntNet.cpp \
Network/DrvDedicatedNic.cpp
VBoxDDR0_SOURCES.win += Parallel/DrvHostParallel.cpp
ifdef VBOX_WITH_E1000
VBoxDDR0_DEFS += VBOX_WITH_E1000
VBoxDDR0_SOURCES += \
Network/DevE1000.cpp \
Network/DevE1000Phy.cpp
endif
ifdef VBOX_WITH_VIRTIO
VBoxDDR0_DEFS += VBOX_WITH_VIRTIO
VBoxDDR0_SOURCES += \
VirtIO/Virtio.cpp \
Network/DevVirtioNet.cpp
endif
ifdef VBOX_WITH_NETSHAPER
VBoxDDR0_DEFS += VBOX_WITH_NETSHAPER
VBoxDDR0_SOURCES += \
Network/DrvNetShaper.cpp
endif
ifdef VBOX_WITH_VMSVGA
VBoxDDR0_DEFS += VBOX_WITH_VMSVGA
VBoxDDR0_SOURCES += \
Graphics/DevVGA-SVGA.cpp
endif
ifdef VBOX_WITH_VMSVGA3D
VBoxDDR0_DEFS += VBOX_WITH_VMSVGA3D
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_VDMA_WITH_WATCHDOG
VBoxDDR0_DEFS += VBOX_VDMA_WITH_WATCHDOG
endif
ifdef VBOX_WITH_VUSB
VBoxDDR0_DEFS += VBOX_WITH_VUSB
VBoxDDR0_SOURCES += \
USB/DevOHCI.cpp
endif
ifdef VBOX_WITH_USB
VBoxDDR0_DEFS += VBOX_WITH_USB
if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
VBoxDDR0_DEFS += VBOX_WITH_EHCI_IMPL
VBoxDDR0_SOURCES += \
USB/DevEHCI.cpp
endif
if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
VBoxDDR0_DEFS += VBOX_WITH_XHCI_IMPL
VBoxDDR0_SOURCES += \
USB/DevXHCI.cpp
endif
endif
if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
VBoxDDR0_SOURCES += \
Bus/DevPciRaw.cpp
endif
ifdef VBOX_WITH_AHCI
VBoxDDR0_DEFS += VBOX_WITH_AHCI IN_AHCI_R0
VBoxDDR0_SOURCES += \
Storage/DevAHCI.cpp
endif
ifdef VBOX_WITH_BUSLOGIC
VBoxDDR0_DEFS += VBOX_WITH_BUSLOGIC
VBoxDDR0_SOURCES += \
Storage/DevBusLogic.cpp
endif
ifdef VBOX_WITH_LSILOGIC
VBoxDDR0_DEFS += VBOX_WITH_LSILOGIC
VBoxDDR0_SOURCES += \
Storage/DevLsiLogicSCSI.cpp
endif
ifdef VBOX_WITH_NEW_PS2M
VBoxDDR0_DEFS += VBOX_WITH_NEW_PS2M
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_STAGE_LIB)/VMMR0Imp$(VBOX_SUFF_LIB) \
$(PATH_STAGE_LIB)/SUPR0$(VBOX_SUFF_LIB)
endif
ifdef VBOX_WITH_RAW_MODE
#
# VBoxDD2GC (LGPL sysmod)
#
VBoxDD2GC_TEMPLATE = VBoxRc
VBoxDD2GC_INCS = build
VBoxDD2GC_SOURCES = \
PC/DevAPIC.cpp \
PC/DevIoApic.cpp
if1of ($(VBOX_LDR_FMT32), pe lx)
VBoxDD2GC_LIBS = \
$(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
$(PATH_STAGE_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
endif
endif
#
# VBoxDD2R0 (LGPL sysmod)
#
VBoxDD2R0_TEMPLATE = VBoxR0
VBoxDD2R0_DEFS = IN_RT_R0
VBoxDD2R0_INCS = build
VBoxDD2R0_SOURCES = \
build/VBoxDD2R0.cpp \
PC/DevAPIC.cpp \
PC/DevIoApic.cpp \
if1of ($(VBOX_LDR_FMT), pe lx)
VBoxDD2R0_LIBS = \
$(PATH_STAGE_LIB)/VMMR0Imp$(VBOX_SUFF_LIB) \
$(PATH_STAGE_LIB)/SUPR0$(VBOX_SUFF_LIB)
endif
#
# 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,) \
$(if $(VBOX_WITH_NAT_SERVICE),VBOX_WITH_NAT_SERVICE,)
ServicesR0_SOURCES = \
Network/SrvIntNetR0.cpp \
$(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 = \
Network/testcase/tstIntNetR0.cpp
ifneq ($(KBUILD_TARGET),win)
Network/testcase/tstIntNetR0.cpp_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
endif
endif
#
# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
#
ifdef VBOX_WITH_TESTCASES
if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
PROGRAMS += tstIntNetHardened-1
tstIntNetHardened-1_TEMPLATE = VBoxR3HardenedTstExe
tstIntNetHardened-1_NAME = tstIntNet-1
tstIntNetHardened-1_DEFS = PROGRAM_NAME_STR=\"tstIntNet-1\"
tstIntNetHardened-1_SOURCES = ../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
DLLS += tstIntNet-1
tstIntNet-1_TEMPLATE = VBoxR3TstDll
else
PROGRAMS += tstIntNet-1
tstIntNet-1_TEMPLATE = VBOXR3TSTEXE
endif
tstIntNet-1_SOURCES = \
Network/testcase/tstIntNet-1.cpp \
Network/Pcap.cpp
endif
#
# EEPROM device unit test requires cppunit
#
ifdef VBOX_WITH_CPPUNIT_TESTCASES
ifdef VBOX_WITH_E1000
PROGRAMS += tstDevEEPROM
tstDevEEPROM_TEMPLATE = VBOXCPPUNITEXE
tstDevEEPROM_SOURCES = \
Network/testcase/tstDevEEPROM.cpp
tstDevEEPROM_LIBS = \
$(TARGET_VBoxDD)
PROGRAMS += tstDevPhy
tstDevPhy_TEMPLATE = VBOXCPPUNITEXE
tstDevPhy_SOURCES = \
Network/testcase/tstDevPhy.cpp \
Network/DevE1000Phy.cpp
tstDevPhy_DEFS = PHY_UNIT_TEST
endif
endif
#
# Apple SMC Utility.
#
ifdef VBOX_WITH_TESTCASES
PROGRAMS.darwin += VBoxSmcUtil-darwin
VBoxSmcUtil-darwin_TEMPLATE = VBOXR3TSTEXE
VBoxSmcUtil-darwin_SOURCES = EFI/VBoxSmcUtil-darwin.cpp
VBoxSmcUtil-darwin_LDFLAGS = -framework IOKit
endif
endif # !VBOX_ONLY_EXTPACKS
if defined(VBOX_WITH_EXTPACK_PUEL) && defined(VBOX_WITH_EXTPACK_PUEL_BUILD)
#
# The EHCI (USB 2.0) Extension Pack Modules.
#
if defined(VBOX_WITH_USB)
DLLS += VBoxEhciR3
VBoxEhciR3_TEMPLATE = VBoxR3ExtPackPuel
VBoxEhciR3_SOURCES = \
USB/DevEHCI.cpp \
USB/DevXHCI.cpp
SYSMODS += VBoxEhciR0
VBoxEhciR0_TEMPLATE = VBoxR0ExtPackPuel
VBoxEhciR0_SOURCES = \
USB/DevEHCI.cpp \
USB/DevXHCI.cpp
ifdef VBOX_WITH_RAW_MODE
SYSMODS += VBoxEhciRC
VBoxEhciRC_TEMPLATE = VBoxRcExtPackPuel
VBoxEhciRC_SOURCES = \
USB/DevEHCI.cpp \
USB/DevXHCI.cpp
endif
# Hacky but MSI support *must* be enabled
ifdef VBOX_WITH_MSI_DEVICES
VBoxEhciR3_DEFS += VBOX_WITH_MSI_DEVICES
VBoxEhciR0_DEFS += VBOX_WITH_MSI_DEVICES
VBoxEhciRC_DEFS += VBOX_WITH_MSI_DEVICES
endif
endif
if defined(VBOX_WITH_PCI_PASSTHROUGH)
DLLS += VBoxPciRawR3
VBoxPciRawR3_TEMPLATE = VBoxR3ExtPackPuel
VBoxPciRawR3_SOURCES = Bus/DevPciRaw.cpp
DLLS += VBoxPciRawDrv
VBoxPciRawDrv_TEMPLATE = VBoxR3ExtPackPuel
VBoxPciRawDrv_SOURCES = Bus/DrvPciRaw.cpp
SYSMODS += VBoxPciRawR0
VBoxPciRawR0_TEMPLATE = VBoxR0ExtPackPuel
VBoxPciRawR0_SOURCES = Bus/DevPciRaw.cpp
Bus/DevPciRaw.cpp_INCS = Bus
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
TEMPLATE_VBoxSVGA3D = VBoxSVGA3D
TEMPLATE_VBoxSVGA3D_EXTENDS = VBOXR3
TEMPLATE_VBoxSVGA3D_CFLAGS = \
$(filter-out -pedantic -fno-common -Wstrict-prototypes,$(TEMPLATE_VBOXR3_CFLAGS))
TEMPLATE_VBoxSVGA3D_CXXFLAG = \
$(filter-out -pedantic -fno-common,$(TEMPLATE_VBOXR3_CXXFLAGS))
TEMPLATE_VBoxSVGA3D_CFLAGS.darwin = \
$(filter-out -fno-common,$(TEMPLATE_VBOXR3_CFLAGS.darwin))
TEMPLATE_VBoxSVGA3D_LDFLAGS.darwin += \
-framework AppKit -framework OpenGL
if defined(VBOX_WITH_VMSVGA3D)
DLLS += VBoxSVGA3D
endif
VBoxSVGA3D_TEMPLATE = VBoxSVGA3D
VBoxSVGA3D_SDKS = ReorderCompilerIncs
VBoxSVGA3D_DEFS = \
__WINESRC__ \
WINE_UNICODE_API="" \
_REENTRANT \
WINE_NOWINSOCK \
IN_RING3 \
VBOX_WITH_VMSVGA \
VBOX_WITH_VMSVGA3D \
DLLDIR=\"\" \
BINDIR=\"\" \
LIB_TO_BINDIR=\"\" \
LIB_TO_DLLDIR=\"\" \
BIN_TO_DLLDIR=\"\" \
LIB_TO_DATADIR=\"\" \
BIN_TO_DATADIR=\"\" \
_USE_MATH_DEFINES \
VBOX_USING_WINDDK_W7_OR_LATER \
VBOX_WINE_WITH_SINGLE_SWAPCHAIN_CONTEXT \
IN_vmsvgashader_STATIC \
VBOX_WINE_WITH_IPRT
if "$(KBUILD_TYPE)" != "debug" || defined(VBOX_WINE_NO_DEBUG_MSGS)
VBoxSVGA3D_DEFS += WINE_NO_DEBUG_MSGS
endif
VBoxSVGA3D_DEFS.x86 += __i386__
VBoxSVGA3D_DEFS.amd64 += __x86_64__
VBoxSVGA3D_DEFS.win += \
USE_WIN32_OPENGL \
VBOX_WINE_WITHOUT_LIBWINE
# WINE relies on a gcc 4.4 feature but we have 4.2 on Darwin
VBoxSVGA3D_DEFS.darwin += \
__builtin_ms_va_list=va_list \
__stdcall=
VBoxSVGA3D_CFLAGS = \
$(filter-out -pedantic -Wattributes,$(VBoxR3DllWarnNoPic_CFLAGS))
VBoxSVGA3D_INCS.win := \
Graphics/shaderlib/libWineStub/include
VBoxSVGA3D_INCS.linux := \
Graphics/shaderlib/wine/include
VBoxSVGA3D_INCS.darwin := \
Graphics/shaderlib/wine/include
VBoxSVGA3D_SOURCES := \
Graphics/shaderlib/glsl_shader.c \
Graphics/shaderlib/shader.c \
Graphics/shaderlib/shader_sm1.c \
Graphics/shaderlib/shader_sm4.c \
Graphics/shaderlib/shaderapi.c \
Graphics/shaderlib/utils.c \
Graphics/shaderlib/stateblock.c \
Graphics/shaderlib/directx.c \
Graphics/shaderlib/libWineStub/debug.c
VBoxSVGA3D_SOURCES.darwin += \
Graphics/DevVGA-SVGA3d-cocoa.m
VBoxSVGA3D_LIBS = \
$(LIB_RUNTIME)
VBoxSVGA3D_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
if1of ($(KBUILD_TARGET), solaris linux freebsd)
VBoxSVGA3D_LIBS += GL
endif
VBoxSVGA3D_LDFLAGS.darwin += \
-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSVGA3D.dylib
include $(FILE_KBUILD_SUB_FOOTER)