VirtualBox

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

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

IPRT: Added RTStrStartsWith and RTStrIStartsWith.

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