[2478] | 1 | # $Id: Makefile.kmk 67979 2017-07-15 11:02:00Z vboxsync $
|
---|
| 2 | ## @file
|
---|
[1] | 3 | # Sub-Makefile for the support library and the drivers/modules/kexts it uses.
|
---|
| 4 | #
|
---|
| 5 |
|
---|
| 6 | #
|
---|
[62490] | 7 | # Copyright (C) 2006-2016 Oracle Corporation
|
---|
[4163] | 8 | #
|
---|
[5999] | 9 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
| 10 | # available from http://www.virtualbox.org. This file is free software;
|
---|
| 11 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
| 12 | # General Public License (GPL) as published by the Free Software
|
---|
| 13 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
| 14 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
| 15 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
| 16 | #
|
---|
| 17 | # The contents of this file may alternatively be used under the terms
|
---|
| 18 | # of the Common Development and Distribution License Version 1.0
|
---|
| 19 | # (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
| 20 | # VirtualBox OSE distribution, in which case the provisions of the
|
---|
| 21 | # CDDL are applicable instead of those of the GPL.
|
---|
| 22 | #
|
---|
| 23 | # You may elect to license modified versions of this file under the
|
---|
| 24 | # terms and conditions of either the GPL or the CDDL or both.
|
---|
| 25 | #
|
---|
[1] | 26 |
|
---|
[10049] | 27 | SUB_DEPTH = ../../../..
|
---|
[41477] | 28 | include $(KBUILD_PATH)/subheader.kmk
|
---|
[1] | 29 |
|
---|
| 30 | #
|
---|
| 31 | # Targets
|
---|
| 32 | #
|
---|
[51770] | 33 | LIBRARIES += SUPR3 SUPR3Static
|
---|
[66536] | 34 | if defined(VBOX_WITH_HARDENING) \
|
---|
[66533] | 35 | && !defined(VBOX_ONLY_VALIDATIONKIT)
|
---|
[51770] | 36 | LIBRARIES += SUPR3HardenedStatic
|
---|
| 37 | endif
|
---|
| 38 | DLLS.win += VBoxSupLib
|
---|
[48282] | 39 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
| 40 | LIBRARIES += SUPR3-x86
|
---|
| 41 | endif
|
---|
[66545] | 42 | if !defined(VBOX_ONLY_DOCS)
|
---|
[27031] | 43 | if1of ($(VBOX_LDR_FMT), pe lx)
|
---|
[11725] | 44 | LIBRARIES += SUPR0
|
---|
[11703] | 45 | endif
|
---|
[27031] | 46 | endif
|
---|
[54224] | 47 | if !defined(VBOX_ONLY_BUILD) && defined(VBOX_WITH_RAW_MODE)
|
---|
| 48 | LIBRARIES += SUPRC
|
---|
| 49 | endif
|
---|
[34484] | 50 | if !defined(VBOX_ONLY_DOCS) \
|
---|
| 51 | && !defined(VBOX_ONLY_EXTPACKS) \
|
---|
[51346] | 52 | && !defined(VBOX_ONLY_VALIDATIONKIT)
|
---|
[11725] | 53 | ifdef VBOX_WITH_SUPSVC
|
---|
| 54 | PROGRAMS += VBoxSupSvc
|
---|
| 55 | endif
|
---|
[11703] | 56 | ifdef VBOX_WITH_VBOXDRV
|
---|
[11725] | 57 | LIBRARIES += SUPR0IdcClient
|
---|
| 58 | SYSMODS.os2 += VBoxDrv
|
---|
[13052] | 59 | endif
|
---|
[38183] | 60 | INSTALLS.linux += vboxdrv-mod
|
---|
| 61 | INSTALLS.freebsd += vboxdrv-mod
|
---|
[1] | 62 |
|
---|
[11703] | 63 | #
|
---|
| 64 | # Include sub-makefile(s).
|
---|
| 65 | #
|
---|
| 66 | include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
|
---|
[1] | 67 |
|
---|
[11703] | 68 | #
|
---|
| 69 | # Populate FILES_VBOXDRV_NOBIN and FILES_VBOXDRV_BIN
|
---|
| 70 | #
|
---|
[23526] | 71 | ifeq ($(KBUILD_TARGET),linux)
|
---|
| 72 | include $(PATH_SUB_CURRENT)/linux/files_vboxdrv
|
---|
| 73 | endif
|
---|
| 74 | ifeq ($(KBUILD_TARGET),freebsd)
|
---|
| 75 | include $(PATH_SUB_CURRENT)/freebsd/files_vboxdrv
|
---|
| 76 | endif
|
---|
[51346] | 77 | endif # !VBOX_ONLY_DOCS && !VBOX_ONLY_EXTPACKS && !VBOX_ONLY_VALIDATIONKIT
|
---|
[1] | 78 |
|
---|
[51770] | 79 | #
|
---|
| 80 | # Authenticode related trust anchors and certificates -> .cpp
|
---|
| 81 | #
|
---|
| 82 | VBOX_SUP_WIN_CERTS_FILE = $(SUPR3_0_OUTDIR)/TrustAnchorsAndCerts.cpp
|
---|
| 83 | VBOX_SUP_WIN_CERTS := \
|
---|
| 84 | SpcRootMicrosoft0=SpcRoot-MicrosoftAuthenticodeTmRootAuthority-01.taf \
|
---|
| 85 | SpcRootMicrosoft1=SpcRoot-MicrosoftRootAuthority-00c1008b3c3c8811d13ef663ecdf40.taf \
|
---|
| 86 | SpcRootMicrosoft2=SpcRoot-MicrosoftRootCertificateAuthority-79ad16a14aa0a5ad4c7358f407132e65.taf \
|
---|
| 87 | SpcRootMicrosoft3=SpcRoot-MicrosoftRootCertificateAuthority2010-28cc3a25bfba44ac449a9b586b4339aa.taf \
|
---|
| 88 | SpcRootMicrosoft4=SpcRoot-MicrosoftRootCertificateAuthority2011-3f8bc8b5fc9fb29643b569d66c42e144.taf \
|
---|
| 89 | SpcRootMicrosoft5=SpcRoot-MicrosoftDigitalMediaAuthority2005-6eff330eb6e7569740680870104baaba.taf \
|
---|
[53955] | 90 | SpcRootMicrosoft6=SpcRoot-MicrosoftDevelopmentRootCertificateAuthority2014-078f0a9d03df119e434e4fec1bf0235a.taf \
|
---|
| 91 | NtRootMicrosoft7=NtRoot-MicrosoftCodeVerificationRoot-729404101f3e0ca347837fca175a8438.taf \
|
---|
[51770] | 92 | TimeRootMicrosoft0=Timestamp-CopyrightC1997MicrosoftCorp-01.taf \
|
---|
| 93 | TrustedCertVBox0=Trusted-OracleCorporationVirtualBox-51ca009816fdbd80f120e015ee75823e.taf
|
---|
| 94 | VBOX_SUP_WIN_CERT_NAMES := $(foreach cert,$(VBOX_SUP_WIN_CERTS),$(firstword $(subst =,$(SPACE) ,$(cert))))
|
---|
| 95 | VBOX_PATH_SUPR3_CERTIFICATES := $(PATH_SUB_CURRENT)/win/Certificates
|
---|
[1] | 96 |
|
---|
[51770] | 97 | # 1=name, 2=filter, 3=buildcert?.
|
---|
| 98 | if "$(KBUILD_TARGET)" == "win" && defined(VBOX_WITH_HARDENING)
|
---|
| 99 | VBOX_SUP_GEN_CERT_MACRO = 'SUPTAENTRY const g_aSUP$(1)TAs[] =' '{' \
|
---|
| 100 | $(if-expr "$(3)" == "",,' SUPTAENTRY_GEN(g_abSUPBuildCert),') \
|
---|
| 101 | $(foreach certnm,$(filter $(2),$(VBOX_SUP_WIN_CERT_NAMES)), ' SUPTAENTRY_GEN(g_abSUP$(certnm)),') \
|
---|
| 102 | '};' 'unsigned const g_cSUP$(1)TAs = RT_ELEMENTS(g_aSUP$(1)TAs);' '' ''
|
---|
| 103 | else
|
---|
| 104 | VBOX_SUP_GEN_CERT_MACRO = 'SUPTAENTRY const g_aSUP$(1)TAs[] =' '{' \
|
---|
| 105 | $(foreach certnm,$(filter $(2),$(VBOX_SUP_WIN_CERT_NAMES)), ' SUPTAENTRY_GEN(g_abSUP$(certnm)),') \
|
---|
| 106 | '};' 'unsigned const g_cSUP$(1)TAs = RT_ELEMENTS(g_aSUP$(1)TAs);' '' ''
|
---|
| 107 | endif
|
---|
| 108 |
|
---|
| 109 | $$(VBOX_SUP_WIN_CERTS_FILE): $(MAKEFILE_CURRENT) \
|
---|
| 110 | $(foreach cert,$(VBOX_SUP_WIN_CERTS),$(VBOX_PATH_SUPR3_CERTIFICATES)/$(lastword $(subst =,$(SPACE) ,$(cert)))) \
|
---|
| 111 | $(VBOX_BIN2C) \
|
---|
| 112 | $(if-expr "$(KBUILD_TARGET)" == "win" && defined(VBOX_WITH_HARDENING),$(VBOX_RTSIGNTOOL)) \
|
---|
| 113 | | $$(dir $$@)
|
---|
| 114 | $(QUIET)$(RM) -f -- $@ $@.cer
|
---|
| 115 | $(QUIET)$(APPEND) -n "$@" \
|
---|
| 116 | '' \
|
---|
| 117 | '#include <VBox/sup.h>' \
|
---|
| 118 | ''
|
---|
[63499] | 119 | $(foreach cert,$(VBOX_SUP_WIN_CERTS), $(NLTAB)$(VBOX_BIN2C) -ascii --append --static --no-size \
|
---|
[51770] | 120 | "SUP$(firstword $(subst =,$(SP) ,$(cert)))" \
|
---|
| 121 | "$(VBOX_PATH_SUPR3_CERTIFICATES)/$(lastword $(subst =,$(SP) ,$(cert)))" \
|
---|
| 122 | "$@")
|
---|
| 123 | # The build certificate.
|
---|
[54046] | 124 | if "$(KBUILD_TARGET)" == "win" && defined(VBOX_WITH_HARDENING) && defined(VBOX_SIGNING_MODE)
|
---|
[51770] | 125 | $(VBOX_RTSIGNTOOL) extract-exe-signer-cert --exe $(VBOX_RTSIGNTOOL) --output "$@.cer" --der
|
---|
| 126 | $(VBOX_BIN2C) -ascii --append SUPBuildCert "$@.cer" $@
|
---|
| 127 | $(QUIET)$(RM) -f -- $@.cer
|
---|
| 128 | endif
|
---|
| 129 | # Generate certificate lists.
|
---|
| 130 | $(QUIET)$(APPEND) -n "$@" '' \
|
---|
| 131 | $(call VBOX_SUP_GEN_CERT_MACRO,All,%,build) \
|
---|
| 132 | $(call VBOX_SUP_GEN_CERT_MACRO,SpcRoot,SpcRoot%) \
|
---|
| 133 | $(call VBOX_SUP_GEN_CERT_MACRO,NtKernelRoot,NtRoot%) \
|
---|
| 134 | $(call VBOX_SUP_GEN_CERT_MACRO,Timestamp,TimeRoot%) \
|
---|
| 135 | $(call VBOX_SUP_GEN_CERT_MACRO,Trusted,TrustedCert%,build)
|
---|
| 136 |
|
---|
| 137 | tst: $(VBOX_SUP_WIN_CERTS_FILE)
|
---|
| 138 |
|
---|
| 139 |
|
---|
[1] | 140 | #
|
---|
| 141 | # The Ring-3 Support Library (this is linked into the IPRT dll, VBoxRT).
|
---|
| 142 | #
|
---|
[52030] | 143 | SUPR3_TEMPLATE = VBOXR3
|
---|
[17854] | 144 | SUPR3_DEFS = \
|
---|
| 145 | IN_SUP_R3 IN_RT_R3 \
|
---|
[40370] | 146 | $(if $(VBOX_WITH_SUPSVC),VBOX_WITH_SUPSVC) \
|
---|
| 147 | $(if $(VBOX_WITH_MAIN),VBOX_WITH_MAIN,) \
|
---|
[52030] | 148 | $(if $(VBOX_WITH_RAW_MODE),VBOX_WITH_RAW_MODE,) \
|
---|
[60982] | 149 | $(if $(VBOX_WITH_REM),VBOX_WITH_REM,) \
|
---|
[52404] | 150 | VBOX_PERMIT_MORE \
|
---|
| 151 | VBOX_PERMIT_EVEN_MORE
|
---|
[2516] | 152 | SUPR3_INCS := $(PATH_SUB_CURRENT)
|
---|
[1] | 153 | SUPR3_SOURCES = \
|
---|
[2516] | 154 | SUPLib.cpp \
|
---|
[49634] | 155 | SUPLibLdr.cpp \
|
---|
[19892] | 156 | SUPLibSem.cpp \
|
---|
[41117] | 157 | SUPLibTracerA.asm \
|
---|
[54224] | 158 | SUPLibAll.cpp \
|
---|
[11725] | 159 | SUPR3HardenedIPRT.cpp \
|
---|
| 160 | SUPR3HardenedVerify.cpp \
|
---|
[51770] | 161 | $(KBUILD_TARGET)/SUPLib-$(KBUILD_TARGET).cpp \
|
---|
| 162 | $(VBOX_SUP_WIN_CERTS_FILE)
|
---|
| 163 | ifdef VBOX_WITH_HARDENING
|
---|
| 164 | SUPR3_SOURCES.win = \
|
---|
| 165 | win/SUPHardenedVerifyImage-win.cpp
|
---|
| 166 | endif
|
---|
[1] | 167 |
|
---|
[48282] | 168 | SUPR3-x86_TEMPLATE = VBoxR3Dll-x86
|
---|
| 169 | SUPR3-x86_EXTENDS = SUPR3
|
---|
| 170 |
|
---|
| 171 |
|
---|
[27017] | 172 | #
|
---|
[51770] | 173 | # Static version of SUPR3. This is more of a stub than anything else in a
|
---|
| 174 | # hardened build, at least on windows.
|
---|
[27017] | 175 | #
|
---|
| 176 | SUPR3Static_TEMPLATE = VBOXR3STATIC
|
---|
| 177 | SUPR3Static_EXTENDS = SUPR3
|
---|
[51770] | 178 | SUPR3Static_DEFS = $(SUPR3_DEFS) IN_SUP_R3_STATIC
|
---|
| 179 | SUPR3Static_SOURCES.win = $(filter-out win/SUPHardenedVerifyImage-win.cpp, $(SUPR3_SOURCES.win))
|
---|
[10258] | 180 |
|
---|
[51770] | 181 |
|
---|
[1] | 182 | #
|
---|
[11725] | 183 | # The static part of the hardened support library (ring-3).
|
---|
| 184 | #
|
---|
[51770] | 185 | VBOX_PATH_RUNTIME_SRC ?= $(PATH_ROOT)/src/VBox/Runtime
|
---|
[11725] | 186 | SUPR3HardenedStatic_TEMPLATE = VBOXR3HARDENEDLIB
|
---|
| 187 | SUPR3HardenedStatic_DEFS = IN_SUP_HARDENED_R3
|
---|
[17854] | 188 | SUPR3HardenedStatic_DEFS += \
|
---|
| 189 | $(if $(VBOX_WITH_SUPSVC),VBOX_WITH_SUPSVC,) \
|
---|
[40370] | 190 | $(if $(VBOX_WITH_MAIN),VBOX_WITH_MAIN,) \
|
---|
[51770] | 191 | $(if $(VBOX_WITH_RAW_MODE),VBOX_WITH_RAW_MODE,) \
|
---|
[60982] | 192 | $(if $(VBOX_WITH_REM),VBOX_WITH_REM,) \
|
---|
[51999] | 193 | $(if $(VBOX_WITHOUT_DEBUGGER_CHECKS),VBOX_WITHOUT_DEBUGGER_CHECKS,) \
|
---|
[52030] | 194 | $(if $(VBOX_PERMIT_VISUAL_STUDIO_PROFILING),VBOX_PERMIT_VISUAL_STUDIO_PROFILING,) \
|
---|
[52404] | 195 | VBOX_PERMIT_MORE \
|
---|
| 196 | VBOX_PERMIT_EVEN_MORE
|
---|
[51770] | 197 | ifdef VBOX_WITH_VISTA_NO_SP
|
---|
| 198 | SUPR3HardenedStatic_DEFS.win += VBOX_WITH_VISTA_NO_SP
|
---|
| 199 | endif
|
---|
[11725] | 200 | SUPR3HardenedStatic_INCS = .
|
---|
| 201 | SUPR3HardenedStatic_SOURCES = \
|
---|
| 202 | SUPR3HardenedMain.cpp \
|
---|
| 203 | SUPR3HardenedVerify.cpp \
|
---|
[51770] | 204 | SUPR3HardenedNoCrt.cpp \
|
---|
[11725] | 205 | $(KBUILD_TARGET)/SUPLib-$(KBUILD_TARGET).cpp
|
---|
[51770] | 206 | SUPR3HardenedStatic_SOURCES.win = \
|
---|
| 207 | win/SUPR3HardenedMain-win.cpp \
|
---|
| 208 | win/SUPR3HardenedMainA-win.asm \
|
---|
[52356] | 209 | win/SUPR3HardenedMainImports-win.cpp \
|
---|
[66714] | 210 | win/SUPHardenedVerifyProcess-win.cpp \
|
---|
| 211 | win/SUPHardenedVerifyImage-win.cpp \
|
---|
[51770] | 212 | $(VBOX_SUP_WIN_CERTS_FILE)
|
---|
[59752] | 213 | SUPR3HardenedStatic_SOURCES.x86 += \
|
---|
| 214 | $(VBOX_PATH_RUNTIME_SRC)/common/asm/ASMMemFirstMismatchingU8.asm
|
---|
| 215 | SUPR3HardenedStatic_SOURCES.amd64 += \
|
---|
| 216 | $(VBOX_PATH_RUNTIME_SRC)/common/asm/ASMMemFirstMismatchingU8.asm
|
---|
[11725] | 217 |
|
---|
[59752] | 218 |
|
---|
[51771] | 219 | if "$(KBUILD_TARGET)" == "win" && defined(VBOX_WITH_HARDENING) ## @todo some of this move up.
|
---|
[52403] | 220 | SUPR3HardenedStatic_DEFS += \
|
---|
| 221 | IN_RT_R3 \
|
---|
| 222 | IN_RT_STATIC \
|
---|
| 223 | IN_DIS \
|
---|
[66714] | 224 | IN_DIS_STATIC \
|
---|
[52403] | 225 | DIS_CORE_ONLY \
|
---|
| 226 | IPRT_NO_CRT \
|
---|
| 227 | RT_WITH_NOCRT_ALIASES \
|
---|
| 228 | LOG_DISABLED \
|
---|
| 229 | IPRT_NO_ERROR_DATA
|
---|
[51770] | 230 | SUPR3HardenedStatic_DEFS.win += LDR_ONLY_PE __STRALIGN_H_
|
---|
| 231 |
|
---|
| 232 | SUPR3HardenedStatic_INCS += $(PATH_ROOT)/include/iprt/nocrt $(VBOX_PATH_RUNTIME_SRC)/include
|
---|
| 233 |
|
---|
| 234 | SUPR3HardenedStatic_SOURCES += \
|
---|
| 235 | $(VBOX_PATH_RUNTIME_SRC)/common/ldr/ldr.cpp \
|
---|
| 236 | $(VBOX_PATH_RUNTIME_SRC)/common/ldr/ldrEx.cpp \
|
---|
| 237 | $(VBOX_PATH_RUNTIME_SRC)/common/ldr/ldrPE.cpp \
|
---|
[52947] | 238 | $(VBOX_PATH_RUNTIME_SRC)/common/alloc/heapsimple.cpp \
|
---|
[51770] | 239 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-basics.cpp \
|
---|
| 240 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-cursor.cpp \
|
---|
| 241 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-default-allocator.cpp \
|
---|
| 242 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-dump.cpp \
|
---|
| 243 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-encode.cpp \
|
---|
| 244 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-bitstring.cpp \
|
---|
| 245 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-bitstring-decode.cpp \
|
---|
| 246 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-boolean.cpp \
|
---|
| 247 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-boolean-decode.cpp \
|
---|
| 248 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-core.cpp \
|
---|
| 249 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-core-decode.cpp \
|
---|
| 250 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-dyntype.cpp \
|
---|
| 251 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-dyntype-decode.cpp \
|
---|
| 252 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-integer.cpp \
|
---|
| 253 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-integer-decode.cpp \
|
---|
| 254 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-null.cpp \
|
---|
| 255 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-null-decode.cpp \
|
---|
| 256 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-objid.cpp \
|
---|
| 257 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-objid-decode.cpp \
|
---|
| 258 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-octetstring.cpp \
|
---|
| 259 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-octetstring-decode.cpp \
|
---|
| 260 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-string.cpp \
|
---|
| 261 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-string-decode.cpp \
|
---|
| 262 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-time.cpp \
|
---|
| 263 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-time-decode.cpp \
|
---|
| 264 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/digest-core.cpp \
|
---|
| 265 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/digest-builtin.cpp \
|
---|
| 266 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkcs7-asn1-decoder.cpp \
|
---|
| 267 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkcs7-core.cpp \
|
---|
| 268 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkcs7-init.cpp \
|
---|
| 269 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkcs7-sanity.cpp \
|
---|
| 270 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkcs7-verify.cpp \
|
---|
| 271 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkix-signature-builtin.cpp \
|
---|
| 272 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkix-signature-core.cpp \
|
---|
| 273 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkix-signature-rsa.cpp \
|
---|
| 274 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkix-verify.cpp \
|
---|
| 275 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkix-util.cpp \
|
---|
| 276 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/rsa-asn1-decoder.cpp \
|
---|
| 277 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/rsa-core.cpp \
|
---|
| 278 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/rsa-init.cpp \
|
---|
| 279 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/rsa-sanity.cpp \
|
---|
| 280 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/spc-asn1-decoder.cpp \
|
---|
| 281 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/spc-core.cpp \
|
---|
| 282 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/spc-init.cpp \
|
---|
| 283 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/spc-sanity.cpp \
|
---|
| 284 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/x509-asn1-decoder.cpp \
|
---|
| 285 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/x509-certpaths.cpp \
|
---|
| 286 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/x509-core.cpp \
|
---|
| 287 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/x509-init.cpp \
|
---|
| 288 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/x509-sanity.cpp \
|
---|
| 289 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/x509-verify.cpp \
|
---|
| 290 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/store.cpp \
|
---|
| 291 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/store-inmem.cpp \
|
---|
| 292 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/taf-asn1-decoder.cpp \
|
---|
| 293 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/taf-core.cpp \
|
---|
| 294 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/taf-init.cpp \
|
---|
| 295 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/taf-sanity.cpp \
|
---|
[52600] | 296 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/tsp-asn1-decoder.cpp \
|
---|
| 297 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/tsp-core.cpp \
|
---|
| 298 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/tsp-init.cpp \
|
---|
| 299 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/tsp-sanity.cpp \
|
---|
[51851] | 300 | $(VBOX_PATH_RUNTIME_SRC)/common/checksum/alt-md2.cpp \
|
---|
| 301 | $(VBOX_PATH_RUNTIME_SRC)/common/checksum/alt-md5.cpp \
|
---|
| 302 | $(VBOX_PATH_RUNTIME_SRC)/common/checksum/alt-sha1.cpp \
|
---|
| 303 | $(VBOX_PATH_RUNTIME_SRC)/common/checksum/alt-sha256.cpp \
|
---|
| 304 | $(VBOX_PATH_RUNTIME_SRC)/common/checksum/alt-sha512.cpp \
|
---|
[51770] | 305 | $(VBOX_PATH_RUNTIME_SRC)/common/checksum/md2str.cpp \
|
---|
| 306 | $(VBOX_PATH_RUNTIME_SRC)/common/checksum/md5str.cpp \
|
---|
| 307 | $(VBOX_PATH_RUNTIME_SRC)/common/checksum/sha1str.cpp \
|
---|
| 308 | $(VBOX_PATH_RUNTIME_SRC)/common/checksum/sha256str.cpp \
|
---|
| 309 | $(VBOX_PATH_RUNTIME_SRC)/common/checksum/sha512str.cpp \
|
---|
| 310 | $(VBOX_PATH_RUNTIME_SRC)/common/err/errinfo.cpp \
|
---|
| 311 | $(VBOX_PATH_RUNTIME_SRC)/common/path/RTPathChangeToUnixSlashes.cpp \
|
---|
| 312 | $(VBOX_PATH_RUNTIME_SRC)/common/path/RTPathExt.cpp \
|
---|
| 313 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTUtf16PrintHexBytes.cpp \
|
---|
| 314 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTUtf16ICmpAscii.cpp \
|
---|
[67979] | 315 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTUtf16NICmpAscii.cpp \
|
---|
[52373] | 316 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTUtf16CatAscii.cpp \
|
---|
| 317 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTUtf16CopyAscii.cpp \
|
---|
| 318 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTUtf16End.cpp \
|
---|
[51770] | 319 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strstrip.cpp \
|
---|
| 320 | \
|
---|
| 321 | $(VBOX_PATH_RUNTIME_SRC)/common/err/errmsg.cpp \
|
---|
| 322 | $(VBOX_PATH_RUNTIME_SRC)/common/math/bignum.cpp \
|
---|
[52293] | 323 | $(VBOX_PATH_RUNTIME_SRC)/common/math/bignum-amd64-x86.asm \
|
---|
[51770] | 324 | $(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg1Weak.cpp \
|
---|
[52406] | 325 | $(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg2.cpp \
|
---|
[51770] | 326 | $(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg2Weak.cpp \
|
---|
| 327 | $(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg2WeakV.cpp \
|
---|
[51868] | 328 | $(VBOX_PATH_RUNTIME_SRC)/common/misc/zero.asm \
|
---|
[52204] | 329 | $(VBOX_PATH_RUNTIME_SRC)/common/path/RTPathFilename.cpp \
|
---|
[51770] | 330 | $(VBOX_PATH_RUNTIME_SRC)/common/string/memchr.asm \
|
---|
| 331 | $(VBOX_PATH_RUNTIME_SRC)/common/string/memcmp.asm \
|
---|
| 332 | $(VBOX_PATH_RUNTIME_SRC)/common/string/memcpy.asm \
|
---|
| 333 | $(VBOX_PATH_RUNTIME_SRC)/common/string/memmove.asm \
|
---|
| 334 | $(VBOX_PATH_RUNTIME_SRC)/common/string/mempcpy.asm \
|
---|
| 335 | $(VBOX_PATH_RUNTIME_SRC)/common/string/memset.asm \
|
---|
[66484] | 336 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strversion.cpp \
|
---|
[60031] | 337 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrPrintHexBytes.cpp \
|
---|
[51770] | 338 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrCat.cpp \
|
---|
| 339 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrCmp.cpp \
|
---|
| 340 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrCopy.cpp \
|
---|
[66525] | 341 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrICmpAscii.cpp \
|
---|
[51770] | 342 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrNCmp.cpp \
|
---|
| 343 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrNLen.cpp \
|
---|
[66484] | 344 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTUtf16Copy.cpp \
|
---|
[52947] | 345 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTUtf16NLenEx.cpp \
|
---|
[51770] | 346 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strchr.asm \
|
---|
| 347 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strcmp.asm \
|
---|
| 348 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strcpy.asm \
|
---|
| 349 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strformat.cpp \
|
---|
| 350 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strformatrt.cpp \
|
---|
| 351 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strformattype.cpp \
|
---|
[60043] | 352 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strformatnum.cpp \
|
---|
[51770] | 353 | $(VBOX_PATH_RUNTIME_SRC)/common/string/stringalloc.cpp \
|
---|
| 354 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strlen.asm \
|
---|
| 355 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strncmp.asm \
|
---|
| 356 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strncpy.asm \
|
---|
| 357 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strprintf.cpp \
|
---|
| 358 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strtonum.cpp \
|
---|
| 359 | $(VBOX_PATH_RUNTIME_SRC)/common/string/utf-16.cpp \
|
---|
| 360 | $(VBOX_PATH_RUNTIME_SRC)/common/string/utf-8.cpp \
|
---|
| 361 | $(VBOX_PATH_RUNTIME_SRC)/common/string/utf-8-case.cpp \
|
---|
| 362 | $(VBOX_PATH_RUNTIME_SRC)/common/string/unidata-upper.cpp \
|
---|
| 363 | $(VBOX_PATH_RUNTIME_SRC)/common/string/unidata-lower.cpp \
|
---|
| 364 | $(VBOX_PATH_RUNTIME_SRC)/common/time/time.cpp \
|
---|
| 365 | $(VBOX_PATH_RUNTIME_SRC)/generic/RTAssertShouldPanic-generic.cpp \
|
---|
[52947] | 366 | $(VBOX_PATH_RUNTIME_SRC)/generic/RTPathAbs-generic.cpp \
|
---|
| 367 | $(VBOX_PATH_RUNTIME_SRC)/generic/RTPathGetCurrentDrive-generic.cpp \
|
---|
| 368 | $(VBOX_PATH_RUNTIME_SRC)/generic/RTPathGetCurrentOnDrive-generic.cpp \
|
---|
[66415] | 369 | $(VBOX_PATH_RUNTIME_SRC)/generic/rtStrFormatKernelAddress-generic.cpp \
|
---|
[51770] | 370 | $(VBOX_PATH_RUNTIME_SRC)/generic/memsafer-generic.cpp \
|
---|
| 371 | $(VBOX_PATH_RUNTIME_SRC)/generic/uuid-generic.cpp \
|
---|
[52403] | 372 | \
|
---|
| 373 | ../../Disassembler/DisasmCore.cpp \
|
---|
| 374 | ../../Disassembler/DisasmTables.cpp \
|
---|
| 375 | ../../Disassembler/DisasmTablesX64.cpp \
|
---|
| 376 | ../../Disassembler/DisasmReg.cpp
|
---|
[51770] | 377 |
|
---|
[52336] | 378 | SUPR3HardenedStatic_SOURCES.amd64 += \
|
---|
[52337] | 379 | $(VBOX_PATH_RUNTIME_SRC)/common/math/RTUInt128MulByU64.asm
|
---|
[51770] | 380 |
|
---|
| 381 | SUPR3HardenedStatic_SOURCES.win += \
|
---|
| 382 | win/SUPR3HardenedNoCrt-win.cpp \
|
---|
| 383 | $(VBOX_PATH_RUNTIME_SRC)/nt/RTErrConvertFromNtStatus.cpp \
|
---|
[60480] | 384 | $(VBOX_PATH_RUNTIME_SRC)/nt/RTNtPathFindPossible8dot3Name.cpp \
|
---|
| 385 | $(VBOX_PATH_RUNTIME_SRC)/nt/RTNtPathExpand8dot3Path.cpp \
|
---|
[52947] | 386 | $(VBOX_PATH_RUNTIME_SRC)/r3/nt/pathint-nt.cpp \
|
---|
[51770] | 387 | $(VBOX_PATH_RUNTIME_SRC)/win/RTErrConvertFromWin32.cpp \
|
---|
| 388 | $(VBOX_PATH_RUNTIME_SRC)/win/errmsgwin.cpp
|
---|
| 389 |
|
---|
| 390 | # Add necessary compiler specific files from libcmt.lib and the lib dir.
|
---|
| 391 | ifeq ($(KBUILD_TARGET),win)
|
---|
| 392 | SUPR3HardenedStatic_VBOX_LIBC_OBJS = chkstk.obj
|
---|
| 393 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
[51973] | 394 | SUPR3HardenedStatic_VBOX_LIBC_OBJS += \
|
---|
| 395 | alloca16.obj \
|
---|
| 396 | ulldiv.obj \
|
---|
| 397 | ulldvrm.obj \
|
---|
| 398 | ullrem.obj \
|
---|
| 399 | ullshr.obj \
|
---|
| 400 | lldiv.obj \
|
---|
| 401 | lldvrm.obj \
|
---|
| 402 | llmul.obj \
|
---|
| 403 | llrem.obj \
|
---|
| 404 | llshl.obj \
|
---|
| 405 | llshr.obj \
|
---|
| 406 | rotl.obj \
|
---|
| 407 | rotr.obj
|
---|
[51770] | 408 | endif
|
---|
| 409 | SUPR3HardenedStatic_SOURCES.win += $(addprefix $(SUPR3HardenedStatic_0_OUTDIR)/,$(SUPR3HardenedStatic_VBOX_LIBC_OBJS))
|
---|
| 410 |
|
---|
| 411 | $(addprefix $$(SUPR3HardenedStatic_0_OUTDIR)/,$(SUPR3HardenedStatic_VBOX_LIBC_OBJS)): \
|
---|
| 412 | $$(PATH_TOOL_$(TEMPLATE_VBOXR3EXE_TOOL.win.$(KBUILD_TARGET_ARCH))_LIB)/libcmt.lib | $$(dir $$@)
|
---|
| 413 | $(TOOL_$(TEMPLATE_VBOXR3HARDENEDEXE_TOOL.win.$(KBUILD_TARGET_ARCH))_AR) "$<" \
|
---|
| 414 | /EXTRACT:`$(TOOL_$(TEMPLATE_VBOXR3HARDENEDEXE_TOOL.win.$(KBUILD_TARGET_ARCH))_AR) "$<" /LIST \
|
---|
[51973] | 415 | | $(SED_EXT) -n -e '/[\\/:]$(notdir $@)/p'` \
|
---|
[51770] | 416 | "/OUT:$@"
|
---|
| 417 | endif
|
---|
| 418 | endif
|
---|
| 419 |
|
---|
[66526] | 420 | # Things specific to the posix crowd.
|
---|
| 421 | if1of ($(KBUILD_TARGET), linux darwin solaris)
|
---|
| 422 | SUPR3HardenedStatic_DEFS += \
|
---|
| 423 | IN_DIS \
|
---|
[66714] | 424 | IN_DIS_STATIC \
|
---|
[66526] | 425 | DIS_CORE_ONLY \
|
---|
| 426 | LOG_DISABLED
|
---|
| 427 | SUPR3HardenedStatic_DEFS.linux += \
|
---|
| 428 | SUP_HARDENED_WITH_DLMOPEN
|
---|
| 429 | SUPR3HardenedStatic_DEFS.solaris += \
|
---|
| 430 | SUP_HARDENED_WITH_DLMOPEN
|
---|
| 431 |
|
---|
| 432 | SUPR3HardenedStatic_INCS += $(VBOX_PATH_RUNTIME_SRC)/include
|
---|
| 433 |
|
---|
| 434 | SUPR3HardenedStatic_SOURCES += \
|
---|
| 435 | posix/SUPR3HardenedMain-posix.cpp \
|
---|
| 436 | posix/SUPR3HardenedMainA-posix.asm \
|
---|
| 437 | \
|
---|
| 438 | $(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg1Weak.cpp \
|
---|
| 439 | $(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg2.cpp \
|
---|
| 440 | $(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg2Weak.cpp \
|
---|
| 441 | $(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg2WeakV.cpp \
|
---|
| 442 | $(VBOX_PATH_RUNTIME_SRC)/generic/RTAssertShouldPanic-generic.cpp \
|
---|
| 443 | \
|
---|
| 444 | ../../Disassembler/DisasmCore.cpp \
|
---|
| 445 | ../../Disassembler/DisasmTables.cpp \
|
---|
| 446 | ../../Disassembler/DisasmTablesX64.cpp \
|
---|
| 447 | ../../Disassembler/DisasmReg.cpp
|
---|
| 448 | endif
|
---|
| 449 |
|
---|
[52169] | 450 | SUPR3HardenedMain.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
[51770] | 451 |
|
---|
[52169] | 452 |
|
---|
[11725] | 453 | #
|
---|
[51770] | 454 | # VBoxSupLib - Windows DLL for catching thread creation and termination.
|
---|
| 455 | #
|
---|
[51771] | 456 | VBoxSupLib_TEMPLATE = $(if-expr "$(KBUILD_TARGET)" == "win" && defined(VBOX_WITH_HARDENING),VBOXR3HARDENEDLIB,VBOXR3)
|
---|
[52940] | 457 | VBoxSupLib_SDKS.win = VBOX_NTDLL
|
---|
[51770] | 458 | VBoxSupLib_LDFLAGS.win.amd64 = -Entry:DllMainEntrypoint
|
---|
| 459 | VBoxSupLib_LDFLAGS.win.x86 = -Entry:DllMainEntrypoint
|
---|
| 460 | VBoxSupLib_DEFS = \
|
---|
| 461 | $(if $(VBOX_WITHOUT_DEBUGGER_CHECKS),VBOX_WITHOUT_DEBUGGER_CHECKS,)
|
---|
| 462 | VBoxSupLib_SOURCES = \
|
---|
| 463 | $(KBUILD_TARGET)/VBoxSupLib-$(KBUILD_TARGET).cpp
|
---|
[53781] | 464 | VBoxSupLib_SOURCES.win = \
|
---|
| 465 | win/VBoxSupLib.rc
|
---|
[52357] | 466 | VBoxSupLib_LIBS.win.x86 = \
|
---|
[58228] | 467 | $(PATH_TOOL_$(TEMPLATE_VBOXR3STATIC_TOOL.win.x86)_LIB)/libcmt.lib # for __chkstk
|
---|
[52357] | 468 | VBoxSupLib_LIBS.win.amd64 = \
|
---|
[58228] | 469 | $(PATH_TOOL_$(TEMPLATE_VBOXR3STATIC_TOOL.win.amd64)_LIB)/libcmt.lib # for __chkstk
|
---|
[51770] | 470 |
|
---|
| 471 |
|
---|
| 472 | #
|
---|
[11725] | 473 | # VBoxSupSvc - The system wide service/daemon.
|
---|
| 474 | #
|
---|
| 475 | VBoxSupSvc_TEMPLATE = VBOXR3EXE
|
---|
| 476 | VBoxSupSvc_SOURCES = \
|
---|
| 477 | SUPSvc.cpp \
|
---|
| 478 | SUPSvcGlobal.cpp \
|
---|
| 479 | $(KBUILD_TARGET)/SUPSvc-$(KBUILD_TARGET).cpp
|
---|
| 480 | if1of ($(KBUILD_TARGET), win)
|
---|
| 481 | VBoxSupSvc_SOURCES += \
|
---|
| 482 | SUPSvcGrant.cpp
|
---|
| 483 | endif
|
---|
| 484 | ifn1of ($(KBUILD_TARGET), win)
|
---|
| 485 | VBoxSupSvc_SOURCES += \
|
---|
| 486 | SUPSvcMain-posix.cpp
|
---|
| 487 | endif
|
---|
| 488 | VBoxSupSvc_LIBS = \
|
---|
| 489 | $(LIB_RUNTIME)
|
---|
| 490 |
|
---|
| 491 |
|
---|
| 492 | #
|
---|
[40795] | 493 | # SUPR0 - The Ring-0 Import library.
|
---|
[1] | 494 | #
|
---|
[26218] | 495 | SUPR0_TEMPLATE = VBoxR0
|
---|
[40795] | 496 | if1of ($(VBOX_LDR_FMT), pe lx)
|
---|
| 497 | SUPR0_SOURCES = $(SUPR0_0_OUTDIR)/SUPR0.def
|
---|
| 498 | SUPR0_CLEAN = $(SUPR0_0_OUTDIR)/SUPR0.def
|
---|
| 499 | $$(SUPR0_0_OUTDIR)/SUPR0.def: \
|
---|
[54338] | 500 | $(PATH_SUB_CURRENT)/SUPDrv.cpp \
|
---|
[40795] | 501 | $(PATH_SUB_CURRENT)/SUPR0-def-$(VBOX_LDR_FMT).sed \
|
---|
| 502 | | $$(dir $$@)
|
---|
[25291] | 503 | $(SED) \
|
---|
[40795] | 504 | -f $(dir $<)/SUPR0-def-$(VBOX_LDR_FMT).sed \
|
---|
| 505 | --output $@ \
|
---|
[25291] | 506 | $<
|
---|
[57771] | 507 | # Experiment: Let's see how blunt the ones messing our NULL_THUNK_DATA entries on W10 are.
|
---|
| 508 | ifeq ($(KBUILD_TARGET),win)
|
---|
| 509 | ifdef KLIBTWEAKER_EXT
|
---|
| 510 | SUPR0_POST_CMDS = $(KLIBTWEAKER_EXT) --clear-timestamps --fill-null_thunk_data $(out)
|
---|
| 511 | endif
|
---|
| 512 | endif
|
---|
[1] | 513 | endif
|
---|
| 514 |
|
---|
| 515 |
|
---|
| 516 | #
|
---|
[54224] | 517 | # SUPRC - The raw-mode context library.
|
---|
| 518 | #
|
---|
[54227] | 519 | SUPRC_TEMPLATE := VBoxRc
|
---|
[54308] | 520 | SUPRC_DEFS := IN_SUP_RC IN_RT_RC IN_VMM_RC
|
---|
[54227] | 521 | SUPRC_SOURCES := SUPLibAll.cpp
|
---|
[54224] | 522 |
|
---|
| 523 |
|
---|
| 524 | #
|
---|
[10258] | 525 | # SUPR0IdcClient - The Ring-0 IDC client driver library.
|
---|
| 526 | #
|
---|
[39255] | 527 | SUPR0IdcClient_TEMPLATE = VBoxR0DrvLib
|
---|
[11814] | 528 | SUPR0IdcClient_DEFS = IN_RT_R0 IN_SUP_R0 IN_SUP_STATIC
|
---|
[42154] | 529 | SUPR0IdcClient_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK) $(VBOX_WINPSDK)INCS
|
---|
[10258] | 530 | SUPR0IdcClient_SOURCES.$(KBUILD_TARGET) = \
|
---|
| 531 | $(KBUILD_TARGET)/SUPR0IdcClient-$(KBUILD_TARGET).c
|
---|
| 532 | SUPR0IdcClient_SOURCES = \
|
---|
| 533 | SUPR0IdcClient.c \
|
---|
| 534 | SUPR0IdcClientComponent.c \
|
---|
| 535 | SUPR0IdcClientStubs.c
|
---|
| 536 |
|
---|
| 537 |
|
---|
[40778] | 538 |
|
---|
[34484] | 539 | if !defined(VBOX_ONLY_DOCS) \
|
---|
| 540 | && !defined(VBOX_ONLY_EXTPACKS) \
|
---|
[51346] | 541 | && !defined(VBOX_ONLY_VALIDATIONKIT)
|
---|
[27036] | 542 |
|
---|
[23538] | 543 | ifeq ($(KBUILD_TARGET),os2)
|
---|
[1] | 544 |
|
---|
| 545 | #
|
---|
[1193] | 546 | # VBoxDrv.sys - The OS/2 driver.
|
---|
| 547 | #
|
---|
| 548 | VBoxDrv_TEMPLATE = VBOXR0DRV
|
---|
[10250] | 549 | VBoxDrv_DEFS = IN_RT_R0 IN_SUP_R0
|
---|
[2516] | 550 | VBoxDrv_INCS := $(PATH_SUB_CURRENT)
|
---|
[1193] | 551 | #VBoxDrv_LDFLAGS = -s -t -v
|
---|
| 552 | VBoxDrv_SOURCES = \
|
---|
[2516] | 553 | os2/SUPDrvA-os2.asm \
|
---|
| 554 | os2/SUPDrv-os2.def
|
---|
[1193] | 555 | VBoxDrv_LIBS = \
|
---|
[37801] | 556 | $(VBoxDrvLib_1_TARGET) \
|
---|
[38082] | 557 | $(PATH_STAGE_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB) \
|
---|
[1193] | 558 | $(VBOX_GCC_LIBGCC) \
|
---|
| 559 | end
|
---|
| 560 |
|
---|
| 561 | # temp hack to ensure that SUPDrvA-os2.asm is first in the link.
|
---|
| 562 | LIBRARIES += VBoxDrvLib
|
---|
| 563 | VBoxDrvLib_TEMPLATE = VBOXR0DRV
|
---|
[39252] | 564 | VBoxDrvLib_INSTTYPE = none
|
---|
[10250] | 565 | VBoxDrvLib_DEFS = IN_RT_R0 IN_SUP_R0
|
---|
[2516] | 566 | VBoxDrvLib_INCS := \
|
---|
[12252] | 567 | . \
|
---|
[2516] | 568 | $(PATH_ROOT)/src/VBox/Runtime/include
|
---|
[1193] | 569 | VBoxDrvLib_SOURCES = \
|
---|
[2516] | 570 | os2/SUPDrv-os2.cpp \
|
---|
[54338] | 571 | SUPDrv.cpp \
|
---|
| 572 | SUPDrvGip.cpp \
|
---|
| 573 | SUPDrvSem.cpp \
|
---|
[54224] | 574 | SUPLibAll.cpp
|
---|
[1193] | 575 |
|
---|
[23538] | 576 | endif # os2
|
---|
[3621] | 577 |
|
---|
[23526] | 578 |
|
---|
| 579 | #
|
---|
[40602] | 580 | # New VBoxDrv target. TODO: Convert all the above to use this!
|
---|
[3888] | 581 | #
|
---|
[66072] | 582 | if1of ($(KBUILD_TARGET), darwin freebsd solaris win)
|
---|
[40759] | 583 | ifdef VBOX_WITH_VBOXDRV
|
---|
| 584 | SYSMODS += VBoxDrv
|
---|
| 585 | endif
|
---|
[40610] | 586 | VBoxDrv_TEMPLATE = VBOXR0DRV
|
---|
[40756] | 587 | VBoxDrv_NAME.freebsd = vboxdrv
|
---|
[40610] | 588 | VBoxDrv_NAME.solaris = vboxdrv
|
---|
[40778] | 589 | ifdef VBOX_SIGNING_MODE
|
---|
[42962] | 590 | VBoxDrv_INSTTYPE.win = none
|
---|
| 591 | VBoxDrv_DEBUG_INSTTYPE.win = both
|
---|
[40778] | 592 | endif
|
---|
[40610] | 593 | VBoxDrv_INST.darwin = $(INST_VBOXDRV)Contents/MacOS/
|
---|
[41092] | 594 | VBoxDrv_DEBUG_INST.darwin= $(patsubst %/,%,$(INST_VBOXDRV))
|
---|
[42154] | 595 | VBoxDrv_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK) $(VBOX_WINPSDK)INCS
|
---|
[40778] | 596 |
|
---|
[40610] | 597 | VBoxDrv_DEFS := IN_RT_R0 IN_SUP_R0 SUPDRV_WITH_RELEASE_LOGGER VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
| 598 | ifdef VBOX_WITH_DTRACE_R0DRV
|
---|
| 599 | VBoxDrv_DEFS += VBOX_WITH_DTRACE VBOX_WITH_DTRACE_R0DRV
|
---|
| 600 | endif
|
---|
[51770] | 601 | ifdef VBOX_WITHOUT_DEBUGGER_CHECKS
|
---|
| 602 | VBoxDrv_DEFS += VBOX_WITHOUT_DEBUGGER_CHECKS
|
---|
| 603 | endif
|
---|
[51999] | 604 | ifdef VBOX_PERMIT_VISUAL_STUDIO_PROFILING
|
---|
| 605 | VBoxDrv_DEFS += VBOX_PERMIT_VISUAL_STUDIO_PROFILING
|
---|
| 606 | endif
|
---|
[52404] | 607 | VBoxDrv_DEFS += VBOX_PERMIT_MORE VBOX_PERMIT_EVEN_MORE
|
---|
[40778] | 608 | #VBoxDrv_DEFS.debug += DEBUG_DARWIN_GIP
|
---|
[43380] | 609 | VBoxDrv_DEFS.darwin := VBOX_WITH_HOST_VMX
|
---|
[56375] | 610 | ifdef VBOX_WITH_RAW_MODE
|
---|
| 611 | VBoxDrv_DEFS.darwin += VBOX_WITH_RAW_MODE
|
---|
| 612 | endif
|
---|
[40610] | 613 | ifdef VBOX_WITH_NETFLT
|
---|
[40756] | 614 | VBoxDrv_DEFS.solaris += VBOX_WITH_NETFLT
|
---|
[40610] | 615 | endif
|
---|
| 616 | ifdef VBOX_WITH_NATIVE_SOLARIS_LOADING
|
---|
[40756] | 617 | VBoxDrv_DEFS.solaris += VBOX_WITH_NATIVE_SOLARIS_LOADING
|
---|
[40610] | 618 | endif
|
---|
[40778] | 619 | ifdef VBOX_WITHOUT_NATIVE_R0_LOADER
|
---|
| 620 | VBoxDrv_DEFS.win += VBOX_WITHOUT_NATIVE_R0_LOADER
|
---|
[40756] | 621 | endif
|
---|
[51770] | 622 | ifdef VBOX_WITH_VISTA_NO_SP
|
---|
| 623 | VBoxDrv_DEFS.win += VBOX_WITH_VISTA_NO_SP
|
---|
| 624 | endif
|
---|
[51808] | 625 | ifdef VBOX_WITH_HARDENING
|
---|
| 626 | VBoxDrv_ASDEFS += VBOX_WITH_HARDENING
|
---|
| 627 | endif
|
---|
[57220] | 628 | if ($(VBOX_VERSION_BUILD) % 2) == 1
|
---|
[57313] | 629 | VBoxDrv_DEFS += VBOX_WITH_EFLAGS_AC_SET_IN_VBOXDRV IPRT_WITH_EFLAGS_AC_PRESERVING
|
---|
[57220] | 630 | endif
|
---|
[40778] | 631 |
|
---|
[40610] | 632 | VBoxDrv_INCS = . $(VBoxDrv_0_OUTDIR)
|
---|
| 633 | VBoxDrv_INCS.darwin = ./darwin
|
---|
[40778] | 634 |
|
---|
[40610] | 635 | VBoxDrv_LIBS = $(PATH_STAGE_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
|
---|
[40778] | 636 | VBoxDrv_LIBS.win = \
|
---|
[51770] | 637 | $(PATH_STAGE_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB) \
|
---|
[42154] | 638 | $(PATH_SDK_$(VBOX_WINDDK)_LIB)/ntoskrnl.lib \
|
---|
[51770] | 639 | $(PATH_SDK_$(VBOX_WINDDK)_LIB)/hal.lib
|
---|
[40756] | 640 |
|
---|
[53604] | 641 | #VBoxDrv_LDFLAGS.darwin = -Wl,-sectcreate,__TEXT,__info_plist,$(VBoxDrv.kext_0_OUTDIR)/Info.plist
|
---|
| 642 | #VBoxDrv_LDFLAGS.darwin = -v -Wl,-whyload -Wl,-v -Wl,-whatsloaded
|
---|
[40778] | 643 | VBoxDrv_LDFLAGS.solaris += -N misc/ctf
|
---|
[43482] | 644 | ifdef VBOX_WITH_NATIVE_DTRACE
|
---|
[43485] | 645 | VBoxDrv_LDFLAGS.solaris += -N drv/dtrace
|
---|
[43482] | 646 | endif
|
---|
[40778] | 647 | VBoxDrv_LDFLAGS.win.x86 = -Entry:DriverEntry@8
|
---|
| 648 | VBoxDrv_LDFLAGS.win.amd64= -Entry:DriverEntry
|
---|
| 649 |
|
---|
[45396] | 650 | VBoxDrv_SOURCES.darwin = \
|
---|
[48677] | 651 | darwin/SUPDrv-darwin.cpp
|
---|
[40851] | 652 | VBoxDrv_SOURCES.solaris = \
|
---|
[40857] | 653 | solaris/SUPDrv-solaris.c
|
---|
[40778] | 654 | VBoxDrv_SOURCES.win = \
|
---|
| 655 | win/SUPDrv-win.cpp \
|
---|
| 656 | win/SUPDrvA-win.asm \
|
---|
[40792] | 657 | win/VBoxDrv.rc
|
---|
[51770] | 658 | ifdef VBOX_WITH_HARDENING
|
---|
| 659 | VBoxDrv_SOURCES.win += \
|
---|
| 660 | win/SUPHardenedVerifyImage-win.cpp \
|
---|
| 661 | win/SUPHardenedVerifyProcess-win.cpp \
|
---|
| 662 | $(VBOX_SUP_WIN_CERTS_FILE)
|
---|
| 663 | endif
|
---|
[40610] | 664 | VBoxDrv_SOURCES = \
|
---|
[41311] | 665 | SUPDrv.d \
|
---|
[54331] | 666 | SUPDrv.cpp \
|
---|
[54327] | 667 | SUPDrvGip.cpp \
|
---|
[54331] | 668 | SUPDrvSem.cpp \
|
---|
[54224] | 669 | SUPDrvTracer.cpp \
|
---|
| 670 | SUPLibAll.cpp
|
---|
[40975] | 671 | ifdef VBOX_WITH_NATIVE_DTRACE
|
---|
[40851] | 672 | VBoxDrv_SOURCES += \
|
---|
| 673 | SUPDrv-dtrace.cpp
|
---|
[40857] | 674 | SUPDrv-dtrace.cpp_DEFS.darwin += VBOX_PATH_MACOSX_DTRACE_H=\"$(VBOX_PATH_MACOSX_SDK)/usr/include/sys/dtrace.h\"
|
---|
[40851] | 675 | endif
|
---|
[40777] | 676 | ifn1of ($(KBUILD_TARGET), linux freebsd)
|
---|
[40756] | 677 | VBoxDrv_SOURCES += \
|
---|
[40777] | 678 | SUPDrvTracerA.asm
|
---|
[40756] | 679 | endif
|
---|
[40778] | 680 |
|
---|
[60592] | 681 | linux/SUPDrv-linux.c_DEPS = $(VBOX_SVN_REV_HEADER)
|
---|
| 682 |
|
---|
[40602] | 683 | endif
|
---|
[23538] | 684 |
|
---|
[3888] | 685 |
|
---|
[40778] | 686 |
|
---|
[40602] | 687 | if1of ($(KBUILD_TARGET), darwin)
|
---|
| 688 | # Files necessary to make a darwin kernel extension bundle.
|
---|
| 689 | INSTALLS.darwin += VBoxDrv.kext
|
---|
| 690 | VBoxDrv.kext_INST = $(INST_VBOXDRV)Contents/
|
---|
[53604] | 691 | VBoxDrv.kext_SOURCES = $(VBoxDrv.kext_0_OUTDIR)/Contents/Info.plist
|
---|
| 692 | VBoxDrv.kext_CLEAN = $(VBoxDrv.kext_0_OUTDIR)/Contents/Info.plist
|
---|
| 693 | VBoxDrv.kext_BLDDIRS = $(VBoxDrv.kext_0_OUTDIR)/Contents/
|
---|
[10377] | 694 |
|
---|
[53604] | 695 | $$(VBoxDrv.kext_0_OUTDIR)/Contents/Info.plist: \
|
---|
[40602] | 696 | $(PATH_SUB_CURRENT)/darwin/Info.plist \
|
---|
| 697 | $(VBOX_VERSION_MK) | $$(dir $$@)
|
---|
| 698 | $(call MSG_GENERATE,VBoxDrv,$@,$<)
|
---|
| 699 | $(QUIET)$(RM) -f $@
|
---|
| 700 | $(QUIET)$(SED) \
|
---|
[53568] | 701 | -e 's/@VBOX_VERSION_STRING@/$(if !defined(VBOX_MAVERICS_CODE_SIGNING_HACK),$(VBOX_VERSION_STRING),4.2.51)/g' \
|
---|
| 702 | -e 's/@VBOX_VERSION_MAJOR@/$(if !defined(VBOX_MAVERICS_CODE_SIGNING_HACK),$(VBOX_VERSION_MAJOR),4)/g' \
|
---|
| 703 | -e 's/@VBOX_VERSION_MINOR@/$(if !defined(VBOX_MAVERICS_CODE_SIGNING_HACK),$(VBOX_VERSION_MINOR),2)/g' \
|
---|
| 704 | -e 's/@VBOX_VERSION_BUILD@/$(if !defined(VBOX_MAVERICS_CODE_SIGNING_HACK),$(VBOX_VERSION_BUILD),51)/g' \
|
---|
[40602] | 705 | -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
|
---|
| 706 | -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
|
---|
| 707 | -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
|
---|
| 708 | --output $@ \
|
---|
| 709 | $<
|
---|
[53604] | 710 |
|
---|
| 711 | $(evalcall2 VBOX_TEST_SIGN_KEXT,VBoxDrv)
|
---|
[40602] | 712 | endif
|
---|
[10377] | 713 |
|
---|
[40756] | 714 |
|
---|
[40614] | 715 | if1of ($(KBUILD_TARGET), darwin solaris)
|
---|
[40602] | 716 | # Common manual loader script.
|
---|
[40614] | 717 | INSTALLS += SUPDrvScripts
|
---|
| 718 | SUPDrvScripts_INST = $(INST_DIST)
|
---|
| 719 | SUPDrvScripts_EXEC_SOURCES = \
|
---|
[40602] | 720 | $(KBUILD_TARGET)/load.sh
|
---|
| 721 | endif
|
---|
| 722 |
|
---|
| 723 |
|
---|
[54327] | 724 | if1of ($(KBUILD_TARGET), linux freebsd)
|
---|
[40756] | 725 | #
|
---|
| 726 | # Targets for installing the linux sources.
|
---|
| 727 | #
|
---|
| 728 | vboxdrv-mod_INST = bin/src/vboxdrv/
|
---|
| 729 | vboxdrv-mod_SOURCES = \
|
---|
| 730 | $(subst $(DQUOTE),,$(FILES_VBOXDRV_NOBIN)) \
|
---|
| 731 | $(vboxdrv-mod_0_OUTDIR)/Makefile
|
---|
| 732 | vboxdrv-mod_EXEC_SOURCES = \
|
---|
[54327] | 733 | $(subst $(DQUOTE),,$(FILES_VBOXDRV_BIN))
|
---|
[40756] | 734 | vboxdrv-mod_CLEAN = \
|
---|
| 735 | $(vboxdrv-mod_0_OUTDIR)/Makefile \
|
---|
| 736 | $(PATH_TARGET)/vboxdrv-mod-1.dep \
|
---|
| 737 |
|
---|
| 738 | # Scripts needed for building the kernel modules
|
---|
| 739 | includedep $(PATH_TARGET)/vboxdrv-mod-1.dep
|
---|
| 740 | $$(vboxdrv-mod_0_OUTDIR)/Makefile: \
|
---|
[54327] | 741 | $(PATH_SUB_CURRENT)/$(KBUILD_TARGET)/Makefile \
|
---|
| 742 | $$(if $$(eq $$(Support/$(KBUILD_TARGET)/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
|
---|
[40756] | 743 | | $$(dir $$@)
|
---|
| 744 | $(call MSG_TOOL,Creating,,$@)
|
---|
[57254] | 745 | $(QUIET)$(SED) -e "" \
|
---|
| 746 | $(if-expr !defined(VBOX_WITH_HARDENING) ,-e "s;-DVBOX_WITH_HARDENING;;g",) \
|
---|
[57317] | 747 | $(if-expr ($(VBOX_VERSION_BUILD) % 2) == 0 \
|
---|
[57313] | 748 | , -e "s;-DVBOX_WITH_EFLAGS_AC_SET_IN_VBOXDRV;;g" -e "s;-DIPRT_WITH_EFLAGS_AC_PRESERVING;;g",) \
|
---|
[57254] | 749 | --output $@ $<
|
---|
[54327] | 750 | %$(QUIET2)$(APPEND) -t '$(PATH_TARGET)/vboxdrv-mod-1.dep' \
|
---|
| 751 | 'Support/$(KBUILD_TARGET)/Makefile_VBOX_HARDENED=$(VBOX_WITH_HARDENING)'
|
---|
| 752 | endif # linux freebsd
|
---|
[40756] | 753 |
|
---|
| 754 |
|
---|
[40778] | 755 | ifeq ($(KBUILD_TARGET), win)
|
---|
| 756 | INSTALLS.win += VBoxDrv-inf
|
---|
| 757 | VBoxDrv-inf_INST = $(INST_BIN)
|
---|
| 758 | VBoxDrv-inf_MODE = a+r,u+w
|
---|
| 759 | VBoxDrv-inf_SOURCES = \
|
---|
| 760 | $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.inf
|
---|
| 761 | VBoxDrv-inf_CLEAN = $(VBoxDrv-inf_SOURCES)
|
---|
| 762 | VBoxDrv-inf_BLDDIRS = $(PATH_TARGET)/VBoxDrvCat.dir
|
---|
| 763 |
|
---|
| 764 | $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.inf: $(PATH_SUB_CURRENT)/win/VBoxDrv.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
| 765 | $(call MSG_GENERATE,VBoxDrv-inf,$@,$<)
|
---|
| 766 | $(call VBOX_EDIT_INF_FN,$<,$@)
|
---|
| 767 |
|
---|
| 768 | ifdef VBOX_SIGNING_MODE
|
---|
| 769 | VBoxDrv-inf_SOURCES += \
|
---|
| 770 | $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.sys \
|
---|
| 771 | $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.cat
|
---|
| 772 |
|
---|
| 773 | $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.sys: $$(VBoxDrv_1_TARGET) | $$(dir $$@)
|
---|
| 774 | $(INSTALL) -m 644 $< $(@D)
|
---|
| 775 |
|
---|
| 776 | $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.cat: \
|
---|
| 777 | $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.inf \
|
---|
| 778 | $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.sys
|
---|
| 779 | $(call MSG_TOOL,Inf2Cat,VBoxDrv-inf,$@,$<)
|
---|
| 780 | $(call VBOX_MAKE_CAT_FN, $(@D),$@)
|
---|
| 781 | endif # signing
|
---|
| 782 | endif # win
|
---|
| 783 |
|
---|
| 784 |
|
---|
[51346] | 785 | endif # !VBOX_ONLY_DOCS && !VBOX_ONLY_EXTPACKS && !VBOX_ONLY_VALIDATIONKIT
|
---|
[41477] | 786 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
[2682] | 787 |
|
---|