VirtualBox

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

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

Runtime: Add RTJson* API to parse the JavaScript Object Notation (JSON) Data Interchange Format (RFC7159). Work in progress, will be used later to load user defined structure descriptions in the VBox debugger for the dti and dtv commands

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