Makefile.kmk revision 3882a01ea899831312f4aeb5e99d3d0af43c5680
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync# Sub-Makefile for the support library and the drivers/modules/kexts it uses.
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync# Copyright (C) 2006-2012 Oracle Corporation
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync# available from http://www.virtualbox.org. This file is free software;
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync# you can redistribute it and/or modify it under the terms of the GNU
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync# General Public License (GPL) as published by the Free Software
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync# The contents of this file may alternatively be used under the terms
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync# of the Common Development and Distribution License Version 1.0
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync# VirtualBox OSE distribution, in which case the provisions of the
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync# CDDL are applicable instead of those of the GPL.
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync# You may elect to license modified versions of this file under the
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync# terms and conditions of either the GPL or the CDDL or both.
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsyncSUB_DEPTH = ../../../..
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsyncinclude $(KBUILD_PATH)/subheader.kmk
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsyncLIBRARIES += SUPR3 SUPR3Static
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsyncifdef VBOX_WITH_HARDENING
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync LIBRARIES += SUPR3HardenedStatic
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsyncDLLS.win += VBoxSupLib
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsyncifdef VBOX_WITH_32_ON_64_MAIN_API
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync LIBRARIES += SUPR3-x86
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsyncifndef VBOX_ONLY_DOCS
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync if1of ($(VBOX_LDR_FMT), pe lx)
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync LIBRARIES += SUPR0
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsyncif !defined(VBOX_ONLY_DOCS) \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync && !defined(VBOX_ONLY_EXTPACKS) \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync && !defined(VBOX_ONLY_VALIDATIONKIT)
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync ifdef VBOX_WITH_SUPSVC
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync PROGRAMS += VBoxSupSvc
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync ifdef VBOX_WITH_VBOXDRV
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync LIBRARIES += SUPR0IdcClient
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync INSTALLS.linux += vboxdrv-mod
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync INSTALLS.freebsd += vboxdrv-mod
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync # Include sub-makefile(s).
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync # Populate FILES_VBOXDRV_NOBIN and FILES_VBOXDRV_BIN
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync ifeq ($(KBUILD_TARGET),linux)
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync include $(PATH_SUB_CURRENT)/linux/files_vboxdrv
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync ifeq ($(KBUILD_TARGET),freebsd)
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync include $(PATH_SUB_CURRENT)/freebsd/files_vboxdrv
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsyncendif # !VBOX_ONLY_DOCS && !VBOX_ONLY_EXTPACKS && !VBOX_ONLY_VALIDATIONKIT
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync# Authenticode related trust anchors and certificates -> .cpp
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsyncVBOX_SUP_WIN_CERTS_FILE = $(SUPR3_0_OUTDIR)/TrustAnchorsAndCerts.cpp
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsyncVBOX_SUP_WIN_CERTS := \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync SpcRootMicrosoft0=SpcRoot-MicrosoftAuthenticodeTmRootAuthority-01.taf \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync SpcRootMicrosoft1=SpcRoot-MicrosoftRootAuthority-00c1008b3c3c8811d13ef663ecdf40.taf \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync SpcRootMicrosoft2=SpcRoot-MicrosoftRootCertificateAuthority-79ad16a14aa0a5ad4c7358f407132e65.taf \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync SpcRootMicrosoft3=SpcRoot-MicrosoftRootCertificateAuthority2010-28cc3a25bfba44ac449a9b586b4339aa.taf \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync SpcRootMicrosoft4=SpcRoot-MicrosoftRootCertificateAuthority2011-3f8bc8b5fc9fb29643b569d66c42e144.taf \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync SpcRootMicrosoft5=SpcRoot-MicrosoftDigitalMediaAuthority2005-6eff330eb6e7569740680870104baaba.taf \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync NtRootMicrosoft6=NtRoot-MicrosoftCodeVerificationRoot-729404101f3e0ca347837fca175a8438.taf \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync TimeRootMicrosoft0=Timestamp-CopyrightC1997MicrosoftCorp-01.taf \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync TrustedCertVBox0=Trusted-OracleCorporationVirtualBox-51ca009816fdbd80f120e015ee75823e.taf
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsyncVBOX_SUP_WIN_CERT_NAMES := $(foreach cert,$(VBOX_SUP_WIN_CERTS),$(firstword $(subst =,$(SPACE) ,$(cert))))
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsyncVBOX_PATH_SUPR3_CERTIFICATES := $(PATH_SUB_CURRENT)/win/Certificates
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync# 1=name, 2=filter, 3=buildcert?.
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsyncif "$(KBUILD_TARGET)" == "win" && defined(VBOX_WITH_HARDENING)
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync VBOX_SUP_GEN_CERT_MACRO = 'SUPTAENTRY const g_aSUP$(1)TAs[] =' '{' \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync $(if-expr "$(3)" == "",,' SUPTAENTRY_GEN(g_abSUPBuildCert),') \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync $(foreach certnm,$(filter $(2),$(VBOX_SUP_WIN_CERT_NAMES)), ' SUPTAENTRY_GEN(g_abSUP$(certnm)),') \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync '};' 'unsigned const g_cSUP$(1)TAs = RT_ELEMENTS(g_aSUP$(1)TAs);' '' ''
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync VBOX_SUP_GEN_CERT_MACRO = 'SUPTAENTRY const g_aSUP$(1)TAs[] =' '{' \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync $(foreach certnm,$(filter $(2),$(VBOX_SUP_WIN_CERT_NAMES)), ' SUPTAENTRY_GEN(g_abSUP$(certnm)),') \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync '};' 'unsigned const g_cSUP$(1)TAs = RT_ELEMENTS(g_aSUP$(1)TAs);' '' ''
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync$$(VBOX_SUP_WIN_CERTS_FILE): $(MAKEFILE_CURRENT) \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync $(foreach cert,$(VBOX_SUP_WIN_CERTS),$(VBOX_PATH_SUPR3_CERTIFICATES)/$(lastword $(subst =,$(SPACE) ,$(cert)))) \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync $(VBOX_BIN2C) \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync $(if-expr "$(KBUILD_TARGET)" == "win" && defined(VBOX_WITH_HARDENING),$(VBOX_RTSIGNTOOL)) \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync | $$(dir $$@)
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync $(QUIET)$(RM) -f -- $@ $@.cer
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync $(QUIET)$(APPEND) -n "$@" \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync '#include <VBox/sup.h>' \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync $(foreach cert,$(VBOX_SUP_WIN_CERTS), $(NLTAB)$(VBOX_BIN2C) -ascii --append \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync "SUP$(firstword $(subst =,$(SP) ,$(cert)))" \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync "$(VBOX_PATH_SUPR3_CERTIFICATES)/$(lastword $(subst =,$(SP) ,$(cert)))" \
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsync# The build certificate.
d1c5a03c19683c719b94496bb998fde2f2e5e622vboxsyncif "$(KBUILD_TARGET)" == "win" && defined(VBOX_WITH_HARDENING)
VBOX_PATH_RUNTIME_SRC ?= $(PATH_ROOT)/src/VBox/Runtime
SUPR3HardenedStatic_DEFS.win += VBOX_WITH_VISTA_NO_SP
SUPR3HardenedStatic_DEFS += IN_RT IN_RT_R3 IN_RT_STATIC IPRT_NO_CRT RT_WITH_NOCRT_ALIASES LOG_DISABLED IPRT_NO_ERROR_DATA
SUPR3HardenedStatic_DEFS.win += LDR_ONLY_PE __STRALIGN_H_
SUPR3HardenedStatic_INCS += $(PATH_ROOT)/include/iprt/nocrt $(VBOX_PATH_RUNTIME_SRC)/include
$(VBOX_PATH_RUNTIME_SRC)/common/ldr/ldr.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/ldr/ldrEx.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/ldr/ldrPE.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-basics.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-cursor.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-default-allocator.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-dump.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-encode.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-bitstring.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-bitstring-decode.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-boolean.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-boolean-decode.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-core.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-core-decode.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-dyntype.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-dyntype-decode.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-integer.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-integer-decode.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-null.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-null-decode.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-objid.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-objid-decode.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-octetstring.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-octetstring-decode.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-string.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-string-decode.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-time.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-time-decode.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/digest-core.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/digest-builtin.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkcs7-asn1-decoder.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkcs7-core.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkcs7-init.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkcs7-sanity.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkcs7-verify.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkix-signature-builtin.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkix-signature-core.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkix-signature-rsa.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkix-verify.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkix-util.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/rsa-asn1-decoder.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/rsa-core.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/rsa-init.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/rsa-sanity.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/spc-asn1-decoder.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/spc-core.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/spc-init.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/spc-sanity.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/x509-asn1-decoder.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/x509-certpaths.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/x509-core.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/x509-init.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/x509-sanity.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/x509-verify.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/store.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/store-inmem.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/taf-asn1-decoder.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/taf-core.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/taf-init.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/crypto/taf-sanity.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/checksum/md2.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/checksum/md5.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/checksum/sha1.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/checksum/sha256.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/checksum/sha512.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/checksum/md2str.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/checksum/md5str.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/checksum/sha1str.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/checksum/sha256str.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/checksum/sha512str.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/err/errinfo.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/path/RTPathChangeToUnixSlashes.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/path/RTPathExt.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrPrintHexBytes.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/string/RTUtf16PrintHexBytes.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/string/RTUtf16ICmpAscii.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/string/strstrip.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/err/errmsg.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/math/bignum.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg1Weak.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg2Weak.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg2WeakV.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/string/memchr.asm \
$(VBOX_PATH_RUNTIME_SRC)/common/string/memcmp.asm \
$(VBOX_PATH_RUNTIME_SRC)/common/string/memcpy.asm \
$(VBOX_PATH_RUNTIME_SRC)/common/string/memmove.asm \
$(VBOX_PATH_RUNTIME_SRC)/common/string/mempcpy.asm \
$(VBOX_PATH_RUNTIME_SRC)/common/string/memset.asm \
$(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrCat.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrCmp.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrCopy.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrNCmp.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrNLen.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/string/strchr.asm \
$(VBOX_PATH_RUNTIME_SRC)/common/string/strcmp.asm \
$(VBOX_PATH_RUNTIME_SRC)/common/string/strcpy.asm \
$(VBOX_PATH_RUNTIME_SRC)/common/string/strformat.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/string/strformatrt.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/string/strformattype.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/string/stringalloc.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/string/strlen.asm \
$(VBOX_PATH_RUNTIME_SRC)/common/string/strncmp.asm \
$(VBOX_PATH_RUNTIME_SRC)/common/string/strncpy.asm \
$(VBOX_PATH_RUNTIME_SRC)/common/string/strprintf.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/string/strtonum.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/string/utf-16.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/string/utf-8.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/string/utf-8-case.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/string/unidata-upper.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/string/unidata-lower.cpp \
$(VBOX_PATH_RUNTIME_SRC)/common/time/time.cpp \
$(VBOX_PATH_RUNTIME_SRC)/generic/RTAssertShouldPanic-generic.cpp \
$(VBOX_PATH_RUNTIME_SRC)/generic/memsafer-generic.cpp \
$(VBOX_PATH_RUNTIME_SRC)/generic/uuid-generic.cpp \
$(VBOX_PATH_RUNTIME_SRC)/nt/RTErrConvertFromNtStatus.cpp \
$(VBOX_PATH_RUNTIME_SRC)/win/RTErrConvertFromWin32.cpp \
$(VBOX_PATH_RUNTIME_SRC)/win/errmsgwin.cpp
# Add necessary compiler specific files from libcmt.lib and the lib dir.
SUPR3HardenedStatic_VBOX_LIBC_OBJS = chkstk.obj
SUPR3HardenedStatic_VBOX_LIBC_OBJS += alloca16.obj
SUPR3HardenedStatic_SOURCES.win += $(addprefix $(SUPR3HardenedStatic_0_OUTDIR)/,$(SUPR3HardenedStatic_VBOX_LIBC_OBJS))
$(TOOL_$(TEMPLATE_VBOXR3HARDENEDEXE_TOOL.win.$(KBUILD_TARGET_ARCH))_AR) "$<" \
/EXTRACT:`$(TOOL_$(TEMPLATE_VBOXR3HARDENEDEXE_TOOL.win.$(KBUILD_TARGET_ARCH))_AR) "$<" /LIST \
VBoxSupLib_TEMPLATE = $(if-expr "$(KBUILD_TARGET)" == "win" && defined(VBOX_WITH_HARDENING),VBOXR3HARDENEDLIB,VBOXR3)
VBoxSupLib_LDFLAGS.win.amd64 = -Entry:DllMainEntrypoint
VBoxSupLib_LDFLAGS.win.x86 = -Entry:DllMainEntrypoint
# VBoxSupSvc - The system wide service/daemon.
SUPR0_SOURCES = $(SUPR0_0_OUTDIR)/SUPR0.def
SUPR0_CLEAN = $(SUPR0_0_OUTDIR)/SUPR0.def
$$(SUPR0_0_OUTDIR)/SUPR0.def: \
$(PATH_SUB_CURRENT)/SUPDrv.c \
SUPR0IdcClient_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK) $(VBOX_WINPSDK)INCS
# VBoxDrv.sys - The OS/2 driver.
# temp hack to ensure that SUPDrvA-os2.asm is first in the link.
$(PATH_ROOT)/src/VBox/Runtime/include
SUPDrv.c \
# vboxdrv.ko - The FreeBSD Kernel Module.
SUPDrv.c \
## @todo the SUPDrv-freebsd.def is most probably gonna break it and require build system hacking...
vboxdrv-mod_INST = bin/src/vboxdrv/
$(PATH_SUB_CURRENT)/freebsd/Makefile \
$$(if $$(eq $$(Support/freebsd/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
VBoxDrv_NAME.freebsd = vboxdrv
VBoxDrv_NAME.linux = vboxdrv
VBoxDrv_NAME.solaris = vboxdrv
VBoxDrv_INSTTYPE.win = none
VBoxDrv_DEBUG_INSTTYPE.win = both
VBoxDrv_DEBUG_INST.darwin= $(patsubst %/,%,$(INST_VBOXDRV))
VBoxDrv_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK) $(VBOX_WINPSDK)INCS
VBoxDrv_SDKS.win += VBoxOpenSslHardened
#VBoxDrv_DEFS.debug += DEBUG_DARWIN_GIP
VBoxDrv_DEFS.darwin := VBOX_WITH_HOST_VMX
VBoxDrv_DEFS.linux := \
KBUILD_MODNAME=KBUILD_STR\(vboxdrv\) KBUILD_BASENAME=KBUILD_STR\(vboxdrv\) MODULE CONFIG_VBOXDRV_AS_MISC
VBoxDrv_DEFS.linux += EXPORT_SYMTAB
VBoxDrv_DEFS.solaris += VBOX_WITH_NETFLT
VBoxDrv_DEFS.solaris += VBOX_WITH_NATIVE_SOLARIS_LOADING
VBoxDrv_DEFS.win += VBOX_WITHOUT_NATIVE_R0_LOADER
VBoxDrv_DEFS.win += VBOX_WITH_VISTA_NO_SP
VBoxDrv_INCS.darwin = ./darwin
VBoxDrv_LIBS.linux.debug = $(VBoxDrv_LIBS) $(VBOX_GCC_LIBGCC)
VBoxDrv_LIBS.win = \
$(PATH_SDK_$(VBOX_WINDDK)_LIB)/ntoskrnl.lib \
$(PATH_SDK_$(VBOX_WINDDK)_LIB)/hal.lib
#VBoxDrv_LDFLAGS.darwin = -v -Wl,-whyload -Wl,-v -Wl,-whatsloaded
VBoxDrv_LDFLAGS.win.x86 = -Entry:DriverEntry@8
VBoxDrv_LDFLAGS.win.amd64= -Entry:DriverEntry
VBoxDrv_SOURCES.win += \
SUPDrv.d \
SUPDrv.c \
SUPDrv-dtrace.cpp_DEFS.darwin += VBOX_PATH_MACOSX_DTRACE_H=\"$(VBOX_PATH_MACOSX_SDK)/usr/include/sys/dtrace.h\"
VBoxDrv.kext_INST = $(INST_VBOXDRV)Contents/
$(PATH_SUB_CURRENT)/darwin/Info.plist \
$(KBUILD_TARGET)/load.sh
vboxdrv-mod_INST = bin/src/vboxdrv/
$(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers
$(PATH_TARGET)/vboxdrv-mod-1.dep \
includedep $(PATH_TARGET)/vboxdrv-mod-1.dep
$(PATH_SUB_CURRENT)/linux/Makefile \
$$(if $$(eq $$(Support/linux/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
%$(QUIET2)$(APPEND) -t '$(PATH_TARGET)/vboxdrv-mod-1.dep' 'Support/linux/Makefile_VBOX_HARDENED=$(VBOX_WITH_HARDENING)'
INSTALLS.win += VBoxDrv-inf
$(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.inf
VBoxDrv-inf_BLDDIRS = $(PATH_TARGET)/VBoxDrvCat.dir
$(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.inf: $(PATH_SUB_CURRENT)/win/VBoxDrv.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
$(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.sys \
$(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.cat
$(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.sys: $$(VBoxDrv_1_TARGET) | $$(dir $$@)
$(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.cat: \
$(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.inf \
$(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.sys