VirtualBox

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

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

asn1-dump: Made it a lot less painful to add new OID to the asn.1 dumper. This generalize the string table code used for the USB database in main.

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