VirtualBox

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

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

IPRT/nocrt: Just map atof onto a future strtod implementation. bugref:10261

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 156.4 KB
Line 
1# $Id: Makefile.kmk 96102 2022-08-07 22:56:49Z 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 if defined(VBOX_WITH_VALIDATIONKIT_UNITTESTS_PACKING)
59 DLLS += VBoxRT
60 include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
61 endif
62else ifdef VBOX_ONLY_DOCS
63 #
64 # Build docs only - need just regular R3 runtime.
65 #
66 LIBRARIES += RuntimeR3 RuntimeBldProg
67 include $(PATH_SUB_CURRENT)/tools/Makefile.kmk
68
69else ifdef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
70 #
71 # Build extension packs using import libraries as much as possible (VBoxDTrace
72 # needs Ring-0 IPRT, though).
73 #
74 LIBRARIES += RuntimeBldProg
75 ifdef VBOX_WITH_R0_MODULES
76 LIBRARIES += RuntimeR0
77 endif
78 LIBRARIES.solaris += RuntimeR0Stub
79 LIBRARIES.win += RuntimeR0Stub
80 ifdef VBOX_WITH_RAW_MODE
81 LIBRARIES.win += RuntimeRCStub
82 endif
83 include $(PATH_SUB_CURRENT)/tools/Makefile.kmk
84
85else # !VBOX_ONLY_ADDITIONS && !VBOX_ONLY_VALIDATIONKIT && !VBOX_ONLY_DOCS
86
87 #
88 # Normal build.
89 #
90 ifndef VBOX_ONLY_EXTPACKS
91 include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
92 endif
93 include $(PATH_SUB_CURRENT)/tools/Makefile.kmk
94
95 BLDPROGS += uniread
96 LIBRARIES += RuntimeR3 RuntimeBldProg RuntimeEFCPP RuntimeR3NoCRTGCC
97 ifdef VBOX_WITH_R0_MODULES
98 LIBRARIES += RuntimeR0
99 endif
100 LIBRARIES.solaris += RuntimeR0Stub
101 LIBRARIES.win += RuntimeR0Stub RuntimeR3NoCrt
102 LIBRARIES.win.amd64 += RuntimeR3-x86
103 ifdef VBOX_WITH_RAW_MODE
104 LIBRARIES += RuntimeRC
105 LIBRARIES.win += RuntimeRCStub
106 endif
107 ifdef VBOX_WITH_VBOXDRV
108 LIBRARIES += RuntimeR0Drv
109 endif
110 ifdef VBOX_WITH_ADDITIONS
111 LIBRARIES += RuntimeGuestR3 RuntimeGuestR3Shared
112 LIBRARIES.win.amd64 += RuntimeGuestR3-x86 RuntimeGuestR3Shared-x86
113 ifdef VBOX_WITH_ADDITION_DRIVERS
114 LIBRARIES += RuntimeGuestR0
115 endif
116 #LIBRARIES.os2 += RuntimeGuestR0OS2Warp3
117 endif # VBOX_WITH_ADDITIONS
118 LIBRARIES.win.x86 += RuntimeR3VccTricks
119 DLLS += VBoxRT
120 ifdef VBOX_WITH_32_ON_64_MAIN_API
121 DLLS += VBoxRT-x86
122 endif
123endif
124
125
126# Always build the ntdll import libraries on windows.
127LIBRARIES.win += RuntimeR3NtDll-x86
128if1of (amd64, $(KBUILD_TARGET_ARCH) $(KBUILD_HOST_ARCH))
129 LIBRARIES.win += RuntimeR3NtDll-amd64
130endif
131
132
133# Always build the import library.
134IMPORT_LIBS += VBoxRTImp
135
136
137# Where the generated stuff goes.
138IPRT_OUT_DIR := $(PATH_TARGET)/Runtime
139BLDDIRS += $(IPRT_OUT_DIR)
140OTHER_CLEAN += \
141 $(IPRT_OUT_DIR)/errmsgdata.h \
142 $(IPRT_OUT_DIR)/errmsgwindata.h \
143 $(IPRT_OUT_DIR)/errmsgwindata-sorted.h \
144 $(IPRT_OUT_DIR)/errmsgwindata-sorted.h.ts \
145 $(IPRT_OUT_DIR)/errmsgvboxcomdata.h \
146 $(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts \
147 $(IPRT_OUT_DIR)/odi2name.h \
148 $(IPRT_OUT_DIR)/odi2name.h.ts \
149 $(IPRT_DOXYFILE_OUTPUT)/Doxyfile.iprt \
150 $(IPRT_DOXYFILE_OUTPUT)/Doxyfile.iprt.dep \
151 $(IPRT_DOXYFILE_OUTPUT)/docs.iprt
152
153
154#
155# Globals
156#
157VBOX_PATH_RUNTIME_SRC := $(PATH_SUB_CURRENT)
158
159
160#
161# Set the defines that buildconfig.cpp needs. Its used by several targets.
162#
163common/misc/buildconfig.cpp_DEFS = \
164 IPRT_BLDCFG_SCM_REV=$(VBOX_SVN_REV) \
165 IPRT_BLDCFG_VERSION_MAJOR=$(VBOX_VERSION_MAJOR) \
166 IPRT_BLDCFG_VERSION_MINOR=$(VBOX_VERSION_MINOR) \
167 IPRT_BLDCFG_VERSION_BUILD=$(VBOX_VERSION_BUILD)
168ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
169common/misc/buildconfig.cpp_DEFS += \
170 IPRT_BLDCFG_VERSION_STRING="$(VBOX_VERSION_STRING)" \
171 IPRT_BLDCFG_TARGET="$(KBUILD_TARGET)" \
172 IPRT_BLDCFG_TARGET_ARCH="$(KBUILD_TARGET_ARCH)" \
173 IPRT_BLDCFG_TYPE="$(KBUILD_TYPE)"
174else
175common/misc/buildconfig.cpp_DEFS += \
176 IPRT_BLDCFG_VERSION_STRING=\"$(VBOX_VERSION_STRING)\" \
177 IPRT_BLDCFG_TARGET=\"$(KBUILD_TARGET)\" \
178 IPRT_BLDCFG_TARGET_ARCH=\"$(KBUILD_TARGET_ARCH)\" \
179 IPRT_BLDCFG_TYPE=\"$(KBUILD_TYPE)\"
180endif
181
182#
183# OID to C table conversion program.
184#
185BLDPROGS += oiddb2c
186oiddb2c_TEMPLATE = VBoxBldProg
187oiddb2c_SOURCES = common/asn1/oiddb2c.cpp
188
189common/asn1/asn1-dump.cpp_DEPS = $(IPRT_OUT_DIR)/oiddb.h
190common/asn1/asn1-dump.cpp_INCS = $(IPRT_OUT_DIR)
191OTHER_CLEAN += $(IPRT_OUT_DIR)/oiddb.h $(IPRT_OUT_DIR)/oiddb.h.ts
192
193$(IPRT_OUT_DIR)/oiddb.h.ts +| $(IPRT_OUT_DIR)/oiddb.h: \
194 $(VBOX_PATH_RUNTIME_SRC)/common/asn1/oiddb.cfg \
195 $(VBOX_EXTRA_OID_CFG_FILES) \
196 $$(oiddb2c_1_TARGET) \
197 | $$(dir $$@)
198 $(call MSG_GENERATE,,$@,$(filter %.xidl,$^))
199 $(QUIET)$(oiddb2c_1_TARGET) "$@" $(filter %.cfg,$^)
200 $(QUIET)$(CP) --changed -fv "$@" "$(IPRT_OUT_DIR)/oiddb.h"
201
202
203#
204# Unicode Specification reader used to regenerate unidata-*.cpp.
205#
206uniread_TEMPLATE = VBoxBldProg
207uniread_SOURCES = common/string/uniread.cpp
208uniread_INCS = include
209
210#
211# Win64 assembly sources.
212#
213RuntimeWin64ASM_SOURCES = \
214 win/amd64/ASMAtomicBitClear.asm \
215 win/amd64/ASMAtomicBitTestAndToggle.asm \
216 win/amd64/ASMAtomicBitToggle.asm \
217 win/amd64/ASMAtomicReadU64.asm \
218 win/amd64/ASMAtomicXchgU8.asm \
219 win/amd64/ASMGetCS.asm \
220 win/amd64/ASMGetDS.asm \
221 win/amd64/ASMGetES.asm \
222 common/asm/ASMGetFlags.asm \
223 win/amd64/ASMGetFS.asm \
224 win/amd64/ASMGetGS.asm \
225 win/amd64/ASMGetSS.asm \
226 win/amd64/ASMProbeReadByte.asm \
227 common/asm/ASMSetFlags.asm \
228 common/asm/ASMAddFlags.asm \
229 win/amd64/ASMGetDR0.asm \
230 win/amd64/ASMGetDR1.asm \
231 win/amd64/ASMGetDR2.asm \
232 win/amd64/ASMGetDR3.asm \
233 win/amd64/ASMGetDR6.asm \
234 win/amd64/ASMGetDR7.asm \
235 common/asm/ASMAtomicCmpXchgU8.asm \
236 common/asm/ASMAtomicCmpXchgU16.asm \
237 common/asm/ASMAtomicXchgU16.asm \
238 common/asm/ASMBitFirstClear.asm \
239 common/asm/ASMBitFirstSet.asm \
240 common/asm/ASMBitNextClear.asm \
241 common/asm/ASMBitNextSet.asm \
242 common/asm/ASMMultU32ByU32DivByU32.asm \
243 common/asm/ASMMultU64ByU32DivByU32.asm \
244 common/asm/ASMCpuId_Idx_ECX.asm \
245 common/asm/ASMNopPause.asm \
246 common/asm/ASMGetIDTR.asm \
247 common/asm/ASMGetIdtrLimit.asm \
248 common/asm/ASMSetIDTR.asm \
249 common/asm/ASMGetGDTR.asm \
250 common/asm/ASMSetGDTR.asm \
251 common/asm/ASMGetLDTR.asm \
252 common/asm/ASMGetSegAttr.asm \
253 common/asm/ASMGetFSBase.asm \
254 common/asm/ASMSetFSBase.asm \
255 common/asm/ASMGetGSBase.asm \
256 common/asm/ASMSetGSBase.asm \
257 common/asm/ASMGetTR.asm \
258
259#
260# Win32 assembly sources.
261#
262RuntimeWin32ASM_SOURCES = \
263 common/asm/ASMAtomicCmpXchgU8.asm \
264 common/asm/ASMAtomicCmpXchgU16.asm \
265 common/asm/ASMAtomicXchgU16.asm \
266 common/asm/ASMMultU32ByU32DivByU32.asm \
267 common/asm/ASMMultU64ByU32DivByU32.asm \
268 common/asm/ASMCpuId_Idx_ECX.asm \
269 common/asm/ASMGetSegAttr.asm
270
271
272#
273# NoCRT sources (minus math stuff).
274#
275if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
276RuntimeNoCrt_SOURCES = \
277 common/misc/setjmp.asm \
278 common/string/bzero.asm \
279 common/string/memchr.asm \
280 common/string/memcmp.asm \
281 common/string/memcpy.asm \
282 common/string/mempcpy.asm \
283 common/string/memmove.asm \
284 common/string/memset.asm \
285 common/string/strchr.asm \
286 common/string/strcpy.asm \
287 common/string/strncpy.asm \
288 common/string/strcmp.asm \
289 common/string/strlen.asm
290endif
291
292
293#
294# RuntimeBaseR3 - Commmon Base Runtime Target for Ring-3 executables.
295#
296# Note! This is not make itself, it's only used as a base target config to be
297# inherited from by RuntimeR3(.lib) and VBoxR3(.dll).
298#
299RuntimeBaseR3_TEMPLATE = VBoxR3Static
300RuntimeBaseR3_SDKS = VBOX_LIBXML2
301RuntimeBaseR3_SDKS.win = $(VBOX_WINPSDK) $(VBOX_WINDDK)
302RuntimeBaseR3_DEFS = \
303 IN_RT_R3 \
304 LDR_WITH_NATIVE \
305 LDR_WITH_ELF32 \
306 LDR_WITH_LX \
307 LDR_WITH_MACHO \
308 LDR_WITH_PE \
309 RT_WITH_VBOX \
310 RT_NO_GIP \
311 RT_WITHOUT_NOCRT_WRAPPERS \
312 NOFILEID
313if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
314 RuntimeBaseR3_DEFS += \
315 IN_SUP_R3
316endif
317#RuntimeBaseR3_DEFS += RTMEM_WRAP_TO_EF_APIS
318ifdef IPRT_WITH_LZJB
319 RuntimeBaseR3_DEFS += RTZIP_USE_LZJB
320endif
321ifdef IPRT_WITH_LZO
322 RuntimeBaseR3_DEFS += RTZIP_USE_LZO
323endif
324ifn1of ($(KBUILD_TARGET), win)
325 RuntimeBaseR3_DEFS += RT_WITH_ICONV_CACHE
326endif
327ifdef IPRT_WITH_FUTEX_BASED_SEMS
328 RuntimeBaseR3_DEFS.linux += IPRT_WITH_FUTEX_BASED_SEMS
329endif
330ifdef IPRT_HTTP_WITH_WEBDAV
331 RuntimeBaseR3_DEFS += IPRT_HTTP_WITH_WEBDAV
332endif
333ifdef IPRT_WITHOUT_PAM
334 RuntimeBaseR3_DEFS += IPRT_WITHOUT_PAM
335endif
336RuntimeBaseR3_INCS = \
337 include \
338 $(SDK_VBOX_ZLIB_INCS) \
339 $(SDK_VBOX_LZF_INCS)
340
341# RuntimeBaseR3_INCS.solaris = \
342# /usr/include
343
344RuntimeBaseR3_SOURCES := \
345 common/alloc/alloc.cpp \
346 common/alloc/heapsimple.cpp \
347 common/alloc/heapoffset.cpp \
348 common/alloc/memcache.cpp \
349 common/alloc/memtracker.cpp \
350 common/asn1/asn1-basics.cpp \
351 common/asn1/asn1-cursor.cpp \
352 common/asn1/asn1-default-allocator.cpp \
353 common/asn1/asn1-efence-allocator.cpp \
354 common/asn1/asn1-safer-allocator.cpp \
355 common/asn1/asn1-dump.cpp \
356 common/asn1/asn1-encode.cpp \
357 common/asn1/asn1-ut-bitstring.cpp \
358 common/asn1/asn1-ut-bitstring-decode.cpp \
359 common/asn1/asn1-ut-boolean.cpp \
360 common/asn1/asn1-ut-boolean-decode.cpp \
361 common/asn1/asn1-ut-core.cpp \
362 common/asn1/asn1-ut-core-decode.cpp \
363 common/asn1/asn1-ut-dyntype.cpp \
364 common/asn1/asn1-ut-dyntype-decode.cpp \
365 common/asn1/asn1-ut-integer.cpp \
366 common/asn1/asn1-ut-integer-decode.cpp \
367 common/asn1/asn1-ut-null.cpp \
368 common/asn1/asn1-ut-null-decode.cpp \
369 common/asn1/asn1-ut-objid.cpp \
370 common/asn1/asn1-ut-objid-decode.cpp \
371 common/asn1/asn1-ut-octetstring.cpp \
372 common/asn1/asn1-ut-octetstring-decode.cpp \
373 common/asn1/asn1-ut-string.cpp \
374 common/asn1/asn1-ut-string-decode.cpp \
375 common/asn1/asn1-ut-time.cpp \
376 common/asn1/asn1-ut-time-decode.cpp \
377 common/checksum/adler32.cpp \
378 common/checksum/crc32.cpp \
379 common/checksum/crc32c.cpp \
380 common/checksum/crc64.cpp \
381 common/checksum/crc16ccitt.cpp \
382 common/checksum/alt-md2.cpp \
383 common/checksum/alt-md4.cpp \
384 common/checksum/alt-md5.cpp \
385 common/checksum/alt-sha1.cpp \
386 common/checksum/alt-sha256.cpp \
387 common/checksum/alt-sha512.cpp \
388 common/checksum/alt-sha3.cpp \
389 common/checksum/md2str.cpp \
390 common/checksum/md4str.cpp \
391 common/checksum/md5str.cpp \
392 common/checksum/ipv4.cpp \
393 common/checksum/ipv6.cpp \
394 common/checksum/manifest.cpp \
395 common/checksum/manifest2.cpp \
396 common/checksum/manifest3.cpp \
397 common/checksum/manifest-file.cpp \
398 common/checksum/RTSha1Digest.cpp \
399 common/checksum/RTSha256Digest.cpp \
400 common/checksum/sha1str.cpp \
401 common/checksum/sha224str.cpp \
402 common/checksum/sha256str.cpp \
403 common/checksum/sha384str.cpp \
404 common/checksum/sha512str.cpp \
405 common/checksum/sha512t224str.cpp \
406 common/checksum/sha512t256str.cpp \
407 common/crypto/cipher-openssl.cpp \
408 common/crypto/digest-core.cpp \
409 common/crypto/digest-builtin.cpp \
410 common/crypto/digest-vfs.cpp \
411 common/crypto/iprt-openssl.cpp \
412 common/crypto/key.cpp \
413 common/crypto/key-file.cpp \
414 common/crypto/key-openssl.cpp \
415 common/crypto/key-create-rsa-openssl.cpp \
416 common/crypto/rc4-openssl.cpp \
417 common/crypto/rsa-asn1-decoder.cpp \
418 common/crypto/rsa-core.cpp \
419 common/crypto/rsa-init.cpp \
420 common/crypto/rsa-sanity.cpp \
421 common/crypto/pemfile-read.cpp \
422 common/crypto/pemfile-write.cpp \
423 common/crypto/pkcs7-asn1-decoder.cpp \
424 common/crypto/pkcs7-core.cpp \
425 common/crypto/pkcs7-file.cpp \
426 common/crypto/pkcs7-init.cpp \
427 common/crypto/pkcs7-sanity.cpp \
428 common/crypto/pkcs7-sign.cpp \
429 common/crypto/pkcs7-verify.cpp \
430 common/crypto/pkix-sign.cpp \
431 common/crypto/pkix-signature-builtin.cpp \
432 common/crypto/pkix-signature-core.cpp \
433 common/crypto/pkix-signature-rsa.cpp \
434 common/crypto/pkix-util.cpp \
435 common/crypto/pkix-verify.cpp \
436 common/crypto/spc-asn1-decoder.cpp \
437 common/crypto/spc-core.cpp \
438 common/crypto/spc-init.cpp \
439 common/crypto/spc-sanity.cpp \
440 common/crypto/ssl-openssl.cpp \
441 common/crypto/x509-asn1-decoder.cpp \
442 common/crypto/x509-certpaths.cpp \
443 common/crypto/x509-core.cpp \
444 common/crypto/x509-file.cpp \
445 common/crypto/x509-init.cpp \
446 common/crypto/x509-sanity.cpp \
447 common/crypto/x509-verify.cpp \
448 common/crypto/taf-asn1-decoder.cpp \
449 common/crypto/taf-core.cpp \
450 common/crypto/taf-init.cpp \
451 common/crypto/taf-sanity.cpp \
452 common/crypto/tsp-asn1-decoder.cpp \
453 common/crypto/tsp-core.cpp \
454 common/crypto/tsp-init.cpp \
455 common/crypto/tsp-sanity.cpp \
456 common/crypto/store.cpp \
457 common/crypto/store-inmem.cpp \
458 common/crypto/store-cert-add-basic.cpp \
459 common/crypto/RTCrPkcs5Pbkdf2Hmac-openssl.cpp \
460 common/crypto/RTCrRandBytes-openssl.cpp \
461 common/crypto/RTCrStoreCertAddFromJavaKeyStore.cpp \
462 common/crypto/RTCrStoreCertAddWantedFromFishingExpedition.cpp \
463 common/crypto/RTCrStoreCertExportAsPem.cpp \
464 common/crypto/RTCrStoreCreateSnapshotOfUserAndSystemTrustedCAsAndCerts.cpp \
465 common/dbg/dbg.cpp \
466 common/dbg/dbgas.cpp \
467 common/dbg/dbgcfg.cpp \
468 common/dbg/dbgmod.cpp \
469 common/dbg/dbgmodldr.cpp \
470 common/dbg/dbgmodcontainer.cpp \
471 common/dbg/dbgmoddeferred.cpp \
472 common/dbg/dbgmodexports.cpp \
473 common/dbg/dbgmodcodeview.cpp \
474 common/dbg/dbgmoddwarf.cpp \
475 common/dbg/dbgmodmapsym.cpp \
476 common/dbg/dbgmodnm.cpp \
477 common/dvm/dvm.cpp \
478 common/dvm/dvmbsdlabel.cpp \
479 common/dvm/dvmgpt.cpp \
480 common/dvm/dvmmbr.cpp \
481 common/dvm/dvmvfs.cpp \
482 common/efi/efiguid.cpp \
483 common/efi/efitime.cpp \
484 common/efi/efisignaturedb.cpp \
485 common/efi/efivarstorevfs.cpp \
486 common/err/errinfo.cpp \
487 common/err/errinfolog.cpp \
488 common/err/errinfo-alloc.cpp \
489 common/err/errmsg.cpp \
490 common/err/RTErrConvertFromErrno.cpp \
491 common/err/RTErrConvertToErrno.cpp \
492 common/fs/extvfs.cpp \
493 common/fs/fatvfs.cpp \
494 common/fs/isovfs.cpp \
495 common/fs/isomaker.cpp \
496 common/fs/isomakercmd.cpp \
497 common/fs/isomakerimport.cpp \
498 common/fs/ntfsvfs.cpp \
499 common/fs/RTFsCmdLs.cpp \
500 common/ioqueue/ioqueuebase.cpp \
501 common/ioqueue/ioqueue-stdfile-provider.cpp \
502 common/ldr/ldr.cpp \
503 common/ldr/ldrELF.cpp \
504 common/ldr/ldrEx.cpp \
505 common/ldr/ldrFile.cpp \
506 common/ldr/ldrVfsFile.cpp \
507 common/ldr/ldrLX.cpp \
508 common/ldr/ldrMachO.cpp \
509 common/ldr/ldrMemory.cpp \
510 common/ldr/ldrNative.cpp \
511 common/ldr/ldrPE.cpp \
512 common/log/log.cpp \
513 common/log/logellipsis.cpp \
514 common/log/logrel.cpp \
515 common/log/logrelellipsis.cpp \
516 common/log/logcom.cpp \
517 common/log/logformat.cpp \
518 common/log/tracebuf.cpp \
519 common/log/tracedefault.cpp \
520 common/log/tracelogreader.cpp \
521 common/log/tracelogwriter.cpp \
522 common/log/RTLogCreateEx.cpp \
523 common/math/bignum.cpp \
524 common/misc/RTAssertMsg1Weak.cpp \
525 common/misc/RTAssertMsg2.cpp \
526 common/misc/RTAssertMsg2Add.cpp \
527 common/misc/RTAssertMsg2AddWeak.cpp \
528 common/misc/RTAssertMsg2AddWeakV.cpp \
529 common/misc/RTAssertMsg2Weak.cpp \
530 common/misc/RTAssertMsg2WeakV.cpp \
531 common/misc/RTFileModeToFlags.cpp \
532 common/misc/RTFileOpenF.cpp \
533 common/misc/RTFileOpenV.cpp \
534 common/misc/RTMemWipeThoroughly.cpp \
535 common/misc/RTSystemFirmwareTypeName.cpp \
536 common/misc/assert.cpp \
537 common/misc/buildconfig.cpp \
538 common/misc/cidr.cpp \
539 common/misc/expreval.cpp \
540 common/misc/getopt.cpp \
541 common/misc/getoptargv.cpp \
542 common/misc/handle.cpp \
543 common/misc/handletable.cpp \
544 common/misc/handletablectx.cpp \
545 common/misc/handletablesimple.cpp \
546 common/misc/inifile.cpp \
547 common/misc/json.cpp \
548 common/misc/lockvalidator.cpp \
549 common/misc/message.cpp \
550 common/misc/messagerefentry.cpp \
551 common/misc/once.cpp \
552 common/misc/req.cpp \
553 common/misc/reqpool.cpp \
554 common/misc/reqqueue.cpp \
555 common/misc/sanity-c.c \
556 common/misc/sanity-cpp.cpp \
557 common/misc/semspingpong.cpp \
558 common/misc/sg.cpp \
559 common/misc/circbuf.cpp \
560 common/misc/thread.cpp \
561 common/misc/term.cpp \
562 common/misc/uri.cpp \
563 common/net/netaddrstr2.cpp \
564 common/net/macstr.cpp \
565 common/path/rtPathRootSpecLen.cpp \
566 common/path/rtPathVolumeSpecLen.cpp \
567 common/path/RTPathAbsDup.cpp \
568 common/path/RTPathAbsEx.cpp \
569 common/path/RTPathAbsExDup.cpp \
570 common/path/RTPathAppend.cpp \
571 common/path/RTPathAppendEx.cpp \
572 common/path/RTPathCalcRelative.cpp \
573 common/path/RTPathChangeToDosSlashes.cpp \
574 common/path/RTPathChangeToUnixSlashes.cpp \
575 common/path/RTPathCopyComponents.cpp \
576 common/path/RTPathCountComponents.cpp \
577 common/path/RTPathEnsureTrailingSeparator.cpp \
578 common/path/RTPathExt.cpp \
579 common/path/RTPathFilename.cpp \
580 common/path/RTPathFilenameUtf16.cpp \
581 common/path/RTPathFindCommon.cpp \
582 common/path/RTPathGlob.cpp \
583 common/path/RTPathHasExt.cpp \
584 common/path/RTPathHasPath.cpp \
585 common/path/RTPathJoin.cpp \
586 common/path/RTPathJoinA.cpp \
587 common/path/RTPathJoinEx.cpp \
588 common/path/RTPathParentLength.cpp \
589 common/path/RTPathParse.cpp \
590 common/path/RTPathParsedReassemble.cpp \
591 common/path/RTPathParseSimple.cpp \
592 common/path/RTPathPurgeFilename.cpp \
593 common/path/RTPathRealDup.cpp \
594 common/path/RTPathRmCmd.cpp \
595 common/path/RTPathSkipRootSpec.cpp \
596 common/path/RTPathSplit.cpp \
597 common/path/RTPathSplitA.cpp \
598 common/path/RTPathSplitReassemble.cpp \
599 common/path/RTPathStartsWithRoot.cpp \
600 common/path/RTPathStripExt.cpp \
601 common/path/RTPathStripFilename.cpp \
602 common/path/RTPathStripTrailingSlash.cpp \
603 common/path/RTPathTraverseList.cpp \
604 common/path/comparepaths.cpp \
605 common/rand/rand.cpp \
606 common/rand/randadv.cpp \
607 common/rand/randparkmiller.cpp \
608 common/sort/RTSortIsSorted.cpp \
609 common/sort/RTSortApvIsSorted.cpp \
610 common/sort/shellsort.cpp \
611 common/string/RTStrCat.cpp \
612 common/string/RTStrCatEx.cpp \
613 common/string/RTStrCatP.cpp \
614 common/string/RTStrCatPEx.cpp \
615 common/string/RTStrCmp.cpp \
616 common/string/RTStrCopy.cpp \
617 common/string/RTStrCopyEx.cpp \
618 common/string/RTStrCopyP.cpp \
619 common/string/RTStrCopyPEx.cpp \
620 common/string/RTStrNCmp.cpp \
621 common/string/RTStrNLen.cpp \
622 common/string/RTStrNLenEx.cpp \
623 common/string/RTStrPrintHexBytes.cpp \
624 common/string/RTStrStartsWith.cpp \
625 common/string/RTStrIStartsWith.cpp \
626 common/string/RTStrICmpAscii.cpp \
627 common/string/RTStrNICmpAscii.cpp \
628 common/string/RTStrSplit.cpp \
629 common/string/RTStrStr.cpp \
630 common/string/RTUtf16Copy.cpp \
631 common/string/RTUtf16CopyAscii.cpp \
632 common/string/RTUtf16CopyEx.cpp \
633 common/string/RTUtf16Cat.cpp \
634 common/string/RTUtf16CatAscii.cpp \
635 common/string/RTUtf16Chr.cpp \
636 common/string/RTUtf16CmpAscii.cpp \
637 common/string/RTUtf16ICmpAscii.cpp \
638 common/string/RTUtf16End.cpp \
639 common/string/RTUtf16NCmp.cpp \
640 common/string/RTUtf16NCmpAscii.cpp \
641 common/string/RTUtf16NCmpUtf8.cpp \
642 common/string/RTUtf16NICmpAscii.cpp \
643 common/string/RTUtf16NLen.cpp \
644 common/string/RTUtf16NLenEx.cpp \
645 common/string/RTUtf16PrintHexBytes.cpp \
646 common/string/base64.cpp \
647 common/string/base64-utf16.cpp \
648 common/string/simplepattern.cpp \
649 common/string/straprintf.cpp \
650 common/string/strformat.cpp \
651 common/string/RTStrFormat.cpp \
652 common/string/strformatfloat.cpp \
653 common/string/strformatnum.cpp \
654 common/string/strformatrt.cpp \
655 common/string/strformattype.cpp \
656 common/string/strhash1.cpp \
657 common/string/stringalloc.cpp \
658 common/string/strprintf.cpp \
659 common/string/strprintf-ellipsis.cpp \
660 common/string/strprintf2.cpp \
661 common/string/strprintf2-ellipsis.cpp \
662 common/string/strcache.cpp \
663 common/string/strspace.cpp \
664 common/string/strstrip.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): \
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
1742$$($(target)_0_OUTDIR)/genalias/genalias.ts + $$($(target)_2_VBOX_NOCRT_ALIAS_FILES): | $$(VBOX_GENALIAS)
1743 $$(call MSG_GENERATE,$(target),$$@,)
1744 $$(QUIET)$$(MKDIR) -p -- "$$($(target)_0_OUTDIR)/genalias/"
1745 $$(QUIET)$$(VBOX_GENALIAS) -f $$(if-expr "$(bld_trg)" == "win",coff,$$(if-expr "$(bld_trg)" == "darwin",macho,omf)) \
1746 -D "$$($(target)_0_OUTDIR)/genalias/" $$($(target)_2_VBOX_NOCRT_ALIASES) \
1747 $$($(target)_VBOX_NOCRT_ALIASES) \
1748 $$($(target)_VBOX_NOCRT_ALIASES.$(bld_trg)) \
1749 $$($(target)_VBOX_NOCRT_ALIASES.$(bld_trg).$(bld_type)) \
1750 $$($(target)_VBOX_NOCRT_ALIASES.$(bld_trg).$(bld_trg_arch)) \
1751 $$($(target)_VBOX_NOCRT_ALIASES.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
1752 $$($(target)_VBOX_NOCRT_ALIASES.$(bld_trg_arch)) \
1753 $$($(target)_VBOX_NOCRT_ALIASES.$(bld_trg_cpu)) \
1754 $$($(target)_VBOX_NOCRT_ALIASES.$(bld_type))
1755 $$(QUIET)$$(APPEND) -tn "$$($(target)_0_OUTDIR)/genalias/genalias.ts" "$$($(target)_2_VBOX_NOCRT_ALIASES))"
1756
1757$(target)_2_OBJS += $$($(target)_2_VBOX_NOCRT_ALIAS_FILES)
1758OTHER_CLEAN += $$($(target)_2_VBOX_NOCRT_ALIAS_KMK_FILE) $$($(target)_2_VBOX_NOCRT_ALIAS_KMK_FILE).ts
1759endef
1760
1761define def_unit_VBoxNoCrtAliases_target_pre
1762 if1of ($(bld_trg), win os2 darwin) # Only non-ELF targets as ELF does not support aliasing.
1763 $(target)_2_VBOX_NOCRT_ALIAS_KMK_FILE := $(PATH_OUT)/nocrt-aliases-$(target).kmk
1764 include $($(target)_2_VBOX_NOCRT_ALIAS_KMK_FILE)
1765 $(target)_2_VBOX_NOCRT_ALIAS_FILES := $(foreach alias,$($(target)_2_VBOX_NOCRT_ALIASES) \
1766 $($(target)_VBOX_NOCRT_ALIASES) \
1767 $($(target)_VBOX_NOCRT_ALIASES.$(bld_trg)) \
1768 $($(target)_VBOX_NOCRT_ALIASES.$(bld_trg).$(bld_type)) \
1769 $($(target)_VBOX_NOCRT_ALIASES.$(bld_trg).$(bld_trg_arch)) \
1770 $($(target)_VBOX_NOCRT_ALIASES.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
1771 $($(target)_VBOX_NOCRT_ALIASES.$(bld_trg_arch)) \
1772 $($(target)_VBOX_NOCRT_ALIASES.$(bld_trg_cpu)) \
1773 $($(target)_VBOX_NOCRT_ALIASES.$(bld_type)) \
1774 , $($(target)_0_OUTDIR)/genalias/$(firstword $(subst =, $(SPACE),$(alias))).o)
1775 $(eval $(def_unit_VBoxNoCrtAliases_double_expansion))
1776 endif
1777endef
1778
1779
1780#
1781# RuntimeR3 - Static Runtime for Ring-3 executables.
1782#
1783RuntimeR3_TEMPLATE = VBoxR3Static
1784RuntimeR3_EXTENDS = RuntimeBaseR3
1785ifdef VBOX_WITH_NOCRT_STATIC
1786 if1of ($(KBUILD_TARGET), win)
1787 RuntimeR3_USES = $(RuntimeBaseR3_USES) VBoxNoCrtAliases
1788 RuntimeR3_DEFS += $(filter-out RT_WITHOUT_NOCRT_WRAPPERS,$(RuntimeBaseR3_DEFS)) \
1789 RT_FORCE_NOCRT_WRAPPERS \
1790 RT_WITH_NOCRT_ALIASES RT_WITH_NOCRT_UNDERSCORE_ALIASES RT_WITH_GENALIAS_NOCRT_ALIASES
1791
1792 RuntimeR3_SOURCES = $(filter-out \
1793 r3/alloc.cpp \
1794 r3/alloc-ef.cpp \
1795 r3/xml.cpp \
1796 common/zip/xarvfs.cpp \
1797 common/misc/json.cpp \
1798 generic/RTLogWriteStdErr-generic.cpp \
1799 generic/RTLogWriteStdOut-generic.cpp \
1800 ,$(RuntimeBaseR3_SOURCES)) \
1801 \
1802 common/err/nocrt-strerror.cpp \
1803 common/file/nocrt-open.cpp \
1804 common/file/nocrt-close.cpp \
1805 common/file/nocrt-fstat.cpp \
1806 common/file/nocrt-isatty.cpp \
1807 common/file/nocrt-read.cpp \
1808 common/math/nocrt-abs.cpp \
1809 common/math/nocrt-labs.cpp \
1810 common/math/nocrt-llabs.cpp \
1811 common/math/consts.c \
1812 common/math/copysign.cpp \
1813 common/math/copysignf.cpp \
1814 common/math/copysignl.cpp \
1815 common/math/__fpclassifyd.cpp \
1816 common/math/__fpclassifyf.cpp \
1817 common/math/__fpclassifyl.cpp \
1818 common/math/__isfinite.cpp \
1819 common/math/__isfinitef.cpp \
1820 common/math/__isfinitel.cpp \
1821 common/math/isinf.cpp \
1822 common/math/__isinff.cpp \
1823 common/math/__isinfl.cpp \
1824 common/math/isnan.cpp \
1825 common/math/isnanf.cpp \
1826 common/math/__isnanl.cpp \
1827 common/math/__isnormal.cpp \
1828 common/math/__isnormalf.cpp \
1829 common/math/__isnormall.cpp \
1830 common/math/__signbit.cpp \
1831 common/math/__signbitf.cpp \
1832 common/math/__signbitl.cpp \
1833 common/path/nocrt-access.cpp \
1834 common/path/nocrt-unlink.cpp \
1835 common/rand/nocrt-rand.cpp \
1836 common/sort/nocrt-qsort.cpp \
1837 common/sort/nocrt-qsort_r.cpp \
1838 common/string/nocrt-atof.cpp \
1839 common/string/nocrt-strdup.cpp \
1840 common/string/nocrt-stricmp.cpp \
1841 common/string/nocrt-strtol.cpp \
1842 common/string/nocrt-strtoll.cpp \
1843 common/string/nocrt-strtoul.cpp \
1844 common/string/nocrt-strtoull.cpp \
1845 common/string/nocrt-snprintf.cpp \
1846 common/string/nocrt-vsnprintf.cpp \
1847 common/string/nocrt-scprintf.cpp \
1848 common/string/nocrt-vscprintf.cpp \
1849 common/string/atoi.cpp \
1850 common/string/strtok_r.cpp \
1851 r3/nocrt-per-thread-1.cpp \
1852 r3/nocrt-per-thread-2.cpp \
1853 r3/nocrt-errno.cpp \
1854 r3/nocrt-fopen.cpp \
1855 r3/nocrt-fdopen.cpp \
1856 r3/nocrt-tmpfile.cpp \
1857 r3/nocrt-tmpfile_s.cpp \
1858 r3/nocrt-fileno.cpp \
1859 r3/nocrt-fclose.cpp \
1860 r3/nocrt-fflush.cpp \
1861 r3/nocrt-setvbuf.cpp \
1862 r3/nocrt-fseek.cpp \
1863 r3/nocrt-fseeko.cpp \
1864 r3/nocrt-ftell.cpp \
1865 r3/nocrt-ftello.cpp \
1866 r3/nocrt-fwrite.cpp \
1867 r3/nocrt-fputc.cpp \
1868 r3/nocrt-putc.cpp \
1869 r3/nocrt-fputs.cpp \
1870 r3/nocrt-puts.cpp \
1871 r3/nocrt-fread.cpp \
1872 r3/nocrt-fgetc.cpp \
1873 r3/nocrt-getc.cpp \
1874 r3/nocrt-clearerr.cpp \
1875 r3/nocrt-ferror.cpp \
1876
1877 RuntimeR3_SOURCES.x86 = $(RuntimeBaseR3_SOURCES.x86) \
1878 common/math/cos.asm \
1879 common/math/cosf.asm \
1880 common/math/ceil.asm \
1881 common/math/ceilf.asm \
1882 common/math/fabs.asm \
1883 common/math/fabsf.asm \
1884 common/math/floor.asm \
1885 common/math/floorf.asm \
1886 common/math/ldexp.asm \
1887 common/math/ldexpf.asm \
1888 common/math/log.asm \
1889 common/math/logf.asm \
1890 common/math/llrint.asm \
1891 common/math/llrintf.asm \
1892 common/math/lrint.asm \
1893 common/math/lrintf.asm \
1894 common/math/remainder.asm \
1895 common/math/remainderf.asm \
1896 common/math/sin.asm \
1897 common/math/sinf.asm \
1898 common/math/tan.asm \
1899 common/math/tanf.asm \
1900 common/math/trunc.asm \
1901 common/math/truncf.asm \
1902 common/misc/setjmp.asm \
1903 common/string/memcpy.asm \
1904 common/string/memchr.asm \
1905 common/string/memcmp.asm \
1906 common/string/memmove.asm \
1907 common/string/memset.asm \
1908 common/string/strlen.asm \
1909 common/string/strnlen.cpp \
1910 common/string/strchr.asm \
1911 common/string/strcmp.asm \
1912 common/string/strncmp.asm \
1913 common/string/strcpy.asm \
1914 common/string/strncpy.asm \
1915 common/string/strcat.cpp \
1916 common/string/strncat.cpp \
1917 common/string/strrchr.cpp \
1918 common/string/strstr.cpp \
1919 common/string/strcspn.cpp \
1920 common/string/strpbrk.cpp
1921 RuntimeR3_SOURCES.amd64 = $(RuntimeBaseR3_SOURCES.amd64) \
1922 common/math/cos.asm \
1923 common/math/cosf.asm \
1924 common/math/ceil.asm \
1925 common/math/ceilf.asm \
1926 common/math/fabs.asm \
1927 common/math/fabsf.asm \
1928 common/math/floor.asm \
1929 common/math/floorf.asm \
1930 common/math/ldexp.asm \
1931 common/math/ldexpf.asm \
1932 common/math/log.asm \
1933 common/math/logf.asm \
1934 common/math/llrint.asm \
1935 common/math/llrintf.asm \
1936 common/math/lrint.asm \
1937 common/math/lrintf.asm \
1938 common/math/remainder.asm \
1939 common/math/remainderf.asm \
1940 common/math/sin.asm \
1941 common/math/sinf.asm \
1942 common/math/tan.asm \
1943 common/math/tanf.asm \
1944 common/math/trunc.asm \
1945 common/math/truncf.asm \
1946 common/misc/setjmp.asm \
1947 common/string/memcpy.asm \
1948 common/string/memchr.asm \
1949 common/string/memcmp.asm \
1950 common/string/memmove.asm \
1951 common/string/memset.asm \
1952 common/string/strlen.asm \
1953 common/string/strnlen.cpp \
1954 common/string/strchr.asm \
1955 common/string/strcmp.asm \
1956 common/string/strncmp.asm \
1957 common/string/strcpy.asm \
1958 common/string/strncpy.asm \
1959 common/string/strcat.cpp \
1960 common/string/strncat.cpp \
1961 common/string/strrchr.cpp \
1962 common/string/strstr.cpp \
1963 common/string/strcspn.cpp \
1964 common/string/strpbrk.cpp
1965 RuntimeR3_SOURCES.win = $(filter-out \
1966 r3/generic/RTLocaleQueryLocaleName-r3-generic.cpp \
1967 ,$(RuntimeBaseR3_SOURCES.win)) \
1968 \
1969 common/compiler/vcc/atexit-vcc.cpp \
1970 common/compiler/vcc/loadcfg-vcc.c \
1971 common/compiler/vcc/tlsdir-vcc.c \
1972 common/compiler/vcc/initializers-c-cpp-vcc.cpp \
1973 common/compiler/vcc/stacksup-vcc.cpp \
1974 common/compiler/vcc/fltused-vcc.cpp \
1975 common/compiler/vcc/purecall-vcc.cpp \
1976 r3/win/nocrt-startup-exe-win.cpp \
1977 r3/win/nocrt-startup-dll-win.cpp \
1978 r3/win/nocrt-startup-common-win.cpp \
1979 r3/win/nocrt-alloc-win.cpp \
1980 r3/win/nocrt-RTLogWriteStdErr-win.cpp \
1981 r3/win/nocrt-RTLogWriteStdOut-win.cpp \
1982 generic/new-delete-generic.cpp
1983 RuntimeR3_SOURCES.win.amd64 = $(RuntimeBaseR3_SOURCES.win.amd64) \
1984 r3/win/nocrt-atexit-win.asm \
1985 r3/win/nocrt-mainCRTStartup-win.asm \
1986 r3/win/nocrt-WinMainCRTStartup-win.asm \
1987 common/compiler/vcc/guard-vcc.asm \
1988 common/compiler/vcc/stack-vcc.asm
1989 RuntimeR3_SOURCES.win.x86 = $(RuntimeBaseR3_SOURCES.win.x86) \
1990 r3/win/nocrt-atexit-win.asm \
1991 r3/win/nocrt-mainCRTStartup-win.asm \
1992 r3/win/nocrt-WinMainCRTStartup-win.asm \
1993 common/compiler/vcc/guard-vcc.asm \
1994 common/compiler/vcc/stack-vcc.asm
1995 RuntimeR3_VBOX_NOCRT_ALIASES.win = strtok_s=nocrt_strtok_r _strtok_s=nocrt_strtok_r nocrt_strtok_s=nocrt_strtok_r \
1996 cosl=nocrt_cos _cosl=nocrt_cos \
1997 ceill=nocrt_ceil _ceill=nocrt_ceil \
1998 fabsl=nocrt_fabs _fabsl=nocrt_fabs \
1999 floorl=nocrt_floor _floorl=nocrt_floor \
2000 ldexpl=nocrt_ldexp _ldexpl=nocrt_ldexp \
2001 logl=nocrt_log _logl=nocrt_log \
2002 lrintl=nocrt_lrint _lrintl=nocrt_lrint \
2003 llrintl=nocrt_llrint _llrintl=nocrt_llrint \
2004 remainderl=nocrt_remainder _remainderl=nocrt_remainder \
2005 sinl=nocrt_sin _sinl=nocrt_sin \
2006 tanl=nocrt_tan _tanl=nocrt_tan
2007 endif
2008endif
2009
2010#
2011# Generate RTIsoMaker / VISO help text from the manpage xml.
2012#
2013ifn1of ($(KBUILD_TARGET), os2) # breaks validationkit, figure out later.
2014
2015 IPRT_XML_REFENTRY_FILES = \
2016 common/fs/isomakercmd-man.xml
2017
2018 #$(call KB_FN_DO_PASS0_ON_TARGET,RuntimeR3)
2019
2020 BLDDIRS += $(IPRT_OUT_DIR)/man/
2021 OTHER_CLEAN += $(foreach xml,$(basename $(notdir $(IPRT_XML_REFENTRY_FILES))), \
2022 $(IPRT_OUT_DIR)/man/$(xml).xml $(IPRT_OUT_DIR)/man/$(xml).h $(IPRT_OUT_DIR)/man/$(xml).h.ts)
2023
2024
2025 include $(PATH_ROOT)/doc/manual/Config.kmk
2026
2027 # Preprocess the xml files, applying remarks.
2028 $(foreach file,$(IPRT_XML_REFENTRY_FILES) \
2029 , $(evalcall2 def_vbox_refentry_preprocess_for_manpage,$(IPRT_OUT_DIR)/man,$(notdir $(file)),$(VBOX_PATH_RUNTIME_SRC)/$(file)))
2030
2031 # generate the header and add it as a dependency to the source using it.
2032 $(evalcall2 def_vbox_single_refentry_to_h,$(IPRT_OUT_DIR)/man/isomakercmd-man.h, $(IPRT_OUT_DIR)/man/isomakercmd-man.xml)
2033 common/fs/isomakercmd.cpp_DEPS = $(IPRT_OUT_DIR)/man/isomakercmd-man.h
2034 common/fs/isomakercmd.cpp_INCS = $(IPRT_OUT_DIR)/man/
2035
2036endif
2037
2038
2039#
2040# RuntimeR3-x86 - 32-bit version of RuntimeR3 for windows hosts.
2041#
2042RuntimeR3-x86_EXTENDS := RuntimeR3
2043RuntimeR3-x86_BLD_TRG_ARCH := x86
2044RuntimeR3-x86_DEFS = $(filter-out IN_SUP_R3 IN_SUP, $(RuntimeR3_DEFS)) IPRT_WITHOUT_LDR_VERIFY RT_NO_GIP
2045
2046
2047#
2048# RuntimeBldProg - Static Runtime for build programs.
2049#
2050# Note! This is a bit of hacky since kBuild doesn't support building libraries
2051# for build programs.
2052#
2053RuntimeBldProg_TEMPLATE := VBoxAdvBldProg
2054RuntimeBldProg_EXTENDS := RuntimeBaseR3
2055RuntimeBldProg_BLD_TRG := $(KBUILD_HOST)
2056RuntimeBldProg_BLD_TRG_ARCH := $(KBUILD_HOST_ARCH)
2057RuntimeBldProg_BLD_TRG_CPU := $(KBUILD_HOST_CPU)
2058RuntimeBldProg_DEFS := $(filter-out IN_SUP_R3 IN_SUP, $(RuntimeBaseR3_DEFS)) IPRT_WITHOUT_LDR_VERIFY RT_NO_GIP
2059RuntimeBldProg_SOURCES = \
2060 common/alloc/alloc.cpp \
2061 common/alloc/memcache.cpp \
2062 common/asn1/asn1-basics.cpp \
2063 common/asn1/asn1-cursor.cpp \
2064 common/asn1/asn1-default-allocator.cpp \
2065 common/asn1/asn1-dump.cpp \
2066 common/asn1/asn1-efence-allocator.cpp \
2067 common/asn1/asn1-encode.cpp \
2068 common/asn1/asn1-safer-allocator.cpp \
2069 common/asn1/asn1-ut-bitstring-decode.cpp \
2070 common/asn1/asn1-ut-bitstring.cpp \
2071 common/asn1/asn1-ut-boolean-decode.cpp \
2072 common/asn1/asn1-ut-boolean.cpp \
2073 common/asn1/asn1-ut-core-decode.cpp \
2074 common/asn1/asn1-ut-core.cpp \
2075 common/asn1/asn1-ut-dyntype-decode.cpp \
2076 common/asn1/asn1-ut-dyntype.cpp \
2077 common/asn1/asn1-ut-integer-decode.cpp \
2078 common/asn1/asn1-ut-integer.cpp \
2079 common/asn1/asn1-ut-null-decode.cpp \
2080 common/asn1/asn1-ut-null.cpp \
2081 common/asn1/asn1-ut-objid-decode.cpp \
2082 common/asn1/asn1-ut-objid.cpp \
2083 common/asn1/asn1-ut-octetstring-decode.cpp \
2084 common/asn1/asn1-ut-octetstring.cpp \
2085 common/asn1/asn1-ut-string-decode.cpp \
2086 common/asn1/asn1-ut-string.cpp \
2087 common/asn1/asn1-ut-time-decode.cpp \
2088 common/asn1/asn1-ut-time.cpp \
2089 common/checksum/adler32.cpp \
2090 common/checksum/alt-md2.cpp \
2091 common/checksum/alt-md4.cpp \
2092 common/checksum/alt-md5.cpp \
2093 common/checksum/alt-sha1.cpp \
2094 common/checksum/alt-sha256.cpp \
2095 common/checksum/alt-sha512.cpp \
2096 common/checksum/crc16ccitt.cpp \
2097 common/checksum/crc32.cpp \
2098 common/checksum/crc32c.cpp \
2099 common/checksum/crc64.cpp \
2100 common/checksum/manifest2.cpp \
2101 common/checksum/manifest3.cpp \
2102 common/checksum/md5str.cpp \
2103 common/checksum/sha1str.cpp \
2104 common/checksum/sha256str.cpp \
2105 common/checksum/sha512str.cpp \
2106 common/crypto/digest-core.cpp \
2107 common/crypto/pemfile-read.cpp \
2108 common/crypto/pkcs7-asn1-decoder.cpp \
2109 common/crypto/pkcs7-core.cpp \
2110 common/crypto/pkcs7-init.cpp \
2111 common/crypto/pkcs7-sanity.cpp \
2112 common/crypto/pkcs7-verify.cpp \
2113 common/crypto/spc-asn1-decoder.cpp \
2114 common/crypto/spc-core.cpp \
2115 common/crypto/spc-init.cpp \
2116 common/crypto/spc-sanity.cpp \
2117 common/crypto/taf-asn1-decoder.cpp \
2118 common/crypto/taf-core.cpp \
2119 common/crypto/taf-init.cpp \
2120 common/crypto/taf-sanity.cpp \
2121 common/crypto/tsp-asn1-decoder.cpp \
2122 common/crypto/tsp-core.cpp \
2123 common/crypto/tsp-init.cpp \
2124 common/crypto/tsp-sanity.cpp \
2125 common/crypto/x509-asn1-decoder.cpp \
2126 common/crypto/x509-core.cpp \
2127 common/crypto/x509-file.cpp \
2128 common/crypto/x509-init.cpp \
2129 common/crypto/x509-sanity.cpp \
2130 common/dbg/dbg.cpp \
2131 common/dbg/dbgcfg.cpp \
2132 common/dbg/dbgmod.cpp \
2133 common/dbg/dbgmodcodeview.cpp \
2134 common/dbg/dbgmodcontainer.cpp \
2135 common/dbg/dbgmoddeferred.cpp \
2136 common/dbg/dbgmoddwarf.cpp \
2137 common/dbg/dbgmodexports.cpp \
2138 common/dbg/dbgmodldr.cpp \
2139 common/dbg/dbgmodmapsym.cpp \
2140 common/dbg/dbgmodnm.cpp \
2141 common/err/errinfo-alloc.cpp \
2142 common/err/errinfo.cpp \
2143 common/err/errinfolog.cpp \
2144 common/err/errmsg.cpp \
2145 common/err/RTErrConvertFromErrno.cpp \
2146 common/err/RTErrConvertToErrno.cpp \
2147 common/fs/isomaker.cpp \
2148 common/fs/isomakercmd.cpp \
2149 common/fs/isomakerimport.cpp \
2150 common/fs/isovfs.cpp \
2151 common/ldr/ldr.cpp \
2152 common/ldr/ldrELF.cpp \
2153 common/ldr/ldrEx.cpp \
2154 common/ldr/ldrFile.cpp \
2155 common/ldr/ldrLX.cpp \
2156 common/ldr/ldrMachO.cpp \
2157 common/ldr/ldrNative.cpp \
2158 common/ldr/ldrPE.cpp \
2159 common/ldr/ldrVfsFile.cpp \
2160 common/log/log.cpp \
2161 common/log/logellipsis.cpp \
2162 common/log/logformat.cpp \
2163 common/log/logrel.cpp \
2164 common/log/logrelellipsis.cpp \
2165 common/log/RTLogCreateEx.cpp \
2166 common/math/bignum.cpp \
2167 common/misc/assert.cpp \
2168 common/misc/cidr.cpp \
2169 common/misc/getopt.cpp \
2170 common/misc/getoptargv.cpp \
2171 common/misc/lockvalidator.cpp \
2172 common/misc/message.cpp \
2173 common/misc/messagerefentry.cpp \
2174 common/misc/once.cpp \
2175 common/misc/RTAssertMsg1Weak.cpp \
2176 common/misc/RTAssertMsg2.cpp \
2177 common/misc/RTAssertMsg2Add.cpp \
2178 common/misc/RTAssertMsg2AddWeak.cpp \
2179 common/misc/RTAssertMsg2AddWeakV.cpp \
2180 common/misc/RTAssertMsg2Weak.cpp \
2181 common/misc/RTAssertMsg2WeakV.cpp \
2182 common/misc/RTFileModeToFlags.cpp \
2183 common/misc/RTFileOpenF.cpp \
2184 common/misc/RTFileOpenV.cpp \
2185 common/misc/RTMemWipeThoroughly.cpp \
2186 common/misc/req.cpp \
2187 common/misc/reqqueue.cpp \
2188 common/misc/reqpool.cpp \
2189 common/misc/sanity-c.c \
2190 common/misc/sanity-cpp.cpp \
2191 common/misc/sg.cpp \
2192 common/misc/term.cpp \
2193 common/misc/thread.cpp \
2194 common/net/macstr.cpp \
2195 common/net/netaddrstr2.cpp \
2196 common/path/comparepaths.cpp \
2197 common/path/RTPathAbsDup.cpp \
2198 common/path/RTPathAbsEx.cpp \
2199 common/path/RTPathAbsExDup.cpp \
2200 common/path/RTPathAppend.cpp \
2201 common/path/RTPathAppendEx.cpp \
2202 common/path/RTPathChangeToDosSlashes.cpp \
2203 common/path/RTPathChangeToUnixSlashes.cpp \
2204 common/path/RTPathCopyComponents.cpp \
2205 common/path/RTPathCountComponents.cpp \
2206 common/path/RTPathEnsureTrailingSeparator.cpp \
2207 common/path/RTPathExt.cpp \
2208 common/path/RTPathFilename.cpp \
2209 common/path/RTPathHasExt.cpp \
2210 common/path/RTPathHasPath.cpp \
2211 common/path/RTPathJoin.cpp \
2212 common/path/RTPathJoinA.cpp \
2213 common/path/RTPathJoinEx.cpp \
2214 common/path/RTPathParse.cpp \
2215 common/path/RTPathParsedReassemble.cpp \
2216 common/path/RTPathParseSimple.cpp \
2217 common/path/RTPathRealDup.cpp \
2218 common/path/rtPathRootSpecLen.cpp \
2219 common/path/RTPathSkipRootSpec.cpp \
2220 common/path/RTPathSplit.cpp \
2221 common/path/RTPathSplitA.cpp \
2222 common/path/RTPathSplitReassemble.cpp \
2223 common/path/RTPathStartsWithRoot.cpp \
2224 common/path/RTPathStripExt.cpp \
2225 common/path/RTPathStripFilename.cpp \
2226 common/path/RTPathStripTrailingSlash.cpp \
2227 common/path/RTPathTraverseList.cpp \
2228 common/path/rtPathVolumeSpecLen.cpp \
2229 common/rand/rand.cpp \
2230 common/rand/randadv.cpp \
2231 common/rand/randparkmiller.cpp \
2232 common/sort/shellsort.cpp \
2233 common/string/base64.cpp \
2234 common/string/RTStrCat.cpp \
2235 common/string/RTStrCmp.cpp \
2236 common/string/RTStrCopy.cpp \
2237 common/string/RTStrCopyEx.cpp \
2238 common/string/RTStrCopyP.cpp \
2239 common/string/RTStrIStartsWith.cpp \
2240 common/string/RTStrNCmp.cpp \
2241 common/string/RTStrNICmpAscii.cpp \
2242 common/string/RTStrNLen.cpp \
2243 common/string/RTStrPrintHexBytes.cpp \
2244 common/string/RTStrStr.cpp \
2245 common/string/simplepattern.cpp \
2246 common/string/straprintf.cpp \
2247 common/string/strcache.cpp \
2248 common/string/strformat.cpp \
2249 common/string/RTStrFormat.cpp \
2250 common/string/strformatnum.cpp \
2251 common/string/strformatrt.cpp \
2252 common/string/strformattype.cpp \
2253 common/string/strhash1.cpp \
2254 common/string/stringalloc.cpp \
2255 common/string/strprintf.cpp \
2256 common/string/strprintf-ellipsis.cpp \
2257 common/string/strprintf2.cpp \
2258 common/string/strprintf2-ellipsis.cpp \
2259 common/string/strspace.cpp \
2260 common/string/strstrip.cpp \
2261 common/string/strtonum.cpp \
2262 common/string/unidata-flags.cpp \
2263 common/string/unidata-lower.cpp \
2264 common/string/unidata-upper.cpp \
2265 common/string/utf-16-case.cpp \
2266 common/string/utf-16.cpp \
2267 common/string/utf-8-case.cpp \
2268 common/string/utf-8-case2.cpp \
2269 common/string/utf-8.cpp \
2270 common/table/avllu32.cpp \
2271 common/table/avlpv.cpp \
2272 common/table/avlrpv.cpp \
2273 common/table/avlruintptr.cpp \
2274 common/table/avlu32.cpp \
2275 common/table/avluintptr.cpp \
2276 common/time/time.cpp \
2277 common/time/timeprog.cpp \
2278 common/time/timesupref.cpp \
2279 common/time/timesysalias.cpp \
2280 common/vfs/vfsbase.cpp \
2281 common/vfs/vfschain.cpp \
2282 common/vfs/vfsmemory.cpp \
2283 common/vfs/vfsmisc.cpp \
2284 common/vfs/vfsmsg.cpp \
2285 common/vfs/vfsstddir.cpp \
2286 common/vfs/vfsstdfile.cpp \
2287 common/vfs/vfsstdpipe.cpp \
2288 common/zip/gzipvfs.cpp \
2289 common/zip/tar.cpp \
2290 common/zip/tarcmd.cpp \
2291 common/zip/tarvfs.cpp \
2292 common/zip/tarvfswriter.cpp \
2293 generic/critsect-generic.cpp \
2294 generic/critsectrw-generic.cpp \
2295 generic/env-generic.cpp \
2296 generic/mempool-generic.cpp \
2297 generic/RTEnvDupEx-generic.cpp \
2298 generic/RTFileCopy-generic.cpp \
2299 generic/RTFileCopyAttributes-generic.cpp \
2300 generic/RTFileCopyEx-generic.cpp \
2301 generic/RTFileCopyByHandlesEx-generic.cpp \
2302 generic/RTFileQuerySize-generic.cpp \
2303 generic/RTFileReadAll-generic.cpp \
2304 generic/RTFileReadAllByHandle-generic.cpp \
2305 generic/RTFileReadAllByHandleEx-generic.cpp \
2306 generic/RTFileReadAllEx-generic.cpp \
2307 generic/RTFileReadAllFree-generic.cpp \
2308 generic/RTLogWriteStdErr-generic.cpp \
2309 generic/RTLogWriteStdOut-generic.cpp \
2310 generic/RTLogWriteUser-generic.cpp \
2311 generic/RTPathIsSame-generic.cpp \
2312 generic/RTPathGetCurrentDrive-generic.cpp \
2313 generic/rtStrFormatKernelAddress-generic.cpp \
2314 generic/RTTimerLRCreate-generic.cpp \
2315 generic/semfastmutex-generic.cpp \
2316 generic/semxroads-generic.cpp \
2317 generic/spinlock-generic.cpp \
2318 r3/alloc-ef.cpp \
2319 r3/alloc.cpp \
2320 r3/allocex.cpp \
2321 r3/dir.cpp \
2322 r3/dir2.cpp \
2323 r3/fileio.cpp \
2324 r3/fs.cpp \
2325 r3/generic/semspinmutex-r3-generic.cpp \
2326 r3/init.cpp \
2327 r3/memsafer-r3.cpp \
2328 r3/path.cpp \
2329 r3/RTPathTemp.cpp \
2330 r3/process.cpp \
2331 r3/socket.cpp \
2332 r3/stream.cpp \
2333 r3/tcp.cpp \
2334 VBox/log-vbox.cpp \
2335 VBox/RTAssertShouldPanic-vbox.cpp \
2336 common/string/ministring.cpp # for main
2337ifneq ($(KBUILD_HOST),win)
2338 RuntimeBldProg_SOURCES += \
2339 common/err/errmsgxpcom.cpp
2340endif
2341
2342RuntimeBldProg_SOURCES.darwin = $(filter-out \
2343 generic/cdrom-generic.cpp \
2344 generic/RTFileMove-generic.cpp \
2345 generic/RTProcDaemonize-generic.cpp \
2346 generic/RTThreadGetAffinity-stub-generic.cpp \
2347 generic/RTThreadSetAffinity-stub-generic.cpp \
2348 generic/RTThreadSetAffinityToCpu-generic.cpp \
2349 generic/RTTimerCreate-generic.cpp \
2350 generic/mppresent-generic.cpp \
2351 generic/RTSystemShutdown-generic.cpp \
2352 generic/timer-generic.cpp \
2353 generic/utf16locale-generic.cpp \
2354 generic/RTProcIsRunningByName-generic.cpp \
2355 generic/RTThreadGetNativeState-generic.cpp \
2356 r3/darwin/RTCrStoreCreateSnapshotById-darwin.cpp \
2357 r3/darwin/filelock-darwin.cpp \
2358 r3/darwin/systemmem-darwin.cpp \
2359 r3/darwin/krnlmod-darwin.cpp \
2360 r3/darwin/filelock-darwin.cpp \
2361 r3/darwin/RTSystemQueryDmiString-darwin.cpp \
2362 r3/darwin/RTPathUserDocuments-darwin.cpp \
2363 r3/posix/RTTimeSet-posix.cpp \
2364 r3/posix/serialport-posix.cpp \
2365 r3/posix/localipc-posix.cpp \
2366 r3/generic/allocex-r3-generic.cpp \
2367 r3/generic/RTLocaleQueryLocaleName-r3-generic.cpp \
2368 r3/generic/RTLocaleQueryNormalizedBaseLocaleName-r3-generic.cpp \
2369 r3/generic/RTLocaleQueryUserCountryCode-r3-generic.cpp \
2370 , $(RuntimeBaseR3_SOURCES.darwin))
2371
2372RuntimeBldProg_SOURCES.win = \
2373 common/dbg/dbgmoddbghelp.cpp \
2374 common/string/mempcpy.asm \
2375 common/string/RTUtf16CopyAscii.cpp \
2376 common/string/RTUtf16End.cpp \
2377 common/string/RTUtf16NLenEx.cpp \
2378 common/string/RTUtf16ICmpAscii.cpp \
2379 common/string/RTUtf16NICmpAscii.cpp \
2380 generic/mppresent-generic-online.cpp \
2381 generic/RTDirExists-generic.cpp \
2382 generic/RTDirSetTimes-generic.cpp \
2383 generic/RTFileCopyPartEx-generic.cpp \
2384 generic/RTFileExists-generic.cpp \
2385 generic/RTFileSetAllocationSize-generic.cpp \
2386 generic/RTRandAdvCreateSystemFaster-generic.cpp \
2387 generic/RTRandAdvCreateSystemTruer-generic.cpp \
2388 generic/RTSemEventWait-2-ex-generic.cpp \
2389 generic/RTSemEventWaitNoResume-2-ex-generic.cpp \
2390 generic/RTSemEventMultiWait-2-ex-generic.cpp \
2391 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
2392 generic/RTSemMutexRequest-generic.cpp \
2393 generic/RTSemMutexRequestDebug-generic.cpp \
2394 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
2395 generic/uuid-generic.cpp \
2396 nt/fileioutils-nt.cpp \
2397 nt/RTErrConvertFromNtStatus.cpp \
2398 nt/semevent-nt.cpp \
2399 nt/semeventmulti-nt.cpp \
2400 r3/nt/direnum-r3-nt.cpp \
2401 r3/nt/dirrel-r3-nt.cpp \
2402 r3/nt/fs-nt.cpp \
2403 r3/nt/pathint-nt.cpp \
2404 r3/nt/RTFileQueryFsSizes-nt.cpp \
2405 r3/nt/RTFileSetMode-r3-nt.cpp \
2406 r3/nt/RTPathQueryInfo-nt.cpp \
2407 r3/nt/RTPathSetMode-r3-nt.cpp \
2408 r3/nt/RTProcQueryParent-r3-nt.cpp \
2409 r3/win/alloc-win.cpp \
2410 r3/win/allocex-win.cpp \
2411 r3/win/dir-win.cpp \
2412 r3/win/env-win.cpp \
2413 r3/win/errvars-win.cpp \
2414 r3/win/fileio-win.cpp \
2415 r3/win/init-win.cpp \
2416 r3/win/ldrNative-win.cpp \
2417 r3/win/path-win.cpp \
2418 r3/win/pathint-win.cpp \
2419 r3/win/pipe-win.cpp \
2420 r3/win/process-win.cpp \
2421 r3/win/RTHandleGetStandard-win.cpp \
2422 r3/win/RTLogWriteDebugger-win.cpp \
2423 r3/win/rtProcInitExePath-win.cpp \
2424 r3/win/RTUuidCreate-win.cpp \
2425 r3/win/sched-win.cpp \
2426 r3/win/semmutex-win.cpp \
2427 r3/win/symlink-win.cpp \
2428 r3/win/system-get-nt-xxx-win.cpp \
2429 r3/win/thread-win.cpp \
2430 r3/win/thread2-win.cpp \
2431 $(if-expr 1,r3/win/time-win.cpp,r3/nt/time-nt.cpp) \
2432 r3/win/time2-win.cpp \
2433 r3/win/tls-win.cpp \
2434 r3/win/utf16locale-win.cpp \
2435 r3/win/utf8-win.cpp \
2436 win/errmsgwin.cpp \
2437 win/RTErrConvertFromWin32.cpp
2438
2439RuntimeBldProg_SOURCES.win.amd64 := \
2440 $(RuntimeWin64ASM_SOURCES) \
2441 common/string/memrchr.asm
2442RuntimeBldProg_SOURCES.win.x86 := \
2443 $(RuntimeWin32ASM_SOURCES) \
2444 common/string/memrchr.asm
2445
2446## @todo reduce this
2447RuntimeBldProg_SOURCES.os2 += \
2448 common/string/memrchr.asm \
2449 generic/mppresent-generic.cpp \
2450 generic/RTCrStoreCreateSnapshotById-generic.cpp \
2451 generic/RTDirQueryInfo-generic.cpp \
2452 generic/RTDirSetTimes-generic.cpp \
2453 generic/fileio-at-generic.cpp \
2454 generic/RTFileCopyPartEx-generic.cpp \
2455 generic/RTFileMove-generic.cpp \
2456 generic/RTFileSetAllocationSize-generic.cpp \
2457 generic/RTLogWriteDebugger-generic.cpp \
2458 generic/RTPathGetCurrentOnDrive-generic.cpp \
2459 generic/RTRandAdvCreateSystemFaster-generic.cpp \
2460 generic/RTRandAdvCreateSystemTruer-generic.cpp \
2461 generic/RTSemEventMultiWait-generic.cpp \
2462 generic/RTSemEventWait-generic.cpp \
2463 generic/RTSemMutexRequest-generic.cpp \
2464 generic/RTSemMutexRequestDebug-generic.cpp \
2465 generic/RTThreadGetNativeState-generic.cpp \
2466 generic/RTUuidCreate-generic.cpp \
2467 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
2468 generic/timer-generic.cpp \
2469 generic/utf16locale-generic.cpp \
2470 generic/uuid-generic.cpp \
2471 os2/RTErrConvertFromOS2.cpp \
2472 r3/generic/allocex-r3-generic.cpp \
2473 r3/generic/dirrel-r3-generic.cpp \
2474 r3/os2/filelock-os2.cpp \
2475 r3/os2/mp-os2.cpp \
2476 r3/os2/pipe-os2.cpp \
2477 r3/os2/rtProcInitExePath-os2.cpp \
2478 r3/os2/sched-os2.cpp \
2479 r3/os2/sems-os2.cpp \
2480 r3/os2/systemmem-os2.cpp \
2481 r3/os2/thread-os2.cpp \
2482 r3/os2/time-os2.cpp \
2483 r3/posix/dir-posix.cpp \
2484 r3/posix/env-posix.cpp \
2485 r3/posix/errvars-posix.cpp \
2486 r3/posix/fileio-posix.cpp \
2487 r3/posix/fileio2-posix.cpp \
2488 r3/posix/fs-posix.cpp \
2489 r3/posix/fs2-posix.cpp \
2490 r3/posix/fs3-posix.cpp \
2491 r3/posix/ldrNative-posix.cpp \
2492 r3/posix/path-posix.cpp \
2493 r3/posix/path2-posix.cpp \
2494 r3/posix/pathhost-posix.cpp \
2495 r3/posix/process-creation-posix.cpp \
2496 r3/posix/process-posix.cpp \
2497 r3/posix/RTFileQueryFsSizes-posix.cpp \
2498 r3/posix/RTHandleGetStandard-posix.cpp \
2499 r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
2500 r3/posix/RTMemProtect-posix.cpp \
2501 r3/posix/RTPathUserDocuments-posix.cpp \
2502 r3/posix/RTPathUserHome-posix.cpp \
2503 r3/posix/RTTimeNow-posix.cpp \
2504 r3/posix/RTTimeSet-posix.cpp \
2505 r3/posix/symlink-posix.cpp \
2506 r3/posix/timelocal-posix.cpp \
2507 r3/posix/utf8-posix.cpp
2508
2509## @todo reduce linux, solaris and freebsd sources too.
2510
2511
2512
2513#
2514# RuntimeGuestR3 - Guest Additions Runtime (static/exe).
2515# (The KBUILD_HOST inheritance here is for cross building the linux
2516# additions, while .x86 is for cross building x86 while targeting amd64.)
2517#
2518RuntimeGuestR3_TEMPLATE := VBoxGuestR3Lib
2519RuntimeGuestR3_EXTENDS := RuntimeR3
2520RuntimeGuestR3_DEFS = $(filter-out RTCRITSECT_STRICT RT_NO_GIP IN_SUP_R3, $(RuntimeR3_DEFS))
2521RuntimeGuestR3_SOURCES = $(filter-out \
2522 common/time/timesupref.cpp \
2523 common/time/timesupA.asm \
2524 common/time/timesup.cpp \
2525 common/zip/xarvfs.cpp \
2526 r3/xml.cpp \
2527 generic/RTLogWriteUser-generic.cpp \
2528 , $(RuntimeR3_SOURCES)) \
2529 \
2530 common/time/timesysalias.cpp \
2531 VBox/logbackdoor.cpp
2532RuntimeGuestR3_DEFS.win.x86 = $(RuntimeR3_DEFS.win.x86) \
2533 VCC_FAKES_TARGET_$(VBOX_VCC_TOOL_STEM) VCC_FAKES_TARGET=$(substr $(VBOX_VCC_TOOL_STEM),-3)
2534RuntimeGuestR3_SOURCES.win.x86 = $(RuntimeR3_SOURCES.win.x86) \
2535 r3/win/vcc-fakes-kernel32.cpp \
2536 r3/win/vcc-fakes-kernel32-A.asm \
2537 r3/win/vcc-fakes-ntdll.cpp \
2538 r3/win/vcc-fakes-ntdll-A.asm \
2539 r3/win/vcc-fakes-ws2_32.cpp \
2540 r3/win/vcc-fakes-ws2_32-A.asm \
2541 r3/win/vcc-fakes-shell32.cpp \
2542 r3/win/vcc-fakes-shell32-A.asm \
2543
2544
2545#
2546# RuntimeGuestR3-x86 - Same as RuntimeGuestR3, except that it's targeting x86.
2547#
2548RuntimeGuestR3-x86_EXTENDS := RuntimeGuestR3
2549RuntimeGuestR3-x86_BLD_TRG_ARCH := x86
2550
2551
2552#
2553# RuntimeGuestR3Shared - Guest Additions Runtime (static/dll).
2554#
2555RuntimeGuestR3Shared_TEMPLATE := VBoxGuestR3Dll
2556RuntimeGuestR3Shared_EXTENDS := RuntimeGuestR3
2557RuntimeGuestR3Shared_INST = $(INST_ADDITIONS_LIB)
2558
2559
2560#
2561# RuntimeGuestR3Shared-x86 - Same as RuntimeGuestR3Shared, except that it's targeting x86.
2562#
2563RuntimeGuestR3Shared-x86_EXTENDS := RuntimeGuestR3Shared
2564RuntimeGuestR3Shared-x86_BLD_TRG_ARCH := x86
2565
2566
2567#
2568# VBoxRT - Shared Object / DLL version.
2569#
2570VBoxRT_TEMPLATE = VBoxR3DllNoPic
2571VBoxRT_SDKS = VBOX_LIBXML2
2572ifdef VBOX_WITH_LIBCURL
2573 VBoxRT_SDKS += VBOX_LIBCURL
2574endif
2575VBoxRT_SDKS += VBOX_OPENSSL
2576VBoxRT_SDKS.win = $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
2577if1of ($(KBUILD_TARGET), win)
2578VBoxRT_INST = $(INST_DLL) $(INST_TESTCASE) $(VBOX_INST_TOOLS)
2579else if1of ($(KBUILD_TARGET)$(VBOX_WITH_HARDENING), darwin win$(VBOX_WITH_HARDENING))
2580VBoxRT_INST = $(INST_DLL) $(INST_TESTCASE)
2581endif
2582VBoxRT_DEFS := $(filter-out RT_NO_GIP, $(RuntimeBaseR3_DEFS)) \
2583 IPRT_WITH_OPENSSL \
2584 IPRT_WITH_XAR \
2585 IPRT_WITH_GHIDRA_DBG_MOD \
2586 $(if-expr !defined(VBOX_WITH_ALT_HASH_CODE),IPRT_WITHOUT_SHA512T224 IPRT_WITHOUT_SHA512T256,)
2587ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
2588 VBoxRT_DEFS += RT_NO_GIP
2589endif
2590ifdef VBOX_WITH_LIBCURL
2591 VBoxRT_DEFS += IPRT_WITH_HTTP
2592endif
2593ifdef RTALLOC_REPLACE_MALLOC
2594 VBoxRT_DEFS += RTALLOC_REPLACE_MALLOC
2595endif
2596if defined(VBOX_WITH_DTRACE_R3) && !defined(VBOX_ONLY_VALIDATIONKIT)
2597 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
2598 VBoxRT_DEFS += IPRT_WITH_DTRACE IPRT_DTRACE_INCLUDE="dtrace/iprt.h"
2599 else
2600 VBoxRT_DEFS += IPRT_WITH_DTRACE IPRT_DTRACE_INCLUDE=\"dtrace/iprt.h\"
2601 endif
2602endif
2603VBoxRT_DEFS.$(KBUILD_TYPE) := $(RuntimeBaseR3_DEFS.$(KBUILD_TYPE))
2604VBoxRT_DEFS.$(KBUILD_TARGET) := $(RuntimeBaseR3_DEFS.$(KBUILD_TARGET))
2605VBoxRT_SOURCES := \
2606 VBox/VBoxRTDeps.cpp \
2607 $(filter-out common/checksum/crc32.cpp, \
2608 $(if-expr defined(VBOX_WITH_ALT_HASH_CODE), $(RuntimeBaseR3_SOURCES), \
2609 $(patsubst common/checksum/alt-%,common/checksum/openssl-%,$(RuntimeBaseR3_SOURCES)) ) ) \
2610 common/checksum/crc32-zlib.cpp \
2611 common/dbg/dbgmodghidra.cpp \
2612 common/fuzz/fuzz.cpp \
2613 common/fuzz/fuzz-config.cpp \
2614 common/fuzz/fuzz-observer.cpp \
2615 common/fuzz/fuzz-target-recorder.cpp \
2616 common/fuzz/fuzzmastercmd.cpp \
2617 common/fuzz/fuzzclientcmd.cpp
2618ifneq ($(KBUILD_TARGET),win)
2619VBox/VBoxRTDeps.cpp_CXXFLAGS = -Wno-deprecated-declarations
2620endif
2621ifdef VBOX_WITH_LIBCURL
2622 VBoxRT_SOURCES += \
2623 common/misc/s3.cpp \
2624 generic/http-curl.cpp \
2625 common/rest/rest-primary-object-types.cpp \
2626 common/rest/rest-binary.cpp \
2627 common/rest/RTCRestAnyObject.cpp \
2628 common/rest/RTCRestArrayBase.cpp \
2629 common/rest/RTCRestClientApiBase.cpp \
2630 common/rest/RTCRestClientApiBaseOci.cpp \
2631 common/rest/RTCRestClientRequestBase.cpp \
2632 common/rest/RTCRestClientResponseBase.cpp \
2633 common/rest/RTCRestJsonPrimaryCursor.cpp \
2634 common/rest/RTCRestStringMapBase.cpp \
2635 common/rest/RTCRestOutputBase.cpp \
2636 common/rest/RTCRestOutputPrettyBase.cpp \
2637 common/rest/RTCRestOutputPrettyToString.cpp \
2638 common/rest/RTCRestOutputToString.cpp
2639endif
2640if defined(VBOX_WITH_DTRACE_R3) && !defined(VBOX_ONLY_VALIDATIONKIT)
2641 VBoxRT_SOURCES += \
2642 iprt.d
2643endif
2644VBoxRT_SOURCES.$(KBUILD_TARGET) = $(RuntimeBaseR3_SOURCES.$(KBUILD_TARGET))
2645VBoxRT_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeBaseR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
2646VBoxRT_SOURCES.$(KBUILD_TARGET).x86 := $(RuntimeBaseR3_SOURCES.$(KBUILD_TARGET).x86)
2647VBoxRT_SOURCES.$(KBUILD_TARGET).amd64 := $(RuntimeBaseR3_SOURCES.$(KBUILD_TARGET).amd64)
2648VBoxRT_SOURCES.$(KBUILD_TARGET_ARCH) := $(RuntimeBaseR3_SOURCES.$(KBUILD_TARGET_ARCH))
2649VBoxRT_SOURCES.x86 := $(RuntimeBaseR3_SOURCES.x86)
2650VBoxRT_SOURCES.amd64 := $(RuntimeBaseR3_SOURCES.amd64)
2651VBoxRT_SOURCES.win += \
2652 r3/win/dllmain-win.cpp \
2653 $(VBoxRT_0_OUTDIR)/VBoxRT.def
2654VBoxRT_CLEAN.win += \
2655 $(VBoxRT_0_OUTDIR)/VBoxRT.def
2656VBoxRT_INCS := $(RuntimeBaseR3_INCS)
2657VBoxRT_INCS.$(KBUILD_TARGET) := $(RuntimeBaseR3_INCS.$(KBUILD_TARGET))
2658VBoxRT_INCS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeBaseR3_INCS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
2659VBoxRT_LIBS = \
2660 $(SDK_VBOX_LZF_LIBS) \
2661 $(PATH_STAGE_LIB)/SUPR3$(VBOX_SUFF_LIB)
2662ifndef SDK_VBOX_LIBXML2_LIBS
2663 VBoxRT_LIBS += \
2664 $(PATH_STAGE_LIB)/VBox-libxml2$(VBOX_SUFF_LIB)
2665endif
2666VBoxRT_LIBS += \
2667 $(SDK_VBOX_ZLIB_LIBS)
2668ifndef SDK_VBOX_OPENSSL_LIBS
2669 VBoxRT_LIBS += \
2670 $(PATH_STAGE_LIB)/VBox-libcrypto$(VBOX_SUFF_LIB) \
2671 $(PATH_STAGE_LIB)/VBox-libssl$(VBOX_SUFF_LIB)
2672endif
2673ifdef IPRT_WITH_LZO
2674 VBoxRT_LIBS += lzo2
2675endif
2676ifdef RTALLOC_REPLACE_MALLOC
2677VBoxRT_LIBS += \
2678 $(PATH_STAGE_LIB)/DisasmR3$(VBOX_SUFF_LIB)
2679endif
2680VBoxRT_LIBS.darwin = \
2681 iconv
2682VBoxRT_LIBS.freebsd = \
2683 iconv \
2684 rt
2685VBoxRT_LIBS.haiku = \
2686 iconv
2687VBoxRT_LIBS.solaris = \
2688 kstat \
2689 contract
2690ifn1of ($(KBUILD_TARGET_ARCH), sparc32 sparc64)
2691 # SMBIOS not available on Solaris SPARC.
2692 VBoxRT_LIBS.solaris += smbios
2693endif
2694VBoxRT_LIBS.win += \
2695 $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/wbemuuid.lib \
2696 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
2697VBoxRT_LDFLAGS.darwin = \
2698 -framework IOKit \
2699 -framework CoreFoundation \
2700 -framework CoreServices \
2701 -framework Security \
2702 -framework SystemConfiguration \
2703 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxRT.dylib
2704VBoxRT_LDFLAGS.win = /MANIFEST \
2705 /delayload:user32.dll \
2706 /delayload:shell32.dll \
2707 /delayload:ole32.dll \
2708 /delayload:oleaut32.dll \
2709 /delayload:advapi32.dll
2710
2711if1of (VBoxRT,$(DLLS))
2712 $(call VBOX_SET_VER_INFO_DLL,VBoxRT,VirtualBox Runtime)
2713endif
2714
2715
2716if defined(VBOX_WITH_MORE_NT4_COMPAT_BINARIES) && "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.x86"
2717 #
2718 # Hacks for running tests on NT 4. Really ugly!
2719 #
2720 # We put most of the CRT in VBoxRT because we cannot even load msvcr100.dll
2721 # or msvcp100.dll on NT4 because of kernel32.dll dependencies. More hacks
2722 # in RuntimeR3VccTricks.
2723 #
2724 TEMPLATE_VBoxR3RuntimeDllItself = xx
2725 TEMPLATE_VBoxR3RuntimeDllItself_EXTENDS = VBoxR3RuntimeDll
2726 TEMPLATE_VBoxR3RuntimeDllItself_LIBS.win.x86 = \
2727 $(filter-out $(PATH_STAGE_LIB)/RuntimeR3VccTricks%, $(TEMPLATE_VBoxR3RuntimeDll_LIBS.win.x86))
2728 TEMPLATE_VBoxR3RuntimeDllItself_DEFS += IN_RING3 VCC_FAKES_TARGET_$(VBOX_VCC_TOOL_STEM) VCC_FAKES_TARGET=$(substr $(VBOX_VCC_TOOL_STEM),-3)
2729 TEMPLATE_VBoxR3RuntimeDllItself_SOURCES = \
2730 r3/win/vcc-fakes-kernel32.cpp \
2731 r3/win/vcc-fakes-kernel32-A.asm \
2732 r3/win/vcc-fakes-ws2_32.cpp \
2733 r3/win/vcc-fakes-ws2_32-A.asm \
2734 r3/win/vcc-fakes-ntdll.cpp \
2735 r3/win/vcc-fakes-ntdll-A.asm \
2736 r3/win/vcc-fakes-msvcrt.cpp
2737 VBoxRT_TEMPLATE = VBoxR3RuntimeDllItself
2738 VBoxRT_TEMPLATE.win.x86 = VBoxR3RuntimeDllItself
2739 VBoxRT_DEFS.win.x86 = $(TEMPLATE_VBoxR3RuntimeDll_DEFS.win.x86) \
2740 _CRTIMP_PURE="__declspec(dllexport)" VCC_FAKES_TARGET_$(VBOX_VCC_TOOL_STEM) VCC_FAKES_TARGET=$(substr $(VBOX_VCC_TOOL_STEM),-3)
2741 VBoxRT_LDFLAGS.win.x86 = /IGNORE:4049 /IGNORE:4217
2742 VBoxRT_LIBS.win.x86 = \
2743 $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)X86_LIB)/oldnames.lib \
2744 $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)X86_LIB)/libcmt.lib \
2745 $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)X86_LIB)/libcpmt.lib
2746endif
2747
2748
2749#
2750# HACK ALERT! Make testcase run during build on SELinux boxes.
2751# Create a dummy DLL that ensure that VBoxRT is installed
2752# during the DLL pass and cleaned up later.
2753#
2754ifeq ($(KBUILD_TARGET),linux)
2755 if1of (VBoxRT, $(DLLS))
2756 ifneq ($(wildcard /usr/bin/chcon),)
2757VBoxRT_INSTTYPE = none
2758VBoxRT_DEBUG_INSTTYPE = both
2759
2760VBoxRT-x86_INSTTYPE = $(NO_SUCH_VARIABLE)
2761
2762DLLS += VBoxRTDummy
2763VBoxRTDummy_TEMPLATE = VBoxR3Dll
2764VBoxRTDummy_INSTTYPE = none
2765VBoxRTDummy_LIBS = $(PATH_STAGE_BIN)/VBoxRT.so
2766VBoxRTDummy_CLEAN = $(PATH_STAGE_BIN)/VBoxRT.so
2767BLDDIRS += $(PATH_STAGE_BIN)
2768
2769$(PATH_STAGE_BIN)/VBoxRT.so: $$(VBoxRT_1_TARGET) | $$(dir $$@)
2770 $(INSTALL) $< $@
2771 chcon -t texrel_shlib_t $@ || true
2772
2773VBoxRT:: VBoxRTDummy
2774 endif # chcon present.
2775 endif # building VBoxRT
2776endif # linux
2777
2778if1of ($(DLLS), VBoxRT)
2779 # .def file for windows.
2780 $(call KB_FN_DO_PASS0_ON_TARGET,VBoxRT)
2781 $(VBoxRT_0_OUTDIR)/VBoxRT.def: \
2782 $(PATH_SUB_CURRENT)/r3/win/VBoxRT-$$(if-expr $$(KBUILD_TARGET_ARCH) == amd64,win64,win32).def \
2783 $(PATH_SUB_CURRENT)/r3/win/VBoxRT-openssl-3.0.def \
2784 $(if-expr "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.x86" && defined(VBOX_WITH_MORE_NT4_COMPAT_BINARIES)\
2785 ,$(PATH_SUB_CURRENT)/r3/win/VBoxRT-msvcr100-win32.def ,) \
2786 | $$(dir $$@) #$(PATH_SUB_CURRENT)/r3/win/VBoxRT-msvcp100-win32.def
2787 $(RM) -f -- $@
2788 $(SED) --output "$@" \
2789 $(if-expr "$(KBUILD_TARGET_ARCH)" == "x86" ,-e "/not-x86/d", -e "/only-x86/d") \
2790 $(if-expr "$(KBUILD_TARGET_ARCH)" == "amd64",-e "/not-amd64/d",-e "/only-amd64/d") \
2791 $(if-expr "$(KBUILD_TARGET_ARCH)" == "arm64",-e "/not-arm64/d",-e "/only-arm64/d") \
2792 $(if-expr "$(substr $(if-expr $(KBUILD_TARGET) != 'win',$(VBOX_GCC_std), $(VBOX_VCC_std)),-2)" >= "17" \
2793 ,-e "/before-noexcept/d", -e "/after-noexcept/d") \
2794 $^
2795 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
2796 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxRT_0_OUTDIR)/VBoxRT.def)
2797endif
2798
2799
2800#
2801# VBoxRT-x86 - 32-bit version of VBoxRT
2802#
2803VBoxRT-x86_EXTENDS = VBoxRT
2804VBoxRT-x86_TEMPLATE = VBoxR3Dll-x86
2805VBoxRT-x86_INST.win = $(INST_DLL)x86/
2806VBoxRT-x86_SDKS = VBOX_LIBXML2
2807ifdef VBOX_WITH_LIBCURL
2808 VBoxRT-x86_SDKS += VBOX_LIBCURL-x86
2809endif
2810VBoxRT-x86_SDKS += VBOX_OPENSSL-x86
2811
2812VBoxRT-x86_LIBS = \
2813 $(SDK_VBOX_LZF_LIBS-x86)
2814if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
2815VBoxRT-x86_LIBS += \
2816 $(PATH_STAGE_LIB)/SUPR3-x86$(VBOX_SUFF_LIB)
2817endif
2818ifndef SDK_VBOX_LIBXML2_LIBS
2819 VBoxRT-x86_LIBS += \
2820 $(PATH_STAGE_LIB)/VBox-libxml2-x86$(VBOX_SUFF_LIB)
2821endif
2822VBoxRT-x86_LIBS += \
2823 $(SDK_VBOX_ZLIB_LIBS-x86)
2824ifndef SDK_VBOX_OPENSSL_LIBS
2825 VBoxRT-x86_LIBS += \
2826 $(PATH_STAGE_LIB)/VBox-libcrypto-x86$(VBOX_SUFF_LIB) \
2827 $(PATH_STAGE_LIB)/VBox-libssl-x86$(VBOX_SUFF_LIB)
2828endif
2829ifdef IPRT_WITH_LZO
2830 VBoxRT-x86_LIBS += lzo2
2831endif
2832VBoxRT-x86_LIBS.darwin = \
2833 iconv
2834VBoxRT-x86_LIBS.freebsd = \
2835 iconv \
2836 rt
2837VBoxRT-x86_LIBS.haiku = \
2838 iconv
2839VBoxRT-x86_LIBS.solaris = \
2840 kstat \
2841 contract
2842ifn1of ($(KBUILD_TARGET_ARCH), sparc32 sparc64)
2843 # SMBIOS not available on Solaris SPARC.
2844 VBoxRT-x86_LIBS.solaris += smbios
2845endif
2846VBoxRT-x86_LIBS.win += \
2847 $(PATH_SDK_$(VBOX_WINPSDK)_LIB.x86)/wbemuuid.lib \
2848 $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)X86_LIB)/delayimp.lib
2849
2850VBoxRT-x86_SOURCES.win = $(filter-out %.def %.rc,$(VBoxRT_SOURCES.win)) \
2851 $(VBoxRT-x86_0_OUTDIR)/VBoxRT-x86.def
2852VBoxRT-x86_CLEAN += $(VBoxRT-x86_0_OUTDIR)/VBoxRT-x86.def
2853
2854if1of (VBoxRT-x86,$(DLLS))
2855 $(call VBOX_SET_VER_INFO_DLL,VBoxRT-x86,VirtualBox 32-bit Runtime)
2856endif
2857
2858if1of ($(DLLS), VBoxRT-x86)
2859 # .def file for windows.
2860 $(call KB_FN_DO_PASS0_ON_TARGET,VBoxRT-x86)
2861 $(VBoxRT-x86_0_OUTDIR)/VBoxRT-x86.def: \
2862 $(VBOX_PATH_RUNTIME_SRC)/r3/win/VBoxRT-win32.def \
2863 | $$(dir $$@) # Hopefully no need to export openssl here.
2864 $(RM) -f -- $@
2865 $(SED) --output "$@" \
2866 -e "/not-x86/d" \
2867 -e "/only-amd64/d" \
2868 -e "/only-arm64/d" \
2869 $(if-expr "$(substr $(if-expr $(KBUILD_TARGET) != 'win',$(VBOX_GCC_std), $(VBOX_VCC_std)),-2)" >= "17" \
2870 ,-e "/before-noexcept/d", -e "/after-noexcept/d") \
2871 $(VBOX_PATH_RUNTIME_SRC)/r3/win/VBoxRT-win32.def
2872 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
2873 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxRT-x86_0_OUTDIR)/VBoxRT-x86.def)
2874endif
2875
2876#
2877# VBoxRTImp - Import library/hack.
2878#
2879ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.amd64)
2880$(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxRTImp,VBoxRT,VBox/VBoxRTImp.def VBox/VBoxRTImp-vcc64.def r3/win/VBoxRT-win64.def)
2881else ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.x86)
2882$(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxRTImp,VBoxRT,VBox/VBoxRTImp.def VBox/VBoxRTImp-vcc32.def r3/win/VBoxRT-win32.def)
2883else
2884$(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxRTImp,VBoxRT,VBox/VBoxRTImp.def VBox/VBoxRTImp-gcc.def)
2885endif
2886
2887
2888if1of ($(KBUILD_TARGET),win linux darwin) # remove later
2889if1of ($(KBUILD_TARGET_ARCH),x86 amd64) ## @todo bugref:9898
2890if1of (VBoxRT,$(DLLS))
2891 #
2892 # VBoxRTImpCheck - Import library check.
2893 #
2894 PROGRAMS += VBoxRTStableCheck
2895 VBoxRTStableCheck_TEMPLATE = VBOXR3TSTEXE
2896 VBoxRTStableCheck_SOURCES = \
2897 VBox/VBoxRTStableCheck.cpp \
2898 $(VBoxRTStableCheck_0_OUTDIR)/VBoxRTStableCheckA.asm
2899 VBoxRTStableCheck_LIBS = \
2900 $(LIB_RUNTIME)
2901 VBoxRTStableCheck_CLEAN = \
2902 $(VBoxRTStableCheck_0_OUTDIR)/VBoxRTStableCheckA.asm
2903 $(call KB_FN_DO_PASS0_ON_TARGET,VBoxRTStableCheck)
2904
2905 ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.amd64)
2906 $(VBoxRTStableCheck_0_OUTDIR)/VBoxRTStableCheckA.asm: \
2907 $(PATH_SUB_CURRENT)/VBox/DefToAsmExterns.sed \
2908 $(PATH_SUB_CURRENT)/VBox/VBoxRTImp.def \
2909 $(PATH_SUB_CURRENT)/VBox/VBoxRTImp-vcc64.def \
2910 $(PATH_SUB_CURRENT)/r3/win/VBoxRT-win64.def \
2911 | $$(dir $$@)
2912 else ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.x86)
2913 $(VBoxRTStableCheck_0_OUTDIR)/VBoxRTStableCheckA.asm: \
2914 $(PATH_SUB_CURRENT)/VBox/DefToAsmExternsVcc32.sed \
2915 $(PATH_SUB_CURRENT)/VBox/VBoxRTImp.def \
2916 $(PATH_SUB_CURRENT)/VBox/VBoxRTImp-vcc32.def \
2917 $(PATH_SUB_CURRENT)/r3/win/VBoxRT-win32.def | $$(dir $$@)
2918 else
2919 $(VBoxRTStableCheck_0_OUTDIR)/VBoxRTStableCheckA.asm: \
2920 $(PATH_SUB_CURRENT)/VBox/DefToAsmExterns.sed \
2921 $(PATH_SUB_CURRENT)/VBox/VBoxRTImp.def \
2922 $(PATH_SUB_CURRENT)/VBox/VBoxRTImp-gcc.def | $$(dir $$@)
2923 endif
2924 $(APPEND) -tn "$@" '%include "iprt/asmdefs.mac"' ''
2925 $(SED) --append "$@" \
2926 -e "/not-$(KBUILD_TARGET)/d" \
2927 $(if-expr "$(KBUILD_TARGET)" == "linux" ,, -e "/only-linux/d") \
2928 $(if-expr "$(KBUILD_TARGET)" == "win" ,, -e "/only-win/d") \
2929 $(if-expr "$(KBUILD_TARGET)" == "darwin",, -e "/only-darwin/d") \
2930 $(if-expr "$(KBUILD_TARGET_ARCH)" == "x86" ,-e "/not-x86/d", -e "/only-x86/d") \
2931 $(if-expr "$(KBUILD_TARGET_ARCH)" == "amd64",-e "/not-amd64/d",-e "/only-amd64/d") \
2932 $(if-expr "$(KBUILD_TARGET_ARCH)" == "arm64",-e "/not-arm64/d",-e "/only-arm64/d") \
2933 $(if-expr "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "darwin.arm64",, -e "/only-darwin.arm64/d") \
2934 $(if-expr "$(substr $(if-expr $(KBUILD_TARGET) != 'win',$(VBOX_GCC_std), $(VBOX_VCC_std)),-2)" >= "17" \
2935 ,-e "/before-noexcept/d", -e "/after-noexcept/d") \
2936 -f "$<" $(filter %.def, $^)
2937 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
2938 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxRTStableCheck_0_OUTDIR)/VBoxRTStableCheckA.asm)
2939
2940endif
2941endif ## @todo bugref:9898
2942endif # remove later
2943
2944
2945#
2946# RuntimeR3NoCRTGCC - CRT replacement lib for VBoxREM.
2947# This is used together with VBoxRT.
2948#
2949RuntimeR3NoCRTGCC_TEMPLATE = VBoxNoCrtGccLib
2950RuntimeR3NoCRTGCC_LIBSUFF = $(VBOX_SUFF_LIB)
2951RuntimeR3NoCRTGCC_DEFS = RT_WITH_NOCRT_ALIASES
2952ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
2953 RuntimeR3NoCRTGCC_DEFS += RT_NO_GIP
2954endif
2955RuntimeR3NoCRTGCC_INCS = include
2956RuntimeR3NoCRTGCC_SOURCES := \
2957 common/misc/sanity-cpp.cpp \
2958 common/misc/sanity-c.c \
2959 \
2960 $(RuntimeNoCrt_SOURCES)
2961
2962if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
2963RuntimeR3NoCRTGCC_SOURCES += \
2964 common/math/ceill.asm \
2965 common/math/cosl.asm \
2966 common/math/fabs.asm \
2967 common/math/fabsf.asm \
2968 common/math/fabsl.asm \
2969 common/math/floor.asm \
2970 common/math/floorf.asm \
2971 common/math/floorl.asm \
2972 common/math/ldexpl.asm \
2973 common/math/llrint.asm \
2974 common/math/llrintf.asm \
2975 common/math/llrintl.asm \
2976 common/math/logl.asm \
2977 common/math/lrint.asm \
2978 common/math/lrintf.asm \
2979 common/math/lrintl.asm \
2980 common/math/remainder.asm \
2981 common/math/remainderf.asm \
2982 common/math/remainderl.asm \
2983 common/math/sinl.asm \
2984 common/math/tanl.asm \
2985 common/math/trunc.asm \
2986 common/math/truncf.asm \
2987 common/math/truncl.asm
2988endif
2989
2990RuntimeR3NoCRTGCC_SOURCES.x86 = \
2991 common/math/x86/fenv-x86.c \
2992 common/math/gcc/adddi3.c \
2993 common/math/gcc/anddi3.c \
2994 common/math/gcc/ashldi3.c \
2995 common/math/gcc/ashrdi3.c \
2996 common/math/gcc/cmpdi2.c \
2997 common/math/gcc/divdi3.c \
2998 common/math/gcc/divmoddi4.c \
2999 common/math/gcc/iordi3.c \
3000 common/math/gcc/lshldi3.c \
3001 common/math/gcc/lshrdi3.c \
3002 common/math/gcc/moddi3.c \
3003 common/math/gcc/muldi3.c \
3004 common/math/gcc/negdi2.c \
3005 common/math/gcc/notdi2.c \
3006 common/math/gcc/qdivrem.c \
3007 common/math/gcc/subdi3.c \
3008 common/math/gcc/ucmpdi2.c \
3009 common/math/gcc/udivdi3.c \
3010 common/math/gcc/udivmoddi4.c \
3011 common/math/gcc/umoddi3.c \
3012 common/math/gcc/xordi3.c
3013
3014#
3015# RuntimeR3NoCRT - For windows applications w/o any runtime library.
3016# Experimental.
3017#
3018RuntimeR3NoCrt_TEMPLATE := VBoxR3StaticNoCrt
3019RuntimeR3NoCrt_INCS := include
3020RuntimeR3NoCrt_DEFS := \
3021 RT_NO_STRICT \
3022 IPRT_NO_ALLOCA_TROUBLE \
3023 IPRT_GETOPT_WITHOUT_NETWORK_ADDRESSES \
3024 IPRT_MINIMAL_STREAM \
3025 IPRT_NO_FLOAT_FORMATTING
3026RuntimeR3NoCrt_SOURCES := \
3027 common/string/straprintf.cpp \
3028 common/string/strformat.cpp \
3029 common/string/RTStrFormat.cpp \
3030 common/string/strformatnum.cpp \
3031 common/string/strformatrt.cpp \
3032 common/string/strformattype.cpp \
3033 common/string/strprintf.cpp \
3034 common/string/strprintf-ellipsis.cpp \
3035 common/string/strprintf2.cpp \
3036 common/string/strprintf2-ellipsis.cpp \
3037 common/string/stringalloc.cpp \
3038 common/string/strtonum.cpp \
3039 common/string/RTStrNLen.cpp \
3040 common/string/RTStrCmp.cpp \
3041 common/string/RTStrNCmp.cpp \
3042 common/string/RTStrICmpAscii.cpp \
3043 common/string/RTStrNICmpAscii.cpp \
3044 common/string/RTStrCopy.cpp \
3045 common/string/RTStrEnd.asm \
3046 common/string/RTUtf16Copy.cpp \
3047 common/string/utf-16.cpp \
3048 common/string/utf-8.cpp \
3049 common/path/RTPathFilename.cpp \
3050 common/misc/getopt.cpp \
3051 common/misc/getoptargv.cpp \
3052 common/misc/message.cpp \
3053 common/err/errmsg.cpp \
3054 generic/uuid-generic.cpp \
3055 generic/rtStrFormatKernelAddress-generic.cpp
3056
3057RuntimeR3NoCrt_SOURCES.x86 := \
3058 common/string/memcpy.asm \
3059 common/string/memchr.asm \
3060 common/string/memcmp.asm \
3061 common/string/memmove.asm \
3062 common/string/memset.asm \
3063 common/string/strlen.asm \
3064 common/string/strchr.asm \
3065 common/string/strcmp.asm \
3066 common/string/strncmp.asm
3067RuntimeR3NoCrt_SOURCES.amd64 := \
3068 common/string/memcpy.asm \
3069 common/string/memchr.asm \
3070 common/string/memcmp.asm \
3071 common/string/memmove.asm \
3072 common/string/memset.asm \
3073 common/string/strlen.asm \
3074 common/string/strchr.asm \
3075 common/string/strcmp.asm \
3076 common/string/strncmp.asm \
3077
3078RuntimeR3NoCrt_SOURCES.win := \
3079 r3/win/nocrt-startup-exe-win.cpp \
3080 r3/win/nocrt-startup-common-win.cpp \
3081 r3/win/nocrt-alloc-win.cpp \
3082 r3/win/nocrt-streams-win.cpp \
3083 \
3084 win/errmsgwin.cpp
3085
3086#
3087# RuntimeR0 - Ring-0 library for VMMR0.
3088#
3089RuntimeR0_TEMPLATE = VBoxR0
3090RuntimeR0_DEFS = IN_RT_R0 RT_WITH_VBOX NOFILEID
3091ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
3092 RuntimeR0_DEFS += RT_NO_GIP
3093endif
3094if defined(VBOX_WITH_DTRACE_R0) && !defined(VBOX_ONLY_VALIDATIONKIT)
3095 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
3096 RuntimeR0_DEFS += IPRT_WITH_DTRACE IPRT_DTRACE_PREFIX=VBOXVMM_ IPRT_DTRACE_INCLUDE="dtrace/VBoxVMM.h"
3097 else
3098 RuntimeR0_DEFS += IPRT_WITH_DTRACE IPRT_DTRACE_PREFIX=VBOXVMM_ IPRT_DTRACE_INCLUDE=\"dtrace/VBoxVMM.h\"
3099 endif
3100endif
3101RuntimeR0_INCS = include
3102RuntimeR0_SOURCES := \
3103 $(if $(VBOX_ONLY_VALIDATIONKIT),,../VMM/VBoxVMM.d) \
3104 common/checksum/crc32c.cpp \
3105 common/log/logellipsis.cpp \
3106 common/log/logrelellipsis.cpp \
3107 common/log/logcom.cpp \
3108 common/log/logformat.cpp \
3109 common/log/tracebuf.cpp \
3110 common/log/tracedefault.cpp \
3111 common/log/RTLogCreateEx.cpp \
3112 common/log/RTLogSetR0ThreadNameF.cpp \
3113 common/misc/RTAssertMsg1Weak.cpp \
3114 common/misc/RTAssertMsg2.cpp \
3115 common/misc/RTAssertMsg2Add.cpp \
3116 common/misc/RTAssertMsg2AddWeak.cpp \
3117 common/misc/RTAssertMsg2AddWeakV.cpp \
3118 common/misc/RTAssertMsg2Weak.cpp \
3119 common/misc/RTAssertMsg2WeakV.cpp \
3120 common/misc/buildconfig.cpp \
3121 common/misc/once.cpp \
3122 common/misc/sanity-c.c \
3123 common/misc/sanity-cpp.cpp \
3124 common/misc/term.cpp \
3125 common/path/RTPathFilename.cpp \
3126 common/rand/rand.cpp \
3127 common/rand/randadv.cpp \
3128 common/rand/randparkmiller.cpp \
3129 common/string/strprintf-ellipsis.cpp \
3130 common/string/strprintf2-ellipsis.cpp \
3131 common/string/strhash1.cpp \
3132 common/string/strncmp.cpp \
3133 common/string/strpbrk.cpp \
3134 common/string/strtonum.cpp \
3135 common/string/RTStrCat.cpp \
3136 common/string/RTStrCatEx.cpp \
3137 common/string/RTStrCatP.cpp \
3138 common/string/RTStrCatPEx.cpp \
3139 common/string/RTStrCopyEx.cpp \
3140 common/string/RTStrCopyP.cpp \
3141 common/string/RTStrCopyPEx.cpp \
3142 common/string/RTStrCmp.cpp \
3143 common/string/RTStrICmpAscii.cpp \
3144 common/string/RTStrNICmpAscii.cpp \
3145 common/string/RTStrNLen.cpp \
3146 common/string/RTStrNLenEx.cpp \
3147 common/table/avlgcptr.cpp \
3148 common/table/avlhcphys.cpp \
3149 common/table/avllu32.cpp \
3150 common/table/avlogcphys.cpp \
3151 common/table/avlogcptr.cpp \
3152 common/table/avlohcphys.cpp \
3153 common/table/avloioport.cpp \
3154 common/table/avlpv.cpp \
3155 common/table/avlrogcphys.cpp \
3156 common/table/avlrogcptr.cpp \
3157 common/table/avlroioport.cpp \
3158 common/table/avlroogcptr.cpp \
3159 common/table/avlu32.cpp \
3160 common/table/avlou32.cpp \
3161 common/time/timesup.cpp \
3162 generic/RTAssertShouldPanic-generic.cpp \
3163 generic/critsect-generic.cpp \
3164 generic/critsectrw-generic.cpp \
3165 generic/RTRandAdvCreateSystemFaster-generic.cpp \
3166 generic/RTRandAdvCreateSystemTruer-generic.cpp \
3167 \
3168 $(RuntimeNoCrt_SOURCES)
3169
3170if1of ($(KBUILD_TARGET), darwin solaris freebsd os2)
3171RuntimeR0_SOURCES += \
3172 common/math/gcc/adddi3.c \
3173 common/math/gcc/anddi3.c \
3174 common/math/gcc/ashldi3.c \
3175 common/math/gcc/ashrdi3.c \
3176 common/math/gcc/cmpdi2.c \
3177 common/math/gcc/divdi3.c \
3178 common/math/gcc/divmoddi4.c \
3179 common/math/gcc/iordi3.c \
3180 common/math/gcc/lshldi3.c \
3181 common/math/gcc/lshrdi3.c \
3182 common/math/gcc/moddi3.c \
3183 common/math/gcc/muldi3.c \
3184 common/math/gcc/negdi2.c \
3185 common/math/gcc/notdi2.c \
3186 common/math/gcc/qdivrem.c \
3187 common/math/gcc/subdi3.c \
3188 common/math/gcc/ucmpdi2.c \
3189 common/math/gcc/udivdi3.c \
3190 common/math/gcc/udivmoddi4.c \
3191 common/math/gcc/umoddi3.c \
3192 common/math/gcc/xordi3.c
3193endif
3194
3195RuntimeR0_SOURCES.x86 += \
3196 common/asm/ASMCpuIdExSlow.asm \
3197 common/asm/ASMAtomicUoAndU64.asm \
3198 common/asm/ASMAtomicUoAndU32.asm \
3199 common/asm/ASMAtomicUoDecU32.asm \
3200 common/asm/ASMAtomicUoIncU32.asm \
3201 common/asm/ASMAtomicUoOrU64.asm \
3202 common/asm/ASMAtomicUoOrU32.asm \
3203 common/asm/ASMAtomicUoXorU32.asm \
3204 common/asm/ASMMemFirstMismatchingU8.asm \
3205 common/asm/ASMGetXcr0.asm \
3206 common/asm/ASMSetXcr0.asm \
3207 common/asm/ASMXSave.asm \
3208 common/asm/ASMXRstor.asm \
3209 common/asm/ASMFxSave.asm \
3210 common/asm/ASMFxRstor.asm \
3211 common/asm/ASMRdMsrEx.asm \
3212 common/asm/ASMWrMsrEx.asm \
3213 common/string/RTStrEnd.asm
3214RuntimeR0_SOURCES.amd64 += \
3215 common/asm/ASMCpuIdExSlow.asm \
3216 common/asm/ASMAtomicUoAndU64.asm \
3217 common/asm/ASMAtomicUoAndU32.asm \
3218 common/asm/ASMAtomicUoDecU32.asm \
3219 common/asm/ASMAtomicUoIncU32.asm \
3220 common/asm/ASMAtomicUoOrU64.asm \
3221 common/asm/ASMAtomicUoOrU32.asm \
3222 common/asm/ASMAtomicUoXorU32.asm \
3223 common/asm/ASMMemFirstMismatchingU8.asm \
3224 common/asm/ASMGetXcr0.asm \
3225 common/asm/ASMSetXcr0.asm \
3226 common/asm/ASMXSave.asm \
3227 common/asm/ASMXRstor.asm \
3228 common/asm/ASMFxSave.asm \
3229 common/asm/ASMFxRstor.asm \
3230 common/asm/ASMRdMsrEx.asm \
3231 common/asm/ASMWrMsrEx.asm \
3232 common/math/RTUInt128MulByU64Ex.asm \
3233 common/string/RTStrEnd.asm
3234RuntimeR0_SOURCES.arm32 += \
3235 common/string/RTStrEnd.cpp
3236RuntimeR0_SOURCES.arm64 += \
3237 common/string/RTStrEnd.cpp
3238RuntimeR0_SOURCES.sparc32 += \
3239 common/string/RTStrEnd.cpp
3240RuntimeR0_SOURCES.sparc64 += \
3241 common/string/RTStrEnd.cpp
3242
3243#if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
3244# RuntimeR0_SOURCES += common/time/timesupA.asm
3245#else
3246 RuntimeR0_SOURCES += common/time/timesupref.cpp
3247#endif
3248
3249RuntimeR0_SOURCES.win.amd64 := $(RuntimeWin64ASM_SOURCES)
3250RuntimeR0_SOURCES.win.x86 := $(RuntimeWin32ASM_SOURCES)
3251RuntimeR0_SOURCES.win = \
3252 nt/NtProcessStartup-stub.cpp
3253
3254RuntimeR0_SOURCES.os2 = \
3255 os2/sys0.asm
3256
3257
3258#
3259# RuntimeR0Stub - Ring-0 context startup stub for Windows and Solaris.
3260#
3261RuntimeR0Stub_TEMPLATE = $(if-expr "$(KBUILD_TARGET)" == "solaris",VBoxR0DrvLib,VBoxR0)
3262RuntimeR0Stub_SOURCES.win = \
3263 nt/NtProcessStartup-stub.cpp
3264RuntimeR0Stub_SOURCES.solaris = \
3265 r0drv/solaris/modulestub-r0drv-solaris.c
3266
3267
3268#
3269# RuntimeR0Drv - Ring-0 library for host drivers.
3270#
3271RuntimeR0Drv_TEMPLATE = VBoxR0DrvLib
3272RuntimeR0Drv_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK) $(VBOX_WINPSDK_INCS) VBOX_OPENSSL
3273RuntimeR0Drv_DEFS = IN_RT_R0 RT_WITH_VBOX RT_WITHOUT_NOCRT_WRAPPERS RT_NO_EXPORT_SYMBOL NOFILEID
3274RuntimeR0Drv_DEFS.win = IN_SUP_R0 LDR_ONLY_PE IPRT_WITHOUT_DIGEST_MD4
3275RuntimeR0Drv_DEFS.darwin= IN_SUP_R0 LDR_ONLY_MACHO IPRT_WITHOUT_DIGEST_MD4 IN_RING0_DRV_ON_DARWIN
3276if ($(VBOX_SOLARIS_11_UPDATE_VERSION) > 2 \
3277 || ($(VBOX_SOLARIS_11_UPDATE_VERSION) == 2 && $(VBOX_SOLARIS_11_BUILD_VERSION) >= 22))
3278RuntimeR0Drv_DEFS.solaris += VBOX_NEW_CRASH_DUMP_FORMAT
3279endif
3280
3281RuntimeR0Drv_INCS := $(PATH_SUB_CURRENT) include
3282RuntimeR0Drv_INCS.freebsd = \
3283 $(PATH_STAGE)/gen-sys-hdrs
3284RuntimeR0Drv_INCS.solaris = \
3285 r0drv/solaris/vbi/i86pc \
3286 r0drv/solaris/vbi/i86pc/sys
3287
3288RuntimeR0Drv_SOURCES = \
3289 common/alloc/alloc.cpp \
3290 common/alloc/heapsimple.cpp \
3291 common/alloc/heapoffset.cpp \
3292 common/checksum/alt-md5.cpp \
3293 common/checksum/crc32.cpp \
3294 common/checksum/crc64.cpp \
3295 common/checksum/ipv4.cpp \
3296 common/checksum/ipv6.cpp \
3297 common/err/RTErrConvertToErrno.cpp \
3298 common/err/RTErrConvertFromErrno.cpp \
3299 common/err/errinfo.cpp \
3300 common/log/log.cpp \
3301 common/log/logellipsis.cpp \
3302 common/log/logrel.cpp \
3303 common/log/logrelellipsis.cpp \
3304 common/log/logcom.cpp \
3305 common/log/logformat.cpp \
3306 common/log/tracebuf.cpp \
3307 common/log/tracedefault.cpp \
3308 common/log/RTLogCreateEx.cpp \
3309 common/misc/RTAssertMsg1Weak.cpp \
3310 common/misc/RTAssertMsg2.cpp \
3311 common/misc/RTAssertMsg2Add.cpp \
3312 common/misc/RTAssertMsg2AddWeak.cpp \
3313 common/misc/RTAssertMsg2AddWeakV.cpp \
3314 common/misc/RTAssertMsg2Weak.cpp \
3315 common/misc/RTAssertMsg2WeakV.cpp \
3316 common/misc/assert.cpp \
3317 common/misc/buildconfig.cpp \
3318 common/misc/handletable.cpp \
3319 common/misc/handletablectx.cpp \
3320 common/misc/handletablesimple.cpp \
3321 common/misc/once.cpp \
3322 common/misc/sanity-c.c \
3323 common/misc/sanity-cpp.cpp \
3324 common/misc/term.cpp \
3325 common/misc/RTMemWipeThoroughly.cpp \
3326 common/path/rtPathVolumeSpecLen.cpp \
3327 common/path/RTPathAbsDup.cpp \
3328 common/path/RTPathAbsEx.cpp \
3329 common/path/RTPathAbsExDup.cpp \
3330 common/path/RTPathAppend.cpp \
3331 common/path/RTPathAppendEx.cpp \
3332 common/path/RTPathExt.cpp \
3333 common/path/RTPathFilename.cpp \
3334 common/path/RTPathHasExt.cpp \
3335 common/path/RTPathHasPath.cpp \
3336 common/path/RTPathParseSimple.cpp \
3337 common/path/RTPathRealDup.cpp \
3338 common/path/RTPathStripExt.cpp \
3339 common/path/RTPathStripFilename.cpp \
3340 common/path/RTPathStripTrailingSlash.cpp \
3341 common/rand/rand.cpp \
3342 common/rand/randadv.cpp \
3343 common/rand/randparkmiller.cpp \
3344 common/string/RTStrCat.cpp \
3345 common/string/RTStrCatEx.cpp \
3346 common/string/RTStrCatP.cpp \
3347 common/string/RTStrCatPEx.cpp \
3348 common/string/RTStrCmp.cpp \
3349 common/string/RTStrCopy.cpp \
3350 common/string/RTStrCopyEx.cpp \
3351 common/string/RTStrCopyP.cpp \
3352 common/string/RTStrCopyPEx.cpp \
3353 common/string/RTStrICmpAscii.cpp \
3354 common/string/RTStrNICmpAscii.cpp \
3355 common/string/RTStrNCmp.cpp \
3356 common/string/RTStrNLen.cpp \
3357 common/string/RTStrNLenEx.cpp \
3358 common/string/RTUtf16ICmpAscii.cpp \
3359 common/string/RTUtf16NICmpAscii.cpp \
3360 common/string/straprintf.cpp \
3361 common/string/strformat.cpp \
3362 common/string/RTStrFormat.cpp \
3363 common/string/strformatnum.cpp \
3364 common/string/strformatrt.cpp \
3365 common/string/strformattype.cpp \
3366 common/string/strhash1.cpp \
3367 common/string/strprintf.cpp \
3368 common/string/strprintf-ellipsis.cpp \
3369 common/string/strprintf2.cpp \
3370 common/string/strprintf2-ellipsis.cpp \
3371 common/string/strtonum.cpp \
3372 common/string/stringalloc.cpp \
3373 common/string/unidata-flags.cpp \
3374 common/string/unidata-lower.cpp \
3375 common/string/unidata-upper.cpp \
3376 common/string/utf-8.cpp \
3377 common/string/utf-8-case.cpp \
3378 common/string/utf-8-case2.cpp \
3379 common/string/utf-16.cpp \
3380 common/string/utf-16-case.cpp \
3381 common/string/utf-16-latin-1.cpp \
3382 common/string/utf-16-printf.cpp \
3383 common/table/avlpv.cpp \
3384 common/table/avlu32.cpp \
3385 common/table/avllu32.cpp \
3386 common/time/time.cpp \
3387 generic/RTLogWriteStdErr-stub-generic.cpp \
3388 generic/RTLogWriteUser-generic.cpp \
3389 generic/RTMpGetArraySize-generic.cpp \
3390 generic/RTRandAdvCreateSystemFaster-generic.cpp \
3391 generic/RTSemEventWait-2-ex-generic.cpp \
3392 generic/RTSemEventWaitNoResume-2-ex-generic.cpp \
3393 generic/RTSemEventMultiWait-2-ex-generic.cpp \
3394 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
3395 generic/critsect-generic.cpp \
3396 generic/critsectrw-generic.cpp \
3397 generic/errvars-generic.cpp \
3398 generic/uuid-generic.cpp \
3399 r0drv/alloc-r0drv.cpp \
3400 r0drv/initterm-r0drv.cpp \
3401 r0drv/generic/semspinmutex-r0drv-generic.c \
3402 r0drv/RTR0DbgKrnlInfoGetSymbol.cpp \
3403 VBox/log-vbox.cpp \
3404
3405RuntimeR0Drv_SOURCES.amd64 = \
3406 common/asm/ASMCpuIdExSlow.asm \
3407 common/asm/ASMMemFirstMismatchingU8.asm \
3408 common/asm/ASMRdMsrEx.asm \
3409 common/asm/ASMWrMsrEx.asm \
3410 common/math/bignum-amd64-x86.asm \
3411 common/math/RTUInt128MulByU64.asm \
3412 common/math/RTUInt128MulByU64Ex.asm \
3413 common/string/RTStrEnd.asm
3414RuntimeR0Drv_SOURCES.x86 = \
3415 common/asm/ASMCpuIdExSlow.asm \
3416 common/asm/ASMMemFirstMismatchingU8.asm \
3417 common/asm/ASMRdMsrEx.asm \
3418 common/asm/ASMWrMsrEx.asm \
3419 common/math/bignum-amd64-x86.asm \
3420 common/string/RTStrEnd.asm
3421RuntimeR0Drv_SOURCES.arm32 += \
3422 common/string/RTStrEnd.cpp
3423RuntimeR0Drv_SOURCES.arm64 += \
3424 common/string/RTStrEnd.cpp
3425RuntimeR0Drv_SOURCES.sparc32 += \
3426 common/string/RTStrEnd.cpp
3427RuntimeR0Drv_SOURCES.sparc64 += \
3428 common/string/RTStrEnd.cpp
3429
3430RuntimeR0Drv_SOURCES.linux = \
3431 common/misc/thread.cpp \
3432 common/string/strpbrk.cpp \
3433 generic/RTAssertShouldPanic-generic.cpp \
3434 generic/RTLogWriteStdOut-stub-generic.cpp \
3435 generic/RTMpGetCoreCount-generic.cpp \
3436 generic/mppresent-generic.cpp \
3437 generic/rtStrFormatKernelAddress-generic.cpp \
3438 r0drv/linux/alloc-r0drv-linux.c \
3439 r0drv/linux/assert-r0drv-linux.c \
3440 r0drv/linux/initterm-r0drv-linux.c \
3441 r0drv/linux/memobj-r0drv-linux.c \
3442 r0drv/linux/memuserkernel-r0drv-linux.c \
3443 r0drv/linux/mp-r0drv-linux.c \
3444 r0drv/linux/mpnotification-r0drv-linux.c \
3445 r0drv/linux/process-r0drv-linux.c \
3446 r0drv/linux/RTLogWriteDebugger-r0drv-linux.c \
3447 r0drv/linux/semevent-r0drv-linux.c \
3448 r0drv/linux/semeventmulti-r0drv-linux.c \
3449 r0drv/linux/semfastmutex-r0drv-linux.c \
3450 r0drv/linux/semmutex-r0drv-linux.c \
3451 r0drv/linux/spinlock-r0drv-linux.c \
3452 r0drv/linux/thread-r0drv-linux.c \
3453 r0drv/linux/thread2-r0drv-linux.c \
3454 r0drv/linux/threadctxhooks-r0drv-linux.c \
3455 r0drv/linux/time-r0drv-linux.c \
3456 r0drv/linux/timer-r0drv-linux.c \
3457 r0drv/memobj-r0drv.cpp \
3458 r0drv/mpnotification-r0drv.c \
3459 r0drv/powernotification-r0drv.c
3460
3461RuntimeR0Drv_SOURCES.win = \
3462 common/ldr/ldr.cpp \
3463 common/ldr/ldrEx.cpp \
3464 common/ldr/ldrPE.cpp \
3465 common/asn1/asn1-basics.cpp \
3466 common/asn1/asn1-dump.cpp \
3467 common/asn1/asn1-cursor.cpp \
3468 common/asn1/asn1-default-allocator.cpp \
3469 common/asn1/asn1-safer-allocator.cpp \
3470 common/asn1/asn1-encode.cpp \
3471 common/asn1/asn1-ut-bitstring.cpp \
3472 common/asn1/asn1-ut-bitstring-decode.cpp \
3473 common/asn1/asn1-ut-boolean.cpp \
3474 common/asn1/asn1-ut-boolean-decode.cpp \
3475 common/asn1/asn1-ut-core.cpp \
3476 common/asn1/asn1-ut-core-decode.cpp \
3477 common/asn1/asn1-ut-dyntype.cpp \
3478 common/asn1/asn1-ut-dyntype-decode.cpp \
3479 common/asn1/asn1-ut-integer.cpp \
3480 common/asn1/asn1-ut-integer-decode.cpp \
3481 common/asn1/asn1-ut-null.cpp \
3482 common/asn1/asn1-ut-null-decode.cpp \
3483 common/asn1/asn1-ut-objid.cpp \
3484 common/asn1/asn1-ut-objid-decode.cpp \
3485 common/asn1/asn1-ut-octetstring.cpp \
3486 common/asn1/asn1-ut-octetstring-decode.cpp \
3487 common/asn1/asn1-ut-string.cpp \
3488 common/asn1/asn1-ut-string-decode.cpp \
3489 common/asn1/asn1-ut-time.cpp \
3490 common/asn1/asn1-ut-time-decode.cpp \
3491 common/crypto/digest-core.cpp \
3492 common/crypto/digest-builtin.cpp \
3493 common/crypto/key.cpp \
3494 common/crypto/rsa-asn1-decoder.cpp \
3495 common/crypto/rsa-core.cpp \
3496 common/crypto/rsa-init.cpp \
3497 common/crypto/rsa-sanity.cpp \
3498 common/crypto/pkcs7-asn1-decoder.cpp \
3499 common/crypto/pkcs7-core.cpp \
3500 common/crypto/pkcs7-init.cpp \
3501 common/crypto/pkcs7-sanity.cpp \
3502 common/crypto/pkcs7-verify.cpp \
3503 common/crypto/pkix-signature-builtin.cpp \
3504 common/crypto/pkix-signature-core.cpp \
3505 common/crypto/pkix-signature-rsa.cpp \
3506 common/crypto/pkix-util.cpp \
3507 common/crypto/pkix-verify.cpp \
3508 common/crypto/spc-asn1-decoder.cpp \
3509 common/crypto/spc-core.cpp \
3510 common/crypto/spc-init.cpp \
3511 common/crypto/spc-sanity.cpp \
3512 common/crypto/x509-asn1-decoder.cpp \
3513 common/crypto/x509-certpaths.cpp \
3514 common/crypto/x509-core.cpp \
3515 common/crypto/x509-init.cpp \
3516 common/crypto/x509-sanity.cpp \
3517 common/crypto/x509-verify.cpp \
3518 common/crypto/store.cpp \
3519 common/crypto/store-inmem.cpp \
3520 common/crypto/taf-asn1-decoder.cpp \
3521 common/crypto/taf-core.cpp \
3522 common/crypto/taf-init.cpp \
3523 common/crypto/taf-sanity.cpp \
3524 common/crypto/tsp-asn1-decoder.cpp \
3525 common/crypto/tsp-core.cpp \
3526 common/crypto/tsp-init.cpp \
3527 common/crypto/tsp-sanity.cpp \
3528 common/checksum/alt-md2.cpp \
3529 common/checksum/alt-sha1.cpp \
3530 common/checksum/alt-sha256.cpp \
3531 common/checksum/alt-sha512.cpp \
3532 common/checksum/alt-sha3.cpp \
3533 common/checksum/md2str.cpp \
3534 common/checksum/md4str.cpp \
3535 common/checksum/md5str.cpp \
3536 common/checksum/sha1str.cpp \
3537 common/checksum/sha224str.cpp \
3538 common/checksum/sha256str.cpp \
3539 common/checksum/sha384str.cpp \
3540 common/checksum/sha512str.cpp \
3541 common/checksum/sha512t224str.cpp \
3542 common/checksum/sha512t256str.cpp \
3543 common/err/errinfolog.cpp \
3544 common/path/RTPathFilenameUtf16.cpp \
3545 common/path/RTPathChangeToUnixSlashes.cpp \
3546 common/math/bignum.cpp \
3547 common/misc/zero.asm \
3548 common/string/RTStrPrintHexBytes.cpp \
3549 common/string/RTUtf16Copy.cpp \
3550 common/string/RTUtf16CopyAscii.cpp \
3551 common/string/RTUtf16CopyEx.cpp \
3552 common/string/RTUtf16Cat.cpp \
3553 common/string/RTUtf16CatAscii.cpp \
3554 common/string/RTUtf16End.cpp \
3555 common/string/RTUtf16NLen.cpp \
3556 common/string/RTUtf16NLenEx.cpp \
3557 common/string/RTUtf16PrintHexBytes.cpp \
3558 common/string/strstrip.cpp \
3559 generic/memsafer-generic.cpp \
3560 common/misc/thread.cpp \
3561 common/string/memcmp.asm \
3562 common/string/memchr.asm \
3563 common/string/memcpy.asm \
3564 common/string/memset.asm \
3565 common/string/memmove.asm \
3566 common/string/strlen.asm \
3567 common/string/strncmp.cpp \
3568 common/string/strpbrk.cpp \
3569 generic/RTAssertShouldPanic-generic.cpp \
3570 generic/RTLogWriteStdOut-stub-generic.cpp \
3571 generic/RTMpGetCoreCount-generic.cpp \
3572 generic/RTTimerCreate-generic.cpp \
3573 generic/mppresent-generic-online.cpp \
3574 generic/rtStrFormatKernelAddress-generic.cpp \
3575 nt/RTErrConvertFromNtStatus.cpp \
3576 nt/RTNtPathExpand8dot3Path.cpp \
3577 nt/RTNtPathExpand8dot3PathA.cpp \
3578 nt/RTNtPathFindPossible8dot3Name.cpp \
3579 nt/semevent-nt.cpp \
3580 nt/RTSemEventGetResolution-nt.cpp \
3581 nt/semeventmulti-nt.cpp \
3582 nt/RTSemEventMultiGetResolution-nt.cpp \
3583 r0drv/generic/threadctxhooks-r0drv-generic.cpp \
3584 r0drv/alloc-ef-r0drv.cpp \
3585 r0drv/memobj-r0drv.cpp \
3586 r0drv/mpnotification-r0drv.c \
3587 r0drv/powernotification-r0drv.c \
3588 r0drv/nt/alloc-r0drv-nt.cpp \
3589 r0drv/nt/assert-r0drv-nt.cpp \
3590 r0drv/nt/dbgkrnlinfo-r0drv-nt.cpp \
3591 r0drv/nt/initterm-r0drv-nt.cpp \
3592 r0drv/nt/memobj-r0drv-nt.cpp \
3593 r0drv/nt/memuserkernel-r0drv-nt.cpp \
3594 r0drv/nt/mp-r0drv-nt.cpp \
3595 r0drv/nt/process-r0drv-nt.cpp \
3596 r0drv/nt/RTLogWriteDebugger-r0drv-nt.cpp \
3597 r0drv/nt/semfastmutex-r0drv-nt.cpp \
3598 r0drv/nt/semmutex-r0drv-nt.cpp \
3599 r0drv/nt/spinlock-r0drv-nt.cpp \
3600 r0drv/nt/thread-r0drv-nt.cpp \
3601 r0drv/nt/thread2-r0drv-nt.cpp \
3602 r0drv/nt/time-r0drv-nt.cpp \
3603 r0drv/nt/timer-r0drv-nt.cpp \
3604 r0drv/nt/toxic-chkstk-r0drv-nt.asm \
3605 r0drv/nt/RTTimerGetSystemGranularity-r0drv-nt.cpp
3606
3607RuntimeR0Drv_SOURCES.win.amd64 := $(RuntimeWin64ASM_SOURCES)
3608RuntimeR0Drv_SOURCES.win.x86 := $(RuntimeWin32ASM_SOURCES) \
3609 r0drv/nt/nt3fakes-stub-r0drv-nt.cpp \
3610 r0drv/nt/alloca-x86-r0drv-nt.asm
3611
3612
3613RuntimeR0Drv_SOURCES.darwin = \
3614 common/ldr/ldr.cpp \
3615 common/ldr/ldrEx.cpp \
3616 common/ldr/ldrMachO.cpp \
3617 common/ldr/ldrMemory.cpp \
3618 common/asn1/asn1-basics.cpp \
3619 common/asn1/asn1-dump.cpp \
3620 common/asn1/asn1-cursor.cpp \
3621 common/asn1/asn1-default-allocator.cpp \
3622 common/asn1/asn1-safer-allocator.cpp \
3623 common/asn1/asn1-encode.cpp \
3624 common/asn1/asn1-ut-bitstring.cpp \
3625 common/asn1/asn1-ut-bitstring-decode.cpp \
3626 common/asn1/asn1-ut-boolean.cpp \
3627 common/asn1/asn1-ut-boolean-decode.cpp \
3628 common/asn1/asn1-ut-core.cpp \
3629 common/asn1/asn1-ut-core-decode.cpp \
3630 common/asn1/asn1-ut-dyntype.cpp \
3631 common/asn1/asn1-ut-dyntype-decode.cpp \
3632 common/asn1/asn1-ut-integer.cpp \
3633 common/asn1/asn1-ut-integer-decode.cpp \
3634 common/asn1/asn1-ut-null.cpp \
3635 common/asn1/asn1-ut-null-decode.cpp \
3636 common/asn1/asn1-ut-objid.cpp \
3637 common/asn1/asn1-ut-objid-decode.cpp \
3638 common/asn1/asn1-ut-octetstring.cpp \
3639 common/asn1/asn1-ut-octetstring-decode.cpp \
3640 common/asn1/asn1-ut-string.cpp \
3641 common/asn1/asn1-ut-string-decode.cpp \
3642 common/asn1/asn1-ut-time.cpp \
3643 common/asn1/asn1-ut-time-decode.cpp \
3644 common/crypto/digest-core.cpp \
3645 common/crypto/digest-builtin.cpp \
3646 common/crypto/key.cpp \
3647 common/crypto/rsa-asn1-decoder.cpp \
3648 common/crypto/rsa-core.cpp \
3649 common/crypto/rsa-init.cpp \
3650 common/crypto/rsa-sanity.cpp \
3651 common/crypto/pkcs7-asn1-decoder.cpp \
3652 common/crypto/pkcs7-core.cpp \
3653 common/crypto/pkcs7-init.cpp \
3654 common/crypto/pkcs7-sanity.cpp \
3655 common/crypto/pkcs7-verify.cpp \
3656 common/crypto/pkix-signature-builtin.cpp \
3657 common/crypto/pkix-signature-core.cpp \
3658 common/crypto/pkix-signature-rsa.cpp \
3659 common/crypto/pkix-util.cpp \
3660 common/crypto/pkix-verify.cpp \
3661 common/crypto/spc-asn1-decoder.cpp \
3662 common/crypto/spc-core.cpp \
3663 common/crypto/spc-init.cpp \
3664 common/crypto/spc-sanity.cpp \
3665 common/crypto/x509-asn1-decoder.cpp \
3666 common/crypto/x509-certpaths.cpp \
3667 common/crypto/x509-core.cpp \
3668 common/crypto/x509-init.cpp \
3669 common/crypto/x509-sanity.cpp \
3670 common/crypto/x509-verify.cpp \
3671 common/crypto/store.cpp \
3672 common/crypto/store-inmem.cpp \
3673 common/crypto/taf-asn1-decoder.cpp \
3674 common/crypto/taf-core.cpp \
3675 common/crypto/taf-init.cpp \
3676 common/crypto/taf-sanity.cpp \
3677 common/crypto/tsp-asn1-decoder.cpp \
3678 common/crypto/tsp-core.cpp \
3679 common/crypto/tsp-init.cpp \
3680 common/crypto/tsp-sanity.cpp \
3681 common/checksum/alt-md2.cpp \
3682 common/checksum/alt-sha1.cpp \
3683 common/checksum/alt-sha256.cpp \
3684 common/checksum/alt-sha512.cpp \
3685 common/checksum/alt-sha3.cpp \
3686 common/checksum/md2str.cpp \
3687 common/checksum/md4str.cpp \
3688 common/checksum/md5str.cpp \
3689 common/checksum/sha1str.cpp \
3690 common/checksum/sha224str.cpp \
3691 common/checksum/sha256str.cpp \
3692 common/checksum/sha384str.cpp \
3693 common/checksum/sha512str.cpp \
3694 common/checksum/sha512t224str.cpp \
3695 common/checksum/sha512t256str.cpp \
3696 common/err/errinfolog.cpp \
3697 common/math/bignum.cpp \
3698 common/misc/thread.cpp \
3699 common/string/base64.cpp \
3700 common/string/memchr.asm \
3701 common/string/mempcpy.asm \
3702 common/string/strpbrk.cpp \
3703 common/string/strstrip.cpp \
3704 common/string/RTStrPrintHexBytes.cpp \
3705 darwin/RTErrConvertFromDarwin.cpp \
3706 darwin/RTErrConvertFromDarwinIO.cpp \
3707 darwin/RTErrConvertFromDarwinKern.cpp \
3708 generic/RTAssertShouldPanic-generic.cpp \
3709 generic/RTFileReadAll-generic.cpp \
3710 generic/RTFileReadAllByHandle-generic.cpp \
3711 generic/RTFileReadAllByHandleEx-generic.cpp \
3712 generic/RTFileReadAllEx-generic.cpp \
3713 generic/RTFileReadAllFree-generic.cpp \
3714 generic/RTMpGetCoreCount-generic.cpp \
3715 generic/RTMpOnPair-generic.cpp \
3716 generic/RTThreadQueryTerminationStatus-stub-generic.cpp \
3717 generic/RTTimerCreate-generic.cpp \
3718 generic/memsafer-generic.cpp \
3719 generic/mppresent-generic.cpp \
3720 generic/timer-generic.cpp \
3721 r0drv/generic/mpnotification-r0drv-generic.cpp \
3722 r0drv/generic/threadctxhooks-r0drv-generic.cpp \
3723 r0drv/darwin/alloc-r0drv-darwin.cpp \
3724 r0drv/darwin/assert-r0drv-darwin.cpp \
3725 r0drv/darwin/initterm-r0drv-darwin.cpp \
3726 r0drv/darwin/dbgkrnlinfo-r0drv-darwin.cpp \
3727 r0drv/darwin/fileio-r0drv-darwin.cpp \
3728 r0drv/darwin/memobj-r0drv-darwin.cpp \
3729 r0drv/darwin/mp-r0drv-darwin.cpp \
3730 r0drv/darwin/memuserkernel-r0drv-darwin.cpp \
3731 r0drv/darwin/process-r0drv-darwin.cpp \
3732 r0drv/darwin/RTLogWriteDebugger-r0drv-darwin.cpp \
3733 r0drv/darwin/RTLogWriteStdOut-r0drv-darwin.cpp \
3734 r0drv/darwin/rtStrFormatKernelAddress-r0drv-darwin.cpp \
3735 r0drv/darwin/semevent-r0drv-darwin.cpp \
3736 r0drv/darwin/semeventmulti-r0drv-darwin.cpp \
3737 r0drv/darwin/semfastmutex-r0drv-darwin.cpp \
3738 r0drv/darwin/semmutex-r0drv-darwin.cpp \
3739 r0drv/darwin/spinlock-r0drv-darwin.cpp \
3740 r0drv/darwin/thread-r0drv-darwin.cpp \
3741 r0drv/darwin/thread2-r0drv-darwin.cpp \
3742 r0drv/darwin/threadpreempt-r0drv-darwin.cpp \
3743 r0drv/darwin/time-r0drv-darwin.cpp \
3744 r0drv/alloc-ef-r0drv.cpp \
3745 r0drv/memobj-r0drv.cpp \
3746 r0drv/powernotification-r0drv.c
3747# - The xnu memcpy implementation in osfmk/x86_64/bcopy.s returned 'void' rather than 'void *' for a long time, so use our own.
3748# - The memcmp and strlen implementations are still C implementations living in osfmk/x86_64/loose_ends.c, so use our asm code.
3749RuntimeR0Drv_SOURCES.darwin.amd64 = \
3750 common/string/memcpy.asm
3751# common/string/strlen.asm - try again later \
3752# common/string/memcmp.asm
3753
3754RuntimeR0Drv_SOURCES.os2 = \
3755 common/path/RTPathFilenameUtf16.cpp \
3756 common/string/RTUtf16Chr.cpp \
3757 common/string/RTUtf16CmpAscii.cpp \
3758 common/string/memchr.asm \
3759 common/string/memcmp.asm \
3760 common/string/memcpy.asm \
3761 common/string/mempcpy.asm \
3762 common/string/memmove.asm \
3763 common/string/memset.asm \
3764 common/string/strchr.asm \
3765 common/string/strcmp.asm \
3766 common/string/strcpy.asm \
3767 common/string/strlen.asm \
3768 common/string/strncmp.cpp \
3769 common/string/strpbrk.cpp \
3770 common/misc/thread.cpp \
3771 generic/RTAssertShouldPanic-generic.cpp \
3772 generic/RTLogWriteDebugger-generic.cpp \
3773 generic/RTLogWriteStdOut-stub-generic.cpp \
3774 generic/RTMpCpuId-generic.cpp \
3775 generic/RTMpCpuIdFromSetIndex-generic.cpp \
3776 generic/RTMpCpuIdToSetIndex-generic.cpp \
3777 generic/RTMpIsCpuPossible-generic.cpp \
3778 generic/RTMpGetCount-generic.cpp \
3779 generic/RTMpGetMaxCpuId-generic.cpp \
3780 generic/RTMpGetOnlineCount-generic.cpp \
3781 generic/RTMpGetOnlineSet-generic.cpp \
3782 generic/RTMpGetSet-generic.cpp \
3783 generic/RTMpIsCpuOnline-generic.cpp \
3784 generic/RTThreadQueryTerminationStatus-stub-generic.cpp \
3785 generic/RTTimerCreate-generic.cpp \
3786 generic/mppresent-generic.cpp \
3787 generic/rtStrFormatKernelAddress-generic.cpp \
3788 os2/RTErrConvertFromOS2.cpp \
3789 os2/rtSemWaitOs2ConvertTimeout.cpp \
3790 os2/sys0.asm \
3791 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
3792 r0drv/generic/RTMpOn-r0drv-generic.cpp \
3793 r0drv/generic/mpnotification-r0drv-generic.cpp \
3794 r0drv/generic/threadctxhooks-r0drv-generic.cpp \
3795 r0drv/memobj-r0drv.cpp \
3796 r0drv/powernotification-r0drv.c \
3797 r0drv/os2/alloc-r0drv-os2.cpp \
3798 r0drv/os2/assert-r0drv-os2.cpp \
3799 r0drv/os2/assertA-r0drv-os2.asm \
3800 r0drv/os2/initterm-r0drv-os2.cpp \
3801 r0drv/os2/memobj-r0drv-os2.cpp \
3802 r0drv/os2/memuserkernel-r0drv-os2.cpp \
3803 r0drv/os2/os2imports.imp \
3804 r0drv/os2/process-r0drv-os2.cpp \
3805 r0drv/os2/RTR0AssertPanicSystem-r0drv-os2.asm \
3806 r0drv/os2/RTR0Os2DHQueryDOSVar.asm \
3807 r0drv/os2/RTR0Os2DHVMGlobalToProcess.asm \
3808 r0drv/os2/semevent-r0drv-os2.cpp \
3809 r0drv/os2/semeventmulti-r0drv-os2.cpp \
3810 r0drv/os2/semfastmutex-r0drv-os2.cpp \
3811 r0drv/os2/spinlock-r0drv-os2.cpp \
3812 r0drv/os2/thread-r0drv-os2.cpp \
3813 r0drv/os2/thread2-r0drv-os2.cpp \
3814 r0drv/os2/time-r0drv-os2.cpp \
3815 r0drv/os2/timer-r0drv-os2.cpp \
3816 r0drv/os2/timerA-r0drv-os2.asm
3817ifndef VBOX_USE_WATCOM_FOR_OS2
3818 RuntimeR0Drv_SOURCES.os2 += \
3819 common/math/gcc/adddi3.c \
3820 common/math/gcc/anddi3.c \
3821 common/math/gcc/ashldi3.c \
3822 common/math/gcc/ashrdi3.c \
3823 common/math/gcc/cmpdi2.c \
3824 common/math/gcc/divdi3.c \
3825 common/math/gcc/divmoddi4.c \
3826 common/math/gcc/iordi3.c \
3827 common/math/gcc/lshldi3.c \
3828 common/math/gcc/lshrdi3.c \
3829 common/math/gcc/moddi3.c \
3830 common/math/gcc/muldi3.c \
3831 common/math/gcc/negdi2.c \
3832 common/math/gcc/notdi2.c \
3833 common/math/gcc/qdivrem.c \
3834 common/math/gcc/subdi3.c \
3835 common/math/gcc/ucmpdi2.c \
3836 common/math/gcc/udivdi3.c \
3837 common/math/gcc/udivmoddi4.c \
3838 common/math/gcc/umoddi3.c \
3839 common/math/gcc/xordi3.c
3840else
3841 RuntimeR0Drv_SOURCES.os2 += \
3842 common/math/watcom/I8D-x86-32.asm \
3843 common/math/watcom/U8D-x86-32.asm \
3844 common/math/watcom/RTWatcomUInt64Div.c \
3845 common/math/watcom/U8LS-x86-32.asm \
3846 common/math/watcom/U8RS-x86-32.asm \
3847 common/math/watcom/U8M-I8M-x86-32.asm \
3848 common/string/watcom/bzero.asm \
3849 common/string/watcom/memchr.asm \
3850 common/string/watcom/memcmp.asm \
3851 common/string/watcom/memcpy.asm \
3852 common/string/watcom/memmove.asm \
3853 common/string/watcom/mempcpy.asm \
3854 common/string/watcom/memrchr.asm \
3855 common/string/watcom/memset.asm \
3856 common/string/watcom/strchr.asm \
3857 common/string/watcom/strcmp.asm \
3858 common/string/watcom/strcpy.asm \
3859 common/string/watcom/strlen.asm \
3860 common/string/watcom/strncmp.asm \
3861 common/string/watcom/strncpy.asm
3862endif
3863
3864RuntimeR0Drv_SOURCES.freebsd = \
3865 common/misc/thread.cpp \
3866 common/string/memchr.asm \
3867 common/string/memmove.asm \
3868 common/string/strpbrk.cpp \
3869 common/string/memcmp.asm \
3870 common/string/strchr.asm \
3871 generic/RTAssertShouldPanic-generic.cpp \
3872 generic/RTLogWriteDebugger-generic.cpp \
3873 generic/RTLogWriteStdOut-stub-generic.cpp \
3874 generic/RTMpOnPair-generic.cpp \
3875 generic/RTTimerCreate-generic.cpp \
3876 generic/mppresent-generic.cpp \
3877 generic/rtStrFormatKernelAddress-generic.cpp \
3878 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
3879 r0drv/generic/mpnotification-r0drv-generic.cpp \
3880 r0drv/generic/threadctxhooks-r0drv-generic.cpp \
3881 r0drv/freebsd/alloc-r0drv-freebsd.c \
3882 r0drv/freebsd/assert-r0drv-freebsd.c \
3883 r0drv/freebsd/initterm-r0drv-freebsd.c \
3884 r0drv/freebsd/memobj-r0drv-freebsd.c \
3885 r0drv/freebsd/memuserkernel-r0drv-freebsd.c \
3886 r0drv/freebsd/process-r0drv-freebsd.c \
3887 r0drv/freebsd/semevent-r0drv-freebsd.c \
3888 r0drv/freebsd/semeventmulti-r0drv-freebsd.c \
3889 r0drv/freebsd/semfastmutex-r0drv-freebsd.c \
3890 r0drv/freebsd/semmutex-r0drv-freebsd.c \
3891 r0drv/freebsd/spinlock-r0drv-freebsd.c \
3892 r0drv/freebsd/thread-r0drv-freebsd.c \
3893 r0drv/freebsd/thread2-r0drv-freebsd.c \
3894 r0drv/freebsd/time-r0drv-freebsd.c \
3895 r0drv/freebsd/mp-r0drv-freebsd.c \
3896 generic/timer-generic.cpp \
3897 r0drv/alloc-ef-r0drv.cpp \
3898 r0drv/memobj-r0drv.cpp \
3899 r0drv/powernotification-r0drv.c
3900
3901RuntimeR0Drv_SOURCES.netbsd = \
3902 common/misc/thread.cpp \
3903 common/string/strpbrk.cpp \
3904 generic/RTAssertShouldPanic-generic.cpp \
3905 generic/RTLogWriteDebugger-generic.cpp \
3906 generic/RTThreadQueryTerminationStatus-stub-generic.cpp \
3907 generic/RTTimerCreate-generic.cpp \
3908 generic/mppresent-generic.cpp \
3909 generic/rtStrFormatKernelAddress-generic.cpp \
3910 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
3911 r0drv/generic/mpnotification-r0drv-generic.cpp \
3912 r0drv/generic/threadctxhooks-r0drv-generic.cpp \
3913 r0drv/netbsd/RTLogWriteStdOut-r0drv-netbsd.c \
3914 r0drv/netbsd/alloc-r0drv-netbsd.c \
3915 r0drv/netbsd/assert-r0drv-netbsd.c \
3916 r0drv/netbsd/initterm-r0drv-netbsd.c \
3917 r0drv/netbsd/memobj-r0drv-netbsd.c \
3918 r0drv/netbsd/memuserkernel-r0drv-netbsd.c \
3919 r0drv/netbsd/process-r0drv-netbsd.c \
3920 r0drv/netbsd/semevent-r0drv-netbsd.c \
3921 r0drv/netbsd/semeventmulti-r0drv-netbsd.c \
3922 r0drv/netbsd/semfastmutex-r0drv-netbsd.c \
3923 r0drv/netbsd/spinlock-r0drv-netbsd.c \
3924 r0drv/netbsd/thread-r0drv-netbsd.c \
3925 r0drv/netbsd/thread2-r0drv-netbsd.c \
3926 r0drv/netbsd/time-r0drv-netbsd.c \
3927 r0drv/netbsd/mp-r0drv-netbsd.c \
3928 generic/timer-generic.cpp \
3929 r0drv/memobj-r0drv.cpp \
3930 r0drv/powernotification-r0drv.c
3931
3932RuntimeR0Drv_SOURCES.solaris = \
3933 common/misc/thread.cpp \
3934 common/string/memchr.asm \
3935 generic/RTAssertShouldPanic-generic.cpp \
3936 generic/RTLogWriteStdOut-stub-generic.cpp \
3937 generic/RTMpGetCoreCount-generic.cpp \
3938 generic/RTThreadQueryTerminationStatus-stub-generic.cpp \
3939 generic/RTTimerCreate-generic.cpp \
3940 generic/mppresent-generic.cpp \
3941 generic/rtStrFormatKernelAddress-generic.cpp \
3942 r0drv/memobj-r0drv.cpp \
3943 r0drv/mpnotification-r0drv.c \
3944 r0drv/powernotification-r0drv.c \
3945 r0drv/solaris/RTLogWriteDebugger-r0drv-solaris.c \
3946 r0drv/solaris/RTMpPokeCpu-r0drv-solaris.c \
3947 r0drv/solaris/alloc-r0drv-solaris.c \
3948 r0drv/solaris/assert-r0drv-solaris.c \
3949 r0drv/solaris/dbgkrnlinfo-r0drv-solaris.c \
3950 r0drv/solaris/initterm-r0drv-solaris.c \
3951 r0drv/solaris/memuserkernel-r0drv-solaris.c \
3952 r0drv/solaris/mpnotification-r0drv-solaris.c \
3953 r0drv/solaris/memobj-r0drv-solaris.c \
3954 r0drv/solaris/mp-r0drv-solaris.c \
3955 r0drv/solaris/process-r0drv-solaris.c \
3956 r0drv/solaris/semevent-r0drv-solaris.c \
3957 r0drv/solaris/semeventmulti-r0drv-solaris.c \
3958 r0drv/solaris/semfastmutex-r0drv-solaris.c \
3959 r0drv/solaris/semmutex-r0drv-solaris.c \
3960 r0drv/solaris/spinlock-r0drv-solaris.c \
3961 r0drv/solaris/thread-r0drv-solaris.c \
3962 r0drv/solaris/thread2-r0drv-solaris.c \
3963 r0drv/solaris/threadctxhooks-r0drv-solaris.c \
3964 r0drv/solaris/time-r0drv-solaris.c \
3965 r0drv/solaris/timer-r0drv-solaris.c
3966
3967RuntimeR0Drv_SOURCES.haiku = \
3968 common/misc/thread.cpp \
3969 common/string/memchr.asm \
3970 common/string/memmove.asm \
3971 common/string/strpbrk.cpp \
3972 common/string/memcmp.asm \
3973 common/string/strchr.asm \
3974 generic/RTAssertShouldPanic-generic.cpp \
3975 generic/RTMpOnPair-generic.cpp \
3976 generic/RTThreadQueryTerminationStatus-stub-generic.cpp \
3977 generic/RTTimerCreate-generic.cpp \
3978 generic/mppresent-generic.cpp \
3979 generic/rtStrFormatKernelAddress-generic.cpp \
3980 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
3981 r0drv/generic/mpnotification-r0drv-generic.cpp \
3982 r0drv/generic/threadctxhooks-r0drv-generic.cpp \
3983 r0drv/haiku/alloc-r0drv-haiku.c \
3984 r0drv/haiku/assert-r0drv-haiku.c \
3985 r0drv/haiku/initterm-r0drv-haiku.c \
3986 r0drv/haiku/memobj-r0drv-haiku.c \
3987 r0drv/haiku/mp-r0drv-haiku.c \
3988 r0drv/haiku/process-r0drv-haiku.c \
3989 r0drv/haiku/RTLogWriteDebugger-r0drv-haiku.c \
3990 r0drv/haiku/RTLogWriteStdOut-r0drv-haiku.c \
3991 r0drv/haiku/semevent-r0drv-haiku.c \
3992 r0drv/haiku/semeventmulti-r0drv-haiku.c \
3993 r0drv/haiku/semfastmutex-r0drv-haiku.c \
3994 r0drv/haiku/semmutex-r0drv-haiku.c \
3995 r0drv/haiku/spinlock-r0drv-haiku.c \
3996 r0drv/haiku/thread-r0drv-haiku.c \
3997 r0drv/haiku/thread2-r0drv-haiku.c \
3998 r0drv/haiku/time-r0drv-haiku.c \
3999 generic/timer-generic.cpp \
4000 r0drv/memobj-r0drv.cpp \
4001 r0drv/powernotification-r0drv.c
4002
4003## PORTME: Porters create and add their selection of platform specific Ring-0 Driver files here.
4004
4005RuntimeR0Drv_ORDERDEPS.freebsd = \
4006 $(PATH_STAGE)/gen-sys-hdrs/bus_if.h \
4007 $(PATH_STAGE)/gen-sys-hdrs/device_if.h
4008
4009
4010#
4011# RuntimeGuestR0 - Guest driver runtime.
4012# This is almost the same as the RuntimeR0Drv, the main difference
4013# is in the backdoor logging and the lack of sup.h (which should be
4014# made irrelevant even for RuntimeR0Drv).
4015#
4016RuntimeGuestR0_TEMPLATE := VBOXGUESTR0LIB
4017RuntimeGuestR0_EXTENDS = RuntimeR0Drv
4018RuntimeGuestR0_DEFS.win.x86 = $(RuntimeR0Drv_DEFS.win.x86) IPRT_TARGET_NT4 # The 32-bit version needs to work on NT4 too.
4019RuntimeGuestR0_SOURCES := $(filter-out generic/RTLogWriteUser-generic.cpp, $(RuntimeR0Drv_SOURCES))
4020RuntimeGuestR0_SOURCES += \
4021 VBox/logbackdoor.cpp
4022RuntimeGuestR0_SOURCES.win := \
4023 $(filter-out common/checksum/md% common/checksum/sha%, $(RuntimeR0Drv_SOURCES.win))
4024
4025
4026ifdef VBOX_WITH_RAW_MODE
4027 #
4028 # RuntimeRC - Raw-mode context library.
4029 #
4030 RuntimeRC_TEMPLATE = VBoxRc
4031 RuntimeRC_DEFS = IN_RT_RC RT_WITH_VBOX IN_SUP_RC IN_VMM_RC NOFILEID
4032 RuntimeRC_INCS = include
4033 RuntimeRC_SOURCES := \
4034 common/asm/ASMMemFirstMismatchingU8.asm \
4035 common/asm/ASMGetXcr0.asm \
4036 common/asm/ASMSetXcr0.asm \
4037 common/asm/ASMXSave.asm \
4038 common/asm/ASMXRstor.asm \
4039 common/asm/ASMFxSave.asm \
4040 common/asm/ASMFxRstor.asm \
4041 common/checksum/alt-md5.cpp \
4042 common/checksum/crc32.cpp \
4043 common/checksum/crc64.cpp \
4044 common/log/log.cpp \
4045 common/log/logellipsis.cpp \
4046 common/log/logrel.cpp \
4047 common/log/logrelellipsis.cpp \
4048 common/log/logcom.cpp \
4049 common/log/logformat.cpp \
4050 common/log/tracebuf.cpp \
4051 common/log/tracedefault.cpp \
4052 common/log/RTLogCreateEx.cpp \
4053 common/misc/RTAssertMsg1Weak.cpp \
4054 common/misc/RTAssertMsg2.cpp \
4055 common/misc/RTAssertMsg2Add.cpp \
4056 common/misc/RTAssertMsg2AddWeak.cpp \
4057 common/misc/RTAssertMsg2AddWeakV.cpp \
4058 common/misc/RTAssertMsg2Weak.cpp \
4059 common/misc/RTAssertMsg2WeakV.cpp \
4060 common/misc/assert.cpp \
4061 common/misc/buildconfig.cpp \
4062 common/misc/sanity-c.c \
4063 common/misc/sanity-cpp.cpp \
4064 common/path/RTPathFilename.cpp \
4065 common/string/strformat.cpp \
4066 common/string/RTStrFormat.cpp \
4067 common/string/strformatnum.cpp \
4068 common/string/strformatrt.cpp \
4069 common/string/strformattype.cpp \
4070 common/string/strncmp.cpp \
4071 common/string/strpbrk.cpp \
4072 common/string/strprintf.cpp \
4073 common/string/strprintf-ellipsis.cpp \
4074 common/string/strprintf2.cpp \
4075 common/string/strprintf2-ellipsis.cpp \
4076 common/string/RTStrCmp.cpp \
4077 common/string/RTStrCopy.cpp \
4078 common/string/RTStrCopyEx.cpp \
4079 common/string/RTStrEnd.asm \
4080 common/string/RTStrICmpAscii.cpp \
4081 common/table/avllu32.cpp \
4082 common/table/avlou32.cpp \
4083 common/table/avlogcphys.cpp \
4084 common/table/avlogcptr.cpp \
4085 common/table/avlohcphys.cpp \
4086 common/table/avloioport.cpp \
4087 common/table/avlrogcphys.cpp \
4088 common/table/avlrogcptr.cpp \
4089 common/table/avlroioport.cpp \
4090 common/table/avlroogcptr.cpp \
4091 common/table/avlu32.cpp \
4092 common/time/timeprog.cpp \
4093 common/time/timesup.cpp \
4094 gc/initterm-gc.cpp \
4095 generic/RTAssertShouldPanic-generic.cpp \
4096 generic/rtStrFormatKernelAddress-generic.cpp \
4097 generic/errvars-generic.cpp \
4098 \
4099 $(RuntimeNoCrt_SOURCES)
4100
4101 #if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
4102 # RuntimeRC_SOURCES += common/time/timesupA.asm
4103 #else
4104 RuntimeRC_SOURCES += common/time/timesupref.cpp
4105 #endif
4106
4107 RuntimeRC_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
4108
4109 ifeq ($(VBOX_LDR_FMT32),lx)
4110 RuntimeRC_SOURCES += os2/sys0.asm
4111 endif
4112
4113 if1of ($(KBUILD_TARGET), darwin solaris freebsd os2)
4114 RuntimeRC_SOURCES += \
4115 common/math/gcc/adddi3.c \
4116 common/math/gcc/anddi3.c \
4117 common/math/gcc/ashldi3.c \
4118 common/math/gcc/ashrdi3.c \
4119 common/math/gcc/cmpdi2.c \
4120 common/math/gcc/divdi3.c \
4121 common/math/gcc/divmoddi4.c \
4122 common/math/gcc/iordi3.c \
4123 common/math/gcc/lshldi3.c \
4124 common/math/gcc/lshrdi3.c \
4125 common/math/gcc/moddi3.c \
4126 common/math/gcc/muldi3.c \
4127 common/math/gcc/negdi2.c \
4128 common/math/gcc/notdi2.c \
4129 common/math/gcc/qdivrem.c \
4130 common/math/gcc/subdi3.c \
4131 common/math/gcc/ucmpdi2.c \
4132 common/math/gcc/udivdi3.c \
4133 common/math/gcc/udivmoddi4.c \
4134 common/math/gcc/umoddi3.c \
4135 common/math/gcc/xordi3.c
4136 endif
4137
4138
4139 #
4140 # RuntimeRCStub - Raw-mode context startup stub for Windows.
4141 #
4142 RuntimeRCStub_TEMPLATE = VBoxRc
4143 RuntimeRCStub_SOURCES.win = \
4144 nt/NtProcessStartup-stub.cpp
4145
4146
4147endif # VBOX_WITH_RAW_MODE
4148
4149
4150#
4151# Static library for new & delete for the electric fence.
4152#
4153RuntimeEFCPP_TEMPLATE := $(VBoxRT_TEMPLATE)
4154RuntimeEFCPP_SDKS := $(RuntimeR3_SDKS)
4155RuntimeEFCPP_SDKS.$(KBUILD_TARGET) := $(RuntimeR3_SDKS.$(KBUILD_TARGET))
4156RuntimeEFCPP_DEFS := $(RuntimeR3_DEFS)
4157RuntimeEFCPP_DEFS.$(KBUILD_TARGET) := $(RuntimeR3_DEFS.$(KBUILD_TARGET))
4158RuntimeEFCPP_INCS := $(RuntimeR3_INCS)
4159RuntimeEFCPP_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
4160RuntimeEFCPP_SOURCES := r3/alloc-ef-cpp.cpp
4161
4162
4163
4164#
4165# The NTDLL mini import library.
4166#
4167# Note! The reason for doing this is to avoid importing CRT symbols from the
4168# NTDLL. We do not wish to do this because:
4169# - Our compiler is usually a different one and we should use the
4170# matching CRT,
4171# - Older versions of NTDLL may not sport all the exports our w2k3 or
4172# later WINDDK ntdll.lib have and thus we may easily end up with
4173# images that does not load on older windows versions.
4174#
4175if1of (win,$(KBUILD_TARGET) $(KBUILD_HOST))
4176RuntimeR3NtDll-amd64_TEMPLATE = VBoxR3Dll
4177RuntimeR3NtDll-amd64_BLD_TRG_ARCH = amd64
4178RuntimeR3NtDll-amd64_ARFLAGS = /NODEFAULTLIB /MACHINE:amd64
4179RuntimeR3NtDll-amd64_SOURCES = \
4180 r3/win/ntdll-mini-implib.def
4181
4182RuntimeR3NtDll-x86_TEMPLATE = VBoxR3Dll
4183RuntimeR3NtDll-x86_BLD_TRG_ARCH = x86
4184RuntimeR3NtDll-x86_ARFLAGS = /NODEFAULTLIB /MACHINE:x86
4185RuntimeR3NtDll-x86_SOURCES = \
4186 r3/win/ntdll-mini-implib.def \
4187 $(RuntimeR3NtDll-x86_0_OUTDIR)/ntdll-mini-implib.asm
4188RuntimeR3NtDll-x86_CLEAN = \
4189 $(RuntimeR3NtDll-x86_0_OUTDIR)/ntdll-mini-implib.asm
4190
4191$$(RuntimeR3NtDll-x86_0_OUTDIR)/ntdll-mini-implib.asm: $(PATH_SUB_CURRENT)/r3/win/ntdll-mini-implib.def | $$(dir $$@)
4192 $(call MSG_GENERATE,,$@,$<)
4193 $(QUIET)$(APPEND) -nt "$@" \
4194 ';Autogenerated, do not edit' \
4195 '%include "iprt/asmdefs.mac"' \
4196 'BEGINCODE' \
4197 '%macro IMPLIB_EXPORT 1' \
4198 'global %1:function' \
4199 '%1: nop' \
4200 '%endm' \
4201 ''
4202 $(QUIET)$(SED) -e '1,/EXPORTS/d' \
4203 -e 's/^.*;;=[[:space:]]*\([^[:space:]]*\)[[:space:]]*$$/IMPLIB_EXPORT \1/' \
4204 $< --append $@
4205endif
4206
4207#
4208# Bag of tricks required for making VCC100 output binaries work on NT4, W2K
4209# early XP and early W2K3. Used by validation kit.
4210#
4211RuntimeR3VccTricks_TEMPLATE = VBoxR3Static
4212RuntimeR3VccTricks_DEFS = VCC_FAKES_TARGET_$(VBOX_VCC_TOOL_STEM) VCC_FAKES_TARGET=$(substr $(VBOX_VCC_TOOL_STEM),-3)
4213RuntimeR3VccTricks_SOURCES = \
4214 r3/win/vcc-fakes-kernel32.cpp \
4215 r3/win/vcc-fakes-kernel32-A.asm \
4216 r3/win/vcc-fakes-shell32.cpp \
4217 r3/win/vcc-fakes-shell32-A.asm \
4218 r3/win/vcc-fakes-ntdll.cpp \
4219 r3/win/vcc-fakes-ntdll-A.asm
4220
4221if defined(VBOX_WITH_MORE_NT4_COMPAT_BINARIES) && "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.x86" # Ugly hacks... :-)
4222LIBRARIES += RuntimeR3VccTricks2
4223RuntimeR3VccTricks2_TEMPLATE = VBoxR3Dll
4224RuntimeR3VccTricks2_DEFS += $(RuntimeR3VccTricks_DEFS)
4225RuntimeR3VccTricks2_SOURCES = $(RuntimeR3VccTricks_SOURCES)
4226RuntimeR3VccTricks2_SOURCES += $(RuntimeR3VccTricks2_0_OUTDIR)/dynobjs.lib
4227RuntimeR3VccTricks2_CLEAN = $(RuntimeR3VccTricks2_0_OUTDIR)/dynobjs.lib
4228RuntimeR3VccTricks2_VBOX_LIBCMT_NEEDED =
4229
4230$$(RuntimeR3VccTricks2_0_OUTDIR)/dynobjs.lib: \
4231 $$(PATH_TOOL_$$(TEMPLATE_VBoxR3Dll_TOOL.win.x86)_LIB)/msvcrt$(VBOX_VCC_CRT_TYPE).lib \
4232 $$(PATH_TOOL_$$(TEMPLATE_VBoxR3Dll_TOOL.win.x86)_LIB)/libcmt$(VBOX_VCC_CRT_TYPE).lib \
4233 $$(LIB_RUNTIME) \
4234 $(MAKEFILE) | $$(dir $$@)
4235 $(RM) -f -- "$@"
4236# $(REDIRECT) -C $(dir $@) -- $(KBUILD_DEVTOOLS)/common/openwatcom/v1.9-r2/binnt/wlib \
4237# $(PATH_TOOL_$(TEMPLATE_VBoxR3Dll_TOOL.win.x86)_LIB)/libcmt$(VBOX_VCC_CRT_TYPE).lib \
4238# $(foreach file, $(RuntimeR3VccTricks2_VBOX_LIBCMT_NEEDED), *$(file))
4239 $(KBUILD_DEVTOOLS)/common/openwatcom/v1.9-r2/binnt/wlib [email protected] $< \
4240 -MSVCR100.dll \
4241 $(addprefix $(RuntimeR3VccTricks2_0_OUTDIR)/, $(RuntimeR3VccTricks2_VBOX_LIBCMT_NEEDED)) \
4242 -chandler4gs.obj
4243 $(KBUILD_DEVTOOLS)/common/openwatcom/v1.9-r2/binnt/wlib -o=$@ \
4244 $(LIB_RUNTIME) \
4245 [email protected]
4246 $(RM) -f -- [email protected] $(addprefix $(RuntimeR3VccTricks2_0_OUTDIR)/, $(RuntimeR3VccTricks_VBOX_LIBCMT_NEEDED))
4247endif
4248
4249
4250#
4251# errmsg.cpp depends on a generated header.
4252#
4253common/err/errmsg.cpp_DEPS = \
4254 $(IPRT_OUT_DIR)/errmsgdata-all.h \
4255 $(IPRT_OUT_DIR)/errmsgdata-no-full-msg.h \
4256 $(IPRT_OUT_DIR)/errmsgdata-only-defines.h
4257common/err/errmsg.cpp_INCS = $(IPRT_OUT_DIR)
4258
4259win/errmsgwin.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgwindata-all.h $(IPRT_OUT_DIR)/errmsgwindata-only-defines.h
4260win/errmsgwin.cpp_INCS = $(IPRT_OUT_DIR)
4261
4262# Our COM errors only for R3 libraries on the host
4263define def_errmsgwin_deps
4264 $(lib)_common/err/errmsgxpcom.cpp_INCS = $(IPRT_OUT_DIR)
4265 $(lib)_common/err/errmsgxpcom.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
4266endef
4267$(foreach lib,RuntimeR3 RuntimeBldProg VBoxRT VBoxRT-x86,$(eval $(def_errmsgwin_deps)))
4268
4269
4270#
4271# Generate the status code data.
4272#
4273$(IPRT_OUT_DIR)/errmsgdata.h: \
4274 $(VBOX_PATH_RUNTIME_SRC)/common/err/errmsg.sed \
4275 $(PATH_ROOT)/include/iprt/err.h \
4276 $(PATH_ROOT)/include/VBox/err.h \
4277 | $$(dir $$@)
4278 $(call MSG_GENERATE,,$@,$(filter %.h,$^))
4279 $(QUIET)$(SED) -f $< --output "$@" $(filter %.h,$^)
4280
4281$(IPRT_OUT_DIR)/errmsgdata-all.h.ts +| $(IPRT_OUT_DIR)/errmsgdata-all.h: \
4282 $$(bldRTErrMsgSorter_1_TARGET)
4283 $(call MSG_GENERATE,,$@,$<)
4284 $(QUIET)"$<" --all "$(IPRT_OUT_DIR)/errmsgdata-all.h.ts"
4285 $(QUIET)$(CP) --changed -fv -- "$(IPRT_OUT_DIR)/errmsgdata-all.h.ts" "$(IPRT_OUT_DIR)/errmsgdata-all.h"
4286
4287$(IPRT_OUT_DIR)/errmsgdata-no-full-msg.h.ts +| $(IPRT_OUT_DIR)/errmsgdata-no-full-msg.h: \
4288 $$(bldRTErrMsgSorter_1_TARGET)
4289 $(call MSG_GENERATE,,$@,$<)
4290 $(QUIET)"$<" --no-full-msg "$(IPRT_OUT_DIR)/errmsgdata-no-full-msg.h.ts"
4291 $(QUIET)$(CP) --changed -fv -- "$(IPRT_OUT_DIR)/errmsgdata-no-full-msg.h.ts" "$(IPRT_OUT_DIR)/errmsgdata-no-full-msg.h"
4292
4293$(IPRT_OUT_DIR)/errmsgdata-only-defines.h.ts +| $(IPRT_OUT_DIR)/errmsgdata-only-defines.h: \
4294 $$(bldRTErrMsgSorter_1_TARGET)
4295 $(call MSG_GENERATE,,$@,$<)
4296 $(QUIET)"$<" --only-defines "$(IPRT_OUT_DIR)/errmsgdata-only-defines.h.ts"
4297 $(QUIET)$(CP) --changed -fv -- "$(IPRT_OUT_DIR)/errmsgdata-only-defines.h.ts" "$(IPRT_OUT_DIR)/errmsgdata-only-defines.h"
4298
4299
4300$(IPRT_OUT_DIR)/errmsgwindata.h: \
4301 $(VBOX_PATH_RUNTIME_SRC)/common/err/errmsgcom.sed \
4302 $$(qwildcard ,$$(qaddsuffix ,/WinError.h,$$(SDK_$$(VBOX_WINPSDK)_INCS))) \
4303 | $$(dir $$@)
4304 $(call MSG_GENERATE,,$@,$(deps $@, 2))
4305 $(QUIET)$(SED) -f "$<" --output "$@" $(qdeps sh,$@,2)
4306
4307$(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts +| $(IPRT_OUT_DIR)/errmsgvboxcomdata.h: \
4308 $(VBOX_PATH_RUNTIME_SRC)/VBox/errmsgvboxcom.xsl \
4309 $(VBOX_XIDL_FILE_SRC) \
4310 | $$(dir $$@)
4311 $(call MSG_GENERATE,,$@,$(filter %.xidl,$^))
4312 $(QUIET)$(VBOX_XSLTPROC) -o $(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts $< $(filter %.xidl,$^)
4313 $(QUIET)$(CP) --changed -fv -- $(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
4314
4315$(IPRT_OUT_DIR)/errmsgwindata-all.h.ts +| $(IPRT_OUT_DIR)/errmsgwindata-all.h: \
4316 $$(bldRTErrMsgWinSorter_1_TARGET)
4317 $(call MSG_GENERATE,,$@,$<)
4318 $(QUIET)"$<" --all "$(IPRT_OUT_DIR)/errmsgwindata-all.h.ts"
4319 $(QUIET)$(CP) --changed -fv -- "$(IPRT_OUT_DIR)/errmsgwindata-all.h.ts" "$(IPRT_OUT_DIR)/errmsgwindata-all.h"
4320
4321$(IPRT_OUT_DIR)/errmsgwindata-only-defines.h.ts +| $(IPRT_OUT_DIR)/errmsgwindata-only-defines.h: \
4322 $$(bldRTErrMsgWinSorter_1_TARGET)
4323 $(call MSG_GENERATE,,$@,$<)
4324 $(QUIET)"$<" --only-defines "$(IPRT_OUT_DIR)/errmsgwindata-only-defines.h.ts"
4325 $(QUIET)$(CP) --changed -fv -- "$(IPRT_OUT_DIR)/errmsgwindata-only-defines.h.ts" "$(IPRT_OUT_DIR)/errmsgwindata-only-defines.h"
4326
4327
4328#
4329# Sorter for the IPRT status codes.
4330#
4331BLDPROGS += bldRTErrMsgSorter
4332bldRTErrMsgSorter_TEMPLATE = VBoxBldProg
4333bldRTErrMsgSorter_INCS = $(IPRT_OUT_DIR)
4334bldRTErrMsgSorter_DEPS = $(IPRT_OUT_DIR)/errmsgdata.h
4335bldRTErrMsgSorter_SOURCES = common/err/errmsg-sorter.cpp
4336
4337#
4338# Sorter for the windows error codes.
4339#
4340BLDPROGS.win += bldRTErrMsgWinSorter
4341bldRTErrMsgWinSorter_TEMPLATE = VBoxBldProg
4342bldRTErrMsgWinSorter_INCS = $(IPRT_OUT_DIR)
4343bldRTErrMsgWinSorter_DEPS = \
4344 $(IPRT_OUT_DIR)/errmsgwindata.h \
4345 $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
4346bldRTErrMsgWinSorter_SOURCES = win/errmsgwin-sorter.cpp
4347
4348
4349
4350if "$(KBUILD_TARGET)" == "freebsd"
4351#
4352# FreeBSDGeneratedKernelHeaders - Generate some kernel interface headers.
4353#
4354# These are used by:
4355# - The RTMp* API in IPRT.
4356# - VBoxGuest
4357#
4358# Note! We cannot give a output path to the awk program, it will always
4359# generate the header next to the source. So, we'll have to temporarily copy
4360# the source file to the destination directory to work.
4361#
4362VBOX_AWK := /usr/bin/awk
4363INSTALLS += FreeBSDGeneratedKernelHeaders
4364FreeBSDGeneratedKernelHeaders_INST = gen-sys-hdrs/
4365FreeBSDGeneratedKernelHeaders_SOURCES = \
4366 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/bus_if.h \
4367 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/device_if.h \
4368 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/pci_if.h
4369FreeBSDGeneratedKernelHeaders_CLEAN = $(FreeBSDGeneratedKernelHeaders_SOURCES)
4370
4371$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/bus_if.h: $(VBOX_FREEBSD_SRC)/kern/bus_if.m | $$(dir $$@)
4372 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
4373 $(QUIET)$(CP) -f $< $(@D)/bus_if.m
4374 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/bus_if.m -h -p
4375 $(QUIET)$(RM) $(@D)/bus_if.m
4376
4377$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/device_if.h: $(VBOX_FREEBSD_SRC)/kern/device_if.m | $$(dir $$@)
4378 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
4379 $(QUIET)$(CP) -f $< $(@D)/device_if.m
4380 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/device_if.m -h -p
4381 $(QUIET)$(RM) $(@D)/device_if.m
4382
4383$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/pci_if.h: $(VBOX_FREEBSD_SRC)/dev/pci/pci_if.m | $$(dir $$@)
4384 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
4385 $(QUIET)$(CP) -f $< $(@D)/pci_if.m
4386 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/pci_if.m -h -p
4387 $(QUIET)$(RM) $(@D)/pci_if.m
4388endif # FreeBSD
4389
4390
4391#
4392# Aliases for .cpp.h files so we can more easily do syntax checking from the editor.
4393#
4394ldrELFRelocatable.cpp.o: ldrELF.o
4395ldrELFRelocatable.cpp.obj: ldrELF.obj
4396
4397
4398#
4399# Doxygen documentation.
4400#
4401IPRT_DOXYFILE_INPUT_DIRS = \
4402 $(PATH_ROOT)/include/iprt \
4403 $(PATH_ROOT)/include/iprt/cpp \
4404 $(PATH_ROOT)/include/iprt/linux \
4405 $(PATH_ROOT)/include/iprt/nocrt \
4406 $(PATH_ROOT)/include/iprt/nocrt/x86 \
4407 $(PATH_ROOT)/include/iprt/nocrt/amd64 \
4408 $(PATH_ROOT)/include/iprt/nocrt/compiler \
4409 $(VBOX_PATH_RUNTIME_SRC)/include/internal \
4410 $(VBOX_PATH_RUNTIME_SRC)/common/alloc \
4411 $(VBOX_PATH_RUNTIME_SRC)/common/asm \
4412 $(VBOX_PATH_RUNTIME_SRC)/common/checksum \
4413 $(VBOX_PATH_RUNTIME_SRC)/common/dbg \
4414 $(VBOX_PATH_RUNTIME_SRC)/common/err \
4415 $(VBOX_PATH_RUNTIME_SRC)/common/ldr \
4416 $(VBOX_PATH_RUNTIME_SRC)/common/log \
4417 $(VBOX_PATH_RUNTIME_SRC)/common/math \
4418 $(VBOX_PATH_RUNTIME_SRC)/common/math/amd64 \
4419 $(VBOX_PATH_RUNTIME_SRC)/common/math/gcc \
4420 $(VBOX_PATH_RUNTIME_SRC)/common/math/x86 \
4421 $(VBOX_PATH_RUNTIME_SRC)/common/misc \
4422 $(VBOX_PATH_RUNTIME_SRC)/common/path \
4423 $(VBOX_PATH_RUNTIME_SRC)/common/rand \
4424 $(VBOX_PATH_RUNTIME_SRC)/common/string \
4425 $(VBOX_PATH_RUNTIME_SRC)/common/table \
4426 $(VBOX_PATH_RUNTIME_SRC)/common/time \
4427 $(VBOX_PATH_RUNTIME_SRC)/VBox \
4428 $(foreach dir, $(VBOX_PATH_RUNTIME_SRC) $(VBOX_PATH_RUNTIME_SRC)/r3 $(VBOX_PATH_RUNTIME_SRC)/r0drv,\
4429 $(dir) \
4430 $(dir)/darwin \
4431 $(dir)/haiku \
4432 $(dir)/linux \
4433 $(dir)/nt \
4434 $(dir)/os2 \
4435 $(dir)/solaris \
4436 $(dir)/win \
4437 $(dir)/win32 \
4438 $(dir)/win64 \
4439 $(dir)/generic \
4440 )
4441
4442# These must come first in order to make things look nice.
4443IPRT_DOXYFILE_INPUT_FIRST =\
4444 $(PATH_ROOT)/include/iprt/cdefs.h \
4445 $(PATH_ROOT)/include/iprt/types.h \
4446 $(PATH_ROOT)/include/iprt/runtime.h \
4447 $(PATH_ROOT)/include/iprt/param.h \
4448 $(PATH_ROOT)/include/iprt/assert.h \
4449 $(PATH_ROOT)/include/iprt/asm.h \
4450
4451IPRT_DOXYFILE_INPUT := \
4452 $(filter-out %.cpp.h, $(sort $(wildcard $(addsuffix /*.h, $(IPRT_DOXYFILE_INPUT_DIRS)))) ) \
4453 $(foreach dir, $(IPRT_DOXYFILE_INPUT_DIRS), $(wildcard $(dir)/*.cpp $(dir)/.c $(dir)/.asm))
4454IPRT_DOXYFILE_INPUT := \
4455 $(IPRT_DOXYFILE_INPUT_FIRST) \
4456 $(sort $(filter-out $(IPRT_DOXYFILE_INPUT_FIRST), $(IPRT_DOXYFILE_INPUT)))
4457
4458
4459IPRT_DOXYFILE_OUTPUT = $(PATH_OUT)/docs/iprt
4460BLDDIRS += $(IPRT_DOXYFILE_OUTPUT)
4461
4462includedep $(IPRT_DOXYFILE_OUTPUT)/Doxyfile.iprt.dep
4463
4464# Generate the Doxyfile
4465$(IPRT_DOXYFILE_OUTPUT)/Doxyfile.iprt: \
4466 $(VBOX_PATH_RUNTIME_SRC)/Doxyfile \
4467 $(VBOX_PATH_RUNTIME_SRC)/Makefile.kmk \
4468 $(comp-vars IPRT_DOXYFILE_INPUT,DOXYGEN_IPRT_INPUT_PREV,FORCE) \
4469 $(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_IPRT_OUTPUT_PREV,FORCE) \
4470 | $$(dir $$@)
4471 $(QUIET)$(RM) -f $@ [email protected] [email protected]
4472 $(QUIET)$(CP) -f $(VBOX_PATH_RUNTIME_SRC)/Doxyfile [email protected]
4473 $(QUIET)$(APPEND) [email protected]
4474 $(QUIET)$(APPEND) [email protected] "OUTPUT_DIRECTORY = $(IPRT_DOXYFILE_OUTPUT)"
4475 $(QUIET)$(APPEND) [email protected] "WARN_LOGFILE = $(IPRT_DOXYFILE_OUTPUT)/errors"
4476 $(QUIET)$(APPEND) [email protected] 'INCLUDE_PATH = ' \
4477 '$(PATH_ROOT)/include' \
4478 '$(VBOX_PATH_RUNTIME_SRC)/include' \
4479 '$(VBOX_PATH_RUNTIME_SRC)/' \
4480 '$(VBOX_PATH_RUNTIME_SRC)/common/table'
4481 $(QUIET)$(APPEND) [email protected] "INCLUDE_FILE_PATTERNS = *.cpp.h"
4482 $(QUIET)$(APPEND) [email protected] "PREDEFINED += $(ARCH_BITS_DEFS)"
4483 $(QUIET)$(APPEND) [email protected] 'EXCLUDE = '\
4484 '$(VBOX_PATH_RUNTIME_SRC)/common/string/unidata-flags.cpp' \
4485 '$(VBOX_PATH_RUNTIME_SRC)/common/string/unidata-lower.cpp' \
4486 '$(VBOX_PATH_RUNTIME_SRC)/common/string/unidata-upper.cpp' \
4487 $(QUIET)$(APPEND) [email protected]
4488 $(QUIET)$(APPEND) [email protected] 'INPUT = $(foreach x,$(IPRT_DOXYFILE_INPUT),\$(NLTAB)$(x))'
4489 $(QUIET)$(APPEND) [email protected]
4490 $(QUIET)$(MV) -f [email protected] $@
4491 $(QUIET)$(APPEND) [email protected] "DOXYGEN_IPRT_OUTPUT_PREV = $(IPRT_DOXYFILE_OUTPUT)"
4492 $(QUIET)$(APPEND) [email protected] "DOXYGEN_IPRT_INPUT_PREV = $(IPRT_DOXYFILE_INPUT)"
4493
4494# Do the actual job.
4495$(IPRT_DOXYFILE_OUTPUT)/docs.iprt: $(IPRT_DOXYFILE_OUTPUT)/Doxyfile.iprt $$(IPRT_DOXYFILE_INPUT) \
4496 | $(IPRT_DOXYFILE_OUTPUT)/
4497 $(QUIET)$(RM) -f $@
4498 $(QUIET)$(RM) -Rf $(IPRT_DOXYFILE_OUTPUT)/html/
4499 doxygen $(DOXYGEN_OPTS) $(IPRT_DOXYFILE_OUTPUT)/Doxyfile.iprt
4500 $(SED) -e '/warning. Unexpected tag .dd. found/d' \
4501 -e '/warning. Unsupported xml.html tag .globalScope. found/d' \
4502 --output $(IPRT_DOXYFILE_OUTPUT)/errors2 \
4503 $(IPRT_DOXYFILE_OUTPUT)/errors
4504 $(CAT) $(IPRT_DOXYFILE_OUTPUT)/errors2
4505 $(SED) -e "/[^ ]/q 1" $(IPRT_DOXYFILE_OUTPUT)/errors2
4506 $(APPEND) $@
4507
4508# aliases
4509docs.iprt: $(IPRT_DOXYFILE_OUTPUT)/docs.iprt
4510if !defined(VBOX_ONLY_DOCS) && defined(VBOX_WITH_ALL_DOXYGEN_TARGETS)
4511docs: $(IPRT_DOXYFILE_OUTPUT)/docs.iprt
4512endif
4513
4514test-doxygen::
4515 @echo test-$(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_IPRT_OUTPUT_PREV,FORCE)
4516 @echo $(IPRT_DOXYFILE_OUTPUT)
4517 @echo $(DOXYGEN_IPRT_OUTPUT_PREV)
4518 @echo $(IPRT_DOXYFILE_INPUT)
4519
4520
4521#
4522# Test mangling.
4523#
4524if1of ($(LIBRARIES),RuntimeR3 RuntimeR0 RuntimeR0Drv RuntimeRC)
4525 test-mangling:: $(IPRT_OUT_DIR)/mangling.run
4526 OTHERS += $(IPRT_OUT_DIR)/mangling.run
4527 OTHER_CLEAN += $(IPRT_OUT_DIR)/mangling.run
4528 $(IPRT_OUT_DIR)/mangling.run: \
4529 $$(RuntimeR3_1_TARGET) \
4530 $$(RuntimeR0_1_TARGET) \
4531 $$(RuntimeR0Drv_1_TARGET) \
4532 $$(RuntimeRC_1_TARGET)
4533 if1of ($(KBUILD_TARGET), win os2)
4534 $(call MSG_L1,IPRT: skipped mangling test.)
4535 else
4536# Generate a SED script from mangling.h that checks for known symbols.
4537 $(QUIET)$(SED) \
4538 -e '/^# *define.*RT_MANGLER/!d' \
4539 -e 's/^.*RT_MANGLER(\([^)][^)]*\)).*$(DOLLAR)/\/^\1$(DOLLAR)\/b ok/' \
4540 $(PATH_ROOT)/include/iprt/mangling.h \
4541 --output "$@"
4542 $(QUIET)$(APPEND) -n '$@' \
4543 ':bad' \
4544 's/^\(.*\)$(DOLLAR)/error: Missing # define \1 /' \
4545 ':bad-pad' \
4546 '/^.\{0,70\}$(DOLLAR)/ { s/$(DOLLAR)/ /; bbad-pad; }' \
4547 's/define \([^ ]*\) \([ ]*\)$(DOLLAR)/define \1 \2RT_MANGLER(\1)/' \
4548 'p' \
4549 $(if-expr !defined(IPRT_IGNORE_TEST_MANGLING),'q 1') \
4550 '' \
4551 ':ok' \
4552 'd'
4553# Find the best way to generate a symbol list and subject it to mangling.h.
4554 if $(intersects $(KBUILD_TARGET), linux) && "$(VBOX_GCC_fvisibility-hidden)"
4555 $(call MSG_L1,IPRT: Testing mangling and visiblity for newer gcc...)
4556 $(QUIET)readelf -Ws $^ \
4557 | $(SED) \
4558 -e 's/[[:space:]]\+/ /g' \
4559 -e '/^ *[[:digit:]]\+:/!d' \
4560 -e 's/^ \+[[:digit:]]\+: \+[[:xdigit:]]\+ \+[[:digit:]]\+ \+//' \
4561 -e '/^SECTION/d' \
4562 -e '/^FILE/d' \
4563 -e 's/^[[:alpha:]]\+ \+//' \
4564 -e '/LOCAL/d' \
4565 -e 's/^[[:alpha:]]\+ \+//' \
4566 -e '/^HIDDEN [[:xdigit:]]\+ RT/bkeep-hidden' \
4567 -e '/^HIDDEN [[:xdigit:]]\+ g_[a-z0-9]*RT/bkeep-hidden' \
4568 -e '/^HIDDEN/d' \
4569 -e ':keep-hidden' \
4570 -e 's/^[[:alpha:]]\+ \+//' \
4571 -e '/^UND/d' \
4572 -e 's/^[[:digit:]]\+ \+//' \
4573 \
4574 -e '/^nocrt_/d' \
4575 -e '/^bzero/d' \
4576 -e '/^memchr/d' \
4577 -e '/^memcmp/d' \
4578 -e '/^memcpy/d' \
4579 -e '/^mempcpy/d' \
4580 -e '/^memmove/d' \
4581 -e '/^memset/d' \
4582 -e '/^strchr/d' \
4583 -e '/^strpbrk/d' \
4584 -e '/^_Z7strpbrk/d' \
4585 -e '/^strcmp/d' \
4586 -e '/^strcpy/d' \
4587 -e '/^strncpy/d' \
4588 -e '/^strlen/d' \
4589 -e '/^setjmp/d' \
4590 -e '/^longjmp/d' \
4591 -e '/^_Z[[:alpha:]]*[[:digit:]]\+RTC/d' \
4592 -e '/^_Z[[:alpha:]]*[[:digit:]]\+RTC/d' \
4593 \
4594 -e '/^_ZnwjPv/d' \
4595 -e '/^_ZnwmPv/d' \
4596 -e '/^_ZNSt[1-9]/d' \
4597 \
4598 -e '/^_ZN[a-zA-Z]*St[[:digit:]]*_*[lL]ist/d' \
4599 -e '/^_ZN[a-zA-Z]*[[:digit:]]*__gnu_cxx/d' \
4600 -e '/^_ZNSa.*ElementNode.*/d' \
4601 -e '/^_ZSt.*ElementNode.*/d' \
4602 \
4603 -e '/^_Z[[:digit:]]\+dbus/d' \
4604 -e '/^_Z13RTDBusLoadLibv/d' \
4605 \
4606 -e '/^g_[ac]VTG/d' \
4607 -e '/^g_VTGObjHeader/d' \
4608 -e '/^g_VTGProbeData/d' \
4609 -e '/^VTGProbeStub/d' \
4610 -e '/^g_achVTGStringTable/d' \
4611 -e '/^g_acVTGProbeEnabled/d' \
4612 \
4613 -e '/^VBoxHost_/d'\
4614 -e '/^VBoxGuest_/d'\
4615 | $(SED) -nf "$@"
4616 endif
4617 $(call MSG_L1,IPRT: Testing mangling using nm...)
4618 $(QUIET)$(VBOX_NM) $^ 2> /dev/null \
4619 | $(SED) -n \
4620 -e 's/^[0-9a-f][0-9a-f]* //' \
4621 -e '/^[TUDB] /!d' \
4622 -e 's/^. //' \
4623 $(if-expr "$(KBUILD_TARGET)" == "darwin" || "$(KBUILD_TARGET)" == "os2" || "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.x86", \
4624 -e 's/^_//',) \
4625 \
4626 -e '/^g_cchrt/d'\
4627 -e '/^g_frt/d'\
4628 -e '/^g_offrt/d'\
4629 -e '/^g_pfnrt/d'\
4630 -e '/^g_rt/d'\
4631 -e '/^g_szrt/d'\
4632 -e '/^g_ProcessSelf/d'\
4633 -e '/^g_u64ProgramStart/d'\
4634 -e '/^g_enmProcessPriority/d'\
4635 -e '/^g_hDbgModStrCache/d'\
4636 -e '/^g_pfnR0Darwin/d'\
4637 -e '/^g_pDarwinLockGroup/d'\
4638 $(if-expr "$(KBUILD_TARGET)" == "solaris", \
4639 -e '/^g_kLdrRdrFileOps/d' \
4640 -e '/^g_pSUPGlobalInfoPage/d' \
4641 -e '/^g_Logger/d' \
4642 -e '/^g_RelLogger/d' \
4643 -e '/^g_VM/d',) \
4644 $(if-expr "$(KBUILD_TARGET)" == "linux", \
4645 -e '/^g_kLdrRdrFileOps/d',) \
4646 \
4647 -e '/^g_[ac]VTG/d' \
4648 -e '/^g_VTGObjHeader/d' \
4649 -e '/^g_VTGProbeData/d' \
4650 -e '/^VTGProbeStub/d' \
4651 -e '/^g_achVTGStringTable/d' \
4652 -e '/^g_acVTGProbeEnabled/d' \
4653 \
4654 -e '/^RTDBusLoadLib/d' \
4655 \
4656 -e '/^RT/p' \
4657 -e '/^g_/p' \
4658 | $(SED) -nf "$@"
4659 endif
4660endif
4661 $(QUIET)$(APPEND) -t $@
4662
4663if !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_VALIDATIONKIT) && !defined(VBOX_ONLY_DOCS)
4664#
4665# Windows build tool.
4666#
4667BLDPROGS.win += ntBldSymDb
4668ntBldSymDb_TEMPLATE = VBoxAdvBldProg
4669ntBldSymDb_INCS = .
4670ntBldSymDb_SOURCES = r0drv/nt/ntBldSymDb.cpp
4671endif
4672
4673
4674#
4675# Generate the rules (we're the to sub-makefile).
4676#
4677include $(FILE_KBUILD_SUB_FOOTER)
4678
4679
4680#
4681# Aliases for code templates.
4682#
4683rsa-template.o rsa-template.obj: rsa-core.o rsa-asn1-decoder.o rsa-sanity.o rsa-init.o
4684spc-template.o spc-template.obj: spc-core.o spc-asn1-decoder.o spc-sanity.o spc-init.o
4685taf-template.o taf-template.obj: taf-core.o taf-asn1-decoder.o taf-sanity.o taf-init.o
4686tsp-template.o tsp-template.obj: tsp-core.o tsp-asn1-decoder.o tsp-sanity.o tsp-init.o
4687x509-template.o x509-template.obj: x509-core.o x509-asn1-decoder.o x509-sanity.o x509-init.o
4688pkcs7-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