VirtualBox

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

Last change on this file since 58137 was 58137, checked in by vboxsync, 9 years ago

Runtime/Makefile.kmk: Build fix attempt

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 95.0 KB
Line 
1# $Id: Makefile.kmk 58137 2015-10-09 11:22:38Z vboxsync $
2## @file
3# Sub-Makefile for the IPRT.
4#
5
6#
7# Copyright (C) 2006-2015 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.amd64 += RuntimeGuestR3-x86 RuntimeGuestR3Shared-x86
36 ifdef VBOX_WITH_ADDITION_DRIVERS
37 LIBRARIES += RuntimeGuestR0
38 #LIBRARIES.os2 += RuntimeGuestR0OS2Warp3
39 LIBRARIES.win.x86 += RuntimeGuestR0NT4
40 endif
41
42else ifdef VBOX_ONLY_VALIDATIONKIT
43 #
44 # Only build the Validation Kit.
45 #
46 LIBRARIES += RuntimeGuestR3 RuntimeGuestR3Shared RuntimeR3 RuntimeR0 RuntimeBldProg
47 LIBRARIES.solaris += RuntimeR0Stub
48 LIBRARIES.win += RuntimeR0Stub
49 LIBRARIES.win.x86 += RuntimeR3VccTricks
50 include $(PATH_SUB_CURRENT)/tools/Makefile.kmk
51
52else ifdef VBOX_ONLY_DOCS
53 #
54 # Build docs only - need just regular R3 runtime.
55 #
56 LIBRARIES += RuntimeR3 RuntimeBldProg
57
58else ifdef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
59 #
60 # Build extension packs using import libraries as much as possible (VBoxDTrace
61 # needs Ring-0 IPRT, though).
62 #
63 LIBRARIES += RuntimeBldProg RuntimeR0
64 LIBRARIES.solaris += RuntimeR0Stub
65 LIBRARIES.win += RuntimeR0Stub RuntimeRCStub
66 include $(PATH_SUB_CURRENT)/tools/Makefile.kmk
67
68else # !VBOX_ONLY_ADDITIONS && !VBOX_ONLY_VALIDATIONKIT && !VBOX_ONLY_DOCS
69
70 #
71 # Normal build.
72 #
73 ifndef VBOX_ONLY_EXTPACKS
74 include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
75 endif
76 include $(PATH_SUB_CURRENT)/tools/Makefile.kmk
77
78 BLDPROGS += uniread
79 LIBRARIES += RuntimeR3 RuntimeBldProg RuntimeR0 RuntimeEFCPP RuntimeR3NoCRTGCC
80 LIBRARIES.solaris += RuntimeR0Stub
81 LIBRARIES.win += RuntimeR0Stub
82 ifdef VBOX_WITH_RAW_MODE
83 LIBRARIES += RuntimeRC
84 LIBRARIES.win += RuntimeRCStub
85 endif
86 ifdef VBOX_WITH_VBOXDRV
87 LIBRARIES += RuntimeR0Drv
88 endif
89 ifdef VBOX_WITH_ADDITIONS
90 LIBRARIES += RuntimeGuestR3 RuntimeGuestR3Shared
91 LIBRARIES.win.amd64 += RuntimeGuestR3-x86 RuntimeGuestR3Shared-x86
92 ifdef VBOX_WITH_ADDITION_DRIVERS
93 LIBRARIES += RuntimeGuestR0
94 endif
95 #LIBRARIES.os2 += RuntimeGuestR0OS2Warp3
96 LIBRARIES.win.x86 += RuntimeGuestR0NT4
97 endif # VBOX_WITH_ADDITIONS
98 LIBRARIES.win.x86 += RuntimeR3VccTricks
99 DLLS += VBoxRT
100 ifdef VBOX_WITH_32_ON_64_MAIN_API
101 DLLS += VBoxRT-x86
102 endif
103endif
104
105
106# Always build the ntdll import libraries on windows.
107LIBRARIES.win += RuntimeR3NtDll-x86
108if1of (amd64, $(KBUILD_TARGET_ARCH) $(KBUILD_HOST_ARCH))
109 LIBRARIES.win += RuntimeR3NtDll-amd64
110endif
111
112
113# Always build the import library.
114IMPORT_LIBS += VBoxRTImp
115
116
117# Where the generated stuff goes.
118IPRT_OUT_DIR := $(PATH_TARGET)/Runtime
119BLDDIRS += $(IPRT_OUT_DIR)
120OTHER_CLEAN += \
121 $(IPRT_OUT_DIR)/errmsgdata.h \
122 $(IPRT_OUT_DIR)/errmsgcomdata.h \
123 $(IPRT_OUT_DIR)/errmsgvboxcomdata.h \
124 $(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts \
125 $(IPRT_OUT_DIR)/Doxyfile.iprt \
126 $(IPRT_OUT_DIR)/Doxyfile.iprt.dep \
127 $(IPRT_OUT_DIR)/docs.iprt
128
129
130#
131# Globals
132#
133VBOX_PATH_RUNTIME_SRC := $(PATH_SUB_CURRENT)
134
135
136#
137# Set the defines that buildconfig.cpp needs. Its used by several targets.
138#
139common/misc/buildconfig.cpp_DEFS = \
140 IPRT_BLDCFG_SCM_REV=$(VBOX_SVN_REV) \
141 IPRT_BLDCFG_VERSION_STRING=\"$(VBOX_VERSION_STRING)\" \
142 IPRT_BLDCFG_VERSION_MAJOR=$(VBOX_VERSION_MAJOR) \
143 IPRT_BLDCFG_VERSION_MINOR=$(VBOX_VERSION_MINOR) \
144 IPRT_BLDCFG_VERSION_BUILD=$(VBOX_VERSION_BUILD) \
145 IPRT_BLDCFG_TARGET=\"$(KBUILD_TARGET)\" \
146 IPRT_BLDCFG_TARGET_ARCH=\"$(KBUILD_TARGET_ARCH)\" \
147 IPRT_BLDCFG_TYPE=\"$(KBUILD_TYPE)\"
148
149#
150# Unicode Specification reader used to regenerate unidata-*.cpp.
151#
152uniread_TEMPLATE = VBoxBldProg
153uniread_SOURCES = common/string/uniread.cpp
154uniread_INCS = include
155
156#
157# Win64 assembly sources.
158#
159RuntimeWin64ASM_SOURCES = \
160 win/amd64/ASMAtomicBitClear.asm \
161 win/amd64/ASMAtomicBitTestAndToggle.asm \
162 win/amd64/ASMAtomicBitToggle.asm \
163 win/amd64/ASMAtomicReadU64.asm \
164 win/amd64/ASMAtomicXchgU16.asm \
165 win/amd64/ASMAtomicXchgU8.asm \
166 win/amd64/ASMBitFirstClear.asm \
167 win/amd64/ASMBitFirstSet.asm \
168 win/amd64/ASMGetCS.asm \
169 win/amd64/ASMGetDS.asm \
170 win/amd64/ASMGetES.asm \
171 win/amd64/ASMGetFlags.asm \
172 win/amd64/ASMGetFS.asm \
173 win/amd64/ASMGetGS.asm \
174 win/amd64/ASMGetSS.asm \
175 win/amd64/ASMProbeReadByte.asm \
176 win/amd64/ASMSetFlags.asm \
177 win/amd64/ASMGetDR0.asm \
178 win/amd64/ASMGetDR1.asm \
179 win/amd64/ASMGetDR2.asm \
180 win/amd64/ASMGetDR3.asm \
181 win/amd64/ASMGetDR6.asm \
182 win/amd64/ASMGetDR7.asm \
183 common/asm/ASMAtomicCmpXchgU8.asm \
184 common/asm/ASMMultU32ByU32DivByU32.asm \
185 common/asm/ASMMultU64ByU32DivByU32.asm \
186 common/asm/ASMCpuId_Idx_ECX.asm \
187 common/asm/ASMNopPause.asm \
188 common/asm/ASMGetIDTR.asm \
189 common/asm/ASMGetIdtrLimit.asm \
190 common/asm/ASMSetIDTR.asm \
191 common/asm/ASMGetGDTR.asm \
192 common/asm/ASMSetGDTR.asm \
193 common/asm/ASMGetLDTR.asm \
194 common/asm/ASMGetSegAttr.asm \
195 common/asm/ASMGetTR.asm
196
197#
198# Win32 assembly sources.
199#
200RuntimeWin32ASM_SOURCES = \
201 common/asm/ASMAtomicCmpXchgU8.asm \
202 common/asm/ASMMultU32ByU32DivByU32.asm \
203 common/asm/ASMMultU64ByU32DivByU32.asm \
204 common/asm/ASMCpuId_Idx_ECX.asm \
205 common/asm/ASMGetSegAttr.asm
206
207#
208# NoCRT sources (minus math stuff).
209#
210if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
211RuntimeNoCrt_SOURCES = \
212 common/misc/setjmp.asm \
213 common/string/memchr.asm \
214 common/string/memcmp.asm \
215 common/string/memcpy.asm \
216 common/string/mempcpy.asm \
217 common/string/memmove.asm \
218 common/string/memset.asm \
219 common/string/strchr.asm \
220 common/string/strcpy.asm \
221 common/string/strncpy.asm \
222 common/string/strcmp.asm \
223 common/string/strlen.asm
224endif
225
226
227#
228# RuntimeR3 - Static Runtime for Ring-3 executables.
229#
230RuntimeR3_TEMPLATE = VBoxR3Static
231RuntimeR3_SDKS = VBOX_OPENSSL VBOX_LIBXML2
232RuntimeR3_SDKS.win = $(VBOX_WINPSDK) $(VBOX_WINDDK)
233RuntimeR3_DEFS = \
234 IN_RT_R3 \
235 IN_SUP_R3 \
236 LDR_WITH_NATIVE \
237 LDR_WITH_ELF32 \
238 LDR_WITH_PE \
239 RT_WITH_VBOX \
240 RT_NO_GIP \
241 RT_WITHOUT_NOCRT_WRAPPERS \
242 IPRT_WITH_OPENSSL
243#RuntimeR3_DEFS += RTMEM_WRAP_TO_EF_APIS
244ifdef IPRT_WITH_KSTUFF
245 RuntimeR3_DEFS += LDR_WITH_KLDR
246endif
247ifdef IPRT_WITH_LZJB
248 RuntimeR3_DEFS += RTZIP_USE_LZJB
249endif
250ifdef IPRT_WITH_LZO
251 RuntimeR3_DEFS += RTZIP_USE_LZO
252endif
253ifn1of ($(KBUILD_TARGET), win)
254 RuntimeR3_DEFS += RT_WITH_ICONV_CACHE
255endif
256ifdef IPRT_WITH_FUTEX_BASED_SEMS
257 RuntimeR3_DEFS.linux += IPRT_WITH_FUTEX_BASED_SEMS
258endif
259RuntimeR3_INCS = \
260 include \
261 $(SDK_VBOX_ZLIB_INCS)
262RuntimeR3_INCS += \
263 $(PATH_ROOT)/src/libs/liblzf-3.4
264ifdef IPRT_WITH_KSTUFF
265 RuntimeR3_INCS += \
266 $(PATH_ROOT)/src/libs/kStuff/kStuff/include
267endif
268
269# RuntimeR3_INCS.solaris = \
270# /usr/include
271
272RuntimeR3_SOURCES = \
273 common/alloc/alloc.cpp \
274 common/alloc/heapsimple.cpp \
275 common/alloc/heapoffset.cpp \
276 common/alloc/memcache.cpp \
277 common/alloc/memtracker.cpp \
278 common/asn1/asn1-basics.cpp \
279 common/asn1/asn1-cursor.cpp \
280 common/asn1/asn1-default-allocator.cpp \
281 common/asn1/asn1-efence-allocator.cpp \
282 common/asn1/asn1-dump.cpp \
283 common/asn1/asn1-encode.cpp \
284 common/asn1/asn1-ut-bitstring.cpp \
285 common/asn1/asn1-ut-bitstring-decode.cpp \
286 common/asn1/asn1-ut-boolean.cpp \
287 common/asn1/asn1-ut-boolean-decode.cpp \
288 common/asn1/asn1-ut-core.cpp \
289 common/asn1/asn1-ut-core-decode.cpp \
290 common/asn1/asn1-ut-dyntype.cpp \
291 common/asn1/asn1-ut-dyntype-decode.cpp \
292 common/asn1/asn1-ut-integer.cpp \
293 common/asn1/asn1-ut-integer-decode.cpp \
294 common/asn1/asn1-ut-null.cpp \
295 common/asn1/asn1-ut-null-decode.cpp \
296 common/asn1/asn1-ut-objid.cpp \
297 common/asn1/asn1-ut-objid-decode.cpp \
298 common/asn1/asn1-ut-octetstring.cpp \
299 common/asn1/asn1-ut-octetstring-decode.cpp \
300 common/asn1/asn1-ut-string.cpp \
301 common/asn1/asn1-ut-string-decode.cpp \
302 common/asn1/asn1-ut-time.cpp \
303 common/asn1/asn1-ut-time-decode.cpp \
304 common/checksum/adler32.cpp \
305 common/checksum/crc32.cpp \
306 common/checksum/crc32c.cpp \
307 common/checksum/crc64.cpp \
308 common/checksum/alt-md2.cpp \
309 common/checksum/alt-md5.cpp \
310 common/checksum/alt-sha1.cpp \
311 common/checksum/alt-sha256.cpp \
312 common/checksum/alt-sha512.cpp \
313 common/checksum/md2str.cpp \
314 common/checksum/md5str.cpp \
315 common/checksum/ipv4.cpp \
316 common/checksum/ipv6.cpp \
317 common/checksum/manifest.cpp \
318 common/checksum/manifest2.cpp \
319 common/checksum/manifest3.cpp \
320 common/checksum/manifest-file.cpp \
321 common/checksum/RTSha1Digest.cpp \
322 common/checksum/RTSha256Digest.cpp \
323 common/checksum/sha1str.cpp \
324 common/checksum/sha224str.cpp \
325 common/checksum/sha256str.cpp \
326 common/checksum/sha384str.cpp \
327 common/checksum/sha512str.cpp \
328 common/checksum/sha512t224str.cpp \
329 common/checksum/sha512t256str.cpp \
330 common/checksum/x509.cpp \
331 common/crypto/digest-core.cpp \
332 common/crypto/digest-builtin.cpp \
333 common/crypto/iprt-openssl.cpp \
334 common/crypto/rsa-asn1-decoder.cpp \
335 common/crypto/rsa-core.cpp \
336 common/crypto/rsa-init.cpp \
337 common/crypto/rsa-sanity.cpp \
338 common/crypto/pemfile.cpp \
339 common/crypto/pkcs7-asn1-decoder.cpp \
340 common/crypto/pkcs7-core.cpp \
341 common/crypto/pkcs7-init.cpp \
342 common/crypto/pkcs7-sanity.cpp \
343 common/crypto/pkcs7-verify.cpp \
344 common/crypto/pkix-signature-builtin.cpp \
345 common/crypto/pkix-signature-core.cpp \
346 common/crypto/pkix-signature-rsa.cpp \
347 common/crypto/pkix-util.cpp \
348 common/crypto/pkix-verify.cpp \
349 common/crypto/spc-asn1-decoder.cpp \
350 common/crypto/spc-core.cpp \
351 common/crypto/spc-init.cpp \
352 common/crypto/spc-sanity.cpp \
353 common/crypto/x509-asn1-decoder.cpp \
354 common/crypto/x509-certpaths.cpp \
355 common/crypto/x509-core.cpp \
356 common/crypto/x509-file.cpp \
357 common/crypto/x509-init.cpp \
358 common/crypto/x509-sanity.cpp \
359 common/crypto/x509-verify.cpp \
360 common/crypto/taf-asn1-decoder.cpp \
361 common/crypto/taf-core.cpp \
362 common/crypto/taf-init.cpp \
363 common/crypto/taf-sanity.cpp \
364 common/crypto/tsp-asn1-decoder.cpp \
365 common/crypto/tsp-core.cpp \
366 common/crypto/tsp-init.cpp \
367 common/crypto/tsp-sanity.cpp \
368 common/crypto/store.cpp \
369 common/crypto/store-inmem.cpp \
370 common/crypto/store-cert-add-basic.cpp \
371 common/crypto/RTCrStoreCertAddFromJavaKeyStore.cpp \
372 common/crypto/RTCrStoreCertAddWantedFromFishingExpedition.cpp \
373 common/crypto/RTCrStoreCertExportAsPem.cpp \
374 common/dbg/dbg.cpp \
375 common/dbg/dbgas.cpp \
376 common/dbg/dbgcfg.cpp \
377 common/dbg/dbgmod.cpp \
378 common/dbg/dbgmodldr.cpp \
379 common/dbg/dbgmodcontainer.cpp \
380 common/dbg/dbgmoddeferred.cpp \
381 common/dbg/dbgmodexports.cpp \
382 common/dbg/dbgmodcodeview.cpp \
383 common/dbg/dbgmoddwarf.cpp \
384 common/dbg/dbgmodnm.cpp \
385 common/dvm/dvm.cpp \
386 common/dvm/dvmbsdlabel.cpp \
387 common/dvm/dvmgpt.cpp \
388 common/dvm/dvmmbr.cpp \
389 common/dvm/dvmvfs.cpp \
390 common/err/errinfo.cpp \
391 common/err/errinfo-alloc.cpp \
392 common/err/errmsg.cpp \
393 common/err/RTErrConvertFromErrno.cpp \
394 common/err/RTErrConvertToErrno.cpp \
395 common/filesystem/filesystem.cpp \
396 common/filesystem/filesystemext.cpp \
397 common/ldr/ldr.cpp \
398 common/ldr/ldrELF.cpp \
399 common/ldr/ldrEx.cpp \
400 common/ldr/ldrFile.cpp \
401 common/ldr/ldrMemory.cpp \
402 common/ldr/ldrNative.cpp \
403 common/ldr/ldrPE.cpp \
404 common/log/log.cpp \
405 common/log/logellipsis.cpp \
406 common/log/logrel.cpp \
407 common/log/logrelellipsis.cpp \
408 common/log/logcom.cpp \
409 common/log/logformat.cpp \
410 common/log/tracebuf.cpp \
411 common/log/tracedefault.cpp \
412 common/math/bignum.cpp \
413 common/misc/RTAssertMsg1Weak.cpp \
414 common/misc/RTAssertMsg2.cpp \
415 common/misc/RTAssertMsg2Add.cpp \
416 common/misc/RTAssertMsg2AddWeak.cpp \
417 common/misc/RTAssertMsg2AddWeakV.cpp \
418 common/misc/RTAssertMsg2Weak.cpp \
419 common/misc/RTAssertMsg2WeakV.cpp \
420 common/misc/RTFileModeToFlags.cpp \
421 common/misc/RTFileOpenF.cpp \
422 common/misc/RTFileOpenV.cpp \
423 common/misc/RTMemWipeThoroughly.cpp \
424 common/misc/RTSystemIsInsideVM-amd64-x86.cpp \
425 common/misc/assert.cpp \
426 common/misc/buildconfig.cpp \
427 common/misc/cidr.cpp \
428 common/misc/getopt.cpp \
429 common/misc/getoptargv.cpp \
430 common/misc/handle.cpp \
431 common/misc/handletable.cpp \
432 common/misc/handletablectx.cpp \
433 common/misc/handletablesimple.cpp \
434 common/misc/lockvalidator.cpp \
435 common/misc/message.cpp \
436 common/misc/once.cpp \
437 common/misc/req.cpp \
438 common/misc/reqpool.cpp \
439 common/misc/reqqueue.cpp \
440 common/misc/sanity-c.c \
441 common/misc/sanity-cpp.cpp \
442 common/misc/semspingpong.cpp \
443 common/misc/sg.cpp \
444 common/misc/circbuf.cpp \
445 common/misc/thread.cpp \
446 common/misc/term.cpp \
447 common/misc/uri.cpp \
448 common/misc/zero.asm \
449 common/net/netaddrstr2.cpp \
450 common/net/macstr.cpp \
451 common/path/rtPathRootSpecLen.cpp \
452 common/path/rtPathVolumeSpecLen.cpp \
453 common/path/RTPathAbsDup.cpp \
454 common/path/RTPathAbsEx.cpp \
455 common/path/RTPathAbsExDup.cpp \
456 common/path/RTPathAppend.cpp \
457 common/path/RTPathAppendEx.cpp \
458 common/path/RTPathCalcRelative.cpp \
459 common/path/RTPathChangeToDosSlashes.cpp \
460 common/path/RTPathChangeToUnixSlashes.cpp \
461 common/path/RTPathCopyComponents.cpp \
462 common/path/RTPathCountComponents.cpp \
463 common/path/RTPathEnsureTrailingSeparator.cpp \
464 common/path/RTPathExt.cpp \
465 common/path/RTPathFilename.cpp \
466 common/path/RTPathGlob.cpp \
467 common/path/RTPathHasExt.cpp \
468 common/path/RTPathHasPath.cpp \
469 common/path/RTPathJoin.cpp \
470 common/path/RTPathJoinA.cpp \
471 common/path/RTPathJoinEx.cpp \
472 common/path/RTPathParse.cpp \
473 common/path/RTPathParsedReassemble.cpp \
474 common/path/RTPathParseSimple.cpp \
475 common/path/RTPathRealDup.cpp \
476 common/path/RTPathRmCmd.cpp \
477 common/path/RTPathSplit.cpp \
478 common/path/RTPathSplitA.cpp \
479 common/path/RTPathSplitReassemble.cpp \
480 common/path/RTPathStartsWithRoot.cpp \
481 common/path/RTPathStripExt.cpp \
482 common/path/RTPathStripFilename.cpp \
483 common/path/RTPathStripTrailingSlash.cpp \
484 common/path/RTPathTraverseList.cpp \
485 common/path/comparepaths.cpp \
486 common/rand/rand.cpp \
487 common/rand/randadv.cpp \
488 common/rand/randparkmiller.cpp \
489 common/sort/RTSortIsSorted.cpp \
490 common/sort/RTSortApvIsSorted.cpp \
491 common/sort/shellsort.cpp \
492 common/string/RTStrCat.cpp \
493 common/string/RTStrCatEx.cpp \
494 common/string/RTStrCatP.cpp \
495 common/string/RTStrCatPEx.cpp \
496 common/string/RTStrCmp.cpp \
497 common/string/RTStrCopy.cpp \
498 common/string/RTStrCopyEx.cpp \
499 common/string/RTStrCopyP.cpp \
500 common/string/RTStrCopyPEx.cpp \
501 common/string/RTStrNCmp.cpp \
502 common/string/RTStrNLen.cpp \
503 common/string/RTStrNLenEx.cpp \
504 common/string/RTStrPrintHexBytes.cpp \
505 common/string/RTStrStr.cpp \
506 common/string/RTUtf16Copy.cpp \
507 common/string/RTUtf16CopyAscii.cpp \
508 common/string/RTUtf16Cat.cpp \
509 common/string/RTUtf16CatAscii.cpp \
510 common/string/RTUtf16CmpAscii.cpp \
511 common/string/RTUtf16ICmpAscii.cpp \
512 common/string/RTUtf16End.cpp \
513 common/string/RTUtf16NLen.cpp \
514 common/string/RTUtf16NLenEx.cpp \
515 common/string/RTUtf16PrintHexBytes.cpp \
516 common/string/base64.cpp \
517 common/string/simplepattern.cpp \
518 common/string/straprintf.cpp \
519 common/string/strformat.cpp \
520 common/string/strformatnum.cpp \
521 common/string/strformatrt.cpp \
522 common/string/strformattype.cpp \
523 common/string/strhash1.cpp \
524 common/string/stringalloc.cpp \
525 common/string/strprintf.cpp \
526 common/string/strcache.cpp \
527 common/string/strspace.cpp \
528 common/string/strstrip.cpp \
529 common/string/strtonum.cpp \
530 common/string/strversion.cpp \
531 common/string/uni.cpp \
532 common/string/unidata-flags.cpp \
533 common/string/unidata-lower.cpp \
534 common/string/unidata-upper.cpp \
535 common/string/utf-16.cpp \
536 common/string/utf-16-case.cpp \
537 common/string/utf-16-latin-1.cpp \
538 common/string/utf-8.cpp \
539 common/string/utf-8-case.cpp \
540 common/string/utf-8-case2.cpp \
541 common/string/ministring.cpp \
542 common/table/avlgcptr.cpp \
543 common/table/avlhcphys.cpp \
544 common/table/avlgcphys.cpp \
545 common/table/avllu32.cpp \
546 common/table/avlou32.cpp \
547 common/table/avlogcphys.cpp \
548 common/table/avlogcptr.cpp \
549 common/table/avlohcphys.cpp \
550 common/table/avloioport.cpp \
551 common/table/avlpv.cpp \
552 common/table/avlrgcptr.cpp \
553 common/table/avlrogcphys.cpp \
554 common/table/avlrogcptr.cpp \
555 common/table/avlroioport.cpp \
556 common/table/avlroogcptr.cpp \
557 common/table/avlrpv.cpp \
558 common/table/avlruintptr.cpp \
559 common/table/avlrfoff.cpp \
560 common/table/avlru64.cpp \
561 common/table/avlu32.cpp \
562 common/table/avluintptr.cpp \
563 common/table/avlul.cpp \
564 common/table/table.cpp \
565 common/time/time.cpp \
566 common/time/timeprog.cpp \
567 common/time/timesup.cpp \
568 common/vfs/vfsbase.cpp \
569 common/vfs/vfschain.cpp \
570 common/vfs/vfsiosmisc.cpp \
571 common/vfs/vfsmemory.cpp \
572 common/vfs/vfsmisc.cpp \
573 common/vfs/vfsstdfile.cpp \
574 common/vfs/vfsstdpipe.cpp \
575 common/zip/tar.cpp \
576 common/zip/tarcmd.cpp \
577 common/zip/unzipcmd.cpp \
578 common/zip/tarvfs.cpp \
579 common/zip/gzipvfs.cpp \
580 common/zip/pkzip.cpp \
581 common/zip/pkzipvfs.cpp \
582 common/zip/zip.cpp \
583 generic/createtemp-generic.cpp \
584 generic/critsect-generic.cpp \
585 generic/critsectrw-generic.cpp \
586 generic/env-generic.cpp \
587 generic/RTDirCreateUniqueNumbered-generic.cpp \
588 generic/RTEnvDupEx-generic.cpp \
589 generic/RTFileCopy-generic.cpp \
590 generic/RTFileQuerySize-generic.cpp \
591 generic/RTFileReadAll-generic.cpp \
592 generic/RTFileReadAllEx-generic.cpp \
593 generic/RTFileReadAllByHandle-generic.cpp \
594 generic/RTFileReadAllByHandleEx-generic.cpp \
595 generic/RTFileReadAllFree-generic.cpp \
596 generic/RTLogWriteStdErr-generic.cpp \
597 generic/RTLogWriteStdOut-generic.cpp \
598 generic/RTLogWriteUser-generic.cpp \
599 generic/RTPathGetCurrentDrive-generic.cpp \
600 generic/RTPathIsSame-generic.cpp \
601 generic/RTTimerLRCreate-generic.cpp \
602 generic/mempool-generic.cpp \
603 generic/semfastmutex-generic.cpp \
604 generic/semxroads-generic.cpp \
605 generic/spinlock-generic.cpp \
606 generic/timerlr-generic.cpp \
607 r3/alloc-ef.cpp \
608 r3/alloc.cpp \
609 r3/allocex.cpp \
610 r3/dir.cpp \
611 r3/dir2.cpp \
612 r3/fileio.cpp \
613 r3/fs.cpp \
614 r3/init.cpp \
615 r3/isofs.cpp \
616 r3/memsafer-r3.cpp \
617 r3/path.cpp \
618 r3/poll.cpp \
619 r3/process.cpp \
620 r3/socket.cpp \
621 r3/stream.cpp \
622 r3/test.cpp \
623 r3/testi.cpp \
624 r3/tcp.cpp \
625 r3/udp.cpp \
626 r3/generic/semspinmutex-r3-generic.cpp \
627 r3/xml.cpp \
628 common/zip/xarvfs.cpp
629
630
631#if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
632# RuntimeR3_SOURCES += common/time/timesupA.asm
633#else
634 RuntimeR3_SOURCES += common/time/timesupref.cpp
635#endif
636
637RuntimeR3_SOURCES.x86 += \
638 generic/RTMpGetDescription-generic.cpp
639RuntimeR3_SOURCES.amd64 += \
640 generic/RTMpGetDescription-generic.cpp
641RuntimeR3_SOURCES.sparc32 += \
642 generic/RTMpGetDescription-generic-stub.cpp \
643 common/asm/asm-fake.cpp
644RuntimeR3_SOURCES.sparc64 += \
645 generic/RTMpGetDescription-generic-stub.cpp \
646 common/asm/asm-fake.cpp
647
648ifdef IPRT_WITH_LZJB
649 RuntimeR3_SOURCES += common/misc/lzjb.c
650endif
651
652# AMD64 / x86 assembly code.
653RuntimeR3_SOURCES.x86 += \
654 common/asm/ASMCpuIdExSlow.asm \
655 common/asm/ASMAtomicUoAndU64.asm \
656 common/asm/ASMAtomicUoAndU32.asm \
657 common/asm/ASMAtomicUoDecU32.asm \
658 common/asm/ASMAtomicUoIncU32.asm \
659 common/asm/ASMAtomicUoOrU64.asm \
660 common/asm/ASMAtomicUoOrU32.asm \
661 common/asm/ASMRdMsrEx.asm \
662 common/asm/ASMWrMsrEx.asm \
663 common/asm/ASMGetXcr0.asm \
664 common/asm/ASMSetXcr0.asm \
665 common/asm/ASMXSave.asm \
666 common/asm/ASMXRstor.asm \
667 common/math/bignum-amd64-x86.asm
668RuntimeR3_SOURCES.amd64 += \
669 common/asm/ASMCpuIdExSlow.asm \
670 common/asm/ASMAtomicUoAndU64.asm \
671 common/asm/ASMAtomicUoAndU32.asm \
672 common/asm/ASMAtomicUoDecU32.asm \
673 common/asm/ASMAtomicUoIncU32.asm \
674 common/asm/ASMAtomicUoOrU64.asm \
675 common/asm/ASMAtomicUoOrU32.asm \
676 common/asm/ASMRdMsrEx.asm \
677 common/asm/ASMWrMsrEx.asm \
678 common/asm/ASMGetXcr0.asm \
679 common/asm/ASMSetXcr0.asm \
680 common/asm/ASMXSave.asm \
681 common/asm/ASMXRstor.asm \
682 common/math/bignum-amd64-x86.asm \
683 common/math/RTUInt128MulByU64.asm
684
685# Some versions of GCC might require this.
686RuntimeR3_SOURCES.x86 += \
687 common/asm/ASMAtomicXchgU64.asm \
688 common/asm/ASMAtomicCmpXchgU64.asm \
689 common/asm/ASMAtomicCmpXchgExU64.asm \
690 common/asm/ASMAtomicReadU64.asm \
691 common/asm/ASMAtomicUoReadU64.asm
692
693
694ifdef IPRT_WITH_KSTUFF
695 RuntimeR3_SOURCES += \
696 common/ldr/ldrkStuff.cpp
697endif
698
699# VBox specific stuff.
700RuntimeR3_SOURCES += \
701 VBox/RTAssertShouldPanic-vbox.cpp \
702 VBox/log-vbox.cpp
703ifneq ($(KBUILD_TARGET),win)
704RuntimeR3_SOURCES += \
705 common/err/errmsgxpcom.cpp
706endif
707if1of ($(KBUILD_TARGET),freebsd linux netbsd openbsd solaris)
708RuntimeR3_SOURCES += \
709 $(if $(VBOX_WITH_DBUS),VBox/dbus.cpp,)
710endif
711
712VBOX_WITH_NT_DIRENUM = 1
713RuntimeR3_SOURCES.win = \
714 common/dbg/dbgmoddbghelp.cpp \
715 generic/cdrom-generic.cpp \
716 generic/RTDirExists-generic.cpp \
717 generic/RTDirQueryInfo-generic.cpp \
718 generic/RTDirSetTimes-generic.cpp \
719 generic/RTFileExists-generic.cpp \
720 generic/RTMpGetCurFrequency-generic.cpp \
721 generic/RTMpGetMaxFrequency-generic.cpp \
722 generic/RTPathAbs-generic.cpp \
723 generic/RTRandAdvCreateSystemFaster-generic.cpp \
724 generic/RTRandAdvCreateSystemTruer-generic.cpp \
725 generic/RTSemEventWait-generic.cpp \
726 generic/RTSemEventMultiWait-2-ex-generic.cpp \
727 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
728 generic/RTSemMutexRequest-generic.cpp \
729 generic/RTSemMutexRequestDebug-generic.cpp \
730 generic/RTThreadSetAffinityToCpu-generic.cpp \
731 generic/mppresent-generic.cpp \
732 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
733 generic/uuid-generic.cpp \
734 generic/RTProcDaemonize-generic.cpp \
735 generic/RTProcIsRunningByName-generic.cpp \
736 generic/RTThreadGetNativeState-generic.cpp \
737 nt/RTErrConvertFromNtStatus.cpp \
738 r3/nt/fs-nt.cpp \
739 r3/nt/pathint-nt.cpp \
740 r3/nt/RTProcQueryParent-r3-nt.cpp \
741 r3/win/env-win.cpp \
742 r3/win/RTCrStoreCreateSnapshotById-win.cpp \
743 r3/win/RTHandleGetStandard-win.cpp \
744 r3/win/RTSystemQueryOSInfo-win.cpp \
745 r3/win/RTSystemShutdown-win.cpp \
746 r3/win/RTSystemQueryDmiString-win.cpp \
747 r3/win/RTSystemQueryTotalRam-win.cpp \
748 r3/win/alloc-win.cpp \
749 r3/win/allocex-win.cpp \
750 r3/win/dir-win.cpp \
751 $(if-expr defined(VBOX_WITH_NT_DIRENUM),r3/nt/direnum-r3-nt.cpp,r3/win/direnum-win.cpp) \
752 r3/win/errvars-win.cpp \
753 r3/win/fileio-win.cpp \
754 r3/win/init-win.cpp \
755 r3/win/ldrNative-win.cpp \
756 r3/win/localipc-win.cpp \
757 r3/win/mp-win.cpp \
758 r3/win/path-win.cpp \
759 r3/win/pipe-win.cpp \
760 r3/win/process-win.cpp \
761 r3/win/RTLogWriteDebugger-win.cpp \
762 r3/win/rtProcInitExePath-win.cpp \
763 r3/win/sched-win.cpp \
764 r3/win/semevent-win.cpp \
765 r3/win/semeventmulti-win.cpp \
766 r3/win/semmutex-win.cpp \
767 r3/win/symlink-win.cpp \
768 r3/win/rtFileNativeSetAttributes-win.cpp \
769 r3/win/thread-win.cpp \
770 r3/win/thread2-win.cpp \
771 $(if-expr 1,r3/win/time-win.cpp,r3/nt/time-nt.cpp) \
772 r3/win/time2-win.cpp \
773 r3/win/timer-win.cpp \
774 r3/win/tls-win.cpp \
775 r3/win/utf16locale-win.cpp \
776 r3/win/utf8-win.cpp \
777 r3/win/RTUuidCreate-win.cpp \
778 win/errmsgwin.cpp \
779 win/RTErrConvertFromWin32.cpp \
780 common/string/mempcpy.asm
781
782RuntimeR3_SOURCES.win.amd64 := \
783 $(RuntimeWin64ASM_SOURCES) \
784 common/string/memrchr.asm
785RuntimeR3_SOURCES.win.x86 := \
786 $(RuntimeWin32ASM_SOURCES) \
787 common/string/memrchr.asm
788
789RuntimeR3_SOURCES.linux = \
790 generic/cdrom-generic.cpp \
791 generic/RTCrStoreCreateSnapshotById-generic.cpp \
792 generic/RTDirQueryInfo-generic.cpp \
793 generic/RTDirSetTimes-generic.cpp \
794 generic/RTFileMove-generic.cpp \
795 generic/RTLogWriteDebugger-generic.cpp \
796 generic/RTPathAbs-generic.cpp \
797 generic/RTPathGetCurrentOnDrive-generic.cpp \
798 generic/RTProcDaemonize-generic.cpp \
799 generic/RTSemEventMultiWait-2-ex-generic.cpp \
800 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
801 generic/RTTimeLocalNow-generic.cpp \
802 generic/RTTimerCreate-generic.cpp \
803 generic/RTThreadSetAffinityToCpu-generic.cpp \
804 generic/RTUuidCreate-generic.cpp \
805 generic/mppresent-generic.cpp \
806 generic/utf16locale-generic.cpp \
807 generic/uuid-generic.cpp \
808 r3/posix/allocex-r3-posix.cpp \
809 r3/linux/RTThreadGetNativeState-linux.cpp \
810 r3/linux/mp-linux.cpp \
811 r3/linux/rtProcInitExePath-linux.cpp \
812 r3/linux/sched-linux.cpp \
813 r3/linux/sysfs.cpp \
814 r3/linux/time-linux.cpp \
815 r3/linux/thread-affinity-linux.cpp \
816 r3/linux/RTProcIsRunningByName-linux.cpp \
817 r3/linux/RTSystemQueryDmiString-linux.cpp \
818 r3/linux/RTSystemShutdown-linux.cpp \
819 r3/posix/RTFileQueryFsSizes-posix.cpp \
820 r3/posix/RTHandleGetStandard-posix.cpp \
821 r3/posix/RTMemProtect-posix.cpp \
822 r3/posix/RTPathUserHome-posix.cpp \
823 r3/posix/RTSystemQueryOSInfo-posix.cpp \
824 r3/linux/systemmem-linux.cpp \
825 r3/posix/RTTimeNow-posix.cpp \
826 r3/posix/RTTimeSet-posix.cpp \
827 r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
828 r3/posix/dir-posix.cpp \
829 r3/posix/env-posix.cpp \
830 r3/posix/errvars-posix.cpp \
831 r3/posix/fileio-posix.cpp \
832 r3/posix/fileio2-posix.cpp \
833 r3/posix/filelock-posix.cpp \
834 r3/posix/fs-posix.cpp \
835 r3/posix/fs2-posix.cpp \
836 r3/posix/fs3-posix.cpp \
837 r3/posix/ldrNative-posix.cpp \
838 r3/posix/path-posix.cpp \
839 r3/posix/path2-posix.cpp \
840 r3/posix/pathhost-posix.cpp \
841 r3/posix/RTPathUserDocuments-posix.cpp \
842 r3/posix/pipe-posix.cpp \
843 r3/posix/process-posix.cpp \
844 r3/posix/process-creation-posix.cpp \
845 r3/posix/rand-posix.cpp \
846 r3/posix/semrw-posix.cpp \
847 r3/posix/symlink-posix.cpp \
848 r3/posix/thread-posix.cpp \
849 r3/posix/thread2-posix.cpp \
850 r3/posix/timelocal-posix.cpp \
851 r3/posix/timer-posix.cpp \
852 r3/posix/tls-posix.cpp \
853 r3/posix/utf8-posix.cpp
854ifdef IPRT_WITH_FUTEX_BASED_SEMS
855 RuntimeR3_SOURCES.linux += \
856 r3/linux/semevent-linux.cpp \
857 r3/linux/semeventmulti-linux.cpp \
858 r3/linux/semmutex-linux.cpp
859else
860 RuntimeR3_SOURCES.linux.x86 += \
861 r3/posix/semevent-posix.cpp \
862 r3/posix/semeventmulti-posix.cpp \
863 r3/posix/semmutex-posix.cpp
864 RuntimeR3_SOURCES.linux.amd64 += \
865 r3/linux/semevent-linux.cpp \
866 r3/linux/semeventmulti-linux.cpp
867 ifdef RT_NEW_LINUX_MUTEX_CODE
868 RuntimeR3_SOURCES.linux.amd64 += \
869 r3/linux/semmutex-linux.cpp
870 else
871 RuntimeR3_SOURCES.linux.amd64 += \
872 r3/posix/semmutex-posix.cpp
873 endif
874endif
875
876RuntimeR3_SOURCES.os2 = \
877 common/string/memrchr.asm \
878 generic/cdrom-generic.cpp \
879 generic/RTCrStoreCreateSnapshotById-generic.cpp \
880 generic/RTDirQueryInfo-generic.cpp \
881 generic/RTDirSetTimes-generic.cpp \
882 generic/RTFileMove-generic.cpp \
883 generic/RTLogWriteDebugger-generic.cpp \
884 generic/RTPathAbs-generic.cpp \
885 generic/RTPathGetCurrentOnDrive-generic.cpp \
886 generic/RTProcDaemonize-generic.cpp \
887 generic/RTRandAdvCreateSystemFaster-generic.cpp \
888 generic/RTRandAdvCreateSystemTruer-generic.cpp \
889 generic/RTSystemQueryDmiString-generic.cpp \
890 generic/RTSystemShutdown-generic.cpp \
891 generic/RTTimeLocalNow-generic.cpp \
892 generic/RTTimerCreate-generic.cpp \
893 generic/RTThreadSetAffinityToCpu-generic.cpp \
894 generic/RTUuidCreate-generic.cpp \
895 generic/mppresent-generic.cpp \
896 generic/RTSemEventWait-generic.cpp \
897 generic/RTSemEventMultiWait-generic.cpp \
898 generic/RTSemMutexRequest-generic.cpp \
899 generic/RTSemMutexRequestDebug-generic.cpp \
900 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
901 generic/timer-generic.cpp \
902 generic/utf16locale-generic.cpp \
903 generic/uuid-generic.cpp \
904 generic/RTMpGetCoreCount-generic.cpp \
905 generic/RTMpGetOnlineCoreCount-generic.cpp \
906 generic/RTMpGetCurFrequency-generic.cpp \
907 generic/RTMpGetMaxFrequency-generic.cpp \
908 generic/RTProcIsRunningByName-generic.cpp \
909 generic/RTThreadGetNativeState-generic.cpp \
910 os2/RTErrConvertFromOS2.cpp \
911 r3/generic/allocex-r3-generic.cpp \
912 r3/os2/filelock-os2.cpp \
913 r3/os2/mp-os2.cpp \
914 r3/os2/pipe-os2.cpp \
915 r3/os2/rtProcInitExePath-os2.cpp \
916 r3/os2/sched-os2.cpp \
917 r3/os2/sems-os2.cpp \
918 r3/os2/systemmem-os2.cpp \
919 r3/os2/thread-os2.cpp \
920 r3/os2/time-os2.cpp \
921 r3/posix/RTFileQueryFsSizes-posix.cpp \
922 r3/posix/RTHandleGetStandard-posix.cpp \
923 r3/posix/RTMemProtect-posix.cpp \
924 r3/posix/RTPathUserHome-posix.cpp \
925 r3/posix/RTSystemQueryOSInfo-posix.cpp \
926 r3/posix/RTTimeNow-posix.cpp \
927 r3/posix/RTTimeSet-posix.cpp \
928 r3/posix/dir-posix.cpp \
929 r3/posix/env-posix.cpp \
930 r3/posix/errvars-posix.cpp \
931 r3/posix/fileio-posix.cpp \
932 r3/posix/fileio2-posix.cpp \
933 r3/posix/fs-posix.cpp \
934 r3/posix/fs2-posix.cpp \
935 r3/posix/fs3-posix.cpp \
936 r3/posix/ldrNative-posix.cpp \
937 r3/posix/path-posix.cpp \
938 r3/posix/path2-posix.cpp \
939 r3/posix/pathhost-posix.cpp \
940 r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
941 r3/posix/RTPathUserDocuments-posix.cpp \
942 r3/posix/process-posix.cpp \
943 r3/posix/process-creation-posix.cpp \
944 r3/posix/symlink-posix.cpp \
945 r3/posix/timelocal-posix.cpp \
946 r3/posix/utf8-posix.cpp
947
948RuntimeR3_SOURCES.darwin = \
949 darwin/RTErrConvertFromDarwin.cpp \
950 darwin/RTErrConvertFromDarwinCOM.cpp \
951 darwin/RTErrConvertFromDarwinIO.cpp \
952 darwin/RTErrConvertFromDarwinKern.cpp \
953 generic/cdrom-generic.cpp \
954 generic/RTDirQueryInfo-generic.cpp \
955 generic/RTDirSetTimes-generic.cpp \
956 generic/RTFileMove-generic.cpp \
957 generic/RTLogWriteDebugger-generic.cpp \
958 generic/RTPathAbs-generic.cpp \
959 generic/RTPathGetCurrentOnDrive-generic.cpp \
960 generic/RTProcDaemonize-generic.cpp \
961 generic/RTThreadGetAffinity-stub-generic.cpp \
962 generic/RTThreadSetAffinity-stub-generic.cpp \
963 generic/RTThreadSetAffinityToCpu-generic.cpp \
964 generic/RTTimeLocalNow-generic.cpp \
965 generic/RTTimerCreate-generic.cpp \
966 generic/RTUuidCreate-generic.cpp \
967 generic/mppresent-generic.cpp \
968 generic/RTMpGetOnlineCoreCount-generic.cpp \
969 generic/RTSemEventMultiWait-2-ex-generic.cpp \
970 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
971 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
972 generic/RTSystemShutdown-generic.cpp \
973 generic/timer-generic.cpp \
974 generic/utf16locale-generic.cpp \
975 generic/uuid-generic.cpp\
976 generic/RTProcIsRunningByName-generic.cpp \
977 generic/RTThreadGetNativeState-generic.cpp \
978 r3/darwin/RTCrStoreCreateSnapshotById-darwin.cpp \
979 r3/darwin/filelock-darwin.cpp \
980 r3/darwin/mp-darwin.cpp \
981 r3/darwin/pathhost-darwin.cpp \
982 r3/darwin/rtProcInitExePath-darwin.cpp \
983 r3/darwin/RTSystemQueryDmiString-darwin.cpp \
984 r3/darwin/sched-darwin.cpp \
985 r3/darwin/systemmem-darwin.cpp \
986 r3/darwin/time-darwin.cpp \
987 r3/darwin/RTPathUserDocuments-darwin.cpp \
988 r3/generic/allocex-r3-generic.cpp \
989 r3/posix/RTFileQueryFsSizes-posix.cpp \
990 r3/posix/RTHandleGetStandard-posix.cpp \
991 r3/posix/RTMemProtect-posix.cpp \
992 r3/posix/RTPathUserHome-posix.cpp \
993 r3/posix/RTSystemQueryOSInfo-posix.cpp \
994 r3/posix/RTTimeSet-posix.cpp \
995 r3/posix/dir-posix.cpp \
996 r3/posix/env-posix.cpp \
997 r3/posix/errvars-posix.cpp \
998 r3/posix/fileio-posix.cpp \
999 r3/posix/fileio2-posix.cpp \
1000 r3/posix/fs-posix.cpp \
1001 r3/posix/fs2-posix.cpp \
1002 r3/posix/fs3-posix.cpp \
1003 r3/posix/ldrNative-posix.cpp \
1004 r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
1005 r3/posix/path-posix.cpp \
1006 r3/posix/path2-posix.cpp \
1007 r3/posix/pipe-posix.cpp \
1008 r3/posix/process-posix.cpp \
1009 r3/posix/process-creation-posix.cpp \
1010 r3/posix/rand-posix.cpp \
1011 r3/posix/semevent-posix.cpp \
1012 r3/posix/semeventmulti-posix.cpp \
1013 r3/posix/semmutex-posix.cpp \
1014 r3/posix/symlink-posix.cpp \
1015 r3/posix/thread-posix.cpp \
1016 r3/posix/thread2-posix.cpp \
1017 r3/posix/timelocal-posix.cpp \
1018 r3/posix/tls-posix.cpp \
1019 r3/posix/utf8-posix.cpp
1020RuntimeR3_SOURCES.darwin.x86 += common/string/memrchr.asm
1021RuntimeR3_SOURCES.darwin.amd64 += common/string/memrchr.asm
1022
1023## @todo Make BSD sched, implement RTMP*.
1024RuntimeR3_SOURCES.freebsd = \
1025 generic/cdrom-generic.cpp \
1026 generic/RTCrStoreCreateSnapshotById-generic.cpp \
1027 generic/RTDirQueryInfo-generic.cpp \
1028 generic/RTDirSetTimes-generic.cpp \
1029 generic/RTFileMove-generic.cpp \
1030 generic/RTLogWriteDebugger-generic.cpp \
1031 generic/RTPathAbs-generic.cpp \
1032 generic/RTPathGetCurrentOnDrive-generic.cpp \
1033 generic/RTSemEventMultiWait-2-ex-generic.cpp \
1034 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
1035 generic/RTSystemQueryDmiString-generic.cpp \
1036 generic/RTSystemShutdown-generic.cpp \
1037 generic/RTThreadGetAffinity-stub-generic.cpp \
1038 generic/RTThreadSetAffinity-stub-generic.cpp \
1039 generic/RTThreadSetAffinityToCpu-generic.cpp \
1040 generic/RTTimeLocalNow-generic.cpp \
1041 generic/RTTimerCreate-generic.cpp \
1042 generic/RTUuidCreate-generic.cpp \
1043 generic/mppresent-generic.cpp \
1044 generic/sched-generic.cpp \
1045 generic/utf16locale-generic.cpp \
1046 generic/uuid-generic.cpp \
1047 generic/RTMpCpuId-generic.cpp \
1048 generic/RTMpGetCoreCount-generic.cpp \
1049 generic/RTMpGetOnlineCoreCount-generic.cpp \
1050 generic/RTProcDaemonize-generic.cpp \
1051 generic/RTProcIsRunningByName-generic.cpp \
1052 generic/RTThreadGetNativeState-generic.cpp \
1053 r3/freebsd/mp-freebsd.cpp \
1054 r3/freebsd/systemmem-freebsd.cpp \
1055 r3/freebsd/rtProcInitExePath-freebsd.cpp \
1056 r3/generic/allocex-r3-generic.cpp \
1057 r3/posix/RTFileQueryFsSizes-posix.cpp \
1058 r3/posix/RTHandleGetStandard-posix.cpp \
1059 r3/posix/RTMemProtect-posix.cpp \
1060 r3/posix/RTPathUserHome-posix.cpp \
1061 r3/posix/RTSystemQueryOSInfo-posix.cpp \
1062 r3/posix/RTTimeNow-posix.cpp \
1063 r3/posix/RTTimeSet-posix.cpp \
1064 r3/posix/dir-posix.cpp \
1065 r3/posix/env-posix.cpp \
1066 r3/posix/errvars-posix.cpp \
1067 r3/posix/fileio-posix.cpp \
1068 r3/posix/fileio2-posix.cpp \
1069 r3/posix/filelock-posix.cpp \
1070 r3/posix/fs-posix.cpp \
1071 r3/posix/fs2-posix.cpp \
1072 r3/posix/fs3-posix.cpp \
1073 r3/posix/ldrNative-posix.cpp \
1074 r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
1075 r3/posix/path-posix.cpp \
1076 r3/posix/path2-posix.cpp \
1077 r3/posix/pathhost-posix.cpp \
1078 r3/posix/RTPathUserDocuments-posix.cpp \
1079 r3/posix/pipe-posix.cpp \
1080 r3/posix/process-posix.cpp \
1081 r3/posix/process-creation-posix.cpp \
1082 r3/posix/rand-posix.cpp \
1083 r3/posix/semevent-posix.cpp \
1084 r3/posix/semeventmulti-posix.cpp \
1085 r3/posix/semmutex-posix.cpp \
1086 r3/posix/semrw-posix.cpp \
1087 r3/posix/symlink-posix.cpp \
1088 r3/posix/thread-posix.cpp \
1089 r3/posix/thread2-posix.cpp \
1090 r3/posix/time-posix.cpp \
1091 r3/posix/timelocal-posix.cpp \
1092 r3/posix/timer-posix.cpp \
1093 r3/posix/tls-posix.cpp \
1094 r3/posix/utf8-posix.cpp
1095RuntimeR3_SOURCES.freebsd.x86 += common/string/memrchr.asm
1096RuntimeR3_SOURCES.freebsd.amd64 += common/string/memrchr.asm
1097
1098RuntimeR3_SOURCES.solaris = \
1099 generic/cdrom-generic.cpp \
1100 generic/RTCrStoreCreateSnapshotById-generic.cpp \
1101 generic/RTDirQueryInfo-generic.cpp \
1102 generic/RTDirSetTimes-generic.cpp \
1103 generic/RTFileMove-generic.cpp \
1104 generic/RTLogWriteDebugger-generic.cpp \
1105 generic/RTPathAbs-generic.cpp \
1106 generic/RTPathGetCurrentOnDrive-generic.cpp \
1107 generic/RTProcDaemonize-generic.cpp \
1108 generic/RTProcIsRunningByName-generic.cpp \
1109 generic/RTSemEventMultiWait-2-ex-generic.cpp \
1110 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
1111 generic/RTThreadSetAffinityToCpu-generic.cpp \
1112 generic/RTTimeLocalNow-generic.cpp \
1113 generic/RTTimerCreate-generic.cpp \
1114 generic/RTUuidCreate-generic.cpp \
1115 generic/sched-generic.cpp \
1116 generic/utf16locale-generic.cpp \
1117 generic/uuid-generic.cpp \
1118 generic/RTThreadGetNativeState-generic.cpp \
1119 r3/generic/allocex-r3-generic.cpp \
1120 r3/posix/RTFileQueryFsSizes-posix.cpp \
1121 r3/posix/RTHandleGetStandard-posix.cpp \
1122 r3/posix/RTMemProtect-posix.cpp \
1123 r3/posix/RTPathUserHome-posix.cpp \
1124 r3/posix/RTSystemQueryOSInfo-posix.cpp \
1125 r3/posix/RTTimeNow-posix.cpp \
1126 r3/posix/RTTimeSet-posix.cpp \
1127 r3/posix/dir-posix.cpp \
1128 r3/posix/env-posix.cpp \
1129 r3/posix/errvars-posix.cpp \
1130 r3/posix/fileio-posix.cpp \
1131 r3/posix/fileio2-posix.cpp \
1132 r3/posix/filelock-posix.cpp \
1133 r3/posix/fs-posix.cpp \
1134 r3/posix/fs2-posix.cpp \
1135 r3/posix/fs3-posix.cpp \
1136 r3/posix/ldrNative-posix.cpp \
1137 r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
1138 r3/posix/path-posix.cpp \
1139 r3/posix/path2-posix.cpp \
1140 r3/posix/pathhost-posix.cpp \
1141 r3/posix/RTPathUserDocuments-posix.cpp \
1142 r3/posix/pipe-posix.cpp \
1143 r3/posix/process-posix.cpp \
1144 r3/posix/process-creation-posix.cpp \
1145 r3/posix/rand-posix.cpp \
1146 r3/posix/semevent-posix.cpp \
1147 r3/posix/semeventmulti-posix.cpp \
1148 r3/posix/semmutex-posix.cpp \
1149 r3/posix/semrw-posix.cpp \
1150 r3/posix/symlink-posix.cpp \
1151 r3/posix/thread-posix.cpp \
1152 r3/posix/thread2-posix.cpp \
1153 r3/posix/time-posix.cpp \
1154 r3/posix/timelocal-posix.cpp \
1155 r3/posix/timer-posix.cpp \
1156 r3/posix/tls-posix.cpp \
1157 r3/posix/utf8-posix.cpp \
1158 r3/solaris/systemmem-solaris.cpp \
1159 r3/solaris/mp-solaris.cpp \
1160 r3/solaris/rtProcInitExePath-solaris.cpp \
1161 r3/solaris/RTSystemShutdown-solaris.cpp \
1162 r3/solaris/thread-affinity-solaris.cpp
1163RuntimeR3_SOURCES.solaris.amd64 = \
1164 common/string/memrchr.asm \
1165 r3/solaris/coredumper-solaris.cpp \
1166 r3/solaris/RTSystemQueryDmiString-solaris.cpp
1167RuntimeR3_SOURCES.solaris.x86 = \
1168 common/string/memrchr.asm \
1169 r3/solaris/coredumper-solaris.cpp \
1170 r3/solaris/RTSystemQueryDmiString-solaris.cpp
1171RuntimeR3_SOURCES.solaris.sparc32 = \
1172 generic/RTSystemQueryDmiString-generic.cpp
1173RuntimeR3_SOURCES.solaris.sparc64 = \
1174 generic/RTSystemQueryDmiString-generic.cpp
1175
1176RuntimeR3_SOURCES.haiku = \
1177 generic/RTCrStoreCreateSnapshotById-generic.cpp \
1178 generic/RTDirQueryInfo-generic.cpp \
1179 generic/RTDirSetTimes-generic.cpp \
1180 generic/RTFileMove-generic.cpp \
1181 generic/RTLogWriteDebugger-generic.cpp \
1182 generic/RTPathAbs-generic.cpp \
1183 generic/RTPathGetCurrentOnDrive-generic.cpp \
1184 generic/RTProcDaemonize-generic.cpp \
1185 generic/RTTimeLocalNow-generic.cpp \
1186 generic/RTTimerCreate-generic.cpp \
1187 generic/RTUuidCreate-generic.cpp \
1188 generic/mppresent-generic.cpp \
1189 generic/RTSemEventMultiWait-2-ex-generic.cpp \
1190 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
1191 generic/sched-generic.cpp \
1192 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),ockless-,)generic.cpp \
1193 generic/timer-generic.cpp \
1194 generic/utf16locale-generic.cpp \
1195 generic/uuid-generic.cpp\
1196 generic/RTProcIsRunningByName-generic.cpp \
1197 generic/RTThreadGetNativeState-generic.cpp \
1198 generic/RTMpGetCoreCount-generic.cpp \
1199 generic/RTMpGetOnlineCoreCount-generic.cpp \
1200 r3/haiku/rtProcInitExePath-haiku.cpp \
1201 r3/haiku/time-haiku.cpp \
1202 r3/generic/allocex-r3-generic.cpp \
1203 r3/posix/RTFileQueryFsSizes-posix.cpp \
1204 r3/posix/RTHandleGetStandard-posix.cpp \
1205 r3/posix/RTMemProtect-posix.cpp \
1206 r3/posix/RTPathUserHome-posix.cpp \
1207 r3/posix/RTSystemQueryOSInfo-posix.cpp \
1208 r3/posix/RTSystemQueryTotalRam-posix.cpp \
1209 r3/posix/RTTimeNow-posix.cpp \
1210 r3/posix/dir-posix.cpp \
1211 r3/posix/env-posix.cpp \
1212 r3/posix/errvars-posix.cpp \
1213 r3/posix/fileio-posix.cpp \
1214 r3/posix/fileio2-posix.cpp \
1215 r3/posix/filelock-posix.cpp \
1216 r3/posix/fs-posix.cpp \
1217 r3/posix/fs2-posix.cpp \
1218 r3/posix/fs3-posix.cpp \
1219 r3/posix/ldrNative-posix.cpp \
1220 r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
1221 r3/posix/path-posix.cpp \
1222 r3/posix/path2-posix.cpp \
1223 r3/posix/pathhost-posix.cpp \
1224 r3/posix/pipe-posix.cpp \
1225 r3/posix/process-posix.cpp \
1226 r3/posix/process-creation-posix.cpp \
1227 r3/posix/rand-posix.cpp \
1228 r3/posix/semevent-posix.cpp \
1229 r3/posix/semeventmulti-posix.cpp \
1230 r3/posix/semmutex-posix.cpp \
1231 r3/posix/symlink-posix.cpp \
1232 r3/posix/thread-posix.cpp \
1233 r3/posix/thread2-posix.cpp \
1234 r3/posix/timelocal-posix.cpp \
1235 r3/posix/tls-posix.cpp \
1236 r3/posix/utf8-posix.cpp
1237RuntimeR3_SOURCES.haiku.x86 += common/string/memrchr.asm
1238RuntimeR3_SOURCES.haiku.amd64 += common/string/memrchr.asm
1239
1240## PORTME: Porters add their selection of platform specific files for Ring-3 here.
1241
1242
1243#
1244# RuntimeBldProg - Static Runtime for build programs.
1245#
1246# Note! This is a bit of hacky since kBuild doesn't support building libraries
1247# for build programs.
1248#
1249RuntimeBldProg_TEMPLATE := VBoxAdvBldProg
1250RuntimeBldProg_EXTENDS := RuntimeR3
1251RuntimeBldProg_BLD_TRG := $(KBUILD_HOST)
1252RuntimeBldProg_BLD_TRG_ARCH := $(KBUILD_HOST_ARCH)
1253RuntimeBldProg_BLD_TRG_CPU := $(KBUILD_HOST_CPU)
1254RuntimeBldProg_DEFS := $(filter-out IN_SUP_R3 IN_SUP, $(RuntimeR3_DEFS)) IPRT_WITHOUT_LDR_VERIFY RT_NO_GIP
1255RuntimeBldProg_SOURCES = $(filter-out \
1256 r3/xml.cpp \
1257 common/zip/xarvfs.cpp \
1258 , $(RuntimeR3_SOURCES))
1259if "$(KBUILD_TARGET)" == "win" && "$(KBUILD_HOST)" != "win"
1260RuntimeBldProg_SOURCES += \
1261 common/err/errmsgxpcom.cpp
1262endif
1263
1264
1265
1266#
1267# RuntimeGuestR3 - Guest Additions Runtime (static/exe).
1268# (The KBUILD_HOST inheritance here is for cross building the linux
1269# additions, while .x86 is for cross building x86 while targeting amd64.)
1270#
1271RuntimeGuestR3_TEMPLATE := VBoxGuestR3Lib
1272## @todo change this to EXTEND the RuntimeR3 target.
1273RuntimeGuestR3_SDKS.win := $(RuntimeR3_SDKS.win)
1274RuntimeGuestR3_DEFS := $(filter-out RTCRITSECT_STRICT RT_NO_GIP IPRT_WITH_OPENSSL, $(RuntimeR3_DEFS))
1275RuntimeGuestR3_DEFS.$(KBUILD_TARGET) := $(RuntimeR3_DEFS.$(KBUILD_TARGET))
1276RuntimeGuestR3_DEFS.$(KBUILD_HOST) := $(RuntimeR3_DEFS.$(KBUILD_HOST))
1277RuntimeGuestR3_INCS := $(RuntimeR3_INCS)
1278RuntimeGuestR3_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
1279RuntimeGuestR3_INCS.$(KBUILD_HOST) := $(RuntimeR3_INCS.$(KBUILD_HOST))
1280RuntimeGuestR3_SOURCES := $(filter-out \
1281 common/time/timesupref.cpp \
1282 common/time/timesupA.asm \
1283 common/time/timesup.cpp \
1284 common/checksum/x509.cpp \
1285 generic/RTLogWriteUser-generic.cpp \
1286 r3/xml.cpp \
1287 common/zip/xarvfs.cpp \
1288 , $(RuntimeR3_SOURCES))
1289RuntimeGuestR3_SOURCES += \
1290 common/time/timesysalias.cpp \
1291 VBox/logbackdoor.cpp
1292RuntimeGuestR3_SOURCES.$(KBUILD_TARGET) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET))
1293RuntimeGuestR3_SOURCES.$(KBUILD_HOST) := $(RuntimeR3_SOURCES.$(KBUILD_HOST))
1294RuntimeGuestR3_SOURCES.$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET_ARCH))
1295RuntimeGuestR3_SOURCES.x86 := $(RuntimeR3_SOURCES.x86)
1296RuntimeGuestR3_SOURCES.amd64 := $(RuntimeR3_SOURCES.amd64)
1297RuntimeGuestR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
1298RuntimeGuestR3_SOURCES.$(KBUILD_TARGET).x86 := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).x86)
1299RuntimeGuestR3_SOURCES.$(KBUILD_TARGET).amd64:= $(RuntimeR3_SOURCES.$(KBUILD_TARGET).amd64)
1300RuntimeGuestR3_SOURCES.$(KBUILD_HOST).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_HOST).$(KBUILD_TARGET_ARCH))
1301RuntimeGuestR3_SOURCES.win.x86 += \
1302 r3/win/vcc100-kernel32-fakes.cpp \
1303 r3/win/vcc100-kernel32-fakesA.asm \
1304 r3/win/vcc100-ntdll-fakes.cpp \
1305 r3/win/vcc100-ntdll-fakesA.asm \
1306 r3/win/vcc100-ws2_32-fakes.cpp \
1307 r3/win/vcc100-ws2_32-fakesA.asm
1308
1309#
1310# RuntimeGuestR3-x86 - Same as RuntimeGuestR3, except that it's targeting x86.
1311#
1312RuntimeGuestR3-x86_EXTENDS := RuntimeGuestR3
1313RuntimeGuestR3-x86_BLD_TRG_ARCH := x86
1314
1315
1316#
1317# RuntimeGuestR3Shared - Guest Additions Runtime (static/dll).
1318#
1319RuntimeGuestR3Shared_TEMPLATE := VBoxGuestR3Dll
1320RuntimeGuestR3Shared_EXTENDS := RuntimeGuestR3
1321RuntimeGuestR3Shared_INST = $(INST_ADDITIONS_LIB)
1322
1323
1324#
1325# RuntimeGuestR3Shared-x86 - Same as RuntimeGuestR3Shared, except that it's targeting x86.
1326#
1327RuntimeGuestR3Shared-x86_EXTENDS := RuntimeGuestR3Shared
1328RuntimeGuestR3Shared-x86_BLD_TRG_ARCH := x86
1329
1330
1331#
1332# VBoxRT - Shared Object / DLL version.
1333#
1334VBoxRT_TEMPLATE = VBoxR3DllNoPic
1335VBoxRT_SDKS = VBOX_LIBXML2
1336ifdef VBOX_WITH_LIBCURL
1337 VBoxRT_SDKS += VBOX_LIBCURL
1338endif
1339VBoxRT_SDKS += VBOX_OPENSSL
1340VBoxRT_SDKS.win = $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
1341if1of ($(KBUILD_TARGET), win)
1342VBoxRT_INST = $(INST_DLL) $(INST_TESTCASE) $(VBOX_INST_TOOLS)
1343else if1of ($(KBUILD_TARGET)$(VBOX_WITH_HARDENING), darwin win$(VBOX_WITH_HARDENING))
1344VBoxRT_INST = $(INST_DLL) $(INST_TESTCASE)
1345endif
1346VBoxRT_DEFS := $(filter-out RT_NO_GIP, $(RuntimeR3_DEFS)) \
1347 IN_SUP_R3 IN_SUP_R3 IPRT_WITH_XAR \
1348 $(if-expr !defined(VBOX_WITH_ALT_HASH_CODE),IPRT_WITHOUT_SHA512T224 IPRT_WITHOUT_SHA512T256,)
1349ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1350 VBoxRT_DEFS += RT_NO_GIP
1351endif
1352ifdef VBOX_WITH_LIBCURL
1353 VBoxRT_DEFS += IPRT_WITH_HTTP
1354endif
1355ifdef RTALLOC_REPLACE_MALLOC
1356 VBoxRT_DEFS += RTALLOC_REPLACE_MALLOC
1357endif
1358VBoxRT_DEFS.$(KBUILD_TYPE) := $(RuntimeR3_DEFS.$(KBUILD_TYPE))
1359VBoxRT_SOURCES := \
1360 VBox/VBoxRTDeps.cpp \
1361 $(filter-out common/checksum/crc32.cpp, \
1362 $(if-expr defined(VBOX_WITH_ALT_HASH_CODE), $(RuntimeR3_SOURCES), \
1363 $(patsubst common/checksum/alt-%,common/checksum/openssl-%,$(RuntimeR3_SOURCES)) ) ) \
1364 common/checksum/crc32-zlib.cpp \
1365 common/misc/aiomgr.cpp
1366ifdef VBOX_WITH_LIBCURL
1367 VBoxRT_SOURCES += \
1368 common/misc/s3.cpp \
1369 generic/http-curl.cpp
1370endif
1371VBoxRT_SOURCES.$(KBUILD_TARGET) = $(RuntimeR3_SOURCES.$(KBUILD_TARGET))
1372VBoxRT_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
1373VBoxRT_SOURCES.$(KBUILD_TARGET).x86 := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).x86)
1374VBoxRT_SOURCES.$(KBUILD_TARGET).amd64 := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).amd64)
1375VBoxRT_SOURCES.$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET_ARCH))
1376VBoxRT_SOURCES.x86 := $(RuntimeR3_SOURCES.x86)
1377VBoxRT_SOURCES.amd64 := $(RuntimeR3_SOURCES.amd64)
1378VBoxRT_SOURCES.win += \
1379 r3/win/dllmain-win.cpp \
1380 r3/win/fileaio-win.cpp \
1381 $(VBoxRT_0_OUTDIR)/VBoxRT.def
1382VBoxRT_SOURCES.linux += \
1383 r3/linux/fileaio-linux.cpp
1384VBoxRT_SOURCES.solaris += \
1385 r3/solaris/fileaio-solaris.cpp
1386VBoxRT_SOURCES.darwin += \
1387 r3/posix/fileaio-posix.cpp
1388VBoxRT_SOURCES.freebsd += \
1389 r3/freebsd/fileaio-freebsd.cpp
1390VBoxRT_INCS := $(RuntimeR3_INCS)
1391VBoxRT_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
1392VBoxRT_INCS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_INCS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
1393VBoxRT_LIBS = \
1394 $(PATH_STAGE_LIB)/VBox-liblzf$(VBOX_SUFF_LIB)
1395if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1396VBoxRT_LIBS += \
1397 $(PATH_STAGE_LIB)/SUPR3$(VBOX_SUFF_LIB)
1398endif
1399ifdef IPRT_WITH_KSTUFF
1400 VBoxRT_LIBS += \
1401 $(PATH_STAGE_LIB)/VBox-kStuff$(VBOX_SUFF_LIB)
1402endif
1403ifndef SDK_VBOX_LIBXML2_LIBS
1404 VBoxRT_LIBS += \
1405 $(PATH_STAGE_LIB)/VBox-libxml2$(VBOX_SUFF_LIB)
1406endif
1407VBoxRT_LIBS += \
1408 $(SDK_VBOX_ZLIB_LIBS)
1409ifndef SDK_VBOX_OPENSSL_LIBS
1410 VBoxRT_LIBS += \
1411 $(PATH_STAGE_LIB)/VBox-libcrypto$(VBOX_SUFF_LIB) \
1412 $(PATH_STAGE_LIB)/VBox-libssl$(VBOX_SUFF_LIB)
1413endif
1414ifdef IPRT_WITH_LZO
1415 VBoxRT_LIBS += lzo2
1416endif
1417ifdef RTALLOC_REPLACE_MALLOC
1418VBoxRT_LIBS += \
1419 $(PATH_STAGE_LIB)/DisasmR3$(VBOX_SUFF_LIB)
1420endif
1421VBoxRT_LIBS.linux = \
1422 crypt
1423VBoxRT_LIBS.darwin = \
1424 iconv
1425VBoxRT_LIBS.freebsd = \
1426 iconv \
1427 rt
1428VBoxRT_LIBS.haiku = \
1429 iconv
1430VBoxRT_LIBS.solaris = \
1431 kstat \
1432 contract
1433ifn1of ($(KBUILD_TARGET_ARCH), sparc32 sparc64)
1434 # SMBIOS not available on Solaris SPARC.
1435 VBoxRT_LIBS.solaris += smbios
1436endif
1437VBoxRT_LIBS.win = \
1438 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/vccomsup.lib \
1439 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/wbemuuid.lib \
1440 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
1441VBoxRT_LDFLAGS.darwin = \
1442 -framework IOKit \
1443 -framework CoreFoundation \
1444 -framework CoreServices \
1445 -framework Security \
1446 -framework SystemConfiguration \
1447 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxRT.dylib
1448VBoxRT_LDFLAGS.win = /MANIFEST \
1449 /delayload:gdi32.dll \
1450 /delayload:user32.dll \
1451 /delayload:shell32.dll \
1452 /delayload:ole32.dll \
1453 /delayload:oleaut32.dll \
1454 /delayload:advapi32.dll
1455
1456if1of ($(DLLS), VBoxRT)
1457$$(VBoxRT_0_OUTDIR)/VBoxRT.def: \
1458 $(PATH_SUB_CURRENT)/r3/win/VBoxRT-$$(if-expr $$(KBUILD_TARGET_ARCH) == amd64,win64,win32).def \
1459 $(PATH_SUB_CURRENT)/r3/win/$(if $(VBOX_OSE),VBoxRT-openssl-ose.def,VBoxRT-openssl.def) \
1460 $(if-expr "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.x86" && defined(VBOX_WITH_MORE_NT4_COMPAT_BINARIES)\
1461 ,$(PATH_SUB_CURRENT)/r3/win/VBoxRT-msvcr100-win32.def ,) #$(PATH_SUB_CURRENT)/r3/win/VBoxRT-msvcp100-win32.def
1462 $(RM) -f -- $@
1463 $(REDIRECT) -wto $@ -- $(CAT_EXT) $^
1464endif
1465
1466if1of (VBoxRT,$(DLLS))
1467 $(call VBOX_SET_VER_INFO_DLL,VBoxRT,VirtualBox Runtime)
1468endif
1469
1470
1471if defined(VBOX_WITH_MORE_NT4_COMPAT_BINARIES) && "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.x86"
1472 #
1473 # Hacks for running tests on NT 4. Really ugly!
1474 #
1475 # We put most of the CRT in VBoxRT because we cannot even load msvcr100.dll
1476 # or msvcp100.dll on NT4 because of kernel32.dll dependencies. More hacks
1477 # in RuntimeR3VccTricks.
1478 #
1479 TEMPLATE_VBoxR3RuntimeDllItself = xx
1480 TEMPLATE_VBoxR3RuntimeDllItself_EXTENDS = VBoxR3RuntimeDll
1481 TEMPLATE_VBoxR3RuntimeDllItself_LIBS.win.x86 = \
1482 $(filter-out $(PATH_STAGE_LIB)/RuntimeR3VccTricks%, $(TEMPLATE_VBoxR3RuntimeDll_LIBS.win.x86))
1483 TEMPLATE_VBoxR3RuntimeDllItself_SOURCES = \
1484 r3/win/vcc100-kernel32-fakes.cpp \
1485 r3/win/vcc100-kernel32-fakesA.asm \
1486 r3/win/vcc100-ws2_32-fakes.cpp \
1487 r3/win/vcc100-ws2_32-fakesA.asm \
1488 r3/win/vcc100-ntdll-fakes.cpp \
1489 r3/win/vcc100-ntdll-fakesA.asm \
1490 r3/win/vcc100-msvcrt-fakes.cpp
1491 VBoxRT_TEMPLATE = VBoxR3RuntimeDllItself
1492 VBoxRT_TEMPLATE.win.x86 = VBoxR3RuntimeDllItself
1493 VBoxRT_DEFS.win.x86 = $(TEMPLATE_VBoxR3RuntimeDll_DEFS.win.x86) _CRTIMP_PURE="__declspec(dllexport)"
1494 VBoxRT_LDFLAGS.win.x86 = /IGNORE:4049 /IGNORE:4217
1495 VBoxRT_LIBS.win.x86 = \
1496 $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)X86_LIB)/oldnames.lib \
1497 $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)X86_LIB)/libcmt.lib \
1498 $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)X86_LIB)/libcpmt.lib
1499endif
1500
1501
1502#
1503# HACK ALERT! Make testcase run during build on SELinux boxes.
1504# Create a dummy DLL that ensure that VBoxRT is installed
1505# during the DLL pass and cleaned up later.
1506#
1507ifeq ($(KBUILD_TARGET),linux)
1508 if1of (VBoxRT, $(DLLS))
1509 ifneq ($(wildcard /usr/bin/chcon),)
1510VBoxRT_INSTTYPE = none
1511VBoxRT_DEBUG_INSTTYPE = both
1512
1513DLLS += VBoxRTDummy
1514VBoxRTDummy_TEMPLATE = VBoxR3Dll
1515VBoxRTDummy_INSTTYPE = none
1516VBoxRTDummy_LIBS = $(PATH_STAGE_BIN)/VBoxRT.so
1517VBoxRTDummy_CLEAN = $(PATH_STAGE_BIN)/VBoxRT.so
1518BLDDIRS += $(PATH_STAGE_BIN)
1519
1520$(PATH_STAGE_BIN)/VBoxRT.so: $$(VBoxRT_1_TARGET) | $$(dir $$@)
1521 $(INSTALL) $< $@
1522 chcon -t texrel_shlib_t $@ || true
1523
1524VBoxRT:: VBoxRTDummy
1525 endif # chcon present.
1526 endif # building VBoxRT
1527endif # linux
1528
1529
1530#
1531# VBoxRT-x86 - 32-bit version of VBoxRT
1532#
1533VBoxRT-x86_EXTENDS = VBoxRT
1534VBoxRT-x86_TEMPLATE = VBoxR3Dll-x86
1535VBoxRT-x86_INST.win = $(INST_DLL)x86/
1536VBoxRT-x86_SDKS = VBOX_LIBXML2
1537ifdef VBOX_WITH_LIBCURL
1538 VBoxRT-x86_SDKS += VBOX_LIBCURL-x86
1539endif
1540VBoxRT-x86_SDKS += VBOX_OPENSSL-x86
1541
1542VBoxRT-x86_LIBS = \
1543 $(PATH_STAGE_LIB)/VBox-liblzf-x86$(VBOX_SUFF_LIB)
1544if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1545VBoxRT-x86_LIBS += \
1546 $(PATH_STAGE_LIB)/SUPR3-x86$(VBOX_SUFF_LIB)
1547endif
1548ifdef IPRT_WITH_KSTUFF
1549 VBoxRT-x86_LIBS += \
1550 $(PATH_STAGE_LIB)/VBox-kStuff-x86$(VBOX_SUFF_LIB)
1551endif
1552ifndef SDK_VBOX_LIBXML2_LIBS
1553 VBoxRT-x86_LIBS += \
1554 $(PATH_STAGE_LIB)/VBox-libxml2-x86$(VBOX_SUFF_LIB)
1555endif
1556VBoxRT-x86_LIBS += \
1557 $(SDK_VBOX_ZLIB_LIBS-x86)
1558ifndef SDK_VBOX_OPENSSL_LIBS
1559 VBoxRT-x86_LIBS += \
1560 $(PATH_STAGE_LIB)/VBox-libcrypto-x86$(VBOX_SUFF_LIB) \
1561 $(PATH_STAGE_LIB)/VBox-libssl-x86$(VBOX_SUFF_LIB)
1562endif
1563ifdef IPRT_WITH_LZO
1564 VBoxRT-x86_LIBS += lzo2
1565endif
1566VBoxRT-x86_LIBS.linux = \
1567 crypt
1568VBoxRT-x86_LIBS.darwin = \
1569 iconv
1570VBoxRT-x86_LIBS.freebsd = \
1571 iconv \
1572 rt
1573VBoxRT-x86_LIBS.haiku = \
1574 iconv
1575VBoxRT-x86_LIBS.solaris = \
1576 kstat \
1577 contract
1578ifn1of ($(KBUILD_TARGET_ARCH), sparc32 sparc64)
1579 # SMBIOS not available on Solaris SPARC.
1580 VBoxRT-x86_LIBS.solaris += smbios
1581endif
1582VBoxRT-x86_LIBS.win = \
1583 $(PATH_SDK_$(VBOX_WINDDK)_LIB.x86)/vccomsup.lib \
1584 $(PATH_SDK_$(VBOX_WINDDK)_LIB.x86)/wbemuuid.lib \
1585 $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)X86_LIB)/delayimp.lib
1586
1587VBoxRT-x86_SOURCES.win = $(filter-out %.def %.rc,$(VBoxRT_SOURCES.win)) \
1588 $(VBoxRT-x86_0_OUTDIR)/VBoxRT-x86.def
1589if1of ($(DLLS), VBoxRT-x86)
1590$$(VBoxRT-x86_0_OUTDIR)/VBoxRT-x86.def: \
1591 $(PATH_SUB_CURRENT)/r3/win/VBoxRT-win32.def \
1592 $(PATH_SUB_CURRENT)/r3/win/$(if $(VBOX_OSE),VBoxRT-openssl-ose.def,VBoxRT-openssl.def)
1593 $(RM) -f -- $@
1594 $(REDIRECT) -wto $@ -- $(CAT_EXT) $^
1595endif
1596
1597if1of (VBoxRT-x86,$(DLLS))
1598 $(call VBOX_SET_VER_INFO_DLL,VBoxRT-x86,VirtualBox 32-bit Runtime)
1599endif
1600
1601#
1602# VBoxRTImp - Import library/hack.
1603#
1604ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.amd64)
1605$(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxRTImp,VBoxRT,VBox/VBoxRTImp.def r3/win/VBoxRT-win64.def)
1606else ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.x86)
1607$(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxRTImp,VBoxRT,VBox/VBoxRTImp.def r3/win/VBoxRT-win32.def)
1608else
1609$(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxRTImp,VBoxRT,VBox/VBoxRTImp.def)
1610endif
1611
1612
1613#
1614# RuntimeR3NoCRTGCC - CRT replacement lib for VBoxREM.
1615# This is used together with VBoxRT.
1616#
1617## @todo the *_alias.c stuff is busted, remove and use RT_WITH_NOCRT_ALIASES instead.
1618RuntimeR3NoCRTGCC_TEMPLATE = VBoxNoCrtGccLib
1619RuntimeR3NoCRTGCC_LIBSUFF = $(VBOX_SUFF_LIB)
1620ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1621 RuntimeR3NoCRTGCC_DEFS += RT_NO_GIP
1622endif
1623RuntimeR3NoCRTGCC_INCS = include
1624RuntimeR3NoCRTGCC_SOURCES := \
1625 common/misc/sanity-cpp.cpp \
1626 common/misc/sanity-c.c \
1627 \
1628 $(RuntimeNoCrt_SOURCES)
1629
1630if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1631RuntimeR3NoCRTGCC_SOURCES += \
1632 common/math/ceill.asm \
1633 common/math/cosl.asm \
1634 common/math/fabs.asm \
1635 common/math/fabsf.asm \
1636 common/math/fabsl.asm \
1637 common/math/floor.asm \
1638 common/math/floorf.asm \
1639 common/math/floorl.asm \
1640 common/math/ldexpl.asm \
1641 common/math/llrint.asm \
1642 common/math/llrintf.asm \
1643 common/math/llrintl.asm \
1644 common/math/logl.asm \
1645 common/math/lrint.asm \
1646 common/math/lrintf.asm \
1647 common/math/lrintl.asm \
1648 common/math/remainder.asm \
1649 common/math/remainderf.asm \
1650 common/math/remainderl.asm \
1651 common/math/sinl.asm \
1652 common/math/tanl.asm \
1653 common/math/trunc.asm \
1654 common/math/truncf.asm \
1655 common/math/truncl.asm \
1656 \
1657 common/string/memchr_alias.c \
1658 common/string/memcmp_alias.c \
1659 common/string/memcpy_alias.c \
1660 common/string/memmove_alias.c \
1661 common/string/memset_alias.c \
1662 common/string/strchr_alias.c \
1663 common/string/strcmp_alias.c \
1664 common/string/strlen_alias.c
1665endif
1666
1667RuntimeR3NoCRTGCC_SOURCES.x86 = \
1668 common/math/x86/fenv-x86.c \
1669 common/math/gcc/adddi3.c \
1670 common/math/gcc/anddi3.c \
1671 common/math/gcc/ashldi3.c \
1672 common/math/gcc/ashrdi3.c \
1673 common/math/gcc/cmpdi2.c \
1674 common/math/gcc/divdi3.c \
1675 common/math/gcc/iordi3.c \
1676 common/math/gcc/lshldi3.c \
1677 common/math/gcc/lshrdi3.c \
1678 common/math/gcc/moddi3.c \
1679 common/math/gcc/muldi3.c \
1680 common/math/gcc/negdi2.c \
1681 common/math/gcc/notdi2.c \
1682 common/math/gcc/qdivrem.c \
1683 common/math/gcc/subdi3.c \
1684 common/math/gcc/ucmpdi2.c \
1685 common/math/gcc/udivdi3.c \
1686 common/math/gcc/umoddi3.c \
1687 common/math/gcc/xordi3.c
1688
1689
1690#
1691# RuntimeR0 - Ring-0 library for VMMR0.
1692#
1693RuntimeR0_TEMPLATE = VBoxR0
1694RuntimeR0_DEFS = IN_RT_R0 RT_WITH_VBOX
1695ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1696 RuntimeR0_DEFS += RT_NO_GIP
1697endif
1698RuntimeR0_INCS = include
1699RuntimeR0_SOURCES := \
1700 common/log/logellipsis.cpp \
1701 common/log/logrelellipsis.cpp \
1702 common/log/logcom.cpp \
1703 common/log/logformat.cpp \
1704 common/log/tracebuf.cpp \
1705 common/log/tracedefault.cpp \
1706 common/misc/RTAssertMsg1Weak.cpp \
1707 common/misc/RTAssertMsg2.cpp \
1708 common/misc/RTAssertMsg2Add.cpp \
1709 common/misc/RTAssertMsg2AddWeak.cpp \
1710 common/misc/RTAssertMsg2AddWeakV.cpp \
1711 common/misc/RTAssertMsg2Weak.cpp \
1712 common/misc/RTAssertMsg2WeakV.cpp \
1713 common/misc/buildconfig.cpp \
1714 common/misc/once.cpp \
1715 common/misc/sanity-c.c \
1716 common/misc/sanity-cpp.cpp \
1717 common/misc/term.cpp \
1718 common/path/RTPathFilename.cpp \
1719 common/string/strhash1.cpp \
1720 common/string/strncmp.cpp \
1721 common/string/strpbrk.cpp \
1722 common/string/RTStrCat.cpp \
1723 common/string/RTStrCatEx.cpp \
1724 common/string/RTStrCatP.cpp \
1725 common/string/RTStrCatPEx.cpp \
1726 common/string/RTStrCopy.cpp \
1727 common/string/RTStrCopyEx.cpp \
1728 common/string/RTStrCopyP.cpp \
1729 common/string/RTStrCopyPEx.cpp \
1730 common/string/RTStrNLen.cpp \
1731 common/string/RTStrNLenEx.cpp \
1732 common/table/avlgcptr.cpp \
1733 common/table/avlhcphys.cpp \
1734 common/table/avllu32.cpp \
1735 common/table/avlogcphys.cpp \
1736 common/table/avlogcptr.cpp \
1737 common/table/avlohcphys.cpp \
1738 common/table/avloioport.cpp \
1739 common/table/avlpv.cpp \
1740 common/table/avlrogcphys.cpp \
1741 common/table/avlrogcptr.cpp \
1742 common/table/avlroioport.cpp \
1743 common/table/avlroogcptr.cpp \
1744 common/table/avlu32.cpp \
1745 common/table/avlou32.cpp \
1746 common/time/timesup.cpp \
1747 generic/RTAssertShouldPanic-generic.cpp \
1748 generic/critsect-generic.cpp \
1749 \
1750 $(RuntimeNoCrt_SOURCES)
1751
1752if1of ($(KBUILD_TARGET), darwin solaris freebsd)
1753RuntimeR0_SOURCES += \
1754 common/math/gcc/adddi3.c \
1755 common/math/gcc/anddi3.c \
1756 common/math/gcc/ashldi3.c \
1757 common/math/gcc/ashrdi3.c \
1758 common/math/gcc/cmpdi2.c \
1759 common/math/gcc/divdi3.c \
1760 common/math/gcc/iordi3.c \
1761 common/math/gcc/lshldi3.c \
1762 common/math/gcc/lshrdi3.c \
1763 common/math/gcc/moddi3.c \
1764 common/math/gcc/muldi3.c \
1765 common/math/gcc/negdi2.c \
1766 common/math/gcc/notdi2.c \
1767 common/math/gcc/qdivrem.c \
1768 common/math/gcc/subdi3.c \
1769 common/math/gcc/ucmpdi2.c \
1770 common/math/gcc/udivdi3.c \
1771 common/math/gcc/umoddi3.c \
1772 common/math/gcc/xordi3.c
1773endif
1774
1775RuntimeR0_SOURCES.x86 += \
1776 common/asm/ASMCpuIdExSlow.asm \
1777 common/asm/ASMAtomicUoAndU64.asm \
1778 common/asm/ASMAtomicUoAndU32.asm \
1779 common/asm/ASMAtomicUoDecU32.asm \
1780 common/asm/ASMAtomicUoIncU32.asm \
1781 common/asm/ASMAtomicUoOrU64.asm \
1782 common/asm/ASMAtomicUoOrU32.asm \
1783 common/asm/ASMGetXcr0.asm \
1784 common/asm/ASMSetXcr0.asm \
1785 common/asm/ASMXSave.asm \
1786 common/asm/ASMXRstor.asm \
1787 common/asm/ASMRdMsrEx.asm \
1788 common/asm/ASMWrMsrEx.asm
1789RuntimeR0_SOURCES.amd64 += \
1790 common/asm/ASMCpuIdExSlow.asm \
1791 common/asm/ASMAtomicUoAndU64.asm \
1792 common/asm/ASMAtomicUoAndU32.asm \
1793 common/asm/ASMAtomicUoDecU32.asm \
1794 common/asm/ASMAtomicUoIncU32.asm \
1795 common/asm/ASMAtomicUoOrU64.asm \
1796 common/asm/ASMAtomicUoOrU32.asm \
1797 common/asm/ASMGetXcr0.asm \
1798 common/asm/ASMSetXcr0.asm \
1799 common/asm/ASMXSave.asm \
1800 common/asm/ASMXRstor.asm \
1801 common/asm/ASMRdMsrEx.asm \
1802 common/asm/ASMWrMsrEx.asm
1803
1804#if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
1805# RuntimeR0_SOURCES += common/time/timesupA.asm
1806#else
1807 RuntimeR0_SOURCES += common/time/timesupref.cpp
1808#endif
1809
1810RuntimeR0_SOURCES.win.amd64 := $(RuntimeWin64ASM_SOURCES)
1811RuntimeR0_SOURCES.win.x86 := $(RuntimeWin32ASM_SOURCES)
1812RuntimeR0_SOURCES.win = \
1813 nt/NtProcessStartup-stub.cpp
1814
1815RuntimeR0_SOURCES.os2 = \
1816 os2/sys0.asm
1817
1818
1819#
1820# RuntimeR0Stub - Ring-0 context startup stub for Windows and Solaris.
1821#
1822RuntimeR0Stub_TEMPLATE = $(if-expr "$(KBUILD_TARGET)" == "solaris",VBoxR0DrvLib,VBoxR0)
1823RuntimeR0Stub_SOURCES.win = \
1824 nt/NtProcessStartup-stub.cpp
1825RuntimeR0Stub_SOURCES.solaris = \
1826 r0drv/solaris/modulestub-r0drv-solaris.c
1827
1828
1829#
1830# RuntimeR0Drv - Ring-0 library for host drivers.
1831#
1832RuntimeR0Drv_TEMPLATE = VBoxR0DrvLib
1833RuntimeR0Drv_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK) $(VBOX_WINPSDK)INCS VBOX_OPENSSL
1834RuntimeR0Drv_DEFS = IN_RT_R0 RT_WITH_VBOX RT_WITHOUT_NOCRT_WRAPPERS RT_NO_EXPORT_SYMBOL
1835RuntimeR0Drv_DEFS.win = IN_SUP_R0 LDR_ONLY_PE
1836RuntimeR0Drv_DEFS.linux = MODULE KBUILD_MODNAME=KBUILD_STR\(vboxdrv\) KBUILD_BASENAME=KBUILD_STR\(vboxdrv\) IN_SUP_R0
1837
1838RuntimeR0Drv_INCS := $(PATH_SUB_CURRENT) include
1839RuntimeR0Drv_INCS.freebsd = \
1840 $(PATH_STAGE)/gen-sys-hdrs
1841RuntimeR0Drv_INCS.linux = \
1842 r0drv/linux
1843RuntimeR0Drv_INCS.solaris = \
1844 r0drv/solaris/vbi/i86pc \
1845 r0drv/solaris/vbi/i86pc/sys
1846
1847RuntimeR0Drv_SOURCES = \
1848 common/alloc/alloc.cpp \
1849 common/alloc/heapsimple.cpp \
1850 common/alloc/heapoffset.cpp \
1851 common/checksum/alt-md5.cpp \
1852 common/checksum/crc32.cpp \
1853 common/checksum/crc64.cpp \
1854 common/checksum/ipv4.cpp \
1855 common/checksum/ipv6.cpp \
1856 common/err/RTErrConvertToErrno.cpp \
1857 common/err/RTErrConvertFromErrno.cpp \
1858 common/log/log.cpp \
1859 common/log/logellipsis.cpp \
1860 common/log/logrel.cpp \
1861 common/log/logrelellipsis.cpp \
1862 common/log/logcom.cpp \
1863 common/log/logformat.cpp \
1864 common/log/tracebuf.cpp \
1865 common/log/tracedefault.cpp \
1866 common/misc/RTAssertMsg1Weak.cpp \
1867 common/misc/RTAssertMsg2.cpp \
1868 common/misc/RTAssertMsg2Add.cpp \
1869 common/misc/RTAssertMsg2AddWeak.cpp \
1870 common/misc/RTAssertMsg2AddWeakV.cpp \
1871 common/misc/RTAssertMsg2Weak.cpp \
1872 common/misc/RTAssertMsg2WeakV.cpp \
1873 common/misc/assert.cpp \
1874 common/misc/buildconfig.cpp \
1875 common/misc/handletable.cpp \
1876 common/misc/handletablectx.cpp \
1877 common/misc/handletablesimple.cpp \
1878 common/misc/once.cpp \
1879 common/misc/sanity-c.c \
1880 common/misc/sanity-cpp.cpp \
1881 common/misc/term.cpp \
1882 common/misc/RTMemWipeThoroughly.cpp \
1883 common/path/rtPathVolumeSpecLen.cpp \
1884 common/path/RTPathAbsDup.cpp \
1885 common/path/RTPathAbsEx.cpp \
1886 common/path/RTPathAbsExDup.cpp \
1887 common/path/RTPathAppend.cpp \
1888 common/path/RTPathAppendEx.cpp \
1889 common/path/RTPathExt.cpp \
1890 common/path/RTPathFilename.cpp \
1891 common/path/RTPathHasExt.cpp \
1892 common/path/RTPathHasPath.cpp \
1893 common/path/RTPathParseSimple.cpp \
1894 common/path/RTPathRealDup.cpp \
1895 common/path/RTPathStripExt.cpp \
1896 common/path/RTPathStripFilename.cpp \
1897 common/path/RTPathStripTrailingSlash.cpp \
1898 common/rand/rand.cpp \
1899 common/rand/randadv.cpp \
1900 common/rand/randparkmiller.cpp \
1901 common/string/RTStrCat.cpp \
1902 common/string/RTStrCatEx.cpp \
1903 common/string/RTStrCatP.cpp \
1904 common/string/RTStrCatPEx.cpp \
1905 common/string/RTStrCmp.cpp \
1906 common/string/RTStrCopy.cpp \
1907 common/string/RTStrCopyEx.cpp \
1908 common/string/RTStrCopyP.cpp \
1909 common/string/RTStrCopyPEx.cpp \
1910 common/string/RTStrNCmp.cpp \
1911 common/string/RTStrNLen.cpp \
1912 common/string/RTStrNLenEx.cpp \
1913 common/string/straprintf.cpp \
1914 common/string/strformat.cpp \
1915 common/string/strformatnum.cpp \
1916 common/string/strformatrt.cpp \
1917 common/string/strformattype.cpp \
1918 common/string/strhash1.cpp \
1919 common/string/strprintf.cpp \
1920 common/string/strtonum.cpp \
1921 common/string/stringalloc.cpp \
1922 common/string/unidata-flags.cpp \
1923 common/string/unidata-lower.cpp \
1924 common/string/unidata-upper.cpp \
1925 common/string/utf-8.cpp \
1926 common/string/utf-8-case.cpp \
1927 common/string/utf-8-case2.cpp \
1928 common/string/utf-16.cpp \
1929 common/string/utf-16-case.cpp \
1930 common/string/utf-16-latin-1.cpp \
1931 common/table/avlpv.cpp \
1932 common/time/time.cpp \
1933 generic/RTLogWriteStdErr-stub-generic.cpp \
1934 generic/RTLogWriteUser-generic.cpp \
1935 generic/RTMpGetArraySize-generic.cpp \
1936 generic/RTRandAdvCreateSystemFaster-generic.cpp \
1937 generic/RTSemEventWait-2-ex-generic.cpp \
1938 generic/RTSemEventWaitNoResume-2-ex-generic.cpp \
1939 generic/RTSemEventMultiWait-2-ex-generic.cpp \
1940 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
1941 generic/critsect-generic.cpp \
1942 generic/errvars-generic.cpp \
1943 generic/uuid-generic.cpp \
1944 r0drv/alloc-r0drv.cpp \
1945 r0drv/initterm-r0drv.cpp \
1946 r0drv/generic/semspinmutex-r0drv-generic.c \
1947 VBox/log-vbox.cpp \
1948
1949RuntimeR0Drv_SOURCES.amd64 = \
1950 common/asm/ASMRdMsrEx.asm \
1951 common/asm/ASMWrMsrEx.asm \
1952 common/math/bignum-amd64-x86.asm \
1953 common/math/RTUInt128MulByU64.asm
1954RuntimeR0Drv_SOURCES.x86 = \
1955 common/asm/ASMRdMsrEx.asm \
1956 common/asm/ASMWrMsrEx.asm \
1957 common/math/bignum-amd64-x86.asm
1958
1959
1960RuntimeR0Drv_SOURCES.linux = \
1961 common/misc/thread.cpp \
1962 common/string/strpbrk.cpp \
1963 generic/RTAssertShouldPanic-generic.cpp \
1964 generic/RTLogWriteStdOut-stub-generic.cpp \
1965 generic/RTMpGetCoreCount-generic.cpp \
1966 generic/mppresent-generic.cpp \
1967 r0drv/linux/alloc-r0drv-linux.c \
1968 r0drv/linux/assert-r0drv-linux.c \
1969 r0drv/linux/initterm-r0drv-linux.c \
1970 r0drv/linux/memobj-r0drv-linux.c \
1971 r0drv/linux/memuserkernel-r0drv-linux.c \
1972 r0drv/linux/mp-r0drv-linux.c \
1973 r0drv/linux/mpnotification-r0drv-linux.c \
1974 r0drv/linux/process-r0drv-linux.c \
1975 r0drv/linux/RTLogWriteDebugger-r0drv-linux.c \
1976 r0drv/linux/semevent-r0drv-linux.c \
1977 r0drv/linux/semeventmulti-r0drv-linux.c \
1978 r0drv/linux/semfastmutex-r0drv-linux.c \
1979 r0drv/linux/semmutex-r0drv-linux.c \
1980 r0drv/linux/spinlock-r0drv-linux.c \
1981 r0drv/linux/thread-r0drv-linux.c \
1982 r0drv/linux/thread2-r0drv-linux.c \
1983 r0drv/linux/threadctxhooks-r0drv-linux.c \
1984 r0drv/linux/time-r0drv-linux.c \
1985 r0drv/linux/timer-r0drv-linux.c \
1986 r0drv/memobj-r0drv.cpp \
1987 r0drv/mpnotification-r0drv.c \
1988 r0drv/powernotification-r0drv.c
1989
1990RuntimeR0Drv_SOURCES.win = \
1991 common/ldr/ldr.cpp \
1992 common/ldr/ldrEx.cpp \
1993 common/ldr/ldrPE.cpp \
1994 common/asn1/asn1-basics.cpp \
1995 common/asn1/asn1-dump.cpp \
1996 common/asn1/asn1-cursor.cpp \
1997 common/asn1/asn1-default-allocator.cpp \
1998 common/asn1/asn1-encode.cpp \
1999 common/asn1/asn1-ut-bitstring.cpp \
2000 common/asn1/asn1-ut-bitstring-decode.cpp \
2001 common/asn1/asn1-ut-boolean.cpp \
2002 common/asn1/asn1-ut-boolean-decode.cpp \
2003 common/asn1/asn1-ut-core.cpp \
2004 common/asn1/asn1-ut-core-decode.cpp \
2005 common/asn1/asn1-ut-dyntype.cpp \
2006 common/asn1/asn1-ut-dyntype-decode.cpp \
2007 common/asn1/asn1-ut-integer.cpp \
2008 common/asn1/asn1-ut-integer-decode.cpp \
2009 common/asn1/asn1-ut-null.cpp \
2010 common/asn1/asn1-ut-null-decode.cpp \
2011 common/asn1/asn1-ut-objid.cpp \
2012 common/asn1/asn1-ut-objid-decode.cpp \
2013 common/asn1/asn1-ut-octetstring.cpp \
2014 common/asn1/asn1-ut-octetstring-decode.cpp \
2015 common/asn1/asn1-ut-string.cpp \
2016 common/asn1/asn1-ut-string-decode.cpp \
2017 common/asn1/asn1-ut-time.cpp \
2018 common/asn1/asn1-ut-time-decode.cpp \
2019 common/crypto/digest-core.cpp \
2020 common/crypto/digest-builtin.cpp \
2021 common/crypto/rsa-asn1-decoder.cpp \
2022 common/crypto/rsa-core.cpp \
2023 common/crypto/rsa-init.cpp \
2024 common/crypto/rsa-sanity.cpp \
2025 common/crypto/pkcs7-asn1-decoder.cpp \
2026 common/crypto/pkcs7-core.cpp \
2027 common/crypto/pkcs7-init.cpp \
2028 common/crypto/pkcs7-sanity.cpp \
2029 common/crypto/pkcs7-verify.cpp \
2030 common/crypto/pkix-signature-builtin.cpp \
2031 common/crypto/pkix-signature-core.cpp \
2032 common/crypto/pkix-signature-rsa.cpp \
2033 common/crypto/pkix-util.cpp \
2034 common/crypto/pkix-verify.cpp \
2035 common/crypto/spc-asn1-decoder.cpp \
2036 common/crypto/spc-core.cpp \
2037 common/crypto/spc-init.cpp \
2038 common/crypto/spc-sanity.cpp \
2039 common/crypto/x509-asn1-decoder.cpp \
2040 common/crypto/x509-certpaths.cpp \
2041 common/crypto/x509-core.cpp \
2042 common/crypto/x509-init.cpp \
2043 common/crypto/x509-sanity.cpp \
2044 common/crypto/x509-verify.cpp \
2045 common/crypto/store.cpp \
2046 common/crypto/store-inmem.cpp \
2047 common/crypto/taf-asn1-decoder.cpp \
2048 common/crypto/taf-core.cpp \
2049 common/crypto/taf-init.cpp \
2050 common/crypto/taf-sanity.cpp \
2051 common/crypto/tsp-asn1-decoder.cpp \
2052 common/crypto/tsp-core.cpp \
2053 common/crypto/tsp-init.cpp \
2054 common/crypto/tsp-sanity.cpp \
2055 common/checksum/alt-md2.cpp \
2056 common/checksum/alt-sha1.cpp \
2057 common/checksum/alt-sha256.cpp \
2058 common/checksum/alt-sha512.cpp \
2059 common/checksum/md2str.cpp \
2060 common/checksum/md5str.cpp \
2061 common/checksum/sha1str.cpp \
2062 common/checksum/sha224str.cpp \
2063 common/checksum/sha256str.cpp \
2064 common/checksum/sha384str.cpp \
2065 common/checksum/sha512str.cpp \
2066 common/checksum/sha512t224str.cpp \
2067 common/checksum/sha512t256str.cpp \
2068 common/err/errinfo.cpp \
2069 common/path/RTPathChangeToUnixSlashes.cpp \
2070 common/math/bignum.cpp \
2071 common/misc/zero.asm \
2072 common/string/RTStrPrintHexBytes.cpp \
2073 common/string/RTUtf16Copy.cpp \
2074 common/string/RTUtf16CopyAscii.cpp \
2075 common/string/RTUtf16Cat.cpp \
2076 common/string/RTUtf16CatAscii.cpp \
2077 common/string/RTUtf16End.cpp \
2078 common/string/RTUtf16NLen.cpp \
2079 common/string/RTUtf16NLenEx.cpp \
2080 common/string/RTUtf16PrintHexBytes.cpp \
2081 common/string/strstrip.cpp \
2082 generic/memsafer-generic.cpp \
2083 \
2084 common/misc/thread.cpp \
2085 common/string/memcmp.asm \
2086 common/string/memchr.asm \
2087 common/string/memcpy.asm \
2088 common/string/memset.asm \
2089 common/string/memmove.asm \
2090 common/string/strlen.asm \
2091 common/string/strncmp.cpp \
2092 common/string/strpbrk.cpp \
2093 generic/RTAssertShouldPanic-generic.cpp \
2094 generic/RTLogWriteStdOut-stub-generic.cpp \
2095 generic/RTTimerCreate-generic.cpp \
2096 generic/mppresent-generic.cpp \
2097 generic/RTMpGetCoreCount-generic.cpp \
2098 nt/RTErrConvertFromNtStatus.cpp \
2099 r0drv/generic/threadctxhooks-r0drv-generic.cpp \
2100 r0drv/memobj-r0drv.cpp \
2101 r0drv/mpnotification-r0drv.c \
2102 r0drv/powernotification-r0drv.c \
2103 r0drv/nt/alloc-r0drv-nt.cpp \
2104 r0drv/nt/assert-r0drv-nt.cpp \
2105 r0drv/nt/initterm-r0drv-nt.cpp \
2106 r0drv/nt/memobj-r0drv-nt.cpp \
2107 r0drv/nt/memuserkernel-r0drv-nt.cpp \
2108 r0drv/nt/mp-r0drv-nt.cpp \
2109 r0drv/nt/mpnotification-r0drv-nt.cpp \
2110 r0drv/nt/process-r0drv-nt.cpp \
2111 r0drv/nt/RTLogWriteDebugger-r0drv-nt.cpp \
2112 r0drv/nt/semevent-r0drv-nt.cpp \
2113 r0drv/nt/semeventmulti-r0drv-nt.cpp \
2114 r0drv/nt/semfastmutex-r0drv-nt.cpp \
2115 r0drv/nt/semmutex-r0drv-nt.cpp \
2116 r0drv/nt/spinlock-r0drv-nt.cpp \
2117 r0drv/nt/thread-r0drv-nt.cpp \
2118 r0drv/nt/thread2-r0drv-nt.cpp \
2119 r0drv/nt/time-r0drv-nt.cpp \
2120 r0drv/nt/timer-r0drv-nt.cpp \
2121 r0drv/nt/toxic-chkstk-r0drv-nt.asm \
2122 r0drv/nt/RTTimerGetSystemGranularity-r0drv-nt.cpp
2123
2124RuntimeR0Drv_SOURCES.win.amd64 := $(RuntimeWin64ASM_SOURCES)
2125RuntimeR0Drv_SOURCES.win.x86 := $(RuntimeWin32ASM_SOURCES)
2126
2127RuntimeR0Drv_SOURCES.darwin = \
2128 common/misc/thread.cpp \
2129 common/string/memchr.asm \
2130 common/string/strpbrk.cpp \
2131 darwin/RTErrConvertFromDarwin.cpp \
2132 darwin/RTErrConvertFromDarwinIO.cpp \
2133 darwin/RTErrConvertFromDarwinKern.cpp \
2134 generic/RTAssertShouldPanic-generic.cpp \
2135 generic/RTTimerCreate-generic.cpp \
2136 generic/RTMpGetCoreCount-generic.cpp \
2137 generic/RTMpOnPair-generic.cpp \
2138 generic/mppresent-generic.cpp \
2139 generic/timer-generic.cpp \
2140 r0drv/generic/mpnotification-r0drv-generic.cpp \
2141 r0drv/generic/threadctxhooks-r0drv-generic.cpp \
2142 r0drv/darwin/alloc-r0drv-darwin.cpp \
2143 r0drv/darwin/assert-r0drv-darwin.cpp \
2144 r0drv/darwin/initterm-r0drv-darwin.cpp \
2145 r0drv/darwin/dbgkrnlinfo-r0drv-darwin.cpp \
2146 r0drv/darwin/memobj-r0drv-darwin.cpp \
2147 r0drv/darwin/mp-r0drv-darwin.cpp \
2148 r0drv/darwin/memuserkernel-r0drv-darwin.cpp \
2149 r0drv/darwin/process-r0drv-darwin.cpp \
2150 r0drv/darwin/RTLogWriteDebugger-r0drv-darwin.cpp \
2151 r0drv/darwin/RTLogWriteStdOut-r0drv-darwin.cpp \
2152 r0drv/darwin/semevent-r0drv-darwin.cpp \
2153 r0drv/darwin/semeventmulti-r0drv-darwin.cpp \
2154 r0drv/darwin/semfastmutex-r0drv-darwin.cpp \
2155 r0drv/darwin/semmutex-r0drv-darwin.cpp \
2156 r0drv/darwin/spinlock-r0drv-darwin.cpp \
2157 r0drv/darwin/thread-r0drv-darwin.cpp \
2158 r0drv/darwin/thread2-r0drv-darwin.cpp \
2159 r0drv/darwin/threadpreempt-r0drv-darwin.cpp \
2160 r0drv/darwin/time-r0drv-darwin.cpp \
2161 r0drv/memobj-r0drv.cpp \
2162 r0drv/powernotification-r0drv.c
2163
2164RuntimeR0Drv_SOURCES.os2 = \
2165 common/string/memchr.asm \
2166 common/string/memcmp.asm \
2167 common/string/memcpy.asm \
2168 common/string/mempcpy.asm \
2169 common/string/memmove.asm \
2170 common/string/memset.asm \
2171 common/string/strchr.asm \
2172 common/string/strcmp.asm \
2173 common/string/strcpy.asm \
2174 common/string/strlen.asm \
2175 \
2176 common/string/strncmp.cpp \
2177 common/string/strpbrk.cpp \
2178 \
2179 common/misc/thread.cpp \
2180 generic/RTAssertShouldPanic-generic.cpp \
2181 generic/RTLogWriteDebugger-generic.cpp \
2182 generic/RTLogWriteStdOut-stub-generic.cpp \
2183 generic/RTMpCpuId-generic.cpp \
2184 generic/RTMpCpuIdFromSetIndex-generic.cpp \
2185 generic/RTMpCpuIdToSetIndex-generic.cpp \
2186 generic/RTMpIsCpuPossible-generic.cpp \
2187 generic/RTMpGetCount-generic.cpp \
2188 generic/RTMpGetMaxCpuId-generic.cpp \
2189 generic/RTMpGetOnlineCount-generic.cpp \
2190 generic/RTMpGetOnlineSet-generic.cpp \
2191 generic/RTMpGetSet-generic.cpp \
2192 generic/RTMpIsCpuOnline-generic.cpp \
2193 generic/RTTimerCreate-generic.cpp \
2194 generic/mppresent-generic.cpp \
2195 os2/RTErrConvertFromOS2.cpp \
2196 os2/rtSemWaitOs2ConvertTimeout.cpp \
2197 os2/sys0.asm \
2198 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
2199 r0drv/generic/RTMpOn-r0drv-generic.cpp \
2200 r0drv/generic/mpnotification-r0drv-generic.cpp \
2201 r0drv/generic/threadctxhooks-r0drv-generic.cpp \
2202 r0drv/memobj-r0drv.cpp \
2203 r0drv/powernotification-r0drv.c \
2204 r0drv/os2/alloc-r0drv-os2.cpp \
2205 r0drv/os2/assert-r0drv-os2.cpp \
2206 r0drv/os2/assertA-r0drv-os2.asm \
2207 r0drv/os2/initterm-r0drv-os2.cpp \
2208 r0drv/os2/memobj-r0drv-os2.cpp \
2209 r0drv/os2/memuserkernel-r0drv-os2.cpp \
2210 r0drv/os2/os2imports.imp \
2211 r0drv/os2/process-r0drv-os2.cpp \
2212 r0drv/os2/RTR0AssertPanicSystem-r0drv-os2.asm \
2213 r0drv/os2/RTR0Os2DHQueryDOSVar.asm \
2214 r0drv/os2/RTR0Os2DHVMGlobalToProcess.asm \
2215 r0drv/os2/semevent-r0drv-os2.cpp \
2216 r0drv/os2/semeventmulti-r0drv-os2.cpp \
2217 r0drv/os2/semfastmutex-r0drv-os2.cpp \
2218 r0drv/os2/spinlock-r0drv-os2.cpp \
2219 r0drv/os2/thread-r0drv-os2.cpp \
2220 r0drv/os2/thread2-r0drv-os2.cpp \
2221 r0drv/os2/time-r0drv-os2.cpp \
2222 r0drv/os2/timer-r0drv-os2.cpp \
2223 r0drv/os2/timerA-r0drv-os2.asm
2224
2225RuntimeR0Drv_SOURCES.freebsd = \
2226 common/misc/thread.cpp \
2227 common/string/memchr.asm \
2228 common/string/memmove.asm \
2229 common/string/strpbrk.cpp \
2230 common/string/memcmp.asm \
2231 common/string/strchr.asm \
2232 generic/RTAssertShouldPanic-generic.cpp \
2233 generic/RTLogWriteDebugger-generic.cpp \
2234 generic/RTLogWriteStdOut-stub-generic.cpp \
2235 generic/RTMpOnPair-generic.cpp \
2236 generic/RTTimerCreate-generic.cpp \
2237 generic/mppresent-generic.cpp \
2238 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
2239 r0drv/generic/mpnotification-r0drv-generic.cpp \
2240 r0drv/generic/threadctxhooks-r0drv-generic.cpp \
2241 r0drv/freebsd/alloc-r0drv-freebsd.c \
2242 r0drv/freebsd/assert-r0drv-freebsd.c \
2243 r0drv/freebsd/initterm-r0drv-freebsd.c \
2244 r0drv/freebsd/memobj-r0drv-freebsd.c \
2245 r0drv/freebsd/memuserkernel-r0drv-freebsd.c \
2246 r0drv/freebsd/process-r0drv-freebsd.c \
2247 r0drv/freebsd/semevent-r0drv-freebsd.c \
2248 r0drv/freebsd/semeventmulti-r0drv-freebsd.c \
2249 r0drv/freebsd/semfastmutex-r0drv-freebsd.c \
2250 r0drv/freebsd/semmutex-r0drv-freebsd.c \
2251 r0drv/freebsd/spinlock-r0drv-freebsd.c \
2252 r0drv/freebsd/thread-r0drv-freebsd.c \
2253 r0drv/freebsd/thread2-r0drv-freebsd.c \
2254 r0drv/freebsd/time-r0drv-freebsd.c \
2255 r0drv/freebsd/mp-r0drv-freebsd.c \
2256 generic/timer-generic.cpp \
2257 r0drv/memobj-r0drv.cpp \
2258 r0drv/powernotification-r0drv.c
2259
2260RuntimeR0Drv_SOURCES.solaris = \
2261 common/misc/thread.cpp \
2262 common/string/memchr.asm \
2263 generic/RTAssertShouldPanic-generic.cpp \
2264 generic/RTLogWriteStdOut-stub-generic.cpp \
2265 generic/RTMpGetCoreCount-generic.cpp \
2266 generic/RTTimerCreate-generic.cpp \
2267 generic/mppresent-generic.cpp \
2268 r0drv/memobj-r0drv.cpp \
2269 r0drv/mpnotification-r0drv.c \
2270 r0drv/powernotification-r0drv.c \
2271 r0drv/solaris/RTLogWriteDebugger-r0drv-solaris.c \
2272 r0drv/solaris/RTMpPokeCpu-r0drv-solaris.c \
2273 r0drv/solaris/alloc-r0drv-solaris.c \
2274 r0drv/solaris/assert-r0drv-solaris.c \
2275 r0drv/solaris/dbgkrnlinfo-r0drv-solaris.c \
2276 r0drv/solaris/initterm-r0drv-solaris.c \
2277 r0drv/solaris/memuserkernel-r0drv-solaris.c \
2278 r0drv/solaris/mpnotification-r0drv-solaris.c \
2279 r0drv/solaris/memobj-r0drv-solaris.c \
2280 r0drv/solaris/mp-r0drv-solaris.c \
2281 r0drv/solaris/process-r0drv-solaris.c \
2282 r0drv/solaris/semevent-r0drv-solaris.c \
2283 r0drv/solaris/semeventmulti-r0drv-solaris.c \
2284 r0drv/solaris/semfastmutex-r0drv-solaris.c \
2285 r0drv/solaris/semmutex-r0drv-solaris.c \
2286 r0drv/solaris/spinlock-r0drv-solaris.c \
2287 r0drv/solaris/thread-r0drv-solaris.c \
2288 r0drv/solaris/thread2-r0drv-solaris.c \
2289 r0drv/solaris/threadctxhooks-r0drv-solaris.c \
2290 r0drv/solaris/time-r0drv-solaris.c \
2291 r0drv/solaris/timer-r0drv-solaris.c
2292
2293RuntimeR0Drv_SOURCES.haiku = \
2294 common/misc/thread.cpp \
2295 common/string/memchr.asm \
2296 common/string/memmove.asm \
2297 common/string/strpbrk.cpp \
2298 common/string/memcmp.asm \
2299 common/string/strchr.asm \
2300 generic/RTAssertShouldPanic-generic.cpp \
2301 generic/RTMpOnPair-generic.cpp \
2302 generic/RTTimerCreate-generic.cpp \
2303 generic/mppresent-generic.cpp \
2304 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
2305 r0drv/generic/mpnotification-r0drv-generic.cpp \
2306 r0drv/generic/threadctxhooks-r0drv-generic.cpp \
2307 r0drv/haiku/alloc-r0drv-haiku.c \
2308 r0drv/haiku/assert-r0drv-haiku.c \
2309 r0drv/haiku/initterm-r0drv-haiku.c \
2310 r0drv/haiku/memobj-r0drv-haiku.c \
2311 r0drv/haiku/mp-r0drv-haiku.c \
2312 r0drv/haiku/process-r0drv-haiku.c \
2313 r0drv/haiku/RTLogWriteDebugger-r0drv-haiku.c \
2314 r0drv/haiku/RTLogWriteStdOut-r0drv-haiku.c \
2315 r0drv/haiku/semevent-r0drv-haiku.c \
2316 r0drv/haiku/semeventmulti-r0drv-haiku.c \
2317 r0drv/haiku/semfastmutex-r0drv-haiku.c \
2318 r0drv/haiku/semmutex-r0drv-haiku.c \
2319 r0drv/haiku/spinlock-r0drv-haiku.c \
2320 r0drv/haiku/thread-r0drv-haiku.c \
2321 r0drv/haiku/thread2-r0drv-haiku.c \
2322 r0drv/haiku/time-r0drv-haiku.c \
2323 generic/timer-generic.cpp \
2324 r0drv/memobj-r0drv.cpp \
2325 r0drv/powernotification-r0drv.c
2326
2327## PORTME: Porters create and add their selection of platform specific Ring-0 Driver files here.
2328
2329RuntimeR0Drv_ORDERDEPS.freebsd = \
2330 $(PATH_STAGE)/gen-sys-hdrs/bus_if.h \
2331 $(PATH_STAGE)/gen-sys-hdrs/device_if.h
2332
2333
2334#
2335# RuntimeGuestR0 - Guest driver runtime.
2336# This is almost the same as the RuntimeR0Drv, the main difference
2337# is in the backdoor logging and the lack of sup.h (which should be
2338# made irrelevant even for RuntimeR0Drv).
2339#
2340RuntimeGuestR0_TEMPLATE := VBOXGUESTR0LIB
2341RuntimeGuestR0_EXTENDS = RuntimeR0Drv
2342RuntimeGuestR0_SOURCES := $(filter-out generic/RTLogWriteUser-generic.cpp, $(RuntimeR0Drv_SOURCES))
2343RuntimeGuestR0_SOURCES += \
2344 VBox/logbackdoor.cpp
2345RuntimeGuestR0_SOURCES.win := \
2346 $(filter-out common/checksum/md% common/checksum/sha%, $(RuntimeR0Drv_SOURCES.win))
2347
2348
2349#
2350# RuntimeGuestR0NT4 - Win32 NT4 guest driver runtime.
2351#
2352RuntimeGuestR0NT4_EXTENDS = RuntimeGuestR0
2353RuntimeGuestR0NT4_EXTENDS_BY = appending
2354RuntimeGuestR0NT4_DEFS = IPRT_TARGET_NT4
2355
2356
2357ifdef VBOX_WITH_RAW_MODE
2358 #
2359 # RuntimeRC - Raw-mode context library.
2360 #
2361 RuntimeRC_TEMPLATE = VBoxRc
2362 RuntimeRC_DEFS = IN_RT_RC RT_WITH_VBOX IN_SUP_RC IN_VMM_RC
2363 RuntimeRC_INCS = include
2364 RuntimeRC_SOURCES := \
2365 common/asm/ASMGetXcr0.asm \
2366 common/asm/ASMSetXcr0.asm \
2367 common/asm/ASMXSave.asm \
2368 common/asm/ASMXRstor.asm \
2369 common/checksum/alt-md5.cpp \
2370 common/checksum/crc32.cpp \
2371 common/checksum/crc64.cpp \
2372 common/log/log.cpp \
2373 common/log/logellipsis.cpp \
2374 common/log/logrel.cpp \
2375 common/log/logrelellipsis.cpp \
2376 common/log/logcom.cpp \
2377 common/log/logformat.cpp \
2378 common/log/tracebuf.cpp \
2379 common/log/tracedefault.cpp \
2380 common/misc/RTAssertMsg1Weak.cpp \
2381 common/misc/RTAssertMsg2.cpp \
2382 common/misc/RTAssertMsg2Add.cpp \
2383 common/misc/RTAssertMsg2AddWeak.cpp \
2384 common/misc/RTAssertMsg2AddWeakV.cpp \
2385 common/misc/RTAssertMsg2Weak.cpp \
2386 common/misc/RTAssertMsg2WeakV.cpp \
2387 common/misc/assert.cpp \
2388 common/misc/buildconfig.cpp \
2389 common/misc/sanity-c.c \
2390 common/misc/sanity-cpp.cpp \
2391 common/path/RTPathFilename.cpp \
2392 common/string/strformat.cpp \
2393 common/string/strformatnum.cpp \
2394 common/string/strformatrt.cpp \
2395 common/string/strformattype.cpp \
2396 common/string/strncmp.cpp \
2397 common/string/strpbrk.cpp \
2398 common/string/strprintf.cpp \
2399 common/string/RTStrCopy.cpp \
2400 common/string/RTStrCopyEx.cpp \
2401 common/table/avllu32.cpp \
2402 common/table/avlou32.cpp \
2403 common/table/avlogcphys.cpp \
2404 common/table/avlogcptr.cpp \
2405 common/table/avlohcphys.cpp \
2406 common/table/avloioport.cpp \
2407 common/table/avlrogcphys.cpp \
2408 common/table/avlrogcptr.cpp \
2409 common/table/avlroioport.cpp \
2410 common/table/avlroogcptr.cpp \
2411 common/table/avlu32.cpp \
2412 common/time/timeprog.cpp \
2413 common/time/timesup.cpp \
2414 gc/initterm-gc.cpp \
2415 generic/RTAssertShouldPanic-generic.cpp \
2416 generic/errvars-generic.cpp \
2417 \
2418 $(RuntimeNoCrt_SOURCES)
2419
2420 #if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
2421 # RuntimeRC_SOURCES += common/time/timesupA.asm
2422 #else
2423 RuntimeRC_SOURCES += common/time/timesupref.cpp
2424 #endif
2425
2426 RuntimeRC_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
2427
2428 ifeq ($(VBOX_LDR_FMT32),lx)
2429 RuntimeRC_SOURCES += os2/sys0.asm
2430 endif
2431
2432 if1of ($(KBUILD_TARGET), darwin solaris freebsd)
2433 RuntimeRC_SOURCES += \
2434 common/math/gcc/adddi3.c \
2435 common/math/gcc/anddi3.c \
2436 common/math/gcc/ashldi3.c \
2437 common/math/gcc/ashrdi3.c \
2438 common/math/gcc/cmpdi2.c \
2439 common/math/gcc/divdi3.c \
2440 common/math/gcc/iordi3.c \
2441 common/math/gcc/lshldi3.c \
2442 common/math/gcc/lshrdi3.c \
2443 common/math/gcc/moddi3.c \
2444 common/math/gcc/muldi3.c \
2445 common/math/gcc/negdi2.c \
2446 common/math/gcc/notdi2.c \
2447 common/math/gcc/qdivrem.c \
2448 common/math/gcc/subdi3.c \
2449 common/math/gcc/ucmpdi2.c \
2450 common/math/gcc/udivdi3.c \
2451 common/math/gcc/umoddi3.c \
2452 common/math/gcc/xordi3.c
2453 endif
2454
2455
2456 #
2457 # RuntimeRCStub - Raw-mode context startup stub for Windows.
2458 #
2459 RuntimeRCStub_TEMPLATE = VBoxRc
2460 RuntimeRCStub_SOURCES.win = \
2461 nt/NtProcessStartup-stub.cpp
2462
2463
2464endif # VBOX_WITH_RAW_MODE
2465
2466
2467#
2468# Static library for new & delete for the electric fence.
2469#
2470RuntimeEFCPP_TEMPLATE := $(VBoxRT_TEMPLATE)
2471RuntimeEFCPP_SDKS := $(RuntimeR3_SDKS)
2472RuntimeEFCPP_SDKS.$(KBUILD_TARGET) := $(RuntimeR3_SDKS.$(KBUILD_TARGET))
2473RuntimeEFCPP_DEFS := $(RuntimeR3_DEFS)
2474RuntimeEFCPP_DEFS.$(KBUILD_TARGET) := $(RuntimeR3_DEFS.$(KBUILD_TARGET))
2475RuntimeEFCPP_INCS := $(RuntimeR3_INCS)
2476RuntimeEFCPP_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
2477RuntimeEFCPP_SOURCES := r3/alloc-ef-cpp.cpp
2478
2479
2480
2481#
2482# The NTDLL mini import library.
2483#
2484# Note! The reason for doing this is to avoid importing CRT symbols from the
2485# NTDLL. We do not wish to do this because:
2486# - Our compiler is usually a different one and we should use the
2487# matching CRT,
2488# - Older versions of NTDLL may not sport all the exports our w2k3 or
2489# later WINDDK ntdll.lib have and thus we may easily end up with
2490# images that does not load on older windows versions.
2491#
2492if1of (win,$(KBUILD_TARGET) $(KBUILD_HOST))
2493RuntimeR3NtDll-amd64_TEMPLATE = VBoxR3Dll
2494RuntimeR3NtDll-amd64_BLD_TRG_ARCH = amd64
2495RuntimeR3NtDll-amd64_ARFLAGS = /NODEFAULTLIB /MACHINE:amd64
2496RuntimeR3NtDll-amd64_SOURCES = \
2497 r3/win/ntdll-mini-implib.def
2498
2499RuntimeR3NtDll-x86_TEMPLATE = VBoxR3Dll
2500RuntimeR3NtDll-x86_BLD_TRG_ARCH = x86
2501RuntimeR3NtDll-x86_ARFLAGS = /NODEFAULTLIB /MACHINE:x86
2502RuntimeR3NtDll-x86_SOURCES = \
2503 r3/win/ntdll-mini-implib.def \
2504 $(RuntimeR3NtDll-x86_0_OUTDIR)/ntdll-mini-implib.asm
2505RuntimeR3NtDll-x86_CLEAN = \
2506 $(RuntimeR3NtDll-x86_0_OUTDIR)/ntdll-mini-implib.asm
2507
2508$$(RuntimeR3NtDll-x86_0_OUTDIR)/ntdll-mini-implib.asm: $(PATH_SUB_CURRENT)/r3/win/ntdll-mini-implib.def | $$(dir $$@)
2509 $(call MSG_GENERATE,,$@,$<)
2510 $(QUIET)$(APPEND) -nt "$@" \
2511 ';Autogenerated, do not edit' \
2512 '%include "iprt/asmdefs.mac"' \
2513 'BEGINCODE' \
2514 '%macro IMPLIB_EXPORT 1' \
2515 'global %1:function' \
2516 '%1: nop' \
2517 '%endm' \
2518 ''
2519 $(QUIET)$(SED) -e '1,/EXPORTS/d' \
2520 -e 's/^.*;;=[[:space:]]*\([^[:space:]]*\)[[:space:]]*$$/IMPLIB_EXPORT \1/' \
2521 $< --append $@
2522endif
2523
2524#
2525# Bag of tricks required for making VCC100 output binaries work on NT4, W2K
2526# early XP and early W2K3.
2527#
2528RuntimeR3VccTricks_TEMPLATE = VBoxR3Dll
2529RuntimeR3VccTricks_SOURCES = \
2530 r3/win/vcc100-kernel32-fakes.cpp \
2531 r3/win/vcc100-kernel32-fakesA.asm
2532
2533if defined(VBOX_WITH_MORE_NT4_COMPAT_BINARIES) && "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.x86" # Ugly hacks... :-)
2534LIBRARIES += RuntimeR3VccTricks2
2535RuntimeR3VccTricks2_TEMPLATE = VBoxR3Dll
2536RuntimeR3VccTricks2_SOURCES = $(RuntimeR3VccTricks_SOURCES)
2537RuntimeR3VccTricks2_SOURCES += $(RuntimeR3VccTricks2_0_OUTDIR)/dynobjs.lib
2538RuntimeR3VccTricks2_CLEAN = $(RuntimeR3VccTricks2_0_OUTDIR)/dynobjs.lib
2539RuntimeR3VccTricks2_VBOX_LIBCMT_NEEDED =
2540
2541$$(RuntimeR3VccTricks2_0_OUTDIR)/dynobjs.lib: \
2542 $$(PATH_TOOL_$$(TEMPLATE_VBoxR3Dll_TOOL.win.x86)_LIB)/msvcrt$(VBOX_VCC_CRT_TYPE).lib \
2543 $$(PATH_TOOL_$$(TEMPLATE_VBoxR3Dll_TOOL.win.x86)_LIB)/libcmt$(VBOX_VCC_CRT_TYPE).lib \
2544 $$(LIB_RUNTIME) \
2545 $(MAKEFILE) | $$(dir $$@)
2546 $(RM) -f -- "$@"
2547# $(REDIRECT) -C $(dir $@) -- $(KBUILD_DEVTOOLS)/common/openwatcom/v1.9-r2/binnt/wlib \
2548# $(PATH_TOOL_$(TEMPLATE_VBoxR3Dll_TOOL.win.x86)_LIB)/libcmt$(VBOX_VCC_CRT_TYPE).lib \
2549# $(foreach file, $(RuntimeR3VccTricks2_VBOX_LIBCMT_NEEDED), *$(file))
2550 $(KBUILD_DEVTOOLS)/common/openwatcom/v1.9-r2/binnt/wlib [email protected] $< \
2551 -MSVCR100.dll \
2552 $(addprefix $(RuntimeR3VccTricks2_0_OUTDIR)/, $(RuntimeR3VccTricks2_VBOX_LIBCMT_NEEDED)) \
2553 -chandler4gs.obj
2554 $(KBUILD_DEVTOOLS)/common/openwatcom/v1.9-r2/binnt/wlib -o=$@ \
2555 $(LIB_RUNTIME) \
2556 [email protected]
2557 $(RM) -f -- [email protected] $(addprefix $(RuntimeR3VccTricks2_0_OUTDIR)/, $(RuntimeR3VccTricks_VBOX_LIBCMT_NEEDED))
2558endif
2559
2560
2561#
2562# errmsg.cpp depends on a generated header.
2563#
2564common/err/errmsg.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgdata.h
2565common/err/errmsg.cpp_INCS = $(IPRT_OUT_DIR)
2566
2567win/errmsgwin.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgcomdata.h
2568win/errmsgwin.cpp_INCS = $(IPRT_OUT_DIR)
2569
2570# Our COM errors only for R3 libraries on the host
2571define def_errmsgwin_deps
2572 $(lib)_win/errmsgwin.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
2573 $(lib)_common/err/errmsgxpcom.cpp_INCS = $(IPRT_OUT_DIR)
2574 $(lib)_common/err/errmsgxpcom.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
2575endef
2576$(foreach lib,RuntimeR3 RuntimeBldProg VBoxRT VBoxRT-x86,$(eval $(def_errmsgwin_deps)))
2577
2578
2579#
2580# Generate the status code data.
2581#
2582$(IPRT_OUT_DIR)/errmsgdata.h: \
2583 $(VBOX_PATH_RUNTIME_SRC)/common/err/errmsg.sed \
2584 $(PATH_ROOT)/include/iprt/err.h \
2585 $(PATH_ROOT)/include/VBox/err.h \
2586 | $$(dir $$@)
2587 $(call MSG_GENERATE,,$@,$(filter %.h,$^))
2588 $(QUIET)$(REDIRECT) -wo $@ -- $(SED) -f $< $(filter %.h,$^)
2589
2590## @todo r=bird: rename this to indicate that it's not only COM errors, but all win32/64 errors.
2591$(IPRT_OUT_DIR)/errmsgcomdata.h: \
2592 $(VBOX_PATH_RUNTIME_SRC)/common/err/errmsgcom.sed \
2593 $$(PATH_SDK_$(VBOX_WINPSDK)_INC)/WinError.h \
2594 | $$(dir $$@)
2595 $(call MSG_GENERATE,,$@,$(filter %.h,$^))
2596 $(QUIET)$(REDIRECT) -wo $@ -- $(SED) -f $< $(filter %.h,$^)
2597
2598$(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts +| $(IPRT_OUT_DIR)/errmsgvboxcomdata.h: \
2599 $(VBOX_PATH_RUNTIME_SRC)/VBox/errmsgvboxcom.xsl \
2600 $(VBOX_XIDL_FILE_SRC) \
2601 | $$(dir $$@)
2602 $(call MSG_GENERATE,,$@,$(filter %.xidl,$^))
2603 $(QUIET)$(VBOX_XSLTPROC) -o $(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts $< $(filter %.xidl,$^)
2604 $(QUIET)$(CP) --changed -fv $(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
2605
2606
2607if "$(KBUILD_TARGET)" == "freebsd"
2608#
2609# FreeBSDGeneratedKernelHeaders - Generate some kernel interface headers.
2610#
2611# These are used by:
2612# - The RTMp* API in IPRT.
2613# - VBoxGuest
2614#
2615# Note! We cannot give a output path to the awk program, it will always
2616# generate the header next to the source. So, we'll have to temporarily copy
2617# the source file to the destination directory to work.
2618#
2619VBOX_AWK := /usr/bin/awk
2620INSTALLS += FreeBSDGeneratedKernelHeaders
2621FreeBSDGeneratedKernelHeaders_INST = gen-sys-hdrs/
2622FreeBSDGeneratedKernelHeaders_SOURCES = \
2623 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/bus_if.h \
2624 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/device_if.h \
2625 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/pci_if.h
2626FreeBSDGeneratedKernelHeaders_CLEAN = $(FreeBSDGeneratedKernelHeaders_SOURCES)
2627
2628$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/bus_if.h: $(VBOX_FREEBSD_SRC)/kern/bus_if.m | $$(dir $$@)
2629 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
2630 $(QUIET)$(CP) -f $< $(@D)/bus_if.m
2631 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/bus_if.m -h -p
2632 $(QUIET)$(RM) $(@D)/bus_if.m
2633
2634$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/device_if.h: $(VBOX_FREEBSD_SRC)/kern/device_if.m | $$(dir $$@)
2635 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
2636 $(QUIET)$(CP) -f $< $(@D)/device_if.m
2637 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/device_if.m -h -p
2638 $(QUIET)$(RM) $(@D)/device_if.m
2639
2640$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/pci_if.h: $(VBOX_FREEBSD_SRC)/dev/pci/pci_if.m | $$(dir $$@)
2641 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
2642 $(QUIET)$(CP) -f $< $(@D)/pci_if.m
2643 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/pci_if.m -h -p
2644 $(QUIET)$(RM) $(@D)/pci_if.m
2645endif # FreeBSD
2646
2647
2648#
2649# Aliases for .cpp.h files so we can more easily do syntax checking from the editor.
2650#
2651ldrELFRelocatable.cpp.o: ldrELF.o
2652ldrELFRelocatable.cpp.obj: ldrELF.obj
2653
2654
2655#
2656# Doxygen documentation.
2657#
2658IPRT_DOXYFILE_INPUT_DIRS = \
2659 $(PATH_ROOT)/include/iprt \
2660 $(PATH_ROOT)/include/iprt/cpp \
2661 $(PATH_ROOT)/include/iprt/linux \
2662 $(PATH_ROOT)/include/iprt/nocrt \
2663 $(PATH_ROOT)/include/iprt/nocrt/x86 \
2664 $(PATH_ROOT)/include/iprt/nocrt/amd64 \
2665 $(PATH_ROOT)/include/iprt/nocrt/compiler \
2666 $(VBOX_PATH_RUNTIME_SRC)/include/internal \
2667 $(VBOX_PATH_RUNTIME_SRC)/common/alloc \
2668 $(VBOX_PATH_RUNTIME_SRC)/common/asm \
2669 $(VBOX_PATH_RUNTIME_SRC)/common/checksum \
2670 $(VBOX_PATH_RUNTIME_SRC)/common/dbg \
2671 $(VBOX_PATH_RUNTIME_SRC)/common/err \
2672 $(VBOX_PATH_RUNTIME_SRC)/common/ldr \
2673 $(VBOX_PATH_RUNTIME_SRC)/common/log \
2674 $(VBOX_PATH_RUNTIME_SRC)/common/math \
2675 $(VBOX_PATH_RUNTIME_SRC)/common/math/amd64 \
2676 $(VBOX_PATH_RUNTIME_SRC)/common/math/gcc \
2677 $(VBOX_PATH_RUNTIME_SRC)/common/math/x86 \
2678 $(VBOX_PATH_RUNTIME_SRC)/common/misc \
2679 $(VBOX_PATH_RUNTIME_SRC)/common/path \
2680 $(VBOX_PATH_RUNTIME_SRC)/common/rand \
2681 $(VBOX_PATH_RUNTIME_SRC)/common/string \
2682 $(VBOX_PATH_RUNTIME_SRC)/common/table \
2683 $(VBOX_PATH_RUNTIME_SRC)/common/time \
2684 $(VBOX_PATH_RUNTIME_SRC)/VBox \
2685 $(foreach dir, $(VBOX_PATH_RUNTIME_SRC) $(VBOX_PATH_RUNTIME_SRC)/r3 $(VBOX_PATH_RUNTIME_SRC)/r0drv,\
2686 $(dir) \
2687 $(dir)/darwin \
2688 $(dir)/haiku \
2689 $(dir)/linux \
2690 $(dir)/nt \
2691 $(dir)/os2 \
2692 $(dir)/solaris \
2693 $(dir)/win \
2694 $(dir)/win32 \
2695 $(dir)/win64 \
2696 $(dir)/generic \
2697 )
2698
2699# These must come first in order to make things look nice.
2700IPRT_DOXYFILE_INPUT_FIRST =\
2701 $(PATH_ROOT)/include/iprt/cdefs.h \
2702 $(PATH_ROOT)/include/iprt/types.h \
2703 $(PATH_ROOT)/include/iprt/runtime.h \
2704 $(PATH_ROOT)/include/iprt/param.h \
2705 $(PATH_ROOT)/include/iprt/assert.h \
2706 $(PATH_ROOT)/include/iprt/asm.h \
2707
2708IPRT_DOXYFILE_INPUT := \
2709 $(filter-out %.cpp.h, $(sort $(wildcard $(addsuffix /*.h, $(IPRT_DOXYFILE_INPUT_DIRS)))) ) \
2710 $(foreach dir, $(IPRT_DOXYFILE_INPUT_DIRS), $(wildcard $(dir)/*.cpp $(dir)/.c $(dir)/.asm))
2711IPRT_DOXYFILE_INPUT := \
2712 $(IPRT_DOXYFILE_INPUT_FIRST) \
2713 $(filter-out $(IPRT_DOXYFILE_INPUT_FIRST), $(IPRT_DOXYFILE_INPUT))
2714
2715
2716IPRT_DOXYFILE_OUTPUT = $(PATH_OUT)/docs/iprt
2717BLDDIRS += $(IPRT_DOXYFILE_OUTPUT)
2718
2719includedep $(IPRT_OUT_DIR)/Doxyfile.iprt.dep
2720
2721# Generate the Doxyfile
2722$(IPRT_OUT_DIR)/Doxyfile.iprt: \
2723 $(VBOX_PATH_RUNTIME_SRC)/Doxyfile \
2724 $(VBOX_PATH_RUNTIME_SRC)/Makefile.kmk \
2725 $(comp-vars IPRT_DOXYFILE_INPUT,DOXYGEN_INPUT_PREV,FORCE) \
2726 $(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE) \
2727 | $$(dir $$@)
2728 $(QUIET)$(RM) -f $@ [email protected] [email protected]
2729 $(QUIET)$(CP) -f $(VBOX_PATH_RUNTIME_SRC)/Doxyfile [email protected]
2730 $(QUIET)$(APPEND) [email protected]
2731 $(QUIET)$(APPEND) [email protected] "OUTPUT_DIRECTORY = $(IPRT_DOXYFILE_OUTPUT)"
2732 $(QUIET)$(APPEND) [email protected] "WARN_LOGFILE = $(IPRT_DOXYFILE_OUTPUT)/errors"
2733 $(QUIET)$(APPEND) [email protected] 'INCLUDE_PATH = ' \
2734 '$(PATH_ROOT)/include' \
2735 '$(VBOX_PATH_RUNTIME_SRC)/include' \
2736 '$(VBOX_PATH_RUNTIME_SRC)/' \
2737 '$(VBOX_PATH_RUNTIME_SRC)/common/table'
2738 $(QUIET)$(APPEND) [email protected] "INCLUDE_FILE_PATTERNS = *.cpp.h"
2739 $(QUIET)$(APPEND) [email protected] "PREDEFINED += $(ARCH_BITS_DEFS)"
2740 $(QUIET)$(APPEND) [email protected] 'EXCLUDE = '\
2741 '$(VBOX_PATH_RUNTIME_SRC)/common/string/unidata-flags.cpp' \
2742 '$(VBOX_PATH_RUNTIME_SRC)/common/string/unidata-lower.cpp' \
2743 '$(VBOX_PATH_RUNTIME_SRC)/common/string/unidata-upper.cpp' \
2744 '$(VBOX_PATH_RUNTIME_SRC)/common/ldr/ldrkStuff.cpp'
2745 $(QUIET)$(APPEND) [email protected]
2746 $(QUIET)$(APPEND) [email protected] 'INPUT = $(foreach x,$(IPRT_DOXYFILE_INPUT),\$(NLTAB)$(x))'
2747 $(QUIET)$(APPEND) [email protected]
2748 $(QUIET)$(MV) -f [email protected] $@
2749 $(QUIET)$(APPEND) [email protected] "DOXYGEN_OUTPUT_PREV = $(IPRT_DOXYFILE_OUTPUT)"
2750 $(QUIET)$(APPEND) [email protected] "DOXYGEN_INPUT_PREV = $(IPRT_DOXYFILE_INPUT)"
2751
2752# Do the actual job.
2753$(IPRT_OUT_DIR)/docs.iprt: $(IPRT_OUT_DIR)/Doxyfile.iprt $$(IPRT_DOXYFILE_INPUT) | $(IPRT_DOXYFILE_OUTPUT)/
2754 $(QUIET)$(RM) -f $(wildcard $(IPRT_DOXYFILE_OUTPUT)/html/*) $(IPRT_OUT_DIR)/docs.iprt
2755 doxygen $(DOXYGEN_OPTS) $(IPRT_OUT_DIR)/Doxyfile.iprt
2756 $(SED) -e '/warning. Unexpected .dd. found/d' \
2757 -e '/warning. Unsupported xml.html tag .globalScope. found/d' \
2758 --output $(IPRT_DOXYFILE_OUTPUT)/errors2 \
2759 $(IPRT_DOXYFILE_OUTPUT)/errors
2760# $(MV) -f $(IPRT_DOXYFILE_OUTPUT)/errors2 $(IPRT_DOXYFILE_OUTPUT)/errors
2761 $(CAT) $(IPRT_DOXYFILE_OUTPUT)/errors2
2762 $(SED) -e "/[^ ]/q 1" $(IPRT_DOXYFILE_OUTPUT)/errors2
2763 $(APPEND) $(IPRT_OUT_DIR)/docs.iprt
2764
2765# aliases
2766docs.iprt: $(IPRT_OUT_DIR)/docs.iprt
2767if !defined(VBOX_ONLY_DOCS) && defined(VBOX_WITH_ALL_DOXYGEN_TARGETS)
2768docs: $(IPRT_OUT_DIR)/docs.iprt
2769endif
2770
2771test-doxygen::
2772 @echo test-$(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE)
2773 @echo $(IPRT_DOXYFILE_OUTPUT)
2774 @echo $(DOXYGEN_OUTPUT_PREV)
2775 @echo $(IPRT_DOXYFILE_INPUT)
2776
2777
2778#
2779# Test mangling.
2780#
2781if1of ($(LIBRARIES),RuntimeR3 RuntimeR0 RuntimeR0Drv RuntimeRC)
2782 test-mangling:: $(IPRT_OUT_DIR)/mangling.run
2783 OTHERS += $(IPRT_OUT_DIR)/mangling.run
2784 CLEANS += $(IPRT_OUT_DIR)/mangling.run
2785 $(IPRT_OUT_DIR)/mangling.run: \
2786 $$(RuntimeR3_1_TARGET) \
2787 $$(RuntimeR0_1_TARGET) \
2788 $$(RuntimeR0Drv_1_TARGET) \
2789 $$(RuntimeRC_1_TARGET)
2790 if1of ($(KBUILD_TARGET), win os2)
2791 $(call MSG_L1,IPRT: skipped mangling test.)
2792 else
2793# Generate a SED script from mangling.h that checks for known symbols.
2794 $(QUIET)$(SED) \
2795 -e '/# *define.*RT_MANGLER/!d' \
2796 -e 's/^.*RT_MANGLER(\([^)][^)]*\)).*$(DOLLAR)/\/^\1$(DOLLAR)\/b ok/' \
2797 $(PATH_ROOT)/include/iprt/mangling.h \
2798 --output "$@"
2799 $(QUIET)$(APPEND) -n '$@' \
2800 ':bad' \
2801 's/^\(.*\)$(DOLLAR)/error: Missing # define \1 /' \
2802 ':bad-pad' \
2803 '/^.\{0,70\}$(DOLLAR)/ { s/$(DOLLAR)/ /; bbad-pad; }' \
2804 's/define \([^ ]*\) \([ ]*\)$(DOLLAR)/define \1 \2RT_MANGLER(\1)/' \
2805 'p' \
2806 $(if-expr !defined(IPRT_IGNORE_TEST_MANGLING),'q 1') \
2807 '' \
2808 ':ok' \
2809 'd'
2810# Find the best way to generate a symbol list and subject it to mangling.h.
2811 if $(intersects $(KBUILD_TARGET), linux) && "$(VBOX_GCC_fvisibility-hidden)"
2812 $(call MSG_L1,IPRT: Testing mangling and visiblity for newer gcc...)
2813 $(QUIET)readelf -Ws $^ \
2814 | $(SED) \
2815 -e 's/[[:space:]]\+/ /g' \
2816 -e '/^ *[[:digit:]]\+:/!d' \
2817 -e 's/^ \+[[:digit:]]\+: \+[[:xdigit:]]\+ \+[[:digit:]]\+ \+//' \
2818 -e '/^SECTION/d' \
2819 -e '/^FILE/d' \
2820 -e 's/^[[:alpha:]]\+ \+//' \
2821 -e '/LOCAL/d' \
2822 -e 's/^[[:alpha:]]\+ \+//' \
2823 -e '/^HIDDEN [[:xdigit:]]\+ RT/bkeep-hidden' \
2824 -e '/^HIDDEN [[:xdigit:]]\+ g_[a-z0-9]*RT/bkeep-hidden' \
2825 -e '/^HIDDEN/d' \
2826 -e ':keep-hidden' \
2827 -e 's/^[[:alpha:]]\+ \+//' \
2828 -e '/^UND/d' \
2829 -e 's/^[[:digit:]]\+ \+//' \
2830 \
2831 -e '/^nocrt_/d' \
2832 -e '/^memchr/d' \
2833 -e '/^memcmp/d' \
2834 -e '/^memcpy/d' \
2835 -e '/^mempcpy/d' \
2836 -e '/^memmove/d' \
2837 -e '/^memset/d' \
2838 -e '/^strchr/d' \
2839 -e '/^strpbrk/d' \
2840 -e '/^_Z7strpbrk/d' \
2841 -e '/^strcmp/d' \
2842 -e '/^strcpy/d' \
2843 -e '/^strncpy/d' \
2844 -e '/^strlen/d' \
2845 -e '/^_Z[[:alpha:]]*[[:digit:]]\+RTC/d' \
2846 -e '/^_Z[[:alpha:]]*[[:digit:]]\+RTC/d' \
2847 \
2848 -e '/^_ZnwjPv/d' \
2849 -e '/^_ZnwmPv/d' \
2850 -e '/^_ZNSt9bad_allocC1Ev/d' \
2851 -e '/^_ZNSt9exceptionC2Ev/d' \
2852 -e '/^_ZNSt9exceptionC[12]ERKS_/d' \
2853 \
2854 -e '/^_ZN[a-zA-Z]*St[[:digit:]]*_*[lL]ist/d' \
2855 -e '/^_ZN[a-zA-Z]*[[:digit:]]*__gnu_cxx/d' \
2856 -e '/^_ZNSa.*ElementNode.*/d' \
2857 -e '/^_ZSt.*ElementNode.*/d' \
2858 \
2859 -e '/^_Z[[:digit:]]\+dbus/d' \
2860 -e '/^_Z13RTDBusLoadLibv/d' \
2861 \
2862 -e '/^VBoxHost_/d'\
2863 -e '/^VBoxGuest_/d'\
2864 | $(SED) -nf "$@"
2865 endif
2866 $(call MSG_L1,IPRT: Testing mangling using nm...)
2867 $(QUIET)$(VBOX_NM) $^ 2> /dev/null \
2868 | $(SED) -n \
2869 -e 's/^[0-9a-f][0-9a-f]* //' \
2870 -e '/^[TUDB] /!d' \
2871 -e 's/^. //' \
2872 $(if-expr "$(KBUILD_TARGET)" == "darwin" || "$(KBUILD_TARGET)" == "os2" || "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.x86", \
2873 -e 's/^_//',) \
2874 \
2875 -e '/^g_cchrt/d'\
2876 -e '/^g_frt/d'\
2877 -e '/^g_offrt/d'\
2878 -e '/^g_pfnrt/d'\
2879 -e '/^g_rt/d'\
2880 -e '/^g_szrt/d'\
2881 -e '/^g_ProcessSelf/d'\
2882 -e '/^g_u64ProgramStart/d'\
2883 -e '/^g_enmProcessPriority/d'\
2884 -e '/^g_hDbgModStrCache/d'\
2885 -e '/^g_pfnR0Darwin/d'\
2886 -e '/^g_pDarwinLockGroup/d'\
2887 $(if-expr "$(KBUILD_TARGET)" == "solaris", \
2888 -e '/^g_kLdrRdrFileOps/d' \
2889 -e '/^g_pSUPGlobalInfoPage/d' \
2890 -e '/^g_Logger/d' \
2891 -e '/^g_RelLogger/d' \
2892 -e '/^g_VM/d',) \
2893 \
2894 -e '/^RTDBusLoadLib/d' \
2895 \
2896 -e '/^RT/p' \
2897 -e '/^g_/p' \
2898 | $(SED) -nf "$@"
2899 endif
2900endif
2901 $(QUIET)$(APPEND) -t $@
2902
2903if !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_VALIDATIONKIT) && !defined(VBOX_ONLY_DOCS)
2904#
2905# Windows build tool.
2906#
2907BLDPROGS.win += ntBldSymDb
2908ntBldSymDb_TEMPLATE = VBoxAdvBldProg
2909ntBldSymDb_INCS = .
2910ntBldSymDb_SOURCES = r0drv/nt/ntBldSymDb.cpp
2911endif
2912
2913#
2914# Generate the rules (we're the to sub-makefile).
2915#
2916include $(FILE_KBUILD_SUB_FOOTER)
2917
2918
2919#
2920# Aliases for code templates.
2921#
2922rsa-template.o rsa-template.obj: rsa-core.o rsa-asn1-decoder.o rsa-sanity.o rsa-init.o
2923spc-template.o spc-template.obj: spc-core.o spc-asn1-decoder.o spc-sanity.o spc-init.o
2924taf-template.o taf-template.obj: taf-core.o taf-asn1-decoder.o taf-sanity.o taf-init.o
2925tsp-template.o tsp-template.obj: tsp-core.o tsp-asn1-decoder.o tsp-sanity.o tsp-init.o
2926x509-template.o x509-template.obj: x509-core.o x509-asn1-decoder.o x509-sanity.o x509-init.o
2927pkcs7-template.o pkcs7-template.obj: pkcs7-core.o pkcs7-asn1-decoder.o pkcs7-sanity.o pkcs7-init.o
2928
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