VirtualBox

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

Last change on this file since 46144 was 46144, checked in by vboxsync, 12 years ago

Runtime: RTMpGetCoreCount() for Linux

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

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette