VirtualBox

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

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

IPRT,VMMR0: Added trace points to both the IPRT critical section types.

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