VirtualBox

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

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

build fix

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