VirtualBox

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

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

Added RTLdrOpenInMemory.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 76.8 KB
Line 
1# $Id: Makefile.kmk 46080 2013-05-14 20:09:08Z 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/RTMpGetCurFrequency-generic.cpp \
554 generic/RTMpGetMaxFrequency-generic.cpp \
555 generic/RTRandAdvCreateSystemFaster-generic.cpp \
556 generic/RTRandAdvCreateSystemTruer-generic.cpp \
557 generic/RTSemEventWait-generic.cpp \
558 generic/RTSemEventMultiWait-2-ex-generic.cpp \
559 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
560 generic/RTSemMutexRequest-generic.cpp \
561 generic/RTSemMutexRequestDebug-generic.cpp \
562 generic/RTThreadSetAffinityToCpu-generic.cpp \
563 generic/mppresent-generic.cpp \
564 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
565 generic/uuid-generic.cpp \
566 generic/RTProcDaemonize-generic.cpp \
567 generic/RTProcIsRunningByName-generic.cpp \
568 generic/RTThreadGetNativeState-generic.cpp \
569 nt/RTErrConvertFromNtStatus.cpp \
570 r3/posix/env-posix.cpp \
571 r3/win/RTHandleGetStandard-win.cpp \
572 r3/win/RTSystemQueryOSInfo-win.cpp \
573 r3/win/RTSystemShutdown-win.cpp \
574 r3/win/RTSystemQueryDmiString-win.cpp \
575 r3/win/RTSystemQueryTotalRam-win.cpp \
576 r3/win/alloc-win.cpp \
577 r3/win/dir-win.cpp \
578 r3/win/errvars-win.cpp \
579 r3/win/fileio-win.cpp \
580 r3/win/fs-win.cpp \
581 r3/win/ldrNative-win.cpp \
582 r3/win/localipc-win.cpp \
583 r3/win/mp-win.cpp \
584 r3/win/path-win.cpp \
585 r3/win/pipe-win.cpp \
586 r3/win/process-win.cpp \
587 r3/win/RTLogWriteDebugger-win.cpp \
588 r3/win/rtProcInitExePath-win.cpp \
589 r3/win/sched-win.cpp \
590 r3/win/semevent-win.cpp \
591 r3/win/semeventmulti-win.cpp \
592 r3/win/semmutex-win.cpp \
593 r3/win/symlink-win.cpp \
594 r3/win/rtFileNativeSetAttributes-win.cpp \
595 r3/win/thread-win.cpp \
596 r3/win/thread2-win.cpp \
597 r3/win/time-win.cpp \
598 r3/win/timer-win.cpp \
599 r3/win/tls-win.cpp \
600 r3/win/utf16locale-win.cpp \
601 r3/win/utf8-win.cpp \
602 r3/win/RTUuidCreate-win.cpp \
603 win/errmsgwin.cpp \
604 win/RTErrConvertFromWin32.cpp
605
606RuntimeR3_SOURCES.win.amd64 := $(RuntimeWin64ASM_SOURCES)
607RuntimeR3_SOURCES.win.x86 := $(RuntimeWin32ASM_SOURCES)
608
609RuntimeR3_SOURCES.linux = \
610 generic/cdrom-generic.cpp \
611 generic/RTDirQueryInfo-generic.cpp \
612 generic/RTDirSetTimes-generic.cpp \
613 generic/RTFileMove-generic.cpp \
614 generic/RTLogWriteDebugger-generic.cpp \
615 generic/RTProcDaemonize-generic.cpp \
616 generic/RTSemEventMultiWait-2-ex-generic.cpp \
617 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
618 generic/RTTimeLocalNow-generic.cpp \
619 generic/RTTimerCreate-generic.cpp \
620 generic/RTThreadSetAffinityToCpu-generic.cpp \
621 generic/RTUuidCreate-generic.cpp \
622 generic/mppresent-generic.cpp \
623 generic/utf16locale-generic.cpp \
624 generic/uuid-generic.cpp \
625 r3/linux/RTThreadGetNativeState-linux.cpp \
626 r3/linux/mp-linux.cpp \
627 r3/linux/rtProcInitExePath-linux.cpp \
628 r3/linux/sched-linux.cpp \
629 r3/linux/sysfs.cpp \
630 r3/linux/time-linux.cpp \
631 r3/linux/thread-affinity-linux.cpp \
632 r3/linux/RTProcIsRunningByName-linux.cpp \
633 r3/linux/RTSystemQueryDmiString-linux.cpp \
634 r3/linux/RTSystemShutdown-linux.cpp \
635 r3/posix/RTFileQueryFsSizes-posix.cpp \
636 r3/posix/RTHandleGetStandard-posix.cpp \
637 r3/posix/RTMemProtect-posix.cpp \
638 r3/posix/RTPathUserHome-posix.cpp \
639 r3/posix/RTSystemQueryOSInfo-posix.cpp \
640 r3/linux/systemmem-linux.cpp \
641 r3/posix/RTTimeNow-posix.cpp \
642 r3/posix/RTTimeSet-posix.cpp \
643 r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
644 r3/posix/dir-posix.cpp \
645 r3/posix/env-posix.cpp \
646 r3/posix/errvars-posix.cpp \
647 r3/posix/fileio-posix.cpp \
648 r3/posix/fileio2-posix.cpp \
649 r3/posix/filelock-posix.cpp \
650 r3/posix/fs-posix.cpp \
651 r3/posix/fs2-posix.cpp \
652 r3/posix/fs3-posix.cpp \
653 r3/posix/ldrNative-posix.cpp \
654 r3/posix/path-posix.cpp \
655 r3/posix/path2-posix.cpp \
656 r3/posix/pathhost-posix.cpp \
657 r3/posix/RTPathUserDocuments-posix.cpp \
658 r3/posix/pipe-posix.cpp \
659 r3/posix/process-posix.cpp \
660 r3/posix/process-creation-posix.cpp \
661 r3/posix/rand-posix.cpp \
662 r3/posix/semrw-posix.cpp \
663 r3/posix/symlink-posix.cpp \
664 r3/posix/thread-posix.cpp \
665 r3/posix/thread2-posix.cpp \
666 r3/posix/timelocal-posix.cpp \
667 r3/posix/timer-posix.cpp \
668 r3/posix/tls-posix.cpp \
669 r3/posix/utf8-posix.cpp
670ifdef IPRT_WITH_FUTEX_BASED_SEMS
671 RuntimeR3_SOURCES.linux += \
672 r3/linux/semevent-linux.cpp \
673 r3/linux/semeventmulti-linux.cpp \
674 r3/linux/semmutex-linux.cpp
675else
676 RuntimeR3_SOURCES.linux.x86 += \
677 r3/posix/semevent-posix.cpp \
678 r3/posix/semeventmulti-posix.cpp \
679 r3/posix/semmutex-posix.cpp
680 RuntimeR3_SOURCES.linux.amd64 += \
681 r3/linux/semevent-linux.cpp \
682 r3/linux/semeventmulti-linux.cpp
683 ifdef RT_NEW_LINUX_MUTEX_CODE
684 RuntimeR3_SOURCES.linux.amd64 += \
685 r3/linux/semmutex-linux.cpp
686 else
687 RuntimeR3_SOURCES.linux.amd64 += \
688 r3/posix/semmutex-posix.cpp
689 endif
690endif
691
692RuntimeR3_SOURCES.os2 = \
693 generic/cdrom-generic.cpp \
694 generic/RTDirQueryInfo-generic.cpp \
695 generic/RTDirSetTimes-generic.cpp \
696 generic/RTFileMove-generic.cpp \
697 generic/RTLogWriteDebugger-generic.cpp \
698 generic/RTProcDaemonize-generic.cpp \
699 generic/RTRandAdvCreateSystemFaster-generic.cpp \
700 generic/RTRandAdvCreateSystemTruer-generic.cpp \
701 generic/RTSystemQueryDmiString-generic.cpp \
702 generic/RTSystemShutdown-generic.cpp \
703 generic/RTTimeLocalNow-generic.cpp \
704 generic/RTTimerCreate-generic.cpp \
705 generic/RTThreadSetAffinityToCpu-generic.cpp \
706 generic/RTUuidCreate-generic.cpp \
707 generic/mppresent-generic.cpp \
708 generic/RTSemEventWait-generic.cpp \
709 generic/RTSemEventMultiWait-generic.cpp \
710 generic/RTSemMutexRequest-generic.cpp \
711 generic/RTSemMutexRequestDebug-generic.cpp \
712 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
713 generic/timer-generic.cpp \
714 generic/utf16locale-generic.cpp \
715 generic/uuid-generic.cpp \
716 generic/RTMpGetCurFrequency-generic.cpp \
717 generic/RTMpGetMaxFrequency-generic.cpp \
718 generic/RTProcIsRunningByName-generic.cpp \
719 generic/RTThreadGetNativeState-generic.cpp \
720 os2/RTErrConvertFromOS2.cpp \
721 r3/os2/filelock-os2.cpp \
722 r3/os2/mp-os2.cpp \
723 r3/os2/pipe-os2.cpp \
724 r3/os2/rtProcInitExePath-os2.cpp \
725 r3/os2/sched-os2.cpp \
726 r3/os2/sems-os2.cpp \
727 r3/os2/systemmem-os2.cpp \
728 r3/os2/thread-os2.cpp \
729 r3/os2/time-os2.cpp \
730 r3/posix/RTFileQueryFsSizes-posix.cpp \
731 r3/posix/RTHandleGetStandard-posix.cpp \
732 r3/posix/RTMemProtect-posix.cpp \
733 r3/posix/RTPathUserHome-posix.cpp \
734 r3/posix/RTSystemQueryOSInfo-posix.cpp \
735 r3/posix/RTTimeNow-posix.cpp \
736 r3/posix/RTTimeSet-posix.cpp \
737 r3/posix/dir-posix.cpp \
738 r3/posix/env-posix.cpp \
739 r3/posix/errvars-posix.cpp \
740 r3/posix/fileio-posix.cpp \
741 r3/posix/fileio2-posix.cpp \
742 r3/posix/fs-posix.cpp \
743 r3/posix/fs2-posix.cpp \
744 r3/posix/fs3-posix.cpp \
745 r3/posix/ldrNative-posix.cpp \
746 r3/posix/path-posix.cpp \
747 r3/posix/path2-posix.cpp \
748 r3/posix/pathhost-posix.cpp \
749 r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
750 r3/posix/RTPathUserDocuments-posix.cpp \
751 r3/posix/process-posix.cpp \
752 r3/posix/process-creation-posix.cpp \
753 r3/posix/symlink-posix.cpp \
754 r3/posix/timelocal-posix.cpp \
755 r3/posix/utf8-posix.cpp
756
757RuntimeR3_SOURCES.darwin = \
758 darwin/RTErrConvertFromDarwin.cpp \
759 darwin/RTErrConvertFromDarwinCOM.cpp \
760 darwin/RTErrConvertFromDarwinIO.cpp \
761 darwin/RTErrConvertFromDarwinKern.cpp \
762 generic/cdrom-generic.cpp \
763 generic/RTDirQueryInfo-generic.cpp \
764 generic/RTDirSetTimes-generic.cpp \
765 generic/RTFileMove-generic.cpp \
766 generic/RTLogWriteDebugger-generic.cpp \
767 generic/RTProcDaemonize-generic.cpp \
768 generic/RTThreadGetAffinity-stub-generic.cpp \
769 generic/RTThreadSetAffinity-stub-generic.cpp \
770 generic/RTThreadSetAffinityToCpu-generic.cpp \
771 generic/RTTimeLocalNow-generic.cpp \
772 generic/RTTimerCreate-generic.cpp \
773 generic/RTUuidCreate-generic.cpp \
774 generic/mppresent-generic.cpp \
775 generic/RTSemEventMultiWait-2-ex-generic.cpp \
776 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
777 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
778 generic/RTSystemShutdown-generic.cpp \
779 generic/timer-generic.cpp \
780 generic/utf16locale-generic.cpp \
781 generic/uuid-generic.cpp\
782 generic/RTProcIsRunningByName-generic.cpp \
783 generic/RTThreadGetNativeState-generic.cpp \
784 r3/darwin/filelock-darwin.cpp \
785 r3/darwin/mp-darwin.cpp \
786 r3/darwin/pathhost-darwin.cpp \
787 r3/darwin/rtProcInitExePath-darwin.cpp \
788 r3/darwin/RTSystemQueryDmiString-darwin.cpp \
789 r3/darwin/sched-darwin.cpp \
790 r3/darwin/systemmem-darwin.cpp \
791 r3/darwin/time-darwin.cpp \
792 r3/darwin/RTPathUserDocuments-darwin.cpp \
793 r3/posix/RTFileQueryFsSizes-posix.cpp \
794 r3/posix/RTHandleGetStandard-posix.cpp \
795 r3/posix/RTMemProtect-posix.cpp \
796 r3/posix/RTPathUserHome-posix.cpp \
797 r3/posix/RTSystemQueryOSInfo-posix.cpp \
798 r3/posix/RTTimeSet-posix.cpp \
799 r3/posix/dir-posix.cpp \
800 r3/posix/env-posix.cpp \
801 r3/posix/errvars-posix.cpp \
802 r3/posix/fileio-posix.cpp \
803 r3/posix/fileio2-posix.cpp \
804 r3/posix/fs-posix.cpp \
805 r3/posix/fs2-posix.cpp \
806 r3/posix/fs3-posix.cpp \
807 r3/posix/ldrNative-posix.cpp \
808 r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
809 r3/posix/path-posix.cpp \
810 r3/posix/path2-posix.cpp \
811 r3/posix/pipe-posix.cpp \
812 r3/posix/process-posix.cpp \
813 r3/posix/process-creation-posix.cpp \
814 r3/posix/rand-posix.cpp \
815 r3/posix/semevent-posix.cpp \
816 r3/posix/semeventmulti-posix.cpp \
817 r3/posix/semmutex-posix.cpp \
818 r3/posix/symlink-posix.cpp \
819 r3/posix/thread-posix.cpp \
820 r3/posix/thread2-posix.cpp \
821 r3/posix/timelocal-posix.cpp \
822 r3/posix/tls-posix.cpp \
823 r3/posix/utf8-posix.cpp
824
825## @todo Make BSD sched, implement RTMP*.
826RuntimeR3_SOURCES.freebsd = \
827 generic/cdrom-generic.cpp \
828 generic/RTDirQueryInfo-generic.cpp \
829 generic/RTDirSetTimes-generic.cpp \
830 generic/RTFileMove-generic.cpp \
831 generic/RTLogWriteDebugger-generic.cpp \
832 generic/RTSemEventMultiWait-2-ex-generic.cpp \
833 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
834 generic/RTSystemQueryDmiString-generic.cpp \
835 generic/RTSystemShutdown-generic.cpp \
836 generic/RTThreadGetAffinity-stub-generic.cpp \
837 generic/RTThreadSetAffinity-stub-generic.cpp \
838 generic/RTThreadSetAffinityToCpu-generic.cpp \
839 generic/RTTimeLocalNow-generic.cpp \
840 generic/RTTimerCreate-generic.cpp \
841 generic/RTUuidCreate-generic.cpp \
842 generic/mppresent-generic.cpp \
843 generic/sched-generic.cpp \
844 generic/utf16locale-generic.cpp \
845 generic/uuid-generic.cpp \
846 generic/RTMpCpuId-generic.cpp \
847 generic/RTProcDaemonize-generic.cpp \
848 generic/RTProcIsRunningByName-generic.cpp \
849 generic/RTThreadGetNativeState-generic.cpp \
850 r3/freebsd/mp-freebsd.cpp \
851 r3/freebsd/rtProcInitExePath-freebsd.cpp \
852 r3/posix/RTFileQueryFsSizes-posix.cpp \
853 r3/posix/RTHandleGetStandard-posix.cpp \
854 r3/posix/RTMemProtect-posix.cpp \
855 r3/posix/RTPathUserHome-posix.cpp \
856 r3/posix/RTSystemQueryOSInfo-posix.cpp \
857 r3/posix/RTSystemQueryTotalRam-posix.cpp \
858 r3/posix/RTTimeNow-posix.cpp \
859 r3/posix/RTTimeSet-posix.cpp \
860 r3/posix/dir-posix.cpp \
861 r3/posix/env-posix.cpp \
862 r3/posix/errvars-posix.cpp \
863 r3/posix/fileio-posix.cpp \
864 r3/posix/fileio2-posix.cpp \
865 r3/posix/filelock-posix.cpp \
866 r3/posix/fs-posix.cpp \
867 r3/posix/fs2-posix.cpp \
868 r3/posix/fs3-posix.cpp \
869 r3/posix/ldrNative-posix.cpp \
870 r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
871 r3/posix/path-posix.cpp \
872 r3/posix/path2-posix.cpp \
873 r3/posix/pathhost-posix.cpp \
874 r3/posix/RTPathUserDocuments-posix.cpp \
875 r3/posix/pipe-posix.cpp \
876 r3/posix/process-posix.cpp \
877 r3/posix/process-creation-posix.cpp \
878 r3/posix/rand-posix.cpp \
879 r3/posix/semevent-posix.cpp \
880 r3/posix/semeventmulti-posix.cpp \
881 r3/posix/semmutex-posix.cpp \
882 r3/posix/semrw-posix.cpp \
883 r3/posix/symlink-posix.cpp \
884 r3/posix/thread-posix.cpp \
885 r3/posix/thread2-posix.cpp \
886 r3/posix/time-posix.cpp \
887 r3/posix/timelocal-posix.cpp \
888 r3/posix/timer-posix.cpp \
889 r3/posix/tls-posix.cpp \
890 r3/posix/utf8-posix.cpp
891
892RuntimeR3_SOURCES.solaris = \
893 generic/cdrom-generic.cpp \
894 generic/RTDirQueryInfo-generic.cpp \
895 generic/RTDirSetTimes-generic.cpp \
896 generic/RTFileMove-generic.cpp \
897 generic/RTLogWriteDebugger-generic.cpp \
898 generic/RTProcDaemonize-generic.cpp \
899 generic/RTProcIsRunningByName-generic.cpp \
900 generic/RTSemEventMultiWait-2-ex-generic.cpp \
901 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
902 generic/RTSystemShutdown-generic.cpp \
903 generic/RTThreadSetAffinityToCpu-generic.cpp \
904 generic/RTTimeLocalNow-generic.cpp \
905 generic/RTTimerCreate-generic.cpp \
906 generic/RTUuidCreate-generic.cpp \
907 generic/sched-generic.cpp \
908 generic/utf16locale-generic.cpp \
909 generic/uuid-generic.cpp \
910 generic/RTThreadGetNativeState-generic.cpp \
911 r3/posix/RTFileQueryFsSizes-posix.cpp \
912 r3/posix/RTHandleGetStandard-posix.cpp \
913 r3/posix/RTMemProtect-posix.cpp \
914 r3/posix/RTPathUserHome-posix.cpp \
915 r3/posix/RTSystemQueryOSInfo-posix.cpp \
916 r3/posix/RTTimeNow-posix.cpp \
917 r3/posix/RTTimeSet-posix.cpp \
918 r3/posix/dir-posix.cpp \
919 r3/posix/env-posix.cpp \
920 r3/posix/errvars-posix.cpp \
921 r3/posix/fileio-posix.cpp \
922 r3/posix/fileio2-posix.cpp \
923 r3/posix/filelock-posix.cpp \
924 r3/posix/fs-posix.cpp \
925 r3/posix/fs2-posix.cpp \
926 r3/posix/fs3-posix.cpp \
927 r3/posix/ldrNative-posix.cpp \
928 r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
929 r3/posix/path-posix.cpp \
930 r3/posix/path2-posix.cpp \
931 r3/posix/pathhost-posix.cpp \
932 r3/posix/RTPathUserDocuments-posix.cpp \
933 r3/posix/pipe-posix.cpp \
934 r3/posix/process-posix.cpp \
935 r3/posix/process-creation-posix.cpp \
936 r3/posix/rand-posix.cpp \
937 r3/posix/semevent-posix.cpp \
938 r3/posix/semeventmulti-posix.cpp \
939 r3/posix/semmutex-posix.cpp \
940 r3/posix/semrw-posix.cpp \
941 r3/posix/symlink-posix.cpp \
942 r3/posix/thread-posix.cpp \
943 r3/posix/thread2-posix.cpp \
944 r3/posix/time-posix.cpp \
945 r3/posix/timelocal-posix.cpp \
946 r3/posix/timer-posix.cpp \
947 r3/posix/tls-posix.cpp \
948 r3/posix/utf8-posix.cpp \
949 r3/solaris/systemmem-solaris.cpp \
950 r3/solaris/mp-solaris.cpp \
951 r3/solaris/rtProcInitExePath-solaris.cpp \
952 r3/solaris/thread-affinity-solaris.cpp
953RuntimeR3_SOURCES.solaris.amd64 = \
954 r3/solaris/coredumper-solaris.cpp \
955 r3/solaris/RTSystemQueryDmiString-solaris.cpp
956RuntimeR3_SOURCES.solaris.x86 = \
957 r3/solaris/coredumper-solaris.cpp \
958 r3/solaris/RTSystemQueryDmiString-solaris.cpp
959RuntimeR3_SOURCES.solaris.sparc32 = \
960 generic/RTSystemQueryDmiString-generic.cpp
961RuntimeR3_SOURCES.solaris.sparc64 = \
962 generic/RTSystemQueryDmiString-generic.cpp
963
964RuntimeR3_SOURCES.haiku = \
965 generic/RTDirQueryInfo-generic.cpp \
966 generic/RTDirSetTimes-generic.cpp \
967 generic/RTFileMove-generic.cpp \
968 generic/RTLogWriteDebugger-generic.cpp \
969 generic/RTProcDaemonize-generic.cpp \
970 generic/RTTimeLocalNow-generic.cpp \
971 generic/RTTimerCreate-generic.cpp \
972 generic/RTUuidCreate-generic.cpp \
973 generic/mppresent-generic.cpp \
974 generic/RTSemEventMultiWait-2-ex-generic.cpp \
975 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
976 generic/sched-generic.cpp \
977 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),ockless-,)generic.cpp \
978 generic/timer-generic.cpp \
979 generic/utf16locale-generic.cpp \
980 generic/uuid-generic.cpp\
981 generic/RTProcIsRunningByName-generic.cpp \
982 generic/RTThreadGetNativeState-generic.cpp \
983 r3/haiku/rtProcInitExePath-haiku.cpp \
984 r3/haiku/time-haiku.cpp \
985 r3/posix/RTFileQueryFsSizes-posix.cpp \
986 r3/posix/RTHandleGetStandard-posix.cpp \
987 r3/posix/RTMemProtect-posix.cpp \
988 r3/posix/RTPathUserHome-posix.cpp \
989 r3/posix/RTSystemQueryOSInfo-posix.cpp \
990 r3/posix/RTSystemQueryTotalRam-posix.cpp \
991 r3/posix/RTTimeNow-posix.cpp \
992 r3/posix/dir-posix.cpp \
993 r3/posix/env-posix.cpp \
994 r3/posix/errvars-posix.cpp \
995 r3/posix/fileio-posix.cpp \
996 r3/posix/fileio2-posix.cpp \
997 r3/posix/filelock-posix.cpp \
998 r3/posix/fs-posix.cpp \
999 r3/posix/fs2-posix.cpp \
1000 r3/posix/fs3-posix.cpp \
1001 r3/posix/ldrNative-posix.cpp \
1002 r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
1003 r3/posix/path-posix.cpp \
1004 r3/posix/path2-posix.cpp \
1005 r3/posix/pathhost-posix.cpp \
1006 r3/posix/pipe-posix.cpp \
1007 r3/posix/process-posix.cpp \
1008 r3/posix/process-creation-posix.cpp \
1009 r3/posix/rand-posix.cpp \
1010 r3/posix/semevent-posix.cpp \
1011 r3/posix/semeventmulti-posix.cpp \
1012 r3/posix/semmutex-posix.cpp \
1013 r3/posix/symlink-posix.cpp \
1014 r3/posix/thread-posix.cpp \
1015 r3/posix/thread2-posix.cpp \
1016 r3/posix/timelocal-posix.cpp \
1017 r3/posix/tls-posix.cpp \
1018 r3/posix/utf8-posix.cpp
1019
1020## PORTME: Porters add their selection of platform specific files for Ring-3 here.
1021
1022
1023#
1024# RuntimeBldProg - Static Runtime for build programs.
1025#
1026# Note! This is a bit of hacky since kBuild doesn't support building libraries
1027# for build programs.
1028#
1029RuntimeBldProg_TEMPLATE := VBoxAdvBldProg
1030RuntimeBldProg_EXTENDS := RuntimeR3
1031RuntimeBldProg_BLD_TRG := $(KBUILD_HOST)
1032RuntimeBldProg_BLD_TRG_ARCH := $(KBUILD_HOST_ARCH)
1033RuntimeBldProg_BLD_TRG_CPU := $(KBUILD_HOST_CPU)
1034
1035
1036#
1037# RuntimeGuestR3 - Guest Additions Runtime (static/exe).
1038# (The KBUILD_HOST inheritance here is for cross building the linux
1039# additions, while .x86 is for cross building x86 while targeting amd64.)
1040#
1041RuntimeGuestR3_TEMPLATE := VBoxGuestR3Lib
1042## @todo change this to EXTEND the RuntimeR3 target.
1043RuntimeGuestR3_SDKS.win := $(RuntimeR3_SDKS.win)
1044RuntimeGuestR3_DEFS := $(filter-out RTCRITSECT_STRICT RT_NO_GIP, $(RuntimeR3_DEFS))
1045RuntimeGuestR3_DEFS.$(KBUILD_TARGET) := $(RuntimeR3_DEFS.$(KBUILD_TARGET))
1046RuntimeGuestR3_DEFS.$(KBUILD_HOST) := $(RuntimeR3_DEFS.$(KBUILD_HOST))
1047RuntimeGuestR3_INCS := $(RuntimeR3_INCS)
1048RuntimeGuestR3_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
1049RuntimeGuestR3_INCS.$(KBUILD_HOST) := $(RuntimeR3_INCS.$(KBUILD_HOST))
1050RuntimeGuestR3_SOURCES := $(filter-out \
1051 common/time/timesupref.cpp \
1052 common/time/timesupA.asm \
1053 common/time/timesup.cpp \
1054 common/checksum/RTSha1Digest.cpp \
1055 common/checksum/RTSha256Digest.cpp \
1056 common/checksum/sha% \
1057 generic/RTLogWriteUser-generic.cpp \
1058 , $(RuntimeR3_SOURCES))
1059RuntimeGuestR3_SOURCES += \
1060 common/time/timesysalias.cpp \
1061 VBox/logbackdoor.cpp
1062RuntimeGuestR3_SOURCES.$(KBUILD_TARGET) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET))
1063RuntimeGuestR3_SOURCES.$(KBUILD_HOST) := $(RuntimeR3_SOURCES.$(KBUILD_HOST))
1064RuntimeGuestR3_SOURCES.$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET_ARCH))
1065RuntimeGuestR3_SOURCES.x86 := $(RuntimeR3_SOURCES.x86)
1066RuntimeGuestR3_SOURCES.amd64 := $(RuntimeR3_SOURCES.amd64)
1067RuntimeGuestR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
1068RuntimeGuestR3_SOURCES.$(KBUILD_TARGET).x86 := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).x86)
1069RuntimeGuestR3_SOURCES.$(KBUILD_TARGET).amd64:= $(RuntimeR3_SOURCES.$(KBUILD_TARGET).amd64)
1070RuntimeGuestR3_SOURCES.$(KBUILD_HOST).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_HOST).$(KBUILD_TARGET_ARCH))
1071RuntimeGuestR3_SOURCES.win.x86 += \
1072 r3/win/vcc100-kernel32-fakes.cpp \
1073 r3/win/vcc100-kernel32-fakesA.asm
1074
1075#
1076# RuntimeGuestR3-x86 - Same as RuntimeGuestR3, except that it's targeting x86.
1077#
1078RuntimeGuestR3-x86_EXTENDS := RuntimeGuestR3
1079RuntimeGuestR3-x86_BLD_TRG_ARCH := x86
1080
1081
1082#
1083# RuntimeGuestR3Shared - Guest Additions Runtime (static/dll).
1084#
1085RuntimeGuestR3Shared_TEMPLATE := VBoxGuestR3Dll
1086RuntimeGuestR3Shared_EXTENDS := RuntimeGuestR3
1087RuntimeGuestR3Shared_INST = $(INST_ADDITIONS_LIB)
1088
1089
1090#
1091# RuntimeGuestR3Shared-x86 - Same as RuntimeGuestR3Shared, except that it's targeting x86.
1092#
1093RuntimeGuestR3Shared-x86_EXTENDS := RuntimeGuestR3Shared
1094RuntimeGuestR3Shared-x86_BLD_TRG_ARCH := x86
1095
1096
1097#
1098# RuntimeGuestR3Mini - Minimal Guest Additions Runtime which does not require
1099# initialization and can be linked into an .so. Intended
1100# for X11 drivers, GRADD and similar.
1101#
1102RuntimeGuestR3Mini_TEMPLATE := VBoxGuestR3Dll
1103## @todo change this to EXTEND the RuntimeGuestR3 target.
1104RuntimeGuestR3Mini_INST := $(INST_ADDITIONS_LIB)
1105RuntimeGuestR3Mini_SDKS.win := $(RuntimeR3_SDKS.win)
1106RuntimeGuestR3Mini_DEFS := \
1107 $(filter-out RTCRITSECT_STRICT RT_NO_GIP RT_WITH_ICONV_CACHE, $(RuntimeR3_DEFS)) \
1108 RT_MINI IN_RT_STATIC RTMEM_NO_WRAP_TO_EF_APIS
1109RuntimeGuestR3Mini_DEFS.$(KBUILD_TARGET) := $(RuntimeR3_DEFS.$(KBUILD_TARGET))
1110RuntimeGuestR3Mini_DEFS.$(KBUILD_HOST) := $(RuntimeR3_DEFS.$(KBUILD_HOST))
1111RuntimeGuestR3Mini_INCS := $(RuntimeR3_INCS)
1112RuntimeGuestR3Mini_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
1113RuntimeGuestR3Mini_INCS.$(KBUILD_HOST) := $(RuntimeR3_INCS.$(KBUILD_HOST))
1114RuntimeGuestR3Mini_SOURCES = \
1115 common/alloc/alloc.cpp \
1116 common/err/errmsg.cpp \
1117 common/err/RTErrConvertFromErrno.cpp \
1118 common/log/logformat.cpp \
1119 common/misc/RTAssertMsg1Weak.cpp \
1120 common/misc/RTAssertMsg2.cpp \
1121 common/misc/RTAssertMsg2Add.cpp \
1122 common/misc/RTAssertMsg2AddWeak.cpp \
1123 common/misc/RTAssertMsg2AddWeakV.cpp \
1124 common/misc/RTAssertMsg2Weak.cpp \
1125 common/misc/RTAssertMsg2WeakV.cpp \
1126 common/misc/assert.cpp \
1127 common/misc/buildconfig.cpp \
1128 common/misc/sanity-c.c \
1129 common/misc/sanity-cpp.cpp \
1130 common/path/rtPathVolumeSpecLen.cpp \
1131 common/path/RTPathAbsDup.cpp \
1132 common/path/RTPathAbsEx.cpp \
1133 common/path/RTPathAbsExDup.cpp \
1134 common/path/RTPathAppend.cpp \
1135 common/path/RTPathAppendEx.cpp \
1136 common/path/RTPathExt.cpp \
1137 common/path/RTPathFilename.cpp \
1138 common/path/RTPathHasExt.cpp \
1139 common/path/RTPathHasPath.cpp \
1140 common/path/RTPathJoin.cpp \
1141 common/path/RTPathJoinA.cpp \
1142 common/path/RTPathParseSimple.cpp \
1143 common/path/RTPathRealDup.cpp \
1144 common/path/RTPathStripExt.cpp \
1145 common/path/RTPathStripFilename.cpp \
1146 common/path/RTPathStripTrailingSlash.cpp \
1147 common/string/RTStrCat.cpp \
1148 common/string/RTStrCatEx.cpp \
1149 common/string/RTStrCatP.cpp \
1150 common/string/RTStrCatPEx.cpp \
1151 common/string/RTStrCmp.cpp \
1152 common/string/RTStrCopy.cpp \
1153 common/string/RTStrCopyEx.cpp \
1154 common/string/RTStrCopyP.cpp \
1155 common/string/RTStrCopyPEx.cpp \
1156 common/string/RTStrNCmp.cpp \
1157 common/string/RTStrNLen.cpp \
1158 common/string/RTStrNLenEx.cpp \
1159 common/string/RTStrStr.cpp \
1160 common/string/straprintf.cpp \
1161 common/string/strformat.cpp \
1162 common/string/strformatnum.cpp \
1163 common/string/strformatrt.cpp \
1164 common/string/strformattype.cpp \
1165 common/string/stringalloc.cpp \
1166 common/string/strprintf.cpp \
1167 common/string/strtonum.cpp \
1168 common/string/unidata.cpp \
1169 common/string/utf-8.cpp \
1170 common/string/utf-8-case.cpp \
1171 common/string/utf-16.cpp \
1172 common/table/avlpv.cpp \
1173 generic/critsect-generic.cpp \
1174 generic/pathhost-generic.cpp \
1175 generic/RTAssertShouldPanic-generic.cpp \
1176 generic/errvars-generic.cpp \
1177 r3/alloc.cpp \
1178 r3/alloc-ef.cpp \
1179 r3/fileio.cpp \
1180 r3/fs.cpp
1181RuntimeGuestR3Mini_SOURCES.freebsd = \
1182 r3/posix/RTMemProtect-posix.cpp \
1183 r3/posix/rtmempage-exec-mmap-posix.cpp \
1184 r3/posix/RTPathUserHome-posix.cpp \
1185 r3/posix/env-posix.cpp \
1186 r3/posix/fileio-posix.cpp \
1187 r3/posix/fileio2-posix.cpp \
1188 r3/posix/path-posix.cpp \
1189 r3/posix/path2-posix.cpp \
1190 r3/posix/utf8-posix.cpp \
1191 r3/posix/thread2-posix.cpp \
1192 common/err/errmsgxpcom.cpp
1193RuntimeGuestR3Mini_SOURCES.linux = \
1194 r3/posix/RTMemProtect-posix.cpp \
1195 r3/posix/rtmempage-exec-mmap-posix.cpp \
1196 r3/posix/RTPathUserHome-posix.cpp \
1197 r3/posix/env-posix.cpp \
1198 r3/posix/fileio-posix.cpp \
1199 r3/posix/fileio2-posix.cpp \
1200 r3/posix/path-posix.cpp \
1201 r3/posix/path2-posix.cpp \
1202 r3/posix/utf8-posix.cpp \
1203 r3/posix/thread2-posix.cpp \
1204 common/err/errmsgxpcom.cpp
1205RuntimeGuestR3Mini_SOURCES.solaris = \
1206 r3/posix/RTMemProtect-posix.cpp \
1207 r3/posix/rtmempage-exec-mmap-posix.cpp \
1208 r3/posix/RTPathUserHome-posix.cpp \
1209 r3/posix/env-posix.cpp \
1210 r3/posix/fileio-posix.cpp \
1211 r3/posix/fileio2-posix.cpp \
1212 r3/posix/path-posix.cpp \
1213 r3/posix/path2-posix.cpp \
1214 r3/posix/utf8-posix.cpp \
1215 r3/posix/thread2-posix.cpp \
1216 common/err/errmsgxpcom.cpp
1217RuntimeGuestR3Mini_SOURCES.win = \
1218 r3/win/alloc-win.cpp \
1219 r3/win/fileio-win.cpp \
1220 r3/win/path-win.cpp \
1221 r3/win/utf8-win.cpp \
1222 r3/win/thread2-win.cpp \
1223 win/errmsgwin.cpp \
1224 win/RTErrConvertFromWin32.cpp
1225
1226# VBox specific stuff.
1227RuntimeGuestR3Mini_SOURCES += \
1228 VBox/logbackdoor.cpp \
1229 VBox/logbackdoor-redirect.cpp
1230
1231
1232#
1233# VBoxRT - Shared Object / DLL version.
1234#
1235VBoxRT_TEMPLATE = VBoxR3DllNoPic
1236VBoxRT_SDKS = VBOX_LIBXML2 VBOX_BOOST
1237ifdef VBOX_WITH_LIBCURL
1238 VBoxRT_SDKS += VBOX_LIBCURL
1239endif
1240VBoxRT_SDKS += VBOX_OPENSSL
1241VBoxRT_SDKS.win = $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
1242if1of ($(KBUILD_TARGET)$(VBOX_WITH_HARDENING), darwin win)
1243VBoxRT_INST = $(INST_DLL) $(INST_TESTCASE)
1244endif
1245VBoxRT_DEFS := $(filter-out RT_NO_GIP,$(RuntimeR3_DEFS)) IN_SUP_R3 IN_SUP_R3
1246ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1247 VBoxRT_DEFS += RT_NO_GIP
1248endif
1249ifdef VBOX_WITH_LIBCURL
1250 VBoxRT_DEFS += IPRT_WITH_HTTP
1251endif
1252VBoxRT_DEFS.$(KBUILD_TYPE) := $(RuntimeR3_DEFS.$(KBUILD_TYPE))
1253VBoxRT_SOURCES := \
1254 VBox/VBoxRTDeps.cpp \
1255 r3/xml.cpp \
1256 $(filter-out common/checksum/crc32.cpp, $(RuntimeR3_SOURCES)) \
1257 common/checksum/crc32-zlib.cpp \
1258 common/misc/aiomgr.cpp
1259ifdef VBOX_WITH_LIBCURL
1260 VBoxRT_SOURCES += common/misc/s3.cpp
1261 VBoxRT_SOURCES += common/misc/http.cpp
1262endif
1263VBoxRT_SOURCES.$(KBUILD_TARGET) = $(RuntimeR3_SOURCES.$(KBUILD_TARGET))
1264VBoxRT_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
1265VBoxRT_SOURCES.$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET_ARCH))
1266VBoxRT_SOURCES.win += \
1267 r3/win/dllmain-win.cpp \
1268 r3/win/fileaio-win.cpp \
1269 $(VBoxRT_0_OUTDIR)/VBoxRT.def
1270VBoxRT_SOURCES.linux += \
1271 r3/linux/fileaio-linux.cpp
1272VBoxRT_SOURCES.solaris += \
1273 r3/solaris/fileaio-solaris.cpp
1274VBoxRT_SOURCES.darwin += \
1275 r3/posix/fileaio-posix.cpp
1276VBoxRT_SOURCES.freebsd += \
1277 r3/freebsd/fileaio-freebsd.cpp
1278VBoxRT_INCS := $(RuntimeR3_INCS)
1279VBoxRT_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
1280VBoxRT_INCS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_INCS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
1281VBoxRT_LIBS = \
1282 $(PATH_STAGE_LIB)/VBox-liblzf$(VBOX_SUFF_LIB)
1283if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1284VBoxRT_LIBS += \
1285 $(PATH_STAGE_LIB)/SUPR3$(VBOX_SUFF_LIB)
1286endif
1287ifdef IPRT_WITH_KSTUFF
1288 VBoxRT_LIBS += \
1289 $(PATH_STAGE_LIB)/VBox-kStuff$(VBOX_SUFF_LIB)
1290endif
1291ifndef SDK_VBOX_LIBXML2_LIBS
1292 VBoxRT_LIBS += \
1293 $(PATH_STAGE_LIB)/VBox-libxml2$(VBOX_SUFF_LIB)
1294endif
1295VBoxRT_LIBS += \
1296 $(SDK_VBOX_ZLIB_LIBS)
1297ifndef SDK_VBOX_OPENSSL_LIBS
1298 VBoxRT_LIBS += \
1299 $(PATH_STAGE_LIB)/VBox-libcrypto$(VBOX_SUFF_LIB) \
1300 $(PATH_STAGE_LIB)/VBox-libssl$(VBOX_SUFF_LIB)
1301endif
1302ifdef IPRT_WITH_LZO
1303 VBoxRT_LIBS += lzo2
1304endif
1305VBoxRT_LIBS.linux = \
1306 crypt
1307VBoxRT_LIBS.darwin = \
1308 iconv
1309VBoxRT_LIBS.freebsd = \
1310 iconv \
1311 rt
1312VBoxRT_LIBS.haiku = \
1313 iconv
1314VBoxRT_LIBS.solaris = \
1315 kstat \
1316 contract
1317ifn1of ($(KBUILD_TARGET_ARCH), sparc32 sparc64)
1318 # SMBIOS not available on Solaris SPARC.
1319 VBoxRT_LIBS.solaris += smbios
1320endif
1321VBoxRT_LIBS.win = \
1322 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/vccomsup.lib \
1323 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/wbemuuid.lib
1324VBoxRT_LDFLAGS.darwin = -framework IOKit -framework CoreFoundation -framework CoreServices -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxRT.dylib
1325VBoxRT_LDFLAGS.win = /MANIFEST
1326
1327if1of ($(DLLS), VBoxRT)
1328$$(VBoxRT_0_OUTDIR)/VBoxRT.def: \
1329 $(PATH_SUB_CURRENT)/r3/win/VBoxRT-$$(if-expr $$(KBUILD_TARGET_ARCH) == amd64,win64,win32).def \
1330 $(PATH_SUB_CURRENT)/r3/win/$(if $(VBOX_OSE),VBoxRT-openssl-ose.def,VBoxRT-openssl.def)
1331 $(RM) -f -- $@
1332 $(REDIRECT) -wto $@ -- $(CAT_EXT) $^
1333endif
1334
1335
1336#
1337# HACK ALERT! Make testcase run during build on SELinux boxes.
1338# Create a dummy DLL that ensure that VBoxRT is installed
1339# during the DLL pass and cleaned up later.
1340#
1341ifeq ($(KBUILD_TARGET),linux)
1342 if1of (VBoxRT, $(DLLS))
1343 ifneq ($(wildcard /usr/bin/chcon),)
1344VBoxRT_INSTTYPE = none
1345VBoxRT_DEBUG_INSTTYPE = both
1346
1347DLLS += VBoxRTDummy
1348VBoxRTDummy_TEMPLATE = VBOXR3
1349VBoxRTDummy_INSTTYPE = none
1350VBoxRTDummy_LIBS = $(PATH_STAGE_BIN)/VBoxRT.so
1351VBoxRTDummy_CLEAN = $(PATH_STAGE_BIN)/VBoxRT.so
1352BLDDIRS += $(PATH_STAGE_BIN)
1353
1354$(PATH_STAGE_BIN)/VBoxRT.so: $$(VBoxRT_1_TARGET) | $$(dir $$@)
1355 $(INSTALL) $< $@
1356 chcon -t texrel_shlib_t $@ || true
1357
1358VBoxRT:: VBoxRTDummy
1359 endif # chcon present.
1360 endif # building VBoxRT
1361endif # linux
1362
1363
1364#
1365# VBoxRTImp - Import library/hack.
1366#
1367ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.amd64)
1368$(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxRTImp,VBoxRT,VBox/VBoxRTImp.def r3/win/VBoxRT-openssl-ose.def r3/win/VBoxRT-win64.def)
1369else ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.x86)
1370$(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxRTImp,VBoxRT,VBox/VBoxRTImp.def r3/win/VBoxRT-openssl-ose.def r3/win/VBoxRT-win32.def)
1371else
1372$(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxRTImp,VBoxRT,VBox/VBoxRTImp.def r3/win/VBoxRT-openssl-ose.def)
1373endif
1374
1375
1376#
1377# RuntimeR3NoCRTGCC - CRT replacement lib for VBoxREM.
1378# This is used together with VBoxRT.
1379#
1380## @todo the *_alias.c stuff is busted, remove and use RT_WITH_NOCRT_ALIASES instead.
1381RuntimeR3NoCRTGCC_TEMPLATE = VBOXNOCRTGCC
1382RuntimeR3NoCRTGCC_LIBSUFF = $(VBOX_SUFF_LIB)
1383ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1384 RuntimeR3NoCRTGCC_DEFS += RT_NO_GIP
1385endif
1386RuntimeR3NoCRTGCC_INCS = include
1387RuntimeR3NoCRTGCC_SOURCES := \
1388 common/misc/sanity-cpp.cpp \
1389 common/misc/sanity-c.c \
1390 \
1391 $(RuntimeNoCrt_SOURCES)
1392
1393if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1394RuntimeR3NoCRTGCC_SOURCES += \
1395 common/math/ceill.asm \
1396 common/math/cosl.asm \
1397 common/math/fabs.asm \
1398 common/math/fabsf.asm \
1399 common/math/fabsl.asm \
1400 common/math/floor.asm \
1401 common/math/floorf.asm \
1402 common/math/floorl.asm \
1403 common/math/ldexpl.asm \
1404 common/math/llrint.asm \
1405 common/math/llrintf.asm \
1406 common/math/llrintl.asm \
1407 common/math/logl.asm \
1408 common/math/lrint.asm \
1409 common/math/lrintf.asm \
1410 common/math/lrintl.asm \
1411 common/math/remainder.asm \
1412 common/math/remainderf.asm \
1413 common/math/remainderl.asm \
1414 common/math/sinl.asm \
1415 common/math/tanl.asm \
1416 common/math/trunc.asm \
1417 common/math/truncf.asm \
1418 common/math/truncl.asm \
1419 \
1420 common/string/memchr_alias.c \
1421 common/string/memcmp_alias.c \
1422 common/string/memcpy_alias.c \
1423 common/string/memmove_alias.c \
1424 common/string/memset_alias.c \
1425 common/string/strchr_alias.c \
1426 common/string/strcmp_alias.c \
1427 common/string/strlen_alias.c
1428endif
1429
1430RuntimeR3NoCRTGCC_SOURCES.x86 = \
1431 common/math/x86/fenv-x86.c \
1432 common/math/gcc/adddi3.c \
1433 common/math/gcc/anddi3.c \
1434 common/math/gcc/ashldi3.c \
1435 common/math/gcc/ashrdi3.c \
1436 common/math/gcc/cmpdi2.c \
1437 common/math/gcc/divdi3.c \
1438 common/math/gcc/iordi3.c \
1439 common/math/gcc/lshldi3.c \
1440 common/math/gcc/lshrdi3.c \
1441 common/math/gcc/moddi3.c \
1442 common/math/gcc/muldi3.c \
1443 common/math/gcc/negdi2.c \
1444 common/math/gcc/notdi2.c \
1445 common/math/gcc/qdivrem.c \
1446 common/math/gcc/subdi3.c \
1447 common/math/gcc/ucmpdi2.c \
1448 common/math/gcc/udivdi3.c \
1449 common/math/gcc/umoddi3.c \
1450 common/math/gcc/xordi3.c
1451
1452
1453## @todo stop using the old memcpy.c and memset.c code.
1454
1455#
1456# RuntimeR0 - Ring-0 library for VMMR0.
1457#
1458RuntimeR0_TEMPLATE = VBoxR0
1459RuntimeR0_DEFS = IN_RT_R0 RT_WITH_VBOX
1460ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1461 RuntimeR0_DEFS += RT_NO_GIP
1462endif
1463RuntimeR0_INCS = include
1464RuntimeR0_SOURCES := \
1465 common/log/logellipsis.cpp \
1466 common/log/logrelellipsis.cpp \
1467 common/log/logcom.cpp \
1468 common/log/logformat.cpp \
1469 common/log/tracebuf.cpp \
1470 common/log/tracedefault.cpp \
1471 common/misc/RTAssertMsg1Weak.cpp \
1472 common/misc/RTAssertMsg2.cpp \
1473 common/misc/RTAssertMsg2Add.cpp \
1474 common/misc/RTAssertMsg2AddWeak.cpp \
1475 common/misc/RTAssertMsg2AddWeakV.cpp \
1476 common/misc/RTAssertMsg2Weak.cpp \
1477 common/misc/RTAssertMsg2WeakV.cpp \
1478 common/misc/buildconfig.cpp \
1479 common/misc/once.cpp \
1480 common/misc/sanity-c.c \
1481 common/misc/sanity-cpp.cpp \
1482 common/misc/term.cpp \
1483 common/path/RTPathFilename.cpp \
1484 common/string/strhash1.cpp \
1485 common/string/strncmp.cpp \
1486 common/string/strpbrk.cpp \
1487 common/string/RTStrCat.cpp \
1488 common/string/RTStrCatEx.cpp \
1489 common/string/RTStrCatP.cpp \
1490 common/string/RTStrCatPEx.cpp \
1491 common/string/RTStrCopy.cpp \
1492 common/string/RTStrCopyEx.cpp \
1493 common/string/RTStrCopyP.cpp \
1494 common/string/RTStrCopyPEx.cpp \
1495 common/string/RTStrNLen.cpp \
1496 common/string/RTStrNLenEx.cpp \
1497 common/table/avlgcptr.cpp \
1498 common/table/avlhcphys.cpp \
1499 common/table/avllu32.cpp \
1500 common/table/avlogcphys.cpp \
1501 common/table/avlogcptr.cpp \
1502 common/table/avlohcphys.cpp \
1503 common/table/avloioport.cpp \
1504 common/table/avlpv.cpp \
1505 common/table/avlrogcphys.cpp \
1506 common/table/avlrogcptr.cpp \
1507 common/table/avlroioport.cpp \
1508 common/table/avlroogcptr.cpp \
1509 common/table/avlu32.cpp \
1510 common/table/avlou32.cpp \
1511 common/time/timesup.cpp \
1512 generic/RTAssertShouldPanic-generic.cpp \
1513 \
1514 $(RuntimeNoCrt_SOURCES)
1515
1516if1of ($(KBUILD_TARGET), darwin solaris freebsd)
1517RuntimeR0_SOURCES += \
1518 common/math/gcc/adddi3.c \
1519 common/math/gcc/anddi3.c \
1520 common/math/gcc/ashldi3.c \
1521 common/math/gcc/ashrdi3.c \
1522 common/math/gcc/cmpdi2.c \
1523 common/math/gcc/divdi3.c \
1524 common/math/gcc/iordi3.c \
1525 common/math/gcc/lshldi3.c \
1526 common/math/gcc/lshrdi3.c \
1527 common/math/gcc/moddi3.c \
1528 common/math/gcc/muldi3.c \
1529 common/math/gcc/negdi2.c \
1530 common/math/gcc/notdi2.c \
1531 common/math/gcc/qdivrem.c \
1532 common/math/gcc/subdi3.c \
1533 common/math/gcc/ucmpdi2.c \
1534 common/math/gcc/udivdi3.c \
1535 common/math/gcc/umoddi3.c \
1536 common/math/gcc/xordi3.c
1537endif
1538
1539#if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
1540# RuntimeR0_SOURCES += common/time/timesupA.asm
1541#else
1542 RuntimeR0_SOURCES += common/time/timesupref.cpp
1543#endif
1544
1545RuntimeR0_SOURCES.win.amd64 := $(RuntimeWin64ASM_SOURCES)
1546RuntimeR0_SOURCES.win.x86 := $(RuntimeWin32ASM_SOURCES)
1547RuntimeR0_SOURCES.win = \
1548 nt/NtProcessStartup-stub.cpp
1549
1550RuntimeR0_SOURCES.os2 = \
1551 os2/sys0.asm
1552
1553
1554#
1555# RuntimeR0Stub - Ring-0 context startup stub for Windows and Solaris.
1556#
1557RuntimeR0Stub_TEMPLATE = $(if-expr "$(KBUILD_TARGET)" == "solaris",VBoxR0DrvLib,VBoxR0)
1558RuntimeR0Stub_SOURCES.win = \
1559 nt/NtProcessStartup-stub.cpp
1560RuntimeR0Stub_SOURCES.solaris = \
1561 r0drv/solaris/modulestub-r0drv-solaris.c
1562
1563
1564#
1565# RuntimeR0Drv - Ring-0 library for host drivers.
1566#
1567RuntimeR0Drv_TEMPLATE = VBoxR0DrvLib
1568RuntimeR0Drv_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK) $(VBOX_WINPSDK)INCS
1569RuntimeR0Drv_DEFS = IN_RT_R0 RT_WITH_VBOX RT_WITHOUT_NOCRT_WRAPPERS RT_NO_EXPORT_SYMBOL
1570RuntimeR0Drv_DEFS.win = IN_SUP_R0
1571RuntimeR0Drv_DEFS.linux = MODULE KBUILD_MODNAME=KBUILD_STR\(vboxdrv\) KBUILD_BASENAME=KBUILD_STR\(vboxdrv\) IN_SUP_R0
1572
1573RuntimeR0Drv_INCS := $(PATH_SUB_CURRENT) include
1574RuntimeR0Drv_INCS.freebsd = \
1575 $(PATH_STAGE)/gen-sys-hdrs
1576RuntimeR0Drv_INCS.linux = \
1577 r0drv/linux
1578RuntimeR0Drv_INCS.solaris = \
1579 r0drv/solaris/vbi/i86pc \
1580 r0drv/solaris/vbi/i86pc/sys
1581
1582RuntimeR0Drv_SOURCES = \
1583 common/alloc/alloc.cpp \
1584 common/alloc/heapsimple.cpp \
1585 common/alloc/heapoffset.cpp \
1586 common/checksum/crc32.cpp \
1587 common/checksum/crc64.cpp \
1588 common/checksum/md5.cpp \
1589 common/checksum/ipv4.cpp \
1590 common/checksum/ipv6.cpp \
1591 common/err/RTErrConvertToErrno.cpp \
1592 common/err/RTErrConvertFromErrno.cpp \
1593 common/log/log.cpp \
1594 common/log/logellipsis.cpp \
1595 common/log/logrel.cpp \
1596 common/log/logrelellipsis.cpp \
1597 common/log/logcom.cpp \
1598 common/log/logformat.cpp \
1599 common/log/tracebuf.cpp \
1600 common/log/tracedefault.cpp \
1601 common/misc/RTAssertMsg1Weak.cpp \
1602 common/misc/RTAssertMsg2.cpp \
1603 common/misc/RTAssertMsg2Add.cpp \
1604 common/misc/RTAssertMsg2AddWeak.cpp \
1605 common/misc/RTAssertMsg2AddWeakV.cpp \
1606 common/misc/RTAssertMsg2Weak.cpp \
1607 common/misc/RTAssertMsg2WeakV.cpp \
1608 common/misc/assert.cpp \
1609 common/misc/buildconfig.cpp \
1610 common/misc/handletable.cpp \
1611 common/misc/handletablectx.cpp \
1612 common/misc/handletablesimple.cpp \
1613 common/misc/once.cpp \
1614 common/misc/sanity-c.c \
1615 common/misc/sanity-cpp.cpp \
1616 common/misc/term.cpp \
1617 common/path/rtPathVolumeSpecLen.cpp \
1618 common/path/RTPathAbsDup.cpp \
1619 common/path/RTPathAbsEx.cpp \
1620 common/path/RTPathAbsExDup.cpp \
1621 common/path/RTPathAppend.cpp \
1622 common/path/RTPathAppendEx.cpp \
1623 common/path/RTPathExt.cpp \
1624 common/path/RTPathFilename.cpp \
1625 common/path/RTPathHasExt.cpp \
1626 common/path/RTPathHasPath.cpp \
1627 common/path/RTPathParseSimple.cpp \
1628 common/path/RTPathRealDup.cpp \
1629 common/path/RTPathStripExt.cpp \
1630 common/path/RTPathStripFilename.cpp \
1631 common/path/RTPathStripTrailingSlash.cpp \
1632 common/rand/rand.cpp \
1633 common/rand/randadv.cpp \
1634 common/rand/randparkmiller.cpp \
1635 common/string/RTStrCat.cpp \
1636 common/string/RTStrCatEx.cpp \
1637 common/string/RTStrCatP.cpp \
1638 common/string/RTStrCatPEx.cpp \
1639 common/string/RTStrCmp.cpp \
1640 common/string/RTStrCopy.cpp \
1641 common/string/RTStrCopyEx.cpp \
1642 common/string/RTStrCopyP.cpp \
1643 common/string/RTStrCopyPEx.cpp \
1644 common/string/RTStrNCmp.cpp \
1645 common/string/RTStrNLen.cpp \
1646 common/string/RTStrNLenEx.cpp \
1647 common/string/straprintf.cpp \
1648 common/string/strformat.cpp \
1649 common/string/strformatnum.cpp \
1650 common/string/strformatrt.cpp \
1651 common/string/strformattype.cpp \
1652 common/string/strhash1.cpp \
1653 common/string/strprintf.cpp \
1654 common/string/strtonum.cpp \
1655 common/string/stringalloc.cpp \
1656 common/string/utf-16.cpp \
1657 common/string/utf-8.cpp \
1658 common/table/avlpv.cpp \
1659 common/time/time.cpp \
1660 generic/RTLogWriteStdErr-stub-generic.cpp \
1661 generic/RTLogWriteUser-generic.cpp \
1662 generic/RTMpGetArraySize-generic.cpp \
1663 generic/RTRandAdvCreateSystemFaster-generic.cpp \
1664 generic/RTSemEventWait-2-ex-generic.cpp \
1665 generic/RTSemEventWaitNoResume-2-ex-generic.cpp \
1666 generic/RTSemEventMultiWait-2-ex-generic.cpp \
1667 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
1668 generic/errvars-generic.cpp \
1669 generic/uuid-generic.cpp \
1670 r0drv/alloc-r0drv.cpp \
1671 r0drv/initterm-r0drv.cpp \
1672 r0drv/generic/semspinmutex-r0drv-generic.c \
1673 VBox/log-vbox.cpp \
1674
1675RuntimeR0Drv_SOURCES.linux = \
1676 common/misc/thread.cpp \
1677 common/string/strpbrk.cpp \
1678 generic/RTAssertShouldPanic-generic.cpp \
1679 generic/RTLogWriteStdOut-stub-generic.cpp \
1680 generic/mppresent-generic.cpp \
1681 r0drv/linux/alloc-r0drv-linux.c \
1682 r0drv/linux/assert-r0drv-linux.c \
1683 r0drv/linux/initterm-r0drv-linux.c \
1684 r0drv/linux/memobj-r0drv-linux.c \
1685 r0drv/linux/memuserkernel-r0drv-linux.c \
1686 r0drv/linux/mp-r0drv-linux.c \
1687 r0drv/linux/mpnotification-r0drv-linux.c \
1688 r0drv/linux/process-r0drv-linux.c \
1689 r0drv/linux/RTLogWriteDebugger-r0drv-linux.c \
1690 r0drv/linux/semevent-r0drv-linux.c \
1691 r0drv/linux/semeventmulti-r0drv-linux.c \
1692 r0drv/linux/semfastmutex-r0drv-linux.c \
1693 r0drv/linux/semmutex-r0drv-linux.c \
1694 r0drv/linux/spinlock-r0drv-linux.c \
1695 r0drv/linux/thread-r0drv-linux.c \
1696 r0drv/linux/thread2-r0drv-linux.c \
1697 r0drv/linux/time-r0drv-linux.c \
1698 r0drv/linux/timer-r0drv-linux.c \
1699 r0drv/memobj-r0drv.cpp \
1700 r0drv/mpnotification-r0drv.c \
1701 r0drv/powernotification-r0drv.c
1702
1703RuntimeR0Drv_SOURCES.win = \
1704 common/misc/thread.cpp \
1705 common/string/memcmp.asm \
1706 common/string/memchr.asm \
1707 common/string/memcpy.asm \
1708 common/string/memset.asm \
1709 common/string/memmove.asm \
1710 common/string/strlen.asm \
1711 common/string/strncmp.cpp \
1712 common/string/strpbrk.cpp \
1713 generic/RTAssertShouldPanic-generic.cpp \
1714 generic/RTLogWriteStdOut-stub-generic.cpp \
1715 generic/RTTimerCreate-generic.cpp \
1716 generic/mppresent-generic.cpp \
1717 nt/RTErrConvertFromNtStatus.cpp \
1718 r0drv/memobj-r0drv.cpp \
1719 r0drv/mpnotification-r0drv.c \
1720 r0drv/powernotification-r0drv.c \
1721 r0drv/nt/alloc-r0drv-nt.cpp \
1722 r0drv/nt/assert-r0drv-nt.cpp \
1723 r0drv/nt/initterm-r0drv-nt.cpp \
1724 r0drv/nt/memobj-r0drv-nt.cpp \
1725 r0drv/nt/memuserkernel-r0drv-nt.cpp \
1726 r0drv/nt/mp-r0drv-nt.cpp \
1727 r0drv/nt/mpnotification-r0drv-nt.cpp \
1728 r0drv/nt/process-r0drv-nt.cpp \
1729 r0drv/nt/RTLogWriteDebugger-r0drv-nt.cpp \
1730 r0drv/nt/semevent-r0drv-nt.cpp \
1731 r0drv/nt/semeventmulti-r0drv-nt.cpp \
1732 r0drv/nt/semfastmutex-r0drv-nt.cpp \
1733 r0drv/nt/semmutex-r0drv-nt.cpp \
1734 r0drv/nt/spinlock-r0drv-nt.cpp \
1735 r0drv/nt/thread-r0drv-nt.cpp \
1736 r0drv/nt/thread2-r0drv-nt.cpp \
1737 r0drv/nt/time-r0drv-nt.cpp \
1738 r0drv/nt/timer-r0drv-nt.cpp \
1739 r0drv/nt/RTTimerGetSystemGranularity-r0drv-nt.cpp
1740
1741RuntimeR0Drv_SOURCES.win.amd64 := $(RuntimeWin64ASM_SOURCES)
1742RuntimeR0Drv_SOURCES.win.x86 := $(RuntimeWin32ASM_SOURCES)
1743
1744RuntimeR0Drv_SOURCES.darwin = \
1745 common/misc/thread.cpp \
1746 common/string/memchr.asm \
1747 common/string/strpbrk.cpp \
1748 darwin/RTErrConvertFromDarwin.cpp \
1749 darwin/RTErrConvertFromDarwinIO.cpp \
1750 darwin/RTErrConvertFromDarwinKern.cpp \
1751 generic/RTAssertShouldPanic-generic.cpp \
1752 generic/RTTimerCreate-generic.cpp \
1753 generic/mppresent-generic.cpp \
1754 generic/timer-generic.cpp \
1755 r0drv/generic/mpnotification-r0drv-generic.cpp \
1756 r0drv/darwin/alloc-r0drv-darwin.cpp \
1757 r0drv/darwin/assert-r0drv-darwin.cpp \
1758 r0drv/darwin/initterm-r0drv-darwin.cpp \
1759 r0drv/darwin/dbgkrnlinfo-r0drv-darwin.cpp \
1760 r0drv/darwin/memobj-r0drv-darwin.cpp \
1761 r0drv/darwin/mp-r0drv-darwin.cpp \
1762 r0drv/darwin/memuserkernel-r0drv-darwin.cpp \
1763 r0drv/darwin/process-r0drv-darwin.cpp \
1764 r0drv/darwin/RTLogWriteDebugger-r0drv-darwin.cpp \
1765 r0drv/darwin/RTLogWriteStdOut-r0drv-darwin.cpp \
1766 r0drv/darwin/semevent-r0drv-darwin.cpp \
1767 r0drv/darwin/semeventmulti-r0drv-darwin.cpp \
1768 r0drv/darwin/semfastmutex-r0drv-darwin.cpp \
1769 r0drv/darwin/semmutex-r0drv-darwin.cpp \
1770 r0drv/darwin/spinlock-r0drv-darwin.cpp \
1771 r0drv/darwin/thread-r0drv-darwin.cpp \
1772 r0drv/darwin/thread2-r0drv-darwin.cpp \
1773 r0drv/darwin/threadpreempt-r0drv-darwin.cpp \
1774 r0drv/darwin/time-r0drv-darwin.cpp \
1775 r0drv/memobj-r0drv.cpp \
1776 r0drv/powernotification-r0drv.c
1777
1778RuntimeR0Drv_SOURCES.os2 = \
1779 common/string/memchr.asm \
1780 common/string/memcmp.asm \
1781 common/string/memcpy.asm \
1782 common/string/mempcpy.asm \
1783 common/string/memmove.asm \
1784 common/string/memset.asm \
1785 common/string/strchr.asm \
1786 common/string/strcmp.asm \
1787 common/string/strcpy.asm \
1788 common/string/strlen.asm \
1789 \
1790 common/string/strncmp.cpp \
1791 common/string/strpbrk.cpp \
1792 \
1793 common/misc/thread.cpp \
1794 generic/RTAssertShouldPanic-generic.cpp \
1795 generic/RTLogWriteDebugger-generic.cpp \
1796 generic/RTLogWriteStdOut-stub-generic.cpp \
1797 generic/RTMpCpuId-generic.cpp \
1798 generic/RTMpCpuIdFromSetIndex-generic.cpp \
1799 generic/RTMpCpuIdToSetIndex-generic.cpp \
1800 generic/RTMpIsCpuPossible-generic.cpp \
1801 generic/RTMpGetCount-generic.cpp \
1802 generic/RTMpGetMaxCpuId-generic.cpp \
1803 generic/RTMpGetOnlineCount-generic.cpp \
1804 generic/RTMpGetOnlineSet-generic.cpp \
1805 generic/RTMpGetSet-generic.cpp \
1806 generic/RTMpIsCpuOnline-generic.cpp \
1807 generic/RTTimerCreate-generic.cpp \
1808 generic/mppresent-generic.cpp \
1809 os2/RTErrConvertFromOS2.cpp \
1810 os2/rtSemWaitOs2ConvertTimeout.cpp \
1811 os2/sys0.asm \
1812 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
1813 r0drv/generic/RTMpOn-r0drv-generic.cpp \
1814 r0drv/generic/mpnotification-r0drv-generic.cpp \
1815 r0drv/memobj-r0drv.cpp \
1816 r0drv/powernotification-r0drv.c \
1817 r0drv/os2/alloc-r0drv-os2.cpp \
1818 r0drv/os2/assert-r0drv-os2.cpp \
1819 r0drv/os2/assertA-r0drv-os2.asm \
1820 r0drv/os2/initterm-r0drv-os2.cpp \
1821 r0drv/os2/memobj-r0drv-os2.cpp \
1822 r0drv/os2/memuserkernel-r0drv-os2.cpp \
1823 r0drv/os2/os2imports.imp \
1824 r0drv/os2/process-r0drv-os2.cpp \
1825 r0drv/os2/RTR0AssertPanicSystem-r0drv-os2.asm \
1826 r0drv/os2/RTR0Os2DHQueryDOSVar.asm \
1827 r0drv/os2/RTR0Os2DHVMGlobalToProcess.asm \
1828 r0drv/os2/semevent-r0drv-os2.cpp \
1829 r0drv/os2/semeventmulti-r0drv-os2.cpp \
1830 r0drv/os2/semfastmutex-r0drv-os2.cpp \
1831 r0drv/os2/spinlock-r0drv-os2.cpp \
1832 r0drv/os2/thread-r0drv-os2.cpp \
1833 r0drv/os2/thread2-r0drv-os2.cpp \
1834 r0drv/os2/time-r0drv-os2.cpp \
1835 r0drv/os2/timer-r0drv-os2.cpp \
1836 r0drv/os2/timerA-r0drv-os2.asm
1837
1838RuntimeR0Drv_SOURCES.freebsd = \
1839 common/misc/thread.cpp \
1840 common/string/memchr.asm \
1841 common/string/memmove.asm \
1842 common/string/strpbrk.cpp \
1843 common/string/memcmp.asm \
1844 common/string/strchr.asm \
1845 generic/RTAssertShouldPanic-generic.cpp \
1846 generic/RTLogWriteDebugger-generic.cpp \
1847 generic/RTLogWriteStdOut-stub-generic.cpp \
1848 generic/RTTimerCreate-generic.cpp \
1849 generic/mppresent-generic.cpp \
1850 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
1851 r0drv/generic/mpnotification-r0drv-generic.cpp \
1852 r0drv/freebsd/alloc-r0drv-freebsd.c \
1853 r0drv/freebsd/assert-r0drv-freebsd.c \
1854 r0drv/freebsd/initterm-r0drv-freebsd.c \
1855 r0drv/freebsd/memobj-r0drv-freebsd.c \
1856 r0drv/freebsd/memuserkernel-r0drv-freebsd.c \
1857 r0drv/freebsd/process-r0drv-freebsd.c \
1858 r0drv/freebsd/semevent-r0drv-freebsd.c \
1859 r0drv/freebsd/semeventmulti-r0drv-freebsd.c \
1860 r0drv/freebsd/semfastmutex-r0drv-freebsd.c \
1861 r0drv/freebsd/semmutex-r0drv-freebsd.c \
1862 r0drv/freebsd/spinlock-r0drv-freebsd.c \
1863 r0drv/freebsd/thread-r0drv-freebsd.c \
1864 r0drv/freebsd/thread2-r0drv-freebsd.c \
1865 r0drv/freebsd/time-r0drv-freebsd.c \
1866 r0drv/freebsd/mp-r0drv-freebsd.c \
1867 generic/timer-generic.cpp \
1868 r0drv/memobj-r0drv.cpp \
1869 r0drv/powernotification-r0drv.c
1870
1871RuntimeR0Drv_SOURCES.solaris = \
1872 common/misc/thread.cpp \
1873 common/string/memchr.asm \
1874 generic/RTAssertShouldPanic-generic.cpp \
1875 generic/RTLogWriteStdOut-stub-generic.cpp \
1876 generic/RTTimerCreate-generic.cpp \
1877 generic/mppresent-generic.cpp \
1878 r0drv/memobj-r0drv.cpp \
1879 r0drv/mpnotification-r0drv.c \
1880 r0drv/powernotification-r0drv.c \
1881 r0drv/solaris/RTLogWriteDebugger-r0drv-solaris.c \
1882 r0drv/solaris/RTMpPokeCpu-r0drv-solaris.c \
1883 r0drv/solaris/alloc-r0drv-solaris.c \
1884 r0drv/solaris/assert-r0drv-solaris.c \
1885 r0drv/solaris/dbgkrnlinfo-r0drv-solaris.c \
1886 r0drv/solaris/initterm-r0drv-solaris.c \
1887 r0drv/solaris/memuserkernel-r0drv-solaris.c \
1888 r0drv/solaris/mpnotification-r0drv-solaris.c \
1889 r0drv/solaris/memobj-r0drv-solaris.c \
1890 r0drv/solaris/mp-r0drv-solaris.c \
1891 r0drv/solaris/process-r0drv-solaris.c \
1892 r0drv/solaris/semevent-r0drv-solaris.c \
1893 r0drv/solaris/semeventmulti-r0drv-solaris.c \
1894 r0drv/solaris/semfastmutex-r0drv-solaris.c \
1895 r0drv/solaris/semmutex-r0drv-solaris.c \
1896 r0drv/solaris/spinlock-r0drv-solaris.c \
1897 r0drv/solaris/thread-r0drv-solaris.c \
1898 r0drv/solaris/thread2-r0drv-solaris.c \
1899 r0drv/solaris/time-r0drv-solaris.c \
1900 r0drv/solaris/timer-r0drv-solaris.c
1901
1902RuntimeR0Drv_SOURCES.haiku = \
1903 common/misc/thread.cpp \
1904 common/string/memchr.asm \
1905 common/string/memmove.asm \
1906 common/string/strpbrk.cpp \
1907 common/string/memcmp.asm \
1908 common/string/strchr.asm \
1909 generic/RTAssertShouldPanic-generic.cpp \
1910 generic/RTTimerCreate-generic.cpp \
1911 generic/mppresent-generic.cpp \
1912 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
1913 r0drv/generic/mpnotification-r0drv-generic.cpp \
1914 r0drv/haiku/alloc-r0drv-haiku.c \
1915 r0drv/haiku/assert-r0drv-haiku.c \
1916 r0drv/haiku/initterm-r0drv-haiku.c \
1917 r0drv/haiku/memobj-r0drv-haiku.c \
1918 r0drv/haiku/mp-r0drv-haiku.c \
1919 r0drv/haiku/process-r0drv-haiku.c \
1920 r0drv/haiku/RTLogWriteDebugger-r0drv-haiku.c \
1921 r0drv/haiku/RTLogWriteStdOut-r0drv-haiku.c \
1922 r0drv/haiku/semevent-r0drv-haiku.c \
1923 r0drv/haiku/semeventmulti-r0drv-haiku.c \
1924 r0drv/haiku/semfastmutex-r0drv-haiku.c \
1925 r0drv/haiku/semmutex-r0drv-haiku.c \
1926 r0drv/haiku/spinlock-r0drv-haiku.c \
1927 r0drv/haiku/thread-r0drv-haiku.c \
1928 r0drv/haiku/thread2-r0drv-haiku.c \
1929 r0drv/haiku/time-r0drv-haiku.c \
1930 generic/timer-generic.cpp \
1931 r0drv/memobj-r0drv.cpp \
1932 r0drv/powernotification-r0drv.c
1933
1934## PORTME: Porters create and add their selection of platform specific Ring-0 Driver files here.
1935
1936RuntimeR0Drv_ORDERDEPS.freebsd = \
1937 $(PATH_STAGE)/gen-sys-hdrs/bus_if.h \
1938 $(PATH_STAGE)/gen-sys-hdrs/device_if.h
1939
1940
1941#
1942# RuntimeGuestR0 - Guest driver runtime.
1943# This is almost the same as the RuntimeR0Drv, the main difference
1944# is in the backdoor logging and the lack of sup.h (which should be
1945# made irrelevant even for RuntimeR0Drv).
1946#
1947RuntimeGuestR0_TEMPLATE := VBOXGUESTR0LIB
1948RuntimeGuestR0_EXTENDS = RuntimeR0Drv
1949RuntimeGuestR0_SOURCES := $(filter-out generic/RTLogWriteUser-generic.cpp, $(RuntimeR0Drv_SOURCES))
1950RuntimeGuestR0_SOURCES += \
1951 VBox/logbackdoor.cpp
1952
1953
1954#
1955# RuntimeGuestR0NT4 - Win32 NT4 guest driver runtime.
1956#
1957RuntimeGuestR0NT4_EXTENDS = RuntimeGuestR0
1958RuntimeGuestR0NT4_EXTENDS_BY = appending
1959RuntimeGuestR0NT4_DEFS = IPRT_TARGET_NT4
1960
1961
1962ifdef VBOX_WITH_RAW_MODE
1963 #
1964 # RuntimeRC - Raw-mode context library.
1965 #
1966 RuntimeRC_TEMPLATE = VBoxRc
1967 RuntimeRC_DEFS = IN_RT_RC RT_WITH_VBOX
1968 RuntimeRC_INCS = include
1969 RuntimeRC_SOURCES := \
1970 common/checksum/crc32.cpp \
1971 common/checksum/crc64.cpp \
1972 common/checksum/md5.cpp \
1973 common/log/log.cpp \
1974 common/log/logellipsis.cpp \
1975 common/log/logrel.cpp \
1976 common/log/logrelellipsis.cpp \
1977 common/log/logcom.cpp \
1978 common/log/logformat.cpp \
1979 common/log/tracebuf.cpp \
1980 common/log/tracedefault.cpp \
1981 common/misc/RTAssertMsg1Weak.cpp \
1982 common/misc/RTAssertMsg2.cpp \
1983 common/misc/RTAssertMsg2Add.cpp \
1984 common/misc/RTAssertMsg2AddWeak.cpp \
1985 common/misc/RTAssertMsg2AddWeakV.cpp \
1986 common/misc/RTAssertMsg2Weak.cpp \
1987 common/misc/RTAssertMsg2WeakV.cpp \
1988 common/misc/assert.cpp \
1989 common/misc/buildconfig.cpp \
1990 common/misc/sanity-c.c \
1991 common/misc/sanity-cpp.cpp \
1992 common/path/RTPathFilename.cpp \
1993 common/string/strformat.cpp \
1994 common/string/strformatnum.cpp \
1995 common/string/strformatrt.cpp \
1996 common/string/strformattype.cpp \
1997 common/string/strncmp.cpp \
1998 common/string/strpbrk.cpp \
1999 common/string/strprintf.cpp \
2000 common/string/RTStrCopy.cpp \
2001 common/string/RTStrCopyEx.cpp \
2002 common/table/avllu32.cpp \
2003 common/table/avlou32.cpp \
2004 common/table/avlogcphys.cpp \
2005 common/table/avlogcptr.cpp \
2006 common/table/avlohcphys.cpp \
2007 common/table/avloioport.cpp \
2008 common/table/avlrogcphys.cpp \
2009 common/table/avlrogcptr.cpp \
2010 common/table/avlroioport.cpp \
2011 common/table/avlroogcptr.cpp \
2012 common/table/avlu32.cpp \
2013 common/time/timeprog.cpp \
2014 common/time/timesup.cpp \
2015 gc/initterm-gc.cpp \
2016 generic/RTAssertShouldPanic-generic.cpp \
2017 generic/errvars-generic.cpp \
2018 \
2019 $(RuntimeNoCrt_SOURCES)
2020
2021 #if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
2022 # RuntimeRC_SOURCES += common/time/timesupA.asm
2023 #else
2024 RuntimeRC_SOURCES += common/time/timesupref.cpp
2025 #endif
2026
2027 RuntimeRC_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
2028
2029 ifeq ($(VBOX_LDR_FMT32),lx)
2030 RuntimeRC_SOURCES += os2/sys0.asm
2031 endif
2032
2033 if1of ($(KBUILD_TARGET), darwin solaris freebsd)
2034 RuntimeRC_SOURCES += \
2035 common/math/gcc/adddi3.c \
2036 common/math/gcc/anddi3.c \
2037 common/math/gcc/ashldi3.c \
2038 common/math/gcc/ashrdi3.c \
2039 common/math/gcc/cmpdi2.c \
2040 common/math/gcc/divdi3.c \
2041 common/math/gcc/iordi3.c \
2042 common/math/gcc/lshldi3.c \
2043 common/math/gcc/lshrdi3.c \
2044 common/math/gcc/moddi3.c \
2045 common/math/gcc/muldi3.c \
2046 common/math/gcc/negdi2.c \
2047 common/math/gcc/notdi2.c \
2048 common/math/gcc/qdivrem.c \
2049 common/math/gcc/subdi3.c \
2050 common/math/gcc/ucmpdi2.c \
2051 common/math/gcc/udivdi3.c \
2052 common/math/gcc/umoddi3.c \
2053 common/math/gcc/xordi3.c
2054 endif
2055
2056
2057 #
2058 # RuntimeRCStub - Raw-mode context startup stub for Windows.
2059 #
2060 RuntimeRCStub_TEMPLATE = VBoxRc
2061 RuntimeRCStub_SOURCES.win = \
2062 nt/NtProcessStartup-stub.cpp
2063
2064
2065endif # VBOX_WITH_RAW_MODE
2066
2067
2068#
2069# Static library for new & delete for the electric fence.
2070#
2071RuntimeEFCPP_TEMPLATE := $(VBoxRT_TEMPLATE)
2072RuntimeEFCPP_SDKS := $(RuntimeR3_SDKS)
2073RuntimeEFCPP_SDKS.$(KBUILD_TARGET) := $(RuntimeR3_SDKS.$(KBUILD_TARGET))
2074RuntimeEFCPP_DEFS := $(RuntimeR3_DEFS)
2075RuntimeEFCPP_DEFS.$(KBUILD_TARGET) := $(RuntimeR3_DEFS.$(KBUILD_TARGET))
2076RuntimeEFCPP_INCS := $(RuntimeR3_INCS)
2077RuntimeEFCPP_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
2078RuntimeEFCPP_SOURCES := r3/alloc-ef-cpp.cpp
2079
2080
2081
2082#
2083# The NTDLL mini import library.
2084#
2085# Note! The reason for doing this is to avoid importing CRT symbols from the
2086# NTDLL. We do not wish to do this because:
2087# - Our compiler is usually a different one and we should use the
2088# matching CRT,
2089# - Older versions of NTDLL may not sport all the exports our w2k3 or
2090# later WINDDK ntdll.lib have and thus we may easily end up with
2091# images that does not load on older windows versions.
2092#
2093RuntimeR3NtDll-amd64_TEMPLATE = VBoxR3Dll
2094RuntimeR3NtDll-amd64_BLD_TRG_ARCH = amd64
2095RuntimeR3NtDll-amd64_ARFLAGS = /NODEFAULTLIB /MACHINE:amd64
2096RuntimeR3NtDll-amd64_SOURCES = \
2097 r3/win/ntdll-mini-implib.c \
2098 r3/win/ntdll-mini-implib.def
2099
2100RuntimeR3NtDll-x86_EXTENDS = RuntimeR3NtDll-amd64
2101RuntimeR3NtDll-x86_BLD_TRG_ARCH = x86
2102RuntimeR3NtDll-x86_ARFLAGS = /NODEFAULTLIB /MACHINE:x86
2103
2104
2105#
2106# Bag of tricks required for making VCC100 output binaries work on NT4, W2K
2107# early XP and early W2K3.
2108#
2109RuntimeR3VccTricks_TEMPLATE = VBoxR3Dll
2110RuntimeR3VccTricks_SOURCES = \
2111 r3/win/vcc100-kernel32-fakes.cpp \
2112 r3/win/vcc100-kernel32-fakesA.asm
2113
2114
2115#
2116# errmsg.cpp depends on a generated header.
2117#
2118common/err/errmsg.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgdata.h
2119common/err/errmsg.cpp_INCS = $(IPRT_OUT_DIR)
2120
2121win/errmsgwin.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgcomdata.h
2122win/errmsgwin.cpp_INCS = $(IPRT_OUT_DIR)
2123
2124# Our COM errors only for R3 libraries on the host
2125define def_errmsgwin_deps
2126 $(lib)_win/errmsgwin.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
2127 $(lib)_common/err/errmsgxpcom.cpp_INCS = $(IPRT_OUT_DIR)
2128 $(lib)_common/err/errmsgxpcom.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
2129endef
2130$(foreach lib,RuntimeR3 RuntimeBldProg VBoxRT,$(eval $(def_errmsgwin_deps)))
2131
2132
2133#
2134# Generate the status code data.
2135#
2136$(IPRT_OUT_DIR)/errmsgdata.h: \
2137 $(VBOX_PATH_RUNTIME_SRC)/common/err/errmsg.sed \
2138 $(PATH_ROOT)/include/iprt/err.h \
2139 $(PATH_ROOT)/include/VBox/err.h \
2140 | $$(dir $$@)
2141 $(call MSG_GENERATE,,$@,$(filter %.h,$^))
2142 $(QUIET)$(REDIRECT) -wo $@ -- $(SED) -f $< $(filter %.h,$^)
2143
2144## @todo r=bird: rename this to indicate that it's not only COM errors, but all win32/64 errors.
2145$(IPRT_OUT_DIR)/errmsgcomdata.h: \
2146 $(VBOX_PATH_RUNTIME_SRC)/common/err/errmsgcom.sed \
2147 $$(PATH_SDK_$(VBOX_WINPSDK)_INC)/WinError.h \
2148 | $$(dir $$@)
2149 $(call MSG_GENERATE,,$@,$(filter %.h,$^))
2150 $(QUIET)$(REDIRECT) -wo $@ -- $(SED) -f $< $(filter %.h,$^)
2151
2152$(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts +| $(IPRT_OUT_DIR)/errmsgvboxcomdata.h: \
2153 $(VBOX_PATH_RUNTIME_SRC)/VBox/errmsgvboxcom.xsl \
2154 $(VBOX_XIDL_FILE_SRC) \
2155 | $$(dir $$@)
2156 $(call MSG_GENERATE,,$@,$(filter %.xidl,$^))
2157 $(QUIET)$(VBOX_XSLTPROC) -o $(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts $< $(filter %.xidl,$^)
2158 $(QUIET)$(CP) --changed -fv $(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
2159
2160
2161if "$(KBUILD_TARGET)" == "freebsd"
2162#
2163# FreeBSDGeneratedKernelHeaders - Generate some kernel interface headers.
2164#
2165# These are used by:
2166# - The RTMp* API in IPRT.
2167# - VBoxGuest
2168#
2169# Note! We cannot give a output path to the awk program, it will always
2170# generate the header next to the source. So, we'll have to temporarily copy
2171# the source file to the destination directory to work.
2172#
2173VBOX_AWK := /usr/bin/awk
2174INSTALLS += FreeBSDGeneratedKernelHeaders
2175FreeBSDGeneratedKernelHeaders_INST = gen-sys-hdrs/
2176FreeBSDGeneratedKernelHeaders_SOURCES = \
2177 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/bus_if.h \
2178 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/device_if.h \
2179 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/pci_if.h
2180FreeBSDGeneratedKernelHeaders_CLEAN = $(FreeBSDGeneratedKernelHeaders_SOURCES)
2181
2182$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/bus_if.h: $(VBOX_FREEBSD_SRC)/kern/bus_if.m | $$(dir $$@)
2183 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
2184 $(QUIET)$(CP) -f $< $(@D)/bus_if.m
2185 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/bus_if.m -h -p
2186 $(QUIET)$(RM) $(@D)/bus_if.m
2187
2188$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/device_if.h: $(VBOX_FREEBSD_SRC)/kern/device_if.m | $$(dir $$@)
2189 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
2190 $(QUIET)$(CP) -f $< $(@D)/device_if.m
2191 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/device_if.m -h -p
2192 $(QUIET)$(RM) $(@D)/device_if.m
2193
2194$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/pci_if.h: $(VBOX_FREEBSD_SRC)/dev/pci/pci_if.m | $$(dir $$@)
2195 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
2196 $(QUIET)$(CP) -f $< $(@D)/pci_if.m
2197 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/pci_if.m -h -p
2198 $(QUIET)$(RM) $(@D)/pci_if.m
2199endif # FreeBSD
2200
2201
2202#
2203# Aliases for .cpp.h files so we can more easily do syntax checking from the editor.
2204#
2205ldrELFRelocatable.cpp.o: ldrELF.o
2206ldrELFRelocatable.cpp.obj: ldrELF.obj
2207
2208
2209#
2210# Doxygen documentation.
2211#
2212IPRT_DOXYFILE_INPUT_DIRS = \
2213 $(PATH_ROOT)/include/iprt \
2214 $(PATH_ROOT)/include/iprt/cpp \
2215 $(PATH_ROOT)/include/iprt/linux \
2216 $(PATH_ROOT)/include/iprt/nocrt \
2217 $(PATH_ROOT)/include/iprt/nocrt/x86 \
2218 $(PATH_ROOT)/include/iprt/nocrt/amd64 \
2219 $(PATH_ROOT)/include/iprt/nocrt/compiler \
2220 $(VBOX_PATH_RUNTIME_SRC)/include/internal \
2221 $(VBOX_PATH_RUNTIME_SRC)/common/alloc \
2222 $(VBOX_PATH_RUNTIME_SRC)/common/asm \
2223 $(VBOX_PATH_RUNTIME_SRC)/common/checksum \
2224 $(VBOX_PATH_RUNTIME_SRC)/common/dbg \
2225 $(VBOX_PATH_RUNTIME_SRC)/common/err \
2226 $(VBOX_PATH_RUNTIME_SRC)/common/ldr \
2227 $(VBOX_PATH_RUNTIME_SRC)/common/log \
2228 $(VBOX_PATH_RUNTIME_SRC)/common/math \
2229 $(VBOX_PATH_RUNTIME_SRC)/common/math/amd64 \
2230 $(VBOX_PATH_RUNTIME_SRC)/common/math/gcc \
2231 $(VBOX_PATH_RUNTIME_SRC)/common/math/x86 \
2232 $(VBOX_PATH_RUNTIME_SRC)/common/misc \
2233 $(VBOX_PATH_RUNTIME_SRC)/common/path \
2234 $(VBOX_PATH_RUNTIME_SRC)/common/rand \
2235 $(VBOX_PATH_RUNTIME_SRC)/common/string \
2236 $(VBOX_PATH_RUNTIME_SRC)/common/table \
2237 $(VBOX_PATH_RUNTIME_SRC)/common/time \
2238 $(VBOX_PATH_RUNTIME_SRC)/VBox \
2239 $(foreach dir, $(VBOX_PATH_RUNTIME_SRC) $(VBOX_PATH_RUNTIME_SRC)/r3 $(VBOX_PATH_RUNTIME_SRC)/r0drv,\
2240 $(dir) \
2241 $(dir)/darwin \
2242 $(dir)/haiku \
2243 $(dir)/linux \
2244 $(dir)/nt \
2245 $(dir)/os2 \
2246 $(dir)/solaris \
2247 $(dir)/win \
2248 $(dir)/win32 \
2249 $(dir)/win64 \
2250 $(dir)/generic \
2251 )
2252
2253# These must come first in order to make things look nice.
2254IPRT_DOXYFILE_INPUT_FIRST =\
2255 $(PATH_ROOT)/include/iprt/cdefs.h \
2256 $(PATH_ROOT)/include/iprt/types.h \
2257 $(PATH_ROOT)/include/iprt/runtime.h \
2258 $(PATH_ROOT)/include/iprt/param.h \
2259 $(PATH_ROOT)/include/iprt/assert.h \
2260 $(PATH_ROOT)/include/iprt/asm.h \
2261
2262IPRT_DOXYFILE_INPUT := \
2263 $(filter-out %.cpp.h, $(sort $(wildcard $(addsuffix /*.h, $(IPRT_DOXYFILE_INPUT_DIRS)))) ) \
2264 $(foreach dir, $(IPRT_DOXYFILE_INPUT_DIRS), $(wildcard $(dir)/*.cpp $(dir)/.c $(dir)/.asm))
2265IPRT_DOXYFILE_INPUT := \
2266 $(IPRT_DOXYFILE_INPUT_FIRST) \
2267 $(filter-out $(IPRT_DOXYFILE_INPUT_FIRST), $(IPRT_DOXYFILE_INPUT))
2268
2269
2270IPRT_DOXYFILE_OUTPUT = $(PATH_OUT)/docs/iprt
2271BLDDIRS += $(IPRT_DOXYFILE_OUTPUT)
2272
2273includedep $(IPRT_OUT_DIR)/Doxyfile.iprt.dep
2274
2275# Generate the Doxyfile
2276$(IPRT_OUT_DIR)/Doxyfile.iprt: \
2277 $(VBOX_PATH_RUNTIME_SRC)/Doxyfile \
2278 $(VBOX_PATH_RUNTIME_SRC)/Makefile.kmk \
2279 $(comp-vars IPRT_DOXYFILE_INPUT,DOXYGEN_INPUT_PREV,FORCE) \
2280 $(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE) \
2281 | $$(dir $$@)
2282 $(RM) -f $@ [email protected] [email protected]
2283 $(CP) -f $(VBOX_PATH_RUNTIME_SRC)/Doxyfile [email protected]
2284 $(APPEND) [email protected]
2285 $(APPEND) [email protected] "OUTPUT_DIRECTORY = $(IPRT_DOXYFILE_OUTPUT)"
2286 $(APPEND) [email protected] "WARN_LOGFILE = $(IPRT_DOXYFILE_OUTPUT)/errors"
2287 $(APPEND) [email protected] "INCLUDE_PATH = $(PATH_ROOT)/include include . common/table"
2288 $(APPEND) [email protected] "INCLUDE_FILE_PATTERNS = *.cpp.h"
2289 $(APPEND) [email protected] "PREDEFINED += $(ARCH_BITS_DEFS)"
2290 $(APPEND) [email protected]
2291 $(APPEND) [email protected] "INPUT = $(IPRT_DOXYFILE_INPUT)"
2292 $(APPEND) [email protected]
2293 $(MV) -f [email protected] $@
2294 @$(APPEND) [email protected] "DOXYGEN_OUTPUT_PREV = $(IPRT_DOXYFILE_OUTPUT)"
2295 @$(APPEND) [email protected] "DOXYGEN_INPUT_PREV = $(IPRT_DOXYFILE_INPUT)"
2296
2297# Do the actual job.
2298$(IPRT_OUT_DIR)/docs.iprt: $(IPRT_OUT_DIR)/Doxyfile.iprt $$(IPRT_DOXYFILE_INPUT) | $(IPRT_DOXYFILE_OUTPUT)/
2299 $(RM) -f $(wildcard $(IPRT_DOXYFILE_OUTPUT)/html/*) $(IPRT_OUT_DIR)/docs.iprt
2300 doxygen $(IPRT_OUT_DIR)/Doxyfile.iprt
2301 $(APPEND) $(IPRT_OUT_DIR)/docs.iprt
2302
2303# aliases
2304docs.iprt: $(IPRT_OUT_DIR)/docs.iprt
2305if !defined(VBOX_ONLY_DOCS) && defined(VBOX_WITH_ALL_DOXYGEN_TARGETS)
2306docs: $(IPRT_OUT_DIR)/docs.iprt
2307endif
2308
2309test-doxygen::
2310 @echo test-$(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE)
2311 @echo $(IPRT_DOXYFILE_OUTPUT)
2312 @echo $(DOXYGEN_OUTPUT_PREV)
2313 @echo $(IPRT_DOXYFILE_INPUT)
2314
2315
2316#
2317# Test mangling.
2318#
2319if1of ($(LIBRARIES),RuntimeR3 RuntimeR0 RuntimeR0Drv RuntimeRC)
2320 test-mangling:: $(IPRT_OUT_DIR)/mangling.run
2321 OTHERS += $(IPRT_OUT_DIR)/mangling.run
2322 CLEANS += $(IPRT_OUT_DIR)/mangling.run
2323 $(IPRT_OUT_DIR)/mangling.run: \
2324 $$(RuntimeR3_1_TARGET) \
2325 $$(RuntimeR0_1_TARGET) \
2326 $$(RuntimeR0Drv_1_TARGET) \
2327 $$(RuntimeRC_1_TARGET)
2328 if1of ($(KBUILD_TARGET), win os2)
2329 $(call MSG_L1,IPRT: skipped mangling test.)
2330 else
2331# Generate a SED script from mangling.h that checks for known symbols.
2332 @$(SED) \
2333 -e '/# *define.*RT_MANGLER/!d' \
2334 -e 's/^.*RT_MANGLER(\([^)][^)]*\)).*$(DOLLAR)/\/^\1$(DOLLAR)\/b ok/' \
2335 $(PATH_ROOT)/include/iprt/mangling.h \
2336 --output "$@"
2337 @$(APPEND) -n '$@' \
2338 ':bad' \
2339 's/^\(.*\)$(DOLLAR)/error: Missing # define \1 RT_MANGLER(\1)/' \
2340 'p' \
2341 'q 1' \
2342 '' \
2343 ':ok' \
2344 'd'
2345# Find the best way to generate a symbol list and subject it to mangling.h.
2346 if $(intersects $(KBUILD_TARGET), linux) && "$(VBOX_GCC_fvisibility-hidden)"
2347 $(call MSG_L1,IPRT: Testing mangling and visiblity...)
2348 @readelf -Ws $^ \
2349 | $(SED) \
2350 -e '/^ *[[:digit:]]\+:/!d' \
2351 -e 's/^ \+[[:digit:]]\+: \+[[:xdigit:]]\+ \+[[:digit:]]\+ \+//' \
2352 -e '/^SECTION/d' \
2353 -e '/^FILE/d' \
2354 -e 's/^[[:alpha:]]\+ \+//' \
2355 -e '/LOCAL/d' \
2356 -e 's/^[[:alpha:]]\+ \+//' \
2357 -e '/^HIDDEN/d' \
2358 -e 's/^[[:alpha:]]\+ \+//' \
2359 -e '/^UND/d' \
2360 -e 's/^[[:digit:]]\+ \+//' \
2361 \
2362 -e '/^nocrt_/d' \
2363 -e '/^memchr/d' \
2364 -e '/^memcmp/d' \
2365 -e '/^memcpy/d' \
2366 -e '/^mempcpy/d' \
2367 -e '/^memmove/d' \
2368 -e '/^memset/d' \
2369 -e '/^strchr/d' \
2370 -e '/^strpbrk/d' \
2371 -e '/^_Z7strpbrk/d' \
2372 -e '/^strcmp/d' \
2373 -e '/^strcpy/d' \
2374 -e '/^strncpy/d' \
2375 -e '/^strlen/d' \
2376 -e '/^_Z[[:alpha:]]*[[:digit:]]\+RTC/d' \
2377 \
2378 -e '/^_ZNSt9bad_allocC1Ev/d' \
2379 -e '/^_ZNSt9exceptionC2Ev/d' \
2380 \
2381 -e '/^_Z[[:digit:]]\+dbus/d' \
2382 -e '/^_Z13RTDBusLoadLibv/d' \
2383 \
2384 -e '/^VBoxHost_/d'\
2385 -e '/^VBoxGuest_/d'\
2386 | $(SED) -nf "$@"
2387 else
2388 $(call MSG_L1,IPRT: Testing mangling...)
2389 nm $^ | $(SED) -n \
2390 -e 's/^[0-9a-f][0-9a-f]* //' \
2391 -e '/^[TUDB] /!d' \
2392 -e 's/^. //' \
2393 \
2394 -e '/^g_cchrt/d'\
2395 -e '/^g_frt/d'\
2396 -e '/^g_offrt/d'\
2397 -e '/^g_pfnrt/d'\
2398 -e '/^g_rt/d'\
2399 -e '/^g_szrt/d'\
2400 -e '/^g_ProcessSelf/d'\
2401 -e '/^g_u64ProgramStart/d'\
2402 -e '/^g_enmProcessPriority/d'\
2403 -e '/^g_hDbgModStrCache/d'\
2404 \
2405 -e '/^RTDBusLoadLib/d' \
2406 \
2407 -e '/^RT/p' \
2408 -e '/^g_/p' \
2409 | $(SED) -nf "$@"
2410 endif
2411 endif
2412endif
2413 $(QUIET)$(APPEND) -t $@
2414
2415if !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_TESTSUITE) && !defined(VBOX_ONLY_DOCS)
2416#
2417# Windows build tool.
2418#
2419BLDPROGS.win += ntBldSymDb
2420ntBldSymDb_TEMPLATE = VBoxAdvBldProg
2421ntBldSymDb_INCS = .
2422ntBldSymDb_SOURCES = r0drv/nt/ntBldSymDb.cpp
2423endif
2424
2425#
2426# Generate the rules (we're the to sub-makefile).
2427#
2428include $(FILE_KBUILD_SUB_FOOTER)
2429
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