VirtualBox

source: vbox/trunk/src/VBox/Runtime/Makefile.kmk@ 108029

Last change on this file since 108029 was 108029, checked in by vboxsync, 3 weeks ago

Runtime/RTAcpi: Some more work on the ASL -> AML compiler, can process our vbox-standard.dsl now, bugref:10733

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 168.7 KB
Line 
1# $Id: Makefile.kmk 108029 2025-02-03 15:58:01Z vboxsync $
2## @file
3# Sub-Makefile for the IPRT.
4#
5
6#
7# Copyright (C) 2006-2024 Oracle and/or its affiliates.
8#
9# This file is part of VirtualBox base platform packages, as
10# available from https://www.virtualbox.org.
11#
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#
25# The contents of this file may alternatively be used under the terms
26# of the Common Development and Distribution License Version 1.0
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
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#
34# SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
35#
36
37SUB_DEPTH = ../../..
38include $(KBUILD_PATH)/subheader.kmk
39
40ifdef VBOX_ONLY_SDK
41 # Required for xpidl
42 LIBRARIES += RuntimeBldProg
43else ifdef VBOX_ONLY_ADDITIONS
44 #
45 # Only build the additions, sort out the legacy names first.
46 #
47 LIBRARIES += RuntimeGuestR3 RuntimeGuestR3Shared
48 LIBRARIES.win += RuntimeR3NoCrt
49 LIBRARIES.win.amd64 += RuntimeGuestR3-x86 RuntimeGuestR3Shared-x86
50 LIBRARIES.win.arm64 += RuntimeGuestR3Shared-x86
51 ifdef VBOX_WITH_ADDITION_DRIVERS
52 LIBRARIES += RuntimeGuestR0
53 #LIBRARIES.os2 += RuntimeGuestR0OS2Warp3
54 endif
55 ifndef VBOX_ONLY_ADDITIONS_WITHOUT_RTISOMAKER
56 LIBRARIES += RuntimeBldProg
57 include $(PATH_SUB_CURRENT)/tools/Makefile.kmk
58 endif
59
60else ifdef VBOX_ONLY_VALIDATIONKIT
61 #
62 # Only build the Validation Kit.
63 #
64 LIBRARIES += RuntimeGuestR3 RuntimeGuestR3Shared RuntimeR3 RuntimeBldProg
65 ifdef VBOX_WITH_R0_MODULES
66 LIBRARIES += RuntimeR0
67 endif
68 LIBRARIES.solaris += RuntimeR0Stub
69 LIBRARIES.win += RuntimeR0Stub #RuntimeR3NoCrt
70 ifndef VBOX_WITH_NOCRT_STATIC
71 LIBRARIES.win.x86 += RuntimeR3VccTricks
72 endif
73 include $(PATH_SUB_CURRENT)/tools/Makefile.kmk
74 ifdef VBOX_WITH_VALIDATIONKIT_UNITTESTS_PACKING
75 include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
76 endif
77else ifdef VBOX_ONLY_DOCS
78 #
79 # Build docs only - need just regular R3 runtime.
80 #
81 LIBRARIES += RuntimeR3 RuntimeBldProg
82 include $(PATH_SUB_CURRENT)/tools/Makefile.kmk
83
84else ifdef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
85 #
86 # Build extension packs using import libraries as much as possible (VBoxDTrace
87 # needs Ring-0 IPRT, though).
88 #
89 LIBRARIES += RuntimeBldProg
90 ifdef VBOX_WITH_R0_MODULES
91 LIBRARIES += RuntimeR0
92 endif
93 LIBRARIES.solaris += RuntimeR0Stub
94 LIBRARIES.win += RuntimeR0Stub
95 ifdef VBOX_WITH_RAW_MODE
96 LIBRARIES.win += RuntimeRCStub
97 endif
98 ifneq ($(VBOX_LIB_RUNTIME_STATIC),$(VBOX_LIB_RUNTIME_STATIC_NO_ASAN))
99 LIBRARIES += RuntimeR3NoAsan
100 else
101 LIBRARIES += RuntimeR3
102 endif
103 include $(PATH_SUB_CURRENT)/tools/Makefile.kmk
104
105else # !VBOX_ONLY_ADDITIONS && !VBOX_ONLY_VALIDATIONKIT && !VBOX_ONLY_DOCS
106
107 #
108 # Normal build.
109 #
110 ifndef VBOX_ONLY_EXTPACKS
111 include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
112 endif
113 include $(PATH_SUB_CURRENT)/tools/Makefile.kmk
114
115 BLDPROGS += uniread
116 LIBRARIES += RuntimeR3 RuntimeBldProg RuntimeEFCPP
117 ifdef VBOX_WITH_R0_MODULES
118 LIBRARIES += RuntimeR0
119 endif
120 LIBRARIES.solaris += RuntimeR0Stub
121 LIBRARIES.win += RuntimeR0Stub
122 LIBRARIES.win.x86 += RuntimeR3NoCrt
123 LIBRARIES.win.amd64 += RuntimeR3NoCrt
124 LIBRARIES.win.arm64 += RuntimeR3NoCrt
125 ifndef VBOX_WITH_PARFAIT
126 LIBRARIES.win.amd64 += RuntimeR3-x86
127 endif
128 ifdef VBOX_WITH_RAW_MODE
129 LIBRARIES += RuntimeRC
130 LIBRARIES.win += RuntimeRCStub
131 endif
132 ifdef VBOX_WITH_VBOXDRV
133 LIBRARIES += RuntimeR0Drv
134 endif
135 ifdef VBOX_WITH_ADDITIONS
136 LIBRARIES += RuntimeGuestR3 RuntimeGuestR3Shared
137 LIBRARIES.win.amd64 += RuntimeGuestR3-x86 RuntimeGuestR3Shared-x86
138 LIBRARIES.win.arm64 += RuntimeGuestR3Shared-x86
139 ifdef VBOX_WITH_ADDITION_DRIVERS
140 LIBRARIES += RuntimeGuestR0
141 endif
142 #LIBRARIES.os2 += RuntimeGuestR0OS2Warp3
143 endif # VBOX_WITH_ADDITIONS
144 ifndef VBOX_WITH_NOCRT_STATIC
145 LIBRARIES.win.x86 += RuntimeR3VccTricks
146 endif
147 ifneq ($(VBOX_LIB_RUNTIME_STATIC),$(VBOX_LIB_RUNTIME_STATIC_NO_ASAN))
148 LIBRARIES += RuntimeR3NoAsan
149 endif
150 DLLS += VBoxRT
151 ifdef VBOX_WITH_32_ON_64_MAIN_API
152 DLLS += VBoxRT-x86
153 endif
154endif
155
156
157# Always build the ntdll import libraries on windows.
158LIBRARIES.win += RuntimeR3NtDll-x86
159if1of (amd64, $(KBUILD_TARGET_ARCH) $(KBUILD_HOST_ARCH))
160 LIBRARIES.win += RuntimeR3NtDll-amd64
161endif
162if1of (arm64, $(KBUILD_TARGET_ARCH) $(KBUILD_HOST_ARCH))
163 LIBRARIES.win += RuntimeR3NtDll-arm64
164endif
165
166
167# Always build the import library.
168IMPORT_LIBS += VBoxRTImp
169
170
171# Where the generated stuff goes.
172IPRT_OUT_DIR := $(PATH_TARGET)/Runtime
173BLDDIRS += $(IPRT_OUT_DIR)
174OTHER_CLEAN += \
175 $(IPRT_OUT_DIR)/errmsgdata.h \
176 $(IPRT_OUT_DIR)/errmsgwindata.h \
177 $(IPRT_OUT_DIR)/errmsgwindata-sorted.h \
178 $(IPRT_OUT_DIR)/errmsgwindata-sorted.h.ts \
179 $(IPRT_OUT_DIR)/errmsgvboxcomdata.h \
180 $(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts \
181 $(IPRT_OUT_DIR)/odi2name.h \
182 $(IPRT_OUT_DIR)/odi2name.h.ts \
183 $(IPRT_DOXYFILE_OUTPUT)/Doxyfile.iprt \
184 $(IPRT_DOXYFILE_OUTPUT)/Doxyfile.iprt.dep \
185 $(IPRT_DOXYFILE_OUTPUT)/docs.iprt
186
187
188#
189# Globals
190#
191VBOX_PATH_RUNTIME_SRC := $(PATH_SUB_CURRENT)
192
193
194#
195# Set the defines that buildconfig.cpp needs. Its used by several targets.
196#
197common/misc/buildconfig.cpp_DEFS = \
198 IPRT_BLDCFG_SCM_REV=$(VBOX_SVN_REV) \
199 IPRT_BLDCFG_VERSION_MAJOR=$(VBOX_VERSION_MAJOR) \
200 IPRT_BLDCFG_VERSION_MINOR=$(VBOX_VERSION_MINOR) \
201 IPRT_BLDCFG_VERSION_BUILD=$(VBOX_VERSION_BUILD)
202ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
203 common/misc/buildconfig.cpp_DEFS += \
204 IPRT_BLDCFG_VERSION_STRING="$(VBOX_VERSION_STRING)" \
205 IPRT_BLDCFG_TARGET="$(KBUILD_TARGET)" \
206 IPRT_BLDCFG_TARGET_ARCH="$(KBUILD_TARGET_ARCH)" \
207 IPRT_BLDCFG_TYPE="$(KBUILD_TYPE)"
208else
209 common/misc/buildconfig.cpp_DEFS += \
210 IPRT_BLDCFG_VERSION_STRING=\"$(VBOX_VERSION_STRING)\" \
211 IPRT_BLDCFG_TARGET=\"$(KBUILD_TARGET)\" \
212 IPRT_BLDCFG_TARGET_ARCH=\"$(KBUILD_TARGET_ARCH)\" \
213 IPRT_BLDCFG_TYPE=\"$(KBUILD_TYPE)\"
214endif
215
216#
217# OID to C table conversion program.
218#
219BLDPROGS += oiddb2c
220oiddb2c_TEMPLATE = VBoxBldProg
221oiddb2c_SOURCES = common/asn1/oiddb2c.cpp
222
223common/asn1/asn1-dump.cpp_DEPS = $(IPRT_OUT_DIR)/oiddb.h
224common/asn1/asn1-dump.cpp_INCS = $(IPRT_OUT_DIR)
225OTHER_CLEAN += $(IPRT_OUT_DIR)/oiddb.h $(IPRT_OUT_DIR)/oiddb.h.ts
226
227$(IPRT_OUT_DIR)/oiddb.h.ts +| $(IPRT_OUT_DIR)/oiddb.h: \
228 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/oiddb.cfg \
229 $(VBOX_EXTRA_OID_CFG_FILES) \
230 $$(oiddb2c_1_TARGET) \
231 | $$(dir $$@)
232 $(call MSG_GENERATE,,$@,$(filter %.xidl,$^))
233 $(QUIET)$(oiddb2c_1_TARGET) "$@" $(filter %.cfg,$^)
234 $(QUIET)$(CP) --changed -fv "$@" "$(IPRT_OUT_DIR)/oiddb.h"
235
236
237#
238# Unicode Specification reader used to regenerate unidata-*.cpp.
239#
240uniread_TEMPLATE = VBoxBldProg
241uniread_SOURCES = common/string/uniread.cpp
242uniread_INCS = include
243
244#
245# Win64 assembly sources.
246#
247RuntimeWin64ASM_SOURCES = \
248 win/amd64/ASMAtomicBitClear.asm \
249 win/amd64/ASMAtomicBitTestAndToggle.asm \
250 win/amd64/ASMAtomicBitToggle.asm \
251 win/amd64/ASMAtomicReadU64.asm \
252 win/amd64/ASMAtomicXchgU8.asm \
253 win/amd64/ASMGetCS.asm \
254 win/amd64/ASMGetDS.asm \
255 win/amd64/ASMGetES.asm \
256 common/asm/ASMGetFlags.asm \
257 win/amd64/ASMGetFS.asm \
258 win/amd64/ASMGetGS.asm \
259 win/amd64/ASMGetSS.asm \
260 win/amd64/ASMProbeReadByte.asm \
261 common/asm/ASMSetFlags.asm \
262 common/asm/ASMAddFlags.asm \
263 win/amd64/ASMGetDR0.asm \
264 win/amd64/ASMGetDR1.asm \
265 win/amd64/ASMGetDR2.asm \
266 win/amd64/ASMGetDR3.asm \
267 win/amd64/ASMGetDR6.asm \
268 win/amd64/ASMGetDR7.asm \
269 common/asm/ASMAtomicCmpXchgU8.asm \
270 common/asm/ASMAtomicCmpXchgU16.asm \
271 common/asm/ASMAtomicXchgU16.asm \
272 common/asm/ASMBitFirstClear.asm \
273 common/asm/ASMBitFirstSet.asm \
274 common/asm/ASMBitNextClear.asm \
275 common/asm/ASMBitNextSet.asm \
276 common/asm/ASMMultU32ByU32DivByU32.asm \
277 common/asm/ASMMultU64ByU32DivByU32.asm \
278 common/asm/ASMCpuId_Idx_ECX.asm \
279 common/asm/ASMNopPause.asm \
280 common/asm/ASMGetIDTR.asm \
281 common/asm/ASMGetIdtrLimit.asm \
282 common/asm/ASMSetIDTR.asm \
283 common/asm/ASMGetGDTR.asm \
284 common/asm/ASMSetGDTR.asm \
285 common/asm/ASMGetLDTR.asm \
286 common/asm/ASMGetSegAttr.asm \
287 common/asm/ASMGetFSBase.asm \
288 common/asm/ASMSetFSBase.asm \
289 common/asm/ASMGetGSBase.asm \
290 common/asm/ASMSetGSBase.asm \
291 common/asm/ASMGetTR.asm
292
293#
294# Win32 assembly sources.
295#
296RuntimeWin32ASM_SOURCES = \
297 common/asm/ASMAtomicCmpXchgU8.asm \
298 common/asm/ASMAtomicCmpXchgU16.asm \
299 common/asm/ASMAtomicXchgU16.asm \
300 common/asm/ASMMultU32ByU32DivByU32.asm \
301 common/asm/ASMMultU64ByU32DivByU32.asm \
302 common/asm/ASMCpuId_Idx_ECX.asm \
303 common/asm/ASMGetSegAttr.asm
304
305
306#
307# NoCRT sources (minus math stuff).
308#
309if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
310 RuntimeNoCrt_SOURCES = \
311 common/misc/setjmp.asm \
312 common/string/bzero.asm \
313 common/string/memchr.asm \
314 common/string/memcmp.asm \
315 common/string/memcpy.asm \
316 common/string/mempcpy.asm \
317 common/string/memmove.asm \
318 common/string/memset.asm \
319 common/string/strchr.asm \
320 common/string/strcpy.asm \
321 common/string/strncpy.asm \
322 common/string/strcmp.asm \
323 common/string/strlen.asm
324else if1of ($(KBUILD_TARGET_ARCH), arm64)
325 RuntimeNoCrt_SOURCES = \
326 common/string/bzero.cpp \
327 common/string/memchr.cpp \
328 common/string/memcmp.cpp \
329 common/string/memcpy.cpp \
330 common/string/mempcpy.cpp \
331 common/string/memmove.cpp \
332 common/string/memset.cpp \
333 common/string/strchr.cpp \
334 common/string/strcpy.cpp \
335 common/string/strncpy.cpp \
336 common/string/strcmp.cpp \
337 common/string/strlen.cpp
338endif
339
340
341#
342# RuntimeBaseR3 - Commmon Base Runtime Target for Ring-3 executables.
343#
344# Note! This is not make itself, it's only used as a base target config to be
345# inherited from by RuntimeR3(.lib) and VBoxR3(.dll).
346#
347RuntimeBaseR3_TEMPLATE = VBoxR3Static
348RuntimeBaseR3_SDKS = VBoxLibXml2
349RuntimeBaseR3_SDKS.win = $(VBOX_WINPSDK) $(VBOX_WINDDK)
350RuntimeBaseR3_DEFS = \
351 IN_RT_R3 \
352 LDR_WITH_NATIVE \
353 LDR_WITH_ELF32 \
354 LDR_WITH_LX \
355 LDR_WITH_MACHO \
356 LDR_WITH_PE \
357 RT_WITH_VBOX \
358 RT_NO_GIP \
359 RT_WITHOUT_NOCRT_WRAPPERS \
360 NOFILEID
361if1of ($(KBUILD_TARGET_ARCH), amd64 x86 arm64)
362 RuntimeBaseR3_DEFS += \
363 IN_SUP_R3
364endif
365#RuntimeBaseR3_DEFS += RTMEM_WRAP_TO_EF_APIS
366ifdef IPRT_WITH_LZJB
367 RuntimeBaseR3_DEFS += RTZIP_USE_LZJB
368endif
369ifdef IPRT_WITH_LZO
370 RuntimeBaseR3_DEFS += RTZIP_USE_LZO
371endif
372ifdef VBOX_WITH_LIBLZMA
373 RuntimeBaseR3_DEFS += IPRT_WITH_LZMA
374 RuntimeBaseR3_SDKS += VBoxLibLzma
375endif
376ifn1of ($(KBUILD_TARGET), win)
377 RuntimeBaseR3_DEFS += RT_WITH_ICONV_CACHE
378endif
379ifdef IPRT_WITH_FUTEX_BASED_SEMS
380 RuntimeBaseR3_DEFS.linux += IPRT_WITH_FUTEX_BASED_SEMS
381endif
382ifdef IPRT_HTTP_WITH_WEBDAV
383 RuntimeBaseR3_DEFS += IPRT_HTTP_WITH_WEBDAV
384endif
385ifdef IPRT_WITHOUT_PAM
386 RuntimeBaseR3_DEFS += IPRT_WITHOUT_PAM
387endif
388RuntimeBaseR3_INCS = \
389 include \
390 $(SDK_VBoxZlib_INCS) \
391 $(SDK_VBoxLzf_INCS)
392
393# RuntimeBaseR3_INCS.solaris = \
394# /usr/include
395
396RuntimeBaseR3_SOURCES := \
397 common/acpi/acpi.cpp \
398 common/acpi/acpi-ast.cpp \
399 common/acpi/acpi-compiler.cpp \
400 common/acpi/acpi-decompiler.cpp \
401 common/alloc/alloc.cpp \
402 common/alloc/heapsimple.cpp \
403 common/alloc/heapoffset.cpp \
404 common/alloc/memcache.cpp \
405 common/alloc/memtracker.cpp \
406 common/asn1/asn1-basics.cpp \
407 common/asn1/asn1-cursor.cpp \
408 common/asn1/asn1-default-allocator.cpp \
409 common/asn1/asn1-efence-allocator.cpp \
410 common/asn1/asn1-safer-allocator.cpp \
411 common/asn1/asn1-dump.cpp \
412 common/asn1/asn1-encode.cpp \
413 common/asn1/asn1-ut-bitstring.cpp \
414 common/asn1/asn1-ut-bitstring-decode.cpp \
415 common/asn1/asn1-ut-boolean.cpp \
416 common/asn1/asn1-ut-boolean-decode.cpp \
417 common/asn1/asn1-ut-core.cpp \
418 common/asn1/asn1-ut-core-decode.cpp \
419 common/asn1/asn1-ut-dyntype.cpp \
420 common/asn1/asn1-ut-dyntype-decode.cpp \
421 common/asn1/asn1-ut-integer.cpp \
422 common/asn1/asn1-ut-integer-decode.cpp \
423 common/asn1/asn1-ut-null.cpp \
424 common/asn1/asn1-ut-null-decode.cpp \
425 common/asn1/asn1-ut-objid.cpp \
426 common/asn1/asn1-ut-objid-decode.cpp \
427 common/asn1/asn1-ut-octetstring.cpp \
428 common/asn1/asn1-ut-octetstring-decode.cpp \
429 common/asn1/asn1-ut-string.cpp \
430 common/asn1/asn1-ut-string-decode.cpp \
431 common/asn1/asn1-ut-time.cpp \
432 common/asn1/asn1-ut-time-decode.cpp \
433 common/checksum/adler32.cpp \
434 common/checksum/crc32.cpp \
435 common/checksum/crc32c.cpp \
436 common/checksum/crc64.cpp \
437 common/checksum/crc16ccitt.cpp \
438 common/checksum/alt-md2.cpp \
439 common/checksum/alt-md4.cpp \
440 common/checksum/alt-md5.cpp \
441 common/checksum/alt-sha1.cpp \
442 common/checksum/alt-sha256.cpp \
443 common/checksum/alt-sha512.cpp \
444 common/checksum/alt-sha3.cpp \
445 common/checksum/md2str.cpp \
446 common/checksum/md4str.cpp \
447 common/checksum/md5str.cpp \
448 common/checksum/ipv4.cpp \
449 common/checksum/ipv6.cpp \
450 common/checksum/manifest.cpp \
451 common/checksum/manifest2.cpp \
452 common/checksum/manifest3.cpp \
453 common/checksum/manifest-file.cpp \
454 common/checksum/RTSha1Digest.cpp \
455 common/checksum/RTSha256Digest.cpp \
456 common/checksum/sha1str.cpp \
457 common/checksum/sha224str.cpp \
458 common/checksum/sha256str.cpp \
459 common/checksum/sha384str.cpp \
460 common/checksum/sha512str.cpp \
461 common/checksum/sha512t224str.cpp \
462 common/checksum/sha512t256str.cpp \
463 common/crypto/cipher-openssl.cpp \
464 common/crypto/digest-core.cpp \
465 common/crypto/digest-builtin.cpp \
466 common/crypto/digest-vfs.cpp \
467 common/crypto/iprt-openssl.cpp \
468 common/crypto/key.cpp \
469 common/crypto/key-file.cpp \
470 common/crypto/key-openssl.cpp \
471 common/crypto/key-create-rsa-openssl.cpp \
472 common/crypto/rc4-openssl.cpp \
473 common/crypto/rsa-asn1-decoder.cpp \
474 common/crypto/rsa-core.cpp \
475 common/crypto/rsa-init.cpp \
476 common/crypto/rsa-sanity.cpp \
477 common/crypto/pemfile-read.cpp \
478 common/crypto/pemfile-write.cpp \
479 common/crypto/pkcs7-asn1-decoder.cpp \
480 common/crypto/pkcs7-core.cpp \
481 common/crypto/pkcs7-file.cpp \
482 common/crypto/pkcs7-init.cpp \
483 common/crypto/pkcs7-sanity.cpp \
484 common/crypto/pkcs7-sign.cpp \
485 common/crypto/pkcs7-verify.cpp \
486 common/crypto/pkcs8-asn1-decoder.cpp \
487 common/crypto/pkcs8-core.cpp \
488 common/crypto/pkcs8-init.cpp \
489 common/crypto/pkcs8-sanity.cpp \
490 common/crypto/pkix-sign.cpp \
491 common/crypto/pkix-signature-builtin.cpp \
492 common/crypto/pkix-signature-core.cpp \
493 common/crypto/pkix-signature-rsa.cpp \
494 common/crypto/pkix-signature-ossl.cpp \
495 common/crypto/pkix-util.cpp \
496 common/crypto/pkix-verify.cpp \
497 common/crypto/shacrypt.cpp \
498 common/crypto/spc-asn1-decoder.cpp \
499 common/crypto/spc-core.cpp \
500 common/crypto/spc-init.cpp \
501 common/crypto/spc-sanity.cpp \
502 common/crypto/ssl-openssl.cpp \
503 common/crypto/x509-asn1-decoder.cpp \
504 common/crypto/x509-certpaths.cpp \
505 common/crypto/x509-core.cpp \
506 common/crypto/x509-create-sign.cpp \
507 common/crypto/x509-file.cpp \
508 common/crypto/x509-init.cpp \
509 common/crypto/x509-sanity.cpp \
510 common/crypto/x509-verify.cpp \
511 common/crypto/taf-asn1-decoder.cpp \
512 common/crypto/taf-core.cpp \
513 common/crypto/taf-init.cpp \
514 common/crypto/taf-sanity.cpp \
515 common/crypto/tsp-asn1-decoder.cpp \
516 common/crypto/tsp-core.cpp \
517 common/crypto/tsp-init.cpp \
518 common/crypto/tsp-sanity.cpp \
519 common/crypto/store.cpp \
520 common/crypto/store-inmem.cpp \
521 common/crypto/store-cert-add-basic.cpp \
522 common/crypto/RTCrPkcs5Pbkdf2Hmac-openssl.cpp \
523 common/crypto/RTCrRandBytes-openssl.cpp \
524 common/crypto/RTCrStoreCertAddFromJavaKeyStore.cpp \
525 common/crypto/RTCrStoreCertAddWantedFromFishingExpedition.cpp \
526 common/crypto/RTCrStoreCertExportAsPem.cpp \
527 common/crypto/RTCrStoreCreateSnapshotOfUserAndSystemTrustedCAsAndCerts.cpp \
528 common/dbg/dbg.cpp \
529 common/dbg/dbgas.cpp \
530 common/dbg/dbgcfg.cpp \
531 common/dbg/dbgmod.cpp \
532 common/dbg/dbgmodldr.cpp \
533 common/dbg/dbgmodcontainer.cpp \
534 common/dbg/dbgmoddeferred.cpp \
535 common/dbg/dbgmodexports.cpp \
536 common/dbg/dbgmodcodeview.cpp \
537 common/dbg/dbgmoddwarf.cpp \
538 common/dbg/dbgmodmapsym.cpp \
539 common/dbg/dbgmodnm.cpp \
540 common/dvm/dvm.cpp \
541 common/dvm/dvmbsdlabel.cpp \
542 common/dvm/dvmgpt.cpp \
543 common/dvm/dvmmbr.cpp \
544 common/dvm/dvmvfs.cpp \
545 common/efi/efiguid.cpp \
546 common/efi/efitime.cpp \
547 common/efi/efisignaturedb.cpp \
548 common/efi/efivarstorevfs.cpp \
549 common/err/errinfo.cpp \
550 common/err/errinfolog.cpp \
551 common/err/errinfo-alloc.cpp \
552 common/err/errmsg.cpp \
553 common/err/RTErrConvertFromErrno.cpp \
554 common/err/RTErrConvertToErrno.cpp \
555 common/fs/extvfs.cpp \
556 common/fs/fatvfs.cpp \
557 common/fs/isovfs.cpp \
558 common/fs/isomaker.cpp \
559 common/fs/isomakercmd.cpp \
560 common/fs/isomakerimport.cpp \
561 common/fs/ntfsvfs.cpp \
562 common/fs/pdbvfs.cpp \
563 common/fs/RTFsCmdLs.cpp \
564 common/ioqueue/ioqueuebase.cpp \
565 common/ioqueue/ioqueue-stdfile-provider.cpp \
566 common/ldr/ldr.cpp \
567 common/ldr/ldrELF.cpp \
568 common/ldr/ldrEx.cpp \
569 common/ldr/ldrFile.cpp \
570 common/ldr/ldrVfsFile.cpp \
571 common/ldr/ldrLX.cpp \
572 common/ldr/ldrMachO.cpp \
573 common/ldr/ldrMemory.cpp \
574 common/ldr/ldrNative.cpp \
575 common/ldr/ldrPE.cpp \
576 common/log/log.cpp \
577 common/log/log-weak.cpp \
578 common/log/log-weak-assert.cpp \
579 common/log/log-weak-rel.cpp \
580 common/log/logellipsis.cpp \
581 common/log/logrel.cpp \
582 common/log/logrelellipsis.cpp \
583 common/log/logcom.cpp \
584 common/log/logformat.cpp \
585 common/log/tracebuf.cpp \
586 common/log/tracedefault.cpp \
587 common/log/tracelogreader.cpp \
588 common/log/tracelogwriter.cpp \
589 common/log/RTLogCreateEx.cpp \
590 common/math/bignum.cpp \
591 common/misc/RTArchValToString.cpp \
592 common/misc/RTAssertMsg1Weak.cpp \
593 common/misc/RTAssertMsg2.cpp \
594 common/misc/RTAssertMsg2Add.cpp \
595 common/misc/RTAssertMsg2AddWeak.cpp \
596 common/misc/RTAssertMsg2AddWeakV.cpp \
597 common/misc/RTAssertMsg2Weak.cpp \
598 common/misc/RTAssertMsg2WeakV.cpp \
599 common/misc/RTFileModeToFlags.cpp \
600 common/misc/RTFileOpenF.cpp \
601 common/misc/RTFileOpenV.cpp \
602 common/misc/RTMemWipeThoroughly.cpp \
603 common/misc/RTSystemFirmwareTypeName.cpp \
604 common/misc/assert.cpp \
605 common/misc/buildconfig.cpp \
606 common/misc/cidr.cpp \
607 common/misc/expreval.cpp \
608 common/misc/fdt.cpp \
609 common/misc/getopt.cpp \
610 common/misc/getoptargv.cpp \
611 common/misc/handle.cpp \
612 common/misc/handletable.cpp \
613 common/misc/handletablectx.cpp \
614 common/misc/handletablesimple.cpp \
615 common/misc/inifile.cpp \
616 common/misc/json.cpp \
617 common/misc/lockvalidator.cpp \
618 common/misc/message.cpp \
619 common/misc/messagerefentry.cpp \
620 common/misc/once.cpp \
621 common/misc/req.cpp \
622 common/misc/reqpool.cpp \
623 common/misc/reqqueue.cpp \
624 common/misc/sanity-c.c \
625 common/misc/sanity-cpp.cpp \
626 common/misc/semspingpong.cpp \
627 common/misc/sg.cpp \
628 common/misc/circbuf.cpp \
629 common/misc/thread.cpp \
630 common/misc/term.cpp \
631 common/misc/uri.cpp \
632 common/net/netaddrstr2.cpp \
633 common/net/macstr.cpp \
634 common/path/rtPathRootSpecLen.cpp \
635 common/path/rtPathVolumeSpecLen.cpp \
636 common/path/RTPathAbsDup.cpp \
637 common/path/RTPathAbsEx.cpp \
638 common/path/RTPathAbsExDup.cpp \
639 common/path/RTPathAppend.cpp \
640 common/path/RTPathAppendEx.cpp \
641 common/path/RTPathCalcRelative.cpp \
642 common/path/RTPathChangeToDosSlashes.cpp \
643 common/path/RTPathChangeToUnixSlashes.cpp \
644 common/path/RTPathCopyComponents.cpp \
645 common/path/RTPathCountComponents.cpp \
646 common/path/RTPathEnsureTrailingSeparator.cpp \
647 common/path/RTPathExt.cpp \
648 common/path/RTPathFilename.cpp \
649 common/path/RTPathFilenameUtf16.cpp \
650 common/path/RTPathFindCommon.cpp \
651 common/path/RTPathGlob.cpp \
652 common/path/RTPathHasExt.cpp \
653 common/path/RTPathHasPath.cpp \
654 common/path/RTPathJoin.cpp \
655 common/path/RTPathJoinA.cpp \
656 common/path/RTPathJoinEx.cpp \
657 common/path/RTPathParentLength.cpp \
658 common/path/RTPathParse.cpp \
659 common/path/RTPathParsedReassemble.cpp \
660 common/path/RTPathParseSimple.cpp \
661 common/path/RTPathPurgeFilename.cpp \
662 common/path/RTPathRealDup.cpp \
663 common/path/RTPathRmCmd.cpp \
664 common/path/RTPathSkipRootSpec.cpp \
665 common/path/RTPathSplit.cpp \
666 common/path/RTPathSplitA.cpp \
667 common/path/RTPathSplitReassemble.cpp \
668 common/path/RTPathStartsWithRoot.cpp \
669 common/path/RTPathStripExt.cpp \
670 common/path/RTPathStripFilename.cpp \
671 common/path/RTPathStripTrailingSlash.cpp \
672 common/path/RTPathTraverseList.cpp \
673 common/path/comparepaths.cpp \
674 common/rand/rand.cpp \
675 common/rand/randadv.cpp \
676 common/rand/randparkmiller.cpp \
677 common/sort/RTSortIsSorted.cpp \
678 common/sort/RTSortApvIsSorted.cpp \
679 common/sort/shellsort.cpp \
680 common/string/RTStrCat.cpp \
681 common/string/RTStrCatEx.cpp \
682 common/string/RTStrCatP.cpp \
683 common/string/RTStrCatPEx.cpp \
684 common/string/RTStrCmp.cpp \
685 common/string/RTStrCopy.cpp \
686 common/string/RTStrCopyEx.cpp \
687 common/string/RTStrCopyP.cpp \
688 common/string/RTStrCopyPEx.cpp \
689 common/string/RTStrNCmp.cpp \
690 common/string/RTStrNLen.cpp \
691 common/string/RTStrNLenEx.cpp \
692 common/string/RTStrPrintHexBytes.cpp \
693 common/string/RTStrStartsWith.cpp \
694 common/string/RTStrIStartsWith.cpp \
695 common/string/RTStrICmpAscii.cpp \
696 common/string/RTStrNICmpAscii.cpp \
697 common/string/RTStrSplit.cpp \
698 common/string/RTStrStr.cpp \
699 common/string/RTUtf16Copy.cpp \
700 common/string/RTUtf16CopyAscii.cpp \
701 common/string/RTUtf16CopyEx.cpp \
702 common/string/RTUtf16Cat.cpp \
703 common/string/RTUtf16CatAscii.cpp \
704 common/string/RTUtf16Chr.cpp \
705 common/string/RTUtf16CmpAscii.cpp \
706 common/string/RTUtf16ICmpAscii.cpp \
707 common/string/RTUtf16End.cpp \
708 common/string/RTUtf16NCmp.cpp \
709 common/string/RTUtf16NCmpAscii.cpp \
710 common/string/RTUtf16NCmpUtf8.cpp \
711 common/string/RTUtf16NICmpAscii.cpp \
712 common/string/RTUtf16FindAscii.cpp \
713 common/string/RTUtf16NLen.cpp \
714 common/string/RTUtf16NLenEx.cpp \
715 common/string/RTUtf16PrintHexBytes.cpp \
716 common/string/base64.cpp \
717 common/string/base64-utf16.cpp \
718 common/string/simplepattern.cpp \
719 common/string/straprintf.cpp \
720 common/string/strformat.cpp \
721 common/string/RTStrFormat.cpp \
722 common/string/strformatfloat.cpp \
723 common/string/strformatnum.cpp \
724 common/string/strformatrt.cpp \
725 common/string/strformattype.cpp \
726 common/string/strhash1.cpp \
727 common/string/stringalloc.cpp \
728 common/string/strprintf.cpp \
729 common/string/strprintf-ellipsis.cpp \
730 common/string/strprintf2.cpp \
731 common/string/strprintf2-ellipsis.cpp \
732 common/string/strcache.cpp \
733 common/string/strspace.cpp \
734 common/string/strstrip.cpp \
735 common/string/strtofloat.cpp \
736 common/string/strtonum.cpp \
737 common/string/strversion.cpp \
738 common/string/uni.cpp \
739 common/string/unidata-flags.cpp \
740 common/string/unidata-lower.cpp \
741 common/string/unidata-upper.cpp \
742 common/string/utf-16.cpp \
743 common/string/utf-16-case.cpp \
744 common/string/utf-16-latin-1.cpp \
745 common/string/utf-16-printf.cpp \
746 common/string/utf-8.cpp \
747 common/string/utf-8-case.cpp \
748 common/string/utf-8-case2.cpp \
749 common/string/ministring.cpp \
750 common/table/avlgcptr.cpp \
751 common/table/avlhcphys.cpp \
752 common/table/avlgcphys.cpp \
753 common/table/avllu32.cpp \
754 common/table/avlou32.cpp \
755 common/table/avlogcphys.cpp \
756 common/table/avlogcptr.cpp \
757 common/table/avlohcphys.cpp \
758 common/table/avloioport.cpp \
759 common/table/avlpv.cpp \
760 common/table/avlrgcptr.cpp \
761 common/table/avlrogcphys.cpp \
762 common/table/avlrogcptr.cpp \
763 common/table/avlroioport.cpp \
764 common/table/avlroogcptr.cpp \
765 common/table/avlrpv.cpp \
766 common/table/avlruintptr.cpp \
767 common/table/avlrfoff.cpp \
768 common/table/avlru64.cpp \
769 common/table/avlu32.cpp \
770 common/table/avlu64.cpp \
771 common/table/avluintptr.cpp \
772 common/table/avlul.cpp \
773 common/table/table.cpp \
774 common/time/time.cpp \
775 common/time/timeprog.cpp \
776 common/time/timesup.cpp \
777 common/time/timezoneinfo.cpp \
778 common/time/RTTimeFormatDurationEx.cpp \
779 common/vfs/vfsbase.cpp \
780 common/vfs/vfschain.cpp \
781 common/vfs/vfsfss2dir.cpp \
782 common/vfs/vfsiosmisc.cpp \
783 common/vfs/vfsmemory.cpp \
784 common/vfs/vfsmisc.cpp \
785 common/vfs/vfsmount.cpp \
786 common/vfs/vfsmsg.cpp \
787 common/vfs/vfsprogress.cpp \
788 common/vfs/vfsreadahead.cpp \
789 common/vfs/vfsstddir.cpp \
790 common/vfs/vfsstdfile.cpp \
791 common/vfs/vfsstdpipe.cpp \
792 common/vfs/vfsprintf.cpp \
793 common/zip/cpiovfs.cpp \
794 common/zip/tarcmd.cpp \
795 common/zip/tarvfs.cpp \
796 common/zip/tarvfswriter.cpp \
797 common/zip/gzipvfs.cpp \
798 common/zip/gzipcmd.cpp \
799 common/zip/pkzip.cpp \
800 common/zip/pkzipvfs.cpp \
801 common/zip/unzipcmd.cpp \
802 common/zip/zip.cpp \
803 generic/createtemp-generic.cpp \
804 generic/critsect-generic.cpp \
805 generic/critsectrw-generic.cpp \
806 generic/env-generic.cpp \
807 generic/http.cpp \
808 generic/RTDirCreateUniqueNumbered-generic.cpp \
809 generic/RTEnvDupEx-generic.cpp \
810 generic/RTFileCopy-generic.cpp \
811 generic/RTFileCopyAttributes-generic.cpp \
812 generic/RTFileCopyEx-generic.cpp \
813 generic/RTFileCopyByHandlesEx-generic.cpp \
814 generic/RTFileCopyPart-generic.cpp \
815 generic/RTFileQuerySize-generic.cpp \
816 generic/RTFileReadAll-generic.cpp \
817 generic/RTFileReadAllEx-generic.cpp \
818 generic/RTFileReadAllByHandle-generic.cpp \
819 generic/RTFileReadAllByHandleEx-generic.cpp \
820 generic/RTFileReadAllFree-generic.cpp \
821 generic/RTLogWriteStdErr-generic.cpp \
822 generic/RTLogWriteStdOut-generic.cpp \
823 generic/RTLogWriteUser-generic.cpp \
824 generic/RTPathGetCurrentDrive-generic.cpp \
825 generic/RTPathIsSame-generic.cpp \
826 generic/RTProcSignalName-generic.cpp \
827 generic/RTTimerLRCreate-generic.cpp \
828 generic/rtStrFormatKernelAddress-generic.cpp \
829 generic/mempool-generic.cpp \
830 generic/semfastmutex-generic.cpp \
831 generic/semxroads-generic.cpp \
832 generic/spinlock-generic.cpp \
833 generic/timerlr-generic.cpp \
834 r3/alloc-ef.cpp \
835 r3/alloc.cpp \
836 r3/allocex.cpp \
837 r3/dir.cpp \
838 r3/dir2.cpp \
839 r3/fileio.cpp \
840 r3/fs.cpp \
841 r3/ftp-server.cpp \
842 r3/http-server.cpp \
843 r3/init.cpp \
844 r3/init-data.cpp \
845 r3/process-data.cpp \
846 r3/memsafer-r3.cpp \
847 r3/path.cpp \
848 r3/RTPathTemp.cpp \
849 r3/poll.cpp \
850 r3/process.cpp \
851 r3/socket.cpp \
852 r3/stream.cpp \
853 r3/test.cpp \
854 r3/testi.cpp \
855 r3/tcp.cpp \
856 r3/udp.cpp \
857 r3/generic/semspinmutex-r3-generic.cpp \
858 r3/xml.cpp \
859 common/zip/xarvfs.cpp
860ifdef VBOX_WITH_LIBLZMA
861 RuntimeBaseR3_SOURCES += \
862 common/zip/lzmavfs.cpp
863endif
864if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), linux.arm64)
865 RuntimeBaseR3_SOURCES += \
866 r3/mempage-direct.cpp
867else
868 RuntimeBaseR3_SOURCES += \
869 r3/mempage-heap.cpp
870endif
871
872
873#if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
874# RuntimeBaseR3_SOURCES += common/time/timesupA.asm
875#else
876RuntimeBaseR3_SOURCES += common/time/timesupref.cpp
877#endif
878
879RuntimeBaseR3_SOURCES.x86 += \
880 generic/RTMpGetDescription-generic.cpp \
881 generic/system-page-size-generic.cpp \
882 common/misc/zero.asm \
883 common/misc/RTSystemIsInsideVM-amd64-x86.cpp \
884 common/string/RTStrMemFind32.asm \
885 VBox/RTLogWriteVmm-amd64-x86.asm
886RuntimeBaseR3_SOURCES.amd64 += \
887 generic/RTMpGetDescription-generic.cpp \
888 generic/system-page-size-generic.cpp \
889 common/misc/zero.asm \
890 common/misc/RTSystemIsInsideVM-amd64-x86.cpp \
891 common/string/RTStrMemFind32.asm \
892 VBox/RTLogWriteVmm-amd64-x86.asm
893RuntimeBaseR3_SOURCES.arm32 := \
894 common/asm/ASMBitFirstClear-generic.cpp \
895 common/asm/ASMBitNextClear-generic.cpp \
896 common/asm/ASMBitFirstSet-generic.cpp \
897 common/asm/ASMBitNextSet-generic.cpp \
898 common/asm/ASMMemZero32-generic.cpp \
899 common/asm/ASMMemFill32-generic.cpp \
900 common/asm/ASMMemFirstMismatchingU8-generic.cpp \
901 common/asm/ASMMemFirstNonZero-generic.cpp \
902 common/misc/zero-alt.S
903RuntimeBaseR3_SOURCES.arm64 := \
904 common/asm/ASMBitFirstClear-generic.cpp \
905 common/asm/ASMBitNextClear-generic.cpp \
906 common/asm/ASMBitFirstSet-generic.cpp \
907 common/asm/ASMBitNextSet-generic.cpp \
908 common/asm/ASMMemZero32-generic.cpp \
909 common/asm/ASMMemFill32-generic.cpp \
910 common/asm/ASMMemFirstMismatchingU8-generic.cpp \
911 common/asm/ASMMemFirstNonZero-generic.cpp
912RuntimeBaseR3_SOURCES.sparc32 += \
913 generic/RTMpGetDescription-generic-stub.cpp \
914 generic/system-page-size-generic.cpp \
915 generic/RTSystemIsInsideVM-generic.cpp \
916 common/asm/ASMBitFirstClear-generic.cpp \
917 common/asm/ASMBitNextClear-generic.cpp \
918 common/asm/ASMBitFirstSet-generic.cpp \
919 common/asm/ASMBitNextSet-generic.cpp \
920 common/asm/ASMMemZero32-generic.cpp \
921 common/asm/ASMMemFill32-generic.cpp \
922 common/asm/ASMMemFirstMismatchingU8-generic.cpp \
923 common/asm/ASMMemFirstNonZero-generic.cpp \
924 common/asm/asm-fake.cpp \
925 common/misc/zero-alt.S \
926 common/string/RTStrMemFind32.cpp
927RuntimeBaseR3_SOURCES.sparc64 += \
928 generic/RTMpGetDescription-generic-stub.cpp \
929 generic/system-page-size-generic.cpp \
930 generic/RTSystemIsInsideVM-generic.cpp \
931 common/asm/ASMBitFirstClear-generic.cpp \
932 common/asm/ASMBitNextClear-generic.cpp \
933 common/asm/ASMBitFirstSet-generic.cpp \
934 common/asm/ASMBitNextSet-generic.cpp \
935 common/asm/ASMMemZero32-generic.cpp \
936 common/asm/ASMMemFill32-generic.cpp \
937 common/asm/ASMMemFirstMismatchingU8-generic.cpp \
938 common/asm/ASMMemFirstNonZero-generic.cpp \
939 common/asm/asm-fake.cpp \
940 common/misc/zero-alt.S \
941 common/string/RTStrMemFind32.cpp
942
943ifdef IPRT_WITH_LZJB
944 RuntimeBaseR3_SOURCES += common/misc/lzjb.c
945endif
946
947# AMD64 / x86 assembly code.
948RuntimeBaseR3_SOURCES.x86 += \
949 common/asm/ASMCpuIdExSlow.asm \
950 common/asm/ASMAtomicUoAndU64.asm \
951 common/asm/ASMAtomicUoAndU32.asm \
952 common/asm/ASMAtomicUoDecU32.asm \
953 common/asm/ASMAtomicUoIncU32.asm \
954 common/asm/ASMAtomicUoOrU64.asm \
955 common/asm/ASMAtomicUoOrU32.asm \
956 common/asm/ASMAtomicUoXorU32.asm \
957 common/asm/ASMMemFirstMismatchingU8.asm \
958 common/asm/ASMRdMsrEx.asm \
959 common/asm/ASMWrMsrEx.asm \
960 common/asm/ASMGetXcr0.asm \
961 common/asm/ASMSetXcr0.asm \
962 common/asm/ASMXSave.asm \
963 common/asm/ASMXRstor.asm \
964 common/asm/ASMFxSave.asm \
965 common/asm/ASMFxRstor.asm \
966 common/asm/ASMSerializeInstruction-cpuid.asm \
967 common/asm/ASMSerializeInstruction-iret.asm \
968 common/asm/ASMSerializeInstruction-rdtscp.asm \
969 common/dbg/dbgstackdumpself.cpp \
970 common/dbg/dbgstackdumpself-amd64-x86.asm \
971 common/math/bignum-amd64-x86.asm \
972 common/string/RTStrEnd.asm
973RuntimeBaseR3_SOURCES.amd64 += \
974 common/asm/ASMCpuIdExSlow.asm \
975 common/asm/ASMAtomicUoAndU64.asm \
976 common/asm/ASMAtomicUoAndU32.asm \
977 common/asm/ASMAtomicUoDecU32.asm \
978 common/asm/ASMAtomicUoIncU32.asm \
979 common/asm/ASMAtomicUoOrU64.asm \
980 common/asm/ASMAtomicUoOrU32.asm \
981 common/asm/ASMAtomicUoXorU32.asm \
982 common/asm/ASMMemFirstMismatchingU8.asm \
983 common/asm/ASMRdMsrEx.asm \
984 common/asm/ASMWrMsrEx.asm \
985 common/asm/ASMGetXcr0.asm \
986 common/asm/ASMSetXcr0.asm \
987 common/asm/ASMXSave.asm \
988 common/asm/ASMXRstor.asm \
989 common/asm/ASMFxSave.asm \
990 common/asm/ASMFxRstor.asm \
991 common/asm/ASMSerializeInstruction-cpuid.asm \
992 common/asm/ASMSerializeInstruction-iret.asm \
993 common/asm/ASMSerializeInstruction-rdtscp.asm \
994 common/dbg/dbgstackdumpself.cpp \
995 common/dbg/dbgstackdumpself-amd64-x86.asm \
996 common/math/bignum-amd64-x86.asm \
997 common/math/RTUInt128MulByU64.asm \
998 common/math/RTUInt128MulByU64Ex.asm \
999 common/string/RTStrEnd.asm
1000
1001# Some versions of GCC might require this.
1002RuntimeBaseR3_SOURCES.x86 += \
1003 common/asm/ASMAtomicXchgU64.asm \
1004 common/asm/ASMAtomicCmpXchgU64.asm \
1005 common/asm/ASMAtomicCmpXchgExU64.asm \
1006 common/asm/ASMAtomicReadU64.asm \
1007 common/asm/ASMAtomicUoReadU64.asm
1008
1009# Some non-assembly for non-AMD64 / non-x86 targets:
1010RuntimeBaseR3_SOURCES.arm32 += \
1011 common/string/RTStrEnd.cpp \
1012 common/asm/ASMMultU64ByU32DivByU32-generic.cpp
1013RuntimeBaseR3_SOURCES.arm64 += \
1014 common/string/RTStrEnd.cpp \
1015 common/asm/ASMMultU64ByU32DivByU32-generic.cpp
1016RuntimeBaseR3_SOURCES.sparc32 += \
1017 common/string/RTStrEnd.cpp \
1018 common/asm/ASMMultU64ByU32DivByU32-generic.cpp
1019RuntimeBaseR3_SOURCES.sparc64 += \
1020 common/string/RTStrEnd.cpp \
1021 common/asm/ASMMultU64ByU32DivByU32-generic.cpp
1022
1023# VBox specific stuff.
1024RuntimeBaseR3_SOURCES += \
1025 VBox/RTAssertShouldPanic-vbox.cpp \
1026 VBox/log-vbox.cpp
1027ifneq ($(KBUILD_TARGET),win)
1028 RuntimeBaseR3_SOURCES += \
1029 common/err/errmsgxpcom.cpp
1030endif
1031if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
1032 RuntimeBaseR3_SOURCES += \
1033 $(if $(VBOX_WITH_DBUS),VBox/dbus.cpp,)
1034endif
1035
1036VBOX_WITH_NT_DIRENUM = 1
1037RuntimeBaseR3_SOURCES.win = \
1038 common/dbg/dbgmoddbghelp.cpp \
1039 common/ioqueue/ioqueue-aiofile-provider.cpp \
1040 generic/cdrom-generic.cpp \
1041 generic/RTDirExists-generic.cpp \
1042 generic/RTDirSetMode-generic.cpp \
1043 generic/RTDirSetTimes-generic.cpp \
1044 generic/fileio-sg-generic.cpp \
1045 generic/fileio-sg-at-generic.cpp \
1046 generic/RTFileCopyPartEx-generic.cpp \
1047 generic/RTFileExists-generic.cpp \
1048 generic/RTFileSetAllocationSize-generic.cpp \
1049 generic/RTMpGetCurFrequency-generic.cpp \
1050 generic/RTMpGetMaxFrequency-generic.cpp \
1051 generic/RTRandAdvCreateSystemFaster-generic.cpp \
1052 generic/RTRandAdvCreateSystemTruer-generic.cpp \
1053 generic/RTSemEventWait-2-ex-generic.cpp \
1054 generic/RTSemEventWaitNoResume-2-ex-generic.cpp \
1055 generic/RTSemEventMultiWait-2-ex-generic.cpp \
1056 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
1057 generic/RTSemMutexRequest-generic.cpp \
1058 generic/RTSemMutexRequestDebug-generic.cpp \
1059 generic/RTTimerCreate-generic.cpp \
1060 generic/RTThreadSetAffinityToCpu-generic.cpp \
1061 generic/mppresent-generic-online.cpp \
1062 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
1063 generic/uuid-generic.cpp \
1064 generic/RTProcDaemonize-generic.cpp \
1065 generic/RTProcIsRunningByName-generic.cpp \
1066 generic/RTThreadGetNativeState-generic.cpp \
1067 nt/RTErrConvertFromNtStatus.cpp \
1068 nt/RTNtPathExpand8dot3Path.cpp \
1069 nt/RTNtPathExpand8dot3PathA.cpp \
1070 nt/RTNtPathFindPossible8dot3Name.cpp \
1071 nt/fileioutils-nt.cpp \
1072 r3/generic/RTLocaleQueryLocaleName-r3-generic.cpp \
1073 r3/nt/dirrel-r3-nt.cpp \
1074 r3/nt/fs-nt.cpp \
1075 r3/nt/pathint-nt.cpp \
1076 r3/nt/RTFileDelete-r3-nt.cpp \
1077 r3/nt/RTFileQueryFsSizes-nt.cpp \
1078 r3/nt/RTFileSetMode-r3-nt.cpp \
1079 r3/nt/RTPathQueryInfo-nt.cpp \
1080 r3/nt/RTPathSetMode-r3-nt.cpp \
1081 r3/nt/RTPathUnlink-r3-nt.cpp \
1082 r3/nt/RTProcQueryParent-r3-nt.cpp \
1083 nt/semevent-nt.cpp \
1084 nt/RTSemEventGetResolution-nt.cpp \
1085 nt/semeventmulti-nt.cpp \
1086 nt/RTSemEventMultiGetResolution-nt.cpp \
1087 r3/win/env-win.cpp \
1088 r3/win/RTCrStoreCreateSnapshotById-win.cpp \
1089 r3/win/RTFileQuerySectorSize-win.cpp \
1090 r3/win/RTFsMountpointsEnum-win.cpp \
1091 r3/win/RTHandleGetStandard-win.cpp \
1092 r3/win/RTLocaleQueryNormalizedBaseLocaleName-win.cpp \
1093 r3/win/RTLocaleQueryUserCountryCode-win.cpp \
1094 r3/win/RTSystemGetNativeArch-win.cpp \
1095 r3/win/RTSystemQueryOSInfo-win.cpp \
1096 r3/win/RTSystemShutdown-win.cpp \
1097 r3/win/RTSystemQueryDmiString-win.cpp \
1098 r3/win/RTSystemFirmware-win.cpp \
1099 r3/win/RTSystemQueryTotalRam-win.cpp \
1100 r3/win/RTSystemRegistry-win.cpp \
1101 r3/win/RTTimeZoneGetCurrent-win.cpp \
1102 r3/win/RTMemProtect-win.cpp \
1103 r3/win/allocex-win.cpp \
1104 r3/win/dir-win.cpp \
1105 $(if-expr defined(VBOX_WITH_NT_DIRENUM),r3/nt/direnum-r3-nt.cpp,r3/win/direnum-win.cpp generic/RTDirQueryInfo-generic.cpp) \
1106 r3/win/errvars-win.cpp \
1107 r3/win/fileaio-win.cpp \
1108 r3/win/fileio-win.cpp \
1109 r3/win/init-win.cpp \
1110 r3/win/krnlmod-win.cpp \
1111 r3/win/ldrNative-win.cpp \
1112 r3/win/localipc-win.cpp \
1113 r3/win/mempage-native-win.cpp \
1114 r3/win/mp-win.cpp \
1115 r3/win/path-win.cpp \
1116 r3/win/pathint-win.cpp \
1117 r3/win/pipe-win.cpp \
1118 r3/win/process-win.cpp \
1119 r3/win/RTLogWriteDebugger-win.cpp \
1120 r3/win/rtProcInitExePath-win.cpp \
1121 r3/win/sched-win.cpp \
1122 r3/win/semmutex-win.cpp \
1123 r3/win/serialport-win.cpp \
1124 r3/win/shmem-win.cpp \
1125 r3/win/symlink-win.cpp \
1126 r3/win/system-get-nt-xxx-win.cpp \
1127 r3/win/thread-win.cpp \
1128 r3/win/thread2-win.cpp \
1129 $(if-expr 1,r3/win/time-win.cpp,r3/nt/time-nt.cpp) \
1130 r3/win/time2-win.cpp \
1131 r3/win/timer-win.cpp \
1132 r3/win/tls-win.cpp \
1133 r3/win/tpm-win.cpp \
1134 r3/win/utf16locale-win.cpp \
1135 r3/win/utf8-win.cpp \
1136 r3/win/RTUuidCreate-win.cpp \
1137 win/errmsgwin.cpp \
1138 win/RTErrConvertFromWin32.cpp
1139
1140RuntimeBaseR3_SOURCES.win.amd64 := \
1141 $(RuntimeWin64ASM_SOURCES) \
1142 common/string/memrchr.asm \
1143 common/string/mempcpy.asm
1144RuntimeBaseR3_SOURCES.win.x86 := \
1145 $(RuntimeWin32ASM_SOURCES) \
1146 common/string/memrchr.asm \
1147 common/string/mempcpy.asm
1148RuntimeBaseR3_SOURCES.win.arm64 := \
1149 generic/RTMpGetDescription-generic-stub.cpp \
1150 common/string/memrchr.cpp \
1151 common/string/mempcpy.cpp \
1152 common/string/RTStrMemFind32.cpp \
1153 common/misc/zero.cpp \
1154 generic/system-page-size-generic.cpp
1155
1156RuntimeBaseR3_SOURCES.linux = \
1157 common/ioqueue/ioqueue-aiofile-provider.cpp \
1158 generic/cdrom-generic.cpp \
1159 generic/RTCrStoreCreateSnapshotById-generic.cpp \
1160 generic/RTDirQueryInfo-generic.cpp \
1161 generic/RTDirSetMode-generic.cpp \
1162 generic/RTDirSetTimes-generic.cpp \
1163 generic/RTFileMove-generic.cpp \
1164 generic/RTLogWriteDebugger-generic.cpp \
1165 generic/RTPathGetCurrentOnDrive-generic.cpp \
1166 generic/RTProcDaemonize-generic.cpp \
1167 generic/RTSemEventMultiWait-2-ex-generic.cpp \
1168 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
1169 generic/RTTimeLocalNow-generic.cpp \
1170 generic/RTTimerCreate-generic.cpp \
1171 generic/RTThreadSetAffinityToCpu-generic.cpp \
1172 generic/RTUuidCreate-generic.cpp \
1173 generic/mppresent-generic.cpp \
1174 generic/utf16locale-generic.cpp \
1175 generic/uuid-generic.cpp \
1176 r3/generic/RTLocaleQueryLocaleName-r3-generic.cpp \
1177 r3/generic/RTLocaleQueryNormalizedBaseLocaleName-r3-generic.cpp \
1178 r3/generic/RTLocaleQueryUserCountryCode-r3-generic.cpp \
1179 r3/generic/RTSystemGetNativeArch-r3-generic.cpp \
1180 r3/generic/dirrel-r3-generic.cpp \
1181 r3/posix/allocex-r3-posix.cpp \
1182 r3/linux/RTThreadGetNativeState-linux.cpp \
1183 r3/linux/fileaio-linux.cpp \
1184 r3/linux/ioqueue-iouringfile-provider.cpp \
1185 r3/linux/krnlmod-linux.cpp \
1186 r3/linux/mp-linux.cpp \
1187 r3/linux/rtProcInitExePath-linux.cpp \
1188 r3/linux/sched-linux.cpp \
1189 r3/linux/sysfs.cpp \
1190 r3/linux/time-linux.cpp \
1191 r3/linux/thread-affinity-linux.cpp \
1192 r3/linux/tpm-linux.cpp \
1193 r3/linux/RTFileCopyPartEx-linux.cpp \
1194 r3/linux/RTFileQuerySectorSize-linux.cpp \
1195 r3/linux/RTFileSetAllocationSize-linux.cpp \
1196 r3/linux/RTProcIsRunningByName-linux.cpp \
1197 r3/linux/RTSystemFirmware-linux.cpp \
1198 r3/linux/RTSystemQueryDmiString-linux.cpp \
1199 r3/linux/RTSystemShutdown-linux.cpp \
1200 r3/posix/RTFileQueryFsSizes-posix.cpp \
1201 r3/posix/RTFsMountpointsEnum-posix.cpp \
1202 r3/posix/RTHandleGetStandard-posix.cpp \
1203 r3/posix/RTMemProtect-posix.cpp \
1204 r3/posix/RTPathUserHome-posix.cpp \
1205 r3/posix/RTSystemQueryOSInfo-posix.cpp \
1206 r3/linux/systemmem-linux.cpp \
1207 r3/posix/RTTimeNow-posix.cpp \
1208 r3/posix/RTTimeSet-posix.cpp \
1209 r3/posix/RTTimeZoneGetCurrent-posix.cpp \
1210 r3/posix/mempage-native-posix.cpp \
1211 r3/posix/dir-posix.cpp \
1212 r3/posix/env-posix.cpp \
1213 r3/posix/errvars-posix.cpp \
1214 r3/posix/fileio-posix.cpp \
1215 r3/posix/fileio2-posix.cpp \
1216 r3/posix/fileio-at-posix.cpp \
1217 r3/posix/fileio-sg-posix.cpp \
1218 r3/posix/fileio-sg-at-posix.cpp \
1219 r3/posix/filelock-posix.cpp \
1220 r3/posix/fs-posix.cpp \
1221 r3/posix/fs2-posix.cpp \
1222 r3/posix/fs3-posix.cpp \
1223 r3/posix/ldrNative-posix.cpp \
1224 r3/posix/localipc-posix.cpp \
1225 r3/posix/path-posix.cpp \
1226 r3/posix/path2-posix.cpp \
1227 r3/posix/pathhost-posix.cpp \
1228 r3/posix/RTPathUserDocuments-posix.cpp \
1229 r3/posix/pipe-posix.cpp \
1230 r3/posix/process-posix.cpp \
1231 r3/posix/process-creation-posix.cpp \
1232 r3/posix/rand-posix.cpp \
1233 r3/posix/semrw-posix.cpp \
1234 r3/posix/serialport-posix.cpp \
1235 r3/posix/shmem-posix.cpp \
1236 r3/posix/symlink-posix.cpp \
1237 r3/posix/thread-posix.cpp \
1238 r3/posix/thread2-posix.cpp \
1239 r3/posix/timelocal-posix.cpp \
1240 r3/posix/timer-posix.cpp \
1241 r3/posix/tls-posix.cpp \
1242 r3/posix/utf8-posix.cpp
1243ifdef IPRT_WITH_FUTEX_BASED_SEMS
1244 RuntimeBaseR3_SOURCES.linux += \
1245 r3/linux/semevent-linux.cpp \
1246 r3/linux/semeventmulti-linux.cpp \
1247 r3/linux/semmutex-linux.cpp
1248else
1249 RuntimeBaseR3_SOURCES.linux.x86 += \
1250 r3/posix/semevent-posix.cpp \
1251 r3/posix/semeventmulti-posix.cpp \
1252 r3/posix/semmutex-posix.cpp
1253 RuntimeBaseR3_SOURCES.linux.amd64 += \
1254 r3/linux/semevent-linux.cpp \
1255 r3/linux/semeventmulti-linux.cpp
1256 RuntimeBaseR3_SOURCES.linux.arm64 += \
1257 generic/RTMpGetDescription-generic-stub.cpp \
1258 r3/posix/system-page-size-posix.cpp \
1259 r3/linux/semevent-linux.cpp \
1260 r3/linux/semeventmulti-linux.cpp \
1261 common/misc/zero-alt.S
1262 RuntimeBaseR3_SOURCES.linux.arm32 += \
1263 generic/RTMpGetDescription-generic-stub.cpp \
1264 r3/posix/system-page-size-posix.cpp \
1265 r3/linux/semevent-linux.cpp \
1266 r3/linux/semeventmulti-linux.cpp \
1267 common/misc/zero-alt.S
1268 ifdef RT_NEW_LINUX_MUTEX_CODE
1269 RuntimeBaseR3_SOURCES.linux.amd64 += \
1270 r3/linux/semmutex-linux.cpp
1271 RuntimeBaseR3_SOURCES.linux.arm64 += \
1272 r3/linux/semmutex-linux.cpp
1273 else
1274 RuntimeBaseR3_SOURCES.linux.amd64 += \
1275 r3/posix/semmutex-posix.cpp
1276 RuntimeBaseR3_SOURCES.linux.arm64 += \
1277 r3/posix/semmutex-posix.cpp
1278 endif
1279endif
1280
1281RuntimeBaseR3_SOURCES.os2 = \
1282 common/string/memrchr.asm \
1283 generic/cdrom-generic.cpp \
1284 generic/RTCrStoreCreateSnapshotById-generic.cpp \
1285 generic/RTDirQueryInfo-generic.cpp \
1286 generic/RTDirSetMode-generic.cpp \
1287 generic/RTDirSetTimes-generic.cpp \
1288 generic/fileio-at-generic.cpp \
1289 generic/fileio-sg-generic.cpp \
1290 generic/fileio-sg-at-generic.cpp \
1291 generic/RTFileCopyPartEx-generic.cpp \
1292 generic/RTFileMove-generic.cpp \
1293 generic/RTFileQuerySectorSize-generic.cpp \
1294 generic/RTFileSetAllocationSize-generic.cpp \
1295 generic/RTLogWriteDebugger-generic.cpp \
1296 generic/RTPathGetCurrentOnDrive-generic.cpp \
1297 generic/RTProcDaemonize-generic.cpp \
1298 generic/RTRandAdvCreateSystemFaster-generic.cpp \
1299 generic/RTRandAdvCreateSystemTruer-generic.cpp \
1300 generic/RTSystemQueryDmiString-generic.cpp \
1301 generic/RTSystemFirmware-generic.cpp \
1302 generic/RTSystemShutdown-generic.cpp \
1303 generic/RTTimeLocalNow-generic.cpp \
1304 generic/RTTimerCreate-generic.cpp \
1305 generic/RTThreadSetAffinityToCpu-generic.cpp \
1306 generic/RTUuidCreate-generic.cpp \
1307 generic/mppresent-generic.cpp \
1308 generic/RTSemEventWait-generic.cpp \
1309 generic/RTSemEventMultiWait-generic.cpp \
1310 generic/RTSemMutexRequest-generic.cpp \
1311 generic/RTSemMutexRequestDebug-generic.cpp \
1312 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
1313 generic/timer-generic.cpp \
1314 generic/utf16locale-generic.cpp \
1315 generic/uuid-generic.cpp \
1316 generic/RTMpGetCoreCount-generic.cpp \
1317 generic/RTMpGetOnlineCoreCount-generic.cpp \
1318 generic/RTMpGetCurFrequency-generic.cpp \
1319 generic/RTMpGetMaxFrequency-generic.cpp \
1320 generic/RTProcIsRunningByName-generic.cpp \
1321 generic/RTThreadGetNativeState-generic.cpp \
1322 os2/RTErrConvertFromOS2.cpp \
1323 r3/generic/allocex-r3-generic.cpp \
1324 r3/generic/RTLocaleQueryLocaleName-r3-generic.cpp \
1325 r3/generic/RTLocaleQueryNormalizedBaseLocaleName-r3-generic.cpp \
1326 r3/generic/RTLocaleQueryUserCountryCode-r3-generic.cpp \
1327 r3/generic/RTSystemGetNativeArch-r3-generic.cpp \
1328 r3/generic/RTTimeZoneGetCurrent-generic.cpp \
1329 r3/generic/dirrel-r3-generic.cpp \
1330 r3/os2/RTTimeSet-os2.cpp \
1331 r3/os2/filelock-os2.cpp \
1332 r3/os2/mempage-native-os2.cpp \
1333 r3/os2/mp-os2.cpp \
1334 r3/os2/pipe-os2.cpp \
1335 r3/os2/rtProcInitExePath-os2.cpp \
1336 r3/os2/sched-os2.cpp \
1337 r3/os2/sems-os2.cpp \
1338 r3/os2/serialport-os2.cpp \
1339 r3/os2/systemmem-os2.cpp \
1340 r3/os2/thread-os2.cpp \
1341 r3/os2/time-os2.cpp \
1342 r3/posix/RTFileQueryFsSizes-posix.cpp \
1343 r3/posix/RTFsMountpointsEnum-posix.cpp \
1344 r3/posix/RTHandleGetStandard-posix.cpp \
1345 r3/posix/RTMemProtect-posix.cpp \
1346 r3/posix/RTPathUserHome-posix.cpp \
1347 r3/posix/RTSystemQueryOSInfo-posix.cpp \
1348 r3/posix/RTTimeNow-posix.cpp \
1349 r3/posix/dir-posix.cpp \
1350 r3/posix/env-posix.cpp \
1351 r3/posix/errvars-posix.cpp \
1352 r3/posix/fileio-posix.cpp \
1353 r3/posix/fileio2-posix.cpp \
1354 r3/posix/fs-posix.cpp \
1355 r3/posix/fs2-posix.cpp \
1356 r3/posix/fs3-posix.cpp \
1357 r3/posix/ldrNative-posix.cpp \
1358 r3/posix/localipc-posix.cpp \
1359 r3/posix/path-posix.cpp \
1360 r3/posix/path2-posix.cpp \
1361 r3/posix/pathhost-posix.cpp \
1362 r3/posix/RTPathUserDocuments-posix.cpp \
1363 r3/posix/process-posix.cpp \
1364 r3/posix/process-creation-posix.cpp \
1365 r3/posix/symlink-posix.cpp \
1366 r3/posix/timelocal-posix.cpp \
1367 r3/posix/utf8-posix.cpp
1368
1369RuntimeBaseR3_SOURCES.darwin = \
1370 common/ioqueue/ioqueue-aiofile-provider.cpp \
1371 darwin/RTErrConvertFromDarwin.cpp \
1372 darwin/RTErrConvertFromDarwinCOM.cpp \
1373 darwin/RTErrConvertFromDarwinIO.cpp \
1374 darwin/RTErrConvertFromDarwinKern.cpp \
1375 generic/cdrom-generic.cpp \
1376 generic/RTDirQueryInfo-generic.cpp \
1377 generic/RTDirSetMode-generic.cpp \
1378 generic/RTDirSetTimes-generic.cpp \
1379 generic/RTFileCopyPartEx-generic.cpp \
1380 generic/RTFileMove-generic.cpp \
1381 generic/RTFileSetAllocationSize-generic.cpp \
1382 generic/RTLogWriteDebugger-generic.cpp \
1383 generic/RTPathGetCurrentOnDrive-generic.cpp \
1384 generic/RTProcDaemonize-generic.cpp \
1385 generic/RTThreadGetAffinity-stub-generic.cpp \
1386 generic/RTThreadSetAffinity-stub-generic.cpp \
1387 generic/RTThreadSetAffinityToCpu-generic.cpp \
1388 generic/RTTimeLocalNow-generic.cpp \
1389 generic/RTTimerCreate-generic.cpp \
1390 generic/RTUuidCreate-generic.cpp \
1391 generic/mppresent-generic.cpp \
1392 generic/RTSemEventMultiWait-2-ex-generic.cpp \
1393 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
1394 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
1395 generic/RTSystemShutdown-generic.cpp \
1396 generic/timer-generic.cpp \
1397 generic/utf16locale-generic.cpp \
1398 generic/uuid-generic.cpp \
1399 generic/RTProcIsRunningByName-generic.cpp \
1400 generic/RTThreadGetNativeState-generic.cpp \
1401 generic/RTSystemFirmware-generic.cpp \
1402 r3/darwin/RTCrStoreCreateSnapshotById-darwin.cpp \
1403 r3/darwin/filelock-darwin.cpp \
1404 r3/darwin/RTFileQuerySectorSize-darwin.cpp \
1405 r3/darwin/krnlmod-darwin.cpp \
1406 r3/darwin/mp-darwin.cpp \
1407 r3/darwin/pathhost-darwin.cpp \
1408 r3/darwin/rtProcInitExePath-darwin.cpp \
1409 r3/darwin/RTSystemQueryDmiString-darwin.cpp \
1410 r3/darwin/sched-darwin.cpp \
1411 r3/darwin/systemmem-darwin.cpp \
1412 r3/darwin/time-darwin.cpp \
1413 r3/darwin/RTPathUserDocuments-darwin.cpp \
1414 r3/generic/allocex-r3-generic.cpp \
1415 r3/generic/RTLocaleQueryLocaleName-r3-generic.cpp \
1416 r3/generic/RTLocaleQueryNormalizedBaseLocaleName-r3-generic.cpp \
1417 r3/generic/RTLocaleQueryUserCountryCode-r3-generic.cpp \
1418 r3/generic/RTSystemGetNativeArch-r3-generic.cpp \
1419 r3/generic/dirrel-r3-generic.cpp \
1420 r3/posix/RTFileQueryFsSizes-posix.cpp \
1421 r3/posix/RTFsMountpointsEnum-posix.cpp \
1422 r3/posix/RTHandleGetStandard-posix.cpp \
1423 r3/posix/RTMemProtect-posix.cpp \
1424 r3/posix/RTPathUserHome-posix.cpp \
1425 r3/posix/RTSystemQueryOSInfo-posix.cpp \
1426 r3/posix/RTTimeSet-posix.cpp \
1427 r3/posix/RTTimeZoneGetCurrent-posix.cpp \
1428 r3/posix/dir-posix.cpp \
1429 r3/posix/env-posix.cpp \
1430 r3/posix/errvars-posix.cpp \
1431 r3/posix/fileaio-posix.cpp \
1432 r3/posix/fileio-posix.cpp \
1433 r3/posix/fileio2-posix.cpp \
1434 r3/posix/fileio-at-posix.cpp \
1435 r3/posix/fileio-sg-posix.cpp \
1436 r3/posix/fileio-sg-at-posix.cpp \
1437 r3/posix/fs-posix.cpp \
1438 r3/posix/fs2-posix.cpp \
1439 r3/posix/fs3-posix.cpp \
1440 r3/posix/ldrNative-posix.cpp \
1441 r3/posix/localipc-posix.cpp \
1442 r3/posix/mempage-native-posix.cpp \
1443 r3/posix/path-posix.cpp \
1444 r3/posix/path2-posix.cpp \
1445 r3/posix/pipe-posix.cpp \
1446 r3/posix/process-posix.cpp \
1447 r3/posix/process-creation-posix.cpp \
1448 r3/posix/rand-posix.cpp \
1449 r3/posix/semevent-posix.cpp \
1450 r3/posix/semeventmulti-posix.cpp \
1451 r3/posix/semmutex-posix.cpp \
1452 r3/posix/serialport-posix.cpp \
1453 r3/posix/symlink-posix.cpp \
1454 r3/posix/shmem-posix.cpp \
1455 r3/posix/thread-posix.cpp \
1456 r3/posix/thread2-posix.cpp \
1457 r3/posix/timelocal-posix.cpp \
1458 r3/posix/tls-posix.cpp \
1459 r3/posix/utf8-posix.cpp
1460RuntimeBaseR3_SOURCES.darwin.x86 += \
1461 common/string/mempcpy.asm \
1462 common/string/memrchr.asm
1463RuntimeBaseR3_SOURCES.darwin.amd64 += \
1464 common/string/mempcpy.asm \
1465 common/string/memrchr.asm
1466RuntimeBaseR3_SOURCES.darwin.arm32 += \
1467 common/string/mempcpy.cpp \
1468 common/string/memrchr.cpp \
1469 common/misc/zero-alt.S \
1470 generic/system-page-size-generic.cpp \
1471 r3/darwin/RTMpGetDescription-generic.cpp
1472RuntimeBaseR3_SOURCES.darwin.arm64 += \
1473 common/string/mempcpy.cpp \
1474 common/string/memrchr.cpp \
1475 common/misc/zero-alt.S \
1476 generic/system-page-size-generic.cpp \
1477 r3/darwin/RTMpGetDescription-generic.cpp
1478
1479## @todo Make BSD sched, implement RTMP*.
1480RuntimeBaseR3_SOURCES.freebsd = \
1481 common/ioqueue/ioqueue-aiofile-provider.cpp \
1482 generic/cdrom-generic.cpp \
1483 generic/RTCrStoreCreateSnapshotById-generic.cpp \
1484 generic/RTDirQueryInfo-generic.cpp \
1485 generic/RTDirSetMode-generic.cpp \
1486 generic/RTDirSetTimes-generic.cpp \
1487 generic/RTFileCopyPartEx-generic.cpp \
1488 generic/RTFileMove-generic.cpp \
1489 generic/RTFileSetAllocationSize-generic.cpp \
1490 generic/RTLogWriteDebugger-generic.cpp \
1491 generic/RTPathGetCurrentOnDrive-generic.cpp \
1492 generic/RTSemEventMultiWait-2-ex-generic.cpp \
1493 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
1494 generic/RTSystemQueryDmiString-generic.cpp \
1495 generic/RTSystemFirmware-generic.cpp \
1496 generic/RTSystemShutdown-generic.cpp \
1497 generic/RTThreadGetAffinity-stub-generic.cpp \
1498 generic/RTThreadSetAffinity-stub-generic.cpp \
1499 generic/RTThreadSetAffinityToCpu-generic.cpp \
1500 generic/RTTimeLocalNow-generic.cpp \
1501 generic/RTTimerCreate-generic.cpp \
1502 generic/RTUuidCreate-generic.cpp \
1503 generic/mppresent-generic.cpp \
1504 generic/sched-generic.cpp \
1505 generic/utf16locale-generic.cpp \
1506 generic/uuid-generic.cpp \
1507 generic/RTMpCpuId-generic.cpp \
1508 generic/RTMpGetCoreCount-generic.cpp \
1509 generic/RTMpGetOnlineCoreCount-generic.cpp \
1510 generic/RTProcDaemonize-generic.cpp \
1511 generic/RTProcIsRunningByName-generic.cpp \
1512 generic/RTThreadGetNativeState-generic.cpp \
1513 r3/freebsd/fileaio-freebsd.cpp \
1514 r3/freebsd/RTFileQuerySectorSize-freebsd.cpp \
1515 r3/freebsd/mp-freebsd.cpp \
1516 r3/freebsd/systemmem-freebsd.cpp \
1517 r3/freebsd/rtProcInitExePath-freebsd.cpp \
1518 r3/generic/allocex-r3-generic.cpp \
1519 r3/generic/RTLocaleQueryLocaleName-r3-generic.cpp \
1520 r3/generic/RTLocaleQueryNormalizedBaseLocaleName-r3-generic.cpp \
1521 r3/generic/RTLocaleQueryUserCountryCode-r3-generic.cpp \
1522 r3/generic/RTSystemGetNativeArch-r3-generic.cpp \
1523 r3/generic/dirrel-r3-generic.cpp \
1524 r3/posix/RTFileQueryFsSizes-posix.cpp \
1525 r3/posix/RTFsMountpointsEnum-posix.cpp \
1526 r3/posix/RTHandleGetStandard-posix.cpp \
1527 r3/posix/RTMemProtect-posix.cpp \
1528 r3/posix/RTPathUserHome-posix.cpp \
1529 r3/posix/RTSystemQueryOSInfo-posix.cpp \
1530 r3/posix/RTTimeNow-posix.cpp \
1531 r3/posix/RTTimeSet-posix.cpp \
1532 r3/posix/RTTimeZoneGetCurrent-posix.cpp \
1533 r3/posix/dir-posix.cpp \
1534 r3/posix/env-posix.cpp \
1535 r3/posix/errvars-posix.cpp \
1536 r3/posix/fileio-posix.cpp \
1537 r3/posix/fileio2-posix.cpp \
1538 r3/posix/fileio-at-posix.cpp \
1539 r3/posix/fileio-sg-posix.cpp \
1540 r3/posix/fileio-sg-at-posix.cpp \
1541 r3/posix/filelock-posix.cpp \
1542 r3/posix/fs-posix.cpp \
1543 r3/posix/fs2-posix.cpp \
1544 r3/posix/fs3-posix.cpp \
1545 r3/posix/ldrNative-posix.cpp \
1546 r3/posix/localipc-posix.cpp \
1547 r3/posix/mempage-native-posix.cpp \
1548 r3/posix/path-posix.cpp \
1549 r3/posix/path2-posix.cpp \
1550 r3/posix/pathhost-posix.cpp \
1551 r3/posix/RTPathUserDocuments-posix.cpp \
1552 r3/posix/pipe-posix.cpp \
1553 r3/posix/process-posix.cpp \
1554 r3/posix/process-creation-posix.cpp \
1555 r3/posix/rand-posix.cpp \
1556 r3/posix/semevent-posix.cpp \
1557 r3/posix/semeventmulti-posix.cpp \
1558 r3/posix/semmutex-posix.cpp \
1559 r3/posix/semrw-posix.cpp \
1560 r3/posix/serialport-posix.cpp \
1561 r3/posix/symlink-posix.cpp \
1562 r3/posix/shmem-posix.cpp \
1563 r3/posix/thread-posix.cpp \
1564 r3/posix/thread2-posix.cpp \
1565 r3/posix/time-posix.cpp \
1566 r3/posix/timelocal-posix.cpp \
1567 r3/posix/timer-posix.cpp \
1568 r3/posix/tls-posix.cpp \
1569 r3/posix/utf8-posix.cpp
1570
1571RuntimeBaseR3_SOURCES.netbsd = \
1572 generic/cdrom-generic.cpp \
1573 generic/RTDirQueryInfo-generic.cpp \
1574 generic/RTDirSetMode-generic.cpp \
1575 generic/RTDirSetTimes-generic.cpp \
1576 generic/RTFileCopyPartEx-generic.cpp \
1577 generic/RTFileMove-generic.cpp \
1578 generic/RTFileQuerySectorSize-generic.cpp \
1579 generic/RTLogWriteDebugger-generic.cpp \
1580 generic/RTPathGetCurrentOnDrive-generic.cpp \
1581 generic/RTSemEventMultiWait-2-ex-generic.cpp \
1582 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
1583 generic/RTSystemQueryDmiString-generic.cpp \
1584 generic/RTSystemFirmware-generic.cpp \
1585 generic/RTSystemShutdown-generic.cpp \
1586 generic/RTThreadGetAffinity-stub-generic.cpp \
1587 generic/RTThreadSetAffinity-stub-generic.cpp \
1588 generic/RTThreadSetAffinityToCpu-generic.cpp \
1589 generic/RTTimeLocalNow-generic.cpp \
1590 generic/RTTimerCreate-generic.cpp \
1591 generic/RTUuidCreate-generic.cpp \
1592 generic/mppresent-generic.cpp \
1593 generic/sched-generic.cpp \
1594 generic/utf16locale-generic.cpp \
1595 generic/uuid-generic.cpp \
1596 generic/RTMpCpuId-generic.cpp \
1597 generic/RTMpGetCoreCount-generic.cpp \
1598 generic/RTMpGetOnlineCoreCount-generic.cpp \
1599 generic/RTProcDaemonize-generic.cpp \
1600 generic/RTProcIsRunningByName-generic.cpp \
1601 generic/RTThreadGetNativeState-generic.cpp \
1602 r3/netbsd/rtProcInitExePath-netbsd.cpp \
1603 r3/generic/allocex-r3-generic.cpp \
1604 r3/generic/RTLocaleQueryLocaleName-r3-generic.cpp \
1605 r3/generic/RTLocaleQueryNormalizedBaseLocaleName-r3-generic.cpp \
1606 r3/generic/RTLocaleQueryUserCountryCode-r3-generic.cpp \
1607 r3/generic/RTSystemGetNativeArch-r3-generic.cpp \
1608 r3/generic/dirrel-r3-generic.cpp \
1609 r3/posix/RTFileQueryFsSizes-posix.cpp \
1610 r3/posix/RTFsMountpointsEnum-posix.cpp \
1611 r3/posix/RTFileSetAllocationSize-posix.cpp \
1612 r3/posix/RTHandleGetStandard-posix.cpp \
1613 r3/posix/RTMemProtect-posix.cpp \
1614 r3/posix/RTPathUserHome-posix.cpp \
1615 r3/posix/RTSystemQueryOSInfo-posix.cpp \
1616 r3/posix/RTSystemQueryTotalRam-posix.cpp \
1617 r3/posix/RTTimeNow-posix.cpp \
1618 r3/posix/RTTimeSet-posix.cpp \
1619 r3/posix/RTTimeZoneGetCurrent-posix.cpp \
1620 r3/posix/dir-posix.cpp \
1621 r3/posix/env-posix.cpp \
1622 r3/posix/errvars-posix.cpp \
1623 r3/posix/fileio-posix.cpp \
1624 r3/posix/fileio2-posix.cpp \
1625 r3/posix/fileio-at-posix.cpp \
1626 r3/posix/fileio-sg-posix.cpp \
1627 r3/posix/fileio-sg-at-posix.cpp \
1628 r3/posix/filelock-posix.cpp \
1629 r3/posix/fs-posix.cpp \
1630 r3/posix/fs2-posix.cpp \
1631 r3/posix/fs3-posix.cpp \
1632 r3/posix/ldrNative-posix.cpp \
1633 r3/posix/mempage-native-posix.cpp \
1634 r3/posix/path-posix.cpp \
1635 r3/posix/path2-posix.cpp \
1636 r3/posix/pathhost-posix.cpp \
1637 r3/posix/RTPathUserDocuments-posix.cpp \
1638 r3/posix/pipe-posix.cpp \
1639 r3/posix/process-posix.cpp \
1640 r3/posix/process-creation-posix.cpp \
1641 r3/posix/rand-posix.cpp \
1642 r3/posix/semevent-posix.cpp \
1643 r3/posix/semeventmulti-posix.cpp \
1644 r3/posix/semmutex-posix.cpp \
1645 r3/posix/semrw-posix.cpp \
1646 r3/posix/serialport-posix.cpp \
1647 r3/posix/symlink-posix.cpp \
1648 r3/posix/shmem-posix.cpp \
1649 r3/posix/thread-posix.cpp \
1650 r3/posix/thread2-posix.cpp \
1651 r3/posix/time-posix.cpp \
1652 r3/posix/timelocal-posix.cpp \
1653 r3/posix/timer-posix.cpp \
1654 r3/posix/tls-posix.cpp \
1655 r3/posix/utf8-posix.cpp
1656
1657RuntimeBaseR3_SOURCES.solaris = \
1658 common/ioqueue/ioqueue-aiofile-provider.cpp \
1659 generic/cdrom-generic.cpp \
1660 generic/RTCrStoreCreateSnapshotById-generic.cpp \
1661 generic/RTDirQueryInfo-generic.cpp \
1662 generic/RTDirSetMode-generic.cpp \
1663 generic/RTDirSetTimes-generic.cpp \
1664 generic/RTFileCopyPartEx-generic.cpp \
1665 generic/RTFileMove-generic.cpp \
1666 generic/RTLogWriteDebugger-generic.cpp \
1667 generic/RTPathGetCurrentOnDrive-generic.cpp \
1668 generic/RTProcDaemonize-generic.cpp \
1669 generic/RTProcIsRunningByName-generic.cpp \
1670 generic/RTSemEventMultiWait-2-ex-generic.cpp \
1671 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
1672 generic/RTThreadSetAffinityToCpu-generic.cpp \
1673 generic/RTTimeLocalNow-generic.cpp \
1674 generic/RTTimerCreate-generic.cpp \
1675 generic/RTUuidCreate-generic.cpp \
1676 generic/sched-generic.cpp \
1677 generic/utf16locale-generic.cpp \
1678 generic/uuid-generic.cpp \
1679 generic/RTThreadGetNativeState-generic.cpp \
1680 r3/generic/allocex-r3-generic.cpp \
1681 r3/generic/RTLocaleQueryLocaleName-r3-generic.cpp \
1682 r3/generic/RTLocaleQueryNormalizedBaseLocaleName-r3-generic.cpp \
1683 r3/generic/RTLocaleQueryUserCountryCode-r3-generic.cpp \
1684 r3/generic/RTSystemGetNativeArch-r3-generic.cpp \
1685 r3/generic/dirrel-r3-generic.cpp \
1686 r3/posix/RTFileQueryFsSizes-posix.cpp \
1687 r3/posix/RTFsMountpointsEnum-posix.cpp \
1688 r3/posix/RTFileSetAllocationSize-posix.cpp \
1689 r3/posix/RTHandleGetStandard-posix.cpp \
1690 r3/posix/RTMemProtect-posix.cpp \
1691 r3/posix/RTPathUserHome-posix.cpp \
1692 r3/posix/RTSystemQueryOSInfo-posix.cpp \
1693 r3/posix/RTTimeNow-posix.cpp \
1694 r3/posix/RTTimeSet-posix.cpp \
1695 r3/posix/RTTimeZoneGetCurrent-posix.cpp \
1696 r3/posix/dir-posix.cpp \
1697 r3/posix/env-posix.cpp \
1698 r3/posix/errvars-posix.cpp \
1699 r3/posix/fileio-posix.cpp \
1700 r3/posix/fileio2-posix.cpp \
1701 r3/posix/fileio-at-posix.cpp \
1702 r3/posix/fileio-sg-posix.cpp \
1703 r3/posix/fileio-sg-at-posix.cpp \
1704 r3/posix/filelock-posix.cpp \
1705 r3/posix/fs-posix.cpp \
1706 r3/posix/fs2-posix.cpp \
1707 r3/posix/fs3-posix.cpp \
1708 r3/posix/ldrNative-posix.cpp \
1709 r3/posix/localipc-posix.cpp \
1710 r3/posix/mempage-native-posix.cpp \
1711 r3/posix/path-posix.cpp \
1712 r3/posix/path2-posix.cpp \
1713 r3/posix/pathhost-posix.cpp \
1714 r3/posix/RTPathUserDocuments-posix.cpp \
1715 r3/posix/pipe-posix.cpp \
1716 r3/posix/process-posix.cpp \
1717 r3/posix/process-creation-posix.cpp \
1718 r3/posix/rand-posix.cpp \
1719 r3/posix/semevent-posix.cpp \
1720 r3/posix/semeventmulti-posix.cpp \
1721 r3/posix/semmutex-posix.cpp \
1722 r3/posix/semrw-posix.cpp \
1723 r3/posix/serialport-posix.cpp \
1724 r3/posix/symlink-posix.cpp \
1725 r3/posix/shmem-posix.cpp \
1726 r3/posix/thread-posix.cpp \
1727 r3/posix/thread2-posix.cpp \
1728 r3/posix/time-posix.cpp \
1729 r3/posix/timelocal-posix.cpp \
1730 r3/posix/timer-posix.cpp \
1731 r3/posix/tls-posix.cpp \
1732 r3/posix/utf8-posix.cpp \
1733 r3/solaris/fileaio-solaris.cpp \
1734 r3/solaris/RTFileQuerySectorSize-solaris.cpp \
1735 r3/solaris/krnlmod-solaris.cpp \
1736 r3/solaris/systemmem-solaris.cpp \
1737 r3/solaris/mp-solaris.cpp \
1738 r3/solaris/rtProcInitExePath-solaris.cpp \
1739 r3/solaris/RTSystemFirmware-solaris.cpp \
1740 r3/solaris/RTSystemShutdown-solaris.cpp \
1741 r3/solaris/thread-affinity-solaris.cpp
1742RuntimeBaseR3_SOURCES.solaris.amd64 = \
1743 common/string/memrchr.asm \
1744 common/string/mempcpy.asm \
1745 r3/solaris/coredumper-solaris.cpp \
1746 r3/solaris/RTSystemQueryDmiString-solaris.cpp
1747RuntimeBaseR3_SOURCES.solaris.x86 = \
1748 common/string/memrchr.asm \
1749 common/string/mempcpy.asm \
1750 r3/solaris/coredumper-solaris.cpp \
1751 r3/solaris/RTSystemQueryDmiString-solaris.cpp
1752RuntimeBaseR3_SOURCES.solaris.sparc32 = \
1753 common/string/memrchr.cpp \
1754 common/string/mempcpy.cpp \
1755 generic/RTSystemQueryDmiString-generic.cpp
1756RuntimeBaseR3_SOURCES.solaris.sparc64 = \
1757 common/string/memrchr.cpp \
1758 common/string/mempcpy.cpp \
1759 generic/RTSystemQueryDmiString-generic.cpp
1760
1761RuntimeBaseR3_SOURCES.haiku = \
1762 generic/RTCrStoreCreateSnapshotById-generic.cpp \
1763 generic/RTDirQueryInfo-generic.cpp \
1764 generic/RTDirSetMode-generic.cpp \
1765 generic/RTDirSetTimes-generic.cpp \
1766 generic/fileio-at-generic.cpp \
1767 generic/fileio-sg-generic.cpp \
1768 generic/fileio-sg-at-generic.cpp \
1769 generic/RTFileCopyPartEx-generic.cpp \
1770 generic/RTFileMove-generic.cpp \
1771 generic/RTFileQuerySectorSize-generic.cpp \
1772 generic/RTFileSetAllocationSize-generic.cpp \
1773 generic/RTLogWriteDebugger-generic.cpp \
1774 generic/RTPathGetCurrentOnDrive-generic.cpp \
1775 generic/RTProcDaemonize-generic.cpp \
1776 generic/RTTimeLocalNow-generic.cpp \
1777 generic/RTTimerCreate-generic.cpp \
1778 generic/RTUuidCreate-generic.cpp \
1779 generic/mppresent-generic.cpp \
1780 generic/RTSemEventMultiWait-2-ex-generic.cpp \
1781 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
1782 generic/sched-generic.cpp \
1783 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
1784 generic/timer-generic.cpp \
1785 generic/utf16locale-generic.cpp \
1786 generic/uuid-generic.cpp \
1787 generic/RTProcIsRunningByName-generic.cpp \
1788 generic/RTThreadGetNativeState-generic.cpp \
1789 generic/RTMpGetCoreCount-generic.cpp \
1790 generic/RTMpGetOnlineCoreCount-generic.cpp \
1791 r3/haiku/rtProcInitExePath-haiku.cpp \
1792 r3/haiku/time-haiku.cpp \
1793 r3/generic/allocex-r3-generic.cpp \
1794 r3/generic/RTLocaleQueryLocaleName-r3-generic.cpp \
1795 r3/generic/RTLocaleQueryNormalizedBaseLocaleName-r3-generic.cpp \
1796 r3/generic/RTLocaleQueryUserCountryCode-r3-generic.cpp \
1797 r3/generic/RTSystemGetNativeArch-r3-generic.cpp \
1798 r3/generic/RTTimeZoneGetCurrent-generic.cpp \
1799 r3/generic/dirrel-r3-generic.cpp \
1800 r3/posix/RTFileQueryFsSizes-posix.cpp \
1801 r3/posix/RTFsMountpointsEnum-posix.cpp \
1802 r3/posix/RTHandleGetStandard-posix.cpp \
1803 r3/posix/RTMemProtect-posix.cpp \
1804 r3/posix/RTPathUserHome-posix.cpp \
1805 r3/posix/RTSystemQueryOSInfo-posix.cpp \
1806 r3/posix/RTSystemQueryTotalRam-posix.cpp \
1807 r3/posix/RTTimeNow-posix.cpp \
1808 r3/posix/dir-posix.cpp \
1809 r3/posix/env-posix.cpp \
1810 r3/posix/errvars-posix.cpp \
1811 r3/posix/fileio-posix.cpp \
1812 r3/posix/fileio2-posix.cpp \
1813 r3/posix/filelock-posix.cpp \
1814 r3/posix/fs-posix.cpp \
1815 r3/posix/fs2-posix.cpp \
1816 r3/posix/fs3-posix.cpp \
1817 r3/posix/ldrNative-posix.cpp \
1818 r3/posix/localipc-posix.cpp \
1819 r3/posix/mempage-native-posix.cpp \
1820 r3/posix/path-posix.cpp \
1821 r3/posix/path2-posix.cpp \
1822 r3/posix/pathhost-posix.cpp \
1823 r3/posix/pipe-posix.cpp \
1824 r3/posix/process-posix.cpp \
1825 r3/posix/process-creation-posix.cpp \
1826 r3/posix/rand-posix.cpp \
1827 r3/posix/semevent-posix.cpp \
1828 r3/posix/semeventmulti-posix.cpp \
1829 r3/posix/semmutex-posix.cpp \
1830 r3/posix/serialport-posix.cpp \
1831 r3/posix/symlink-posix.cpp \
1832 r3/posix/thread-posix.cpp \
1833 r3/posix/thread2-posix.cpp \
1834 r3/posix/timelocal-posix.cpp \
1835 r3/posix/tls-posix.cpp \
1836 r3/posix/utf8-posix.cpp
1837RuntimeBaseR3_SOURCES.haiku.x86 += common/string/memrchr.asm
1838RuntimeBaseR3_SOURCES.haiku.amd64 += common/string/memrchr.asm
1839
1840## PORTME: Porters add their selection of platform specific files for Ring-3 here.
1841
1842
1843#
1844# kBuild unit for generating nocrt aliases.
1845#
1846# This scans assembly, C and C++ source files for the target looking for macros
1847# that defines functions and variables needing aliasing.
1848#
1849UNIT_VBoxNoCrtAliases = CRT symbol alias for the rtnocr_xxx implementations
1850
1851# Only adding the VBOX_NOCRT_ALIASES property to library targets for now:
1852PROPS_ACCUMULATE_L += VBOX_NOCRT_ALIASES
1853PROPS_ACCUMULATE_L_LNK += VBOX_NOCRT_ALIASES
1854PROPS_LIBRARIES_ACCUMULATE_L += VBOX_NOCRT_ALIASES
1855PROPS_ALL += VBOX_NOCRT_ALIASES
1856
1857define def_unit_VBoxNoCrtAliases_double_expansion
1858 $$($(target)_2_VBOX_NOCRT_ALIAS_KMK_FILE).ts +| $$($(target)_2_VBOX_NOCRT_ALIAS_KMK_FILE): \
1859 $$(abspathex \
1860 $$($(target)_SOURCES) \
1861 $$($(target)_SOURCES.$(bld_trg)) \
1862 $$($(target)_SOURCES.$(bld_trg).$(bld_type)) \
1863 $$($(target)_SOURCES.$(bld_trg).$(bld_trg_arch)) \
1864 $$($(target)_SOURCES.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
1865 $$($(target)_SOURCES.$(bld_trg_arch)) \
1866 $$($(target)_SOURCES.$(bld_trg_cpu)) \
1867 $$($(target)_SOURCES.$(bld_type)) \
1868 , $(firstfile $(defpath) $(PATH_SUB_CURRENT))) \
1869 $$(VBOX_PATH_RUNTIME_SRC)//nocrt-aliases.sed
1870 $$(call MSG_GENERATE,$(target),$$@,)
1871 $$(QUIET)$$(MKDIR) -p -- "$$(dir $$@)"
1872 $$(QUIET)$$(APPEND) -tn "$$@" "$(target)_2_VBOX_NOCRT_ALIASES := \\"
1873 $$(xargs $$(QUIET)$$(SED) -rn -f "$$(VBOX_PATH_RUNTIME_SRC)/nocrt-aliases.sed" --append "$$@" , $$(filter %.c %.cpp %.asm, $$^) )
1874 $$(QUIET)$$(APPEND) -n "$$@" "" ""
1875 $$(QUIET)$$(CP) --changed -f -- "$$@" "$$(patsubst %.ts,%,$$@)"
1876
1877 $$($(target)_0_OUTDIR)/genalias/genalias.ts + $$($(target)_2_VBOX_NOCRT_ALIAS_FILES): | $$(VBOX_GENALIAS)
1878 $$(call MSG_GENERATE,$(target),$$@,)
1879 $$(QUIET)$$(MKDIR) -p -- "$$($(target)_0_OUTDIR)/genalias/"
1880 $$(QUIET)$$(VBOX_GENALIAS) -f $$(if-expr "$(bld_trg)" == "win",coff.$(bld_trg_arch),$$(if-expr "$(bld_trg)" == "darwin",macho,omf)) \
1881 -D "$$($(target)_0_OUTDIR)/genalias/" $$($(target)_2_VBOX_NOCRT_ALIASES) \
1882 $$($(target)_VBOX_NOCRT_ALIASES) \
1883 $$($(target)_VBOX_NOCRT_ALIASES.$(bld_trg)) \
1884 $$($(target)_VBOX_NOCRT_ALIASES.$(bld_trg).$(bld_type)) \
1885 $$($(target)_VBOX_NOCRT_ALIASES.$(bld_trg).$(bld_trg_arch)) \
1886 $$($(target)_VBOX_NOCRT_ALIASES.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
1887 $$($(target)_VBOX_NOCRT_ALIASES.$(bld_trg_arch)) \
1888 $$($(target)_VBOX_NOCRT_ALIASES.$(bld_trg_cpu)) \
1889 $$($(target)_VBOX_NOCRT_ALIASES.$(bld_type))
1890 $$(QUIET)$$(APPEND) -tn "$$($(target)_0_OUTDIR)/genalias/genalias.ts" "$$($(target)_2_VBOX_NOCRT_ALIASES))"
1891
1892 $(target)_2_OBJS += $$($(target)_2_VBOX_NOCRT_ALIAS_FILES)
1893 OTHER_CLEAN += $$($(target)_2_VBOX_NOCRT_ALIAS_KMK_FILE) $$($(target)_2_VBOX_NOCRT_ALIAS_KMK_FILE).ts
1894endef
1895
1896define def_unit_VBoxNoCrtAliases_target_pre
1897 if1of ($(bld_trg), win os2 darwin) # Only non-ELF targets as ELF does not support aliasing.
1898 $(target)_2_VBOX_NOCRT_ALIAS_KMK_FILE := $(PATH_OUT)/nocrt-aliases-$(target).kmk
1899 include $($(target)_2_VBOX_NOCRT_ALIAS_KMK_FILE)
1900 $(target)_2_VBOX_NOCRT_ALIAS_FILES := $(foreach alias,$($(target)_2_VBOX_NOCRT_ALIASES) \
1901 $($(target)_VBOX_NOCRT_ALIASES) \
1902 $($(target)_VBOX_NOCRT_ALIASES.$(bld_trg)) \
1903 $($(target)_VBOX_NOCRT_ALIASES.$(bld_trg).$(bld_type)) \
1904 $($(target)_VBOX_NOCRT_ALIASES.$(bld_trg).$(bld_trg_arch)) \
1905 $($(target)_VBOX_NOCRT_ALIASES.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
1906 $($(target)_VBOX_NOCRT_ALIASES.$(bld_trg_arch)) \
1907 $($(target)_VBOX_NOCRT_ALIASES.$(bld_trg_cpu)) \
1908 $($(target)_VBOX_NOCRT_ALIASES.$(bld_type)) \
1909 , $($(target)_0_OUTDIR)/genalias/$(firstword $(subst =, $(SPACE),$(alias))).o)
1910 $(eval $(def_unit_VBoxNoCrtAliases_double_expansion))
1911 endif
1912endef
1913
1914
1915#
1916# RuntimeR3 - Static Runtime for Ring-3 executables.
1917#
1918# We drop the windows error defines here for reason of size. The valkit tstUtf8
1919# was reduced by 175KB, from 600KB to 425KB (about 30%). Come up with a way of
1920# stripping it down or compressing it better and it can be added back.
1921# - 2022-08-17, bird.
1922#
1923RuntimeR3_TEMPLATE = VBoxR3Static
1924RuntimeR3_EXTENDS = RuntimeBaseR3
1925RuntimeR3_DEFS.win = $(RuntimeBaseR3_DEFS.win) IPRT_NO_WIN_ERROR_DATA
1926ifdef VBOX_WITH_NOCRT_STATIC
1927 if1of ($(KBUILD_TARGET), win)
1928 RuntimeR3_USES = $(RuntimeBaseR3_USES) VBoxNoCrtAliases
1929 RuntimeR3_DEFS = $(filter-out RT_WITHOUT_NOCRT_WRAPPERS,$(RuntimeBaseR3_DEFS)) \
1930 RT_FORCE_NOCRT_WRAPPERS \
1931 RT_WITH_NOCRT_ALIASES RT_WITH_NOCRT_UNDERSCORE_ALIASES RT_WITH_GENALIAS_NOCRT_ALIASES
1932
1933 RuntimeR3_SOURCES = $(filter-out \
1934 r3/alloc.cpp \
1935 r3/alloc-ef.cpp \
1936 r3/xml.cpp \
1937 common/zip/xarvfs.cpp \
1938 common/misc/json.cpp \
1939 generic/RTLogWriteStdErr-generic.cpp \
1940 generic/RTLogWriteStdOut-generic.cpp \
1941 ,$(RuntimeBaseR3_SOURCES)) \
1942 \
1943 common/err/nocrt-strerror.cpp \
1944 common/file/nocrt-open.cpp \
1945 common/file/nocrt-close.cpp \
1946 common/file/nocrt-fstat.cpp \
1947 common/file/nocrt-isatty.cpp \
1948 common/file/nocrt-read.cpp \
1949 common/math/nocrt-abs.cpp \
1950 common/math/nocrt-labs.cpp \
1951 common/math/nocrt-llabs.cpp \
1952 common/math/consts.c \
1953 common/math/copysign.cpp \
1954 common/math/copysignf.cpp \
1955 common/math/copysignl.cpp \
1956 common/math/fmax.cpp \
1957 common/math/fmaxf.cpp \
1958 common/math/fmaxl.cpp \
1959 common/math/fmin.cpp \
1960 common/math/fminf.cpp \
1961 common/math/fminl.cpp \
1962 common/math/frexp.cpp \
1963 common/math/frexpf.cpp \
1964 common/math/frexpl.cpp \
1965 common/math/__fpclassifyd.cpp \
1966 common/math/__fpclassifyf.cpp \
1967 common/math/__fpclassifyl.cpp \
1968 common/math/__isfinite.cpp \
1969 common/math/__isfinitef.cpp \
1970 common/math/__isfinitel.cpp \
1971 common/math/isinf.cpp \
1972 common/math/__isinff.cpp \
1973 common/math/__isinfl.cpp \
1974 common/math/isnan.cpp \
1975 common/math/isnanf.cpp \
1976 common/math/__isnanl.cpp \
1977 common/math/__isnormal.cpp \
1978 common/math/__isnormalf.cpp \
1979 common/math/__isnormall.cpp \
1980 common/math/llround.cpp \
1981 common/math/llroundf.cpp \
1982 common/math/llroundl.cpp \
1983 common/math/lround.cpp \
1984 common/math/lroundf.cpp \
1985 common/math/lroundl.cpp \
1986 common/math/round.cpp \
1987 common/math/roundf.cpp \
1988 common/math/roundl.cpp \
1989 common/math/__signbit.cpp \
1990 common/math/__signbitf.cpp \
1991 common/math/__signbitl.cpp \
1992 common/path/nocrt-access.cpp \
1993 common/path/nocrt-unlink.cpp \
1994 common/rand/nocrt-rand.cpp \
1995 common/sort/nocrt-qsort.cpp \
1996 common/sort/nocrt-qsort_r.cpp \
1997 common/sort/nocrt-bsearch.cpp \
1998 common/string/nocrt-strdup.cpp \
1999 common/string/nocrt-stricmp.cpp \
2000 common/string/nocrt-strtod.cpp \
2001 common/string/nocrt-atof.cpp \
2002 common/string/nocrt-strtol.cpp \
2003 common/string/nocrt-strtoll.cpp \
2004 common/string/nocrt-strtoul.cpp \
2005 common/string/nocrt-strtoull.cpp \
2006 common/string/nocrt-snprintf.cpp \
2007 common/string/nocrt-vsnprintf.cpp \
2008 common/string/nocrt-scprintf.cpp \
2009 common/string/nocrt-vscprintf.cpp \
2010 common/string/nocrt-sscanf.cpp \
2011 common/string/nocrt-vsscanf.cpp \
2012 common/string/atoi.cpp \
2013 common/string/strtok_r.cpp \
2014 r3/nocrt-per-thread-1.cpp \
2015 r3/nocrt-per-thread-2.cpp \
2016 r3/nocrt-errno.cpp \
2017 r3/nocrt-fopen.cpp \
2018 r3/nocrt-fdopen.cpp \
2019 r3/nocrt-tmpfile.cpp \
2020 r3/nocrt-tmpfile_s.cpp \
2021 r3/nocrt-fileno.cpp \
2022 r3/nocrt-fclose.cpp \
2023 r3/nocrt-fflush.cpp \
2024 r3/nocrt-setvbuf.cpp \
2025 r3/nocrt-fseek.cpp \
2026 r3/nocrt-fseeko.cpp \
2027 r3/nocrt-ftell.cpp \
2028 r3/nocrt-ftello.cpp \
2029 r3/nocrt-fwrite.cpp \
2030 r3/nocrt-fputc.cpp \
2031 r3/nocrt-putc.cpp \
2032 r3/nocrt-fputs.cpp \
2033 r3/nocrt-puts.cpp \
2034 r3/nocrt-fread.cpp \
2035 r3/nocrt-fgetc.cpp \
2036 r3/nocrt-getc.cpp \
2037 r3/nocrt-clearerr.cpp \
2038 r3/nocrt-ferror.cpp \
2039 r3/nocrt-cerr.cpp \
2040 r3/nocrt-cout.cpp
2041
2042 RuntimeR3_SOURCES.x86 = $(RuntimeBaseR3_SOURCES.x86) \
2043 common/math/atan.asm \
2044 common/math/atanf.asm \
2045 common/math/atan2.asm \
2046 common/math/atan2f.asm \
2047 common/math/cos.asm \
2048 common/math/cosf.asm \
2049 common/math/ceil.asm \
2050 common/math/ceilf.asm \
2051 common/math/exp.asm \
2052 common/math/expf.asm \
2053 common/math/exp2.asm \
2054 common/math/exp2f.asm \
2055 common/math/fabs.asm \
2056 common/math/fabsf.asm \
2057 common/math/rtNoCrtHasSse.asm \
2058 common/math/fegetenv.asm \
2059 common/math/fesetenv.asm \
2060 common/math/feholdexcept.asm \
2061 common/math/feupdateenv.asm \
2062 common/math/fegetround.asm \
2063 common/math/fesetround.asm \
2064 common/math/fegetx87precision.asm \
2065 common/math/fesetx87precision.asm \
2066 common/math/fegetexcept.asm \
2067 common/math/feenableexcept.asm \
2068 common/math/fedisableexcept.asm \
2069 common/math/feclearexcept.asm \
2070 common/math/fegetexceptflag.asm \
2071 common/math/fesetexceptflag.asm \
2072 common/math/fetestexcept.asm \
2073 common/math/feraiseexcept.asm \
2074 common/math/floor.asm \
2075 common/math/floorf.asm \
2076 common/math/ldexp.asm \
2077 common/math/ldexpf.asm \
2078 common/math/log.asm \
2079 common/math/logf.asm \
2080 common/math/log2.asm \
2081 common/math/log2f.asm \
2082 common/math/llrint.asm \
2083 common/math/llrintf.asm \
2084 common/math/lrint.asm \
2085 common/math/lrintf.asm \
2086 common/math/pow.asm \
2087 common/math/powf.asm \
2088 common/math/powcore.asm \
2089 common/math/remainder.asm \
2090 common/math/remainderf.asm \
2091 common/math/rint.asm \
2092 common/math/rintf.asm \
2093 common/math/sin.asm \
2094 common/math/sinf.asm \
2095 common/math/sincore.asm \
2096 common/math/sqrt.asm \
2097 common/math/sqrtf.asm \
2098 common/math/tan.asm \
2099 common/math/tanf.asm \
2100 common/math/trunc.asm \
2101 common/math/truncf.asm \
2102 common/misc/setjmp.asm \
2103 common/string/memcpy.asm \
2104 common/string/memchr.asm \
2105 common/string/memcmp.asm \
2106 common/string/memmove.asm \
2107 common/string/memset.asm \
2108 common/string/strlen.asm \
2109 common/string/strnlen.cpp \
2110 common/string/strchr.asm \
2111 common/string/strcmp.asm \
2112 common/string/strncmp.asm \
2113 common/string/strcpy.asm \
2114 common/string/strncpy.asm \
2115 common/string/strcat.cpp \
2116 common/string/strncat.cpp \
2117 common/string/strrchr.cpp \
2118 common/string/strstr.cpp \
2119 common/string/strcspn.cpp \
2120 common/string/strpbrk.cpp \
2121 common/string/wcslen.asm
2122
2123 RuntimeR3_SOURCES.amd64 = $(RuntimeBaseR3_SOURCES.amd64) \
2124 common/math/atan.asm \
2125 common/math/atanf.asm \
2126 common/math/atan2.asm \
2127 common/math/atan2f.asm \
2128 common/math/cos.asm \
2129 common/math/cosf.asm \
2130 common/math/ceil.asm \
2131 common/math/ceilf.asm \
2132 common/math/exp.asm \
2133 common/math/expf.asm \
2134 common/math/exp2.asm \
2135 common/math/exp2f.asm \
2136 common/math/fabs.asm \
2137 common/math/fabsf.asm \
2138 common/math/fegetenv.asm \
2139 common/math/fesetenv.asm \
2140 common/math/feholdexcept.asm \
2141 common/math/feupdateenv.asm \
2142 common/math/fegetround.asm \
2143 common/math/fesetround.asm \
2144 common/math/fegetx87precision.asm \
2145 common/math/fesetx87precision.asm \
2146 common/math/fegetexcept.asm \
2147 common/math/feenableexcept.asm \
2148 common/math/fedisableexcept.asm \
2149 common/math/feclearexcept.asm \
2150 common/math/fegetexceptflag.asm \
2151 common/math/fesetexceptflag.asm \
2152 common/math/fetestexcept.asm \
2153 common/math/feraiseexcept.asm \
2154 common/math/floor.asm \
2155 common/math/floorf.asm \
2156 common/math/ldexp.asm \
2157 common/math/ldexpf.asm \
2158 common/math/log.asm \
2159 common/math/logf.asm \
2160 common/math/log2.asm \
2161 common/math/log2f.asm \
2162 common/math/llrint.asm \
2163 common/math/llrintf.asm \
2164 common/math/lrint.asm \
2165 common/math/lrintf.asm \
2166 common/math/pow.asm \
2167 common/math/powf.asm \
2168 common/math/powcore.asm \
2169 common/math/remainder.asm \
2170 common/math/remainderf.asm \
2171 common/math/rint.asm \
2172 common/math/rintf.asm \
2173 common/math/sin.asm \
2174 common/math/sinf.asm \
2175 common/math/sincore.asm \
2176 common/math/sqrt.asm \
2177 common/math/sqrtf.asm \
2178 common/math/tan.asm \
2179 common/math/tanf.asm \
2180 common/math/trunc.asm \
2181 common/math/truncf.asm \
2182 common/misc/setjmp.asm \
2183 common/string/memcpy.asm \
2184 common/string/memchr.asm \
2185 common/string/memcmp.asm \
2186 common/string/memmove.asm \
2187 common/string/memset.asm \
2188 common/string/strlen.asm \
2189 common/string/strnlen.cpp \
2190 common/string/strchr.asm \
2191 common/string/strcmp.asm \
2192 common/string/strncmp.asm \
2193 common/string/strcpy.asm \
2194 common/string/strncpy.asm \
2195 common/string/strcat.cpp \
2196 common/string/strncat.cpp \
2197 common/string/strrchr.cpp \
2198 common/string/strstr.cpp \
2199 common/string/strcspn.cpp \
2200 common/string/strpbrk.cpp \
2201 common/string/wcslen.asm
2202
2203 RuntimeR3_SOURCES.win = $(filter-out \
2204 r3/generic/RTLocaleQueryLocaleName-r3-generic.cpp \
2205 ,$(RuntimeBaseR3_SOURCES.win)) \
2206 \
2207 common/compiler/vcc/atexit-vcc.cpp \
2208 common/compiler/vcc/loadcfg-vcc.c \
2209 common/compiler/vcc/tlsdir-vcc.c \
2210 common/compiler/vcc/initializers-c-cpp-vcc.cpp \
2211 common/compiler/vcc/stacksup-vcc.cpp \
2212 common/compiler/vcc/fltused-vcc.cpp \
2213 common/compiler/vcc/purecall-vcc.cpp \
2214 common/file/nocrt-dup.cpp \
2215 r3/win/nocrt-startup-exe-win.cpp \
2216 r3/win/nocrt-startup-dll-win.cpp \
2217 r3/win/nocrt-startup-common-win.cpp \
2218 r3/win/nocrt-fatal-write-win.cpp \
2219 r3/win/nocrt-alloc-win.cpp \
2220 r3/win/nocrt-RTLogWriteStdErr-win.cpp \
2221 r3/win/nocrt-RTLogWriteStdOut-win.cpp \
2222 generic/new-delete-generic.cpp
2223 RuntimeR3_SOURCES.win.amd64 = $(RuntimeBaseR3_SOURCES.win.amd64) \
2224 r3/win/nocrt-atexit-win.asm \
2225 r3/win/nocrt-mainCRTStartup-win.asm \
2226 r3/win/nocrt-WinMainCRTStartup-win.asm \
2227 common/compiler/vcc/guard-vcc.asm \
2228 common/compiler/vcc/stack-vcc.asm \
2229 common/compiler/vcc/stack-except-vcc.cpp \
2230 common/compiler/vcc/stack-except-seh-vcc.cpp \
2231 common/compiler/vcc/stack-probe-vcc.asm \
2232 common/compiler/vcc/except-seh-vcc.cpp
2233 RuntimeR3_SOURCES.win.x86 = $(RuntimeBaseR3_SOURCES.win.x86) \
2234 r3/win/nocrt-atexit-win.asm \
2235 r3/win/nocrt-mainCRTStartup-win.asm \
2236 r3/win/nocrt-WinMainCRTStartup-win.asm \
2237 common/compiler/vcc/guard-vcc.asm \
2238 common/compiler/vcc/stack-vcc.asm \
2239 common/compiler/vcc/stack-probe-vcc.asm \
2240 common/compiler/vcc/ftol2-vcc.asm \
2241 common/compiler/vcc/except-x86-vcc.cpp \
2242 common/compiler/vcc/except-x86-vcc-asm.asm \
2243 common/compiler/vcc/x86-allshl.asm \
2244 common/compiler/vcc/x86-allshr.asm \
2245 common/compiler/vcc/x86-aullshr.asm \
2246 common/compiler/vcc/x86-allmul.asm \
2247 common/compiler/vcc/x86-alldiv.asm \
2248 common/compiler/vcc/x86-allrem.asm \
2249 common/compiler/vcc/x86-alldvrm.asm \
2250 common/compiler/vcc/x86-aulldiv.asm \
2251 common/compiler/vcc/x86-aullrem.asm \
2252 common/compiler/vcc/x86-aulldvrm.asm
2253 RuntimeR3_VBOX_NOCRT_ALIASES.win := \
2254 strtok_s=nocrt_strtok_r _strtok_s=nocrt_strtok_r nocrt_strtok_s=nocrt_strtok_r \
2255 $(foreach fn, atan atan2 cos ceil exp fabs floor ldexp log lrint llrint remainder sin tan \
2256 ,$(fn)l=nocrt_$(fn) _$(fn)l=nocrt_$(fn))
2257 endif
2258endif
2259
2260
2261#
2262# Generate RTIsoMaker / VISO help text from the manpage xml.
2263#
2264ifn1of ($(KBUILD_TARGET), os2) # breaks validationkit, figure out later.
2265
2266 IPRT_XML_REFENTRY_FILES = \
2267 common/fs/isomakercmd-man.xml
2268
2269 #$(call KB_FN_DO_PASS0_ON_TARGET,RuntimeR3)
2270
2271 BLDDIRS += $(IPRT_OUT_DIR)/man/
2272 OTHER_CLEAN += $(foreach xml,$(basename $(notdir $(IPRT_XML_REFENTRY_FILES))), \
2273 $(IPRT_OUT_DIR)/man/$(xml).xml $(IPRT_OUT_DIR)/man/$(xml).h $(IPRT_OUT_DIR)/man/$(xml).h.ts)
2274
2275
2276 include $(PATH_ROOT)/doc/manual/Config.kmk
2277
2278 # Preprocess the xml files, applying remarks.
2279 $(foreach file,$(IPRT_XML_REFENTRY_FILES) \
2280 , $(evalcall2 def_vbox_refentry_preprocess_for_manpage,$(IPRT_OUT_DIR)/man,$(notdir $(file)),$(VBOX_PATH_RUNTIME_SRC)/$(file)))
2281
2282 # generate the header and add it as a dependency to the source using it.
2283 $(evalcall2 def_vbox_single_refentry_to_h,$(IPRT_OUT_DIR)/man/isomakercmd-man.h, $(IPRT_OUT_DIR)/man/isomakercmd-man.xml)
2284 common/fs/isomakercmd.cpp_DEPS = $(IPRT_OUT_DIR)/man/isomakercmd-man.h
2285 common/fs/isomakercmd.cpp_INCS = $(IPRT_OUT_DIR)/man/
2286
2287endif
2288
2289
2290#
2291# RuntimeR3-x86 - 32-bit version of RuntimeR3 for windows hosts.
2292#
2293RuntimeR3-x86_EXTENDS := RuntimeR3
2294RuntimeR3-x86_BLD_TRG_ARCH := x86
2295RuntimeR3-x86_DEFS = $(filter-out IN_SUP_R3 IN_SUP, $(RuntimeR3_DEFS)) IPRT_WITHOUT_LDR_VERIFY RT_NO_GIP
2296
2297
2298#
2299# RuntimeR3NoAsan - A RuntimeR3 version without ASAN for windows hosts.
2300#
2301RuntimeR3NoAsan_EXTENDS := RuntimeR3
2302RuntimeR3NoAsan_TEMPLATE := VBoxR3StaticExeNoAsan
2303
2304
2305#
2306# RuntimeBldProg - Static Runtime for build programs.
2307#
2308# Note! This is a bit of hacky since kBuild doesn't support building libraries
2309# for build programs.
2310#
2311RuntimeBldProg_TEMPLATE := VBoxAdvBldProg
2312RuntimeBldProg_EXTENDS := RuntimeBaseR3
2313RuntimeBldProg_BLD_TRG := $(KBUILD_HOST)
2314RuntimeBldProg_BLD_TRG_ARCH := $(KBUILD_HOST_ARCH)
2315RuntimeBldProg_BLD_TRG_CPU := $(KBUILD_HOST_CPU)
2316RuntimeBldProg_DEFS := $(filter-out IN_SUP_R3 IN_SUP, $(RuntimeBaseR3_DEFS)) IPRT_WITHOUT_LDR_VERIFY RT_NO_GIP
2317RuntimeBldProg_SOURCES = \
2318 common/alloc/alloc.cpp \
2319 common/alloc/memcache.cpp \
2320 common/asn1/asn1-basics.cpp \
2321 common/asn1/asn1-cursor.cpp \
2322 common/asn1/asn1-default-allocator.cpp \
2323 common/asn1/asn1-dump.cpp \
2324 common/asn1/asn1-efence-allocator.cpp \
2325 common/asn1/asn1-encode.cpp \
2326 common/asn1/asn1-safer-allocator.cpp \
2327 common/asn1/asn1-ut-bitstring-decode.cpp \
2328 common/asn1/asn1-ut-bitstring.cpp \
2329 common/asn1/asn1-ut-boolean-decode.cpp \
2330 common/asn1/asn1-ut-boolean.cpp \
2331 common/asn1/asn1-ut-core-decode.cpp \
2332 common/asn1/asn1-ut-core.cpp \
2333 common/asn1/asn1-ut-dyntype-decode.cpp \
2334 common/asn1/asn1-ut-dyntype.cpp \
2335 common/asn1/asn1-ut-integer-decode.cpp \
2336 common/asn1/asn1-ut-integer.cpp \
2337 common/asn1/asn1-ut-null-decode.cpp \
2338 common/asn1/asn1-ut-null.cpp \
2339 common/asn1/asn1-ut-objid-decode.cpp \
2340 common/asn1/asn1-ut-objid.cpp \
2341 common/asn1/asn1-ut-octetstring-decode.cpp \
2342 common/asn1/asn1-ut-octetstring.cpp \
2343 common/asn1/asn1-ut-string-decode.cpp \
2344 common/asn1/asn1-ut-string.cpp \
2345 common/asn1/asn1-ut-time-decode.cpp \
2346 common/asn1/asn1-ut-time.cpp \
2347 common/checksum/adler32.cpp \
2348 common/checksum/alt-md2.cpp \
2349 common/checksum/alt-md4.cpp \
2350 common/checksum/alt-md5.cpp \
2351 common/checksum/alt-sha1.cpp \
2352 common/checksum/alt-sha256.cpp \
2353 common/checksum/alt-sha512.cpp \
2354 common/checksum/alt-sha3.cpp \
2355 common/checksum/crc16ccitt.cpp \
2356 common/checksum/crc32.cpp \
2357 common/checksum/crc32c.cpp \
2358 common/checksum/crc64.cpp \
2359 common/checksum/manifest2.cpp \
2360 common/checksum/manifest3.cpp \
2361 common/checksum/md5str.cpp \
2362 common/checksum/sha1str.cpp \
2363 common/checksum/sha256str.cpp \
2364 common/checksum/sha512str.cpp \
2365 common/crypto/digest-builtin.cpp \
2366 common/crypto/digest-core.cpp \
2367 common/crypto/key.cpp \
2368 common/crypto/pemfile-read.cpp \
2369 common/crypto/pkcs7-asn1-decoder.cpp \
2370 common/crypto/pkcs7-core.cpp \
2371 common/crypto/pkcs7-init.cpp \
2372 common/crypto/pkcs7-sanity.cpp \
2373 common/crypto/pkcs7-verify.cpp \
2374 common/crypto/pkcs8-asn1-decoder.cpp \
2375 common/crypto/pkcs8-core.cpp \
2376 common/crypto/pkcs8-init.cpp \
2377 common/crypto/pkcs8-sanity.cpp \
2378 common/crypto/pkix-signature-builtin.cpp \
2379 common/crypto/pkix-signature-core.cpp \
2380 common/crypto/pkix-signature-rsa.cpp \
2381 common/crypto/pkix-signature-ossl.cpp \
2382 common/crypto/pkix-util.cpp \
2383 common/crypto/pkix-verify.cpp \
2384 common/crypto/rsa-asn1-decoder.cpp \
2385 common/crypto/rsa-core.cpp \
2386 common/crypto/rsa-init.cpp \
2387 common/crypto/rsa-sanity.cpp \
2388 common/crypto/RTCrStoreCertAddFromJavaKeyStore.cpp \
2389 common/crypto/RTCrStoreCreateSnapshotOfUserAndSystemTrustedCAsAndCerts.cpp \
2390 common/crypto/spc-asn1-decoder.cpp \
2391 common/crypto/spc-core.cpp \
2392 common/crypto/spc-init.cpp \
2393 common/crypto/spc-sanity.cpp \
2394 common/crypto/store-cert-add-basic.cpp \
2395 common/crypto/store-inmem.cpp \
2396 common/crypto/store.cpp \
2397 common/crypto/taf-asn1-decoder.cpp \
2398 common/crypto/taf-core.cpp \
2399 common/crypto/taf-init.cpp \
2400 common/crypto/taf-sanity.cpp \
2401 common/crypto/tsp-asn1-decoder.cpp \
2402 common/crypto/tsp-core.cpp \
2403 common/crypto/tsp-init.cpp \
2404 common/crypto/tsp-sanity.cpp \
2405 common/crypto/x509-asn1-decoder.cpp \
2406 common/crypto/x509-certpaths.cpp \
2407 common/crypto/x509-core.cpp \
2408 common/crypto/x509-create-sign.cpp \
2409 common/crypto/x509-file.cpp \
2410 common/crypto/x509-init.cpp \
2411 common/crypto/x509-sanity.cpp \
2412 common/crypto/x509-verify.cpp \
2413 common/dbg/dbg.cpp \
2414 common/dbg/dbgcfg.cpp \
2415 common/dbg/dbgmod.cpp \
2416 common/dbg/dbgmodcodeview.cpp \
2417 common/dbg/dbgmodcontainer.cpp \
2418 common/dbg/dbgmoddeferred.cpp \
2419 common/dbg/dbgmoddwarf.cpp \
2420 common/dbg/dbgmodexports.cpp \
2421 common/dbg/dbgmodldr.cpp \
2422 common/dbg/dbgmodmapsym.cpp \
2423 common/dbg/dbgmodnm.cpp \
2424 common/err/errinfo-alloc.cpp \
2425 common/err/errinfo.cpp \
2426 common/err/errinfolog.cpp \
2427 common/err/errmsg.cpp \
2428 common/err/RTErrConvertFromErrno.cpp \
2429 common/err/RTErrConvertToErrno.cpp \
2430 common/fs/isomaker.cpp \
2431 common/fs/isomakercmd.cpp \
2432 common/fs/isomakerimport.cpp \
2433 common/fs/isovfs.cpp \
2434 common/fs/pdbvfs.cpp \
2435 common/ldr/ldr.cpp \
2436 common/ldr/ldrELF.cpp \
2437 common/ldr/ldrEx.cpp \
2438 common/ldr/ldrFile.cpp \
2439 common/ldr/ldrLX.cpp \
2440 common/ldr/ldrMachO.cpp \
2441 common/ldr/ldrNative.cpp \
2442 common/ldr/ldrPE.cpp \
2443 common/ldr/ldrVfsFile.cpp \
2444 common/log/log.cpp \
2445 common/log/log-weak.cpp \
2446 common/log/log-weak-assert.cpp \
2447 common/log/log-weak-rel.cpp \
2448 common/log/logellipsis.cpp \
2449 common/log/logformat.cpp \
2450 common/log/logrel.cpp \
2451 common/log/logrelellipsis.cpp \
2452 common/log/RTLogCreateEx.cpp \
2453 common/math/bignum.cpp \
2454 common/misc/assert.cpp \
2455 common/misc/cidr.cpp \
2456 common/misc/getopt.cpp \
2457 common/misc/getoptargv.cpp \
2458 common/misc/lockvalidator.cpp \
2459 common/misc/message.cpp \
2460 common/misc/messagerefentry.cpp \
2461 common/misc/once.cpp \
2462 common/misc/RTAssertMsg1Weak.cpp \
2463 common/misc/RTAssertMsg2.cpp \
2464 common/misc/RTAssertMsg2Add.cpp \
2465 common/misc/RTAssertMsg2AddWeak.cpp \
2466 common/misc/RTAssertMsg2AddWeakV.cpp \
2467 common/misc/RTAssertMsg2Weak.cpp \
2468 common/misc/RTAssertMsg2WeakV.cpp \
2469 common/misc/RTFileModeToFlags.cpp \
2470 common/misc/RTFileOpenF.cpp \
2471 common/misc/RTFileOpenV.cpp \
2472 common/misc/RTMemWipeThoroughly.cpp \
2473 common/misc/req.cpp \
2474 common/misc/reqqueue.cpp \
2475 common/misc/reqpool.cpp \
2476 common/misc/sanity-c.c \
2477 common/misc/sanity-cpp.cpp \
2478 common/misc/sg.cpp \
2479 common/misc/term.cpp \
2480 common/misc/thread.cpp \
2481 common/net/macstr.cpp \
2482 common/net/netaddrstr2.cpp \
2483 common/path/comparepaths.cpp \
2484 common/path/RTPathAbsDup.cpp \
2485 common/path/RTPathAbsEx.cpp \
2486 common/path/RTPathAbsExDup.cpp \
2487 common/path/RTPathAppend.cpp \
2488 common/path/RTPathAppendEx.cpp \
2489 common/path/RTPathChangeToDosSlashes.cpp \
2490 common/path/RTPathChangeToUnixSlashes.cpp \
2491 common/path/RTPathCopyComponents.cpp \
2492 common/path/RTPathCountComponents.cpp \
2493 common/path/RTPathEnsureTrailingSeparator.cpp \
2494 common/path/RTPathExt.cpp \
2495 common/path/RTPathFilename.cpp \
2496 common/path/RTPathHasExt.cpp \
2497 common/path/RTPathHasPath.cpp \
2498 common/path/RTPathJoin.cpp \
2499 common/path/RTPathJoinA.cpp \
2500 common/path/RTPathJoinEx.cpp \
2501 common/path/RTPathParse.cpp \
2502 common/path/RTPathParsedReassemble.cpp \
2503 common/path/RTPathParseSimple.cpp \
2504 common/path/RTPathRealDup.cpp \
2505 common/path/rtPathRootSpecLen.cpp \
2506 common/path/RTPathSkipRootSpec.cpp \
2507 common/path/RTPathSplit.cpp \
2508 common/path/RTPathSplitA.cpp \
2509 common/path/RTPathSplitReassemble.cpp \
2510 common/path/RTPathStartsWithRoot.cpp \
2511 common/path/RTPathStripExt.cpp \
2512 common/path/RTPathStripFilename.cpp \
2513 common/path/RTPathStripTrailingSlash.cpp \
2514 common/path/RTPathTraverseList.cpp \
2515 common/path/rtPathVolumeSpecLen.cpp \
2516 common/rand/rand.cpp \
2517 common/rand/randadv.cpp \
2518 common/rand/randparkmiller.cpp \
2519 common/sort/shellsort.cpp \
2520 common/string/base64.cpp \
2521 common/string/RTStrCat.cpp \
2522 common/string/RTStrCmp.cpp \
2523 common/string/RTStrCopy.cpp \
2524 common/string/RTStrCopyEx.cpp \
2525 common/string/RTStrCopyP.cpp \
2526 common/string/RTStrICmpAscii.cpp \
2527 common/string/RTStrIStartsWith.cpp \
2528 common/string/RTStrNCmp.cpp \
2529 common/string/RTStrNICmpAscii.cpp \
2530 common/string/RTStrNLen.cpp \
2531 common/string/RTStrPrintHexBytes.cpp \
2532 common/string/RTStrStartsWith.cpp \
2533 common/string/RTStrStr.cpp \
2534 common/string/simplepattern.cpp \
2535 common/string/straprintf.cpp \
2536 common/string/strcache.cpp \
2537 common/string/strformat.cpp \
2538 common/string/RTStrFormat.cpp \
2539 common/string/strformatnum.cpp \
2540 common/string/strformatrt.cpp \
2541 common/string/strformattype.cpp \
2542 common/string/strhash1.cpp \
2543 common/string/stringalloc.cpp \
2544 common/string/strprintf.cpp \
2545 common/string/strprintf-ellipsis.cpp \
2546 common/string/strprintf2.cpp \
2547 common/string/strprintf2-ellipsis.cpp \
2548 common/string/strspace.cpp \
2549 common/string/strstrip.cpp \
2550 common/string/strtonum.cpp \
2551 common/string/unidata-flags.cpp \
2552 common/string/unidata-lower.cpp \
2553 common/string/unidata-upper.cpp \
2554 common/string/RTUtf16CopyAscii.cpp \
2555 common/string/utf-16-case.cpp \
2556 common/string/utf-16.cpp \
2557 common/string/utf-8-case.cpp \
2558 common/string/utf-8-case2.cpp \
2559 common/string/utf-8.cpp \
2560 common/table/avllu32.cpp \
2561 common/table/avlpv.cpp \
2562 common/table/avlrpv.cpp \
2563 common/table/avlruintptr.cpp \
2564 common/table/avlu32.cpp \
2565 common/table/avluintptr.cpp \
2566 common/time/time.cpp \
2567 common/time/timeprog.cpp \
2568 common/time/timesupref.cpp \
2569 common/time/timesysalias.cpp \
2570 common/vfs/vfsbase.cpp \
2571 common/vfs/vfschain.cpp \
2572 common/vfs/vfsiosmisc.cpp \
2573 common/vfs/vfsmemory.cpp \
2574 common/vfs/vfsmisc.cpp \
2575 common/vfs/vfsmsg.cpp \
2576 common/vfs/vfsstddir.cpp \
2577 common/vfs/vfsstdfile.cpp \
2578 common/vfs/vfsstdpipe.cpp \
2579 common/zip/gzipvfs.cpp \
2580 common/zip/tarcmd.cpp \
2581 common/zip/tarvfs.cpp \
2582 common/zip/tarvfswriter.cpp \
2583 generic/critsect-generic.cpp \
2584 generic/critsectrw-generic.cpp \
2585 generic/env-generic.cpp \
2586 generic/mempool-generic.cpp \
2587 generic/RTEnvDupEx-generic.cpp \
2588 generic/RTFileCopy-generic.cpp \
2589 generic/RTFileCopyAttributes-generic.cpp \
2590 generic/RTFileCopyEx-generic.cpp \
2591 generic/RTFileCopyByHandlesEx-generic.cpp \
2592 generic/RTFileQuerySize-generic.cpp \
2593 generic/RTFileReadAll-generic.cpp \
2594 generic/RTFileReadAllByHandle-generic.cpp \
2595 generic/RTFileReadAllByHandleEx-generic.cpp \
2596 generic/RTFileReadAllEx-generic.cpp \
2597 generic/RTFileReadAllFree-generic.cpp \
2598 generic/RTLogWriteStdErr-generic.cpp \
2599 generic/RTLogWriteStdOut-generic.cpp \
2600 generic/RTLogWriteUser-generic.cpp \
2601 generic/RTLogWriteVmm-stub-generic.cpp \
2602 generic/RTPathIsSame-generic.cpp \
2603 generic/RTPathGetCurrentDrive-generic.cpp \
2604 generic/rtStrFormatKernelAddress-generic.cpp \
2605 generic/RTTimerLRCreate-generic.cpp \
2606 generic/semfastmutex-generic.cpp \
2607 generic/semxroads-generic.cpp \
2608 generic/spinlock-generic.cpp \
2609 r3/alloc-ef.cpp \
2610 r3/alloc.cpp \
2611 r3/allocex.cpp \
2612 r3/dir.cpp \
2613 r3/dir2.cpp \
2614 r3/fileio.cpp \
2615 r3/fs.cpp \
2616 r3/generic/semspinmutex-r3-generic.cpp \
2617 r3/init.cpp \
2618 r3/init-data.cpp \
2619 r3/process-data.cpp \
2620 r3/mempage-direct.cpp \
2621 r3/memsafer-r3.cpp \
2622 r3/path.cpp \
2623 r3/RTPathTemp.cpp \
2624 r3/process.cpp \
2625 r3/socket.cpp \
2626 r3/stream.cpp \
2627 r3/tcp.cpp \
2628 VBox/log-vbox.cpp \
2629 VBox/RTAssertShouldPanic-vbox.cpp \
2630 common/string/ministring.cpp # for main
2631ifneq ($(KBUILD_HOST),win)
2632 RuntimeBldProg_SOURCES += \
2633 common/err/errmsgxpcom.cpp
2634endif
2635ifdef VBOX_WITH_LIBLZMA
2636 RuntimeBldProg_SOURCES += \
2637 common/zip/lzmavfs.cpp
2638endif
2639
2640RuntimeBldProg_SOURCES.darwin = $(filter-out \
2641 generic/cdrom-generic.cpp \
2642 generic/RTFileMove-generic.cpp \
2643 generic/RTProcDaemonize-generic.cpp \
2644 generic/RTThreadGetAffinity-stub-generic.cpp \
2645 generic/RTThreadSetAffinity-stub-generic.cpp \
2646 generic/RTThreadSetAffinityToCpu-generic.cpp \
2647 generic/RTTimerCreate-generic.cpp \
2648 generic/mppresent-generic.cpp \
2649 generic/RTSystemShutdown-generic.cpp \
2650 generic/timer-generic.cpp \
2651 generic/utf16locale-generic.cpp \
2652 generic/RTProcIsRunningByName-generic.cpp \
2653 generic/RTThreadGetNativeState-generic.cpp \
2654 r3/darwin/filelock-darwin.cpp \
2655 r3/darwin/systemmem-darwin.cpp \
2656 r3/darwin/krnlmod-darwin.cpp \
2657 r3/darwin/filelock-darwin.cpp \
2658 r3/darwin/RTSystemQueryDmiString-darwin.cpp \
2659 r3/darwin/RTPathUserDocuments-darwin.cpp \
2660 r3/posix/RTTimeSet-posix.cpp \
2661 r3/posix/serialport-posix.cpp \
2662 r3/posix/localipc-posix.cpp \
2663 r3/generic/allocex-r3-generic.cpp \
2664 r3/generic/RTLocaleQueryLocaleName-r3-generic.cpp \
2665 r3/generic/RTLocaleQueryNormalizedBaseLocaleName-r3-generic.cpp \
2666 r3/generic/RTLocaleQueryUserCountryCode-r3-generic.cpp \
2667 , $(RuntimeBaseR3_SOURCES.darwin))
2668
2669RuntimeBldProg_SOURCES.win = \
2670 common/dbg/dbgmoddbghelp.cpp \
2671 common/string/RTUtf16End.cpp \
2672 common/string/RTUtf16NLenEx.cpp \
2673 common/string/RTUtf16ICmpAscii.cpp \
2674 common/string/RTUtf16NICmpAscii.cpp \
2675 generic/mppresent-generic-online.cpp \
2676 generic/RTDirExists-generic.cpp \
2677 generic/RTDirSetTimes-generic.cpp \
2678 generic/RTFileCopyPartEx-generic.cpp \
2679 generic/RTFileExists-generic.cpp \
2680 generic/RTFileSetAllocationSize-generic.cpp \
2681 generic/RTRandAdvCreateSystemFaster-generic.cpp \
2682 generic/RTRandAdvCreateSystemTruer-generic.cpp \
2683 generic/RTSemEventWait-2-ex-generic.cpp \
2684 generic/RTSemEventWaitNoResume-2-ex-generic.cpp \
2685 generic/RTSemEventMultiWait-2-ex-generic.cpp \
2686 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
2687 generic/RTSemMutexRequest-generic.cpp \
2688 generic/RTSemMutexRequestDebug-generic.cpp \
2689 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
2690 generic/uuid-generic.cpp \
2691 nt/fileioutils-nt.cpp \
2692 nt/RTErrConvertFromNtStatus.cpp \
2693 nt/semevent-nt.cpp \
2694 nt/semeventmulti-nt.cpp \
2695 r3/nt/direnum-r3-nt.cpp \
2696 r3/nt/dirrel-r3-nt.cpp \
2697 r3/nt/fs-nt.cpp \
2698 r3/nt/pathint-nt.cpp \
2699 r3/nt/RTFileDelete-r3-nt.cpp \
2700 r3/nt/RTFileQueryFsSizes-nt.cpp \
2701 r3/nt/RTFileSetMode-r3-nt.cpp \
2702 r3/nt/RTPathQueryInfo-nt.cpp \
2703 r3/nt/RTPathSetMode-r3-nt.cpp \
2704 r3/nt/RTPathUnlink-r3-nt.cpp \
2705 r3/nt/RTProcQueryParent-r3-nt.cpp \
2706 r3/win/RTMemProtect-win.cpp \
2707 r3/win/allocex-win.cpp \
2708 r3/win/dir-win.cpp \
2709 r3/win/env-win.cpp \
2710 r3/win/errvars-win.cpp \
2711 r3/win/fileio-win.cpp \
2712 r3/win/init-win.cpp \
2713 r3/win/ldrNative-win.cpp \
2714 r3/win/mempage-native-win.cpp \
2715 r3/win/path-win.cpp \
2716 r3/win/pathint-win.cpp \
2717 r3/win/pipe-win.cpp \
2718 r3/win/process-win.cpp \
2719 r3/win/RTCrStoreCreateSnapshotById-win.cpp \
2720 r3/win/RTHandleGetStandard-win.cpp \
2721 r3/win/RTLogWriteDebugger-win.cpp \
2722 r3/win/rtProcInitExePath-win.cpp \
2723 r3/win/RTUuidCreate-win.cpp \
2724 r3/win/sched-win.cpp \
2725 r3/win/semmutex-win.cpp \
2726 r3/win/symlink-win.cpp \
2727 r3/win/system-get-nt-xxx-win.cpp \
2728 r3/win/thread-win.cpp \
2729 r3/win/thread2-win.cpp \
2730 $(if-expr 1,r3/win/time-win.cpp,r3/nt/time-nt.cpp) \
2731 r3/win/time2-win.cpp \
2732 r3/win/tls-win.cpp \
2733 r3/win/utf16locale-win.cpp \
2734 r3/win/utf8-win.cpp \
2735 win/errmsgwin.cpp \
2736 win/RTErrConvertFromWin32.cpp
2737
2738RuntimeBldProg_SOURCES.amd64 = $(filter-out \
2739 VBox/RTLogWriteVmm-amd64-x86.asm \
2740 , $(RuntimeBaseR3_SOURCES.amd64))
2741
2742RuntimeBldProg_SOURCES.x86 = $(filter-out \
2743 VBox/RTLogWriteVmm-amd64-x86.asm \
2744 , $(RuntimeBaseR3_SOURCES.x86))
2745
2746RuntimeBldProg_SOURCES.arm32 = \
2747 $(RuntimeBaseR3_SOURCES.arm32)
2748
2749RuntimeBldProg_SOURCES.arm64 = \
2750 $(RuntimeBaseR3_SOURCES.arm64)
2751
2752RuntimeBldProg_SOURCES.win.amd64 := \
2753 $(RuntimeWin64ASM_SOURCES) \
2754 common/string/mempcpy.asm \
2755 common/string/memrchr.asm
2756
2757RuntimeBldProg_SOURCES.win.x86 := \
2758 $(RuntimeWin32ASM_SOURCES) \
2759 common/string/mempcpy.asm \
2760 common/string/memrchr.asm
2761
2762RuntimeBldProg_SOURCES.win.arm64 := \
2763 $(RuntimeBaseR3_SOURCES.win.arm64) \
2764 r3/win/mp-win.cpp
2765
2766## @todo reduce this
2767RuntimeBldProg_SOURCES.os2 += \
2768 common/string/memrchr.asm \
2769 generic/mppresent-generic.cpp \
2770 generic/RTCrStoreCreateSnapshotById-generic.cpp \
2771 generic/RTDirQueryInfo-generic.cpp \
2772 generic/RTDirSetTimes-generic.cpp \
2773 generic/fileio-at-generic.cpp \
2774 generic/RTFileCopyPartEx-generic.cpp \
2775 generic/RTFileMove-generic.cpp \
2776 generic/RTFileSetAllocationSize-generic.cpp \
2777 generic/RTLogWriteDebugger-generic.cpp \
2778 generic/RTPathGetCurrentOnDrive-generic.cpp \
2779 generic/RTRandAdvCreateSystemFaster-generic.cpp \
2780 generic/RTRandAdvCreateSystemTruer-generic.cpp \
2781 generic/RTSemEventMultiWait-generic.cpp \
2782 generic/RTSemEventWait-generic.cpp \
2783 generic/RTSemMutexRequest-generic.cpp \
2784 generic/RTSemMutexRequestDebug-generic.cpp \
2785 generic/RTThreadGetNativeState-generic.cpp \
2786 generic/RTUuidCreate-generic.cpp \
2787 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
2788 generic/timer-generic.cpp \
2789 generic/utf16locale-generic.cpp \
2790 generic/uuid-generic.cpp \
2791 os2/RTErrConvertFromOS2.cpp \
2792 r3/generic/allocex-r3-generic.cpp \
2793 r3/generic/dirrel-r3-generic.cpp \
2794 r3/os2/filelock-os2.cpp \
2795 r3/os2/mempage-native-os2.cpp \
2796 r3/os2/mp-os2.cpp \
2797 r3/os2/pipe-os2.cpp \
2798 r3/os2/rtProcInitExePath-os2.cpp \
2799 r3/os2/sched-os2.cpp \
2800 r3/os2/sems-os2.cpp \
2801 r3/os2/systemmem-os2.cpp \
2802 r3/os2/thread-os2.cpp \
2803 r3/os2/time-os2.cpp \
2804 r3/posix/dir-posix.cpp \
2805 r3/posix/env-posix.cpp \
2806 r3/posix/errvars-posix.cpp \
2807 r3/posix/fileio-posix.cpp \
2808 r3/posix/fileio2-posix.cpp \
2809 r3/posix/fs-posix.cpp \
2810 r3/posix/fs2-posix.cpp \
2811 r3/posix/fs3-posix.cpp \
2812 r3/posix/ldrNative-posix.cpp \
2813 r3/posix/path-posix.cpp \
2814 r3/posix/path2-posix.cpp \
2815 r3/posix/pathhost-posix.cpp \
2816 r3/posix/process-creation-posix.cpp \
2817 r3/posix/process-posix.cpp \
2818 r3/posix/RTFileQueryFsSizes-posix.cpp \
2819 r3/posix/RTFsMountpointsEnum-posix.cpp \
2820 r3/posix/RTHandleGetStandard-posix.cpp \
2821 r3/posix/RTMemProtect-posix.cpp \
2822 r3/posix/RTPathUserDocuments-posix.cpp \
2823 r3/posix/RTPathUserHome-posix.cpp \
2824 r3/posix/RTTimeNow-posix.cpp \
2825 r3/posix/RTTimeSet-posix.cpp \
2826 r3/posix/symlink-posix.cpp \
2827 r3/posix/timelocal-posix.cpp \
2828 r3/posix/utf8-posix.cpp
2829
2830RuntimeBldProg_SOURCES.linux = $(filter-out \
2831 r3/memsafer-r3.cpp \
2832 , $(RuntimeBaseR3_SOURCES.linux))
2833
2834## @todo reduce linux, solaris and freebsd sources too.
2835
2836
2837
2838#
2839# RuntimeGuestR3 - Guest Additions Runtime (static/exe).
2840# (The KBUILD_HOST inheritance here is for cross building the linux
2841# additions, while .x86 is for cross building x86 while targeting amd64.)
2842#
2843RuntimeGuestR3_TEMPLATE := VBoxGuestR3Lib
2844RuntimeGuestR3_EXTENDS := RuntimeR3
2845RuntimeGuestR3_DEFS = $(filter-out RTCRITSECT_STRICT RT_NO_GIP IN_SUP_R3 IPRT_WITH_LZMA, $(RuntimeR3_DEFS))
2846RuntimeGuestR3_SOURCES = $(filter-out \
2847 common/time/timesupref.cpp \
2848 common/time/timesupA.asm \
2849 common/time/timesup.cpp \
2850 common/zip/xarvfs.cpp \
2851 common/zip/lzmavfs.cpp \
2852 r3/mempage-heap.cpp \
2853 r3/xml.cpp \
2854 generic/RTLogWriteUser-generic.cpp \
2855 , $(RuntimeR3_SOURCES)) \
2856 \
2857 common/time/timesysalias.cpp \
2858 r3/mempage-direct.cpp \
2859 VBox/logbackdoor.cpp
2860ifndef VBOX_WITH_NOCRT_STATIC
2861 RuntimeGuestR3_DEFS.win.x86 = $(RuntimeR3_DEFS.win.x86) \
2862 VCC_FAKES_TARGET_$(VBOX_VCC_TOOL_STEM) VCC_FAKES_TARGET=$(substr $(VBOX_VCC_TOOL_STEM),-3)
2863 RuntimeGuestR3_SOURCES.win.x86 = $(RuntimeR3_SOURCES.win.x86) \
2864 r3/win/vcc-fakes-kernel32.cpp \
2865 r3/win/vcc-fakes-kernel32-A.asm \
2866 r3/win/vcc-fakes-ntdll.cpp \
2867 r3/win/vcc-fakes-ntdll-A.asm \
2868 r3/win/vcc-fakes-ws2_32.cpp \
2869 r3/win/vcc-fakes-ws2_32-A.asm \
2870 r3/win/vcc-fakes-shell32.cpp \
2871 r3/win/vcc-fakes-shell32-A.asm
2872endif
2873
2874RuntimeGuestR3_SOURCES.linux = $(filter-out \
2875 r3/memsafer-r3.cpp \
2876 , $(RuntimeR3_SOURCES.linux))
2877
2878
2879#
2880# RuntimeGuestR3-x86 - Same as RuntimeGuestR3, except that it's targeting x86.
2881#
2882RuntimeGuestR3-x86_EXTENDS := RuntimeGuestR3
2883RuntimeGuestR3-x86_BLD_TRG_ARCH := x86
2884
2885
2886#
2887# RuntimeGuestR3Shared - Guest Additions Runtime (static/dll).
2888#
2889RuntimeGuestR3Shared_TEMPLATE := VBoxGuestR3Dll
2890RuntimeGuestR3Shared_EXTENDS := RuntimeGuestR3
2891RuntimeGuestR3Shared_INST = $(INST_ADDITIONS_LIB)
2892ifdef VBOX_WITH_NOCRT_STATIC
2893 if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), win.x86 win.amd64)
2894 RuntimeGuestR3Shared_SDKS = $(filter-out VBoxSoftFloatR3Shared,$(RuntimeGuestR3_SDKS)) VBoxSoftFloatGuestR3Shared
2895 RuntimeGuestR3Shared_SOURCES = $(RuntimeGuestR3_SOURCES) \
2896 common/math/fma.cpp \
2897 common/math/fma-asm.asm \
2898 common/math/fmaf.cpp \
2899 common/math/fmaf-asm.asm
2900
2901 endif
2902endif
2903
2904#
2905# RuntimeGuestR3Shared-x86 - Same as RuntimeGuestR3Shared, except that it's targeting x86.
2906#
2907RuntimeGuestR3Shared-x86_EXTENDS := RuntimeGuestR3Shared
2908RuntimeGuestR3Shared-x86_BLD_TRG_ARCH := x86
2909
2910
2911#
2912# VBoxRT - Shared Object / DLL version.
2913#
2914VBoxRT_TEMPLATE = VBoxR3DllNoPic
2915VBoxRT_SDKS = VBoxLibXml2
2916ifdef VBOX_WITH_LIBCURL
2917 VBoxRT_SDKS += VBoxLibCurl
2918endif
2919ifdef VBOX_WITH_LIBLZMA
2920 VBoxRT_SDKS += VBoxLibLzma
2921endif
2922VBoxRT_SDKS += VBoxOpenSslStatic
2923if1of ($(KBUILD_TARGET_ARCH), $(VBOX_SUPPORTED_HOST_ARCHS))
2924 VBoxRT_SDKS += VBoxSoftFloatR3Shared
2925endif
2926VBoxRT_SDKS.win = $(VBOX_WINPSDK) $(VBOX_WINDDK) VBoxNtDll
2927if1of ($(KBUILD_TARGET), win)
2928 VBoxRT_INST = $(INST_DLL) $(INST_TESTCASE) $(VBOX_INST_TOOLS)
2929else if1of ($(KBUILD_TARGET)$(VBOX_WITH_HARDENING), darwin win$(VBOX_WITH_HARDENING))
2930 VBoxRT_INST = $(INST_DLL) $(INST_TESTCASE)
2931endif
2932VBoxRT_DEFS := $(filter-out RT_NO_GIP, $(RuntimeBaseR3_DEFS)) \
2933 IPRT_WITH_OPENSSL \
2934 IPRT_WITH_XAR \
2935 IPRT_WITH_GHIDRA_DBG_MOD \
2936 $(if-expr !defined(VBOX_WITH_ALT_HASH_CODE),IPRT_WITHOUT_SHA512T224 IPRT_WITHOUT_SHA512T256,)
2937ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
2938 ifn1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), win.arm64)
2939 VBoxRT_DEFS += RT_NO_GIP
2940 endif
2941endif
2942ifdef VBOX_WITH_LIBCURL
2943 VBoxRT_DEFS += IPRT_WITH_HTTP
2944endif
2945ifdef VBOX_WITH_LIBLZMA
2946 VBoxRT_DEFS += IPRT_WITH_LZMA
2947endif
2948ifdef RTALLOC_REPLACE_MALLOC
2949 VBoxRT_DEFS += RTALLOC_REPLACE_MALLOC
2950endif
2951if defined(VBOX_WITH_DTRACE_R3) && !defined(VBOX_ONLY_VALIDATIONKIT)
2952 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
2953 VBoxRT_DEFS += IPRT_WITH_DTRACE IPRT_DTRACE_INCLUDE="dtrace/iprt.h"
2954 else
2955 VBoxRT_DEFS += IPRT_WITH_DTRACE IPRT_DTRACE_INCLUDE=\"dtrace/iprt.h\"
2956 endif
2957endif
2958VBoxRT_DEFS.$(KBUILD_TYPE) := $(RuntimeBaseR3_DEFS.$(KBUILD_TYPE))
2959VBoxRT_DEFS.$(KBUILD_TARGET) := $(RuntimeBaseR3_DEFS.$(KBUILD_TARGET))
2960VBoxRT_SOURCES := \
2961 VBox/VBoxRTDeps.cpp \
2962 $(filter-out common/checksum/crc32.cpp, \
2963 $(if-expr defined(VBOX_WITH_ALT_HASH_CODE), $(RuntimeBaseR3_SOURCES), \
2964 $(patsubst common/checksum/alt-%,common/checksum/openssl-%,$(RuntimeBaseR3_SOURCES)) ) ) \
2965 common/checksum/crc32-zlib.cpp \
2966 common/dbg/dbgmodghidra.cpp \
2967 common/fuzz/fuzz.cpp \
2968 common/fuzz/fuzz-config.cpp \
2969 common/fuzz/fuzz-observer.cpp \
2970 common/fuzz/fuzz-target-recorder.cpp \
2971 common/fuzz/fuzzmastercmd.cpp \
2972 common/fuzz/fuzzclientcmd.cpp \
2973 common/script/scriptlex.cpp
2974ifneq ($(KBUILD_TARGET),win)
2975 VBox/VBoxRTDeps.cpp_CXXFLAGS = -Wno-deprecated-declarations
2976endif
2977ifdef VBOX_WITH_LIBCURL
2978 VBoxRT_SOURCES += \
2979 generic/http-curl.cpp \
2980 common/rest/rest-primary-object-types.cpp \
2981 common/rest/rest-binary.cpp \
2982 common/rest/RTCRestAnyObject.cpp \
2983 common/rest/RTCRestArrayBase.cpp \
2984 common/rest/RTCRestClientApiBase.cpp \
2985 common/rest/RTCRestClientApiBaseOci.cpp \
2986 common/rest/RTCRestClientRequestBase.cpp \
2987 common/rest/RTCRestClientResponseBase.cpp \
2988 common/rest/RTCRestJsonPrimaryCursor.cpp \
2989 common/rest/RTCRestStringMapBase.cpp \
2990 common/rest/RTCRestOutputBase.cpp \
2991 common/rest/RTCRestOutputPrettyBase.cpp \
2992 common/rest/RTCRestOutputPrettyToString.cpp \
2993 common/rest/RTCRestOutputToString.cpp
2994endif
2995if defined(VBOX_WITH_DTRACE_R3) && !defined(VBOX_ONLY_VALIDATIONKIT)
2996 VBoxRT_SOURCES += \
2997 iprt.d
2998endif
2999VBoxRT_SOURCES.$(KBUILD_TARGET) = $(RuntimeBaseR3_SOURCES.$(KBUILD_TARGET))
3000VBoxRT_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeBaseR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
3001VBoxRT_SOURCES.$(KBUILD_TARGET).x86 := $(RuntimeBaseR3_SOURCES.$(KBUILD_TARGET).x86)
3002VBoxRT_SOURCES.$(KBUILD_TARGET).amd64 := $(RuntimeBaseR3_SOURCES.$(KBUILD_TARGET).amd64)
3003VBoxRT_SOURCES.$(KBUILD_TARGET_ARCH) := $(RuntimeBaseR3_SOURCES.$(KBUILD_TARGET_ARCH))
3004VBoxRT_SOURCES.x86 := $(RuntimeBaseR3_SOURCES.x86)
3005VBoxRT_SOURCES.amd64 := $(RuntimeBaseR3_SOURCES.amd64)
3006VBoxRT_SOURCES.win += \
3007 r3/win/dllmain-win.cpp \
3008 $(VBoxRT_0_OUTDIR)/VBoxRT.def
3009VBoxRT_CLEAN.win += \
3010 $(VBoxRT_0_OUTDIR)/VBoxRT.def
3011VBoxRT_INCS := $(RuntimeBaseR3_INCS)
3012VBoxRT_INCS.$(KBUILD_TARGET) := $(RuntimeBaseR3_INCS.$(KBUILD_TARGET))
3013VBoxRT_INCS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeBaseR3_INCS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
3014VBoxRT_LIBS = \
3015 $(SDK_VBoxLzf_LIBS) \
3016 $(PATH_STAGE_LIB)/SUPR3$(VBOX_SUFF_LIB)
3017ifndef SDK_VBoxLibXml2_LIBS
3018 VBoxRT_LIBS += \
3019 $(PATH_STAGE_LIB)/VBox-libxml2$(VBOX_SUFF_LIB)
3020endif
3021VBoxRT_LIBS += \
3022 $(SDK_VBoxZlib_LATE_LIBS)
3023ifndef SDK_VBoxOpenSslStatic_LIBS
3024 VBoxRT_LIBS += \
3025 $(PATH_STAGE_LIB)/VBox-libcrypto$(VBOX_SUFF_LIB) \
3026 $(PATH_STAGE_LIB)/VBox-libssl$(VBOX_SUFF_LIB)
3027endif
3028ifdef IPRT_WITH_LZO
3029 VBoxRT_LIBS += lzo2
3030endif
3031ifdef RTALLOC_REPLACE_MALLOC
3032 VBoxRT_LIBS += \
3033 $(PATH_STAGE_LIB)/DisasmR3$(VBOX_SUFF_LIB)
3034endif
3035VBoxRT_LIBS.darwin = \
3036 iconv
3037VBoxRT_LIBS.freebsd = \
3038 iconv \
3039 rt
3040VBoxRT_LIBS.haiku = \
3041 iconv
3042VBoxRT_LIBS.solaris = \
3043 kstat \
3044 contract \
3045 devinfo
3046ifn1of ($(KBUILD_TARGET_ARCH), sparc32 sparc64)
3047 # SMBIOS not available on Solaris SPARC.
3048 VBoxRT_LIBS.solaris += smbios
3049endif
3050VBoxRT_LIBS.win += \
3051 $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/mpr.lib \
3052 $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/wbemuuid.lib \
3053 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
3054VBoxRT_LDFLAGS.darwin = \
3055 -framework IOKit \
3056 -framework CoreFoundation \
3057 -framework CoreServices \
3058 -framework Security \
3059 -framework SystemConfiguration \
3060 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxRT.dylib
3061VBoxRT_LDFLAGS.win = /MANIFEST \
3062 /delayload:user32.dll \
3063 /delayload:shell32.dll \
3064 /delayload:ole32.dll \
3065 /delayload:oleaut32.dll \
3066 /delayload:advapi32.dll
3067
3068if1of (VBoxRT, $(DLLS))
3069 $(call VBOX_SET_VER_INFO_DLL,VBoxRT,VirtualBox Runtime)
3070endif
3071
3072
3073if defined(VBOX_WITH_MORE_NT4_COMPAT_BINARIES) && "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.x86"
3074 #
3075 # Hacks for running tests on NT 4. Really ugly!
3076 #
3077 # We put most of the CRT in VBoxRT because we cannot even load msvcr100.dll
3078 # or msvcp100.dll on NT4 because of kernel32.dll dependencies. More hacks
3079 # in RuntimeR3VccTricks.
3080 #
3081 TEMPLATE_VBoxR3RuntimeDllItself = xx
3082 TEMPLATE_VBoxR3RuntimeDllItself_EXTENDS = VBoxR3RuntimeDll
3083 TEMPLATE_VBoxR3RuntimeDllItself_LATE_LIBS.win.x86 = \
3084 $(filter-out $(PATH_STAGE_LIB)/RuntimeR3VccTricks%, $(TEMPLATE_VBoxR3RuntimeDll_LATE_LIBS.win.x86))
3085 TEMPLATE_VBoxR3RuntimeDllItself_DEFS += IN_RING3 VCC_FAKES_TARGET_$(VBOX_VCC_TOOL_STEM) VCC_FAKES_TARGET=$(substr $(VBOX_VCC_TOOL_STEM),-3)
3086 TEMPLATE_VBoxR3RuntimeDllItself_SOURCES = \
3087 r3/win/vcc-fakes-kernel32.cpp \
3088 r3/win/vcc-fakes-kernel32-A.asm \
3089 r3/win/vcc-fakes-ws2_32.cpp \
3090 r3/win/vcc-fakes-ws2_32-A.asm \
3091 r3/win/vcc-fakes-ntdll.cpp \
3092 r3/win/vcc-fakes-ntdll-A.asm \
3093 r3/win/vcc-fakes-msvcrt.cpp
3094 VBoxRT_TEMPLATE = VBoxR3RuntimeDllItself
3095 VBoxRT_TEMPLATE.win.x86 = VBoxR3RuntimeDllItself
3096 VBoxRT_DEFS.win.x86 = $(TEMPLATE_VBoxR3RuntimeDll_DEFS.win.x86) \
3097 _CRTIMP_PURE="__declspec(dllexport)" VCC_FAKES_TARGET_$(VBOX_VCC_TOOL_STEM) VCC_FAKES_TARGET=$(substr $(VBOX_VCC_TOOL_STEM),-3)
3098 VBoxRT_LDFLAGS.win.x86 = /IGNORE:4049 /IGNORE:4217
3099 VBoxRT_LIBS.win.x86 = \
3100 $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)X86_LIB)/oldnames.lib \
3101 $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)X86_LIB)/libcmt.lib \
3102 $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)X86_LIB)/libcpmt.lib
3103endif
3104
3105
3106#
3107# HACK ALERT! Make testcase run during build on SELinux boxes.
3108# Create a dummy DLL that ensure that VBoxRT is installed
3109# during the DLL pass and cleaned up later.
3110#
3111ifeq ($(KBUILD_TARGET),linux)
3112 if1of (VBoxRT, $(DLLS))
3113 ifneq ($(wildcard /usr/bin/chcon),)
3114 VBoxRT_INSTTYPE = none
3115 VBoxRT_DEBUG_INSTTYPE = both
3116
3117 VBoxRT-x86_INSTTYPE = $(NO_SUCH_VARIABLE)
3118
3119 DLLS += VBoxRTDummy
3120 VBoxRTDummy_TEMPLATE = VBoxR3Dll
3121 VBoxRTDummy_INSTTYPE = none
3122 VBoxRTDummy_LIBS = $(PATH_STAGE_BIN)/VBoxRT.so
3123 VBoxRTDummy_CLEAN = $(PATH_STAGE_BIN)/VBoxRT.so
3124 BLDDIRS += $(PATH_STAGE_BIN)
3125
3126 $(PATH_STAGE_BIN)/VBoxRT.so: $$(VBoxRT_1_TARGET) | $$(dir $$@)
3127 $(INSTALL) $< $@
3128 chcon -t texrel_shlib_t $@ || true
3129
3130 VBoxRT:: VBoxRTDummy
3131 endif # chcon present.
3132 endif # building VBoxRT
3133endif # linux
3134
3135if1of ($(DLLS), VBoxRT)
3136 # .def file for windows.
3137 $(call KB_FN_DO_PASS0_ON_TARGET,VBoxRT)
3138 $(VBoxRT_0_OUTDIR)/VBoxRT.def: \
3139 $(PATH_SUB_CURRENT)/r3/win/VBoxRT-$(KBUILD_TARGET_ARCH).def \
3140 $(PATH_SUB_CURRENT)/r3/win/VBoxRT-openssl-3.0.def \
3141 $(if-expr "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.x86" && defined(VBOX_WITH_MORE_NT4_COMPAT_BINARIES) \
3142 ,$(PATH_SUB_CURRENT)/r3/win/VBoxRT-msvcr100-win32.def ,) \
3143 | $$(dir $$@) #$(PATH_SUB_CURRENT)/r3/win/VBoxRT-msvcp100-win32.def
3144 $(RM) -f -- $@
3145 $(SED) --output "$@" \
3146 $(if-expr "$(KBUILD_TARGET_ARCH)" == "x86" ,-e "/not-x86/d", -e "/only-x86/d") \
3147 $(if-expr "$(KBUILD_TARGET_ARCH)" == "amd64",-e "/not-amd64/d",-e "/only-amd64/d") \
3148 $(if-expr "$(KBUILD_TARGET_ARCH)" == "arm64",-e "/not-arm64/d",-e "/only-arm64/d") \
3149 $(if-expr "$(substr $(if-expr $(KBUILD_TARGET) != 'win',$(VBOX_GCC_std), $(VBOX_VCC_std)),-2)" >= "17" \
3150 && ("$(KBUILD_TARGET)" != "win" || !$(intersects RT_RELAXED_CALLBACKS_TYPES,$(DEFS))) \
3151 ,-e "/before-noexcept/d", -e "/after-noexcept/d") \
3152 $^
3153 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
3154 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxRT_0_OUTDIR)/VBoxRT.def)
3155endif
3156
3157
3158#
3159# VBoxRT-x86 - 32-bit version of VBoxRT
3160#
3161VBoxRT-x86_EXTENDS = VBoxRT
3162VBoxRT-x86_TEMPLATE = VBoxR3Dll-x86
3163VBoxRT-x86_INST.win = $(INST_DLL)x86/
3164VBoxRT-x86_SDKS = VBoxLibXml2
3165ifdef VBOX_WITH_LIBCURL
3166 VBoxRT-x86_SDKS += VBoxLibCurl-x86
3167endif
3168ifdef VBOX_WITH_LIBLZMA
3169 VBoxRT-x86_SDKS += VBoxLibLzma-x86
3170endif
3171VBoxRT-x86_SDKS += VBoxOpenSslStatic-x86
3172
3173VBoxRT-x86_LIBS = \
3174 $(SDK_VBoxLzf-x86_LIBS)
3175if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
3176 VBoxRT-x86_LIBS += \
3177 $(PATH_STAGE_LIB)/SUPR3-x86$(VBOX_SUFF_LIB)
3178endif
3179ifndef SDK_VBoxLibXml2_LIBS
3180 VBoxRT-x86_LIBS += \
3181 $(PATH_STAGE_LIB)/VBox-libxml2-x86$(VBOX_SUFF_LIB)
3182endif
3183VBoxRT-x86_LIBS += \
3184 $(SDK_VBoxZlib-x86_LIBS)
3185ifndef SDK_VBoxOpenSslStatic_LIBS
3186 VBoxRT-x86_LIBS += \
3187 $(PATH_STAGE_LIB)/VBox-libcrypto-x86$(VBOX_SUFF_LIB) \
3188 $(PATH_STAGE_LIB)/VBox-libssl-x86$(VBOX_SUFF_LIB)
3189endif
3190ifdef IPRT_WITH_LZO
3191 VBoxRT-x86_LIBS += lzo2
3192endif
3193VBoxRT-x86_LIBS.darwin = \
3194 iconv
3195VBoxRT-x86_LIBS.freebsd = \
3196 iconv \
3197 rt
3198VBoxRT-x86_LIBS.haiku = \
3199 iconv
3200VBoxRT-x86_LIBS.solaris = \
3201 kstat \
3202 contract \
3203 devinfo
3204ifn1of ($(KBUILD_TARGET_ARCH), sparc32 sparc64)
3205 # SMBIOS not available on Solaris SPARC.
3206 VBoxRT-x86_LIBS.solaris += smbios
3207endif
3208VBoxRT-x86_LIBS.win += \
3209 $(PATH_SDK_$(VBOX_WINPSDK)_LIB.x86)/mpr.lib \
3210 $(PATH_SDK_$(VBOX_WINPSDK)_LIB.x86)/wbemuuid.lib \
3211 $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)X86_LIB)/delayimp.lib
3212
3213VBoxRT-x86_SOURCES.win = $(filter-out %.def %.rc,$(VBoxRT_SOURCES.win)) \
3214 $(VBoxRT-x86_0_OUTDIR)/VBoxRT-x86.def
3215VBoxRT-x86_CLEAN += $(VBoxRT-x86_0_OUTDIR)/VBoxRT-x86.def
3216
3217if1of (VBoxRT-x86, $(DLLS))
3218 $(call VBOX_SET_VER_INFO_DLL,VBoxRT-x86,VirtualBox 32-bit Runtime)
3219endif
3220
3221if1of ($(DLLS), VBoxRT-x86)
3222 # .def file for windows.
3223 $(call KB_FN_DO_PASS0_ON_TARGET,VBoxRT-x86)
3224 $(VBoxRT-x86_0_OUTDIR)/VBoxRT-x86.def: \
3225 $(VBOX_PATH_RUNTIME_SRC)/r3/win/VBoxRT-x86.def \
3226 | $$(dir $$@) # Hopefully no need to export openssl here.
3227 $(RM) -f -- $@
3228 $(SED) --output "$@" \
3229 -e "/not-x86/d" \
3230 -e "/only-amd64/d" \
3231 -e "/only-arm64/d" \
3232 $(if-expr "$(substr $(if-expr $(KBUILD_TARGET) != 'win',$(VBOX_GCC_std), $(VBOX_VCC_std)),-2)" >= "17" \
3233 ,-e "/before-noexcept/d", -e "/after-noexcept/d") \
3234 $(VBOX_PATH_RUNTIME_SRC)/r3/win/VBoxRT-x86.def
3235 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
3236 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxRT-x86_0_OUTDIR)/VBoxRT-x86.def)
3237endif
3238
3239#
3240# VBoxRTImp - Import library/hack.
3241#
3242ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.amd64)
3243 $(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxRTImp,VBoxRT,VBox/VBoxRTImp.def VBox/VBoxRTImp-vcc64.def r3/win/VBoxRT-amd64.def)
3244else ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.x86)
3245 $(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxRTImp,VBoxRT,VBox/VBoxRTImp.def VBox/VBoxRTImp-vcc32.def r3/win/VBoxRT-x86.def)
3246else ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.arm64)
3247 $(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxRTImp,VBoxRT,VBox/VBoxRTImp.def VBox/VBoxRTImp-vcc-arm64.def r3/win/VBoxRT-arm64.def)
3248else
3249 $(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxRTImp,VBoxRT,VBox/VBoxRTImp.def VBox/VBoxRTImp-gcc.def)
3250endif
3251
3252
3253if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), win.x86 win.amd64 linux.amd64 darwin.amd64) # remove later
3254 if1of (VBoxRT, $(DLLS))
3255 ifdef VBOX_WITH_LIBCURL
3256 #
3257 # VBoxRTImpCheck - Import library check.
3258 #
3259 PROGRAMS += VBoxRTStableCheck
3260 VBoxRTStableCheck_TEMPLATE = VBoxR3TstExe
3261 VBoxRTStableCheck_ASDEFS.linux.amd64 = PIC # Hack
3262 VBoxRTStableCheck_SOURCES = \
3263 VBox/VBoxRTStableCheck.cpp \
3264 $(VBoxRTStableCheck_0_OUTDIR)/VBoxRTStableCheckA.asm
3265 VBoxRTStableCheck_LIBS = \
3266 $(LIB_RUNTIME)
3267 VBoxRTStableCheck_CLEAN = \
3268 $(VBoxRTStableCheck_0_OUTDIR)/VBoxRTStableCheckA.asm
3269 $(call KB_FN_DO_PASS0_ON_TARGET,VBoxRTStableCheck)
3270
3271 ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.amd64)
3272 $(VBoxRTStableCheck_0_OUTDIR)/VBoxRTStableCheckA.asm: \
3273 $(PATH_SUB_CURRENT)/VBox/DefToAsmExterns.sed \
3274 $(PATH_SUB_CURRENT)/VBox/VBoxRTImp.def \
3275 $(PATH_SUB_CURRENT)/VBox/VBoxRTImp-vcc64.def \
3276 $(PATH_SUB_CURRENT)/r3/win/VBoxRT-amd64.def \
3277 | $$(dir $$@)
3278 else ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.x86)
3279 $(VBoxRTStableCheck_0_OUTDIR)/VBoxRTStableCheckA.asm: \
3280 $(PATH_SUB_CURRENT)/VBox/DefToAsmExternsVcc32.sed \
3281 $(PATH_SUB_CURRENT)/VBox/VBoxRTImp.def \
3282 $(PATH_SUB_CURRENT)/VBox/VBoxRTImp-vcc32.def \
3283 $(PATH_SUB_CURRENT)/r3/win/VBoxRT-x86.def | $$(dir $$@)
3284 else ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.arm64)
3285 $(VBoxRTStableCheck_0_OUTDIR)/VBoxRTStableCheckA.asm: \
3286 $(PATH_SUB_CURRENT)/VBox/DefToAsmExterns.sed \
3287 $(PATH_SUB_CURRENT)/VBox/VBoxRTImp.def \
3288 $(PATH_SUB_CURRENT)/VBox/VBoxRTImp-vcc-arm64.def \
3289 $(PATH_SUB_CURRENT)/r3/win/VBoxRT-arm64.def \
3290 | $$(dir $$@)
3291 else
3292 $(VBoxRTStableCheck_0_OUTDIR)/VBoxRTStableCheckA.asm: \
3293 $(PATH_SUB_CURRENT)/VBox/DefToAsmExterns.sed \
3294 $(PATH_SUB_CURRENT)/VBox/VBoxRTImp.def \
3295 $(PATH_SUB_CURRENT)/VBox/VBoxRTImp-gcc.def | $$(dir $$@)
3296 endif
3297 $(APPEND) -tn "$@" '%include "iprt/asmdefs.mac"' ''
3298 $(SED) --append "$@" \
3299 -e "/not-$(KBUILD_TARGET)/d" \
3300 $(if-expr "$(KBUILD_TARGET)" == "linux" ,, -e "/only-linux/d") \
3301 $(if-expr "$(KBUILD_TARGET)" == "win" ,, -e "/only-win/d") \
3302 $(if-expr "$(KBUILD_TARGET)" == "darwin",, -e "/only-darwin/d") \
3303 $(if-expr "$(KBUILD_TARGET_ARCH)" == "x86" ,-e "/not-x86/d", -e "/only-x86/d") \
3304 $(if-expr "$(KBUILD_TARGET_ARCH)" == "amd64",-e "/not-amd64/d",-e "/only-amd64/d") \
3305 $(if-expr "$(KBUILD_TARGET_ARCH)" == "arm64",-e "/not-arm64/d",-e "/only-arm64/d") \
3306 $(if-expr "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "darwin.arm64",, -e "/only-darwin.arm64/d") \
3307 $(if-expr "$(substr $(if-expr $(KBUILD_TARGET) != 'win',$(VBOX_GCC_std), $(VBOX_VCC_std)),-2)" >= "17" \
3308 ,-e "/before-noexcept/d", -e "/after-noexcept/d") \
3309 $(if-expr $(intersects $(KBUILD_TARGET), linux) && $(intersects $(KBUILD_TARGET_ARCH), amd64 arm64) \
3310 ,-e "/int64=llong/d", -e "/int64=long/d") \
3311 -f "$<" $(filter %.def, $^)
3312 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
3313 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxRTStableCheck_0_OUTDIR)/VBoxRTStableCheckA.asm)
3314
3315 endif
3316 endif
3317endif # remove later
3318
3319
3320#
3321# RuntimeR3NoCRT - For windows applications w/o any runtime library.
3322# Experimental.
3323#
3324RuntimeR3NoCrt_TEMPLATE := VBoxR3StaticNoCrt
3325RuntimeR3NoCrt_INCS := include
3326RuntimeR3NoCrt_DEFS := \
3327 RT_NO_STRICT \
3328 IPRT_NO_ALLOCA_TROUBLE \
3329 IPRT_GETOPT_WITHOUT_NETWORK_ADDRESSES \
3330 IPRT_MINIMAL_STREAM \
3331 IPRT_NO_FLOAT_FORMATTING
3332RuntimeR3NoCrt_SOURCES := \
3333 common/string/straprintf.cpp \
3334 common/string/strformat.cpp \
3335 common/string/RTStrFormat.cpp \
3336 common/string/strformatnum.cpp \
3337 common/string/strformatrt.cpp \
3338 common/string/strformattype.cpp \
3339 common/string/strprintf.cpp \
3340 common/string/strprintf-ellipsis.cpp \
3341 common/string/strprintf2.cpp \
3342 common/string/strprintf2-ellipsis.cpp \
3343 common/string/stringalloc.cpp \
3344 common/string/strtonum.cpp \
3345 common/string/RTStrNLen.cpp \
3346 common/string/RTStrCmp.cpp \
3347 common/string/RTStrNCmp.cpp \
3348 common/string/RTStrICmpAscii.cpp \
3349 common/string/RTStrNICmpAscii.cpp \
3350 common/string/RTStrCopy.cpp \
3351 common/string/RTUtf16Copy.cpp \
3352 common/string/utf-16.cpp \
3353 common/string/utf-8.cpp \
3354 common/path/RTPathFilename.cpp \
3355 common/misc/getopt.cpp \
3356 common/misc/getoptargv.cpp \
3357 common/misc/message.cpp \
3358 common/err/errmsg.cpp \
3359 r3/init-data.cpp \
3360 r3/process-data.cpp \
3361 generic/uuid-generic.cpp \
3362 generic/rtStrFormatKernelAddress-generic.cpp
3363
3364RuntimeR3NoCrt_SOURCES.x86 := \
3365 common/string/memcpy.asm \
3366 common/string/memchr.asm \
3367 common/string/memcmp.asm \
3368 common/string/memmove.asm \
3369 common/string/memset.asm \
3370 common/string/strlen.asm \
3371 common/string/strchr.asm \
3372 common/string/strcmp.asm \
3373 common/string/strncmp.asm \
3374 common/string/RTStrEnd.asm
3375
3376RuntimeR3NoCrt_SOURCES.amd64 := \
3377 common/string/memcpy.asm \
3378 common/string/memchr.asm \
3379 common/string/memcmp.asm \
3380 common/string/memmove.asm \
3381 common/string/memset.asm \
3382 common/string/strlen.asm \
3383 common/string/strchr.asm \
3384 common/string/strcmp.asm \
3385 common/string/strncmp.asm \
3386 common/string/RTStrEnd.asm
3387
3388RuntimeR3NoCrt_SOURCES.win := \
3389 r3/win/nocrt-startup-exe-win.cpp \
3390 r3/win/nocrt-startup-common-win.cpp \
3391 r3/win/nocrt-fatal-write-win.cpp \
3392 r3/win/nocrt-alloc-win.cpp \
3393 r3/win/nocrt-streams-win.cpp \
3394 \
3395 win/errmsgwin.cpp
3396
3397#
3398# RuntimeR0 - Ring-0 library for VMMR0.
3399#
3400RuntimeR0_TEMPLATE = VBoxR0
3401RuntimeR0_DEFS = IN_RT_R0 RT_WITH_VBOX NOFILEID
3402ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
3403 #ifn1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), win.arm64)
3404 RuntimeR0_DEFS += RT_NO_GIP
3405 #endif
3406endif
3407if defined(VBOX_WITH_DTRACE_R0) && !defined(VBOX_ONLY_VALIDATIONKIT)
3408 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
3409 RuntimeR0_DEFS += IPRT_WITH_DTRACE IPRT_DTRACE_PREFIX=VBOXVMM_ IPRT_DTRACE_INCLUDE="dtrace/VBoxVMM.h"
3410 else
3411 RuntimeR0_DEFS += IPRT_WITH_DTRACE IPRT_DTRACE_PREFIX=VBOXVMM_ IPRT_DTRACE_INCLUDE=\"dtrace/VBoxVMM.h\"
3412 endif
3413endif
3414RuntimeR0_INCS = include
3415RuntimeR0_SOURCES := \
3416 $(if $(VBOX_ONLY_VALIDATIONKIT),,../VMM/VBoxVMM.d) \
3417 common/checksum/crc32c.cpp \
3418 common/log/logellipsis.cpp \
3419 common/log/logrelellipsis.cpp \
3420 common/log/logcom.cpp \
3421 common/log/logformat.cpp \
3422 common/log/tracebuf.cpp \
3423 common/log/tracedefault.cpp \
3424 common/log/RTLogCreateEx.cpp \
3425 common/log/RTLogSetR0ThreadNameF.cpp \
3426 common/misc/RTAssertMsg1Weak.cpp \
3427 common/misc/RTAssertMsg2.cpp \
3428 common/misc/RTAssertMsg2Add.cpp \
3429 common/misc/RTAssertMsg2AddWeak.cpp \
3430 common/misc/RTAssertMsg2AddWeakV.cpp \
3431 common/misc/RTAssertMsg2Weak.cpp \
3432 common/misc/RTAssertMsg2WeakV.cpp \
3433 common/misc/buildconfig.cpp \
3434 common/misc/once.cpp \
3435 common/misc/sanity-c.c \
3436 common/misc/sanity-cpp.cpp \
3437 common/misc/term.cpp \
3438 common/path/RTPathFilename.cpp \
3439 common/rand/rand.cpp \
3440 common/rand/randadv.cpp \
3441 common/rand/randparkmiller.cpp \
3442 common/string/strprintf-ellipsis.cpp \
3443 common/string/strprintf2-ellipsis.cpp \
3444 common/string/strhash1.cpp \
3445 common/string/strncmp.cpp \
3446 common/string/strpbrk.cpp \
3447 common/string/strtonum.cpp \
3448 common/string/RTStrCat.cpp \
3449 common/string/RTStrCatEx.cpp \
3450 common/string/RTStrCatP.cpp \
3451 common/string/RTStrCatPEx.cpp \
3452 common/string/RTStrCopyEx.cpp \
3453 common/string/RTStrCopyP.cpp \
3454 common/string/RTStrCopyPEx.cpp \
3455 common/string/RTStrCmp.cpp \
3456 common/string/RTStrICmpAscii.cpp \
3457 common/string/RTStrNICmpAscii.cpp \
3458 common/string/RTStrNLen.cpp \
3459 common/string/RTStrNLenEx.cpp \
3460 common/table/avlgcptr.cpp \
3461 common/table/avlhcphys.cpp \
3462 common/table/avllu32.cpp \
3463 common/table/avlogcphys.cpp \
3464 common/table/avlogcptr.cpp \
3465 common/table/avlohcphys.cpp \
3466 common/table/avloioport.cpp \
3467 common/table/avlpv.cpp \
3468 common/table/avlrogcphys.cpp \
3469 common/table/avlrogcptr.cpp \
3470 common/table/avlroioport.cpp \
3471 common/table/avlroogcptr.cpp \
3472 common/table/avlu32.cpp \
3473 common/table/avlou32.cpp \
3474 common/time/timesup.cpp \
3475 generic/RTAssertShouldPanic-generic.cpp \
3476 generic/critsect-generic.cpp \
3477 generic/critsectrw-generic.cpp \
3478 generic/RTRandAdvCreateSystemFaster-generic.cpp \
3479 generic/RTRandAdvCreateSystemTruer-generic.cpp \
3480 \
3481 $(RuntimeNoCrt_SOURCES)
3482
3483if1of ($(KBUILD_TARGET), darwin solaris freebsd os2)
3484 RuntimeR0_SOURCES += \
3485 common/math/gcc/adddi3.c \
3486 common/math/gcc/anddi3.c \
3487 common/math/gcc/ashldi3.c \
3488 common/math/gcc/ashrdi3.c \
3489 common/math/gcc/cmpdi2.c \
3490 common/math/gcc/divdi3.c \
3491 common/math/gcc/divmoddi4.c \
3492 common/math/gcc/iordi3.c \
3493 common/math/gcc/lshldi3.c \
3494 common/math/gcc/lshrdi3.c \
3495 common/math/gcc/moddi3.c \
3496 common/math/gcc/muldi3.c \
3497 common/math/gcc/negdi2.c \
3498 common/math/gcc/notdi2.c \
3499 common/math/gcc/qdivrem.c \
3500 common/math/gcc/subdi3.c \
3501 common/math/gcc/ucmpdi2.c \
3502 common/math/gcc/udivdi3.c \
3503 common/math/gcc/udivmoddi4.c \
3504 common/math/gcc/umoddi3.c \
3505 common/math/gcc/xordi3.c
3506endif
3507
3508RuntimeR0_SOURCES.x86 += \
3509 common/asm/ASMCpuIdExSlow.asm \
3510 common/asm/ASMAtomicUoAndU64.asm \
3511 common/asm/ASMAtomicUoAndU32.asm \
3512 common/asm/ASMAtomicUoDecU32.asm \
3513 common/asm/ASMAtomicUoIncU32.asm \
3514 common/asm/ASMAtomicUoOrU64.asm \
3515 common/asm/ASMAtomicUoOrU32.asm \
3516 common/asm/ASMAtomicUoXorU32.asm \
3517 common/asm/ASMMemFirstMismatchingU8.asm \
3518 common/asm/ASMGetXcr0.asm \
3519 common/asm/ASMSetXcr0.asm \
3520 common/asm/ASMXSave.asm \
3521 common/asm/ASMXRstor.asm \
3522 common/asm/ASMFxSave.asm \
3523 common/asm/ASMFxRstor.asm \
3524 common/asm/ASMRdMsrEx.asm \
3525 common/asm/ASMWrMsrEx.asm \
3526 common/string/RTStrEnd.asm \
3527 VBox/RTLogWriteVmm-amd64-x86.asm
3528RuntimeR0_SOURCES.amd64 += \
3529 common/asm/ASMCpuIdExSlow.asm \
3530 common/asm/ASMAtomicUoAndU64.asm \
3531 common/asm/ASMAtomicUoAndU32.asm \
3532 common/asm/ASMAtomicUoDecU32.asm \
3533 common/asm/ASMAtomicUoIncU32.asm \
3534 common/asm/ASMAtomicUoOrU64.asm \
3535 common/asm/ASMAtomicUoOrU32.asm \
3536 common/asm/ASMAtomicUoXorU32.asm \
3537 common/asm/ASMMemFirstMismatchingU8.asm \
3538 common/asm/ASMGetXcr0.asm \
3539 common/asm/ASMSetXcr0.asm \
3540 common/asm/ASMXSave.asm \
3541 common/asm/ASMXRstor.asm \
3542 common/asm/ASMFxSave.asm \
3543 common/asm/ASMFxRstor.asm \
3544 common/asm/ASMRdMsrEx.asm \
3545 common/asm/ASMWrMsrEx.asm \
3546 common/math/RTUInt128MulByU64Ex.asm \
3547 common/string/RTStrEnd.asm \
3548 VBox/RTLogWriteVmm-amd64-x86.asm
3549RuntimeR0_SOURCES.arm32 += \
3550 common/string/RTStrEnd.cpp
3551RuntimeR0_SOURCES.arm64 += \
3552 common/string/RTStrEnd.cpp \
3553 common/asm/ASMMemFirstNonZero-generic.cpp \
3554 common/asm/ASMBitFirstClear-generic.cpp
3555RuntimeR0_SOURCES.sparc32 += \
3556 common/string/RTStrEnd.cpp
3557RuntimeR0_SOURCES.sparc64 += \
3558 common/string/RTStrEnd.cpp
3559
3560#if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
3561# RuntimeR0_SOURCES += common/time/timesupA.asm
3562#else
3563RuntimeR0_SOURCES += common/time/timesupref.cpp
3564#endif
3565
3566RuntimeR0_SOURCES.win.amd64 := $(RuntimeWin64ASM_SOURCES)
3567RuntimeR0_SOURCES.win.x86 := $(RuntimeWin32ASM_SOURCES)
3568RuntimeR0_SOURCES.win = \
3569 nt/NtProcessStartup-stub.cpp
3570
3571RuntimeR0_SOURCES.os2 = \
3572 os2/sys0.asm
3573
3574
3575#
3576# RuntimeR0Stub - Ring-0 context startup stub for Windows and Solaris.
3577#
3578RuntimeR0Stub_TEMPLATE = $(if-expr "$(KBUILD_TARGET)" == "solaris",VBoxR0DrvLib,VBoxR0)
3579RuntimeR0Stub_SOURCES.win = \
3580 nt/NtProcessStartup-stub.cpp
3581RuntimeR0Stub_SOURCES.solaris = \
3582 r0drv/solaris/modulestub-r0drv-solaris.c
3583
3584
3585#
3586# RuntimeR0Drv - Ring-0 library for host drivers.
3587#
3588RuntimeR0Drv_TEMPLATE = VBoxR0DrvLib
3589RuntimeR0Drv_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK) $(VBOX_WINPSDK_INCS)
3590RuntimeR0Drv_DEFS = IN_RT_R0 RT_WITH_VBOX RT_WITHOUT_NOCRT_WRAPPERS RT_NO_EXPORT_SYMBOL NOFILEID
3591RuntimeR0Drv_DEFS.win = IN_SUP_R0 LDR_ONLY_PE IPRT_WITHOUT_DIGEST_MD4
3592RuntimeR0Drv_DEFS.darwin = IN_SUP_R0 LDR_ONLY_MACHO IPRT_WITHOUT_DIGEST_MD4 IN_RING0_DRV_ON_DARWIN
3593if ($(VBOX_SOLARIS_11_UPDATE_VERSION) > 2 \
3594 || ($(VBOX_SOLARIS_11_UPDATE_VERSION) == 2 && $(VBOX_SOLARIS_11_BUILD_VERSION) >= 22))
3595 RuntimeR0Drv_DEFS.solaris += VBOX_NEW_CRASH_DUMP_FORMAT
3596endif
3597
3598RuntimeR0Drv_INCS := $(PATH_SUB_CURRENT) include
3599RuntimeR0Drv_INCS.freebsd = \
3600 $(PATH_STAGE)/gen-sys-hdrs
3601RuntimeR0Drv_INCS.solaris = \
3602 r0drv/solaris/vbi/i86pc \
3603 r0drv/solaris/vbi/i86pc/sys
3604
3605RuntimeR0Drv_SOURCES = \
3606 common/alloc/alloc.cpp \
3607 common/alloc/heapsimple.cpp \
3608 common/alloc/heapoffset.cpp \
3609 common/checksum/alt-md5.cpp \
3610 common/checksum/crc32.cpp \
3611 common/checksum/crc64.cpp \
3612 common/checksum/ipv4.cpp \
3613 common/checksum/ipv6.cpp \
3614 common/err/RTErrConvertToErrno.cpp \
3615 common/err/RTErrConvertFromErrno.cpp \
3616 common/err/errinfo.cpp \
3617 common/log/log.cpp \
3618 common/log/log-weak.cpp \
3619 common/log/log-weak-assert.cpp \
3620 common/log/log-weak-rel.cpp \
3621 common/log/logellipsis.cpp \
3622 common/log/logrel.cpp \
3623 common/log/logrelellipsis.cpp \
3624 common/log/logcom.cpp \
3625 common/log/logformat.cpp \
3626 common/log/tracebuf.cpp \
3627 common/log/tracedefault.cpp \
3628 common/log/RTLogCreateEx.cpp \
3629 common/misc/RTAssertMsg1Weak.cpp \
3630 common/misc/RTAssertMsg2.cpp \
3631 common/misc/RTAssertMsg2Add.cpp \
3632 common/misc/RTAssertMsg2AddWeak.cpp \
3633 common/misc/RTAssertMsg2AddWeakV.cpp \
3634 common/misc/RTAssertMsg2Weak.cpp \
3635 common/misc/RTAssertMsg2WeakV.cpp \
3636 common/misc/assert.cpp \
3637 common/misc/buildconfig.cpp \
3638 common/misc/handletable.cpp \
3639 common/misc/handletablectx.cpp \
3640 common/misc/handletablesimple.cpp \
3641 common/misc/once.cpp \
3642 common/misc/sanity-c.c \
3643 common/misc/sanity-cpp.cpp \
3644 common/misc/term.cpp \
3645 common/misc/RTMemWipeThoroughly.cpp \
3646 common/path/rtPathVolumeSpecLen.cpp \
3647 common/path/RTPathAbsDup.cpp \
3648 common/path/RTPathAbsEx.cpp \
3649 common/path/RTPathAbsExDup.cpp \
3650 common/path/RTPathAppend.cpp \
3651 common/path/RTPathAppendEx.cpp \
3652 common/path/RTPathExt.cpp \
3653 common/path/RTPathFilename.cpp \
3654 common/path/RTPathHasExt.cpp \
3655 common/path/RTPathHasPath.cpp \
3656 common/path/RTPathParseSimple.cpp \
3657 common/path/RTPathRealDup.cpp \
3658 common/path/RTPathStripExt.cpp \
3659 common/path/RTPathStripFilename.cpp \
3660 common/path/RTPathStripTrailingSlash.cpp \
3661 common/rand/rand.cpp \
3662 common/rand/randadv.cpp \
3663 common/rand/randparkmiller.cpp \
3664 common/string/RTStrCat.cpp \
3665 common/string/RTStrCatEx.cpp \
3666 common/string/RTStrCatP.cpp \
3667 common/string/RTStrCatPEx.cpp \
3668 common/string/RTStrCmp.cpp \
3669 common/string/RTStrCopy.cpp \
3670 common/string/RTStrCopyEx.cpp \
3671 common/string/RTStrCopyP.cpp \
3672 common/string/RTStrCopyPEx.cpp \
3673 common/string/RTStrICmpAscii.cpp \
3674 common/string/RTStrNICmpAscii.cpp \
3675 common/string/RTStrNCmp.cpp \
3676 common/string/RTStrNLen.cpp \
3677 common/string/RTStrNLenEx.cpp \
3678 common/string/RTUtf16ICmpAscii.cpp \
3679 common/string/RTUtf16NICmpAscii.cpp \
3680 common/string/straprintf.cpp \
3681 common/string/strformat.cpp \
3682 common/string/RTStrFormat.cpp \
3683 common/string/strformatnum.cpp \
3684 common/string/strformatrt.cpp \
3685 common/string/strformattype.cpp \
3686 common/string/strhash1.cpp \
3687 common/string/strprintf.cpp \
3688 common/string/strprintf-ellipsis.cpp \
3689 common/string/strprintf2.cpp \
3690 common/string/strprintf2-ellipsis.cpp \
3691 common/string/strtonum.cpp \
3692 common/string/stringalloc.cpp \
3693 common/string/unidata-flags.cpp \
3694 common/string/unidata-lower.cpp \
3695 common/string/unidata-upper.cpp \
3696 common/string/utf-8.cpp \
3697 common/string/utf-8-case.cpp \
3698 common/string/utf-8-case2.cpp \
3699 common/string/utf-16.cpp \
3700 common/string/utf-16-case.cpp \
3701 common/string/utf-16-latin-1.cpp \
3702 common/string/utf-16-printf.cpp \
3703 common/table/avlpv.cpp \
3704 common/table/avlu32.cpp \
3705 common/table/avllu32.cpp \
3706 common/time/time.cpp \
3707 generic/RTLogWriteStdErr-stub-generic.cpp \
3708 generic/RTLogWriteUser-generic.cpp \
3709 generic/RTMpGetArraySize-generic.cpp \
3710 generic/RTRandAdvCreateSystemFaster-generic.cpp \
3711 generic/RTSemEventWait-2-ex-generic.cpp \
3712 generic/RTSemEventWaitNoResume-2-ex-generic.cpp \
3713 generic/RTSemEventMultiWait-2-ex-generic.cpp \
3714 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
3715 generic/system-page-size-generic.cpp \
3716 generic/critsect-generic.cpp \
3717 generic/critsectrw-generic.cpp \
3718 generic/errvars-generic.cpp \
3719 generic/uuid-generic.cpp \
3720 r0drv/alloc-r0drv.cpp \
3721 r0drv/initterm-r0drv.cpp \
3722 r0drv/generic/semspinmutex-r0drv-generic.c \
3723 r0drv/RTR0DbgKrnlInfoGetSymbol.cpp \
3724 VBox/log-vbox.cpp
3725
3726RuntimeR0Drv_SOURCES.amd64 = \
3727 common/asm/ASMCpuIdExSlow.asm \
3728 common/asm/ASMMemFirstMismatchingU8.asm \
3729 common/asm/ASMRdMsrEx.asm \
3730 common/asm/ASMWrMsrEx.asm \
3731 common/math/bignum-amd64-x86.asm \
3732 common/math/RTUInt128MulByU64.asm \
3733 common/math/RTUInt128MulByU64Ex.asm \
3734 common/string/RTStrEnd.asm \
3735 VBox/RTLogWriteVmm-amd64-x86.asm
3736RuntimeR0Drv_SOURCES.x86 = \
3737 common/asm/ASMCpuIdExSlow.asm \
3738 common/asm/ASMMemFirstMismatchingU8.asm \
3739 common/asm/ASMRdMsrEx.asm \
3740 common/asm/ASMWrMsrEx.asm \
3741 common/math/bignum-amd64-x86.asm \
3742 common/string/RTStrEnd.asm \
3743 VBox/RTLogWriteVmm-amd64-x86.asm
3744RuntimeR0Drv_SOURCES.arm32 += \
3745 common/string/RTStrEnd.cpp \
3746 common/asm/ASMMultU64ByU32DivByU32-generic.cpp
3747RuntimeR0Drv_SOURCES.arm64 += \
3748 common/string/RTStrEnd.cpp \
3749 common/asm/ASMMultU64ByU32DivByU32-generic.cpp
3750RuntimeR0Drv_SOURCES.sparc32 += \
3751 common/string/RTStrEnd.cpp \
3752 common/asm/ASMMultU64ByU32DivByU32-generic.cpp
3753RuntimeR0Drv_SOURCES.sparc64 += \
3754 common/string/RTStrEnd.cpp \
3755 common/asm/ASMMultU64ByU32DivByU32-generic.cpp
3756
3757RuntimeR0Drv_SOURCES.linux = \
3758 common/misc/thread.cpp \
3759 common/string/strpbrk.cpp \
3760 generic/RTAssertShouldPanic-generic.cpp \
3761 generic/RTLogWriteStdOut-stub-generic.cpp \
3762 generic/RTMpGetCoreCount-generic.cpp \
3763 generic/mppresent-generic.cpp \
3764 generic/rtStrFormatKernelAddress-generic.cpp \
3765 r0drv/linux/alloc-r0drv-linux.c \
3766 r0drv/linux/assert-r0drv-linux.c \
3767 r0drv/linux/initterm-r0drv-linux.c \
3768 r0drv/linux/memobj-r0drv-linux.c \
3769 r0drv/linux/memuserkernel-r0drv-linux.c \
3770 r0drv/linux/mp-r0drv-linux.c \
3771 r0drv/linux/mpnotification-r0drv-linux.c \
3772 r0drv/linux/process-r0drv-linux.c \
3773 r0drv/linux/RTLogWriteDebugger-r0drv-linux.c \
3774 r0drv/linux/semevent-r0drv-linux.c \
3775 r0drv/linux/semeventmulti-r0drv-linux.c \
3776 r0drv/linux/semfastmutex-r0drv-linux.c \
3777 r0drv/linux/semmutex-r0drv-linux.c \
3778 r0drv/linux/spinlock-r0drv-linux.c \
3779 r0drv/linux/thread-r0drv-linux.c \
3780 r0drv/linux/thread2-r0drv-linux.c \
3781 r0drv/linux/threadctxhooks-r0drv-linux.c \
3782 r0drv/linux/time-r0drv-linux.c \
3783 r0drv/linux/timer-r0drv-linux.c \
3784 r0drv/memobj-r0drv.cpp \
3785 r0drv/mpnotification-r0drv.c \
3786 r0drv/powernotification-r0drv.c
3787
3788RuntimeR0Drv_SOURCES.win = \
3789 common/ldr/ldr.cpp \
3790 common/ldr/ldrEx.cpp \
3791 common/ldr/ldrPE.cpp \
3792 common/asn1/asn1-basics.cpp \
3793 common/asn1/asn1-dump.cpp \
3794 common/asn1/asn1-cursor.cpp \
3795 common/asn1/asn1-default-allocator.cpp \
3796 common/asn1/asn1-safer-allocator.cpp \
3797 common/asn1/asn1-encode.cpp \
3798 common/asn1/asn1-ut-bitstring.cpp \
3799 common/asn1/asn1-ut-bitstring-decode.cpp \
3800 common/asn1/asn1-ut-boolean.cpp \
3801 common/asn1/asn1-ut-boolean-decode.cpp \
3802 common/asn1/asn1-ut-core.cpp \
3803 common/asn1/asn1-ut-core-decode.cpp \
3804 common/asn1/asn1-ut-dyntype.cpp \
3805 common/asn1/asn1-ut-dyntype-decode.cpp \
3806 common/asn1/asn1-ut-integer.cpp \
3807 common/asn1/asn1-ut-integer-decode.cpp \
3808 common/asn1/asn1-ut-null.cpp \
3809 common/asn1/asn1-ut-null-decode.cpp \
3810 common/asn1/asn1-ut-objid.cpp \
3811 common/asn1/asn1-ut-objid-decode.cpp \
3812 common/asn1/asn1-ut-octetstring.cpp \
3813 common/asn1/asn1-ut-octetstring-decode.cpp \
3814 common/asn1/asn1-ut-string.cpp \
3815 common/asn1/asn1-ut-string-decode.cpp \
3816 common/asn1/asn1-ut-time.cpp \
3817 common/asn1/asn1-ut-time-decode.cpp \
3818 common/crypto/digest-core.cpp \
3819 common/crypto/digest-builtin.cpp \
3820 common/crypto/key.cpp \
3821 common/crypto/rsa-asn1-decoder.cpp \
3822 common/crypto/rsa-core.cpp \
3823 common/crypto/rsa-init.cpp \
3824 common/crypto/rsa-sanity.cpp \
3825 common/crypto/pkcs7-asn1-decoder.cpp \
3826 common/crypto/pkcs7-core.cpp \
3827 common/crypto/pkcs7-init.cpp \
3828 common/crypto/pkcs7-sanity.cpp \
3829 common/crypto/pkcs7-verify.cpp \
3830 common/crypto/pkix-signature-builtin.cpp \
3831 common/crypto/pkix-signature-core.cpp \
3832 common/crypto/pkix-signature-rsa.cpp \
3833 common/crypto/pkix-util.cpp \
3834 common/crypto/pkix-verify.cpp \
3835 common/crypto/spc-asn1-decoder.cpp \
3836 common/crypto/spc-core.cpp \
3837 common/crypto/spc-init.cpp \
3838 common/crypto/spc-sanity.cpp \
3839 common/crypto/x509-asn1-decoder.cpp \
3840 common/crypto/x509-certpaths.cpp \
3841 common/crypto/x509-core.cpp \
3842 common/crypto/x509-create-sign.cpp \
3843 common/crypto/x509-init.cpp \
3844 common/crypto/x509-sanity.cpp \
3845 common/crypto/x509-verify.cpp \
3846 common/crypto/store.cpp \
3847 common/crypto/store-inmem.cpp \
3848 common/crypto/taf-asn1-decoder.cpp \
3849 common/crypto/taf-core.cpp \
3850 common/crypto/taf-init.cpp \
3851 common/crypto/taf-sanity.cpp \
3852 common/crypto/tsp-asn1-decoder.cpp \
3853 common/crypto/tsp-core.cpp \
3854 common/crypto/tsp-init.cpp \
3855 common/crypto/tsp-sanity.cpp \
3856 common/checksum/alt-md2.cpp \
3857 common/checksum/alt-sha1.cpp \
3858 common/checksum/alt-sha256.cpp \
3859 common/checksum/alt-sha512.cpp \
3860 common/checksum/alt-sha3.cpp \
3861 common/checksum/md2str.cpp \
3862 common/checksum/md4str.cpp \
3863 common/checksum/md5str.cpp \
3864 common/checksum/sha1str.cpp \
3865 common/checksum/sha224str.cpp \
3866 common/checksum/sha256str.cpp \
3867 common/checksum/sha384str.cpp \
3868 common/checksum/sha512str.cpp \
3869 common/checksum/sha512t224str.cpp \
3870 common/checksum/sha512t256str.cpp \
3871 common/err/errinfolog.cpp \
3872 common/path/RTPathFilenameUtf16.cpp \
3873 common/path/RTPathChangeToUnixSlashes.cpp \
3874 common/math/bignum.cpp \
3875 common/string/RTStrPrintHexBytes.cpp \
3876 common/string/RTUtf16Copy.cpp \
3877 common/string/RTUtf16CopyAscii.cpp \
3878 common/string/RTUtf16CopyEx.cpp \
3879 common/string/RTUtf16Cat.cpp \
3880 common/string/RTUtf16CatAscii.cpp \
3881 common/string/RTUtf16End.cpp \
3882 common/string/RTUtf16NLen.cpp \
3883 common/string/RTUtf16NLenEx.cpp \
3884 common/string/RTUtf16PrintHexBytes.cpp \
3885 common/string/strstrip.cpp \
3886 generic/memsafer-generic.cpp \
3887 common/misc/thread.cpp \
3888 common/string/strncmp.cpp \
3889 common/string/strpbrk.cpp \
3890 generic/RTAssertShouldPanic-generic.cpp \
3891 generic/RTLogWriteStdOut-stub-generic.cpp \
3892 generic/RTMpGetCoreCount-generic.cpp \
3893 generic/RTTimerCreate-generic.cpp \
3894 generic/mppresent-generic-online.cpp \
3895 generic/rtStrFormatKernelAddress-generic.cpp \
3896 nt/RTErrConvertFromNtStatus.cpp \
3897 nt/RTNtPathExpand8dot3Path.cpp \
3898 nt/RTNtPathExpand8dot3PathA.cpp \
3899 nt/RTNtPathFindPossible8dot3Name.cpp \
3900 nt/semevent-nt.cpp \
3901 nt/RTSemEventGetResolution-nt.cpp \
3902 nt/semeventmulti-nt.cpp \
3903 nt/RTSemEventMultiGetResolution-nt.cpp \
3904 r0drv/generic/threadctxhooks-r0drv-generic.cpp \
3905 r0drv/alloc-ef-r0drv.cpp \
3906 r0drv/memobj-r0drv.cpp \
3907 r0drv/mpnotification-r0drv.c \
3908 r0drv/powernotification-r0drv.c \
3909 r0drv/nt/alloc-r0drv-nt.cpp \
3910 r0drv/nt/assert-r0drv-nt.cpp \
3911 r0drv/nt/dbgkrnlinfo-r0drv-nt.cpp \
3912 r0drv/nt/initterm-r0drv-nt.cpp \
3913 r0drv/nt/memobj-r0drv-nt.cpp \
3914 r0drv/nt/memuserkernel-r0drv-nt.cpp \
3915 r0drv/nt/mp-r0drv-nt.cpp \
3916 r0drv/nt/process-r0drv-nt.cpp \
3917 r0drv/nt/RTLogWriteDebugger-r0drv-nt.cpp \
3918 r0drv/nt/semfastmutex-r0drv-nt.cpp \
3919 r0drv/nt/semmutex-r0drv-nt.cpp \
3920 r0drv/nt/spinlock-r0drv-nt.cpp \
3921 r0drv/nt/thread-r0drv-nt.cpp \
3922 r0drv/nt/thread2-r0drv-nt.cpp \
3923 r0drv/nt/time-r0drv-nt.cpp \
3924 r0drv/nt/timer-r0drv-nt.cpp \
3925 r0drv/nt/RTTimerGetSystemGranularity-r0drv-nt.cpp
3926
3927RuntimeR0Drv_SOURCES.win.amd64 := $(RuntimeWin64ASM_SOURCES) \
3928 common/misc/zero.asm \
3929 common/string/memcmp.asm \
3930 common/string/memchr.asm \
3931 common/string/memcpy.asm \
3932 common/string/memset.asm \
3933 common/string/memmove.asm \
3934 common/string/strlen.asm \
3935 r0drv/nt/toxic-chkstk-r0drv-nt.asm
3936
3937RuntimeR0Drv_SOURCES.win.x86 := $(RuntimeWin32ASM_SOURCES) \
3938 common/misc/zero.asm \
3939 common/string/memcmp.asm \
3940 common/string/memchr.asm \
3941 common/string/memcpy.asm \
3942 common/string/memset.asm \
3943 common/string/memmove.asm \
3944 common/string/strlen.asm \
3945 r0drv/nt/nt3fakes-stub-r0drv-nt.cpp \
3946 r0drv/nt/alloca-x86-r0drv-nt.asm \
3947 r0drv/nt/toxic-chkstk-r0drv-nt.asm
3948
3949RuntimeR0Drv_SOURCES.win.arm64 := \
3950 common/asm/ASMMemFirstNonZero-generic.cpp \
3951 common/misc/zero.cpp
3952
3953RuntimeR0Drv_SOURCES.darwin = \
3954 common/ldr/ldr.cpp \
3955 common/ldr/ldrEx.cpp \
3956 common/ldr/ldrMachO.cpp \
3957 common/ldr/ldrMemory.cpp \
3958 common/asn1/asn1-basics.cpp \
3959 common/asn1/asn1-dump.cpp \
3960 common/asn1/asn1-cursor.cpp \
3961 common/asn1/asn1-default-allocator.cpp \
3962 common/asn1/asn1-safer-allocator.cpp \
3963 common/asn1/asn1-encode.cpp \
3964 common/asn1/asn1-ut-bitstring.cpp \
3965 common/asn1/asn1-ut-bitstring-decode.cpp \
3966 common/asn1/asn1-ut-boolean.cpp \
3967 common/asn1/asn1-ut-boolean-decode.cpp \
3968 common/asn1/asn1-ut-core.cpp \
3969 common/asn1/asn1-ut-core-decode.cpp \
3970 common/asn1/asn1-ut-dyntype.cpp \
3971 common/asn1/asn1-ut-dyntype-decode.cpp \
3972 common/asn1/asn1-ut-integer.cpp \
3973 common/asn1/asn1-ut-integer-decode.cpp \
3974 common/asn1/asn1-ut-null.cpp \
3975 common/asn1/asn1-ut-null-decode.cpp \
3976 common/asn1/asn1-ut-objid.cpp \
3977 common/asn1/asn1-ut-objid-decode.cpp \
3978 common/asn1/asn1-ut-octetstring.cpp \
3979 common/asn1/asn1-ut-octetstring-decode.cpp \
3980 common/asn1/asn1-ut-string.cpp \
3981 common/asn1/asn1-ut-string-decode.cpp \
3982 common/asn1/asn1-ut-time.cpp \
3983 common/asn1/asn1-ut-time-decode.cpp \
3984 common/crypto/digest-core.cpp \
3985 common/crypto/digest-builtin.cpp \
3986 common/crypto/key.cpp \
3987 common/crypto/rsa-asn1-decoder.cpp \
3988 common/crypto/rsa-core.cpp \
3989 common/crypto/rsa-init.cpp \
3990 common/crypto/rsa-sanity.cpp \
3991 common/crypto/pkcs7-asn1-decoder.cpp \
3992 common/crypto/pkcs7-core.cpp \
3993 common/crypto/pkcs7-init.cpp \
3994 common/crypto/pkcs7-sanity.cpp \
3995 common/crypto/pkcs7-verify.cpp \
3996 common/crypto/pkix-signature-builtin.cpp \
3997 common/crypto/pkix-signature-core.cpp \
3998 common/crypto/pkix-signature-rsa.cpp \
3999 common/crypto/pkix-util.cpp \
4000 common/crypto/pkix-verify.cpp \
4001 common/crypto/spc-asn1-decoder.cpp \
4002 common/crypto/spc-core.cpp \
4003 common/crypto/spc-init.cpp \
4004 common/crypto/spc-sanity.cpp \
4005 common/crypto/x509-asn1-decoder.cpp \
4006 common/crypto/x509-certpaths.cpp \
4007 common/crypto/x509-core.cpp \
4008 common/crypto/x509-create-sign.cpp \
4009 common/crypto/x509-init.cpp \
4010 common/crypto/x509-sanity.cpp \
4011 common/crypto/x509-verify.cpp \
4012 common/crypto/store.cpp \
4013 common/crypto/store-inmem.cpp \
4014 common/crypto/taf-asn1-decoder.cpp \
4015 common/crypto/taf-core.cpp \
4016 common/crypto/taf-init.cpp \
4017 common/crypto/taf-sanity.cpp \
4018 common/crypto/tsp-asn1-decoder.cpp \
4019 common/crypto/tsp-core.cpp \
4020 common/crypto/tsp-init.cpp \
4021 common/crypto/tsp-sanity.cpp \
4022 common/checksum/alt-md2.cpp \
4023 common/checksum/alt-sha1.cpp \
4024 common/checksum/alt-sha256.cpp \
4025 common/checksum/alt-sha512.cpp \
4026 common/checksum/alt-sha3.cpp \
4027 common/checksum/md2str.cpp \
4028 common/checksum/md4str.cpp \
4029 common/checksum/md5str.cpp \
4030 common/checksum/sha1str.cpp \
4031 common/checksum/sha224str.cpp \
4032 common/checksum/sha256str.cpp \
4033 common/checksum/sha384str.cpp \
4034 common/checksum/sha512str.cpp \
4035 common/checksum/sha512t224str.cpp \
4036 common/checksum/sha512t256str.cpp \
4037 common/err/errinfolog.cpp \
4038 common/math/bignum.cpp \
4039 common/misc/thread.cpp \
4040 common/string/base64.cpp \
4041 common/string/memchr.asm \
4042 common/string/mempcpy.asm \
4043 common/string/strpbrk.cpp \
4044 common/string/strstrip.cpp \
4045 common/string/RTStrPrintHexBytes.cpp \
4046 darwin/RTErrConvertFromDarwin.cpp \
4047 darwin/RTErrConvertFromDarwinIO.cpp \
4048 darwin/RTErrConvertFromDarwinKern.cpp \
4049 generic/RTAssertShouldPanic-generic.cpp \
4050 generic/RTFileReadAll-generic.cpp \
4051 generic/RTFileReadAllByHandle-generic.cpp \
4052 generic/RTFileReadAllByHandleEx-generic.cpp \
4053 generic/RTFileReadAllEx-generic.cpp \
4054 generic/RTFileReadAllFree-generic.cpp \
4055 generic/RTMpGetCoreCount-generic.cpp \
4056 generic/RTMpOnPair-generic.cpp \
4057 generic/RTThreadQueryTerminationStatus-stub-generic.cpp \
4058 generic/RTTimerCreate-generic.cpp \
4059 generic/memsafer-generic.cpp \
4060 generic/mppresent-generic.cpp \
4061 generic/timer-generic.cpp \
4062 r0drv/generic/mpnotification-r0drv-generic.cpp \
4063 r0drv/generic/threadctxhooks-r0drv-generic.cpp \
4064 r0drv/darwin/alloc-r0drv-darwin.cpp \
4065 r0drv/darwin/assert-r0drv-darwin.cpp \
4066 r0drv/darwin/initterm-r0drv-darwin.cpp \
4067 r0drv/darwin/dbgkrnlinfo-r0drv-darwin.cpp \
4068 r0drv/darwin/fileio-r0drv-darwin.cpp \
4069 r0drv/darwin/memobj-r0drv-darwin.cpp \
4070 r0drv/darwin/mp-r0drv-darwin.cpp \
4071 r0drv/darwin/memuserkernel-r0drv-darwin.cpp \
4072 r0drv/darwin/process-r0drv-darwin.cpp \
4073 r0drv/darwin/RTLogWriteDebugger-r0drv-darwin.cpp \
4074 r0drv/darwin/RTLogWriteStdOut-r0drv-darwin.cpp \
4075 r0drv/darwin/rtStrFormatKernelAddress-r0drv-darwin.cpp \
4076 r0drv/darwin/semevent-r0drv-darwin.cpp \
4077 r0drv/darwin/semeventmulti-r0drv-darwin.cpp \
4078 r0drv/darwin/semfastmutex-r0drv-darwin.cpp \
4079 r0drv/darwin/semmutex-r0drv-darwin.cpp \
4080 r0drv/darwin/spinlock-r0drv-darwin.cpp \
4081 r0drv/darwin/thread-r0drv-darwin.cpp \
4082 r0drv/darwin/thread2-r0drv-darwin.cpp \
4083 r0drv/darwin/threadpreempt-r0drv-darwin.cpp \
4084 r0drv/darwin/time-r0drv-darwin.cpp \
4085 r0drv/alloc-ef-r0drv.cpp \
4086 r0drv/memobj-r0drv.cpp \
4087 r0drv/powernotification-r0drv.c
4088# - The xnu memcpy implementation in osfmk/x86_64/bcopy.s returned 'void' rather than 'void *' for a long time, so use our own.
4089# - The memcmp and strlen implementations are still C implementations living in osfmk/x86_64/loose_ends.c, so use our asm code.
4090RuntimeR0Drv_SOURCES.darwin.amd64 = \
4091 common/string/memcpy.asm
4092# common/string/strlen.asm - try again later \
4093# common/string/memcmp.asm
4094
4095RuntimeR0Drv_SOURCES.os2 = \
4096 common/path/RTPathFilenameUtf16.cpp \
4097 common/string/RTUtf16Chr.cpp \
4098 common/string/RTUtf16CmpAscii.cpp \
4099 common/string/memchr.asm \
4100 common/string/memcmp.asm \
4101 common/string/memcpy.asm \
4102 common/string/mempcpy.asm \
4103 common/string/memmove.asm \
4104 common/string/memset.asm \
4105 common/string/strchr.asm \
4106 common/string/strcmp.asm \
4107 common/string/strcpy.asm \
4108 common/string/strlen.asm \
4109 common/string/strncmp.cpp \
4110 common/string/strpbrk.cpp \
4111 common/misc/thread.cpp \
4112 generic/RTAssertShouldPanic-generic.cpp \
4113 generic/RTLogWriteDebugger-generic.cpp \
4114 generic/RTLogWriteStdOut-stub-generic.cpp \
4115 generic/RTMpCpuId-generic.cpp \
4116 generic/RTMpCpuIdFromSetIndex-generic.cpp \
4117 generic/RTMpCpuIdToSetIndex-generic.cpp \
4118 generic/RTMpIsCpuPossible-generic.cpp \
4119 generic/RTMpGetCount-generic.cpp \
4120 generic/RTMpGetMaxCpuId-generic.cpp \
4121 generic/RTMpGetOnlineCount-generic.cpp \
4122 generic/RTMpGetOnlineSet-generic.cpp \
4123 generic/RTMpGetSet-generic.cpp \
4124 generic/RTMpIsCpuOnline-generic.cpp \
4125 generic/RTThreadQueryTerminationStatus-stub-generic.cpp \
4126 generic/RTTimerCreate-generic.cpp \
4127 generic/mppresent-generic.cpp \
4128 generic/rtStrFormatKernelAddress-generic.cpp \
4129 os2/RTErrConvertFromOS2.cpp \
4130 os2/rtSemWaitOs2ConvertTimeout.cpp \
4131 os2/sys0.asm \
4132 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
4133 r0drv/generic/RTMpOn-r0drv-generic.cpp \
4134 r0drv/generic/mpnotification-r0drv-generic.cpp \
4135 r0drv/generic/threadctxhooks-r0drv-generic.cpp \
4136 r0drv/memobj-r0drv.cpp \
4137 r0drv/powernotification-r0drv.c \
4138 r0drv/os2/alloc-r0drv-os2.cpp \
4139 r0drv/os2/assert-r0drv-os2.cpp \
4140 r0drv/os2/assertA-r0drv-os2.asm \
4141 r0drv/os2/initterm-r0drv-os2.cpp \
4142 r0drv/os2/memobj-r0drv-os2.cpp \
4143 r0drv/os2/memuserkernel-r0drv-os2.cpp \
4144 r0drv/os2/os2imports.imp \
4145 r0drv/os2/process-r0drv-os2.cpp \
4146 r0drv/os2/RTR0AssertPanicSystem-r0drv-os2.asm \
4147 r0drv/os2/RTR0Os2DHQueryDOSVar.asm \
4148 r0drv/os2/RTR0Os2DHVMGlobalToProcess.asm \
4149 r0drv/os2/semevent-r0drv-os2.cpp \
4150 r0drv/os2/semeventmulti-r0drv-os2.cpp \
4151 r0drv/os2/semfastmutex-r0drv-os2.cpp \
4152 r0drv/os2/spinlock-r0drv-os2.cpp \
4153 r0drv/os2/thread-r0drv-os2.cpp \
4154 r0drv/os2/thread2-r0drv-os2.cpp \
4155 r0drv/os2/time-r0drv-os2.cpp \
4156 r0drv/os2/timer-r0drv-os2.cpp \
4157 r0drv/os2/timerA-r0drv-os2.asm
4158ifndef VBOX_USE_WATCOM_FOR_OS2
4159 RuntimeR0Drv_SOURCES.os2 += \
4160 common/math/gcc/adddi3.c \
4161 common/math/gcc/anddi3.c \
4162 common/math/gcc/ashldi3.c \
4163 common/math/gcc/ashrdi3.c \
4164 common/math/gcc/cmpdi2.c \
4165 common/math/gcc/divdi3.c \
4166 common/math/gcc/divmoddi4.c \
4167 common/math/gcc/iordi3.c \
4168 common/math/gcc/lshldi3.c \
4169 common/math/gcc/lshrdi3.c \
4170 common/math/gcc/moddi3.c \
4171 common/math/gcc/muldi3.c \
4172 common/math/gcc/negdi2.c \
4173 common/math/gcc/notdi2.c \
4174 common/math/gcc/qdivrem.c \
4175 common/math/gcc/subdi3.c \
4176 common/math/gcc/ucmpdi2.c \
4177 common/math/gcc/udivdi3.c \
4178 common/math/gcc/udivmoddi4.c \
4179 common/math/gcc/umoddi3.c \
4180 common/math/gcc/xordi3.c
4181else
4182 RuntimeR0Drv_SOURCES.os2 += \
4183 common/math/watcom/I8D-x86-32.asm \
4184 common/math/watcom/U8D-x86-32.asm \
4185 common/math/watcom/RTWatcomUInt64Div.c \
4186 common/math/watcom/U8LS-x86-32.asm \
4187 common/math/watcom/U8RS-x86-32.asm \
4188 common/math/watcom/U8M-I8M-x86-32.asm \
4189 common/string/watcom/bzero.asm \
4190 common/string/watcom/memchr.asm \
4191 common/string/watcom/memcmp.asm \
4192 common/string/watcom/memcpy.asm \
4193 common/string/watcom/memmove.asm \
4194 common/string/watcom/mempcpy.asm \
4195 common/string/watcom/memrchr.asm \
4196 common/string/watcom/memset.asm \
4197 common/string/watcom/strchr.asm \
4198 common/string/watcom/strcmp.asm \
4199 common/string/watcom/strcpy.asm \
4200 common/string/watcom/strlen.asm \
4201 common/string/watcom/strncmp.asm \
4202 common/string/watcom/strncpy.asm
4203endif
4204
4205RuntimeR0Drv_SOURCES.freebsd = \
4206 common/misc/thread.cpp \
4207 common/string/memchr.asm \
4208 common/string/memmove.asm \
4209 common/string/strpbrk.cpp \
4210 common/string/memcmp.asm \
4211 common/string/strchr.asm \
4212 generic/RTAssertShouldPanic-generic.cpp \
4213 generic/RTLogWriteDebugger-generic.cpp \
4214 generic/RTLogWriteStdOut-stub-generic.cpp \
4215 generic/RTMpOnPair-generic.cpp \
4216 generic/RTTimerCreate-generic.cpp \
4217 generic/mppresent-generic.cpp \
4218 generic/rtStrFormatKernelAddress-generic.cpp \
4219 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
4220 r0drv/generic/mpnotification-r0drv-generic.cpp \
4221 r0drv/generic/threadctxhooks-r0drv-generic.cpp \
4222 r0drv/freebsd/alloc-r0drv-freebsd.c \
4223 r0drv/freebsd/assert-r0drv-freebsd.c \
4224 r0drv/freebsd/initterm-r0drv-freebsd.c \
4225 r0drv/freebsd/memobj-r0drv-freebsd.c \
4226 r0drv/freebsd/memuserkernel-r0drv-freebsd.c \
4227 r0drv/freebsd/process-r0drv-freebsd.c \
4228 r0drv/freebsd/semevent-r0drv-freebsd.c \
4229 r0drv/freebsd/semeventmulti-r0drv-freebsd.c \
4230 r0drv/freebsd/semfastmutex-r0drv-freebsd.c \
4231 r0drv/freebsd/semmutex-r0drv-freebsd.c \
4232 r0drv/freebsd/spinlock-r0drv-freebsd.c \
4233 r0drv/freebsd/thread-r0drv-freebsd.c \
4234 r0drv/freebsd/thread2-r0drv-freebsd.c \
4235 r0drv/freebsd/time-r0drv-freebsd.c \
4236 r0drv/freebsd/mp-r0drv-freebsd.c \
4237 generic/timer-generic.cpp \
4238 r0drv/alloc-ef-r0drv.cpp \
4239 r0drv/memobj-r0drv.cpp \
4240 r0drv/powernotification-r0drv.c
4241
4242RuntimeR0Drv_SOURCES.netbsd = \
4243 common/misc/thread.cpp \
4244 common/string/strpbrk.cpp \
4245 generic/RTAssertShouldPanic-generic.cpp \
4246 generic/RTLogWriteDebugger-generic.cpp \
4247 generic/RTThreadQueryTerminationStatus-stub-generic.cpp \
4248 generic/RTTimerCreate-generic.cpp \
4249 generic/mppresent-generic.cpp \
4250 generic/rtStrFormatKernelAddress-generic.cpp \
4251 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
4252 r0drv/generic/mpnotification-r0drv-generic.cpp \
4253 r0drv/generic/threadctxhooks-r0drv-generic.cpp \
4254 r0drv/netbsd/RTLogWriteStdOut-r0drv-netbsd.c \
4255 r0drv/netbsd/alloc-r0drv-netbsd.c \
4256 r0drv/netbsd/assert-r0drv-netbsd.c \
4257 r0drv/netbsd/initterm-r0drv-netbsd.c \
4258 r0drv/netbsd/memobj-r0drv-netbsd.c \
4259 r0drv/netbsd/memuserkernel-r0drv-netbsd.c \
4260 r0drv/netbsd/process-r0drv-netbsd.c \
4261 r0drv/netbsd/semevent-r0drv-netbsd.c \
4262 r0drv/netbsd/semeventmulti-r0drv-netbsd.c \
4263 r0drv/netbsd/semfastmutex-r0drv-netbsd.c \
4264 r0drv/netbsd/spinlock-r0drv-netbsd.c \
4265 r0drv/netbsd/thread-r0drv-netbsd.c \
4266 r0drv/netbsd/thread2-r0drv-netbsd.c \
4267 r0drv/netbsd/time-r0drv-netbsd.c \
4268 r0drv/netbsd/mp-r0drv-netbsd.c \
4269 generic/timer-generic.cpp \
4270 r0drv/memobj-r0drv.cpp \
4271 r0drv/powernotification-r0drv.c
4272
4273RuntimeR0Drv_SOURCES.solaris = \
4274 common/misc/thread.cpp \
4275 common/string/memchr.asm \
4276 generic/RTAssertShouldPanic-generic.cpp \
4277 generic/RTLogWriteStdOut-stub-generic.cpp \
4278 generic/RTMpGetCoreCount-generic.cpp \
4279 generic/RTThreadQueryTerminationStatus-stub-generic.cpp \
4280 generic/RTTimerCreate-generic.cpp \
4281 generic/mppresent-generic.cpp \
4282 generic/rtStrFormatKernelAddress-generic.cpp \
4283 r0drv/memobj-r0drv.cpp \
4284 r0drv/mpnotification-r0drv.c \
4285 r0drv/powernotification-r0drv.c \
4286 r0drv/solaris/RTLogWriteDebugger-r0drv-solaris.c \
4287 r0drv/solaris/RTMpPokeCpu-r0drv-solaris.c \
4288 r0drv/solaris/alloc-r0drv-solaris.c \
4289 r0drv/solaris/assert-r0drv-solaris.c \
4290 r0drv/solaris/dbgkrnlinfo-r0drv-solaris.c \
4291 r0drv/solaris/initterm-r0drv-solaris.c \
4292 r0drv/solaris/memuserkernel-r0drv-solaris.c \
4293 r0drv/solaris/mpnotification-r0drv-solaris.c \
4294 r0drv/solaris/memobj-r0drv-solaris.c \
4295 r0drv/solaris/mp-r0drv-solaris.c \
4296 r0drv/solaris/process-r0drv-solaris.c \
4297 r0drv/solaris/semevent-r0drv-solaris.c \
4298 r0drv/solaris/semeventmulti-r0drv-solaris.c \
4299 r0drv/solaris/semfastmutex-r0drv-solaris.c \
4300 r0drv/solaris/semmutex-r0drv-solaris.c \
4301 r0drv/solaris/spinlock-r0drv-solaris.c \
4302 r0drv/solaris/thread-r0drv-solaris.c \
4303 r0drv/solaris/thread2-r0drv-solaris.c \
4304 r0drv/solaris/threadctxhooks-r0drv-solaris.c \
4305 r0drv/solaris/time-r0drv-solaris.c \
4306 r0drv/solaris/timer-r0drv-solaris.c
4307
4308RuntimeR0Drv_SOURCES.haiku = \
4309 common/misc/thread.cpp \
4310 common/string/memchr.asm \
4311 common/string/memmove.asm \
4312 common/string/strpbrk.cpp \
4313 common/string/memcmp.asm \
4314 common/string/strchr.asm \
4315 generic/RTAssertShouldPanic-generic.cpp \
4316 generic/RTMpOnPair-generic.cpp \
4317 generic/RTThreadQueryTerminationStatus-stub-generic.cpp \
4318 generic/RTTimerCreate-generic.cpp \
4319 generic/mppresent-generic.cpp \
4320 generic/rtStrFormatKernelAddress-generic.cpp \
4321 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
4322 r0drv/generic/mpnotification-r0drv-generic.cpp \
4323 r0drv/generic/threadctxhooks-r0drv-generic.cpp \
4324 r0drv/haiku/alloc-r0drv-haiku.c \
4325 r0drv/haiku/assert-r0drv-haiku.c \
4326 r0drv/haiku/initterm-r0drv-haiku.c \
4327 r0drv/haiku/memobj-r0drv-haiku.c \
4328 r0drv/haiku/mp-r0drv-haiku.c \
4329 r0drv/haiku/process-r0drv-haiku.c \
4330 r0drv/haiku/RTLogWriteDebugger-r0drv-haiku.c \
4331 r0drv/haiku/RTLogWriteStdOut-r0drv-haiku.c \
4332 r0drv/haiku/semevent-r0drv-haiku.c \
4333 r0drv/haiku/semeventmulti-r0drv-haiku.c \
4334 r0drv/haiku/semfastmutex-r0drv-haiku.c \
4335 r0drv/haiku/semmutex-r0drv-haiku.c \
4336 r0drv/haiku/spinlock-r0drv-haiku.c \
4337 r0drv/haiku/thread-r0drv-haiku.c \
4338 r0drv/haiku/thread2-r0drv-haiku.c \
4339 r0drv/haiku/time-r0drv-haiku.c \
4340 generic/timer-generic.cpp \
4341 r0drv/memobj-r0drv.cpp \
4342 r0drv/powernotification-r0drv.c
4343
4344## PORTME: Porters create and add their selection of platform specific Ring-0 Driver files here.
4345
4346RuntimeR0Drv_ORDERDEPS.freebsd = \
4347 $(PATH_STAGE)/gen-sys-hdrs/bus_if.h \
4348 $(PATH_STAGE)/gen-sys-hdrs/device_if.h
4349
4350
4351#
4352# RuntimeGuestR0 - Guest driver runtime.
4353#
4354# This is almost the same as the RuntimeR0Drv, the main difference is in the
4355# backdoor logging and the lack of sup.h (which should be made irrelevant even
4356# for RuntimeR0Drv).
4357#
4358# In addition we include 64-bit integer stuff, since older kernels doesn't
4359# export all of these and we happen to have all of it.
4360#
4361RuntimeGuestR0_TEMPLATE := VBoxGuestR0DrvLib
4362RuntimeGuestR0_EXTENDS = RuntimeR0Drv
4363RuntimeGuestR0_DEFS.win.x86 = $(RuntimeR0Drv_DEFS.win.x86) IPRT_TARGET_NT4 # The 32-bit version needs to work on NT4 too.
4364RuntimeGuestR0_SOURCES := $(filter-out generic/RTLogWriteUser-generic.cpp, $(RuntimeR0Drv_SOURCES))
4365RuntimeGuestR0_SOURCES += \
4366 VBox/logbackdoor.cpp
4367RuntimeGuestR0_SOURCES.win := \
4368 $(filter-out common/checksum/md% common/checksum/sha%, $(RuntimeR0Drv_SOURCES.win))
4369RuntimeGuestR0_SOURCES.win.x86 := \
4370 $(RuntimeR0Drv_SOURCES.win.x86) \
4371 common/compiler/vcc/x86-allshl.asm \
4372 common/compiler/vcc/x86-allshr.asm \
4373 common/compiler/vcc/x86-aullshr.asm \
4374 common/compiler/vcc/x86-allmul.asm \
4375 common/compiler/vcc/x86-alldiv.asm \
4376 common/compiler/vcc/x86-allrem.asm \
4377 common/compiler/vcc/x86-alldvrm.asm \
4378 common/compiler/vcc/x86-aulldiv.asm \
4379 common/compiler/vcc/x86-aullrem.asm \
4380 common/compiler/vcc/x86-aulldvrm.asm
4381
4382
4383
4384ifdef VBOX_WITH_RAW_MODE
4385 #
4386 # RuntimeRC - Raw-mode context library.
4387 #
4388 RuntimeRC_TEMPLATE = VBoxRc
4389 RuntimeRC_DEFS = IN_RT_RC RT_WITH_VBOX IN_SUP_RC IN_VMM_RC NOFILEID
4390 RuntimeRC_INCS = include
4391 RuntimeRC_SOURCES := \
4392 common/asm/ASMMemFirstMismatchingU8.asm \
4393 common/asm/ASMGetXcr0.asm \
4394 common/asm/ASMSetXcr0.asm \
4395 common/asm/ASMXSave.asm \
4396 common/asm/ASMXRstor.asm \
4397 common/asm/ASMFxSave.asm \
4398 common/asm/ASMFxRstor.asm \
4399 common/checksum/alt-md5.cpp \
4400 common/checksum/crc32.cpp \
4401 common/checksum/crc64.cpp \
4402 common/log/log.cpp \
4403 common/log/log-weak.cpp \
4404 common/log/log-weak-assert.cpp \
4405 common/log/log-weak-rel.cpp \
4406 common/log/logellipsis.cpp \
4407 common/log/logrel.cpp \
4408 common/log/logrelellipsis.cpp \
4409 common/log/logcom.cpp \
4410 common/log/logformat.cpp \
4411 common/log/tracebuf.cpp \
4412 common/log/tracedefault.cpp \
4413 common/log/RTLogCreateEx.cpp \
4414 common/misc/RTAssertMsg1Weak.cpp \
4415 common/misc/RTAssertMsg2.cpp \
4416 common/misc/RTAssertMsg2Add.cpp \
4417 common/misc/RTAssertMsg2AddWeak.cpp \
4418 common/misc/RTAssertMsg2AddWeakV.cpp \
4419 common/misc/RTAssertMsg2Weak.cpp \
4420 common/misc/RTAssertMsg2WeakV.cpp \
4421 common/misc/assert.cpp \
4422 common/misc/buildconfig.cpp \
4423 common/misc/sanity-c.c \
4424 common/misc/sanity-cpp.cpp \
4425 common/path/RTPathFilename.cpp \
4426 common/string/strformat.cpp \
4427 common/string/RTStrFormat.cpp \
4428 common/string/strformatnum.cpp \
4429 common/string/strformatrt.cpp \
4430 common/string/strformattype.cpp \
4431 common/string/strncmp.cpp \
4432 common/string/strpbrk.cpp \
4433 common/string/strprintf.cpp \
4434 common/string/strprintf-ellipsis.cpp \
4435 common/string/strprintf2.cpp \
4436 common/string/strprintf2-ellipsis.cpp \
4437 common/string/RTStrCmp.cpp \
4438 common/string/RTStrCopy.cpp \
4439 common/string/RTStrCopyEx.cpp \
4440 common/string/RTStrEnd.asm \
4441 common/string/RTStrICmpAscii.cpp \
4442 common/table/avllu32.cpp \
4443 common/table/avlou32.cpp \
4444 common/table/avlogcphys.cpp \
4445 common/table/avlogcptr.cpp \
4446 common/table/avlohcphys.cpp \
4447 common/table/avloioport.cpp \
4448 common/table/avlrogcphys.cpp \
4449 common/table/avlrogcptr.cpp \
4450 common/table/avlroioport.cpp \
4451 common/table/avlroogcptr.cpp \
4452 common/table/avlu32.cpp \
4453 common/time/timeprog.cpp \
4454 common/time/timesup.cpp \
4455 gc/initterm-gc.cpp \
4456 generic/RTAssertShouldPanic-generic.cpp \
4457 generic/rtStrFormatKernelAddress-generic.cpp \
4458 generic/errvars-generic.cpp \
4459 \
4460 $(RuntimeNoCrt_SOURCES)
4461
4462 #if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
4463 # RuntimeRC_SOURCES += common/time/timesupA.asm
4464 #else
4465 RuntimeRC_SOURCES += common/time/timesupref.cpp
4466 #endif
4467
4468 RuntimeRC_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
4469
4470 ifeq ($(VBOX_LDR_FMT32),lx)
4471 RuntimeRC_SOURCES += os2/sys0.asm
4472 endif
4473
4474 if1of ($(KBUILD_TARGET), darwin solaris freebsd os2)
4475 RuntimeRC_SOURCES += \
4476 common/math/gcc/adddi3.c \
4477 common/math/gcc/anddi3.c \
4478 common/math/gcc/ashldi3.c \
4479 common/math/gcc/ashrdi3.c \
4480 common/math/gcc/cmpdi2.c \
4481 common/math/gcc/divdi3.c \
4482 common/math/gcc/divmoddi4.c \
4483 common/math/gcc/iordi3.c \
4484 common/math/gcc/lshldi3.c \
4485 common/math/gcc/lshrdi3.c \
4486 common/math/gcc/moddi3.c \
4487 common/math/gcc/muldi3.c \
4488 common/math/gcc/negdi2.c \
4489 common/math/gcc/notdi2.c \
4490 common/math/gcc/qdivrem.c \
4491 common/math/gcc/subdi3.c \
4492 common/math/gcc/ucmpdi2.c \
4493 common/math/gcc/udivdi3.c \
4494 common/math/gcc/udivmoddi4.c \
4495 common/math/gcc/umoddi3.c \
4496 common/math/gcc/xordi3.c
4497 endif
4498
4499
4500 #
4501 # RuntimeRCStub - Raw-mode context startup stub for Windows.
4502 #
4503 RuntimeRCStub_TEMPLATE = VBoxRc
4504 RuntimeRCStub_SOURCES.win = \
4505 nt/NtProcessStartup-stub.cpp
4506
4507
4508endif # VBOX_WITH_RAW_MODE
4509
4510
4511#
4512# Static library for new & delete for the electric fence.
4513#
4514RuntimeEFCPP_TEMPLATE := $(VBoxRT_TEMPLATE)
4515RuntimeEFCPP_SDKS := $(RuntimeR3_SDKS)
4516RuntimeEFCPP_SDKS.$(KBUILD_TARGET) := $(RuntimeR3_SDKS.$(KBUILD_TARGET))
4517RuntimeEFCPP_DEFS := $(RuntimeR3_DEFS)
4518RuntimeEFCPP_DEFS.$(KBUILD_TARGET) := $(RuntimeR3_DEFS.$(KBUILD_TARGET))
4519RuntimeEFCPP_INCS := $(RuntimeR3_INCS)
4520RuntimeEFCPP_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
4521RuntimeEFCPP_SOURCES := r3/alloc-ef-cpp.cpp
4522
4523
4524
4525#
4526# The NTDLL mini import library.
4527#
4528# Note! The reason for doing this is to avoid importing CRT symbols from the
4529# NTDLL. We do not wish to do this because:
4530# - Our compiler is usually a different one and we should use the
4531# matching CRT,
4532# - Older versions of NTDLL may not sport all the exports our w2k3 or
4533# later WINDDK ntdll.lib have and thus we may easily end up with
4534# images that does not load on older windows versions.
4535#
4536if1of (win, $(KBUILD_TARGET) $(KBUILD_HOST))
4537 RuntimeR3NtDll-amd64_TEMPLATE = VBoxR3Dll
4538 RuntimeR3NtDll-amd64_BLD_TRG_ARCH = amd64
4539 RuntimeR3NtDll-amd64_ARFLAGS = /NODEFAULTLIB /MACHINE:amd64
4540 RuntimeR3NtDll-amd64_SOURCES = \
4541 r3/win/ntdll-mini-implib.def
4542
4543 RuntimeR3NtDll-x86_TEMPLATE = VBoxR3Dll
4544 RuntimeR3NtDll-x86_BLD_TRG_ARCH = x86
4545 RuntimeR3NtDll-x86_ARFLAGS = /NODEFAULTLIB /MACHINE:x86
4546 RuntimeR3NtDll-x86_SOURCES = \
4547 r3/win/ntdll-mini-implib.def \
4548 $(RuntimeR3NtDll-x86_0_OUTDIR)/ntdll-mini-implib.asm
4549 RuntimeR3NtDll-x86_CLEAN = \
4550 $(RuntimeR3NtDll-x86_0_OUTDIR)/ntdll-mini-implib.asm
4551 $(call KB_FN_DO_PASS0_ON_TARGET,RuntimeR3NtDll-x86)
4552
4553 $$(RuntimeR3NtDll-x86_0_OUTDIR)/ntdll-mini-implib.asm: $(PATH_SUB_CURRENT)/r3/win/ntdll-mini-implib.def | $$(dir $$@)
4554 $(call MSG_GENERATE,,$@,$<)
4555 $(QUIET)$(APPEND) -nt "$@" \
4556 ';Autogenerated, do not edit' \
4557 '%include "iprt/asmdefs.mac"' \
4558 'BEGINCODE' \
4559 '%macro IMPLIB_EXPORT 1' \
4560 'global %1:function' \
4561 '%1: nop' \
4562 '%endm' \
4563 ''
4564 $(QUIET)$(SED) -e '1,/EXPORTS/d' \
4565 -e 's/^.*;;=[[:space:]]*\([^[:space:]]*\)[[:space:]]*$$/IMPLIB_EXPORT \1/' \
4566 $< --append $@
4567
4568 RuntimeR3NtDll-arm64_TEMPLATE = VBoxR3Dll
4569 RuntimeR3NtDll-arm64_BLD_TRG_ARCH = arm64
4570 RuntimeR3NtDll-arm64_ARFLAGS = /NODEFAULTLIB /MACHINE:arm64
4571 RuntimeR3NtDll-arm64_SOURCES = \
4572 r3/win/ntdll-mini-implib.def
4573endif
4574
4575#
4576# Bag of tricks required for making VCC100 output binaries work on NT4, W2K
4577# early XP and early W2K3. Used by validation kit.
4578#
4579ifndef VBOX_WITH_NOCRT_STATIC
4580 RuntimeR3VccTricks_TEMPLATE = VBoxR3Static
4581 RuntimeR3VccTricks_DEFS = VCC_FAKES_TARGET_$(VBOX_VCC_TOOL_STEM) VCC_FAKES_TARGET=$(substr $(VBOX_VCC_TOOL_STEM),-3)
4582 RuntimeR3VccTricks_SOURCES = \
4583 r3/win/vcc-fakes-kernel32.cpp \
4584 r3/win/vcc-fakes-kernel32-A.asm \
4585 r3/win/vcc-fakes-shell32.cpp \
4586 r3/win/vcc-fakes-shell32-A.asm \
4587 r3/win/vcc-fakes-ntdll.cpp \
4588 r3/win/vcc-fakes-ntdll-A.asm
4589endif
4590
4591if defined(VBOX_WITH_MORE_NT4_COMPAT_BINARIES) && "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.x86" # Ugly hacks... :-)
4592 LIBRARIES += RuntimeR3VccTricks2
4593 RuntimeR3VccTricks2_TEMPLATE = VBoxR3Dll
4594 RuntimeR3VccTricks2_DEFS += $(RuntimeR3VccTricks_DEFS)
4595 RuntimeR3VccTricks2_SOURCES = $(RuntimeR3VccTricks_SOURCES)
4596 RuntimeR3VccTricks2_SOURCES += $(RuntimeR3VccTricks2_0_OUTDIR)/dynobjs.lib
4597 RuntimeR3VccTricks2_CLEAN = $(RuntimeR3VccTricks2_0_OUTDIR)/dynobjs.lib
4598 RuntimeR3VccTricks2_VBOX_LIBCMT_NEEDED =
4599
4600 $$(RuntimeR3VccTricks2_0_OUTDIR)/dynobjs.lib: \
4601 $$(PATH_TOOL_$$(TEMPLATE_VBoxR3Dll_TOOL.win.x86)_LIB)/msvcrt$(VBOX_VCC_CRT_TYPE).lib \
4602 $$(PATH_TOOL_$$(TEMPLATE_VBoxR3Dll_TOOL.win.x86)_LIB)/libcmt$(VBOX_VCC_CRT_TYPE).lib \
4603 $$(LIB_RUNTIME) \
4604 $(MAKEFILE) | $$(dir $$@)
4605 $(RM) -f -- "$@"
4606 # $(REDIRECT) -C $(dir $@) -- $(KBUILD_DEVTOOLS)/common/openwatcom/v1.9-r2/binnt/wlib \
4607 # $(PATH_TOOL_$(TEMPLATE_VBoxR3Dll_TOOL.win.x86)_LIB)/libcmt$(VBOX_VCC_CRT_TYPE).lib \
4608 # $(foreach file, $(RuntimeR3VccTricks2_VBOX_LIBCMT_NEEDED), *$(file))
4609 $(KBUILD_DEVTOOLS)/common/openwatcom/v1.9-r2/binnt/wlib [email protected] $< \
4610 -MSVCR100.dll \
4611 $(addprefix $(RuntimeR3VccTricks2_0_OUTDIR)/, $(RuntimeR3VccTricks2_VBOX_LIBCMT_NEEDED)) \
4612 -chandler4gs.obj
4613 $(KBUILD_DEVTOOLS)/common/openwatcom/v1.9-r2/binnt/wlib -o=$@ \
4614 $(LIB_RUNTIME) \
4615 [email protected]
4616 $(RM) -f -- [email protected] $(addprefix $(RuntimeR3VccTricks2_0_OUTDIR)/, $(RuntimeR3VccTricks_VBOX_LIBCMT_NEEDED))
4617endif
4618
4619
4620#
4621# errmsg.cpp depends on a generated header.
4622#
4623common/err/errmsg.cpp_DEPS = \
4624 $(IPRT_OUT_DIR)/errmsgdata-all.h \
4625 $(IPRT_OUT_DIR)/errmsgdata-no-full-msg.h \
4626 $(IPRT_OUT_DIR)/errmsgdata-only-defines.h
4627common/err/errmsg.cpp_INCS = $(IPRT_OUT_DIR)
4628
4629win/errmsgwin.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgwindata-only-defines.h
4630win/errmsgwin.cpp_INCS = $(IPRT_OUT_DIR)
4631
4632# Our COM errors only for R3 libraries on the host
4633define def_errmsgwin_deps
4634 $(lib)_common/err/errmsgxpcom.cpp_INCS = $(IPRT_OUT_DIR)
4635 $(lib)_common/err/errmsgxpcom.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
4636endef
4637$(foreach lib,RuntimeR3 RuntimeBldProg VBoxRT VBoxRT-x86,$(eval $(def_errmsgwin_deps)))
4638
4639
4640#
4641# Generate the status code data.
4642#
4643$(IPRT_OUT_DIR)/errmsgdata.h: \
4644 $(VBOX_PATH_RUNTIME_SRC)/common/err/errmsg.sed \
4645 $(PATH_ROOT)/include/iprt/err.h \
4646 $(PATH_ROOT)/include/VBox/err.h \
4647 | $$(dir $$@)
4648 $(call MSG_GENERATE,,$@,$(filter %.h,$^))
4649 $(QUIET)$(SED) -f $< --output "$@" $(filter %.h,$^)
4650
4651$(IPRT_OUT_DIR)/errmsgdata-all.h.ts +| $(IPRT_OUT_DIR)/errmsgdata-all.h: \
4652 $$(bldRTErrMsgSorter_1_TARGET)
4653 $(call MSG_GENERATE,,$@,$<)
4654 $(QUIET)"$<" --all "$(IPRT_OUT_DIR)/errmsgdata-all.h.ts"
4655 $(QUIET)$(CP) --changed -fv -- "$(IPRT_OUT_DIR)/errmsgdata-all.h.ts" "$(IPRT_OUT_DIR)/errmsgdata-all.h"
4656
4657$(IPRT_OUT_DIR)/errmsgdata-no-full-msg.h.ts +| $(IPRT_OUT_DIR)/errmsgdata-no-full-msg.h: \
4658 $$(bldRTErrMsgSorter_1_TARGET)
4659 $(call MSG_GENERATE,,$@,$<)
4660 $(QUIET)"$<" --no-full-msg "$(IPRT_OUT_DIR)/errmsgdata-no-full-msg.h.ts"
4661 $(QUIET)$(CP) --changed -fv -- "$(IPRT_OUT_DIR)/errmsgdata-no-full-msg.h.ts" "$(IPRT_OUT_DIR)/errmsgdata-no-full-msg.h"
4662
4663$(IPRT_OUT_DIR)/errmsgdata-only-defines.h.ts +| $(IPRT_OUT_DIR)/errmsgdata-only-defines.h: \
4664 $$(bldRTErrMsgSorter_1_TARGET)
4665 $(call MSG_GENERATE,,$@,$<)
4666 $(QUIET)"$<" --only-defines "$(IPRT_OUT_DIR)/errmsgdata-only-defines.h.ts"
4667 $(QUIET)$(CP) --changed -fv -- "$(IPRT_OUT_DIR)/errmsgdata-only-defines.h.ts" "$(IPRT_OUT_DIR)/errmsgdata-only-defines.h"
4668
4669
4670$(IPRT_OUT_DIR)/errmsgwindata.h: \
4671 $(VBOX_PATH_RUNTIME_SRC)/common/err/errmsgcom.sed \
4672 $$(qwildcard ,$$(qaddsuffix ,/WinError.h,$$(SDK_$$(VBOX_WINPSDK)_INCS))) \
4673 | $$(dir $$@)
4674 $(call MSG_GENERATE,,$@,$(deps $@, 2))
4675 $(QUIET)$(SED) -f "$<" --output "$@" $(qdeps sh,$@,2)
4676
4677$(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts +| $(IPRT_OUT_DIR)/errmsgvboxcomdata.h: \
4678 $(VBOX_PATH_RUNTIME_SRC)/VBox/errmsgvboxcom.xsl \
4679 $(VBOX_XIDL_FILE_SRC) \
4680 | $$(dir $$@)
4681 $(call MSG_GENERATE,,$@,$(filter %.xidl,$^))
4682 $(QUIET)$(VBOX_XSLTPROC) -o $(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts $< $(filter %.xidl,$^)
4683 $(QUIET)$(CP) --changed -fv -- $(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
4684
4685$(IPRT_OUT_DIR)/errmsgwindata-only-defines.h.ts +| $(IPRT_OUT_DIR)/errmsgwindata-only-defines.h: \
4686 $$(bldRTErrMsgWinSorter_1_TARGET)
4687 $(call MSG_GENERATE,,$@,$<)
4688 $(QUIET)"$<" --only-defines "$(IPRT_OUT_DIR)/errmsgwindata-only-defines.h.ts"
4689 $(QUIET)$(CP) --changed -fv -- "$(IPRT_OUT_DIR)/errmsgwindata-only-defines.h.ts" "$(IPRT_OUT_DIR)/errmsgwindata-only-defines.h"
4690
4691
4692#
4693# Sorter for the IPRT status codes.
4694#
4695BLDPROGS += bldRTErrMsgSorter
4696bldRTErrMsgSorter_TEMPLATE = VBoxBldProg
4697bldRTErrMsgSorter_INCS = $(IPRT_OUT_DIR)
4698bldRTErrMsgSorter_DEPS = $(IPRT_OUT_DIR)/errmsgdata.h
4699bldRTErrMsgSorter_SOURCES = common/err/errmsg-sorter.cpp
4700
4701#
4702# Sorter for the windows error codes.
4703#
4704BLDPROGS.win += bldRTErrMsgWinSorter
4705bldRTErrMsgWinSorter_TEMPLATE = VBoxBldProg
4706bldRTErrMsgWinSorter_INCS = $(IPRT_OUT_DIR)
4707bldRTErrMsgWinSorter_DEPS = \
4708 $(IPRT_OUT_DIR)/errmsgwindata.h \
4709 $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
4710bldRTErrMsgWinSorter_SOURCES = win/errmsgwin-sorter.cpp
4711
4712
4713
4714if "$(KBUILD_TARGET)" == "freebsd"
4715 #
4716 # FreeBSDGeneratedKernelHeaders - Generate some kernel interface headers.
4717 #
4718 # These are used by:
4719 # - The RTMp* API in IPRT.
4720 # - VBoxGuest
4721 #
4722 # Note! We cannot give a output path to the awk program, it will always
4723 # generate the header next to the source. So, we'll have to temporarily copy
4724 # the source file to the destination directory to work.
4725 #
4726 VBOX_AWK := /usr/bin/awk
4727 INSTALLS += FreeBSDGeneratedKernelHeaders
4728 FreeBSDGeneratedKernelHeaders_INST = gen-sys-hdrs/
4729 FreeBSDGeneratedKernelHeaders_SOURCES = \
4730 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/bus_if.h \
4731 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/device_if.h \
4732 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/pci_if.h
4733 FreeBSDGeneratedKernelHeaders_CLEAN = $(FreeBSDGeneratedKernelHeaders_SOURCES)
4734
4735 $$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/bus_if.h: $(VBOX_FREEBSD_SRC)/kern/bus_if.m | $$(dir $$@)
4736 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
4737 $(QUIET)$(CP) -f $< $(@D)/bus_if.m
4738 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/bus_if.m -h -p
4739 $(QUIET)$(RM) $(@D)/bus_if.m
4740
4741 $$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/device_if.h: $(VBOX_FREEBSD_SRC)/kern/device_if.m | $$(dir $$@)
4742 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
4743 $(QUIET)$(CP) -f $< $(@D)/device_if.m
4744 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/device_if.m -h -p
4745 $(QUIET)$(RM) $(@D)/device_if.m
4746
4747 $$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/pci_if.h: $(VBOX_FREEBSD_SRC)/dev/pci/pci_if.m | $$(dir $$@)
4748 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
4749 $(QUIET)$(CP) -f $< $(@D)/pci_if.m
4750 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/pci_if.m -h -p
4751 $(QUIET)$(RM) $(@D)/pci_if.m
4752endif # FreeBSD
4753
4754
4755#
4756# Aliases for .cpp.h files so we can more easily do syntax checking from the editor.
4757#
4758ldrELFRelocatable.cpp.o: ldrELF.o
4759ldrELFRelocatable.cpp.obj: ldrELF.obj
4760
4761
4762#
4763# Doxygen documentation.
4764#
4765IPRT_DOXYFILE_INPUT_DIRS = \
4766 $(PATH_ROOT)/include/iprt \
4767 $(PATH_ROOT)/include/iprt/cpp \
4768 $(PATH_ROOT)/include/iprt/linux \
4769 $(PATH_ROOT)/include/iprt/nocrt \
4770 $(PATH_ROOT)/include/iprt/nocrt/x86 \
4771 $(PATH_ROOT)/include/iprt/nocrt/amd64 \
4772 $(PATH_ROOT)/include/iprt/nocrt/compiler \
4773 $(VBOX_PATH_RUNTIME_SRC)/include/internal \
4774 $(VBOX_PATH_RUNTIME_SRC)/common/alloc \
4775 $(VBOX_PATH_RUNTIME_SRC)/common/asm \
4776 $(VBOX_PATH_RUNTIME_SRC)/common/checksum \
4777 $(VBOX_PATH_RUNTIME_SRC)/common/dbg \
4778 $(VBOX_PATH_RUNTIME_SRC)/common/err \
4779 $(VBOX_PATH_RUNTIME_SRC)/common/ldr \
4780 $(VBOX_PATH_RUNTIME_SRC)/common/log \
4781 $(VBOX_PATH_RUNTIME_SRC)/common/math \
4782 $(VBOX_PATH_RUNTIME_SRC)/common/math/amd64 \
4783 $(VBOX_PATH_RUNTIME_SRC)/common/math/gcc \
4784 $(VBOX_PATH_RUNTIME_SRC)/common/math/x86 \
4785 $(VBOX_PATH_RUNTIME_SRC)/common/misc \
4786 $(VBOX_PATH_RUNTIME_SRC)/common/path \
4787 $(VBOX_PATH_RUNTIME_SRC)/common/rand \
4788 $(VBOX_PATH_RUNTIME_SRC)/common/string \
4789 $(VBOX_PATH_RUNTIME_SRC)/common/table \
4790 $(VBOX_PATH_RUNTIME_SRC)/common/time \
4791 $(VBOX_PATH_RUNTIME_SRC)/VBox \
4792 $(foreach dir, $(VBOX_PATH_RUNTIME_SRC) $(VBOX_PATH_RUNTIME_SRC)/r3 $(VBOX_PATH_RUNTIME_SRC)/r0drv, \
4793 $(dir) \
4794 $(dir)/darwin \
4795 $(dir)/haiku \
4796 $(dir)/linux \
4797 $(dir)/nt \
4798 $(dir)/os2 \
4799 $(dir)/solaris \
4800 $(dir)/win \
4801 $(dir)/win32 \
4802 $(dir)/win64 \
4803 $(dir)/generic \
4804 )
4805
4806# These must come first in order to make things look nice.
4807IPRT_DOXYFILE_INPUT_FIRST = \
4808 $(PATH_ROOT)/include/iprt/cdefs.h \
4809 $(PATH_ROOT)/include/iprt/types.h \
4810 $(PATH_ROOT)/include/iprt/runtime.h \
4811 $(PATH_ROOT)/include/iprt/param.h \
4812 $(PATH_ROOT)/include/iprt/assert.h \
4813 $(PATH_ROOT)/include/iprt/asm.h
4814
4815IPRT_DOXYFILE_INPUT := \
4816 $(filter-out %.cpp.h, $(sort $(wildcard $(addsuffix /*.h, $(IPRT_DOXYFILE_INPUT_DIRS)))) ) \
4817 $(foreach dir, $(IPRT_DOXYFILE_INPUT_DIRS), $(wildcard $(dir)/*.cpp $(dir)/.c $(dir)/.asm))
4818IPRT_DOXYFILE_INPUT := \
4819 $(IPRT_DOXYFILE_INPUT_FIRST) \
4820 $(sort $(filter-out $(IPRT_DOXYFILE_INPUT_FIRST), $(IPRT_DOXYFILE_INPUT)))
4821
4822
4823IPRT_DOXYFILE_OUTPUT = $(PATH_OUT)/docs/iprt
4824BLDDIRS += $(IPRT_DOXYFILE_OUTPUT)
4825
4826includedep $(IPRT_DOXYFILE_OUTPUT)/Doxyfile.iprt.dep
4827
4828# Generate the Doxyfile
4829$(IPRT_DOXYFILE_OUTPUT)/Doxyfile.iprt: \
4830 $(VBOX_PATH_RUNTIME_SRC)/Doxyfile \
4831 $(VBOX_PATH_RUNTIME_SRC)/Makefile.kmk \
4832 $(comp-vars IPRT_DOXYFILE_INPUT,DOXYGEN_IPRT_INPUT_PREV,FORCE) \
4833 $(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_IPRT_OUTPUT_PREV,FORCE) \
4834 | $$(dir $$@)
4835 $(QUIET)$(RM) -f $@ [email protected] [email protected]
4836 $(QUIET)$(CP) -f $(VBOX_PATH_RUNTIME_SRC)/Doxyfile [email protected]
4837 $(QUIET)$(APPEND) [email protected]
4838 $(QUIET)$(APPEND) [email protected] "OUTPUT_DIRECTORY = $(IPRT_DOXYFILE_OUTPUT)"
4839 $(QUIET)$(APPEND) [email protected] "WARN_LOGFILE = $(IPRT_DOXYFILE_OUTPUT)/errors"
4840 $(QUIET)$(APPEND) [email protected] 'INCLUDE_PATH = ' \
4841 '$(PATH_ROOT)/include' \
4842 '$(VBOX_PATH_RUNTIME_SRC)/include' \
4843 '$(VBOX_PATH_RUNTIME_SRC)/' \
4844 '$(VBOX_PATH_RUNTIME_SRC)/common/table'
4845 $(QUIET)$(APPEND) [email protected] "INCLUDE_FILE_PATTERNS = *.cpp.h"
4846 $(QUIET)$(APPEND) [email protected] "PREDEFINED += $(ARCH_BITS_DEFS)"
4847 $(QUIET)$(APPEND) [email protected] 'EXCLUDE = '\
4848 '$(VBOX_PATH_RUNTIME_SRC)/common/string/unidata-flags.cpp' \
4849 '$(VBOX_PATH_RUNTIME_SRC)/common/string/unidata-lower.cpp' \
4850 '$(VBOX_PATH_RUNTIME_SRC)/common/string/unidata-upper.cpp' \
4851 $(QUIET)$(APPEND) [email protected]
4852 $(QUIET)$(APPEND) [email protected] 'INPUT = $(foreach x,$(IPRT_DOXYFILE_INPUT),\$(NLTAB)$(x))'
4853 $(QUIET)$(APPEND) [email protected]
4854 $(QUIET)$(MV) -f [email protected] $@
4855 $(QUIET)$(APPEND) [email protected] "DOXYGEN_IPRT_OUTPUT_PREV = $(IPRT_DOXYFILE_OUTPUT)"
4856 $(QUIET)$(APPEND) [email protected] "DOXYGEN_IPRT_INPUT_PREV = $(IPRT_DOXYFILE_INPUT)"
4857
4858# Do the actual job.
4859$(IPRT_DOXYFILE_OUTPUT)/docs.iprt: $(IPRT_DOXYFILE_OUTPUT)/Doxyfile.iprt $$(IPRT_DOXYFILE_INPUT) \
4860 | $(IPRT_DOXYFILE_OUTPUT)/
4861 $(QUIET)$(RM) -f $@
4862 $(QUIET)$(RM) -Rf $(IPRT_DOXYFILE_OUTPUT)/html/
4863 $(VBOX_DOXYGEN) $(DOXYGEN_OPTS) $(IPRT_DOXYFILE_OUTPUT)/Doxyfile.iprt
4864 $(SED) -e '/warning. Unexpected tag .dd. found/d' \
4865 -e '/warning. Unsupported xml.html tag .globalScope. found/d' \
4866 --output $(IPRT_DOXYFILE_OUTPUT)/errors2 \
4867 $(IPRT_DOXYFILE_OUTPUT)/errors
4868 $(CAT) $(IPRT_DOXYFILE_OUTPUT)/errors2
4869 $(SED) -e "/[^ ]/q 1" $(IPRT_DOXYFILE_OUTPUT)/errors2
4870 $(APPEND) $@
4871
4872# aliases
4873docs.iprt: $(IPRT_DOXYFILE_OUTPUT)/docs.iprt
4874if !defined(VBOX_ONLY_DOCS) && defined(VBOX_WITH_ALL_DOXYGEN_TARGETS)
4875 docs: $(IPRT_DOXYFILE_OUTPUT)/docs.iprt
4876endif
4877
4878test-doxygen::
4879 @echo test-$(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_IPRT_OUTPUT_PREV,FORCE)
4880 @echo $(IPRT_DOXYFILE_OUTPUT)
4881 @echo $(DOXYGEN_IPRT_OUTPUT_PREV)
4882 @echo $(IPRT_DOXYFILE_INPUT)
4883
4884
4885#
4886# Test mangling.
4887#
4888if1of ($(LIBRARIES), RuntimeR3 RuntimeR0 RuntimeR0Drv RuntimeRC)
4889 test-mangling:: $(IPRT_OUT_DIR)/mangling.run
4890 OTHERS += $(IPRT_OUT_DIR)/mangling.run
4891 OTHER_CLEAN += $(IPRT_OUT_DIR)/mangling.run
4892 $(IPRT_OUT_DIR)/mangling.run: \
4893 $$(RuntimeR3_1_TARGET) \
4894 $$(RuntimeR0_1_TARGET) \
4895 $$(RuntimeR0Drv_1_TARGET) \
4896 $$(RuntimeRC_1_TARGET)
4897 if1of ($(KBUILD_TARGET), win os2)
4898 $(call MSG_L1,IPRT: skipped mangling test.)
4899 else
4900 # Generate a SED script from mangling.h that checks for known symbols.
4901 $(QUIET)$(SED) \
4902 -e '/^# *define.*RT_MANGLER/!d' \
4903 -e 's/^.*RT_MANGLER(\([^)][^)]*\)).*$(DOLLAR)/\/^\1$(DOLLAR)\/b ok/' \
4904 $(PATH_ROOT)/include/iprt/mangling.h \
4905 --output "$@"
4906 $(QUIET)$(APPEND) -n '$@' \
4907 ':bad' \
4908 's/^\(.*\)$(DOLLAR)/error: Missing # define \1 /' \
4909 ':bad-pad' \
4910 '/^.\{0,70\}$(DOLLAR)/ { s/$(DOLLAR)/ /; bbad-pad; }' \
4911 's/define \([^ ]*\) \([ ]*\)$(DOLLAR)/define \1 \2RT_MANGLER(\1)/' \
4912 'p' \
4913 $(if-expr !defined(IPRT_IGNORE_TEST_MANGLING),'q 1') \
4914 '' \
4915 ':ok' \
4916 'd'
4917 # Find the best way to generate a symbol list and subject it to mangling.h.
4918 if $(intersects $(KBUILD_TARGET), linux) && "$(VBOX_GCC_fvisibility-hidden)"
4919 $(call MSG_L1,IPRT: Testing mangling and visiblity for newer gcc...)
4920 $(QUIET)readelf -Ws $^ \
4921 | $(SED) \
4922 -e 's/[[:space:]]\+/ /g' \
4923 -e '/^ *[[:digit:]]\+:/!d' \
4924 -e 's/^ \+[[:digit:]]\+: \+[[:xdigit:]]\+ \+[[:digit:]]\+ \+//' \
4925 -e '/^SECTION/d' \
4926 -e '/^FILE/d' \
4927 -e 's/^[[:alpha:]]\+ \+//' \
4928 -e '/LOCAL/d' \
4929 -e 's/^[[:alpha:]]\+ \+//' \
4930 -e '/^HIDDEN [[:xdigit:]]\+ RT/bkeep-hidden' \
4931 -e '/^HIDDEN [[:xdigit:]]\+ g_[a-z0-9]*RT/bkeep-hidden' \
4932 -e '/^HIDDEN/d' \
4933 -e ':keep-hidden' \
4934 -e 's/^[[:alpha:]]\+ \+//' \
4935 -e '/^UND/d' \
4936 -e 's/^[[:digit:]]\+ \+//' \
4937 \
4938 -e '/^nocrt_/d' \
4939 -e '/^bzero/d' \
4940 -e '/^memchr/d' \
4941 -e '/^memcmp/d' \
4942 -e '/^memcpy/d' \
4943 -e '/^mempcpy/d' \
4944 -e '/^memmove/d' \
4945 -e '/^memset/d' \
4946 -e '/^strchr/d' \
4947 -e '/^strpbrk/d' \
4948 -e '/^_Z7strpbrk/d' \
4949 -e '/^strcmp/d' \
4950 -e '/^strcpy/d' \
4951 -e '/^strncpy/d' \
4952 -e '/^strlen/d' \
4953 -e '/^setjmp/d' \
4954 -e '/^longjmp/d' \
4955 -e '/^_Z[[:alpha:]]*[[:digit:]]\+RTC/d' \
4956 -e '/^_Z[[:alpha:]]*[[:digit:]]\+RTC/d' \
4957 \
4958 -e '/^_ZnwjPv/d' \
4959 -e '/^_ZnwmPv/d' \
4960 -e '/^_ZNSt[1-9]/d' \
4961 \
4962 -e '/^_ZN[a-zA-Z]*St[[:digit:]]*_*[lL]ist/d' \
4963 -e '/^_ZN[a-zA-Z]*[[:digit:]]*__gnu_cxx/d' \
4964 -e '/^_ZNSa.*ElementNode.*/d' \
4965 -e '/^_ZSt.*ElementNode.*/d' \
4966 \
4967 -e '/^_Z[[:digit:]]\+dbus/d' \
4968 -e '/^g_pfn_dbus/d' \
4969 -e '/^_Z13RTDBusLoadLibv/d' \
4970 \
4971 -e '/^g_[ac]VTG/d' \
4972 -e '/^g_VTGObjHeader/d' \
4973 -e '/^g_VTGProbeData/d' \
4974 -e '/^VTGProbeStub/d' \
4975 -e '/^g_achVTGStringTable/d' \
4976 -e '/^g_acVTGProbeEnabled/d' \
4977 \
4978 -e '/^VBoxHost_/d'\
4979 -e '/^VBoxGuest_/d'\
4980 | $(SED) -nf "$@"
4981 endif
4982 $(call MSG_L1,IPRT: Testing mangling using nm...)
4983 $(QUIET)$(VBOX_NM) $^ 2> /dev/null \
4984 | $(SED) -n \
4985 -e 's/^[0-9a-f][0-9a-f]* //' \
4986 -e '/^[TUDB] /!d' \
4987 -e 's/^. //' \
4988 $(if-expr "$(KBUILD_TARGET)" == "darwin" || "$(KBUILD_TARGET)" == "os2" || "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.x86", \
4989 -e 's/^_//',) \
4990 \
4991 -e '/^g_cchrt/d'\
4992 -e '/^g_crt/d'\
4993 -e '/^g_frt/d'\
4994 -e '/^g_offrt/d'\
4995 -e '/^g_pfnrt/d'\
4996 -e '/^g_rt/d'\
4997 -e '/^g_szrt/d'\
4998 -e '/^g_ProcessSelf/d'\
4999 -e '/^g_u64ProgramStart/d'\
5000 -e '/^g_enmProcessPriority/d'\
5001 -e '/^g_hDbgModStrCache/d'\
5002 -e '/^g_pfnR0Darwin/d'\
5003 -e '/^g_pDarwinLockGroup/d'\
5004 $(if-expr "$(KBUILD_TARGET)" == "solaris", \
5005 -e '/^g_kLdrRdrFileOps/d' \
5006 -e '/^g_pSUPGlobalInfoPage/d' \
5007 -e '/^g_Logger/d' \
5008 -e '/^g_RelLogger/d' \
5009 -e '/^g_VM/d',) \
5010 $(if-expr "$(KBUILD_TARGET)" == "linux", \
5011 -e '/^g_kLdrRdrFileOps/d',) \
5012 \
5013 -e '/^g_[ac]VTG/d' \
5014 -e '/^g_VTGObjHeader/d' \
5015 -e '/^g_VTGProbeData/d' \
5016 -e '/^VTGProbeStub/d' \
5017 -e '/^g_achVTGStringTable/d' \
5018 -e '/^g_acVTGProbeEnabled/d' \
5019 \
5020 -e '/^g_pfn_dbus/d' \
5021 -e '/^RTDBusLoadLib/d' \
5022 \
5023 -e '/^RT/p' \
5024 -e '/^g_/p' \
5025 | $(SED) -nf "$@"
5026 endif
5027endif
5028 $(QUIET)$(APPEND) -t $@
5029
5030if !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_VALIDATIONKIT) && !defined(VBOX_ONLY_DOCS)
5031 #
5032 # Windows build tool.
5033 #
5034 BLDPROGS.win += ntBldSymDb
5035 ntBldSymDb_TEMPLATE = VBoxAdvBldProg
5036 ntBldSymDb_INCS = .
5037 ntBldSymDb_SOURCES = r0drv/nt/ntBldSymDb.cpp
5038endif
5039
5040
5041#
5042# Generate the rules (we're the to sub-makefile).
5043#
5044include $(FILE_KBUILD_SUB_FOOTER)
5045
5046
5047#
5048# Aliases for code templates.
5049#
5050rsa-template.o rsa-template.obj: rsa-core.o rsa-asn1-decoder.o rsa-sanity.o rsa-init.o
5051spc-template.o spc-template.obj: spc-core.o spc-asn1-decoder.o spc-sanity.o spc-init.o
5052taf-template.o taf-template.obj: taf-core.o taf-asn1-decoder.o taf-sanity.o taf-init.o
5053tsp-template.o tsp-template.obj: tsp-core.o tsp-asn1-decoder.o tsp-sanity.o tsp-init.o
5054x509-template.o x509-template.obj: x509-core.o x509-asn1-decoder.o x509-sanity.o x509-init.o
5055pkcs7-template.o pkcs7-template.obj: pkcs7-core.o pkcs7-asn1-decoder.o pkcs7-sanity.o pkcs7-init.o
5056pkcs8-template.o pkcs8-template.obj: pkcs8-core.o pkcs8-asn1-decoder.o pkcs8-sanity.o pkcs8-init.o
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