VirtualBox

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

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

sup,iprt: SUPIsHostVirtualized belongs in IPRT and does not need to be inlined. Created RTSystemIsInserideVM() with simple amd64+x86 implementation.

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