VirtualBox

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

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

Runtime: actually use rtMpDarwinOnlinePhysicalCpus() when determining the number of online physical cores on Darwin

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