[2478] | 1 | # $Id: Makefile.kmk 104436 2024-04-25 16:57:24Z vboxsync $
|
---|
| 2 | ## @file
|
---|
[1] | 3 | # Sub-Makefile for the support library and the drivers/modules/kexts it uses.
|
---|
| 4 | #
|
---|
| 5 |
|
---|
| 6 | #
|
---|
[98103] | 7 | # Copyright (C) 2006-2023 Oracle and/or its affiliates.
|
---|
[4163] | 8 | #
|
---|
[96407] | 9 | # This file is part of VirtualBox base platform packages, as
|
---|
| 10 | # available from https://www.virtualbox.org.
|
---|
[5999] | 11 | #
|
---|
[96407] | 12 | # This program is free software; you can redistribute it and/or
|
---|
| 13 | # modify it under the terms of the GNU General Public License
|
---|
| 14 | # as published by the Free Software Foundation, in version 3 of the
|
---|
| 15 | # License.
|
---|
| 16 | #
|
---|
| 17 | # This program is distributed in the hope that it will be useful, but
|
---|
| 18 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
| 20 | # General Public License for more details.
|
---|
| 21 | #
|
---|
| 22 | # You should have received a copy of the GNU General Public License
|
---|
| 23 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
| 24 | #
|
---|
[5999] | 25 | # The contents of this file may alternatively be used under the terms
|
---|
| 26 | # of the Common Development and Distribution License Version 1.0
|
---|
[96407] | 27 | # (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
|
---|
| 28 | # in the VirtualBox distribution, in which case the provisions of the
|
---|
[5999] | 29 | # CDDL are applicable instead of those of the GPL.
|
---|
| 30 | #
|
---|
| 31 | # You may elect to license modified versions of this file under the
|
---|
| 32 | # terms and conditions of either the GPL or the CDDL or both.
|
---|
| 33 | #
|
---|
[96407] | 34 | # SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
|
---|
| 35 | #
|
---|
[1] | 36 |
|
---|
[10049] | 37 | SUB_DEPTH = ../../../..
|
---|
[41477] | 38 | include $(KBUILD_PATH)/subheader.kmk
|
---|
[1] | 39 |
|
---|
| 40 | #
|
---|
[91776] | 41 | # Globals.
|
---|
| 42 | #
|
---|
| 43 | VBOX_PATH_SUP_SRC := $(PATH_SUB_CURRENT)
|
---|
| 44 | VBOX_PATH_SUPR3_CERTIFICATES := $(PATH_SUB_CURRENT)/Certificates
|
---|
| 45 | VBOX_PATH_RUNTIME_SRC ?= $(PATH_ROOT)/src/VBox/Runtime
|
---|
| 46 |
|
---|
| 47 |
|
---|
| 48 | #
|
---|
[1] | 49 | # Targets
|
---|
| 50 | #
|
---|
[101651] | 51 | ifn1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), linux.arm64) # @todo Required by LoadGenerator in the validationkit but uses PAGE_SIZE++
|
---|
| 52 | LIBRARIES += SUPR3 SUPR3Static
|
---|
| 53 | endif
|
---|
[66536] | 54 | if defined(VBOX_WITH_HARDENING) \
|
---|
[98414] | 55 | && !defined(VBOX_ONLY_VALIDATIONKIT)
|
---|
[51770] | 56 | LIBRARIES += SUPR3HardenedStatic
|
---|
| 57 | endif
|
---|
[93346] | 58 | ifndef VBOX_ONLY_BUILD
|
---|
| 59 | DLLS.win += VBoxSupLib
|
---|
| 60 | endif
|
---|
[48282] | 61 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
| 62 | LIBRARIES += SUPR3-x86
|
---|
| 63 | endif
|
---|
[91802] | 64 | if !defined(VBOX_ONLY_DOCS)
|
---|
[92408] | 65 | if1of ($(VBOX_LDR_FMT), pe lx)
|
---|
[91802] | 66 | LIBRARIES += SUPR0
|
---|
| 67 | endif
|
---|
[27031] | 68 | endif
|
---|
[54224] | 69 | if !defined(VBOX_ONLY_BUILD) && defined(VBOX_WITH_RAW_MODE)
|
---|
| 70 | LIBRARIES += SUPRC
|
---|
| 71 | endif
|
---|
[98414] | 72 | if !defined(VBOX_ONLY_DOCS) \
|
---|
| 73 | && !defined(VBOX_ONLY_EXTPACKS) \
|
---|
| 74 | && !defined(VBOX_ONLY_VALIDATIONKIT) \
|
---|
| 75 | && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
|
---|
[11725] | 76 | ifdef VBOX_WITH_SUPSVC
|
---|
| 77 | PROGRAMS += VBoxSupSvc
|
---|
| 78 | endif
|
---|
[11703] | 79 | ifdef VBOX_WITH_VBOXDRV
|
---|
[11725] | 80 | LIBRARIES += SUPR0IdcClient
|
---|
| 81 | SYSMODS.os2 += VBoxDrv
|
---|
[13052] | 82 | endif
|
---|
[69531] | 83 | INSTALLS.linux += vboxdrv-src
|
---|
| 84 | INSTALLS.freebsd += vboxdrv-src
|
---|
[1] | 85 |
|
---|
[11703] | 86 | #
|
---|
| 87 | # Include sub-makefile(s).
|
---|
| 88 | #
|
---|
| 89 | include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
|
---|
[1] | 90 |
|
---|
[11703] | 91 | #
|
---|
| 92 | # Populate FILES_VBOXDRV_NOBIN and FILES_VBOXDRV_BIN
|
---|
| 93 | #
|
---|
[23526] | 94 | ifeq ($(KBUILD_TARGET),linux)
|
---|
| 95 | include $(PATH_SUB_CURRENT)/linux/files_vboxdrv
|
---|
| 96 | endif
|
---|
| 97 | ifeq ($(KBUILD_TARGET),freebsd)
|
---|
| 98 | include $(PATH_SUB_CURRENT)/freebsd/files_vboxdrv
|
---|
| 99 | endif
|
---|
[51346] | 100 | endif # !VBOX_ONLY_DOCS && !VBOX_ONLY_EXTPACKS && !VBOX_ONLY_VALIDATIONKIT
|
---|
[1] | 101 |
|
---|
[51770] | 102 | #
|
---|
| 103 | # Authenticode related trust anchors and certificates -> .cpp
|
---|
| 104 | #
|
---|
| 105 | VBOX_SUP_WIN_CERTS_FILE = $(SUPR3_0_OUTDIR)/TrustAnchorsAndCerts.cpp
|
---|
| 106 | VBOX_SUP_WIN_CERTS := \
|
---|
[98414] | 107 | SpcRootMicrosoft0=SpcRoot-MicrosoftAuthenticodeTmRootAuthority-01.taf \
|
---|
| 108 | SpcRootMicrosoft1=SpcRoot-MicrosoftRootAuthority-00c1008b3c3c8811d13ef663ecdf40.taf \
|
---|
| 109 | SpcRootMicrosoft2=SpcRoot-MicrosoftRootCertificateAuthority-79ad16a14aa0a5ad4c7358f407132e65.taf \
|
---|
| 110 | SpcRootMicrosoft3=SpcRoot-MicrosoftRootCertificateAuthority2010-28cc3a25bfba44ac449a9b586b4339aa.taf \
|
---|
| 111 | SpcRootMicrosoft4=SpcRoot-MicrosoftRootCertificateAuthority2011-3f8bc8b5fc9fb29643b569d66c42e144.taf \
|
---|
| 112 | SpcRootMicrosoft5=SpcRoot-MicrosoftDigitalMediaAuthority2005-6eff330eb6e7569740680870104baaba.taf \
|
---|
| 113 | SpcRootMicrosoft6=SpcRoot-MicrosoftDevelopmentRootCertificateAuthority2014-078f0a9d03df119e434e4fec1bf0235a.taf \
|
---|
| 114 | SpcRootMicrosoft7=SpcRoot-MicrosoftTestingRootCertificateAuthority2010-8a334aa8052dd244a647306a76b8178fa215f344.taf \
|
---|
| 115 | NtRootMicrosoft8=NtRoot-MicrosoftCodeVerificationRoot-729404101f3e0ca347837fca175a8438.taf \
|
---|
| 116 | TimeRootMicrosoft0=Timestamp-CopyrightC1997MicrosoftCorp-01.taf \
|
---|
| 117 | TimeRootOracle0=Timestamp-VBoxLegacyWinCA.taf \
|
---|
| 118 | TimeRootOracle1=Timestamp-VBoxLegacyWinSha1CA.taf \
|
---|
| 119 | TrustedCertVBox0=Trusted-OracleCorporationVirtualBox-05308b76ac2e15b29720fb4395f65f38.taf \
|
---|
| 120 | AppleRoot0=AppleRoot-2bd06947947609fef46b8d2e40a6f7474d7f085e.taf \
|
---|
| 121 | AppleRoot1=AppleRoot-G2-c499136c1803c27bc0a3a00d7f72807a1c77268d.taf
|
---|
[88587] | 122 | # Hack Alert! Because the DigiCert cross signing certificate we use expired 2020-04-15, we add it as a trusted NT kernel
|
---|
| 123 | # signing root instead, so we can bypass the expiry check in IPRT. NtRootMicrosoft8 is the one found in the
|
---|
| 124 | # 6.1.20 extpack, NtRootMicrosoft9 is the one bird uses at home.
|
---|
| 125 | VBOX_SUP_WIN_CERTS += NtRootDigiCert8=NtRoot-CrossSign-DigiCertAssuredIDRootCA-589567a6c1944d68f11ff3d86576092b.taf
|
---|
| 126 | VBOX_SUP_WIN_CERTS += NtRootDigiCert9=NtRoot-CrossSign-DigiCertHighAssuranceEVRootCA-f4a38dbe86386c554d25f1ce2557a4fe.taf
|
---|
| 127 |
|
---|
[51770] | 128 | VBOX_SUP_WIN_CERT_NAMES := $(foreach cert,$(VBOX_SUP_WIN_CERTS),$(firstword $(subst =,$(SPACE) ,$(cert))))
|
---|
[1] | 129 |
|
---|
[51770] | 130 | # 1=name, 2=filter, 3=buildcert?.
|
---|
| 131 | if "$(KBUILD_TARGET)" == "win" && defined(VBOX_WITH_HARDENING)
|
---|
| 132 | VBOX_SUP_GEN_CERT_MACRO = 'SUPTAENTRY const g_aSUP$(1)TAs[] =' '{' \
|
---|
[98414] | 133 | $(if-expr "$(3)" == "",,' SUPTAENTRY_GEN(g_abSUPBuildCert),') \
|
---|
| 134 | $(foreach certnm,$(filter $(2),$(VBOX_SUP_WIN_CERT_NAMES)), ' SUPTAENTRY_GEN(g_abSUP$(certnm)),') \
|
---|
| 135 | '};' 'unsigned const g_cSUP$(1)TAs = RT_ELEMENTS(g_aSUP$(1)TAs);' '' ''
|
---|
[51770] | 136 | else
|
---|
| 137 | VBOX_SUP_GEN_CERT_MACRO = 'SUPTAENTRY const g_aSUP$(1)TAs[] =' '{' \
|
---|
[98414] | 138 | $(foreach certnm,$(filter $(2),$(VBOX_SUP_WIN_CERT_NAMES)), ' SUPTAENTRY_GEN(g_abSUP$(certnm)),') \
|
---|
| 139 | '};' 'unsigned const g_cSUP$(1)TAs = RT_ELEMENTS(g_aSUP$(1)TAs);' '' ''
|
---|
[51770] | 140 | endif
|
---|
| 141 |
|
---|
[98414] | 142 | if ("$(KBUILD_TARGET)" == "win" && defined(VBOX_SIGNING_MODE)) \
|
---|
| 143 | || ("$(KBUILD_TARGET)" == "darwin" && defined(VBOX_WITH_DARWIN_R0_DARWIN_IMAGE_VERIFICATION) && defined(VBOX_SIGNING_MODE))
|
---|
[95685] | 144 | BLDPROGS += bldSUPSignedDummy
|
---|
| 145 | bldSUPSignedDummy_TEMPLATE = VBoxBldProg
|
---|
| 146 | bldSUPSignedDummy_SOURCES = bldSUPSignedDummy.cpp
|
---|
| 147 | bldSUPSignedDummy_ORDERDEPS.win = $(VBOX_SIGN_IMAGE_ORDERDEPS)
|
---|
| 148 | bldSUPSignedDummy_POST_CMDS.win = $(call VBOX_SIGN_IMAGE_FN,$(out),,2)
|
---|
| 149 | bldSUPSignedDummy_POST_CMDS.darwin = $(call VBOX_SIGN_MACHO_FN,$(out),org.virtualbox.org.bldtool.$(target))
|
---|
| 150 | endif
|
---|
| 151 |
|
---|
[51770] | 152 | $$(VBOX_SUP_WIN_CERTS_FILE): $(MAKEFILE_CURRENT) \
|
---|
| 153 | $(foreach cert,$(VBOX_SUP_WIN_CERTS),$(VBOX_PATH_SUPR3_CERTIFICATES)/$(lastword $(subst =,$(SPACE) ,$(cert)))) \
|
---|
| 154 | $(VBOX_BIN2C) \
|
---|
[95685] | 155 | $(if-expr defined(bldSUPSignedDummy_SOURCES),$(VBOX_RTSIGNTOOL) $$(bldSUPSignedDummy_1_TARGET),) \
|
---|
[51770] | 156 | | $$(dir $$@)
|
---|
| 157 | $(QUIET)$(RM) -f -- $@ $@.cer
|
---|
| 158 | $(QUIET)$(APPEND) -n "$@" \
|
---|
| 159 | '' \
|
---|
| 160 | '#include <VBox/sup.h>' \
|
---|
| 161 | ''
|
---|
[63499] | 162 | $(foreach cert,$(VBOX_SUP_WIN_CERTS), $(NLTAB)$(VBOX_BIN2C) -ascii --append --static --no-size \
|
---|
[51770] | 163 | "SUP$(firstword $(subst =,$(SP) ,$(cert)))" \
|
---|
| 164 | "$(VBOX_PATH_SUPR3_CERTIFICATES)/$(lastword $(subst =,$(SP) ,$(cert)))" \
|
---|
| 165 | "$@")
|
---|
| 166 | # The build certificate.
|
---|
[95685] | 167 | ifdef bldSUPSignedDummy_SOURCES
|
---|
| 168 | $(VBOX_RTSIGNTOOL) extract-exe-signer-cert --exe "$(bldSUPSignedDummy_1_TARGET)" --output "$@.cer" --der
|
---|
[51770] | 169 | $(VBOX_BIN2C) -ascii --append SUPBuildCert "$@.cer" $@
|
---|
| 170 | $(QUIET)$(RM) -f -- $@.cer
|
---|
| 171 | endif
|
---|
| 172 | # Generate certificate lists.
|
---|
| 173 | $(QUIET)$(APPEND) -n "$@" '' \
|
---|
[74767] | 174 | $(call VBOX_SUP_GEN_CERT_MACRO,All,%,build) \
|
---|
| 175 | $(call VBOX_SUP_GEN_CERT_MACRO,SpcRoot,SpcRoot%) \
|
---|
| 176 | $(call VBOX_SUP_GEN_CERT_MACRO,NtKernelRoot,NtRoot%) \
|
---|
| 177 | $(call VBOX_SUP_GEN_CERT_MACRO,Timestamp,TimeRoot%) \
|
---|
| 178 | $(call VBOX_SUP_GEN_CERT_MACRO,AppleRoot,AppleRoot%) \
|
---|
| 179 | $(call VBOX_SUP_GEN_CERT_MACRO,Trusted,TrustedCert%,build)
|
---|
[51770] | 180 |
|
---|
[82741] | 181 | OTHER_CLEAN += $(VBOX_SUP_WIN_CERTS_FILE)
|
---|
| 182 |
|
---|
[51770] | 183 | tst: $(VBOX_SUP_WIN_CERTS_FILE)
|
---|
| 184 |
|
---|
| 185 |
|
---|
[1] | 186 | #
|
---|
| 187 | # The Ring-3 Support Library (this is linked into the IPRT dll, VBoxRT).
|
---|
| 188 | #
|
---|
[98133] | 189 | SUPR3_TEMPLATE = VBoxR3Dll
|
---|
[17854] | 190 | SUPR3_DEFS = \
|
---|
| 191 | IN_SUP_R3 IN_RT_R3 \
|
---|
[40370] | 192 | $(if $(VBOX_WITH_SUPSVC),VBOX_WITH_SUPSVC) \
|
---|
| 193 | $(if $(VBOX_WITH_MAIN),VBOX_WITH_MAIN,) \
|
---|
[52030] | 194 | $(if $(VBOX_WITH_RAW_MODE),VBOX_WITH_RAW_MODE,) \
|
---|
[93063] | 195 | $(if $(VBOX_WITH_DRIVERLESS_NEM_FALLBACK),VBOX_WITH_DRIVERLESS_NEM_FALLBACK,) \
|
---|
[52404] | 196 | VBOX_PERMIT_MORE \
|
---|
| 197 | VBOX_PERMIT_EVEN_MORE
|
---|
[2516] | 198 | SUPR3_INCS := $(PATH_SUB_CURRENT)
|
---|
[1] | 199 | SUPR3_SOURCES = \
|
---|
[2516] | 200 | SUPLib.cpp \
|
---|
[49634] | 201 | SUPLibLdr.cpp \
|
---|
[19892] | 202 | SUPLibSem.cpp \
|
---|
[54224] | 203 | SUPLibAll.cpp \
|
---|
[11725] | 204 | SUPR3HardenedIPRT.cpp \
|
---|
| 205 | SUPR3HardenedVerify.cpp \
|
---|
[51770] | 206 | $(KBUILD_TARGET)/SUPLib-$(KBUILD_TARGET).cpp \
|
---|
[98414] | 207 | $(VBOX_SUP_WIN_CERTS_FILE)
|
---|
[87233] | 208 | SUPR3_SOURCES.amd64 = \
|
---|
| 209 | SUPLibTracerA.asm
|
---|
| 210 | SUPR3_SOURCES.x86 = \
|
---|
| 211 | SUPLibTracerA.asm
|
---|
[51770] | 212 | ifdef VBOX_WITH_HARDENING
|
---|
| 213 | SUPR3_SOURCES.win = \
|
---|
| 214 | win/SUPHardenedVerifyImage-win.cpp
|
---|
| 215 | endif
|
---|
[1] | 216 |
|
---|
[48282] | 217 | SUPR3-x86_TEMPLATE = VBoxR3Dll-x86
|
---|
| 218 | SUPR3-x86_EXTENDS = SUPR3
|
---|
| 219 |
|
---|
| 220 |
|
---|
[27017] | 221 | #
|
---|
[51770] | 222 | # Static version of SUPR3. This is more of a stub than anything else in a
|
---|
| 223 | # hardened build, at least on windows.
|
---|
[27017] | 224 | #
|
---|
[98137] | 225 | SUPR3Static_TEMPLATE := VBoxR3Static
|
---|
| 226 | SUPR3Static_EXTENDS := SUPR3
|
---|
| 227 | SUPR3Static_DEFS = $(SUPR3_DEFS) IN_SUP_R3_STATIC
|
---|
[51770] | 228 | SUPR3Static_SOURCES.win = $(filter-out win/SUPHardenedVerifyImage-win.cpp, $(SUPR3_SOURCES.win))
|
---|
[10258] | 229 |
|
---|
[51770] | 230 |
|
---|
[1] | 231 | #
|
---|
[11725] | 232 | # The static part of the hardened support library (ring-3).
|
---|
| 233 | #
|
---|
[98165] | 234 | SUPR3HardenedStatic_TEMPLATE = VBoxR3HardenedLib
|
---|
[11725] | 235 | SUPR3HardenedStatic_DEFS = IN_SUP_HARDENED_R3
|
---|
[17854] | 236 | SUPR3HardenedStatic_DEFS += \
|
---|
| 237 | $(if $(VBOX_WITH_SUPSVC),VBOX_WITH_SUPSVC,) \
|
---|
[40370] | 238 | $(if $(VBOX_WITH_MAIN),VBOX_WITH_MAIN,) \
|
---|
[51770] | 239 | $(if $(VBOX_WITH_RAW_MODE),VBOX_WITH_RAW_MODE,) \
|
---|
[93063] | 240 | $(if $(VBOX_WITH_DRIVERLESS_NEM_FALLBACK),VBOX_WITH_DRIVERLESS_NEM_FALLBACK,) \
|
---|
[51999] | 241 | $(if $(VBOX_WITHOUT_DEBUGGER_CHECKS),VBOX_WITHOUT_DEBUGGER_CHECKS,) \
|
---|
[104384] | 242 | $(if $(VBOX_WITHOUT_WINDOWS_KERNEL_CODE_SIGNING_CERT),VBOX_WITHOUT_WINDOWS_KERNEL_CODE_SIGNING_CERT,) \
|
---|
[52030] | 243 | $(if $(VBOX_PERMIT_VISUAL_STUDIO_PROFILING),VBOX_PERMIT_VISUAL_STUDIO_PROFILING,) \
|
---|
[52404] | 244 | VBOX_PERMIT_MORE \
|
---|
| 245 | VBOX_PERMIT_EVEN_MORE
|
---|
[51770] | 246 | ifdef VBOX_WITH_VISTA_NO_SP
|
---|
| 247 | SUPR3HardenedStatic_DEFS.win += VBOX_WITH_VISTA_NO_SP
|
---|
| 248 | endif
|
---|
[11725] | 249 | SUPR3HardenedStatic_INCS = .
|
---|
| 250 | SUPR3HardenedStatic_SOURCES = \
|
---|
| 251 | SUPR3HardenedMain.cpp \
|
---|
| 252 | SUPR3HardenedVerify.cpp \
|
---|
[51770] | 253 | SUPR3HardenedNoCrt.cpp \
|
---|
[11725] | 254 | $(KBUILD_TARGET)/SUPLib-$(KBUILD_TARGET).cpp
|
---|
[51770] | 255 | SUPR3HardenedStatic_SOURCES.win = \
|
---|
| 256 | win/SUPR3HardenedMain-win.cpp \
|
---|
| 257 | win/SUPR3HardenedMainA-win.asm \
|
---|
[52356] | 258 | win/SUPR3HardenedMainImports-win.cpp \
|
---|
[66714] | 259 | win/SUPHardenedVerifyProcess-win.cpp \
|
---|
| 260 | win/SUPHardenedVerifyImage-win.cpp \
|
---|
[51770] | 261 | $(VBOX_SUP_WIN_CERTS_FILE)
|
---|
[59752] | 262 | SUPR3HardenedStatic_SOURCES.x86 += \
|
---|
| 263 | $(VBOX_PATH_RUNTIME_SRC)/common/asm/ASMMemFirstMismatchingU8.asm
|
---|
| 264 | SUPR3HardenedStatic_SOURCES.amd64 += \
|
---|
| 265 | $(VBOX_PATH_RUNTIME_SRC)/common/asm/ASMMemFirstMismatchingU8.asm
|
---|
[11725] | 266 |
|
---|
[59752] | 267 |
|
---|
[98005] | 268 | if "$(KBUILD_TARGET)" == "win" && defined(VBOX_WITH_HARDENING) && !defined(VBOX_ONLY_VALIDATIONKIT) ## @todo some of this move up.
|
---|
[52403] | 269 | SUPR3HardenedStatic_DEFS += \
|
---|
| 270 | IN_RT_R3 \
|
---|
| 271 | IN_RT_STATIC \
|
---|
| 272 | IN_DIS \
|
---|
[98414] | 273 | IN_DIS_STATIC \
|
---|
[52403] | 274 | DIS_CORE_ONLY \
|
---|
[99239] | 275 | VBOX_DIS_WITH_X86_AMD64 \
|
---|
[98414] | 276 | IPRT_NO_CRT \
|
---|
[52403] | 277 | RT_WITH_NOCRT_ALIASES \
|
---|
| 278 | LOG_DISABLED \
|
---|
[73705] | 279 | IPRT_NO_ERROR_DATA \
|
---|
[98414] | 280 | IPRT_WITHOUT_DIGEST_MD4
|
---|
[51770] | 281 | SUPR3HardenedStatic_DEFS.win += LDR_ONLY_PE __STRALIGN_H_
|
---|
| 282 |
|
---|
| 283 | SUPR3HardenedStatic_INCS += $(PATH_ROOT)/include/iprt/nocrt $(VBOX_PATH_RUNTIME_SRC)/include
|
---|
| 284 |
|
---|
| 285 | SUPR3HardenedStatic_SOURCES += \
|
---|
[98414] | 286 | $(VBOX_PATH_RUNTIME_SRC)/common/ldr/ldr.cpp \
|
---|
| 287 | $(VBOX_PATH_RUNTIME_SRC)/common/ldr/ldrEx.cpp \
|
---|
| 288 | $(VBOX_PATH_RUNTIME_SRC)/common/ldr/ldrPE.cpp \
|
---|
| 289 | $(VBOX_PATH_RUNTIME_SRC)/common/alloc/heapsimple.cpp \
|
---|
| 290 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-basics.cpp \
|
---|
| 291 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-cursor.cpp \
|
---|
| 292 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-default-allocator.cpp \
|
---|
| 293 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-safer-allocator.cpp \
|
---|
| 294 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-dump.cpp \
|
---|
| 295 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-encode.cpp \
|
---|
| 296 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-bitstring.cpp \
|
---|
| 297 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-bitstring-decode.cpp \
|
---|
| 298 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-boolean.cpp \
|
---|
| 299 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-boolean-decode.cpp \
|
---|
| 300 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-core.cpp \
|
---|
| 301 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-core-decode.cpp \
|
---|
| 302 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-dyntype.cpp \
|
---|
| 303 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-dyntype-decode.cpp \
|
---|
| 304 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-integer.cpp \
|
---|
| 305 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-integer-decode.cpp \
|
---|
| 306 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-null.cpp \
|
---|
| 307 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-null-decode.cpp \
|
---|
| 308 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-objid.cpp \
|
---|
| 309 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-objid-decode.cpp \
|
---|
| 310 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-octetstring.cpp \
|
---|
| 311 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-octetstring-decode.cpp \
|
---|
| 312 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-string.cpp \
|
---|
| 313 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-string-decode.cpp \
|
---|
| 314 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-time.cpp \
|
---|
| 315 | $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-time-decode.cpp \
|
---|
| 316 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/digest-core.cpp \
|
---|
| 317 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/digest-builtin.cpp \
|
---|
| 318 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/key.cpp \
|
---|
| 319 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkcs7-asn1-decoder.cpp \
|
---|
| 320 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkcs7-core.cpp \
|
---|
| 321 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkcs7-init.cpp \
|
---|
| 322 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkcs7-sanity.cpp \
|
---|
| 323 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkcs7-verify.cpp \
|
---|
| 324 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkix-signature-builtin.cpp \
|
---|
| 325 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkix-signature-core.cpp \
|
---|
| 326 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkix-signature-rsa.cpp \
|
---|
| 327 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkix-verify.cpp \
|
---|
| 328 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkix-util.cpp \
|
---|
| 329 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/rsa-asn1-decoder.cpp \
|
---|
| 330 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/rsa-core.cpp \
|
---|
| 331 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/rsa-init.cpp \
|
---|
| 332 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/rsa-sanity.cpp \
|
---|
| 333 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/spc-asn1-decoder.cpp \
|
---|
| 334 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/spc-core.cpp \
|
---|
| 335 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/spc-init.cpp \
|
---|
| 336 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/spc-sanity.cpp \
|
---|
| 337 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/x509-asn1-decoder.cpp \
|
---|
| 338 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/x509-certpaths.cpp \
|
---|
| 339 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/x509-core.cpp \
|
---|
| 340 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/x509-init.cpp \
|
---|
| 341 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/x509-sanity.cpp \
|
---|
| 342 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/x509-verify.cpp \
|
---|
| 343 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/store.cpp \
|
---|
| 344 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/store-inmem.cpp \
|
---|
| 345 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/taf-asn1-decoder.cpp \
|
---|
| 346 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/taf-core.cpp \
|
---|
| 347 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/taf-init.cpp \
|
---|
| 348 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/taf-sanity.cpp \
|
---|
| 349 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/tsp-asn1-decoder.cpp \
|
---|
| 350 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/tsp-core.cpp \
|
---|
| 351 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/tsp-init.cpp \
|
---|
| 352 | $(VBOX_PATH_RUNTIME_SRC)/common/crypto/tsp-sanity.cpp \
|
---|
| 353 | $(VBOX_PATH_RUNTIME_SRC)/common/checksum/alt-md2.cpp \
|
---|
| 354 | $(VBOX_PATH_RUNTIME_SRC)/common/checksum/alt-md5.cpp \
|
---|
| 355 | $(VBOX_PATH_RUNTIME_SRC)/common/checksum/alt-sha1.cpp \
|
---|
| 356 | $(VBOX_PATH_RUNTIME_SRC)/common/checksum/alt-sha256.cpp \
|
---|
| 357 | $(VBOX_PATH_RUNTIME_SRC)/common/checksum/alt-sha512.cpp \
|
---|
| 358 | $(VBOX_PATH_RUNTIME_SRC)/common/checksum/alt-sha3.cpp \
|
---|
| 359 | $(VBOX_PATH_RUNTIME_SRC)/common/checksum/md2str.cpp \
|
---|
| 360 | $(VBOX_PATH_RUNTIME_SRC)/common/checksum/md5str.cpp \
|
---|
| 361 | $(VBOX_PATH_RUNTIME_SRC)/common/checksum/sha1str.cpp \
|
---|
| 362 | $(VBOX_PATH_RUNTIME_SRC)/common/checksum/sha256str.cpp \
|
---|
[99670] | 363 | $(VBOX_PATH_RUNTIME_SRC)/common/checksum/sha384str.cpp \
|
---|
[98414] | 364 | $(VBOX_PATH_RUNTIME_SRC)/common/checksum/sha512str.cpp \
|
---|
| 365 | $(VBOX_PATH_RUNTIME_SRC)/common/err/errinfo.cpp \
|
---|
| 366 | $(VBOX_PATH_RUNTIME_SRC)/common/path/RTPathChangeToUnixSlashes.cpp \
|
---|
| 367 | $(VBOX_PATH_RUNTIME_SRC)/common/path/RTPathExt.cpp \
|
---|
| 368 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTUtf16PrintHexBytes.cpp \
|
---|
| 369 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTUtf16ICmpAscii.cpp \
|
---|
| 370 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTUtf16NICmpAscii.cpp \
|
---|
| 371 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTUtf16CatAscii.cpp \
|
---|
| 372 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTUtf16CopyAscii.cpp \
|
---|
| 373 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTUtf16End.cpp \
|
---|
| 374 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strstrip.cpp \
|
---|
| 375 | \
|
---|
| 376 | $(VBOX_PATH_RUNTIME_SRC)/common/err/errmsg.cpp \
|
---|
| 377 | $(VBOX_PATH_RUNTIME_SRC)/common/math/bignum.cpp \
|
---|
| 378 | $(VBOX_PATH_RUNTIME_SRC)/common/math/bignum-amd64-x86.asm \
|
---|
| 379 | $(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg1Weak.cpp \
|
---|
| 380 | $(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg2.cpp \
|
---|
| 381 | $(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg2Weak.cpp \
|
---|
| 382 | $(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg2WeakV.cpp \
|
---|
| 383 | $(VBOX_PATH_RUNTIME_SRC)/common/misc/zero.asm \
|
---|
| 384 | $(VBOX_PATH_RUNTIME_SRC)/common/path/RTPathAbsEx.cpp \
|
---|
| 385 | $(VBOX_PATH_RUNTIME_SRC)/common/path/RTPathFilename.cpp \
|
---|
| 386 | $(VBOX_PATH_RUNTIME_SRC)/common/path/RTPathParse.cpp \
|
---|
| 387 | $(VBOX_PATH_RUNTIME_SRC)/common/path/RTPathParsedReassemble.cpp \
|
---|
| 388 | $(VBOX_PATH_RUNTIME_SRC)/common/string/memchr.asm \
|
---|
| 389 | $(VBOX_PATH_RUNTIME_SRC)/common/string/memcmp.asm \
|
---|
| 390 | $(VBOX_PATH_RUNTIME_SRC)/common/string/memcpy.asm \
|
---|
| 391 | $(VBOX_PATH_RUNTIME_SRC)/common/string/memmove.asm \
|
---|
| 392 | $(VBOX_PATH_RUNTIME_SRC)/common/string/mempcpy.asm \
|
---|
| 393 | $(VBOX_PATH_RUNTIME_SRC)/common/string/memset.asm \
|
---|
| 394 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strversion.cpp \
|
---|
| 395 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrPrintHexBytes.cpp \
|
---|
| 396 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrCat.cpp \
|
---|
| 397 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrCmp.cpp \
|
---|
| 398 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrCopy.cpp \
|
---|
| 399 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrEnd.asm \
|
---|
| 400 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrICmpAscii.cpp \
|
---|
| 401 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrNCmp.cpp \
|
---|
| 402 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrNLen.cpp \
|
---|
| 403 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTUtf16Copy.cpp \
|
---|
| 404 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTUtf16NLenEx.cpp \
|
---|
| 405 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strchr.asm \
|
---|
| 406 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strcmp.asm \
|
---|
| 407 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strcpy.asm \
|
---|
| 408 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strformat.cpp \
|
---|
| 409 | $(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrFormat.cpp \
|
---|
| 410 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strformatrt.cpp \
|
---|
| 411 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strformattype.cpp \
|
---|
| 412 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strformatnum.cpp \
|
---|
| 413 | $(VBOX_PATH_RUNTIME_SRC)/common/string/stringalloc.cpp \
|
---|
| 414 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strlen.asm \
|
---|
| 415 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strncmp.asm \
|
---|
| 416 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strncpy.asm \
|
---|
| 417 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strprintf.cpp \
|
---|
| 418 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strprintf-ellipsis.cpp \
|
---|
| 419 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strprintf2.cpp \
|
---|
| 420 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strprintf2-ellipsis.cpp \
|
---|
| 421 | $(VBOX_PATH_RUNTIME_SRC)/common/string/strtonum.cpp \
|
---|
| 422 | $(VBOX_PATH_RUNTIME_SRC)/common/string/utf-16.cpp \
|
---|
| 423 | $(VBOX_PATH_RUNTIME_SRC)/common/string/utf-8.cpp \
|
---|
| 424 | $(VBOX_PATH_RUNTIME_SRC)/common/string/utf-8-case.cpp \
|
---|
| 425 | $(VBOX_PATH_RUNTIME_SRC)/common/string/unidata-upper.cpp \
|
---|
| 426 | $(VBOX_PATH_RUNTIME_SRC)/common/string/unidata-lower.cpp \
|
---|
| 427 | $(VBOX_PATH_RUNTIME_SRC)/common/time/time.cpp \
|
---|
| 428 | $(VBOX_PATH_RUNTIME_SRC)/generic/RTAssertShouldPanic-generic.cpp \
|
---|
| 429 | $(VBOX_PATH_RUNTIME_SRC)/generic/RTPathGetCurrentDrive-generic.cpp \
|
---|
| 430 | $(VBOX_PATH_RUNTIME_SRC)/generic/RTPathGetCurrentOnDrive-generic.cpp \
|
---|
| 431 | $(VBOX_PATH_RUNTIME_SRC)/generic/rtStrFormatKernelAddress-generic.cpp \
|
---|
| 432 | $(VBOX_PATH_RUNTIME_SRC)/generic/memsafer-generic.cpp \
|
---|
| 433 | $(VBOX_PATH_RUNTIME_SRC)/generic/uuid-generic.cpp \
|
---|
| 434 | \
|
---|
[99237] | 435 | ../../Disassembler/Disasm.cpp \
|
---|
| 436 | ../../Disassembler/DisasmCore-x86-amd64.cpp \
|
---|
| 437 | ../../Disassembler/DisasmTables-x86-amd64.cpp \
|
---|
[98414] | 438 | ../../Disassembler/DisasmTablesX64.cpp \
|
---|
| 439 | ../../Disassembler/DisasmMisc.cpp
|
---|
[51770] | 440 |
|
---|
[52336] | 441 | SUPR3HardenedStatic_SOURCES.amd64 += \
|
---|
[80220] | 442 | $(VBOX_PATH_RUNTIME_SRC)/common/math/RTUInt128MulByU64.asm \
|
---|
| 443 | $(VBOX_PATH_RUNTIME_SRC)/win/amd64/ASMGetCS.asm \
|
---|
| 444 | $(VBOX_PATH_RUNTIME_SRC)/win/amd64/ASMGetSS.asm
|
---|
[51770] | 445 |
|
---|
| 446 | SUPR3HardenedStatic_SOURCES.win += \
|
---|
| 447 | win/SUPR3HardenedNoCrt-win.cpp \
|
---|
| 448 | $(VBOX_PATH_RUNTIME_SRC)/nt/RTErrConvertFromNtStatus.cpp \
|
---|
[60480] | 449 | $(VBOX_PATH_RUNTIME_SRC)/nt/RTNtPathFindPossible8dot3Name.cpp \
|
---|
| 450 | $(VBOX_PATH_RUNTIME_SRC)/nt/RTNtPathExpand8dot3Path.cpp \
|
---|
[77816] | 451 | $(VBOX_PATH_RUNTIME_SRC)/nt/RTNtPathExpand8dot3PathA.cpp \
|
---|
[52947] | 452 | $(VBOX_PATH_RUNTIME_SRC)/r3/nt/pathint-nt.cpp \
|
---|
[51770] | 453 | $(VBOX_PATH_RUNTIME_SRC)/win/RTErrConvertFromWin32.cpp \
|
---|
[98414] | 454 | $(VBOX_PATH_RUNTIME_SRC)/win/errmsgwin.cpp
|
---|
[51770] | 455 |
|
---|
[84419] | 456 | # Add necessary compiler specific files from the compiler lib dir.
|
---|
[51770] | 457 | ifeq ($(KBUILD_TARGET),win)
|
---|
[84419] | 458 | include $(KBUILD_PATH)/tools/$(VBOX_VCC_TOOL).kmk
|
---|
| 459 | SUPR3HardenedStatic_SOURCES.win += \
|
---|
| 460 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/chkstk.obj
|
---|
[93254] | 461 |
|
---|
| 462 | # And a few extracted from the static libc to support -guard and cookes.
|
---|
| 463 | # In 14.2 these files does not import anything from the win32 API and are
|
---|
| 464 | # mostly tiny bits of code. Needs not initialization that I can spot.
|
---|
| 465 | ifneq ($(VBOX_VCC_LD_GUARD_CF),)
|
---|
| 466 | SUPR3HardenedStatic_SOURCES.win += \
|
---|
[93256] | 467 | $(SUPR3HardenedStatic_0_OUTDIR)/loadcfg.obj
|
---|
| 468 | # These are for the /guard option.
|
---|
| 469 | SUPR3HardenedStatic_SOURCES.win += \
|
---|
[93254] | 470 | $(SUPR3HardenedStatic_0_OUTDIR)/gs_cookie.obj \
|
---|
[93265] | 471 | $(SUPR3HardenedStatic_0_OUTDIR)/guard_support.obj
|
---|
| 472 | SUPR3HardenedStatic_SOURCES.win.amd64 += \
|
---|
[93254] | 473 | $(SUPR3HardenedStatic_0_OUTDIR)/guard_dispatch.obj \
|
---|
| 474 | $(SUPR3HardenedStatic_0_OUTDIR)/guard_xfg_dispatch.obj
|
---|
[93256] | 475 | # These next ones are for supporting the /GS option. We skip gs_report.obj as it
|
---|
| 476 | # import lots from kernel32 and we're better of reporting the problem ourselves.
|
---|
[93265] | 477 | SUPR3HardenedStatic_SOURCES.win.amd64 += \
|
---|
[93256] | 478 | $(SUPR3HardenedStatic_0_OUTDIR)/amdsecgs.obj \
|
---|
| 479 | $(SUPR3HardenedStatic_0_OUTDIR)/gshandler.obj
|
---|
[93265] | 480 | SUPR3HardenedStatic_SOURCES.win.x86 += \
|
---|
| 481 | $(SUPR3HardenedStatic_0_OUTDIR)/secchk.obj \
|
---|
| 482 | $(SUPR3HardenedStatic_0_OUTDIR)/alloca16.obj
|
---|
[93254] | 483 |
|
---|
[98414] | 484 | $$(SUPR3HardenedStatic_0_OUTDIR)/loadcfg.obj \
|
---|
| 485 | $$(SUPR3HardenedStatic_0_OUTDIR)/gs_cookie.obj \
|
---|
| 486 | $$(SUPR3HardenedStatic_0_OUTDIR)/guard_support.obj \
|
---|
| 487 | $$(SUPR3HardenedStatic_0_OUTDIR)/guard_dispatch.obj \
|
---|
| 488 | $$(SUPR3HardenedStatic_0_OUTDIR)/guard_xfg_dispatch.obj \
|
---|
| 489 | $$(SUPR3HardenedStatic_0_OUTDIR)/amdsecgs.obj \
|
---|
| 490 | $$(SUPR3HardenedStatic_0_OUTDIR)/gs_report.obj \
|
---|
| 491 | $$(SUPR3HardenedStatic_0_OUTDIR)/gshandler.obj \
|
---|
| 492 | $$(SUPR3HardenedStatic_0_OUTDIR)/secchk.obj \
|
---|
| 493 | $$(SUPR3HardenedStatic_0_OUTDIR)/alloca16.obj: \
|
---|
| 494 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/libcmt.lib | $$(dir $$@)
|
---|
[93254] | 495 | set -x; $(TOOL_$(VBOX_VCC_TOOL)_AR) "/EXTRACT:$$($(TOOL_$(VBOX_VCC_TOOL)_AR) /LIST "$<" | $(SED_EXT) -e '/$(notdir $@)/!d' )" "/OUT:$@" "$<"
|
---|
| 496 | endif
|
---|
[51770] | 497 | endif
|
---|
| 498 | endif
|
---|
| 499 |
|
---|
[87030] | 500 | # macOS specifics.
|
---|
| 501 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
[66526] | 502 | SUPR3HardenedStatic_DEFS += \
|
---|
[87030] | 503 | LOG_DISABLED
|
---|
| 504 |
|
---|
| 505 | SUPR3HardenedStatic_INCS += $(VBOX_PATH_RUNTIME_SRC)/include
|
---|
| 506 |
|
---|
| 507 | SUPR3HardenedStatic_SOURCES += \
|
---|
| 508 | darwin/SUPR3HardenedMain-darwin.cpp \
|
---|
[98414] | 509 | \
|
---|
[87030] | 510 | $(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg1Weak.cpp \
|
---|
| 511 | $(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg2.cpp \
|
---|
| 512 | $(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg2Weak.cpp \
|
---|
| 513 | $(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg2WeakV.cpp \
|
---|
| 514 | $(VBOX_PATH_RUNTIME_SRC)/generic/RTAssertShouldPanic-generic.cpp
|
---|
| 515 | endif
|
---|
| 516 |
|
---|
| 517 | # Things specific to the rest of the posix crowd.
|
---|
| 518 | if1of ($(KBUILD_TARGET), linux solaris)
|
---|
| 519 | SUPR3HardenedStatic_DEFS += \
|
---|
[66526] | 520 | IN_DIS \
|
---|
[98414] | 521 | IN_DIS_STATIC \
|
---|
[66526] | 522 | DIS_CORE_ONLY \
|
---|
[99239] | 523 | VBOX_DIS_WITH_X86_AMD64 \
|
---|
[66526] | 524 | LOG_DISABLED
|
---|
| 525 | SUPR3HardenedStatic_DEFS.linux += \
|
---|
| 526 | SUP_HARDENED_WITH_DLMOPEN
|
---|
| 527 | SUPR3HardenedStatic_DEFS.solaris += \
|
---|
| 528 | SUP_HARDENED_WITH_DLMOPEN
|
---|
[94439] | 529 | SUPR3HardenedStatic_DEFS.asan += SUP_HARDENED_WITHOUT_DLOPEN_PATCHING
|
---|
[66526] | 530 |
|
---|
| 531 | SUPR3HardenedStatic_INCS += $(VBOX_PATH_RUNTIME_SRC)/include
|
---|
| 532 |
|
---|
| 533 | SUPR3HardenedStatic_SOURCES += \
|
---|
| 534 | posix/SUPR3HardenedMain-posix.cpp \
|
---|
[98414] | 535 | posix/SUPR3HardenedMainA-posix.asm \
|
---|
| 536 | \
|
---|
[66526] | 537 | $(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg1Weak.cpp \
|
---|
| 538 | $(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg2.cpp \
|
---|
| 539 | $(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg2Weak.cpp \
|
---|
| 540 | $(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg2WeakV.cpp \
|
---|
| 541 | $(VBOX_PATH_RUNTIME_SRC)/generic/RTAssertShouldPanic-generic.cpp \
|
---|
[98414] | 542 | \
|
---|
[99237] | 543 | ../../Disassembler/Disasm.cpp \
|
---|
| 544 | ../../Disassembler/DisasmCore-x86-amd64.cpp \
|
---|
| 545 | ../../Disassembler/DisasmTables-x86-amd64.cpp \
|
---|
[66526] | 546 | ../../Disassembler/DisasmTablesX64.cpp \
|
---|
[97212] | 547 | ../../Disassembler/DisasmMisc.cpp
|
---|
[66526] | 548 | endif
|
---|
| 549 |
|
---|
[52169] | 550 | SUPR3HardenedMain.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
[51770] | 551 |
|
---|
[52169] | 552 |
|
---|
[11725] | 553 | #
|
---|
[51770] | 554 | # VBoxSupLib - Windows DLL for catching thread creation and termination.
|
---|
| 555 | #
|
---|
[93345] | 556 | VBoxSupLib_TEMPLATE = VBoxR3StaticNoCrt
|
---|
[98256] | 557 | VBoxSupLib_SDKS.win = VBoxNtDll
|
---|
[51770] | 558 | VBoxSupLib_LDFLAGS.win.amd64 = -Entry:DllMainEntrypoint
|
---|
| 559 | VBoxSupLib_LDFLAGS.win.x86 = -Entry:DllMainEntrypoint
|
---|
| 560 | VBoxSupLib_DEFS = \
|
---|
| 561 | $(if $(VBOX_WITHOUT_DEBUGGER_CHECKS),VBOX_WITHOUT_DEBUGGER_CHECKS,)
|
---|
| 562 | VBoxSupLib_SOURCES = \
|
---|
| 563 | $(KBUILD_TARGET)/VBoxSupLib-$(KBUILD_TARGET).cpp
|
---|
[98152] | 564 | VBoxSupLib_SOURCES.win.amd64 = \
|
---|
[98414] | 565 | $(VBOX_PATH_RUNTIME_SRC)/common/compiler/vcc/stack-probe-vcc.asm
|
---|
[98152] | 566 | VBoxSupLib_SOURCES.win.x86 = \
|
---|
[98414] | 567 | $(VBOX_PATH_RUNTIME_SRC)/common/compiler/vcc/stack-probe-vcc.asm
|
---|
[53781] | 568 | VBoxSupLib_SOURCES.win = \
|
---|
| 569 | win/VBoxSupLib.rc
|
---|
[98152] | 570 | ifndef VBOX_WITH_NOCRT_STATIC
|
---|
| 571 | ifdef VBOX_WITH_HARDENING # for /guard:cf stuff
|
---|
| 572 | VBoxSupLib_LIBS.win.x86 = \
|
---|
| 573 | $(PATH_TOOL_$(TEMPLATE_VBoxR3StaticNoCrt_TOOL.win.x86)_LIB)/libcmt.lib
|
---|
| 574 | VBoxSupLib_LIBS.win.amd64 = \
|
---|
| 575 | $(PATH_TOOL_$(TEMPLATE_VBoxR3StaticNoCrt_TOOL.win.amd64)_LIB)/libcmt.lib
|
---|
| 576 | endif
|
---|
[93323] | 577 | endif
|
---|
[93277] | 578 | VBoxSupLib_VBOX_IMPORT_CHECKER.win.x86 = xp
|
---|
[93275] | 579 | VBoxSupLib_VBOX_IMPORT_CHECKER.win.amd64 = xp64
|
---|
[51770] | 580 |
|
---|
| 581 |
|
---|
| 582 | #
|
---|
[11725] | 583 | # VBoxSupSvc - The system wide service/daemon.
|
---|
| 584 | #
|
---|
[98128] | 585 | VBoxSupSvc_TEMPLATE = VBoxR3Exe
|
---|
[11725] | 586 | VBoxSupSvc_SOURCES = \
|
---|
| 587 | SUPSvc.cpp \
|
---|
| 588 | SUPSvcGlobal.cpp \
|
---|
| 589 | $(KBUILD_TARGET)/SUPSvc-$(KBUILD_TARGET).cpp
|
---|
| 590 | if1of ($(KBUILD_TARGET), win)
|
---|
| 591 | VBoxSupSvc_SOURCES += \
|
---|
[98414] | 592 | SUPSvcGrant.cpp
|
---|
[11725] | 593 | endif
|
---|
| 594 | ifn1of ($(KBUILD_TARGET), win)
|
---|
| 595 | VBoxSupSvc_SOURCES += \
|
---|
| 596 | SUPSvcMain-posix.cpp
|
---|
| 597 | endif
|
---|
| 598 | VBoxSupSvc_LIBS = \
|
---|
| 599 | $(LIB_RUNTIME)
|
---|
| 600 |
|
---|
| 601 |
|
---|
| 602 | #
|
---|
[40795] | 603 | # SUPR0 - The Ring-0 Import library.
|
---|
[1] | 604 | #
|
---|
[26218] | 605 | SUPR0_TEMPLATE = VBoxR0
|
---|
[40795] | 606 | if1of ($(VBOX_LDR_FMT), pe lx)
|
---|
| 607 | SUPR0_SOURCES = $(SUPR0_0_OUTDIR)/SUPR0.def
|
---|
| 608 | SUPR0_CLEAN = $(SUPR0_0_OUTDIR)/SUPR0.def
|
---|
[98414] | 609 | $$(SUPR0_0_OUTDIR)/SUPR0.def: \
|
---|
| 610 | $(PATH_SUB_CURRENT)/SUPDrv.cpp \
|
---|
| 611 | $(PATH_SUB_CURRENT)/SUPR0-def-$(VBOX_LDR_FMT).sed \
|
---|
| 612 | | $$(dir $$@)
|
---|
[25291] | 613 | $(SED) \
|
---|
[40795] | 614 | -f $(dir $<)/SUPR0-def-$(VBOX_LDR_FMT).sed \
|
---|
| 615 | --output $@ \
|
---|
[25291] | 616 | $<
|
---|
[57771] | 617 | # Experiment: Let's see how blunt the ones messing our NULL_THUNK_DATA entries on W10 are.
|
---|
| 618 | ifeq ($(KBUILD_TARGET),win)
|
---|
| 619 | ifdef KLIBTWEAKER_EXT
|
---|
| 620 | SUPR0_POST_CMDS = $(KLIBTWEAKER_EXT) --clear-timestamps --fill-null_thunk_data $(out)
|
---|
| 621 | endif
|
---|
| 622 | endif
|
---|
[1] | 623 | endif
|
---|
| 624 |
|
---|
| 625 |
|
---|
| 626 | #
|
---|
[54224] | 627 | # SUPRC - The raw-mode context library.
|
---|
| 628 | #
|
---|
[54227] | 629 | SUPRC_TEMPLATE := VBoxRc
|
---|
[54308] | 630 | SUPRC_DEFS := IN_SUP_RC IN_RT_RC IN_VMM_RC
|
---|
[54227] | 631 | SUPRC_SOURCES := SUPLibAll.cpp
|
---|
[54224] | 632 |
|
---|
| 633 |
|
---|
| 634 | #
|
---|
[10258] | 635 | # SUPR0IdcClient - The Ring-0 IDC client driver library.
|
---|
| 636 | #
|
---|
[39255] | 637 | SUPR0IdcClient_TEMPLATE = VBoxR0DrvLib
|
---|
[11814] | 638 | SUPR0IdcClient_DEFS = IN_RT_R0 IN_SUP_R0 IN_SUP_STATIC
|
---|
[92910] | 639 | SUPR0IdcClient_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK) $(VBOX_WINPSDK_INCS)
|
---|
[10258] | 640 | SUPR0IdcClient_SOURCES.$(KBUILD_TARGET) = \
|
---|
| 641 | $(KBUILD_TARGET)/SUPR0IdcClient-$(KBUILD_TARGET).c
|
---|
| 642 | SUPR0IdcClient_SOURCES = \
|
---|
| 643 | SUPR0IdcClient.c \
|
---|
| 644 | SUPR0IdcClientComponent.c \
|
---|
| 645 | SUPR0IdcClientStubs.c
|
---|
| 646 |
|
---|
| 647 |
|
---|
[40778] | 648 |
|
---|
[98414] | 649 | if !defined(VBOX_ONLY_DOCS) \
|
---|
| 650 | && !defined(VBOX_ONLY_EXTPACKS) \
|
---|
| 651 | && !defined(VBOX_ONLY_VALIDATIONKIT)
|
---|
[27036] | 652 |
|
---|
[98414] | 653 | ifeq ($(KBUILD_TARGET),os2)
|
---|
[1] | 654 |
|
---|
[98414] | 655 | #
|
---|
| 656 | # VBoxDrv.sys - The OS/2 driver.
|
---|
| 657 | #
|
---|
| 658 | VBoxDrv_TEMPLATE = VBoxR0Drv
|
---|
| 659 | VBoxDrv_DEFS = IN_RT_R0 IN_SUP_R0
|
---|
| 660 | VBoxDrv_INCS := $(PATH_SUB_CURRENT)
|
---|
| 661 | #VBoxDrv_LDFLAGS = -s -t -v
|
---|
| 662 | VBoxDrv_SOURCES = \
|
---|
| 663 | os2/SUPDrvA-os2.asm \
|
---|
| 664 | os2/SUPDrv-os2.def
|
---|
| 665 | VBoxDrv_LIBS = \
|
---|
| 666 | $(VBoxDrvLib_1_TARGET) \
|
---|
| 667 | $(PATH_STAGE_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB) \
|
---|
| 668 | $(VBOX_GCC_LIBGCC) \
|
---|
| 669 | end
|
---|
[1193] | 670 |
|
---|
[98414] | 671 | # temp hack to ensure that SUPDrvA-os2.asm is first in the link.
|
---|
| 672 | LIBRARIES += VBoxDrvLib
|
---|
| 673 | VBoxDrvLib_TEMPLATE = VBoxR0Drv
|
---|
| 674 | VBoxDrvLib_INSTTYPE = none
|
---|
| 675 | VBoxDrvLib_DEFS = IN_RT_R0 IN_SUP_R0
|
---|
| 676 | VBoxDrvLib_INCS := \
|
---|
| 677 | . \
|
---|
| 678 | $(PATH_ROOT)/src/VBox/Runtime/include
|
---|
| 679 | VBoxDrvLib_SOURCES = \
|
---|
| 680 | os2/SUPDrv-os2.cpp \
|
---|
| 681 | SUPDrv.cpp \
|
---|
| 682 | SUPDrvGip.cpp \
|
---|
| 683 | SUPDrvSem.cpp \
|
---|
| 684 | SUPLibAll.cpp
|
---|
[1193] | 685 |
|
---|
[98414] | 686 | endif # os2
|
---|
[3621] | 687 |
|
---|
[23526] | 688 |
|
---|
[98414] | 689 | #
|
---|
| 690 | # New VBoxDrv target. TODO: Convert all the above to use this!
|
---|
| 691 | #
|
---|
| 692 | if1of ($(KBUILD_TARGET), darwin freebsd solaris win)
|
---|
| 693 | ifdef VBOX_WITH_VBOXDRV
|
---|
| 694 | SYSMODS += VBoxDrv
|
---|
| 695 | endif
|
---|
| 696 | VBoxDrv_TEMPLATE = VBoxR0Drv
|
---|
| 697 | VBoxDrv_NAME.freebsd = vboxdrv
|
---|
| 698 | VBoxDrv_NAME.solaris = vboxdrv
|
---|
| 699 | VBoxDrv_NAME.win = VBoxSup
|
---|
| 700 | ifdef VBOX_SIGNING_MODE
|
---|
| 701 | VBoxDrv_INSTTYPE.win = none
|
---|
| 702 | VBoxDrv_DEBUG_INSTTYPE.win = both
|
---|
| 703 | endif
|
---|
| 704 | VBoxDrv_INST.darwin = $(INST_VBOXDRV)Contents/MacOS/
|
---|
| 705 | VBoxDrv_DEBUG_INST.darwin = $(patsubst %/,%,$(INST_VBOXDRV))
|
---|
| 706 | VBoxDrv_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK) $(VBOX_WINPSDK_INCS)
|
---|
[40778] | 707 |
|
---|
[98414] | 708 | VBoxDrv_DEFS := IN_RT_R0 IN_SUP_R0 SUPDRV_WITH_RELEASE_LOGGER VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
| 709 | ifdef VBOX_WITH_DTRACE_R0DRV
|
---|
| 710 | VBoxDrv_DEFS += VBOX_WITH_DTRACE VBOX_WITH_DTRACE_R0DRV
|
---|
[89018] | 711 | endif
|
---|
[98414] | 712 | ifdef VBOX_WITHOUT_DEBUGGER_CHECKS
|
---|
| 713 | VBoxDrv_DEFS += VBOX_WITHOUT_DEBUGGER_CHECKS
|
---|
| 714 | endif
|
---|
| 715 | ifdef VBOX_PERMIT_VISUAL_STUDIO_PROFILING
|
---|
| 716 | VBoxDrv_DEFS += VBOX_PERMIT_VISUAL_STUDIO_PROFILING
|
---|
| 717 | endif
|
---|
| 718 | VBoxDrv_DEFS += VBOX_PERMIT_MORE VBOX_PERMIT_EVEN_MORE
|
---|
| 719 | #VBoxDrv_DEFS.debug += DEBUG_DARWIN_GIP
|
---|
| 720 | VBoxDrv_DEFS.darwin := VBOX_WITH_HOST_VMX
|
---|
| 721 | ifdef VBOX_WITH_RAW_MODE
|
---|
| 722 | VBoxDrv_DEFS.darwin += VBOX_WITH_RAW_MODE
|
---|
| 723 | endif
|
---|
| 724 | if defined(VBOX_WITH_DARWIN_R0_DARWIN_IMAGE_VERIFICATION) && defined(VBOX_SIGNING_MODE)
|
---|
| 725 | VBoxDrv_DEFS.darwin += VBOX_WITH_DARWIN_R0_DARWIN_IMAGE_VERIFICATION
|
---|
| 726 | ifeq ($(VBOX_SIGNING_MODE),test)
|
---|
| 727 | VBoxDrv_DEFS.darwin += VBOX_WITH_DARWIN_R0_TEST_SIGN
|
---|
| 728 | endif
|
---|
| 729 | endif
|
---|
| 730 | ifdef VBOX_WITH_NETFLT
|
---|
| 731 | VBoxDrv_DEFS.solaris += VBOX_WITH_NETFLT
|
---|
| 732 | endif
|
---|
| 733 | ifdef VBOX_WITH_NATIVE_SOLARIS_LOADING
|
---|
| 734 | VBoxDrv_DEFS.solaris += VBOX_WITH_NATIVE_SOLARIS_LOADING
|
---|
| 735 | endif
|
---|
| 736 | ifdef VBOX_WITHOUT_NATIVE_R0_LOADER
|
---|
| 737 | VBoxDrv_DEFS.win += VBOX_WITHOUT_NATIVE_R0_LOADER
|
---|
| 738 | endif
|
---|
| 739 | ifdef VBOX_WITH_VISTA_NO_SP
|
---|
| 740 | VBoxDrv_DEFS.win += VBOX_WITH_VISTA_NO_SP
|
---|
| 741 | endif
|
---|
| 742 | ifdef VBOX_WITH_HARDENING
|
---|
| 743 | VBoxDrv_ASDEFS += VBOX_WITH_HARDENING
|
---|
| 744 | endif
|
---|
| 745 | ifdef VBOX_WITH_RAM_IN_KERNEL
|
---|
| 746 | VBoxDrv_DEFS += VBOX_WITHOUT_EFLAGS_AC_SET_IN_VBOXDRV IPRT_WITHOUT_EFLAGS_AC_PRESERVING
|
---|
| 747 | else if ($(VBOX_VERSION_BUILD) % 2) == 1
|
---|
| 748 | VBoxDrv_DEFS += VBOX_WITH_EFLAGS_AC_SET_IN_VBOXDRV IPRT_WITH_EFLAGS_AC_PRESERVING
|
---|
| 749 | endif
|
---|
[40778] | 750 |
|
---|
[98414] | 751 | VBoxDrv_INCS = . $(VBoxDrv_0_OUTDIR)
|
---|
| 752 | VBoxDrv_INCS.darwin = ./darwin
|
---|
[40778] | 753 |
|
---|
[98414] | 754 | VBoxDrv_LIBS = $(PATH_STAGE_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
|
---|
| 755 | VBoxDrv_LIBS.win = \
|
---|
| 756 | $(PATH_STAGE_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB) \
|
---|
| 757 | $(PATH_SDK_$(VBOX_WINDDK)_LIB)/ntoskrnl.lib \
|
---|
| 758 | $(PATH_SDK_$(VBOX_WINDDK)_LIB)/hal.lib
|
---|
| 759 | ifn1of ($(VBOX_WINDDK), WINDDK80 WINDDK71)
|
---|
| 760 | VBoxDrv_LIBS.win.x86 = \
|
---|
| 761 | $(PATH_SDK_$(VBOX_WINDDK)_LIB)/BufferOverflowK.lib
|
---|
| 762 | endif
|
---|
[40756] | 763 |
|
---|
[98414] | 764 | #VBoxDrv_LDFLAGS.darwin = -Wl,-sectcreate,__TEXT,__info_plist,$(VBoxDrv.kext_0_OUTDIR)/Info.plist
|
---|
| 765 | #VBoxDrv_LDFLAGS.darwin = -v -Wl,-whyload -Wl,-v -Wl,-whatsloaded
|
---|
| 766 | VBoxDrv_LDFLAGS.solaris += -N misc/ctf
|
---|
| 767 | ifdef VBOX_WITH_NATIVE_DTRACE
|
---|
| 768 | VBoxDrv_LDFLAGS.solaris += -N drv/dtrace
|
---|
| 769 | endif
|
---|
| 770 | VBoxDrv_LDFLAGS.win.x86 = -Entry:DriverEntry@8
|
---|
| 771 | VBoxDrv_LDFLAGS.win.amd64 = -Entry:DriverEntry
|
---|
[40778] | 772 |
|
---|
[98414] | 773 | VBoxDrv_SOURCES.darwin = \
|
---|
| 774 | darwin/SUPDrv-darwin.cpp
|
---|
| 775 | ifdef VBOX_WITH_DARWIN_R0_DARWIN_IMAGE_VERIFICATION
|
---|
| 776 | VBoxDrv_SOURCES.darwin += \
|
---|
| 777 | $(VBOX_SUP_WIN_CERTS_FILE)
|
---|
| 778 | endif
|
---|
| 779 | VBoxDrv_SOURCES.solaris = \
|
---|
| 780 | solaris/SUPDrv-solaris.c
|
---|
| 781 | VBoxDrv_SOURCES.win = \
|
---|
| 782 | win/SUPDrv-win.cpp \
|
---|
| 783 | win/SUPDrvA-win.asm \
|
---|
| 784 | win/VBoxDrv.rc
|
---|
| 785 | ifdef VBOX_WITH_HARDENING
|
---|
| 786 | VBoxDrv_SOURCES.win += \
|
---|
| 787 | win/SUPHardenedVerifyImage-win.cpp \
|
---|
| 788 | win/SUPHardenedVerifyProcess-win.cpp \
|
---|
| 789 | $(VBOX_SUP_WIN_CERTS_FILE)
|
---|
[104436] | 790 | ifdef VBOX_WITHOUT_WINDOWS_KERNEL_CODE_SIGNING_CERT
|
---|
| 791 | VBoxDrv_DEFS.win += VBOX_WITHOUT_WINDOWS_KERNEL_CODE_SIGNING_CERT
|
---|
| 792 | endif
|
---|
[98414] | 793 | endif
|
---|
| 794 | VBoxDrv_SOURCES = \
|
---|
| 795 | SUPDrv.d \
|
---|
| 796 | SUPDrv.cpp \
|
---|
| 797 | SUPDrvGip.cpp \
|
---|
| 798 | SUPDrvSem.cpp \
|
---|
[54224] | 799 | SUPDrvTracer.cpp \
|
---|
[98414] | 800 | SUPLibAll.cpp
|
---|
| 801 | ifdef VBOX_WITH_NATIVE_DTRACE
|
---|
| 802 | VBoxDrv_SOURCES += \
|
---|
| 803 | SUPDrv-dtrace.cpp
|
---|
| 804 | SUPDrv-dtrace.cpp_DEFS.darwin += VBOX_PATH_MACOSX_DTRACE_H=\"$(VBOX_PATH_MACOSX_SDK)/usr/include/sys/dtrace.h\"
|
---|
| 805 | endif
|
---|
| 806 | ifn1of ($(KBUILD_TARGET), linux freebsd)
|
---|
| 807 | VBoxDrv_SOURCES += \
|
---|
| 808 | SUPDrvTracerA.asm
|
---|
| 809 | endif
|
---|
[40778] | 810 |
|
---|
[98414] | 811 | linux/SUPDrv-linux.c_DEPS = $(VBOX_SVN_REV_HEADER)
|
---|
[60592] | 812 |
|
---|
[98414] | 813 | endif
|
---|
[23538] | 814 |
|
---|
[3888] | 815 |
|
---|
[40778] | 816 |
|
---|
[98414] | 817 | if defined(VBOX_WITH_VBOXDRV) && "$(KBUILD_TARGET)" == "darwin"
|
---|
| 818 | # Files necessary to make a darwin kernel extension bundle.
|
---|
| 819 | INSTALLS.darwin += VBoxDrv.kext
|
---|
| 820 | VBoxDrv.kext_INST = $(INST_VBOXDRV)Contents/
|
---|
| 821 | VBoxDrv.kext_SOURCES = $(VBoxDrv.kext_0_OUTDIR)/Contents/Info.plist
|
---|
| 822 | VBoxDrv.kext_CLEAN = $(VBoxDrv.kext_0_OUTDIR)/Contents/Info.plist
|
---|
| 823 | VBoxDrv.kext_BLDDIRS = $(VBoxDrv.kext_0_OUTDIR)/Contents/
|
---|
[10377] | 824 |
|
---|
[98414] | 825 | $$(VBoxDrv.kext_0_OUTDIR)/Contents/Info.plist: \
|
---|
| 826 | $(PATH_SUB_CURRENT)/darwin/Info.plist \
|
---|
| 827 | $(VBOX_VERSION_MK) | $$(dir $$@)
|
---|
[40602] | 828 | $(call MSG_GENERATE,VBoxDrv,$@,$<)
|
---|
| 829 | $(QUIET)$(RM) -f $@
|
---|
| 830 | $(QUIET)$(SED) \
|
---|
[96399] | 831 | -e 's+@VBOX_VERSION_STRING@+$(if !defined(VBOX_MAVERICS_CODE_SIGNING_HACK),$(VBOX_VERSION_STRING),4.2.51)+g' \
|
---|
| 832 | -e 's+@VBOX_VERSION_MAJOR@+$(if !defined(VBOX_MAVERICS_CODE_SIGNING_HACK),$(VBOX_VERSION_MAJOR),4)+g' \
|
---|
| 833 | -e 's+@VBOX_VERSION_MINOR@+$(if !defined(VBOX_MAVERICS_CODE_SIGNING_HACK),$(VBOX_VERSION_MINOR),2)+g' \
|
---|
| 834 | -e 's+@VBOX_VERSION_BUILD@+$(if !defined(VBOX_MAVERICS_CODE_SIGNING_HACK),$(VBOX_VERSION_BUILD),51)+g' \
|
---|
| 835 | -e 's+@VBOX_VENDOR@+$(VBOX_VENDOR)+g' \
|
---|
| 836 | -e 's+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+g' \
|
---|
| 837 | -e 's+@VBOX_C_YEAR@+$(VBOX_C_YEAR)+g' \
|
---|
[40602] | 838 | --output $@ \
|
---|
| 839 | $<
|
---|
[53604] | 840 |
|
---|
[98414] | 841 | $(evalcall2 VBOX_TEST_SIGN_KEXT,VBoxDrv)
|
---|
| 842 | endif
|
---|
[10377] | 843 |
|
---|
[40756] | 844 |
|
---|
[98414] | 845 | if1of ($(KBUILD_TARGET), darwin solaris)
|
---|
| 846 | ifdef VBOX_WITH_VBOXDRV
|
---|
| 847 | # Common manual loader script.
|
---|
| 848 | INSTALLS += SUPDrvScripts
|
---|
| 849 | SUPDrvScripts_INST = $(INST_DIST)
|
---|
| 850 | SUPDrvScripts_EXEC_SOURCES = \
|
---|
| 851 | $(KBUILD_TARGET)/load.sh
|
---|
| 852 | endif
|
---|
[93437] | 853 | endif
|
---|
[40602] | 854 |
|
---|
| 855 |
|
---|
[98414] | 856 | if1of ($(KBUILD_TARGET), linux freebsd)
|
---|
| 857 | if1of ($(KBUILD_TARGET_ARCH), $(VBOX_SUPPORTED_HOST_ARCHS))
|
---|
| 858 | #
|
---|
| 859 | # Targets for installing the linux sources.
|
---|
| 860 | #
|
---|
| 861 | vboxdrv-src_INST = bin/src/vboxdrv/
|
---|
| 862 | vboxdrv-src_SOURCES = \
|
---|
| 863 | $(subst $(DQUOTE),,$(FILES_VBOXDRV_NOBIN)) \
|
---|
| 864 | $(vboxdrv-src_0_OUTDIR)/Makefile
|
---|
| 865 | vboxdrv-src_EXEC_SOURCES = \
|
---|
| 866 | $(subst $(DQUOTE),,$(FILES_VBOXDRV_BIN))
|
---|
| 867 | vboxdrv-src_CLEAN = \
|
---|
| 868 | $(vboxdrv-src_0_OUTDIR)/Makefile \
|
---|
| 869 | $(PATH_TARGET)/vboxdrv-src-1.dep
|
---|
[40756] | 870 |
|
---|
[98414] | 871 | # Scripts needed for building the kernel modules
|
---|
| 872 | includedep $(PATH_TARGET)/vboxdrv-src-1.dep
|
---|
| 873 | $$(vboxdrv-src_0_OUTDIR)/Makefile: \
|
---|
| 874 | $(PATH_SUB_CURRENT)/$(KBUILD_TARGET)/Makefile \
|
---|
| 875 | $$(if $$(eq $$(Support/$(KBUILD_TARGET)/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
|
---|
| 876 | $$(if $$(eq $$(Support/$(KBUILD_TARGET)/Makefile_VBOX_RAM_IN_KERNEL),$$(VBOX_WITH_RAM_IN_KERNEL)),,FORCE) \
|
---|
| 877 | | $$(dir $$@)
|
---|
[40756] | 878 | $(call MSG_TOOL,Creating,,$@)
|
---|
[57254] | 879 | $(QUIET)$(SED) -e "" \
|
---|
[93911] | 880 | $(if-expr !defined(VBOX_WITH_HARDENING),-e "s;VBOX_WITH_HARDENING;;g",) \
|
---|
[57254] | 881 | --output $@ $<
|
---|
[88331] | 882 | %$(QUIET2)$(APPEND) -t -n '$(PATH_TARGET)/vboxdrv-src-1.dep' \
|
---|
[82590] | 883 | 'Support/$(KBUILD_TARGET)/Makefile_VBOX_HARDENED=$(VBOX_WITH_HARDENING)' \
|
---|
| 884 | 'Support/$(KBUILD_TARGET)/Makefile_VBOX_RAM_IN_KERNEL=$(VBOX_WITH_RAM_IN_KERNEL)'
|
---|
[76324] | 885 |
|
---|
[98414] | 886 | #
|
---|
| 887 | # Build test for the linux host kernel modules.
|
---|
| 888 | #
|
---|
| 889 | $(evalcall2 VBOX_LINUX_KMOD_TEST_BUILD_RULE_FN,vboxdrv-src,,save_symvers)
|
---|
[87700] | 890 |
|
---|
[98414] | 891 | ifdef VBOX_WITH_KMOD_WRAPPED_R0_MODS
|
---|
| 892 | #
|
---|
| 893 | # Common wrapper module files.
|
---|
| 894 | #
|
---|
| 895 | INSTALLS.linux += vboxwrappermod-common-src
|
---|
| 896 | vboxwrappermod-common-src_INST = bin/src/common/
|
---|
| 897 | vboxwrappermod-common-src_SOURCES = \
|
---|
| 898 | linux/SUPWrapperMod-linux.c=>SUPWrapperMod-linux.c \
|
---|
| 899 | linux/Makefile-wrapper.gmk=>Makefile-wrapper.gmk \
|
---|
| 900 | $(PATH_ROOT)/src/VBox/Installer/linux/Makefile-header.gmk=>Makefile-header.gmk \
|
---|
| 901 | $(PATH_ROOT)/src/VBox/Installer/linux/Makefile-footer.gmk=>Makefile-footer.gmk
|
---|
| 902 | endif
|
---|
[87700] | 903 |
|
---|
[98414] | 904 | endif # supported host arch
|
---|
| 905 | endif # linux freebsd
|
---|
[40756] | 906 |
|
---|
| 907 |
|
---|
[98414] | 908 | ifeq ($(KBUILD_TARGET),win)
|
---|
| 909 | INSTALLS.win += VBoxSup-inf
|
---|
| 910 | VBoxSup-inf_TEMPLATE = VBoxR0DrvInfCat
|
---|
| 911 | VBoxSup-inf_SOURCES = \
|
---|
| 912 | $(PATH_TARGET)/VBoxSupCat.dir/VBoxSup.inf
|
---|
| 913 | VBoxSup-inf_CLEAN = $(VBoxSup-inf_SOURCES)
|
---|
| 914 | VBoxSup-inf_BLDDIRS = $(PATH_TARGET)/VBoxSupCat.dir
|
---|
[40778] | 915 |
|
---|
[98414] | 916 | $(PATH_TARGET)/VBoxSupCat.dir/VBoxSup.inf: $(PATH_SUB_CURRENT)/win/VBoxSup.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
[93239] | 917 | $(call MSG_GENERATE,VBoxSup-inf,$@,$<)
|
---|
[40778] | 918 | $(call VBOX_EDIT_INF_FN,$<,$@)
|
---|
| 919 |
|
---|
[98414] | 920 | ifdef VBOX_SIGNING_MODE
|
---|
| 921 | VBoxSup-inf_SOURCES += \
|
---|
| 922 | $(PATH_TARGET)/VBoxSupCat.dir/VBoxSup.sys \
|
---|
| 923 | $(PATH_TARGET)/VBoxSupCat.dir/VBoxSup.cat \
|
---|
| 924 | $(PATH_TARGET)/VBoxSupCat.dir/VBoxSup.cat=>VBoxSup-PreW10.cat
|
---|
[40778] | 925 |
|
---|
[98414] | 926 | $(PATH_TARGET)/VBoxSupCat.dir/VBoxSup.sys: $$(VBoxDrv_1_TARGET) | $$(dir $$@)
|
---|
[93239] | 927 | $(INSTALL) -m 644 -- "$<" "$(@D)"
|
---|
[40778] | 928 |
|
---|
[98414] | 929 | $(PATH_TARGET)/VBoxSupCat.dir/VBoxSup.cat: \
|
---|
| 930 | $(PATH_TARGET)/VBoxSupCat.dir/VBoxSup.inf \
|
---|
| 931 | $(PATH_TARGET)/VBoxSupCat.dir/VBoxSup.sys
|
---|
[93239] | 932 | $(call MSG_TOOL,Inf2Cat,VBoxSup-inf,$@,$<)
|
---|
[40778] | 933 | $(call VBOX_MAKE_CAT_FN, $(@D),$@)
|
---|
[98414] | 934 | endif # signing
|
---|
| 935 | endif # win
|
---|
[40778] | 936 |
|
---|
[98414] | 937 | #
|
---|
| 938 | # Linux only.
|
---|
| 939 | #
|
---|
| 940 | PROGRAMS.linux += LnxPerfHack
|
---|
| 941 | LnxPerfHack_TEMPLATE = VBoxR3Tool
|
---|
| 942 | LnxPerfHack_SOURCES = linux/LnxPerfHack.cpp
|
---|
[40778] | 943 |
|
---|
[87646] | 944 |
|
---|
| 945 |
|
---|
[51346] | 946 | endif # !VBOX_ONLY_DOCS && !VBOX_ONLY_EXTPACKS && !VBOX_ONLY_VALIDATIONKIT
|
---|
[41477] | 947 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
[2682] | 948 |
|
---|