VirtualBox

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

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

Added IPRT_WITH_HTTP to the IPRT build so we know when RTHttp is available.

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