VirtualBox

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

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

http-curl.cpp: Implemented system proxy config for OS X and fixed casing bug in the windows implemention. Also, added default User-Agent string as one of the test sites I was using gave me a 403 response without it.

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