VirtualBox

source: vbox/trunk/src/VBox/HostDrivers/Support/Makefile.kmk@ 54262

Last change on this file since 54262 was 54227, checked in by vboxsync, 10 years ago

build fix

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 28.5 KB
Line 
1# $Id: Makefile.kmk 54227 2015-02-17 03:44:56Z vboxsync $
2## @file
3# Sub-Makefile for the support library and the drivers/modules/kexts it uses.
4#
5
6#
7# Copyright (C) 2006-2012 Oracle Corporation
8#
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#
26
27SUB_DEPTH = ../../../..
28include $(KBUILD_PATH)/subheader.kmk
29
30#
31# Targets
32#
33LIBRARIES += SUPR3 SUPR3Static
34ifdef VBOX_WITH_HARDENING
35 LIBRARIES += SUPR3HardenedStatic
36endif
37DLLS.win += VBoxSupLib
38ifdef VBOX_WITH_32_ON_64_MAIN_API
39 LIBRARIES += SUPR3-x86
40endif
41ifndef VBOX_ONLY_DOCS
42 if1of ($(VBOX_LDR_FMT), pe lx)
43 LIBRARIES += SUPR0
44 endif
45endif
46if !defined(VBOX_ONLY_BUILD) && defined(VBOX_WITH_RAW_MODE)
47 LIBRARIES += SUPRC
48endif
49if !defined(VBOX_ONLY_DOCS) \
50 && !defined(VBOX_ONLY_EXTPACKS) \
51 && !defined(VBOX_ONLY_VALIDATIONKIT)
52 ifdef VBOX_WITH_SUPSVC
53 PROGRAMS += VBoxSupSvc
54 endif
55 ifdef VBOX_WITH_VBOXDRV
56 LIBRARIES += SUPR0IdcClient
57 SYSMODS.freebsd += vboxdrv
58 SYSMODS.os2 += VBoxDrv
59 endif
60 INSTALLS.linux += vboxdrv-mod
61 INSTALLS.freebsd += vboxdrv-mod
62
63 #
64 # Include sub-makefile(s).
65 #
66 include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
67
68 #
69 # Populate FILES_VBOXDRV_NOBIN and FILES_VBOXDRV_BIN
70 #
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
77endif # !VBOX_ONLY_DOCS && !VBOX_ONLY_EXTPACKS && !VBOX_ONLY_VALIDATIONKIT
78
79#
80# Authenticode related trust anchors and certificates -> .cpp
81#
82VBOX_SUP_WIN_CERTS_FILE = $(SUPR3_0_OUTDIR)/TrustAnchorsAndCerts.cpp
83VBOX_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 \
90 SpcRootMicrosoft6=SpcRoot-MicrosoftDevelopmentRootCertificateAuthority2014-078f0a9d03df119e434e4fec1bf0235a.taf \
91 NtRootMicrosoft7=NtRoot-MicrosoftCodeVerificationRoot-729404101f3e0ca347837fca175a8438.taf \
92 TimeRootMicrosoft0=Timestamp-CopyrightC1997MicrosoftCorp-01.taf \
93 TrustedCertVBox0=Trusted-OracleCorporationVirtualBox-51ca009816fdbd80f120e015ee75823e.taf
94VBOX_SUP_WIN_CERT_NAMES := $(foreach cert,$(VBOX_SUP_WIN_CERTS),$(firstword $(subst =,$(SPACE) ,$(cert))))
95VBOX_PATH_SUPR3_CERTIFICATES := $(PATH_SUB_CURRENT)/win/Certificates
96
97# 1=name, 2=filter, 3=buildcert?.
98if "$(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);' '' ''
103else
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);' '' ''
107endif
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 -- $@ [email protected]
115 $(QUIET)$(APPEND) -n "$@" \
116 '' \
117 '#include <VBox/sup.h>' \
118 ''
119 $(foreach cert,$(VBOX_SUP_WIN_CERTS), $(NLTAB)$(VBOX_BIN2C) -ascii --append \
120 "SUP$(firstword $(subst =,$(SP) ,$(cert)))" \
121 "$(VBOX_PATH_SUPR3_CERTIFICATES)/$(lastword $(subst =,$(SP) ,$(cert)))" \
122 "$@")
123# The build certificate.
124if "$(KBUILD_TARGET)" == "win" && defined(VBOX_WITH_HARDENING) && defined(VBOX_SIGNING_MODE)
125 $(VBOX_RTSIGNTOOL) extract-exe-signer-cert --exe $(VBOX_RTSIGNTOOL) --output "[email protected]" --der
126 $(VBOX_BIN2C) -ascii --append SUPBuildCert "[email protected]" $@
127 $(QUIET)$(RM) -f -- [email protected]
128endif
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
137tst: $(VBOX_SUP_WIN_CERTS_FILE)
138
139
140#
141# The Ring-3 Support Library (this is linked into the IPRT dll, VBoxRT).
142#
143SUPR3_TEMPLATE = VBOXR3
144SUPR3_DEFS = \
145 IN_SUP_R3 IN_RT_R3 \
146 $(if $(VBOX_WITH_SUPSVC),VBOX_WITH_SUPSVC) \
147 $(if $(VBOX_WITH_MAIN),VBOX_WITH_MAIN,) \
148 $(if $(VBOX_WITH_RAW_MODE),VBOX_WITH_RAW_MODE,) \
149 VBOX_PERMIT_MORE \
150 VBOX_PERMIT_EVEN_MORE
151SUPR3_INCS := $(PATH_SUB_CURRENT)
152SUPR3_SOURCES = \
153 SUPLib.cpp \
154 SUPLibLdr.cpp \
155 SUPLibSem.cpp \
156 SUPLibTracerA.asm \
157 SUPLibAll.cpp \
158 SUPR3HardenedIPRT.cpp \
159 SUPR3HardenedVerify.cpp \
160 $(KBUILD_TARGET)/SUPLib-$(KBUILD_TARGET).cpp \
161 $(VBOX_SUP_WIN_CERTS_FILE)
162ifdef VBOX_WITH_HARDENING
163 SUPR3_SOURCES.win = \
164 win/SUPHardenedVerifyImage-win.cpp
165endif
166
167SUPR3-x86_TEMPLATE = VBoxR3Dll-x86
168SUPR3-x86_EXTENDS = SUPR3
169
170
171#
172# Static version of SUPR3. This is more of a stub than anything else in a
173# hardened build, at least on windows.
174#
175SUPR3Static_TEMPLATE = VBOXR3STATIC
176SUPR3Static_EXTENDS = SUPR3
177SUPR3Static_DEFS = $(SUPR3_DEFS) IN_SUP_R3_STATIC
178SUPR3Static_SOURCES.win = $(filter-out win/SUPHardenedVerifyImage-win.cpp, $(SUPR3_SOURCES.win))
179
180
181#
182# The static part of the hardened support library (ring-3).
183#
184VBOX_PATH_RUNTIME_SRC ?= $(PATH_ROOT)/src/VBox/Runtime
185SUPR3HardenedStatic_TEMPLATE = VBOXR3HARDENEDLIB
186SUPR3HardenedStatic_DEFS = IN_SUP_HARDENED_R3
187SUPR3HardenedStatic_DEFS += \
188 $(if $(VBOX_WITH_SUPSVC),VBOX_WITH_SUPSVC,) \
189 $(if $(VBOX_WITH_MAIN),VBOX_WITH_MAIN,) \
190 $(if $(VBOX_WITH_RAW_MODE),VBOX_WITH_RAW_MODE,) \
191 $(if $(VBOX_WITHOUT_DEBUGGER_CHECKS),VBOX_WITHOUT_DEBUGGER_CHECKS,) \
192 $(if $(VBOX_PERMIT_VISUAL_STUDIO_PROFILING),VBOX_PERMIT_VISUAL_STUDIO_PROFILING,) \
193 VBOX_PERMIT_MORE \
194 VBOX_PERMIT_EVEN_MORE
195ifdef VBOX_WITH_VISTA_NO_SP
196 SUPR3HardenedStatic_DEFS.win += VBOX_WITH_VISTA_NO_SP
197endif
198SUPR3HardenedStatic_INCS = .
199SUPR3HardenedStatic_SOURCES = \
200 SUPR3HardenedMain.cpp \
201 SUPR3HardenedVerify.cpp \
202 SUPR3HardenedNoCrt.cpp \
203 $(KBUILD_TARGET)/SUPLib-$(KBUILD_TARGET).cpp
204SUPR3HardenedStatic_SOURCES.win = \
205 win/SUPR3HardenedMain-win.cpp \
206 win/SUPR3HardenedMainA-win.asm \
207 win/SUPR3HardenedMainImports-win.cpp \
208 win/SUPHardenedVerifyProcess-win.cpp \
209 win/SUPHardenedVerifyImage-win.cpp \
210 $(VBOX_SUP_WIN_CERTS_FILE)
211
212if "$(KBUILD_TARGET)" == "win" && defined(VBOX_WITH_HARDENING) ## @todo some of this move up.
213 SUPR3HardenedStatic_DEFS += \
214 IN_RT \
215 IN_RT_R3 \
216 IN_RT_STATIC \
217 IN_DIS \
218 DIS_CORE_ONLY \
219 IPRT_NO_CRT \
220 RT_WITH_NOCRT_ALIASES \
221 LOG_DISABLED \
222 IPRT_NO_ERROR_DATA
223 SUPR3HardenedStatic_DEFS.win += LDR_ONLY_PE __STRALIGN_H_
224
225 SUPR3HardenedStatic_INCS += $(PATH_ROOT)/include/iprt/nocrt $(VBOX_PATH_RUNTIME_SRC)/include
226
227 SUPR3HardenedStatic_SOURCES += \
228 $(VBOX_PATH_RUNTIME_SRC)/common/ldr/ldr.cpp \
229 $(VBOX_PATH_RUNTIME_SRC)/common/ldr/ldrEx.cpp \
230 $(VBOX_PATH_RUNTIME_SRC)/common/ldr/ldrPE.cpp \
231 $(VBOX_PATH_RUNTIME_SRC)/common/alloc/heapsimple.cpp \
232 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-basics.cpp \
233 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-cursor.cpp \
234 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-default-allocator.cpp \
235 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-dump.cpp \
236 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-encode.cpp \
237 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-bitstring.cpp \
238 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-bitstring-decode.cpp \
239 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-boolean.cpp \
240 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-boolean-decode.cpp \
241 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-core.cpp \
242 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-core-decode.cpp \
243 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-dyntype.cpp \
244 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-dyntype-decode.cpp \
245 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-integer.cpp \
246 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-integer-decode.cpp \
247 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-null.cpp \
248 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-null-decode.cpp \
249 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-objid.cpp \
250 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-objid-decode.cpp \
251 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-octetstring.cpp \
252 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-octetstring-decode.cpp \
253 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-string.cpp \
254 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-string-decode.cpp \
255 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-time.cpp \
256 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/asn1-ut-time-decode.cpp \
257 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/digest-core.cpp \
258 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/digest-builtin.cpp \
259 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkcs7-asn1-decoder.cpp \
260 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkcs7-core.cpp \
261 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkcs7-init.cpp \
262 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkcs7-sanity.cpp \
263 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkcs7-verify.cpp \
264 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkix-signature-builtin.cpp \
265 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkix-signature-core.cpp \
266 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkix-signature-rsa.cpp \
267 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkix-verify.cpp \
268 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/pkix-util.cpp \
269 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/rsa-asn1-decoder.cpp \
270 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/rsa-core.cpp \
271 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/rsa-init.cpp \
272 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/rsa-sanity.cpp \
273 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/spc-asn1-decoder.cpp \
274 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/spc-core.cpp \
275 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/spc-init.cpp \
276 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/spc-sanity.cpp \
277 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/x509-asn1-decoder.cpp \
278 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/x509-certpaths.cpp \
279 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/x509-core.cpp \
280 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/x509-init.cpp \
281 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/x509-sanity.cpp \
282 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/x509-verify.cpp \
283 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/store.cpp \
284 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/store-inmem.cpp \
285 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/taf-asn1-decoder.cpp \
286 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/taf-core.cpp \
287 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/taf-init.cpp \
288 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/taf-sanity.cpp \
289 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/tsp-asn1-decoder.cpp \
290 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/tsp-core.cpp \
291 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/tsp-init.cpp \
292 $(VBOX_PATH_RUNTIME_SRC)/common/crypto/tsp-sanity.cpp \
293 $(VBOX_PATH_RUNTIME_SRC)/common/checksum/alt-md2.cpp \
294 $(VBOX_PATH_RUNTIME_SRC)/common/checksum/alt-md5.cpp \
295 $(VBOX_PATH_RUNTIME_SRC)/common/checksum/alt-sha1.cpp \
296 $(VBOX_PATH_RUNTIME_SRC)/common/checksum/alt-sha256.cpp \
297 $(VBOX_PATH_RUNTIME_SRC)/common/checksum/alt-sha512.cpp \
298 $(VBOX_PATH_RUNTIME_SRC)/common/checksum/md2str.cpp \
299 $(VBOX_PATH_RUNTIME_SRC)/common/checksum/md5str.cpp \
300 $(VBOX_PATH_RUNTIME_SRC)/common/checksum/sha1str.cpp \
301 $(VBOX_PATH_RUNTIME_SRC)/common/checksum/sha256str.cpp \
302 $(VBOX_PATH_RUNTIME_SRC)/common/checksum/sha512str.cpp \
303 $(VBOX_PATH_RUNTIME_SRC)/common/err/errinfo.cpp \
304 $(VBOX_PATH_RUNTIME_SRC)/common/path/RTPathChangeToUnixSlashes.cpp \
305 $(VBOX_PATH_RUNTIME_SRC)/common/path/RTPathExt.cpp \
306 $(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrPrintHexBytes.cpp \
307 $(VBOX_PATH_RUNTIME_SRC)/common/string/RTUtf16PrintHexBytes.cpp \
308 $(VBOX_PATH_RUNTIME_SRC)/common/string/RTUtf16ICmpAscii.cpp \
309 $(VBOX_PATH_RUNTIME_SRC)/common/string/RTUtf16CatAscii.cpp \
310 $(VBOX_PATH_RUNTIME_SRC)/common/string/RTUtf16CopyAscii.cpp \
311 $(VBOX_PATH_RUNTIME_SRC)/common/string/RTUtf16End.cpp \
312 $(VBOX_PATH_RUNTIME_SRC)/common/string/strstrip.cpp \
313 \
314 $(VBOX_PATH_RUNTIME_SRC)/common/err/errmsg.cpp \
315 $(VBOX_PATH_RUNTIME_SRC)/common/math/bignum.cpp \
316 $(VBOX_PATH_RUNTIME_SRC)/common/math/bignum-amd64-x86.asm \
317 $(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg1Weak.cpp \
318 $(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg2.cpp \
319 $(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg2Weak.cpp \
320 $(VBOX_PATH_RUNTIME_SRC)/common/misc/RTAssertMsg2WeakV.cpp \
321 $(VBOX_PATH_RUNTIME_SRC)/common/misc/zero.asm \
322 $(VBOX_PATH_RUNTIME_SRC)/common/path/RTPathFilename.cpp \
323 $(VBOX_PATH_RUNTIME_SRC)/common/string/memchr.asm \
324 $(VBOX_PATH_RUNTIME_SRC)/common/string/memcmp.asm \
325 $(VBOX_PATH_RUNTIME_SRC)/common/string/memcpy.asm \
326 $(VBOX_PATH_RUNTIME_SRC)/common/string/memmove.asm \
327 $(VBOX_PATH_RUNTIME_SRC)/common/string/mempcpy.asm \
328 $(VBOX_PATH_RUNTIME_SRC)/common/string/memset.asm \
329 $(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrCat.cpp \
330 $(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrCmp.cpp \
331 $(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrCopy.cpp \
332 $(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrNCmp.cpp \
333 $(VBOX_PATH_RUNTIME_SRC)/common/string/RTStrNLen.cpp \
334 $(VBOX_PATH_RUNTIME_SRC)/common/string/RTUtf16NLenEx.cpp \
335 $(VBOX_PATH_RUNTIME_SRC)/common/string/strchr.asm \
336 $(VBOX_PATH_RUNTIME_SRC)/common/string/strcmp.asm \
337 $(VBOX_PATH_RUNTIME_SRC)/common/string/strcpy.asm \
338 $(VBOX_PATH_RUNTIME_SRC)/common/string/strformat.cpp \
339 $(VBOX_PATH_RUNTIME_SRC)/common/string/strformatrt.cpp \
340 $(VBOX_PATH_RUNTIME_SRC)/common/string/strformattype.cpp \
341 $(VBOX_PATH_RUNTIME_SRC)/common/string/stringalloc.cpp \
342 $(VBOX_PATH_RUNTIME_SRC)/common/string/strlen.asm \
343 $(VBOX_PATH_RUNTIME_SRC)/common/string/strncmp.asm \
344 $(VBOX_PATH_RUNTIME_SRC)/common/string/strncpy.asm \
345 $(VBOX_PATH_RUNTIME_SRC)/common/string/strprintf.cpp \
346 $(VBOX_PATH_RUNTIME_SRC)/common/string/strtonum.cpp \
347 $(VBOX_PATH_RUNTIME_SRC)/common/string/utf-16.cpp \
348 $(VBOX_PATH_RUNTIME_SRC)/common/string/utf-8.cpp \
349 $(VBOX_PATH_RUNTIME_SRC)/common/string/utf-8-case.cpp \
350 $(VBOX_PATH_RUNTIME_SRC)/common/string/unidata-upper.cpp \
351 $(VBOX_PATH_RUNTIME_SRC)/common/string/unidata-lower.cpp \
352 $(VBOX_PATH_RUNTIME_SRC)/common/time/time.cpp \
353 $(VBOX_PATH_RUNTIME_SRC)/generic/RTAssertShouldPanic-generic.cpp \
354 $(VBOX_PATH_RUNTIME_SRC)/generic/RTPathAbs-generic.cpp \
355 $(VBOX_PATH_RUNTIME_SRC)/generic/RTPathGetCurrentDrive-generic.cpp \
356 $(VBOX_PATH_RUNTIME_SRC)/generic/RTPathGetCurrentOnDrive-generic.cpp \
357 $(VBOX_PATH_RUNTIME_SRC)/generic/memsafer-generic.cpp \
358 $(VBOX_PATH_RUNTIME_SRC)/generic/uuid-generic.cpp \
359 \
360 ../../Disassembler/DisasmCore.cpp \
361 ../../Disassembler/DisasmTables.cpp \
362 ../../Disassembler/DisasmTablesX64.cpp \
363 ../../Disassembler/DisasmReg.cpp
364
365 SUPR3HardenedStatic_SOURCES.amd64 += \
366 $(VBOX_PATH_RUNTIME_SRC)/common/math/RTUInt128MulByU64.asm
367
368 SUPR3HardenedStatic_SOURCES.win += \
369 win/SUPR3HardenedNoCrt-win.cpp \
370 $(VBOX_PATH_RUNTIME_SRC)/nt/RTErrConvertFromNtStatus.cpp \
371 $(VBOX_PATH_RUNTIME_SRC)/r3/nt/pathint-nt.cpp \
372 $(VBOX_PATH_RUNTIME_SRC)/win/RTErrConvertFromWin32.cpp \
373 $(VBOX_PATH_RUNTIME_SRC)/win/errmsgwin.cpp
374
375 # Add necessary compiler specific files from libcmt.lib and the lib dir.
376 ifeq ($(KBUILD_TARGET),win)
377 SUPR3HardenedStatic_VBOX_LIBC_OBJS = chkstk.obj
378 ifeq ($(KBUILD_TARGET_ARCH),x86)
379 SUPR3HardenedStatic_VBOX_LIBC_OBJS += \
380 alloca16.obj \
381 ulldiv.obj \
382 ulldvrm.obj \
383 ullrem.obj \
384 ullshr.obj \
385 lldiv.obj \
386 lldvrm.obj \
387 llmul.obj \
388 llrem.obj \
389 llshl.obj \
390 llshr.obj \
391 rotl.obj \
392 rotr.obj
393 endif
394 SUPR3HardenedStatic_SOURCES.win += $(addprefix $(SUPR3HardenedStatic_0_OUTDIR)/,$(SUPR3HardenedStatic_VBOX_LIBC_OBJS))
395
396 $(addprefix $$(SUPR3HardenedStatic_0_OUTDIR)/,$(SUPR3HardenedStatic_VBOX_LIBC_OBJS)): \
397 $$(PATH_TOOL_$(TEMPLATE_VBOXR3EXE_TOOL.win.$(KBUILD_TARGET_ARCH))_LIB)/libcmt.lib | $$(dir $$@)
398 $(TOOL_$(TEMPLATE_VBOXR3HARDENEDEXE_TOOL.win.$(KBUILD_TARGET_ARCH))_AR) "$<" \
399 /EXTRACT:`$(TOOL_$(TEMPLATE_VBOXR3HARDENEDEXE_TOOL.win.$(KBUILD_TARGET_ARCH))_AR) "$<" /LIST \
400 | $(SED_EXT) -n -e '/[\\/:]$(notdir $@)/p'` \
401 "/OUT:$@"
402 endif
403endif
404
405SUPR3HardenedMain.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
406
407
408#
409# VBoxSupLib - Windows DLL for catching thread creation and termination.
410#
411VBoxSupLib_TEMPLATE = $(if-expr "$(KBUILD_TARGET)" == "win" && defined(VBOX_WITH_HARDENING),VBOXR3HARDENEDLIB,VBOXR3)
412VBoxSupLib_SDKS.win = VBOX_NTDLL
413VBoxSupLib_LDFLAGS.win.amd64 = -Entry:DllMainEntrypoint
414VBoxSupLib_LDFLAGS.win.x86 = -Entry:DllMainEntrypoint
415VBoxSupLib_DEFS = \
416 $(if $(VBOX_WITHOUT_DEBUGGER_CHECKS),VBOX_WITHOUT_DEBUGGER_CHECKS,)
417VBoxSupLib_SOURCES = \
418 $(KBUILD_TARGET)/VBoxSupLib-$(KBUILD_TARGET).cpp
419VBoxSupLib_SOURCES.win = \
420 win/VBoxSupLib.rc
421VBoxSupLib_LIBS.win.x86 = \
422 $(PATH_TOOL_$(TEMPLATE_VBOXR3STATIC_TOOL.win.x86)_LIB)/libcmt$(VBOX_VCC_CRT_TYPE).lib # for __chkstk
423VBoxSupLib_LIBS.win.amd64 = \
424 $(PATH_TOOL_$(TEMPLATE_VBOXR3STATIC_TOOL.win.amd64)_LIB)/libcmt$(VBOX_VCC_CRT_TYPE).lib # for __chkstk
425
426
427#
428# VBoxSupSvc - The system wide service/daemon.
429#
430VBoxSupSvc_TEMPLATE = VBOXR3EXE
431VBoxSupSvc_SOURCES = \
432 SUPSvc.cpp \
433 SUPSvcGlobal.cpp \
434 $(KBUILD_TARGET)/SUPSvc-$(KBUILD_TARGET).cpp
435if1of ($(KBUILD_TARGET), win)
436 VBoxSupSvc_SOURCES += \
437 SUPSvcGrant.cpp
438endif
439ifn1of ($(KBUILD_TARGET), win)
440 VBoxSupSvc_SOURCES += \
441 SUPSvcMain-posix.cpp
442endif
443VBoxSupSvc_LIBS = \
444 $(LIB_RUNTIME)
445
446
447#
448# SUPR0 - The Ring-0 Import library.
449#
450SUPR0_TEMPLATE = VBoxR0
451if1of ($(VBOX_LDR_FMT), pe lx)
452 SUPR0_SOURCES = $(SUPR0_0_OUTDIR)/SUPR0.def
453 SUPR0_CLEAN = $(SUPR0_0_OUTDIR)/SUPR0.def
454$$(SUPR0_0_OUTDIR)/SUPR0.def: \
455 $(PATH_SUB_CURRENT)/SUPDrv.c \
456 $(PATH_SUB_CURRENT)/SUPR0-def-$(VBOX_LDR_FMT).sed \
457 | $$(dir $$@)
458 $(SED) \
459 -f $(dir $<)/SUPR0-def-$(VBOX_LDR_FMT).sed \
460 --output $@ \
461 $<
462endif
463
464
465#
466# SUPRC - The raw-mode context library.
467#
468SUPRC_TEMPLATE := VBoxRc
469SUPRC_DEFS := IN_SUP_RC
470SUPRC_SOURCES := SUPLibAll.cpp
471
472
473#
474# SUPR0IdcClient - The Ring-0 IDC client driver library.
475#
476SUPR0IdcClient_TEMPLATE = VBoxR0DrvLib
477SUPR0IdcClient_DEFS = IN_RT_R0 IN_SUP_R0 IN_SUP_STATIC
478SUPR0IdcClient_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK) $(VBOX_WINPSDK)INCS
479SUPR0IdcClient_SOURCES.$(KBUILD_TARGET) = \
480 $(KBUILD_TARGET)/SUPR0IdcClient-$(KBUILD_TARGET).c
481SUPR0IdcClient_SOURCES = \
482 SUPR0IdcClient.c \
483 SUPR0IdcClientComponent.c \
484 SUPR0IdcClientStubs.c
485
486
487
488if !defined(VBOX_ONLY_DOCS) \
489 && !defined(VBOX_ONLY_EXTPACKS) \
490 && !defined(VBOX_ONLY_VALIDATIONKIT)
491
492ifeq ($(KBUILD_TARGET),os2)
493
494#
495# VBoxDrv.sys - The OS/2 driver.
496#
497VBoxDrv_TEMPLATE = VBOXR0DRV
498VBoxDrv_DEFS = IN_RT_R0 IN_SUP_R0
499VBoxDrv_INCS := $(PATH_SUB_CURRENT)
500#VBoxDrv_LDFLAGS = -s -t -v
501VBoxDrv_SOURCES = \
502 os2/SUPDrvA-os2.asm \
503 os2/SUPDrv-os2.def
504VBoxDrv_LIBS = \
505 $(VBoxDrvLib_1_TARGET) \
506 $(PATH_STAGE_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB) \
507 $(VBOX_GCC_LIBGCC) \
508 end
509
510# temp hack to ensure that SUPDrvA-os2.asm is first in the link.
511LIBRARIES += VBoxDrvLib
512VBoxDrvLib_TEMPLATE = VBOXR0DRV
513VBoxDrvLib_INSTTYPE = none
514VBoxDrvLib_DEFS = IN_RT_R0 IN_SUP_R0
515VBoxDrvLib_INCS := \
516 . \
517 $(PATH_ROOT)/src/VBox/Runtime/include
518VBoxDrvLib_SOURCES = \
519 os2/SUPDrv-os2.cpp \
520 SUPDrv.c \
521 SUPDrvSem.c \
522 SUPLibAll.cpp
523
524endif # os2
525ifeq ($(KBUILD_TARGET),freebsd)
526
527#
528# vboxdrv.ko - The FreeBSD Kernel Module.
529#
530vboxdrv_TEMPLATE = VBOXR0DRV
531vboxdrv_DEFS = IN_RT_R0 IN_SUP_R0 SUPDRV_WITH_RELEASE_LOGGER VBOX_SVN_REV=$(VBOX_SVN_REV)
532vboxdrv_INCS := $(PATH_SUB_CURRENT)
533vboxdrv_LIBS = $(PATH_STAGE_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
534vboxdrv_SOURCES := \
535 $(KBUILD_TARGET)/SUPDrv-$(KBUILD_TARGET).c \
536 $(PATH_SUB_CURRENT)/$(KBUILD_TARGET)/SUPDrv-$(KBUILD_TARGET).def \
537 SUPDrv.c \
538 SUPDrvSem.c \
539 SUPLibAll.cpp
540## @todo the SUPDrv-freebsd.def is most probably gonna break it and require build system hacking...
541
542#
543# Targets for installing the freebsd sources.
544#
545vboxdrv-mod_INST = bin/src/vboxdrv/
546vboxdrv-mod_SOURCES = \
547 $(subst $(DQUOTE),,$(FILES_VBOXDRV_NOBIN)) \
548 $(vboxdrv-mod_0_OUTDIR)/Makefile
549vboxdrv-mod_CLEAN = \
550 $(vboxdrv-mod_0_OUTDIR)/Makefile
551
552$$(vboxdrv-mod_0_OUTDIR)/Makefile: \
553 $(PATH_SUB_CURRENT)/freebsd/Makefile \
554 $$(if $$(eq $$(Support/freebsd/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
555 | $$(dir $$@)
556 $(call MSG_TOOL,Creating,,$@)
557 $(QUIET)$(RM) -f -- $@
558 ifndef VBOX_WITH_HARDENING
559 $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
560 else
561 $(QUIET)$(CP) -f $< $@
562 endif
563
564endif # freebsd
565
566
567#
568# New VBoxDrv target. TODO: Convert all the above to use this!
569#
570if1of ($(KBUILD_TARGET), darwin linux solaris win)
571 ifdef VBOX_WITH_VBOXDRV
572 SYSMODS += VBoxDrv
573 endif
574 VBoxDrv_TEMPLATE = VBOXR0DRV
575 VBoxDrv_NAME.freebsd = vboxdrv
576 VBoxDrv_NAME.linux = vboxdrv
577 VBoxDrv_NAME.solaris = vboxdrv
578 ifdef VBOX_SIGNING_MODE
579 VBoxDrv_INSTTYPE.win = none
580 VBoxDrv_DEBUG_INSTTYPE.win = both
581 endif
582 VBoxDrv_INST.darwin = $(INST_VBOXDRV)Contents/MacOS/
583 VBoxDrv_DEBUG_INST.darwin= $(patsubst %/,%,$(INST_VBOXDRV))
584 VBoxDrv_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK) $(VBOX_WINPSDK)INCS
585
586 VBoxDrv_DEFS := IN_RT_R0 IN_SUP_R0 SUPDRV_WITH_RELEASE_LOGGER VBOX_SVN_REV=$(VBOX_SVN_REV)
587 ifdef VBOX_WITH_DTRACE_R0DRV
588 VBoxDrv_DEFS += VBOX_WITH_DTRACE VBOX_WITH_DTRACE_R0DRV
589 endif
590 ifdef VBOX_WITHOUT_DEBUGGER_CHECKS
591 VBoxDrv_DEFS += VBOX_WITHOUT_DEBUGGER_CHECKS
592 endif
593 ifdef VBOX_PERMIT_VISUAL_STUDIO_PROFILING
594 VBoxDrv_DEFS += VBOX_PERMIT_VISUAL_STUDIO_PROFILING
595 endif
596 VBoxDrv_DEFS += VBOX_PERMIT_MORE VBOX_PERMIT_EVEN_MORE
597 #VBoxDrv_DEFS.debug += DEBUG_DARWIN_GIP
598 VBoxDrv_DEFS.darwin := VBOX_WITH_HOST_VMX
599 VBoxDrv_DEFS.linux := \
600 KBUILD_MODNAME=KBUILD_STR\(vboxdrv\) KBUILD_BASENAME=KBUILD_STR\(vboxdrv\) MODULE CONFIG_VBOXDRV_AS_MISC
601 ifdef VBOX_LINUX_VERSION_2_4
602 VBoxDrv_DEFS.linux += EXPORT_SYMTAB
603 endif
604 ifdef VBOX_WITH_NETFLT
605 VBoxDrv_DEFS.solaris += VBOX_WITH_NETFLT
606 endif
607 ifdef VBOX_WITH_NATIVE_SOLARIS_LOADING
608 VBoxDrv_DEFS.solaris += VBOX_WITH_NATIVE_SOLARIS_LOADING
609 endif
610 ifdef VBOX_WITHOUT_NATIVE_R0_LOADER
611 VBoxDrv_DEFS.win += VBOX_WITHOUT_NATIVE_R0_LOADER
612 endif
613 ifdef VBOX_WITH_VISTA_NO_SP
614 VBoxDrv_DEFS.win += VBOX_WITH_VISTA_NO_SP
615 endif
616 ifdef VBOX_WITH_HARDENING
617 VBoxDrv_ASDEFS += VBOX_WITH_HARDENING
618 endif
619
620 VBoxDrv_INCS = . $(VBoxDrv_0_OUTDIR)
621 VBoxDrv_INCS.darwin = ./darwin
622 VBoxDrv_INCS.linux = $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
623
624 VBoxDrv_LIBS = $(PATH_STAGE_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
625 VBoxDrv_LIBS.linux.debug = $(VBoxDrv_LIBS) $(VBOX_GCC_LIBGCC)
626 VBoxDrv_LIBS.win = \
627 $(PATH_STAGE_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB) \
628 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/ntoskrnl.lib \
629 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/hal.lib
630
631 #VBoxDrv_LDFLAGS.darwin = -Wl,-sectcreate,__TEXT,__info_plist,$(VBoxDrv.kext_0_OUTDIR)/Info.plist
632 #VBoxDrv_LDFLAGS.darwin = -v -Wl,-whyload -Wl,-v -Wl,-whatsloaded
633 VBoxDrv_LDFLAGS.solaris += -N misc/ctf
634 ifdef VBOX_WITH_NATIVE_DTRACE
635 VBoxDrv_LDFLAGS.solaris += -N drv/dtrace
636 endif
637 VBoxDrv_LDFLAGS.win.x86 = -Entry:DriverEntry@8
638 VBoxDrv_LDFLAGS.win.amd64= -Entry:DriverEntry
639
640 VBoxDrv_SOURCES.darwin = \
641 darwin/SUPDrv-darwin.cpp
642 VBoxDrv_SOURCES.linux = \
643 linux/SUPDrv-linux.c
644 VBoxDrv_SOURCES.solaris = \
645 solaris/SUPDrv-solaris.c
646 VBoxDrv_SOURCES.win = \
647 win/SUPDrv-win.cpp \
648 win/SUPDrvA-win.asm \
649 win/VBoxDrv.rc
650 ifdef VBOX_WITH_HARDENING
651 VBoxDrv_SOURCES.win += \
652 win/SUPHardenedVerifyImage-win.cpp \
653 win/SUPHardenedVerifyProcess-win.cpp \
654 $(VBOX_SUP_WIN_CERTS_FILE)
655 endif
656 VBoxDrv_SOURCES = \
657 SUPDrv.d \
658 SUPDrv.c \
659 SUPDrvSem.c \
660 SUPDrvTracer.cpp \
661 SUPLibAll.cpp
662 ifdef VBOX_WITH_NATIVE_DTRACE
663 VBoxDrv_SOURCES += \
664 SUPDrv-dtrace.cpp
665 SUPDrv-dtrace.cpp_DEFS.darwin += VBOX_PATH_MACOSX_DTRACE_H=\"$(VBOX_PATH_MACOSX_SDK)/usr/include/sys/dtrace.h\"
666 endif
667 ifn1of ($(KBUILD_TARGET), linux freebsd)
668 VBoxDrv_SOURCES += \
669 SUPDrvTracerA.asm
670 endif
671 ifndef VBOX_LINUX_VERSION_2_4
672 VBoxDrv_SOURCES.linux += \
673 linux/SUPDrv-linux.mod.c
674 endif
675
676endif
677
678
679
680if1of ($(KBUILD_TARGET), darwin)
681 # Files necessary to make a darwin kernel extension bundle.
682 INSTALLS.darwin += VBoxDrv.kext
683 VBoxDrv.kext_INST = $(INST_VBOXDRV)Contents/
684 VBoxDrv.kext_SOURCES = $(VBoxDrv.kext_0_OUTDIR)/Contents/Info.plist
685 VBoxDrv.kext_CLEAN = $(VBoxDrv.kext_0_OUTDIR)/Contents/Info.plist
686 VBoxDrv.kext_BLDDIRS = $(VBoxDrv.kext_0_OUTDIR)/Contents/
687
688 $$(VBoxDrv.kext_0_OUTDIR)/Contents/Info.plist: \
689 $(PATH_SUB_CURRENT)/darwin/Info.plist \
690 $(VBOX_VERSION_MK) | $$(dir $$@)
691 $(call MSG_GENERATE,VBoxDrv,$@,$<)
692 $(QUIET)$(RM) -f $@
693 $(QUIET)$(SED) \
694 -e 's/@VBOX_VERSION_STRING@/$(if !defined(VBOX_MAVERICS_CODE_SIGNING_HACK),$(VBOX_VERSION_STRING),4.2.51)/g' \
695 -e 's/@VBOX_VERSION_MAJOR@/$(if !defined(VBOX_MAVERICS_CODE_SIGNING_HACK),$(VBOX_VERSION_MAJOR),4)/g' \
696 -e 's/@VBOX_VERSION_MINOR@/$(if !defined(VBOX_MAVERICS_CODE_SIGNING_HACK),$(VBOX_VERSION_MINOR),2)/g' \
697 -e 's/@VBOX_VERSION_BUILD@/$(if !defined(VBOX_MAVERICS_CODE_SIGNING_HACK),$(VBOX_VERSION_BUILD),51)/g' \
698 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
699 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
700 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
701 --output $@ \
702 $<
703
704 $(evalcall2 VBOX_TEST_SIGN_KEXT,VBoxDrv)
705endif
706
707
708if1of ($(KBUILD_TARGET), darwin solaris)
709 # Common manual loader script.
710 INSTALLS += SUPDrvScripts
711 SUPDrvScripts_INST = $(INST_DIST)
712 SUPDrvScripts_EXEC_SOURCES = \
713 $(KBUILD_TARGET)/load.sh
714endif
715
716
717if1of ($(KBUILD_TARGET), linux)
718 #
719 # Targets for installing the linux sources.
720 #
721 vboxdrv-mod_INST = bin/src/vboxdrv/
722 vboxdrv-mod_SOURCES = \
723 $(subst $(DQUOTE),,$(FILES_VBOXDRV_NOBIN)) \
724 $(vboxdrv-mod_0_OUTDIR)/Makefile
725 vboxdrv-mod_EXEC_SOURCES = \
726 $(subst $(DQUOTE),,$(FILES_VBOXDRV_BIN)) \
727 $(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers
728 vboxdrv-mod_CLEAN = \
729 $(vboxdrv-mod_0_OUTDIR)/Makefile \
730 $(PATH_TARGET)/vboxdrv-mod-1.dep \
731
732 # Scripts needed for building the kernel modules
733 includedep $(PATH_TARGET)/vboxdrv-mod-1.dep
734 $$(vboxdrv-mod_0_OUTDIR)/Makefile: \
735 $(PATH_SUB_CURRENT)/linux/Makefile \
736 $$(if $$(eq $$(Support/linux/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
737 | $$(dir $$@)
738 $(call MSG_TOOL,Creating,,$@)
739 ifndef VBOX_WITH_HARDENING
740 $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
741 else
742 $(QUIET)$(CP) -f $< $@
743 endif
744 %$(QUIET2)$(APPEND) -t '$(PATH_TARGET)/vboxdrv-mod-1.dep' 'Support/linux/Makefile_VBOX_HARDENED=$(VBOX_WITH_HARDENING)'
745endif # real linux
746
747
748ifeq ($(KBUILD_TARGET), win)
749 INSTALLS.win += VBoxDrv-inf
750 VBoxDrv-inf_INST = $(INST_BIN)
751 VBoxDrv-inf_MODE = a+r,u+w
752 VBoxDrv-inf_SOURCES = \
753 $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.inf
754 VBoxDrv-inf_CLEAN = $(VBoxDrv-inf_SOURCES)
755 VBoxDrv-inf_BLDDIRS = $(PATH_TARGET)/VBoxDrvCat.dir
756
757 $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.inf: $(PATH_SUB_CURRENT)/win/VBoxDrv.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
758 $(call MSG_GENERATE,VBoxDrv-inf,$@,$<)
759 $(call VBOX_EDIT_INF_FN,$<,$@)
760
761 ifdef VBOX_SIGNING_MODE
762 VBoxDrv-inf_SOURCES += \
763 $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.sys \
764 $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.cat
765
766 $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.sys: $$(VBoxDrv_1_TARGET) | $$(dir $$@)
767 $(INSTALL) -m 644 $< $(@D)
768
769 $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.cat: \
770 $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.inf \
771 $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.sys
772 $(call MSG_TOOL,Inf2Cat,VBoxDrv-inf,$@,$<)
773 $(call VBOX_MAKE_CAT_FN, $(@D),$@)
774 endif # signing
775endif # win
776
777
778endif # !VBOX_ONLY_DOCS && !VBOX_ONLY_EXTPACKS && !VBOX_ONLY_VALIDATIONKIT
779include $(FILE_KBUILD_SUB_FOOTER)
780
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette