Makefile.kmk revision e45f13b58811d44a66881bd0037a3683fc64d370
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync# Sub-Makefile for the support library and the drivers/modules/kexts it uses.
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync# Copyright (C) 2006-2011 Oracle Corporation
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync# available from http://www.virtualbox.org. This file is free software;
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync# you can redistribute it and/or modify it under the terms of the GNU
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync# General Public License (GPL) as published by the Free Software
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync# The contents of this file may alternatively be used under the terms
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync# of the Common Development and Distribution License Version 1.0
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync# VirtualBox OSE distribution, in which case the provisions of the
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync# CDDL are applicable instead of those of the GPL.
d4a9d525e6f2111d462d2d96462dced6b9ec00efvboxsync# You may elect to license modified versions of this file under the
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync# terms and conditions of either the GPL or the CDDL or both.
2f3883b126a405f92b19e829472f614c7352b4f9vboxsyncSUB_DEPTH = ../../../..
2f3883b126a405f92b19e829472f614c7352b4f9vboxsyncinclude $(KBUILD_PATH)/subheader.kmk
7862f4bd000f1eb6c86289f5ac2849e9cf943ca9vboxsyncLIBRARIES += SUPR3 SUPR3Static SUPR3HardenedStatic
388b6b190a5407548753b7fde12fa58134ec3563vboxsyncifndef VBOX_ONLY_DOCS
7862f4bd000f1eb6c86289f5ac2849e9cf943ca9vboxsync if1of ($(VBOX_LDR_FMT), pe lx)
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync LIBRARIES += SUPR0
2f3883b126a405f92b19e829472f614c7352b4f9vboxsyncif !defined(VBOX_ONLY_DOCS) \
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync && !defined(VBOX_ONLY_EXTPACKS) \
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync && !defined(VBOX_ONLY_TESTSUITE)
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync ifdef VBOX_WITH_SUPSVC
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync PROGRAMS += VBoxSupSvc
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync ifdef VBOX_WITH_VBOXDRV
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync LIBRARIES += SUPR0IdcClient
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync INSTALLS.linux += vboxdrv-mod
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync INSTALLS.freebsd += vboxdrv-mod
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync # Include sub-makefile(s).
2f3883b126a405f92b19e829472f614c7352b4f9vboxsync include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync # Populate FILES_VBOXDRV_NOBIN and FILES_VBOXDRV_BIN
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync ifeq ($(KBUILD_TARGET),linux)
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync include $(PATH_SUB_CURRENT)/linux/files_vboxdrv
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync ifeq ($(KBUILD_TARGET),freebsd)
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync include $(PATH_SUB_CURRENT)/freebsd/files_vboxdrv
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsyncendif # !VBOX_ONLY_DOCS && !VBOX_ONLY_EXTPACKS && !VBOX_ONLY_TESTSUITE
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync# The Ring-3 Support Library (this is linked into the IPRT dll, VBoxRT).
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsyncifneq ($(filter l4%,$(KBUILD_TARGET) $(BUILD_TARGET_SUB)),)
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync # L4 has trouble with -pedantic. It also make trouble when inlining is not enabled.
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync SUPR3_TEMPLATE = VBOXR3NP
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync SUPR3_TEMPLATE = VBOXR3
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsyncSUPR3_DEFS = \
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync IN_SUP_R3 IN_RT_R3 \
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync $(if $(VBOX_WITH_SUPSVC),VBOX_WITH_SUPSVC) \
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync $(if $(VBOX_WITH_MAIN),VBOX_WITH_MAIN,) \
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync $(if $(VBOX_WITH_RAW_MODE),VBOX_WITH_RAW_MODE,)
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsyncSUPR3_INCS := $(PATH_SUB_CURRENT)
386a7cc6c736c97bb8839df94eef779de7fbfdc1vboxsyncSUPR3_SOURCES = \
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync $(KBUILD_TARGET)/SUPLib-$(KBUILD_TARGET).cpp
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync# Static version of SUPR3.
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsyncSUPR3Static_TEMPLATE = VBOXR3STATIC
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsyncSUPR3Static_EXTENDS = SUPR3
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync# The static part of the hardened support library (ring-3).
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsyncSUPR3HardenedStatic_TEMPLATE = VBOXR3HARDENEDLIB
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsyncSUPR3HardenedStatic_DEFS = IN_SUP_HARDENED_R3
b1cc3e87518139898395f96974ecff9e6bf228fbvboxsyncSUPR3HardenedStatic_DEFS += \
b1cc3e87518139898395f96974ecff9e6bf228fbvboxsync $(if $(VBOX_WITH_SUPSVC),VBOX_WITH_SUPSVC,) \
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync $(if $(VBOX_WITH_MAIN),VBOX_WITH_MAIN,) \
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync $(if $(VBOX_WITH_RAW_MODE),VBOX_WITH_RAW_MODE,)
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsyncSUPR3HardenedStatic_INCS = .
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsyncSUPR3HardenedStatic_SOURCES = \
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync $(KBUILD_TARGET)/SUPLib-$(KBUILD_TARGET).cpp
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync# VBoxSupSvc - The system wide service/daemon.
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsyncVBoxSupSvc_TEMPLATE = VBOXR3EXE
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsyncVBoxSupSvc_SOURCES = \
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync $(KBUILD_TARGET)/SUPSvc-$(KBUILD_TARGET).cpp
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsyncif1of ($(KBUILD_TARGET), win)
b1cc3e87518139898395f96974ecff9e6bf228fbvboxsync VBoxSupSvc_SOURCES += \
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsyncifn1of ($(KBUILD_TARGET), win)
b1cc3e87518139898395f96974ecff9e6bf228fbvboxsync VBoxSupSvc_SOURCES += \
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsyncVBoxSupSvc_LIBS = \
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync $(LIB_RUNTIME)
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync# SUPR0 - The Ring-0 Import library.
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsyncSUPR0_TEMPLATE = VBoxR0
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsyncif1of ($(VBOX_LDR_FMT), pe lx)
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync SUPR0_SOURCES = $(SUPR0_0_OUTDIR)/SUPR0.def
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync SUPR0_CLEAN = $(SUPR0_0_OUTDIR)/SUPR0.def
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync$$(SUPR0_0_OUTDIR)/SUPR0.def: \
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync $(PATH_SUB_CURRENT)/SUPDrv.c \
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync $(PATH_SUB_CURRENT)/SUPR0-def-$(VBOX_LDR_FMT).sed \
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync | $$(dir $$@)
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync -f $(dir $<)/SUPR0-def-$(VBOX_LDR_FMT).sed \
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync --output $@ \
388b6b190a5407548753b7fde12fa58134ec3563vboxsync# SUPR0IdcClient - The Ring-0 IDC client driver library.
388b6b190a5407548753b7fde12fa58134ec3563vboxsyncSUPR0IdcClient_TEMPLATE = VBoxR0DrvLib
388b6b190a5407548753b7fde12fa58134ec3563vboxsyncSUPR0IdcClient_DEFS = IN_RT_R0 IN_SUP_R0 IN_SUP_STATIC
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsyncSUPR0IdcClient_SDKS.win = W2K3DDK WINPSDKINCS
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsyncSUPR0IdcClient_SOURCES.$(KBUILD_TARGET) = \
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync $(KBUILD_TARGET)/SUPR0IdcClient-$(KBUILD_TARGET).c
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsyncSUPR0IdcClient_SOURCES = \
388b6b190a5407548753b7fde12fa58134ec3563vboxsyncif !defined(VBOX_ONLY_DOCS) \
388b6b190a5407548753b7fde12fa58134ec3563vboxsync && !defined(VBOX_ONLY_EXTPACKS) \
388b6b190a5407548753b7fde12fa58134ec3563vboxsync && !defined(VBOX_ONLY_TESTSUITE)
388b6b190a5407548753b7fde12fa58134ec3563vboxsyncifeq ($(KBUILD_TARGET),os2)
388b6b190a5407548753b7fde12fa58134ec3563vboxsync# VBoxDrv.sys - The OS/2 driver.
388b6b190a5407548753b7fde12fa58134ec3563vboxsyncVBoxDrv_TEMPLATE = VBOXR0DRV
388b6b190a5407548753b7fde12fa58134ec3563vboxsyncVBoxDrv_DEFS = IN_RT_R0 IN_SUP_R0
388b6b190a5407548753b7fde12fa58134ec3563vboxsyncVBoxDrv_INCS := $(PATH_SUB_CURRENT)
388b6b190a5407548753b7fde12fa58134ec3563vboxsync#VBoxDrv_LDFLAGS = -s -t -v
388b6b190a5407548753b7fde12fa58134ec3563vboxsyncVBoxDrv_SOURCES = \
5366e994777f9d9391cf809dc77610f57270d75dvboxsyncVBoxDrv_LIBS = \
388b6b190a5407548753b7fde12fa58134ec3563vboxsync $(VBoxDrvLib_1_TARGET) \
388b6b190a5407548753b7fde12fa58134ec3563vboxsync $(PATH_STAGE_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB) \
388b6b190a5407548753b7fde12fa58134ec3563vboxsync $(VBOX_GCC_LIBGCC) \
388b6b190a5407548753b7fde12fa58134ec3563vboxsync# temp hack to ensure that SUPDrvA-os2.asm is first in the link.
388b6b190a5407548753b7fde12fa58134ec3563vboxsyncLIBRARIES += VBoxDrvLib
388b6b190a5407548753b7fde12fa58134ec3563vboxsyncVBoxDrvLib_TEMPLATE = VBOXR0DRV
5366e994777f9d9391cf809dc77610f57270d75dvboxsyncVBoxDrvLib_INSTTYPE = none
5366e994777f9d9391cf809dc77610f57270d75dvboxsyncVBoxDrvLib_DEFS = IN_RT_R0 IN_SUP_R0
388b6b190a5407548753b7fde12fa58134ec3563vboxsyncVBoxDrvLib_INCS := \
5366e994777f9d9391cf809dc77610f57270d75dvboxsyncVBoxDrvLib_SOURCES = \
388b6b190a5407548753b7fde12fa58134ec3563vboxsyncifeq ($(KBUILD_TARGET),freebsd)
388b6b190a5407548753b7fde12fa58134ec3563vboxsync# vboxdrv.ko - The FreeBSD Kernel Module.
386a7cc6c736c97bb8839df94eef779de7fbfdc1vboxsyncvboxdrv_TEMPLATE = VBOXR0DRV
388b6b190a5407548753b7fde12fa58134ec3563vboxsyncvboxdrv_DEFS = IN_RT_R0 IN_SUP_R0 SUPDRV_WITH_RELEASE_LOGGER VBOX_SVN_REV=$(VBOX_SVN_REV)
5366e994777f9d9391cf809dc77610f57270d75dvboxsyncvboxdrv_INCS := $(PATH_SUB_CURRENT)
5366e994777f9d9391cf809dc77610f57270d75dvboxsyncvboxdrv_LIBS = $(PATH_STAGE_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
5366e994777f9d9391cf809dc77610f57270d75dvboxsyncvboxdrv_SOURCES := \
5366e994777f9d9391cf809dc77610f57270d75dvboxsync $(KBUILD_TARGET)/SUPDrv-$(KBUILD_TARGET).c \
5366e994777f9d9391cf809dc77610f57270d75dvboxsync $(PATH_SUB_CURRENT)/$(KBUILD_TARGET)/SUPDrv-$(KBUILD_TARGET).def \
388b6b190a5407548753b7fde12fa58134ec3563vboxsync## @todo the SUPDrv-freebsd.def is most probably gonna break it and require build system hacking...
388b6b190a5407548753b7fde12fa58134ec3563vboxsync# Targets for installing the freebsd sources.
388b6b190a5407548753b7fde12fa58134ec3563vboxsyncvboxdrv-mod_INST = bin/src/vboxdrv/
388b6b190a5407548753b7fde12fa58134ec3563vboxsyncvboxdrv-mod_SOURCES = \
388b6b190a5407548753b7fde12fa58134ec3563vboxsync $(subst $(DQUOTE),,$(FILES_VBOXDRV_NOBIN)) \
388b6b190a5407548753b7fde12fa58134ec3563vboxsync $(vboxdrv-mod_0_OUTDIR)/Makefile
388b6b190a5407548753b7fde12fa58134ec3563vboxsyncvboxdrv-mod_CLEAN = \
388b6b190a5407548753b7fde12fa58134ec3563vboxsync $(vboxdrv-mod_0_OUTDIR)/Makefile
388b6b190a5407548753b7fde12fa58134ec3563vboxsync$$(vboxdrv-mod_0_OUTDIR)/Makefile: \
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync $(PATH_SUB_CURRENT)/freebsd/Makefile \
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync $$(if $$(eq $$(Support/freebsd/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync | $$(dir $$@)
388b6b190a5407548753b7fde12fa58134ec3563vboxsync $(call MSG_TOOL,Creating,,$@)
388b6b190a5407548753b7fde12fa58134ec3563vboxsync $(QUIET)$(RM) -f -- $@
388b6b190a5407548753b7fde12fa58134ec3563vboxsync ifndef VBOX_WITH_HARDENING
388b6b190a5407548753b7fde12fa58134ec3563vboxsync $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
388b6b190a5407548753b7fde12fa58134ec3563vboxsync $(QUIET)$(CP) -f $< $@
388b6b190a5407548753b7fde12fa58134ec3563vboxsyncendif # freebsd
388b6b190a5407548753b7fde12fa58134ec3563vboxsync# New VBoxDrv target. TODO: Convert all the above to use this!
388b6b190a5407548753b7fde12fa58134ec3563vboxsyncif1of ($(KBUILD_TARGET), darwin linux solaris win)
388b6b190a5407548753b7fde12fa58134ec3563vboxsync ifdef VBOX_WITH_VBOXDRV
388b6b190a5407548753b7fde12fa58134ec3563vboxsync SYSMODS += VBoxDrv
388b6b190a5407548753b7fde12fa58134ec3563vboxsync VBoxDrv_TEMPLATE = VBOXR0DRV
388b6b190a5407548753b7fde12fa58134ec3563vboxsync ifdef VBOX_SIGNING_MODE
5366e994777f9d9391cf809dc77610f57270d75dvboxsync VBoxDrv_INSTTYPE = none
388b6b190a5407548753b7fde12fa58134ec3563vboxsync VBoxDrv_DEBUG_INSTTYPE = both
388b6b190a5407548753b7fde12fa58134ec3563vboxsync VBoxDrv_INST.darwin = $(INST_VBOXDRV)Contents/MacOS/
388b6b190a5407548753b7fde12fa58134ec3563vboxsync VBoxDrv_DEBUG_INST.darwin= $(patsubst %/,%,$(INST_VBOXDRV))
388b6b190a5407548753b7fde12fa58134ec3563vboxsync VBoxDrv_SDKS.win = W2K3DDK WINPSDKINCS
388b6b190a5407548753b7fde12fa58134ec3563vboxsync VBoxDrv_DEFS := IN_RT_R0 IN_SUP_R0 SUPDRV_WITH_RELEASE_LOGGER VBOX_SVN_REV=$(VBOX_SVN_REV)
5366e994777f9d9391cf809dc77610f57270d75dvboxsync ifdef VBOX_WITH_DTRACE_R0DRV
388b6b190a5407548753b7fde12fa58134ec3563vboxsync VBoxDrv_DEFS += VBOX_WITH_DTRACE VBOX_WITH_DTRACE_R0DRV
388b6b190a5407548753b7fde12fa58134ec3563vboxsync #VBoxDrv_DEFS.debug += DEBUG_DARWIN_GIP
388b6b190a5407548753b7fde12fa58134ec3563vboxsync VBoxDrv_DEFS.darwin := VBOX_WITH_HOST_VMX
388b6b190a5407548753b7fde12fa58134ec3563vboxsync KBUILD_MODNAME=KBUILD_STR\(vboxdrv\) KBUILD_BASENAME=KBUILD_STR\(vboxdrv\) MODULE CONFIG_VBOXDRV_AS_MISC
388b6b190a5407548753b7fde12fa58134ec3563vboxsync ifdef VBOX_LINUX_VERSION_2_4
388b6b190a5407548753b7fde12fa58134ec3563vboxsync VBoxDrv_DEFS.linux += EXPORT_SYMTAB
388b6b190a5407548753b7fde12fa58134ec3563vboxsync ifdef VBOX_WITH_NETFLT
388b6b190a5407548753b7fde12fa58134ec3563vboxsync VBoxDrv_DEFS.solaris += VBOX_WITH_NETFLT
388b6b190a5407548753b7fde12fa58134ec3563vboxsync ifdef VBOX_WITH_NATIVE_SOLARIS_LOADING
388b6b190a5407548753b7fde12fa58134ec3563vboxsync VBoxDrv_DEFS.solaris += VBOX_WITH_NATIVE_SOLARIS_LOADING
388b6b190a5407548753b7fde12fa58134ec3563vboxsync ifdef VBOX_WITHOUT_NATIVE_R0_LOADER
388b6b190a5407548753b7fde12fa58134ec3563vboxsync VBoxDrv_DEFS.win += VBOX_WITHOUT_NATIVE_R0_LOADER
388b6b190a5407548753b7fde12fa58134ec3563vboxsync ifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync VBoxDrv_DEFS.win += VBOX_WITH_VMMR0_DISABLE_PREEMPTION
388b6b190a5407548753b7fde12fa58134ec3563vboxsync VBoxDrv_INCS = . $(VBoxDrv_0_OUTDIR)
388b6b190a5407548753b7fde12fa58134ec3563vboxsync VBoxDrv_INCS.linux = $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
388b6b190a5407548753b7fde12fa58134ec3563vboxsync VBoxDrv_LIBS = $(PATH_STAGE_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
5366e994777f9d9391cf809dc77610f57270d75dvboxsync VBoxDrv_LIBS.linux.debug = $(VBoxDrv_LIBS) $(VBOX_GCC_LIBGCC)
388b6b190a5407548753b7fde12fa58134ec3563vboxsync $(PATH_SDK_W2K3DDK_LIB)/ntoskrnl.lib \
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync $(PATH_SDK_W2K3DDK_LIB)/hal.lib \
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync $(PATH_STAGE_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync #VBoxDrv_LDFLAGS.darwin = -v -Wl,-whyload -Wl,-v -Wl,-whatsloaded
388b6b190a5407548753b7fde12fa58134ec3563vboxsync VBoxDrv_LDFLAGS.win.x86 = -Entry:DriverEntry@8
388b6b190a5407548753b7fde12fa58134ec3563vboxsync VBoxDrv_LDFLAGS.win.amd64= -Entry:DriverEntry
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync VBoxDrv_SOURCES = \
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync ifdef VBOX_WITH_NATIVE_DTRACE
388b6b190a5407548753b7fde12fa58134ec3563vboxsync VBoxDrv_SOURCES += \
388b6b190a5407548753b7fde12fa58134ec3563vboxsync SUPDrv-dtrace.cpp_DEFS.darwin += VBOX_PATH_MACOSX_DTRACE_H=\"$(VBOX_PATH_MACOSX_SDK)/usr/include/sys/dtrace.h\"
388b6b190a5407548753b7fde12fa58134ec3563vboxsync ifn1of ($(KBUILD_TARGET), linux freebsd)
388b6b190a5407548753b7fde12fa58134ec3563vboxsync VBoxDrv_SOURCES += \
388b6b190a5407548753b7fde12fa58134ec3563vboxsync ifndef VBOX_LINUX_VERSION_2_4
388b6b190a5407548753b7fde12fa58134ec3563vboxsyncif1of ($(KBUILD_TARGET), darwin)
388b6b190a5407548753b7fde12fa58134ec3563vboxsync # Files necessary to make a darwin kernel extension bundle.
388b6b190a5407548753b7fde12fa58134ec3563vboxsync VBoxDrv.kext_INST = $(INST_VBOXDRV)Contents/
5366e994777f9d9391cf809dc77610f57270d75dvboxsync VBoxDrv.kext_SOURCES = $(VBoxDrv.kext_0_OUTDIR)/Info.plist
388b6b190a5407548753b7fde12fa58134ec3563vboxsync VBoxDrv.kext_CLEAN = $(VBoxDrv.kext_0_OUTDIR)/Info.plist
388b6b190a5407548753b7fde12fa58134ec3563vboxsync $(PATH_SUB_CURRENT)/darwin/Info.plist \
388b6b190a5407548753b7fde12fa58134ec3563vboxsync $(VBOX_VERSION_MK) | $$(dir $$@)
388b6b190a5407548753b7fde12fa58134ec3563vboxsync $(call MSG_GENERATE,VBoxDrv,$@,$<)
5366e994777f9d9391cf809dc77610f57270d75dvboxsync $(QUIET)$(RM) -f $@
5366e994777f9d9391cf809dc77610f57270d75dvboxsync $(QUIET)$(SED) \
5366e994777f9d9391cf809dc77610f57270d75dvboxsync -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
5366e994777f9d9391cf809dc77610f57270d75dvboxsync -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
5366e994777f9d9391cf809dc77610f57270d75dvboxsync -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync --output $@ \
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsyncif1of ($(KBUILD_TARGET), darwin solaris)
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync # Common manual loader script.
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync INSTALLS += SUPDrvScripts
5366e994777f9d9391cf809dc77610f57270d75dvboxsync SUPDrvScripts_INST = $(INST_DIST)
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync SUPDrvScripts_EXEC_SOURCES = \
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync $(KBUILD_TARGET)/load.sh
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsyncif1of ($(KBUILD_TARGET), linux)
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync # Targets for installing the linux sources.
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync vboxdrv-mod_INST = bin/src/vboxdrv/
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync vboxdrv-mod_SOURCES = \
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync $(subst $(DQUOTE),,$(FILES_VBOXDRV_NOBIN)) \
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync $(vboxdrv-mod_0_OUTDIR)/Makefile
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync vboxdrv-mod_EXEC_SOURCES = \
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync $(subst $(DQUOTE),,$(FILES_VBOXDRV_BIN)) \
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync $(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync vboxdrv-mod_CLEAN = \
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync $(vboxdrv-mod_0_OUTDIR)/Makefile \
5366e994777f9d9391cf809dc77610f57270d75dvboxsync $(PATH_TARGET)/vboxdrv-mod-1.dep \
388b6b190a5407548753b7fde12fa58134ec3563vboxsync # Scripts needed for building the kernel modules
5366e994777f9d9391cf809dc77610f57270d75dvboxsync includedep $(PATH_TARGET)/vboxdrv-mod-1.dep
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync $$(vboxdrv-mod_0_OUTDIR)/Makefile: \
388b6b190a5407548753b7fde12fa58134ec3563vboxsync $(PATH_SUB_CURRENT)/linux/Makefile \
388b6b190a5407548753b7fde12fa58134ec3563vboxsync $$(if $$(eq $$(Support/linux/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
388b6b190a5407548753b7fde12fa58134ec3563vboxsync | $$(dir $$@)
388b6b190a5407548753b7fde12fa58134ec3563vboxsync $(call MSG_TOOL,Creating,,$@)
388b6b190a5407548753b7fde12fa58134ec3563vboxsync ifndef VBOX_WITH_HARDENING
388b6b190a5407548753b7fde12fa58134ec3563vboxsync $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
388b6b190a5407548753b7fde12fa58134ec3563vboxsync $(QUIET)$(CP) -f $< $@
388b6b190a5407548753b7fde12fa58134ec3563vboxsync %$(QUIET2)$(APPEND) -t '$(PATH_TARGET)/vboxdrv-mod-1.dep' 'Support/linux/Makefile_VBOX_HARDENED=$(VBOX_WITH_HARDENING)'
388b6b190a5407548753b7fde12fa58134ec3563vboxsyncendif # real linux
388b6b190a5407548753b7fde12fa58134ec3563vboxsyncifeq ($(KBUILD_TARGET), win)
388b6b190a5407548753b7fde12fa58134ec3563vboxsync INSTALLS.win += VBoxDrv-inf
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync VBoxDrv-inf_INST = $(INST_BIN)
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync VBoxDrv-inf_MODE = a+r,u+w
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync VBoxDrv-inf_SOURCES = \
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync VBoxDrv-inf_CLEAN = $(VBoxDrv-inf_SOURCES)
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync VBoxDrv-inf_BLDDIRS = $(PATH_TARGET)/VBoxDrvCat.dir
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.inf: $(PATH_SUB_CURRENT)/win/VBoxDrv.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsync $(call MSG_GENERATE,VBoxDrv-inf,$@,$<)
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync $(call VBOX_EDIT_INF_FN,$<,$@)
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync ifdef VBOX_SIGNING_MODE
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync VBoxDrv-inf_SOURCES += \
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.sys: $$(VBoxDrv_1_TARGET) | $$(dir $$@)
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync $(INSTALL) -m 644 $< $(@D)
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync $(call MSG_TOOL,Inf2Cat,VBoxDrv-inf,$@,$<)
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync $(call VBOX_MAKE_CAT_FN, $(@D),$@)
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsync endif # signing
0fd108a555ae02f2fb557d5f2c40281999b60d15vboxsyncendif # !VBOX_ONLY_DOCS && !VBOX_ONLY_EXTPACKS && !VBOX_ONLY_TESTSUITE
6b9d50a0f466bd5a61458ed53925480ab28a3c17vboxsyncinclude $(KBUILD_PATH)/subfooter.kmk