VirtualBox

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

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

IPRT: Added 'off' parameter to RTVfsIoStrmSgWrite and RTVfsIoStrmSgRead so it's easier to write passthru layers. Added RTVfsIoStrmReadAll, RTVfsIoStrmReadAllFree, RTVfsIoStrmFromBuffer, RTManifestPtIosIsInstanceOf, RTCrX509Certificate_ReadFromBuffer and RTCrDigestUpdateFromVfsFile. Updated the manifest passthru read code to handle ReadAt requests which skips parts and jumps back to re-read stuff on streams/files which are seekable.

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