VirtualBox

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

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

RTDbgCfg: Debugging configuration, like symbol search paths and such.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 79.7 KB
Line 
1# $Id: Makefile.kmk 45984 2013-05-11 12:46:30Z 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 LIBRARIES.l4 += RuntimeR3L4 RuntimeLnxHostR3
98 DLLS += VBoxRT
99endif
100
101
102# Always build the ntdll import libraries on windows.
103LIBRARIES.win += RuntimeR3NtDll-x86
104if1of (amd64, $(KBUILD_TARGET_ARCH) $(KBUILD_HOST_ARCH))
105 LIBRARIES.win += RuntimeR3NtDll-amd64
106endif
107
108
109# Always build the import library.
110IMPORT_LIBS += VBoxRTImp
111
112
113# Where the generated stuff goes.
114IPRT_OUT_DIR := $(PATH_TARGET)/Runtime
115BLDDIRS += $(IPRT_OUT_DIR)
116OTHER_CLEAN += \
117 $(IPRT_OUT_DIR)/errmsgdata.h \
118 $(IPRT_OUT_DIR)/errmsgcomdata.h \
119 $(IPRT_OUT_DIR)/errmsgvboxcomdata.h \
120 $(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts \
121 $(IPRT_OUT_DIR)/Doxyfile.iprt \
122 $(IPRT_OUT_DIR)/Doxyfile.iprt.dep \
123 $(IPRT_OUT_DIR)/docs.iprt
124
125
126#
127# Globals
128#
129VBOX_PATH_RUNTIME_SRC := $(PATH_SUB_CURRENT)
130
131
132#
133# Set the defines that buildconfig.cpp needs. Its used by several targets.
134#
135common/misc/buildconfig.cpp_DEFS = \
136 IPRT_BLDCFG_SCM_REV=$(VBOX_SVN_REV) \
137 IPRT_BLDCFG_VERSION_STRING=\"$(VBOX_VERSION_STRING)\" \
138 IPRT_BLDCFG_VERSION_MAJOR=$(VBOX_VERSION_MAJOR) \
139 IPRT_BLDCFG_VERSION_MINOR=$(VBOX_VERSION_MINOR) \
140 IPRT_BLDCFG_VERSION_BUILD=$(VBOX_VERSION_BUILD) \
141 IPRT_BLDCFG_TARGET=\"$(KBUILD_TARGET)\" \
142 IPRT_BLDCFG_TARGET_ARCH=\"$(KBUILD_TARGET_ARCH)\" \
143 IPRT_BLDCFG_TYPE=\"$(KBUILD_TYPE)\"
144
145#
146# Unicode Specification reader used to regenerate unidata.cpp.
147#
148uniread_TEMPLATE = VBOXBLDPROG
149uniread_SOURCES = common/string/uniread.cpp
150uniread_INCS = include
151
152#
153# Win64 assembly sources.
154#
155RuntimeWin64ASM_SOURCES = \
156 win/amd64/ASMAtomicBitClear.asm \
157 win/amd64/ASMAtomicBitTestAndToggle.asm \
158 win/amd64/ASMAtomicBitToggle.asm \
159 win/amd64/ASMAtomicReadU64.asm \
160 win/amd64/ASMAtomicXchgU16.asm \
161 win/amd64/ASMAtomicXchgU8.asm \
162 win/amd64/ASMBitFirstClear.asm \
163 win/amd64/ASMBitFirstSet.asm \
164 win/amd64/ASMGetCS.asm \
165 win/amd64/ASMGetDS.asm \
166 win/amd64/ASMGetES.asm \
167 win/amd64/ASMGetFlags.asm \
168 win/amd64/ASMGetFS.asm \
169 win/amd64/ASMGetGS.asm \
170 win/amd64/ASMGetIDTR.asm \
171 win/amd64/ASMGetGDTR.asm \
172 win/amd64/ASMGetTR.asm \
173 win/amd64/ASMGetSS.asm \
174 win/amd64/ASMProbeReadByte.asm \
175 win/amd64/ASMSetFlags.asm \
176 win/amd64/ASMGetDR0.asm \
177 win/amd64/ASMGetDR1.asm \
178 win/amd64/ASMGetDR2.asm \
179 win/amd64/ASMGetDR3.asm \
180 win/amd64/ASMGetDR6.asm \
181 win/amd64/ASMGetDR7.asm \
182 common/asm/ASMAtomicCmpXchgU8.asm \
183 common/asm/ASMMultU64ByU32DivByU32.asm \
184 common/asm/ASMCpuId_Idx_ECX.asm \
185 common/asm/ASMNopPause.asm
186
187#
188# Win32 assembly sources.
189#
190RuntimeWin32ASM_SOURCES = \
191 common/asm/ASMAtomicCmpXchgU8.asm \
192 common/asm/ASMMultU64ByU32DivByU32.asm \
193 common/asm/ASMCpuId_Idx_ECX.asm
194
195#
196# NoCRT sources (minus math stuff).
197#
198if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
199RuntimeNoCrt_SOURCES = \
200 common/misc/setjmp.asm \
201 common/string/memchr.asm \
202 common/string/memcmp.asm \
203 common/string/memcpy.asm \
204 common/string/mempcpy.asm \
205 common/string/memmove.asm \
206 common/string/memset.asm \
207 common/string/strchr.asm \
208 common/string/strcpy.asm \
209 common/string/strncpy.asm \
210 common/string/strcmp.asm \
211 common/string/strlen.asm
212endif
213
214
215#
216# RuntimeR3 - Static Runtime for Ring-3 executables.
217#
218RuntimeR3_TEMPLATE = VBoxR3Static
219RuntimeR3_SDKS = VBOX_LIBXML2 VBOX_OPENSSL VBOX_BOOST ## @todo why is BOOST and XML2 here? r3/xml.cpp is not in this lib...
220RuntimeR3_SDKS.win = $(VBOX_WINPSDK) $(VBOX_WINDDK)
221RuntimeR3_DEFS = IN_RT_R3 IN_SUP_R3 LDR_WITH_NATIVE LDR_WITH_ELF32 LDR_WITH_PE RT_WITH_VBOX RT_NO_GIP
222#RuntimeR3_DEFS += RTMEM_WRAP_TO_EF_APIS
223ifdef IPRT_WITH_KSTUFF
224 RuntimeR3_DEFS += LDR_WITH_KLDR
225endif
226ifdef IPRT_WITH_LZJB
227 RuntimeR3_DEFS += RTZIP_USE_LZJB
228endif
229ifdef IPRT_WITH_LZO
230 RuntimeR3_DEFS += RTZIP_USE_LZO
231endif
232ifn1of ($(KBUILD_TARGET), win)
233 RuntimeR3_DEFS += RT_WITH_ICONV_CACHE
234endif
235ifdef IPRT_WITH_FUTEX_BASED_SEMS
236 RuntimeR3_DEFS.linux += IPRT_WITH_FUTEX_BASED_SEMS
237endif
238RuntimeR3_INCS = \
239 include \
240 $(SDK_VBOX_ZLIB_INCS)
241RuntimeR3_INCS += \
242 $(PATH_ROOT)/src/libs/liblzf-3.4
243ifdef IPRT_WITH_KSTUFF
244 RuntimeR3_INCS += \
245 $(PATH_ROOT)/src/libs/kStuff/kStuff/include
246endif
247RuntimeR3_INCS.l4 = \
248 $(L4_INCDIR)
249
250# RuntimeR3_INCS.solaris = \
251# /usr/include
252
253RuntimeR3_SOURCES = \
254 common/alloc/alloc.cpp \
255 common/alloc/heapsimple.cpp \
256 common/alloc/heapoffset.cpp \
257 common/alloc/memcache.cpp \
258 common/alloc/memtracker.cpp \
259 common/checksum/adler32.cpp \
260 common/checksum/crc32.cpp \
261 common/checksum/crc64.cpp \
262 common/checksum/md5.cpp \
263 common/checksum/md5str.cpp \
264 common/checksum/ipv4.cpp \
265 common/checksum/ipv6.cpp \
266 common/checksum/manifest.cpp \
267 common/checksum/manifest2.cpp \
268 common/checksum/manifest3.cpp \
269 common/checksum/manifest-file.cpp \
270 common/checksum/RTSha1Digest.cpp \
271 common/checksum/RTSha256Digest.cpp \
272 common/checksum/sha1.cpp \
273 common/checksum/sha1str.cpp \
274 common/checksum/sha256.cpp \
275 common/checksum/sha256str.cpp \
276 common/checksum/sha512.cpp \
277 common/checksum/sha512str.cpp \
278 common/dbg/dbg.cpp \
279 common/dbg/dbgas.cpp \
280 common/dbg/dbgcfg.cpp \
281 common/dbg/dbgmod.cpp \
282 common/dbg/dbgmodcontainer.cpp \
283 common/dbg/dbgmoddwarf.cpp \
284 common/dbg/dbgmodldr.cpp \
285 common/dbg/dbgmodnm.cpp \
286 common/dvm/dvm.cpp \
287 common/dvm/dvmbsdlabel.cpp \
288 common/dvm/dvmgpt.cpp \
289 common/dvm/dvmmbr.cpp \
290 common/dvm/dvmvfs.cpp \
291 common/err/errinfo.cpp \
292 common/err/errmsg.cpp \
293 common/err/RTErrConvertFromErrno.cpp \
294 common/err/RTErrConvertToErrno.cpp \
295 common/filesystem/filesystem.cpp \
296 common/filesystem/filesystemext.cpp \
297 common/ldr/ldr.cpp \
298 common/ldr/ldrELF.cpp \
299 common/ldr/ldrEx.cpp \
300 common/ldr/ldrFile.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 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# L4 RuntimeR3 subtarget since L4 headers won't work with VBOXR3.
1024#
1025RuntimeR3L4_TEMPLATE = VBOXR3NP
1026RuntimeR3L4_DEFS = IN_RT_R3 IN_SUP_R3 LDR_WITH_NATIVE LDR_WITH_ELF LDR_WITH_PE
1027ifneq ($(KBUILD_TARGET_ARCH),amd64)
1028RuntimeR3L4_DEFS += __PIC__
1029endif
1030RuntimeR3L4_INCS = \
1031 include \
1032 $(L4_INCDIR)
1033
1034RuntimeR3L4_SOURCES = \
1035 generic/cdrom-generic.cpp \
1036 generic/errvars-generic.cpp \
1037 generic/fs-stubs-generic.cpp \
1038 generic/pathhost-generic.cpp \
1039 generic/RTDirQueryInfo-generic.cpp \
1040 generic/RTDirSetTimes-generic.cpp \
1041 generic/RTFileMove-generic.cpp \
1042 generic/RTLogWriteDebugger-generic.cpp \
1043 generic/RTProcDaemonize-generic.cpp \
1044 generic/RTSystemQueryOSInfo-generic.cpp \
1045 generic/RTSystemQueryDmiString-generic.cpp \
1046 generic/RTSystemShutdown-generic.cpp \
1047 generic/RTThreadGetAffinity-stub-generic.cpp \
1048 generic/RTThreadSetAffinity-stub-generic.cpp \
1049 generic/RTThreadSetAffinityToCpu-generic.cpp \
1050 generic/RTTimeLocalNow-generic.cpp \
1051 generic/RTUuidCreate-generic.cpp \
1052 generic/mppresent-generic.cpp \
1053 generic/sched-generic.cpp \
1054 generic/RTSemEventWait-generic.cpp \
1055 generic/RTSemEventMultiWait-generic.cpp \
1056 generic/RTSemMutexRequest-generic.cpp \
1057 generic/RTSemMutexRequestDebug-generic.cpp \
1058 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
1059 generic/utf16locale-generic.cpp \
1060 generic/uuid-generic.cpp \
1061 generic/RTProcIsRunningByName-generic.cpp \
1062 generic/RTThreadGetNativeState-generic.cpp \
1063 l4/l4-errno.cpp \
1064 l4/rtProcInitExePath-l4.cpp \
1065 l4/process-l4env.cpp \
1066 l4/sems-l4env.cpp \
1067 l4/thread-l4env.cpp \
1068 l4/timer-l4env.cpp \
1069 l4/utf8-l4env.cpp \
1070 r3/posix/RTFileQueryFsSizes-posix.cpp \
1071 r3/posix/RTMemProtect-posix.cpp \
1072 r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
1073 r3/posix/RTPathUserHome-posix.cpp \
1074 r3/posix/RTTimeNow-posix.cpp \
1075 r3/posix/RTTimeSet-posix.cpp \
1076 r3/posix/dir-posix.cpp \
1077 r3/posix/env-posix.cpp \
1078 r3/posix/fileio-posix.cpp \
1079 r3/posix/fileio2-posix.cpp \
1080 r3/posix/filelock-posix.cpp \
1081 r3/posix/ldrNative-posix.cpp \
1082 r3/posix/path-posix.cpp \
1083 r3/posix/path2-posix.cpp \
1084 r3/posix/RTPathUserDocuments-posix.cpp \
1085 r3/posix/rand-posix.cpp \
1086 r3/posix/time-posix.cpp \
1087 r3/posix/timelocal-posix.cpp
1088
1089
1090#
1091# RuntimeBldProg - Static Runtime for build programs.
1092#
1093# Note! This is a bit of hacky since kBuild doesn't support building libraries
1094# for build programs.
1095#
1096RuntimeBldProg_TEMPLATE := VBoxAdvBldProg
1097RuntimeBldProg_EXTENDS := RuntimeR3
1098RuntimeBldProg_BLD_TRG := $(KBUILD_HOST)
1099RuntimeBldProg_BLD_TRG_ARCH := $(KBUILD_HOST_ARCH)
1100RuntimeBldProg_BLD_TRG_CPU := $(KBUILD_HOST_CPU)
1101
1102
1103#
1104# RuntimeGuestR3 - Guest Additions Runtime (static/exe).
1105# (The KBUILD_HOST inheritance here is for l4 cross building the linux
1106# additions, while .x86 is for cross building x86 while targeting amd64.)
1107#
1108RuntimeGuestR3_TEMPLATE := VBoxGuestR3Lib
1109## @todo change this to EXTEND the RuntimeR3 target.
1110RuntimeGuestR3_SDKS.win := $(RuntimeR3_SDKS.win)
1111RuntimeGuestR3_DEFS := $(filter-out RTCRITSECT_STRICT RT_NO_GIP, $(RuntimeR3_DEFS))
1112RuntimeGuestR3_DEFS.$(KBUILD_TARGET) := $(RuntimeR3_DEFS.$(KBUILD_TARGET))
1113RuntimeGuestR3_DEFS.$(KBUILD_HOST) := $(RuntimeR3_DEFS.$(KBUILD_HOST))
1114RuntimeGuestR3_INCS := $(RuntimeR3_INCS)
1115RuntimeGuestR3_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
1116RuntimeGuestR3_INCS.$(KBUILD_HOST) := $(RuntimeR3_INCS.$(KBUILD_HOST))
1117RuntimeGuestR3_SOURCES := $(filter-out \
1118 common/time/timesupref.cpp \
1119 common/time/timesupA.asm \
1120 common/time/timesup.cpp \
1121 common/checksum/RTSha1Digest.cpp \
1122 common/checksum/RTSha256Digest.cpp \
1123 common/checksum/sha% \
1124 generic/RTLogWriteUser-generic.cpp \
1125 , $(RuntimeR3_SOURCES))
1126RuntimeGuestR3_SOURCES += \
1127 common/time/timesysalias.cpp \
1128 VBox/logbackdoor.cpp
1129RuntimeGuestR3_SOURCES.$(KBUILD_TARGET) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET))
1130RuntimeGuestR3_SOURCES.$(KBUILD_HOST) := $(RuntimeR3_SOURCES.$(KBUILD_HOST))
1131RuntimeGuestR3_SOURCES.$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET_ARCH))
1132RuntimeGuestR3_SOURCES.x86 := $(RuntimeR3_SOURCES.x86)
1133RuntimeGuestR3_SOURCES.amd64 := $(RuntimeR3_SOURCES.amd64)
1134RuntimeGuestR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
1135RuntimeGuestR3_SOURCES.$(KBUILD_TARGET).x86 := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).x86)
1136RuntimeGuestR3_SOURCES.$(KBUILD_TARGET).amd64:= $(RuntimeR3_SOURCES.$(KBUILD_TARGET).amd64)
1137RuntimeGuestR3_SOURCES.$(KBUILD_HOST).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_HOST).$(KBUILD_TARGET_ARCH))
1138RuntimeGuestR3_SOURCES.win.x86 += \
1139 r3/win/vcc100-kernel32-fakes.cpp \
1140 r3/win/vcc100-kernel32-fakesA.asm
1141
1142#
1143# RuntimeGuestR3-x86 - Same as RuntimeGuestR3, except that it's targeting x86.
1144#
1145RuntimeGuestR3-x86_EXTENDS := RuntimeGuestR3
1146RuntimeGuestR3-x86_BLD_TRG_ARCH := x86
1147
1148
1149#
1150# RuntimeGuestR3Shared - Guest Additions Runtime (static/dll).
1151#
1152RuntimeGuestR3Shared_TEMPLATE := VBoxGuestR3Dll
1153RuntimeGuestR3Shared_EXTENDS := RuntimeGuestR3
1154RuntimeGuestR3Shared_INST = $(INST_ADDITIONS_LIB)
1155
1156
1157#
1158# RuntimeGuestR3Shared-x86 - Same as RuntimeGuestR3Shared, except that it's targeting x86.
1159#
1160RuntimeGuestR3Shared-x86_EXTENDS := RuntimeGuestR3Shared
1161RuntimeGuestR3Shared-x86_BLD_TRG_ARCH := x86
1162
1163
1164#
1165# RuntimeGuestR3Mini - Minimal Guest Additions Runtime which does not require
1166# initialization and can be linked into an .so. Intended
1167# for X11 drivers, GRADD and similar.
1168#
1169RuntimeGuestR3Mini_TEMPLATE := VBoxGuestR3Dll
1170## @todo change this to EXTEND the RuntimeGuestR3 target.
1171RuntimeGuestR3Mini_INST := $(INST_ADDITIONS_LIB)
1172RuntimeGuestR3Mini_SDKS.win := $(RuntimeR3_SDKS.win)
1173RuntimeGuestR3Mini_DEFS := \
1174 $(filter-out RTCRITSECT_STRICT RT_NO_GIP RT_WITH_ICONV_CACHE, $(RuntimeR3_DEFS)) \
1175 RT_MINI IN_RT_STATIC RTMEM_NO_WRAP_TO_EF_APIS
1176RuntimeGuestR3Mini_DEFS.$(KBUILD_TARGET) := $(RuntimeR3_DEFS.$(KBUILD_TARGET))
1177RuntimeGuestR3Mini_DEFS.$(KBUILD_HOST) := $(RuntimeR3_DEFS.$(KBUILD_HOST))
1178RuntimeGuestR3Mini_INCS := $(RuntimeR3_INCS)
1179RuntimeGuestR3Mini_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
1180RuntimeGuestR3Mini_INCS.$(KBUILD_HOST) := $(RuntimeR3_INCS.$(KBUILD_HOST))
1181RuntimeGuestR3Mini_SOURCES = \
1182 common/alloc/alloc.cpp \
1183 common/err/errmsg.cpp \
1184 common/err/RTErrConvertFromErrno.cpp \
1185 common/log/logformat.cpp \
1186 common/misc/RTAssertMsg1Weak.cpp \
1187 common/misc/RTAssertMsg2.cpp \
1188 common/misc/RTAssertMsg2Add.cpp \
1189 common/misc/RTAssertMsg2AddWeak.cpp \
1190 common/misc/RTAssertMsg2AddWeakV.cpp \
1191 common/misc/RTAssertMsg2Weak.cpp \
1192 common/misc/RTAssertMsg2WeakV.cpp \
1193 common/misc/assert.cpp \
1194 common/misc/buildconfig.cpp \
1195 common/misc/sanity-c.c \
1196 common/misc/sanity-cpp.cpp \
1197 common/path/rtPathVolumeSpecLen.cpp \
1198 common/path/RTPathAbsDup.cpp \
1199 common/path/RTPathAbsEx.cpp \
1200 common/path/RTPathAbsExDup.cpp \
1201 common/path/RTPathAppend.cpp \
1202 common/path/RTPathAppendEx.cpp \
1203 common/path/RTPathExt.cpp \
1204 common/path/RTPathFilename.cpp \
1205 common/path/RTPathHasExt.cpp \
1206 common/path/RTPathHasPath.cpp \
1207 common/path/RTPathJoin.cpp \
1208 common/path/RTPathJoinA.cpp \
1209 common/path/RTPathParseSimple.cpp \
1210 common/path/RTPathRealDup.cpp \
1211 common/path/RTPathStripExt.cpp \
1212 common/path/RTPathStripFilename.cpp \
1213 common/path/RTPathStripTrailingSlash.cpp \
1214 common/string/RTStrCat.cpp \
1215 common/string/RTStrCatEx.cpp \
1216 common/string/RTStrCatP.cpp \
1217 common/string/RTStrCatPEx.cpp \
1218 common/string/RTStrCmp.cpp \
1219 common/string/RTStrCopy.cpp \
1220 common/string/RTStrCopyEx.cpp \
1221 common/string/RTStrCopyP.cpp \
1222 common/string/RTStrCopyPEx.cpp \
1223 common/string/RTStrNCmp.cpp \
1224 common/string/RTStrNLen.cpp \
1225 common/string/RTStrNLenEx.cpp \
1226 common/string/RTStrStr.cpp \
1227 common/string/straprintf.cpp \
1228 common/string/strformat.cpp \
1229 common/string/strformatnum.cpp \
1230 common/string/strformatrt.cpp \
1231 common/string/strformattype.cpp \
1232 common/string/stringalloc.cpp \
1233 common/string/strprintf.cpp \
1234 common/string/strtonum.cpp \
1235 common/string/unidata.cpp \
1236 common/string/utf-8.cpp \
1237 common/string/utf-8-case.cpp \
1238 common/string/utf-16.cpp \
1239 common/table/avlpv.cpp \
1240 generic/critsect-generic.cpp \
1241 generic/pathhost-generic.cpp \
1242 generic/RTAssertShouldPanic-generic.cpp \
1243 generic/errvars-generic.cpp \
1244 r3/alloc.cpp \
1245 r3/alloc-ef.cpp \
1246 r3/fileio.cpp \
1247 r3/fs.cpp
1248RuntimeGuestR3Mini_SOURCES.freebsd = \
1249 r3/posix/RTMemProtect-posix.cpp \
1250 r3/posix/rtmempage-exec-mmap-posix.cpp \
1251 r3/posix/RTPathUserHome-posix.cpp \
1252 r3/posix/env-posix.cpp \
1253 r3/posix/fileio-posix.cpp \
1254 r3/posix/fileio2-posix.cpp \
1255 r3/posix/path-posix.cpp \
1256 r3/posix/path2-posix.cpp \
1257 r3/posix/utf8-posix.cpp \
1258 r3/posix/thread2-posix.cpp \
1259 common/err/errmsgxpcom.cpp
1260RuntimeGuestR3Mini_SOURCES.linux = \
1261 r3/posix/RTMemProtect-posix.cpp \
1262 r3/posix/rtmempage-exec-mmap-posix.cpp \
1263 r3/posix/RTPathUserHome-posix.cpp \
1264 r3/posix/env-posix.cpp \
1265 r3/posix/fileio-posix.cpp \
1266 r3/posix/fileio2-posix.cpp \
1267 r3/posix/path-posix.cpp \
1268 r3/posix/path2-posix.cpp \
1269 r3/posix/utf8-posix.cpp \
1270 r3/posix/thread2-posix.cpp \
1271 common/err/errmsgxpcom.cpp
1272RuntimeGuestR3Mini_SOURCES.solaris = \
1273 r3/posix/RTMemProtect-posix.cpp \
1274 r3/posix/rtmempage-exec-mmap-posix.cpp \
1275 r3/posix/RTPathUserHome-posix.cpp \
1276 r3/posix/env-posix.cpp \
1277 r3/posix/fileio-posix.cpp \
1278 r3/posix/fileio2-posix.cpp \
1279 r3/posix/path-posix.cpp \
1280 r3/posix/path2-posix.cpp \
1281 r3/posix/utf8-posix.cpp \
1282 r3/posix/thread2-posix.cpp \
1283 common/err/errmsgxpcom.cpp
1284RuntimeGuestR3Mini_SOURCES.win = \
1285 r3/win/alloc-win.cpp \
1286 r3/win/fileio-win.cpp \
1287 r3/win/path-win.cpp \
1288 r3/win/utf8-win.cpp \
1289 r3/win/thread2-win.cpp \
1290 win/errmsgwin.cpp \
1291 win/RTErrConvertFromWin32.cpp
1292
1293# VBox specific stuff.
1294RuntimeGuestR3Mini_SOURCES += \
1295 VBox/logbackdoor.cpp \
1296 VBox/logbackdoor-redirect.cpp
1297
1298
1299#
1300# RuntimeLnxHostR3 Linux host program runtime
1301# (Only used when building L4.)
1302#
1303RuntimeLnxHostR3_TEMPLATE := VBOXLNXHOSTR3LIB
1304RuntimeLnxHostR3_DEFS := IN_RT_R3 IN_SUP_R3 RT_WITH_VBOX RT_NO_GIP
1305RuntimeLnxHostR3_SOURCES := \
1306 $(RuntimeR3_SOURCES.linux.$(KBUILD_TARGET_ARCH)) \
1307 $(RuntimeR3_SOURCES.linux) \
1308 $(RuntimeR3_SOURCES)
1309RuntimeLnxHostR3_INCS := \
1310 $(RuntimeR3_INCS.linux.$(KBUILD_TARGET_ARCH)) \
1311 $(RuntimeR3_INCS.linux) \
1312 $(RuntimeR3_INCS)
1313
1314
1315#
1316# VBoxRT - Shared Object / DLL version.
1317#
1318VBoxRT_TEMPLATE = VBoxR3DllNoPic
1319VBoxRT_SDKS = VBOX_LIBXML2 VBOX_BOOST
1320ifdef VBOX_WITH_LIBCURL
1321 VBoxRT_SDKS += VBOX_LIBCURL
1322endif
1323VBoxRT_SDKS += VBOX_OPENSSL
1324VBoxRT_SDKS.win = $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
1325if1of ($(KBUILD_TARGET)$(VBOX_WITH_HARDENING), darwin win)
1326VBoxRT_INST = $(INST_DLL) $(INST_TESTCASE)
1327endif
1328VBoxRT_DEFS := $(filter-out RT_NO_GIP,$(RuntimeR3_DEFS)) IN_SUP_R3 IN_SUP_R3
1329ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1330 VBoxRT_DEFS += RT_NO_GIP
1331endif
1332VBoxRT_DEFS.$(KBUILD_TYPE) := $(RuntimeR3_DEFS.$(KBUILD_TYPE))
1333VBoxRT_SOURCES := \
1334 VBox/VBoxRTDeps.cpp \
1335 r3/xml.cpp \
1336 $(filter-out common/checksum/crc32.cpp, $(RuntimeR3_SOURCES)) \
1337 common/checksum/crc32-zlib.cpp \
1338 common/misc/aiomgr.cpp
1339ifdef VBOX_WITH_LIBCURL
1340 VBoxRT_SOURCES += common/misc/s3.cpp
1341 VBoxRT_SOURCES += common/misc/http.cpp
1342endif
1343VBoxRT_SOURCES.$(KBUILD_TARGET) = $(RuntimeR3_SOURCES.$(KBUILD_TARGET))
1344VBoxRT_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
1345VBoxRT_SOURCES.$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET_ARCH))
1346VBoxRT_SOURCES.win += \
1347 r3/win/dllmain-win.cpp \
1348 r3/win/fileaio-win.cpp \
1349 $(VBoxRT_0_OUTDIR)/VBoxRT.def
1350VBoxRT_SOURCES.linux += \
1351 r3/linux/fileaio-linux.cpp
1352VBoxRT_SOURCES.solaris += \
1353 r3/solaris/fileaio-solaris.cpp
1354VBoxRT_SOURCES.darwin += \
1355 r3/posix/fileaio-posix.cpp
1356VBoxRT_SOURCES.freebsd += \
1357 r3/freebsd/fileaio-freebsd.cpp
1358VBoxRT_INCS := $(RuntimeR3_INCS)
1359VBoxRT_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
1360VBoxRT_INCS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_INCS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
1361VBoxRT_LIBS = \
1362 $(PATH_STAGE_LIB)/VBox-liblzf$(VBOX_SUFF_LIB)
1363if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1364VBoxRT_LIBS += \
1365 $(PATH_STAGE_LIB)/SUPR3$(VBOX_SUFF_LIB)
1366endif
1367ifdef IPRT_WITH_KSTUFF
1368 VBoxRT_LIBS += \
1369 $(PATH_STAGE_LIB)/VBox-kStuff$(VBOX_SUFF_LIB)
1370endif
1371ifndef SDK_VBOX_LIBXML2_LIBS
1372 VBoxRT_LIBS += \
1373 $(PATH_STAGE_LIB)/VBox-libxml2$(VBOX_SUFF_LIB)
1374endif
1375VBoxRT_LIBS += \
1376 $(SDK_VBOX_ZLIB_LIBS)
1377ifndef SDK_VBOX_OPENSSL_LIBS
1378 VBoxRT_LIBS += \
1379 $(PATH_STAGE_LIB)/VBox-libcrypto$(VBOX_SUFF_LIB) \
1380 $(PATH_STAGE_LIB)/VBox-libssl$(VBOX_SUFF_LIB)
1381endif
1382ifdef IPRT_WITH_LZO
1383 VBoxRT_LIBS += lzo2
1384endif
1385VBoxRT_LIBS.linux = \
1386 crypt
1387VBoxRT_LIBS.darwin = \
1388 iconv
1389VBoxRT_LIBS.freebsd = \
1390 iconv \
1391 rt
1392VBoxRT_LIBS.haiku = \
1393 iconv
1394VBoxRT_LIBS.solaris = \
1395 kstat \
1396 contract
1397ifn1of ($(KBUILD_TARGET_ARCH), sparc32 sparc64)
1398 # SMBIOS not available on Solaris SPARC.
1399 VBoxRT_LIBS.solaris += smbios
1400endif
1401VBoxRT_LIBS.win = \
1402 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/vccomsup.lib \
1403 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/wbemuuid.lib
1404VBoxRT_LDFLAGS.darwin = -framework IOKit -framework CoreFoundation -framework CoreServices -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxRT.dylib
1405VBoxRT_LDFLAGS.win = /MANIFEST
1406VBoxRT_LDFLAGS.l4 = \
1407 -Wl,-whole-archive \
1408 $(PATH_STAGE_LIB)/RuntimeR3L4$(VBOX_SUFF_LIB) \
1409 -Wl,-no-whole-archive
1410ifeq ($(KBUILD_TARGET),l4)
1411VBoxRT_LIBS += \
1412 $(L4_LIBDIR)/libl4sys.a \
1413 $(L4_LIBDIR)/libl4sys.p.a
1414endif
1415VBoxRT_LIBS.l4 = \
1416 $(PATH_STAGE_LIB)/RuntimeR3L4$(VBOX_SUFF_LIB)
1417
1418if1of ($(DLLS), VBoxRT)
1419$$(VBoxRT_0_OUTDIR)/VBoxRT.def: \
1420 $(PATH_SUB_CURRENT)/r3/win/VBoxRT-$$(if-expr $$(KBUILD_TARGET_ARCH) == amd64,win64,win32).def \
1421 $(PATH_SUB_CURRENT)/r3/win/$(if $(VBOX_OSE),VBoxRT-openssl-ose.def,VBoxRT-openssl.def)
1422 $(RM) -f -- $@
1423 $(REDIRECT) -wto $@ -- $(CAT_EXT) $^
1424endif
1425
1426
1427#
1428# HACK ALERT! Make testcase run during build on SELinux boxes.
1429# Create a dummy DLL that ensure that VBoxRT is installed
1430# during the DLL pass and cleaned up later.
1431#
1432ifeq ($(KBUILD_TARGET),linux)
1433 if1of (VBoxRT, $(DLLS))
1434 ifneq ($(wildcard /usr/bin/chcon),)
1435VBoxRT_INSTTYPE = none
1436VBoxRT_DEBUG_INSTTYPE = both
1437
1438DLLS += VBoxRTDummy
1439VBoxRTDummy_TEMPLATE = VBOXR3
1440VBoxRTDummy_INSTTYPE = none
1441VBoxRTDummy_LIBS = $(PATH_STAGE_BIN)/VBoxRT.so
1442VBoxRTDummy_CLEAN = $(PATH_STAGE_BIN)/VBoxRT.so
1443BLDDIRS += $(PATH_STAGE_BIN)
1444
1445$(PATH_STAGE_BIN)/VBoxRT.so: $$(VBoxRT_1_TARGET) | $$(dir $$@)
1446 $(INSTALL) $< $@
1447 chcon -t texrel_shlib_t $@ || true
1448
1449VBoxRT:: VBoxRTDummy
1450 endif # chcon present.
1451 endif # building VBoxRT
1452endif # linux
1453
1454
1455#
1456# VBoxRTImp - Import library/hack.
1457#
1458ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.amd64)
1459$(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxRTImp,VBoxRT,VBox/VBoxRTImp.def r3/win/VBoxRT-openssl-ose.def r3/win/VBoxRT-win64.def)
1460else ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.x86)
1461$(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxRTImp,VBoxRT,VBox/VBoxRTImp.def r3/win/VBoxRT-openssl-ose.def r3/win/VBoxRT-win32.def)
1462else
1463$(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxRTImp,VBoxRT,VBox/VBoxRTImp.def r3/win/VBoxRT-openssl-ose.def)
1464endif
1465
1466
1467#
1468# RuntimeR3NoCRTGCC - CRT replacement lib for VBoxREM.
1469# This is used together with VBoxRT.
1470#
1471## @todo the *_alias.c stuff is busted, remove and use RT_WITH_NOCRT_ALIASES instead.
1472RuntimeR3NoCRTGCC_TEMPLATE = VBOXNOCRTGCC
1473RuntimeR3NoCRTGCC_LIBSUFF = $(VBOX_SUFF_LIB)
1474ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1475 RuntimeR3NoCRTGCC_DEFS += RT_NO_GIP
1476endif
1477RuntimeR3NoCRTGCC_INCS = include
1478RuntimeR3NoCRTGCC_SOURCES := \
1479 common/misc/sanity-cpp.cpp \
1480 common/misc/sanity-c.c \
1481 \
1482 $(RuntimeNoCrt_SOURCES)
1483
1484if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1485RuntimeR3NoCRTGCC_SOURCES += \
1486 common/math/ceill.asm \
1487 common/math/cosl.asm \
1488 common/math/fabs.asm \
1489 common/math/fabsf.asm \
1490 common/math/fabsl.asm \
1491 common/math/floor.asm \
1492 common/math/floorf.asm \
1493 common/math/floorl.asm \
1494 common/math/ldexpl.asm \
1495 common/math/llrint.asm \
1496 common/math/llrintf.asm \
1497 common/math/llrintl.asm \
1498 common/math/logl.asm \
1499 common/math/lrint.asm \
1500 common/math/lrintf.asm \
1501 common/math/lrintl.asm \
1502 common/math/remainder.asm \
1503 common/math/remainderf.asm \
1504 common/math/remainderl.asm \
1505 common/math/sinl.asm \
1506 common/math/tanl.asm \
1507 common/math/trunc.asm \
1508 common/math/truncf.asm \
1509 common/math/truncl.asm \
1510 \
1511 common/string/memchr_alias.c \
1512 common/string/memcmp_alias.c \
1513 common/string/memcpy_alias.c \
1514 common/string/memmove_alias.c \
1515 common/string/memset_alias.c \
1516 common/string/strchr_alias.c \
1517 common/string/strcmp_alias.c \
1518 common/string/strlen_alias.c
1519endif
1520
1521RuntimeR3NoCRTGCC_SOURCES.x86 = \
1522 common/math/x86/fenv-x86.c \
1523 common/math/gcc/adddi3.c \
1524 common/math/gcc/anddi3.c \
1525 common/math/gcc/ashldi3.c \
1526 common/math/gcc/ashrdi3.c \
1527 common/math/gcc/cmpdi2.c \
1528 common/math/gcc/divdi3.c \
1529 common/math/gcc/iordi3.c \
1530 common/math/gcc/lshldi3.c \
1531 common/math/gcc/lshrdi3.c \
1532 common/math/gcc/moddi3.c \
1533 common/math/gcc/muldi3.c \
1534 common/math/gcc/negdi2.c \
1535 common/math/gcc/notdi2.c \
1536 common/math/gcc/qdivrem.c \
1537 common/math/gcc/subdi3.c \
1538 common/math/gcc/ucmpdi2.c \
1539 common/math/gcc/udivdi3.c \
1540 common/math/gcc/umoddi3.c \
1541 common/math/gcc/xordi3.c
1542
1543
1544## @todo stop using the old memcpy.c and memset.c code.
1545
1546#
1547# RuntimeR0 - Ring-0 library for VMMR0.
1548#
1549RuntimeR0_TEMPLATE = VBoxR0
1550RuntimeR0_DEFS = IN_RT_R0 RT_WITH_VBOX
1551ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1552 RuntimeR0_DEFS += RT_NO_GIP
1553endif
1554RuntimeR0_INCS = include
1555RuntimeR0_SOURCES := \
1556 common/log/logellipsis.cpp \
1557 common/log/logrelellipsis.cpp \
1558 common/log/logcom.cpp \
1559 common/log/logformat.cpp \
1560 common/log/tracebuf.cpp \
1561 common/log/tracedefault.cpp \
1562 common/misc/RTAssertMsg1Weak.cpp \
1563 common/misc/RTAssertMsg2.cpp \
1564 common/misc/RTAssertMsg2Add.cpp \
1565 common/misc/RTAssertMsg2AddWeak.cpp \
1566 common/misc/RTAssertMsg2AddWeakV.cpp \
1567 common/misc/RTAssertMsg2Weak.cpp \
1568 common/misc/RTAssertMsg2WeakV.cpp \
1569 common/misc/buildconfig.cpp \
1570 common/misc/once.cpp \
1571 common/misc/sanity-c.c \
1572 common/misc/sanity-cpp.cpp \
1573 common/misc/term.cpp \
1574 common/path/RTPathFilename.cpp \
1575 common/string/strhash1.cpp \
1576 common/string/strncmp.cpp \
1577 common/string/strpbrk.cpp \
1578 common/string/RTStrCat.cpp \
1579 common/string/RTStrCatEx.cpp \
1580 common/string/RTStrCatP.cpp \
1581 common/string/RTStrCatPEx.cpp \
1582 common/string/RTStrCopy.cpp \
1583 common/string/RTStrCopyEx.cpp \
1584 common/string/RTStrCopyP.cpp \
1585 common/string/RTStrCopyPEx.cpp \
1586 common/string/RTStrNLen.cpp \
1587 common/string/RTStrNLenEx.cpp \
1588 common/table/avlgcptr.cpp \
1589 common/table/avlhcphys.cpp \
1590 common/table/avllu32.cpp \
1591 common/table/avlogcphys.cpp \
1592 common/table/avlogcptr.cpp \
1593 common/table/avlohcphys.cpp \
1594 common/table/avloioport.cpp \
1595 common/table/avlpv.cpp \
1596 common/table/avlrogcphys.cpp \
1597 common/table/avlrogcptr.cpp \
1598 common/table/avlroioport.cpp \
1599 common/table/avlroogcptr.cpp \
1600 common/table/avlu32.cpp \
1601 common/table/avlou32.cpp \
1602 common/time/timesup.cpp \
1603 generic/RTAssertShouldPanic-generic.cpp \
1604 \
1605 $(RuntimeNoCrt_SOURCES)
1606
1607if1of ($(KBUILD_TARGET), darwin solaris freebsd)
1608RuntimeR0_SOURCES += \
1609 common/math/gcc/adddi3.c \
1610 common/math/gcc/anddi3.c \
1611 common/math/gcc/ashldi3.c \
1612 common/math/gcc/ashrdi3.c \
1613 common/math/gcc/cmpdi2.c \
1614 common/math/gcc/divdi3.c \
1615 common/math/gcc/iordi3.c \
1616 common/math/gcc/lshldi3.c \
1617 common/math/gcc/lshrdi3.c \
1618 common/math/gcc/moddi3.c \
1619 common/math/gcc/muldi3.c \
1620 common/math/gcc/negdi2.c \
1621 common/math/gcc/notdi2.c \
1622 common/math/gcc/qdivrem.c \
1623 common/math/gcc/subdi3.c \
1624 common/math/gcc/ucmpdi2.c \
1625 common/math/gcc/udivdi3.c \
1626 common/math/gcc/umoddi3.c \
1627 common/math/gcc/xordi3.c
1628endif
1629
1630#if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
1631# RuntimeR0_SOURCES += common/time/timesupA.asm
1632#else
1633 RuntimeR0_SOURCES += common/time/timesupref.cpp
1634#endif
1635
1636RuntimeR0_SOURCES.win.amd64 := $(RuntimeWin64ASM_SOURCES)
1637RuntimeR0_SOURCES.win.x86 := $(RuntimeWin32ASM_SOURCES)
1638RuntimeR0_SOURCES.win = \
1639 nt/NtProcessStartup-stub.cpp
1640
1641RuntimeR0_SOURCES.os2 = \
1642 os2/sys0.asm
1643
1644
1645#
1646# RuntimeR0Stub - Ring-0 context startup stub for Windows and Solaris.
1647#
1648RuntimeR0Stub_TEMPLATE = $(if-expr "$(KBUILD_TARGET)" == "solaris",VBoxR0DrvLib,VBoxR0)
1649RuntimeR0Stub_SOURCES.win = \
1650 nt/NtProcessStartup-stub.cpp
1651RuntimeR0Stub_SOURCES.solaris = \
1652 r0drv/solaris/modulestub-r0drv-solaris.c
1653
1654
1655#
1656# RuntimeR0Drv - Ring-0 library for host drivers.
1657#
1658RuntimeR0Drv_TEMPLATE = VBoxR0DrvLib
1659RuntimeR0Drv_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK) $(VBOX_WINPSDK)INCS
1660RuntimeR0Drv_DEFS = IN_RT_R0 RT_WITH_VBOX RT_WITHOUT_NOCRT_WRAPPERS RT_NO_EXPORT_SYMBOL
1661RuntimeR0Drv_DEFS.win = IN_SUP_R0
1662RuntimeR0Drv_DEFS.linux = MODULE KBUILD_MODNAME=KBUILD_STR\(vboxdrv\) KBUILD_BASENAME=KBUILD_STR\(vboxdrv\) IN_SUP_R0
1663
1664RuntimeR0Drv_INCS := $(PATH_SUB_CURRENT) include
1665RuntimeR0Drv_INCS.freebsd = \
1666 $(PATH_STAGE)/gen-sys-hdrs
1667RuntimeR0Drv_INCS.linux = \
1668 r0drv/linux
1669RuntimeR0Drv_INCS.solaris = \
1670 r0drv/solaris/vbi/i86pc \
1671 r0drv/solaris/vbi/i86pc/sys
1672
1673RuntimeR0Drv_SOURCES = \
1674 common/alloc/alloc.cpp \
1675 common/alloc/heapsimple.cpp \
1676 common/alloc/heapoffset.cpp \
1677 common/checksum/crc32.cpp \
1678 common/checksum/crc64.cpp \
1679 common/checksum/md5.cpp \
1680 common/checksum/ipv4.cpp \
1681 common/checksum/ipv6.cpp \
1682 common/err/RTErrConvertToErrno.cpp \
1683 common/err/RTErrConvertFromErrno.cpp \
1684 common/log/log.cpp \
1685 common/log/logellipsis.cpp \
1686 common/log/logrel.cpp \
1687 common/log/logrelellipsis.cpp \
1688 common/log/logcom.cpp \
1689 common/log/logformat.cpp \
1690 common/log/tracebuf.cpp \
1691 common/log/tracedefault.cpp \
1692 common/misc/RTAssertMsg1Weak.cpp \
1693 common/misc/RTAssertMsg2.cpp \
1694 common/misc/RTAssertMsg2Add.cpp \
1695 common/misc/RTAssertMsg2AddWeak.cpp \
1696 common/misc/RTAssertMsg2AddWeakV.cpp \
1697 common/misc/RTAssertMsg2Weak.cpp \
1698 common/misc/RTAssertMsg2WeakV.cpp \
1699 common/misc/assert.cpp \
1700 common/misc/buildconfig.cpp \
1701 common/misc/handletable.cpp \
1702 common/misc/handletablectx.cpp \
1703 common/misc/handletablesimple.cpp \
1704 common/misc/once.cpp \
1705 common/misc/sanity-c.c \
1706 common/misc/sanity-cpp.cpp \
1707 common/misc/term.cpp \
1708 common/path/rtPathVolumeSpecLen.cpp \
1709 common/path/RTPathAbsDup.cpp \
1710 common/path/RTPathAbsEx.cpp \
1711 common/path/RTPathAbsExDup.cpp \
1712 common/path/RTPathAppend.cpp \
1713 common/path/RTPathAppendEx.cpp \
1714 common/path/RTPathExt.cpp \
1715 common/path/RTPathFilename.cpp \
1716 common/path/RTPathHasExt.cpp \
1717 common/path/RTPathHasPath.cpp \
1718 common/path/RTPathParseSimple.cpp \
1719 common/path/RTPathRealDup.cpp \
1720 common/path/RTPathStripExt.cpp \
1721 common/path/RTPathStripFilename.cpp \
1722 common/path/RTPathStripTrailingSlash.cpp \
1723 common/rand/rand.cpp \
1724 common/rand/randadv.cpp \
1725 common/rand/randparkmiller.cpp \
1726 common/string/RTStrCat.cpp \
1727 common/string/RTStrCatEx.cpp \
1728 common/string/RTStrCatP.cpp \
1729 common/string/RTStrCatPEx.cpp \
1730 common/string/RTStrCmp.cpp \
1731 common/string/RTStrCopy.cpp \
1732 common/string/RTStrCopyEx.cpp \
1733 common/string/RTStrCopyP.cpp \
1734 common/string/RTStrCopyPEx.cpp \
1735 common/string/RTStrNCmp.cpp \
1736 common/string/RTStrNLen.cpp \
1737 common/string/RTStrNLenEx.cpp \
1738 common/string/straprintf.cpp \
1739 common/string/strformat.cpp \
1740 common/string/strformatnum.cpp \
1741 common/string/strformatrt.cpp \
1742 common/string/strformattype.cpp \
1743 common/string/strhash1.cpp \
1744 common/string/strprintf.cpp \
1745 common/string/strtonum.cpp \
1746 common/string/stringalloc.cpp \
1747 common/string/utf-16.cpp \
1748 common/string/utf-8.cpp \
1749 common/table/avlpv.cpp \
1750 common/time/time.cpp \
1751 generic/RTLogWriteStdErr-stub-generic.cpp \
1752 generic/RTLogWriteUser-generic.cpp \
1753 generic/RTMpGetArraySize-generic.cpp \
1754 generic/RTRandAdvCreateSystemFaster-generic.cpp \
1755 generic/RTSemEventWait-2-ex-generic.cpp \
1756 generic/RTSemEventWaitNoResume-2-ex-generic.cpp \
1757 generic/RTSemEventMultiWait-2-ex-generic.cpp \
1758 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
1759 generic/errvars-generic.cpp \
1760 generic/uuid-generic.cpp \
1761 r0drv/alloc-r0drv.cpp \
1762 r0drv/initterm-r0drv.cpp \
1763 r0drv/generic/semspinmutex-r0drv-generic.c \
1764 VBox/log-vbox.cpp \
1765
1766RuntimeR0Drv_SOURCES.linux = \
1767 common/misc/thread.cpp \
1768 common/string/strpbrk.cpp \
1769 generic/RTAssertShouldPanic-generic.cpp \
1770 generic/RTLogWriteStdOut-stub-generic.cpp \
1771 generic/mppresent-generic.cpp \
1772 r0drv/linux/alloc-r0drv-linux.c \
1773 r0drv/linux/assert-r0drv-linux.c \
1774 r0drv/linux/initterm-r0drv-linux.c \
1775 r0drv/linux/memobj-r0drv-linux.c \
1776 r0drv/linux/memuserkernel-r0drv-linux.c \
1777 r0drv/linux/mp-r0drv-linux.c \
1778 r0drv/linux/mpnotification-r0drv-linux.c \
1779 r0drv/linux/process-r0drv-linux.c \
1780 r0drv/linux/RTLogWriteDebugger-r0drv-linux.c \
1781 r0drv/linux/semevent-r0drv-linux.c \
1782 r0drv/linux/semeventmulti-r0drv-linux.c \
1783 r0drv/linux/semfastmutex-r0drv-linux.c \
1784 r0drv/linux/semmutex-r0drv-linux.c \
1785 r0drv/linux/spinlock-r0drv-linux.c \
1786 r0drv/linux/thread-r0drv-linux.c \
1787 r0drv/linux/thread2-r0drv-linux.c \
1788 r0drv/linux/time-r0drv-linux.c \
1789 r0drv/linux/timer-r0drv-linux.c \
1790 r0drv/memobj-r0drv.cpp \
1791 r0drv/mpnotification-r0drv.c \
1792 r0drv/powernotification-r0drv.c
1793
1794RuntimeR0Drv_SOURCES.win = \
1795 common/misc/thread.cpp \
1796 common/string/memcmp.asm \
1797 common/string/memchr.asm \
1798 common/string/memcpy.asm \
1799 common/string/memset.asm \
1800 common/string/memmove.asm \
1801 common/string/strlen.asm \
1802 common/string/strncmp.cpp \
1803 common/string/strpbrk.cpp \
1804 generic/RTAssertShouldPanic-generic.cpp \
1805 generic/RTLogWriteStdOut-stub-generic.cpp \
1806 generic/RTTimerCreate-generic.cpp \
1807 generic/mppresent-generic.cpp \
1808 nt/RTErrConvertFromNtStatus.cpp \
1809 r0drv/memobj-r0drv.cpp \
1810 r0drv/mpnotification-r0drv.c \
1811 r0drv/powernotification-r0drv.c \
1812 r0drv/nt/alloc-r0drv-nt.cpp \
1813 r0drv/nt/assert-r0drv-nt.cpp \
1814 r0drv/nt/initterm-r0drv-nt.cpp \
1815 r0drv/nt/memobj-r0drv-nt.cpp \
1816 r0drv/nt/memuserkernel-r0drv-nt.cpp \
1817 r0drv/nt/mp-r0drv-nt.cpp \
1818 r0drv/nt/mpnotification-r0drv-nt.cpp \
1819 r0drv/nt/process-r0drv-nt.cpp \
1820 r0drv/nt/RTLogWriteDebugger-r0drv-nt.cpp \
1821 r0drv/nt/semevent-r0drv-nt.cpp \
1822 r0drv/nt/semeventmulti-r0drv-nt.cpp \
1823 r0drv/nt/semfastmutex-r0drv-nt.cpp \
1824 r0drv/nt/semmutex-r0drv-nt.cpp \
1825 r0drv/nt/spinlock-r0drv-nt.cpp \
1826 r0drv/nt/thread-r0drv-nt.cpp \
1827 r0drv/nt/thread2-r0drv-nt.cpp \
1828 r0drv/nt/time-r0drv-nt.cpp \
1829 r0drv/nt/timer-r0drv-nt.cpp \
1830 r0drv/nt/RTTimerGetSystemGranularity-r0drv-nt.cpp
1831
1832RuntimeR0Drv_SOURCES.win.amd64 := $(RuntimeWin64ASM_SOURCES)
1833RuntimeR0Drv_SOURCES.win.x86 := $(RuntimeWin32ASM_SOURCES)
1834
1835RuntimeR0Drv_SOURCES.darwin = \
1836 common/misc/thread.cpp \
1837 common/string/memchr.asm \
1838 common/string/strpbrk.cpp \
1839 darwin/RTErrConvertFromDarwin.cpp \
1840 darwin/RTErrConvertFromDarwinIO.cpp \
1841 darwin/RTErrConvertFromDarwinKern.cpp \
1842 generic/RTAssertShouldPanic-generic.cpp \
1843 generic/RTTimerCreate-generic.cpp \
1844 generic/mppresent-generic.cpp \
1845 generic/timer-generic.cpp \
1846 r0drv/generic/mpnotification-r0drv-generic.cpp \
1847 r0drv/darwin/alloc-r0drv-darwin.cpp \
1848 r0drv/darwin/assert-r0drv-darwin.cpp \
1849 r0drv/darwin/initterm-r0drv-darwin.cpp \
1850 r0drv/darwin/dbgkrnlinfo-r0drv-darwin.cpp \
1851 r0drv/darwin/memobj-r0drv-darwin.cpp \
1852 r0drv/darwin/mp-r0drv-darwin.cpp \
1853 r0drv/darwin/memuserkernel-r0drv-darwin.cpp \
1854 r0drv/darwin/process-r0drv-darwin.cpp \
1855 r0drv/darwin/RTLogWriteDebugger-r0drv-darwin.cpp \
1856 r0drv/darwin/RTLogWriteStdOut-r0drv-darwin.cpp \
1857 r0drv/darwin/semevent-r0drv-darwin.cpp \
1858 r0drv/darwin/semeventmulti-r0drv-darwin.cpp \
1859 r0drv/darwin/semfastmutex-r0drv-darwin.cpp \
1860 r0drv/darwin/semmutex-r0drv-darwin.cpp \
1861 r0drv/darwin/spinlock-r0drv-darwin.cpp \
1862 r0drv/darwin/thread-r0drv-darwin.cpp \
1863 r0drv/darwin/thread2-r0drv-darwin.cpp \
1864 r0drv/darwin/threadpreempt-r0drv-darwin.cpp \
1865 r0drv/darwin/time-r0drv-darwin.cpp \
1866 r0drv/memobj-r0drv.cpp \
1867 r0drv/powernotification-r0drv.c
1868
1869RuntimeR0Drv_SOURCES.os2 = \
1870 common/string/memchr.asm \
1871 common/string/memcmp.asm \
1872 common/string/memcpy.asm \
1873 common/string/mempcpy.asm \
1874 common/string/memmove.asm \
1875 common/string/memset.asm \
1876 common/string/strchr.asm \
1877 common/string/strcmp.asm \
1878 common/string/strcpy.asm \
1879 common/string/strlen.asm \
1880 \
1881 common/string/strncmp.cpp \
1882 common/string/strpbrk.cpp \
1883 \
1884 common/misc/thread.cpp \
1885 generic/RTAssertShouldPanic-generic.cpp \
1886 generic/RTLogWriteDebugger-generic.cpp \
1887 generic/RTLogWriteStdOut-stub-generic.cpp \
1888 generic/RTMpCpuId-generic.cpp \
1889 generic/RTMpCpuIdFromSetIndex-generic.cpp \
1890 generic/RTMpCpuIdToSetIndex-generic.cpp \
1891 generic/RTMpIsCpuPossible-generic.cpp \
1892 generic/RTMpGetCount-generic.cpp \
1893 generic/RTMpGetMaxCpuId-generic.cpp \
1894 generic/RTMpGetOnlineCount-generic.cpp \
1895 generic/RTMpGetOnlineSet-generic.cpp \
1896 generic/RTMpGetSet-generic.cpp \
1897 generic/RTMpIsCpuOnline-generic.cpp \
1898 generic/RTTimerCreate-generic.cpp \
1899 generic/mppresent-generic.cpp \
1900 os2/RTErrConvertFromOS2.cpp \
1901 os2/rtSemWaitOs2ConvertTimeout.cpp \
1902 os2/sys0.asm \
1903 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
1904 r0drv/generic/RTMpOn-r0drv-generic.cpp \
1905 r0drv/generic/mpnotification-r0drv-generic.cpp \
1906 r0drv/memobj-r0drv.cpp \
1907 r0drv/powernotification-r0drv.c \
1908 r0drv/os2/alloc-r0drv-os2.cpp \
1909 r0drv/os2/assert-r0drv-os2.cpp \
1910 r0drv/os2/assertA-r0drv-os2.asm \
1911 r0drv/os2/initterm-r0drv-os2.cpp \
1912 r0drv/os2/memobj-r0drv-os2.cpp \
1913 r0drv/os2/memuserkernel-r0drv-os2.cpp \
1914 r0drv/os2/os2imports.imp \
1915 r0drv/os2/process-r0drv-os2.cpp \
1916 r0drv/os2/RTR0AssertPanicSystem-r0drv-os2.asm \
1917 r0drv/os2/RTR0Os2DHQueryDOSVar.asm \
1918 r0drv/os2/RTR0Os2DHVMGlobalToProcess.asm \
1919 r0drv/os2/semevent-r0drv-os2.cpp \
1920 r0drv/os2/semeventmulti-r0drv-os2.cpp \
1921 r0drv/os2/semfastmutex-r0drv-os2.cpp \
1922 r0drv/os2/spinlock-r0drv-os2.cpp \
1923 r0drv/os2/thread-r0drv-os2.cpp \
1924 r0drv/os2/thread2-r0drv-os2.cpp \
1925 r0drv/os2/time-r0drv-os2.cpp \
1926 r0drv/os2/timer-r0drv-os2.cpp \
1927 r0drv/os2/timerA-r0drv-os2.asm
1928
1929RuntimeR0Drv_SOURCES.freebsd = \
1930 common/misc/thread.cpp \
1931 common/string/memchr.asm \
1932 common/string/memmove.asm \
1933 common/string/strpbrk.cpp \
1934 common/string/memcmp.asm \
1935 common/string/strchr.asm \
1936 generic/RTAssertShouldPanic-generic.cpp \
1937 generic/RTLogWriteDebugger-generic.cpp \
1938 generic/RTLogWriteStdOut-stub-generic.cpp \
1939 generic/RTTimerCreate-generic.cpp \
1940 generic/mppresent-generic.cpp \
1941 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
1942 r0drv/generic/mpnotification-r0drv-generic.cpp \
1943 r0drv/freebsd/alloc-r0drv-freebsd.c \
1944 r0drv/freebsd/assert-r0drv-freebsd.c \
1945 r0drv/freebsd/initterm-r0drv-freebsd.c \
1946 r0drv/freebsd/memobj-r0drv-freebsd.c \
1947 r0drv/freebsd/memuserkernel-r0drv-freebsd.c \
1948 r0drv/freebsd/process-r0drv-freebsd.c \
1949 r0drv/freebsd/semevent-r0drv-freebsd.c \
1950 r0drv/freebsd/semeventmulti-r0drv-freebsd.c \
1951 r0drv/freebsd/semfastmutex-r0drv-freebsd.c \
1952 r0drv/freebsd/semmutex-r0drv-freebsd.c \
1953 r0drv/freebsd/spinlock-r0drv-freebsd.c \
1954 r0drv/freebsd/thread-r0drv-freebsd.c \
1955 r0drv/freebsd/thread2-r0drv-freebsd.c \
1956 r0drv/freebsd/time-r0drv-freebsd.c \
1957 r0drv/freebsd/mp-r0drv-freebsd.c \
1958 generic/timer-generic.cpp \
1959 r0drv/memobj-r0drv.cpp \
1960 r0drv/powernotification-r0drv.c
1961
1962RuntimeR0Drv_SOURCES.solaris = \
1963 common/misc/thread.cpp \
1964 common/string/memchr.asm \
1965 generic/RTAssertShouldPanic-generic.cpp \
1966 generic/RTLogWriteStdOut-stub-generic.cpp \
1967 generic/RTTimerCreate-generic.cpp \
1968 generic/mppresent-generic.cpp \
1969 r0drv/memobj-r0drv.cpp \
1970 r0drv/mpnotification-r0drv.c \
1971 r0drv/powernotification-r0drv.c \
1972 r0drv/solaris/RTLogWriteDebugger-r0drv-solaris.c \
1973 r0drv/solaris/RTMpPokeCpu-r0drv-solaris.c \
1974 r0drv/solaris/alloc-r0drv-solaris.c \
1975 r0drv/solaris/assert-r0drv-solaris.c \
1976 r0drv/solaris/dbgkrnlinfo-r0drv-solaris.c \
1977 r0drv/solaris/initterm-r0drv-solaris.c \
1978 r0drv/solaris/memuserkernel-r0drv-solaris.c \
1979 r0drv/solaris/mpnotification-r0drv-solaris.c \
1980 r0drv/solaris/memobj-r0drv-solaris.c \
1981 r0drv/solaris/mp-r0drv-solaris.c \
1982 r0drv/solaris/process-r0drv-solaris.c \
1983 r0drv/solaris/semevent-r0drv-solaris.c \
1984 r0drv/solaris/semeventmulti-r0drv-solaris.c \
1985 r0drv/solaris/semfastmutex-r0drv-solaris.c \
1986 r0drv/solaris/semmutex-r0drv-solaris.c \
1987 r0drv/solaris/spinlock-r0drv-solaris.c \
1988 r0drv/solaris/thread-r0drv-solaris.c \
1989 r0drv/solaris/thread2-r0drv-solaris.c \
1990 r0drv/solaris/time-r0drv-solaris.c \
1991 r0drv/solaris/timer-r0drv-solaris.c
1992
1993RuntimeR0Drv_SOURCES.haiku = \
1994 common/misc/thread.cpp \
1995 common/string/memchr.asm \
1996 common/string/memmove.asm \
1997 common/string/strpbrk.cpp \
1998 common/string/memcmp.asm \
1999 common/string/strchr.asm \
2000 generic/RTAssertShouldPanic-generic.cpp \
2001 generic/RTTimerCreate-generic.cpp \
2002 generic/mppresent-generic.cpp \
2003 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
2004 r0drv/generic/mpnotification-r0drv-generic.cpp \
2005 r0drv/haiku/alloc-r0drv-haiku.c \
2006 r0drv/haiku/assert-r0drv-haiku.c \
2007 r0drv/haiku/initterm-r0drv-haiku.c \
2008 r0drv/haiku/memobj-r0drv-haiku.c \
2009 r0drv/haiku/mp-r0drv-haiku.c \
2010 r0drv/haiku/process-r0drv-haiku.c \
2011 r0drv/haiku/RTLogWriteDebugger-r0drv-haiku.c \
2012 r0drv/haiku/RTLogWriteStdOut-r0drv-haiku.c \
2013 r0drv/haiku/semevent-r0drv-haiku.c \
2014 r0drv/haiku/semeventmulti-r0drv-haiku.c \
2015 r0drv/haiku/semfastmutex-r0drv-haiku.c \
2016 r0drv/haiku/semmutex-r0drv-haiku.c \
2017 r0drv/haiku/spinlock-r0drv-haiku.c \
2018 r0drv/haiku/thread-r0drv-haiku.c \
2019 r0drv/haiku/thread2-r0drv-haiku.c \
2020 r0drv/haiku/time-r0drv-haiku.c \
2021 generic/timer-generic.cpp \
2022 r0drv/memobj-r0drv.cpp \
2023 r0drv/powernotification-r0drv.c
2024
2025## PORTME: Porters create and add their selection of platform specific Ring-0 Driver files here.
2026
2027RuntimeR0Drv_ORDERDEPS.freebsd = \
2028 $(PATH_STAGE)/gen-sys-hdrs/bus_if.h \
2029 $(PATH_STAGE)/gen-sys-hdrs/device_if.h
2030
2031
2032#
2033# RuntimeGuestR0 - Guest driver runtime.
2034# This is almost the same as the RuntimeR0Drv, the main difference
2035# is in the backdoor logging and the lack of sup.h (which should be
2036# made irrelevant even for RuntimeR0Drv).
2037#
2038RuntimeGuestR0_TEMPLATE := VBOXGUESTR0LIB
2039RuntimeGuestR0_EXTENDS = RuntimeR0Drv
2040RuntimeGuestR0_SOURCES := $(filter-out generic/RTLogWriteUser-generic.cpp, $(RuntimeR0Drv_SOURCES))
2041RuntimeGuestR0_SOURCES += \
2042 VBox/logbackdoor.cpp
2043
2044
2045#
2046# RuntimeGuestR0NT4 - Win32 NT4 guest driver runtime.
2047#
2048RuntimeGuestR0NT4_EXTENDS = RuntimeGuestR0
2049RuntimeGuestR0NT4_EXTENDS_BY = appending
2050RuntimeGuestR0NT4_DEFS = IPRT_TARGET_NT4
2051
2052
2053ifdef VBOX_WITH_RAW_MODE
2054 #
2055 # RuntimeRC - Raw-mode context library.
2056 #
2057 RuntimeRC_TEMPLATE = VBoxRc
2058 RuntimeRC_DEFS = IN_RT_RC RT_WITH_VBOX
2059 RuntimeRC_INCS = include
2060 RuntimeRC_SOURCES := \
2061 common/checksum/crc32.cpp \
2062 common/checksum/crc64.cpp \
2063 common/checksum/md5.cpp \
2064 common/log/log.cpp \
2065 common/log/logellipsis.cpp \
2066 common/log/logrel.cpp \
2067 common/log/logrelellipsis.cpp \
2068 common/log/logcom.cpp \
2069 common/log/logformat.cpp \
2070 common/log/tracebuf.cpp \
2071 common/log/tracedefault.cpp \
2072 common/misc/RTAssertMsg1Weak.cpp \
2073 common/misc/RTAssertMsg2.cpp \
2074 common/misc/RTAssertMsg2Add.cpp \
2075 common/misc/RTAssertMsg2AddWeak.cpp \
2076 common/misc/RTAssertMsg2AddWeakV.cpp \
2077 common/misc/RTAssertMsg2Weak.cpp \
2078 common/misc/RTAssertMsg2WeakV.cpp \
2079 common/misc/assert.cpp \
2080 common/misc/buildconfig.cpp \
2081 common/misc/sanity-c.c \
2082 common/misc/sanity-cpp.cpp \
2083 common/path/RTPathFilename.cpp \
2084 common/string/strformat.cpp \
2085 common/string/strformatnum.cpp \
2086 common/string/strformatrt.cpp \
2087 common/string/strformattype.cpp \
2088 common/string/strncmp.cpp \
2089 common/string/strpbrk.cpp \
2090 common/string/strprintf.cpp \
2091 common/string/RTStrCopy.cpp \
2092 common/string/RTStrCopyEx.cpp \
2093 common/table/avllu32.cpp \
2094 common/table/avlou32.cpp \
2095 common/table/avlogcphys.cpp \
2096 common/table/avlogcptr.cpp \
2097 common/table/avlohcphys.cpp \
2098 common/table/avloioport.cpp \
2099 common/table/avlrogcphys.cpp \
2100 common/table/avlrogcptr.cpp \
2101 common/table/avlroioport.cpp \
2102 common/table/avlroogcptr.cpp \
2103 common/table/avlu32.cpp \
2104 common/time/timeprog.cpp \
2105 common/time/timesup.cpp \
2106 gc/initterm-gc.cpp \
2107 generic/RTAssertShouldPanic-generic.cpp \
2108 generic/errvars-generic.cpp \
2109 \
2110 $(RuntimeNoCrt_SOURCES)
2111
2112 #if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
2113 # RuntimeRC_SOURCES += common/time/timesupA.asm
2114 #else
2115 RuntimeRC_SOURCES += common/time/timesupref.cpp
2116 #endif
2117
2118 RuntimeRC_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
2119
2120 ifeq ($(VBOX_LDR_FMT32),lx)
2121 RuntimeRC_SOURCES += os2/sys0.asm
2122 endif
2123
2124 if1of ($(KBUILD_TARGET), darwin solaris freebsd)
2125 RuntimeRC_SOURCES += \
2126 common/math/gcc/adddi3.c \
2127 common/math/gcc/anddi3.c \
2128 common/math/gcc/ashldi3.c \
2129 common/math/gcc/ashrdi3.c \
2130 common/math/gcc/cmpdi2.c \
2131 common/math/gcc/divdi3.c \
2132 common/math/gcc/iordi3.c \
2133 common/math/gcc/lshldi3.c \
2134 common/math/gcc/lshrdi3.c \
2135 common/math/gcc/moddi3.c \
2136 common/math/gcc/muldi3.c \
2137 common/math/gcc/negdi2.c \
2138 common/math/gcc/notdi2.c \
2139 common/math/gcc/qdivrem.c \
2140 common/math/gcc/subdi3.c \
2141 common/math/gcc/ucmpdi2.c \
2142 common/math/gcc/udivdi3.c \
2143 common/math/gcc/umoddi3.c \
2144 common/math/gcc/xordi3.c
2145 endif
2146
2147
2148 #
2149 # RuntimeRCStub - Raw-mode context startup stub for Windows.
2150 #
2151 RuntimeRCStub_TEMPLATE = VBoxRc
2152 RuntimeRCStub_SOURCES.win = \
2153 nt/NtProcessStartup-stub.cpp
2154
2155
2156endif # VBOX_WITH_RAW_MODE
2157
2158
2159#
2160# Static library for new & delete for the electric fence.
2161#
2162RuntimeEFCPP_TEMPLATE := $(VBoxRT_TEMPLATE)
2163RuntimeEFCPP_SDKS := $(RuntimeR3_SDKS)
2164RuntimeEFCPP_SDKS.$(KBUILD_TARGET) := $(RuntimeR3_SDKS.$(KBUILD_TARGET))
2165RuntimeEFCPP_DEFS := $(RuntimeR3_DEFS)
2166RuntimeEFCPP_DEFS.$(KBUILD_TARGET) := $(RuntimeR3_DEFS.$(KBUILD_TARGET))
2167RuntimeEFCPP_INCS := $(RuntimeR3_INCS)
2168RuntimeEFCPP_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
2169RuntimeEFCPP_SOURCES := r3/alloc-ef-cpp.cpp
2170
2171
2172
2173#
2174# The NTDLL mini import library.
2175#
2176# Note! The reason for doing this is to avoid importing CRT symbols from the
2177# NTDLL. We do not wish to do this because:
2178# - Our compiler is usually a different one and we should use the
2179# matching CRT,
2180# - Older versions of NTDLL may not sport all the exports our w2k3 or
2181# later WINDDK ntdll.lib have and thus we may easily end up with
2182# images that does not load on older windows versions.
2183#
2184RuntimeR3NtDll-amd64_TEMPLATE = VBoxR3Dll
2185RuntimeR3NtDll-amd64_BLD_TRG_ARCH = amd64
2186RuntimeR3NtDll-amd64_ARFLAGS = /NODEFAULTLIB /MACHINE:amd64
2187RuntimeR3NtDll-amd64_SOURCES = \
2188 r3/win/ntdll-mini-implib.c \
2189 r3/win/ntdll-mini-implib.def
2190
2191RuntimeR3NtDll-x86_EXTENDS = RuntimeR3NtDll-amd64
2192RuntimeR3NtDll-x86_BLD_TRG_ARCH = x86
2193RuntimeR3NtDll-x86_ARFLAGS = /NODEFAULTLIB /MACHINE:x86
2194
2195
2196#
2197# Bag of tricks required for making VCC100 output binaries work on NT4, W2K
2198# early XP and early W2K3.
2199#
2200RuntimeR3VccTricks_TEMPLATE = VBoxR3Dll
2201RuntimeR3VccTricks_SOURCES = \
2202 r3/win/vcc100-kernel32-fakes.cpp \
2203 r3/win/vcc100-kernel32-fakesA.asm
2204
2205
2206#
2207# errmsg.cpp depends on a generated header.
2208#
2209common/err/errmsg.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgdata.h
2210common/err/errmsg.cpp_INCS = $(IPRT_OUT_DIR)
2211
2212win/errmsgwin.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgcomdata.h
2213win/errmsgwin.cpp_INCS = $(IPRT_OUT_DIR)
2214
2215# Our COM errors only for R3 libraries on the host
2216define def_errmsgwin_deps
2217 $(lib)_win/errmsgwin.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
2218 $(lib)_common/err/errmsgxpcom.cpp_INCS = $(IPRT_OUT_DIR)
2219 $(lib)_common/err/errmsgxpcom.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
2220endef
2221$(foreach lib,RuntimeR3 RuntimeBldProg VBoxRT RuntimeLnxHostR3,$(eval $(def_errmsgwin_deps)))
2222
2223
2224#
2225# Generate the status code data.
2226#
2227$(IPRT_OUT_DIR)/errmsgdata.h: \
2228 $(VBOX_PATH_RUNTIME_SRC)/common/err/errmsg.sed \
2229 $(PATH_ROOT)/include/iprt/err.h \
2230 $(PATH_ROOT)/include/VBox/err.h \
2231 | $$(dir $$@)
2232 $(call MSG_GENERATE,,$@,$(filter %.h,$^))
2233 $(QUIET)$(REDIRECT) -wo $@ -- $(SED) -f $< $(filter %.h,$^)
2234
2235## @todo r=bird: rename this to indicate that it's not only COM errors, but all win32/64 errors.
2236$(IPRT_OUT_DIR)/errmsgcomdata.h: \
2237 $(VBOX_PATH_RUNTIME_SRC)/common/err/errmsgcom.sed \
2238 $$(PATH_SDK_$(VBOX_WINPSDK)_INC)/WinError.h \
2239 | $$(dir $$@)
2240 $(call MSG_GENERATE,,$@,$(filter %.h,$^))
2241 $(QUIET)$(REDIRECT) -wo $@ -- $(SED) -f $< $(filter %.h,$^)
2242
2243$(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts +| $(IPRT_OUT_DIR)/errmsgvboxcomdata.h: \
2244 $(VBOX_PATH_RUNTIME_SRC)/VBox/errmsgvboxcom.xsl \
2245 $(VBOX_XIDL_FILE_SRC) \
2246 | $$(dir $$@)
2247 $(call MSG_GENERATE,,$@,$(filter %.xidl,$^))
2248 $(QUIET)$(VBOX_XSLTPROC) -o $(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts $< $(filter %.xidl,$^)
2249 $(QUIET)$(CP) --changed -fv $(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
2250
2251
2252if "$(KBUILD_TARGET)" == "freebsd"
2253#
2254# FreeBSDGeneratedKernelHeaders - Generate some kernel interface headers.
2255#
2256# These are used by:
2257# - The RTMp* API in IPRT.
2258# - VBoxGuest
2259#
2260# Note! We cannot give a output path to the awk program, it will always
2261# generate the header next to the source. So, we'll have to temporarily copy
2262# the source file to the destination directory to work.
2263#
2264VBOX_AWK := /usr/bin/awk
2265INSTALLS += FreeBSDGeneratedKernelHeaders
2266FreeBSDGeneratedKernelHeaders_INST = gen-sys-hdrs/
2267FreeBSDGeneratedKernelHeaders_SOURCES = \
2268 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/bus_if.h \
2269 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/device_if.h \
2270 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/pci_if.h
2271FreeBSDGeneratedKernelHeaders_CLEAN = $(FreeBSDGeneratedKernelHeaders_SOURCES)
2272
2273$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/bus_if.h: $(VBOX_FREEBSD_SRC)/kern/bus_if.m | $$(dir $$@)
2274 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
2275 $(QUIET)$(CP) -f $< $(@D)/bus_if.m
2276 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/bus_if.m -h -p
2277 $(QUIET)$(RM) $(@D)/bus_if.m
2278
2279$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/device_if.h: $(VBOX_FREEBSD_SRC)/kern/device_if.m | $$(dir $$@)
2280 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
2281 $(QUIET)$(CP) -f $< $(@D)/device_if.m
2282 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/device_if.m -h -p
2283 $(QUIET)$(RM) $(@D)/device_if.m
2284
2285$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/pci_if.h: $(VBOX_FREEBSD_SRC)/dev/pci/pci_if.m | $$(dir $$@)
2286 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
2287 $(QUIET)$(CP) -f $< $(@D)/pci_if.m
2288 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/pci_if.m -h -p
2289 $(QUIET)$(RM) $(@D)/pci_if.m
2290endif # FreeBSD
2291
2292
2293#
2294# Aliases for .cpp.h files so we can more easily do syntax checking from the editor.
2295#
2296ldrELFRelocatable.cpp.o: ldrELF.o
2297ldrELFRelocatable.cpp.obj: ldrELF.obj
2298
2299
2300#
2301# Doxygen documentation.
2302#
2303IPRT_DOXYFILE_INPUT_DIRS = \
2304 $(PATH_ROOT)/include/iprt \
2305 $(PATH_ROOT)/include/iprt/cpp \
2306 $(PATH_ROOT)/include/iprt/linux \
2307 $(PATH_ROOT)/include/iprt/nocrt \
2308 $(PATH_ROOT)/include/iprt/nocrt/x86 \
2309 $(PATH_ROOT)/include/iprt/nocrt/amd64 \
2310 $(PATH_ROOT)/include/iprt/nocrt/compiler \
2311 $(VBOX_PATH_RUNTIME_SRC)/include/internal \
2312 $(VBOX_PATH_RUNTIME_SRC)/common/alloc \
2313 $(VBOX_PATH_RUNTIME_SRC)/common/asm \
2314 $(VBOX_PATH_RUNTIME_SRC)/common/checksum \
2315 $(VBOX_PATH_RUNTIME_SRC)/common/dbg \
2316 $(VBOX_PATH_RUNTIME_SRC)/common/err \
2317 $(VBOX_PATH_RUNTIME_SRC)/common/ldr \
2318 $(VBOX_PATH_RUNTIME_SRC)/common/log \
2319 $(VBOX_PATH_RUNTIME_SRC)/common/math \
2320 $(VBOX_PATH_RUNTIME_SRC)/common/math/amd64 \
2321 $(VBOX_PATH_RUNTIME_SRC)/common/math/gcc \
2322 $(VBOX_PATH_RUNTIME_SRC)/common/math/x86 \
2323 $(VBOX_PATH_RUNTIME_SRC)/common/misc \
2324 $(VBOX_PATH_RUNTIME_SRC)/common/path \
2325 $(VBOX_PATH_RUNTIME_SRC)/common/rand \
2326 $(VBOX_PATH_RUNTIME_SRC)/common/string \
2327 $(VBOX_PATH_RUNTIME_SRC)/common/table \
2328 $(VBOX_PATH_RUNTIME_SRC)/common/time \
2329 $(VBOX_PATH_RUNTIME_SRC)/VBox \
2330 $(foreach dir, $(VBOX_PATH_RUNTIME_SRC) $(VBOX_PATH_RUNTIME_SRC)/r3 $(VBOX_PATH_RUNTIME_SRC)/r0drv,\
2331 $(dir) \
2332 $(dir)/darwin \
2333 $(dir)/haiku \
2334 $(dir)/l4 \
2335 $(dir)/linux \
2336 $(dir)/nt \
2337 $(dir)/os2 \
2338 $(dir)/solaris \
2339 $(dir)/win \
2340 $(dir)/win32 \
2341 $(dir)/win64 \
2342 $(dir)/generic \
2343 )
2344
2345# These must come first in order to make things look nice.
2346IPRT_DOXYFILE_INPUT_FIRST =\
2347 $(PATH_ROOT)/include/iprt/cdefs.h \
2348 $(PATH_ROOT)/include/iprt/types.h \
2349 $(PATH_ROOT)/include/iprt/runtime.h \
2350 $(PATH_ROOT)/include/iprt/param.h \
2351 $(PATH_ROOT)/include/iprt/assert.h \
2352 $(PATH_ROOT)/include/iprt/asm.h \
2353
2354IPRT_DOXYFILE_INPUT := \
2355 $(filter-out %.cpp.h, $(sort $(wildcard $(addsuffix /*.h, $(IPRT_DOXYFILE_INPUT_DIRS)))) ) \
2356 $(foreach dir, $(IPRT_DOXYFILE_INPUT_DIRS), $(wildcard $(dir)/*.cpp $(dir)/.c $(dir)/.asm))
2357IPRT_DOXYFILE_INPUT := \
2358 $(IPRT_DOXYFILE_INPUT_FIRST) \
2359 $(filter-out $(IPRT_DOXYFILE_INPUT_FIRST), $(IPRT_DOXYFILE_INPUT))
2360
2361
2362IPRT_DOXYFILE_OUTPUT = $(PATH_OUT)/docs/iprt
2363BLDDIRS += $(IPRT_DOXYFILE_OUTPUT)
2364
2365includedep $(IPRT_OUT_DIR)/Doxyfile.iprt.dep
2366
2367# Generate the Doxyfile
2368$(IPRT_OUT_DIR)/Doxyfile.iprt: \
2369 $(VBOX_PATH_RUNTIME_SRC)/Doxyfile \
2370 $(VBOX_PATH_RUNTIME_SRC)/Makefile.kmk \
2371 $(comp-vars IPRT_DOXYFILE_INPUT,DOXYGEN_INPUT_PREV,FORCE) \
2372 $(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE) \
2373 | $$(dir $$@)
2374 $(RM) -f $@ [email protected] [email protected]
2375 $(CP) -f $(VBOX_PATH_RUNTIME_SRC)/Doxyfile [email protected]
2376 $(APPEND) [email protected]
2377 $(APPEND) [email protected] "OUTPUT_DIRECTORY = $(IPRT_DOXYFILE_OUTPUT)"
2378 $(APPEND) [email protected] "WARN_LOGFILE = $(IPRT_DOXYFILE_OUTPUT)/errors"
2379 $(APPEND) [email protected] "INCLUDE_PATH = $(PATH_ROOT)/include include . common/table"
2380 $(APPEND) [email protected] "INCLUDE_FILE_PATTERNS = *.cpp.h"
2381 $(APPEND) [email protected] "PREDEFINED += $(ARCH_BITS_DEFS)"
2382 $(APPEND) [email protected]
2383 $(APPEND) [email protected] "INPUT = $(IPRT_DOXYFILE_INPUT)"
2384 $(APPEND) [email protected]
2385 $(MV) -f [email protected] $@
2386 @$(APPEND) [email protected] "DOXYGEN_OUTPUT_PREV = $(IPRT_DOXYFILE_OUTPUT)"
2387 @$(APPEND) [email protected] "DOXYGEN_INPUT_PREV = $(IPRT_DOXYFILE_INPUT)"
2388
2389# Do the actual job.
2390$(IPRT_OUT_DIR)/docs.iprt: $(IPRT_OUT_DIR)/Doxyfile.iprt $$(IPRT_DOXYFILE_INPUT) | $(IPRT_DOXYFILE_OUTPUT)/
2391 $(RM) -f $(wildcard $(IPRT_DOXYFILE_OUTPUT)/html/*) $(IPRT_OUT_DIR)/docs.iprt
2392 doxygen $(IPRT_OUT_DIR)/Doxyfile.iprt
2393 $(APPEND) $(IPRT_OUT_DIR)/docs.iprt
2394
2395# aliases
2396docs.iprt: $(IPRT_OUT_DIR)/docs.iprt
2397if !defined(VBOX_ONLY_DOCS) && defined(VBOX_WITH_ALL_DOXYGEN_TARGETS)
2398docs: $(IPRT_OUT_DIR)/docs.iprt
2399endif
2400
2401test-doxygen::
2402 @echo test-$(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE)
2403 @echo $(IPRT_DOXYFILE_OUTPUT)
2404 @echo $(DOXYGEN_OUTPUT_PREV)
2405 @echo $(IPRT_DOXYFILE_INPUT)
2406
2407
2408#
2409# Test mangling.
2410#
2411if1of ($(LIBRARIES),RuntimeR3 RuntimeR0 RuntimeR0Drv RuntimeRC)
2412 test-mangling:: $(IPRT_OUT_DIR)/mangling.run
2413 OTHERS += $(IPRT_OUT_DIR)/mangling.run
2414 CLEANS += $(IPRT_OUT_DIR)/mangling.run
2415 $(IPRT_OUT_DIR)/mangling.run: \
2416 $$(RuntimeR3_1_TARGET) \
2417 $$(RuntimeR0_1_TARGET) \
2418 $$(RuntimeR0Drv_1_TARGET) \
2419 $$(RuntimeRC_1_TARGET)
2420 if1of ($(KBUILD_TARGET), win os2)
2421 $(call MSG_L1,IPRT: skipped mangling test.)
2422 else
2423# Generate a SED script from mangling.h that checks for known symbols.
2424 @$(SED) \
2425 -e '/# *define.*RT_MANGLER/!d' \
2426 -e 's/^.*RT_MANGLER(\([^)][^)]*\)).*$(DOLLAR)/\/^\1$(DOLLAR)\/b ok/' \
2427 $(PATH_ROOT)/include/iprt/mangling.h \
2428 --output "$@"
2429 @$(APPEND) -n '$@' \
2430 ':bad' \
2431 's/^\(.*\)$(DOLLAR)/error: Missing # define \1 RT_MANGLER(\1)/' \
2432 'p' \
2433 'q 1' \
2434 '' \
2435 ':ok' \
2436 'd'
2437# Find the best way to generate a symbol list and subject it to mangling.h.
2438 if $(intersects $(KBUILD_TARGET), linux) && "$(VBOX_GCC_fvisibility-hidden)"
2439 $(call MSG_L1,IPRT: Testing mangling and visiblity...)
2440 @readelf -Ws $^ \
2441 | $(SED) \
2442 -e '/^ *[[:digit:]]\+:/!d' \
2443 -e 's/^ \+[[:digit:]]\+: \+[[:xdigit:]]\+ \+[[:digit:]]\+ \+//' \
2444 -e '/^SECTION/d' \
2445 -e '/^FILE/d' \
2446 -e 's/^[[:alpha:]]\+ \+//' \
2447 -e '/LOCAL/d' \
2448 -e 's/^[[:alpha:]]\+ \+//' \
2449 -e '/^HIDDEN/d' \
2450 -e 's/^[[:alpha:]]\+ \+//' \
2451 -e '/^UND/d' \
2452 -e 's/^[[:digit:]]\+ \+//' \
2453 \
2454 -e '/^nocrt_/d' \
2455 -e '/^memchr/d' \
2456 -e '/^memcmp/d' \
2457 -e '/^memcpy/d' \
2458 -e '/^mempcpy/d' \
2459 -e '/^memmove/d' \
2460 -e '/^memset/d' \
2461 -e '/^strchr/d' \
2462 -e '/^strpbrk/d' \
2463 -e '/^_Z7strpbrk/d' \
2464 -e '/^strcmp/d' \
2465 -e '/^strcpy/d' \
2466 -e '/^strncpy/d' \
2467 -e '/^strlen/d' \
2468 -e '/^_Z[[:alpha:]]*[[:digit:]]\+RTC/d' \
2469 \
2470 -e '/^_ZNSt9bad_allocC1Ev/d' \
2471 -e '/^_ZNSt9exceptionC2Ev/d' \
2472 \
2473 -e '/^_Z[[:digit:]]\+dbus/d' \
2474 -e '/^_Z13RTDBusLoadLibv/d' \
2475 \
2476 -e '/^VBoxHost_/d'\
2477 -e '/^VBoxGuest_/d'\
2478 | $(SED) -nf "$@"
2479 else
2480 $(call MSG_L1,IPRT: Testing mangling...)
2481 nm $^ | $(SED) -n \
2482 -e 's/^[0-9a-f][0-9a-f]* //' \
2483 -e '/^[TUDB] /!d' \
2484 -e 's/^. //' \
2485 \
2486 -e '/^g_cchrt/d'\
2487 -e '/^g_frt/d'\
2488 -e '/^g_offrt/d'\
2489 -e '/^g_pfnrt/d'\
2490 -e '/^g_rt/d'\
2491 -e '/^g_szrt/d'\
2492 -e '/^g_ProcessSelf/d'\
2493 -e '/^g_u64ProgramStart/d'\
2494 -e '/^g_enmProcessPriority/d'\
2495 -e '/^g_hDbgModStrCache/d'\
2496 \
2497 -e '/^RTDBusLoadLib/d' \
2498 \
2499 -e '/^RT/p' \
2500 -e '/^g_/p' \
2501 | $(SED) -nf "$@"
2502 endif
2503 endif
2504endif
2505 $(QUIET)$(APPEND) -t $@
2506
2507if !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_TESTSUITE) && !defined(VBOX_ONLY_DOCS)
2508#
2509# Windows build tool.
2510#
2511BLDPROGS.win += ntBldSymDb
2512ntBldSymDb_TEMPLATE = VBoxAdvBldProg
2513ntBldSymDb_INCS = .
2514ntBldSymDb_SOURCES = r0drv/nt/ntBldSymDb.cpp
2515endif
2516
2517#
2518# Generate the rules (we're the to sub-makefile).
2519#
2520include $(FILE_KBUILD_SUB_FOOTER)
2521
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