VirtualBox

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

Last change on this file since 96388 was 96388, checked in by vboxsync, 2 years ago

IPRT/nocrt: Introduced an internal rtNoCrtFatalMsg/Write API to be used instead of RTMsgError and RTAssertMsg2 to report no-CRT init and runtime issues. The other two drags in hundreds of KBs of unnecessary code. bugref:10261

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