VirtualBox

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

Last change on this file since 64088 was 63499, checked in by vboxsync, 8 years ago

Better way of dealing with unused sizes in bin2c output.

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

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