Makefile.kmk revision 4e7d2035694a3b8e42fbe469cc0b30a4371a5953
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsync# Top-level sub-makefile for the devices, drivers and services.
c58f1213e628a545081c70e26c6b67a841cff880vboxsync# Copyright (C) 2006-2010 Oracle Corporation
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsync# available from http://www.virtualbox.org. This file is free software;
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsync# you can redistribute it and/or modify it under the terms of the GNU
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsync# General Public License (GPL) as published by the Free Software
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsyncSUB_DEPTH = ../../..
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsyncinclude $(KBUILD_PATH)/subheader.kmk
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsyncVBOX_PATH_DEVICES_SRC := $(PATH_SUB_CURRENT)
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsync# Include sub-makefiles.
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsyncinclude $(PATH_SUB_CURRENT)/PC/BIOS/Makefile.kmk
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsyncinclude $(PATH_SUB_CURRENT)/Graphics/BIOS/Makefile.kmk
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsyncinclude $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsyncinclude $(PATH_SUB_CURRENT)/Storage/testcase/Makefile.kmk
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsyncifndef VBOX_OSE
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsync include $(PATH_SUB_CURRENT)/Storage/VBoxHDDFormats/Makefile.kmk
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsyncifdef VBOX_WITH_EFI
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsync include $(PATH_SUB_CURRENT)/EFI/Thunk/Makefile.kmk
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsyncifdef VBOX_WITH_INTEL_PXE
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsync include $(PATH_SUB_CURRENT)/PC/PXE/Makefile.kmk
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsync # Subdir with complex makefile.
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsync SUBDIRS_LIBRARIES += $(VBOX_PATH_DEVICES_SRC)/PC/Etherboot-src
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsync SUBDIRS_CLEAN += $(VBOX_PATH_DEVICES_SRC)/PC/Etherboot-src
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsync # Disable the unsafe pass order optimizations.
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsync KBUILD_SAFE_PARALLEL = 1
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsync# Main targets.
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsyncLIBRARIES += DevicesR3 Drivers ServicesR0
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsyncDLLS += VBoxDDU VBoxDD VBoxDD2
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsyncSYSMODS += VBoxDDR0 VBoxDD2R0
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsyncifdef VBOX_WITH_RAW_MODE
c1f4d314cb8f8b75e2d67a3553ecabd081f1e1c6vboxsync SYSMODS += VBoxDDGC VBoxDD2GC
VBoxDDU_INST.darwin = $(INST_DLL) $(INST_TESTCASE)
VBoxDDU_SDKS.win = WINPSDK W2K3DDK
VBoxDDU_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
VBoxDDU_SDKS.win = WINPSDK
VBoxDDU_INCS.os2 += \
$(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
$(L4_LIBDIR)/libl4sys.p.a
VBoxDDU_LDFLAGS.darwin += -framework IOKit
VBoxDDU_LDFLAGS.linux = -Wl,--no-undefined
VBoxDDU_LDFLAGS.l4 = -Wl,--no-undefined
VBoxDD_SDKS.win = WINPSDK DXSDK W2K3DDK VBOX_NTDLL
$(PATH_LIB)/VBoxDD2.lib \
$(PATH_SDK_DXSDK_LIB)/dxguid.lib
$(L4_LIBDIR)/libl4sys.p.a
VBoxDD_LIBS.darwin += \
VBoxDD_LDFLAGS.linux = -Wl,--no-undefined
VBoxDD_LDFLAGS.l4 = -Wl,--no-undefined
VBoxDD2_SOURCES += PC/DevSMC.cpp
VBoxDD2_SOURCES += PC/DevLPC.cpp
$(L4_LIBDIR)/libl4sys.p.a
VBoxDD2_LIBS.darwin += $(LIB_REM)
VBoxDD2_LDFLAGS.linux = -Wl,--no-undefined
VBoxDD2_LDFLAGS.l4 = -Wl,--no-undefined
DevicesR3_SDKS.win = WINPSDK W2K3DDK
DevicesR3_DEFS.darwin.x86 = VBOX_WITH_2X_4GB_ADDR_SPACE
DevicesR3_DEFS.linux += _GNU_SOURCE
DevicesR3_DEFS.l4 += _GNU_SOURCE
DevicesR3_SOURCES += PC/DevHPET.cpp
DevicesR3_SOURCES += EFI/DevEFI.cpp
DevicesR3_INTERMEDIATES += $(DevicesR3_0_OUTDIR)/VBoxDD-dtrace.h
DevicesR3_CLEAN += $(PATH_DevicesR3)/vboxdsl.hex
$(PATH_DevicesR3)/vboxaml.hex \
$(PATH_DevicesR3)/vboxaml.aml \
$(PATH_DevicesR3)/vboxssdt-standard.hex \
$(PATH_DevicesR3)/vboxssdt-standard.aml \
$(PATH_DevicesR3)/vboxssdt-standard.aml.tmp \
$(PATH_DevicesR3)/vboxssdt-cpuhotplug.hex \
$(PATH_DevicesR3)/vboxssdt-cpuhotplug.aml \
$(PATH_DevicesR3)/vboxssdt-cpuhotplug.aml.tmp \
$(PATH_DevicesR3)/vboxssdt-cpuhotplug.aml.pre
$(PATH_DevicesR3)/vboxaml.hex \
$(PATH_DevicesR3)/vboxssdt-standard.hex \
$(PATH_DevicesR3)/vboxssdt-cpuhotplug.hex
$(QUIET)$(SED) "s/AmlCode/AmlCodeSsdtStandard/g" \
$$(PATH_DevicesR3)/vboxssdt-cpuhotplug.hex: $(PATH_SUB_CURRENT)/PC/vbox-cpuhotplug.dsl | $$(dir $$@)
$(QUIET)$(SED) "s/AmlCode/AmlCodeSsdtCpuHotPlug/g" \
PC/ACPI/VBoxAcpi.cpp_INCS = $(PATH_DevicesR3)
Bus/DevPCI.cpp_INCS = Bus
Graphics/DevVGA.cpp_INCS = $(PATH_VgaBiosBin)
VBoxDDGC_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
VBoxDDGC_SOURCES += PC/DevHPET.cpp
VBoxDDR0_DEFS.darwin.x86= VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 VBOX_WITH_2X_4GB_ADDR_SPACE
VBoxDDR0_SOURCES += PC/DevHPET.cpp
VBoxDD2R0_SOURCES += PC/DevSMC.cpp
Drivers_SDKS.win = WINPSDK W2K3DDK
Storage/DrvHostDVD.cpp_SDKS.win = W2K3DDK
Drivers_DEFS.win += _WIN32_WINNT=0x0510
VBOX_SLIRP_SOURCES += Network/slirp/bsd/kern/subr_sbuf.c
$(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/libalias
$(file)_INCS += $(1)/slirp/libalias
$(file)_INCS += $(1)/slirp/dnsproxy
$(file)_INCS += $(1)/slirp/dnsproxy
Drivers_SOURCES += Audio/ossaudio.c
Drivers_SOURCES += Network/solaris/vbox-libdlpi.cpp
Drivers_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
Drivers_DEFS.linux += VBOX_WITH_ALSA
Drivers_DEFS.linux += VBOX_WITH_PULSE
Drivers_DEFS.freebsd += VBOX_WITH_PULSE
Drivers_DEFS.darwin += VUSB_HAVE_USBPROXY_DEVICE
Drivers_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
Drivers_DEFS.linux += \
Drivers_DEFS.l4 += VUSB_HAVE_USBPROXY_DEVICE
Drivers_SOURCES.l4 += \
Drivers_DEFS.os2 += VUSB_HAVE_USBPROXY_DEVICE
Drivers_SOURCES.os2 += \
Drivers_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
Drivers_SOURCES.win += \
Drivers_DEFS.solaris += VUSB_HAVE_USBPROXY_DEVICE
USB/solaris/$(if $(VBOX_WITH_NEW_USB_CODE_ON_SOLARIS),USBProxyDevice2-solaris.cpp,USBProxyDevice-solaris.cpp)
Drivers_DEFS.freebsd += VUSB_HAVE_USBPROXY_DEVICE
# Ring-0 Services (library, linked into VMMR0.r0)
TESTING += $(PATH_Drivers)/tstSameUSBProxyDevLinux.run
OTHERS += $(PATH_Drivers)/tstSameUSBProxyDevLinux.run
VBOX_PRX_DEV_LNX = $(PATH_ROOT)/src/VBox/Devices/USB/linux/USBProxyDevice-linux.cpp
VRDP_PRX_DEV_LNX = $(PATH_ROOT)/src/VBox/RDP/client/vrdp/USBProxyDevice-linux.c
$$(PATH_Drivers)/tstSameUSBProxyDevLinux.run: $(VBOX_PRX_DEV_LNX) $(VRDP_PRX_DEV_LNX) | $$(PATH_Drivers)/
include $(KBUILD_PATH)/subfooter.kmk