VirtualBox

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

Last change on this file since 25636 was 25536, checked in by vboxsync, 15 years ago

iprt/assert.h: Added RTAssertMsg2Add[Weak][V] for dumping the lock deadlock chain and stacks. Added the missing internal/assert.h file to the linux and freebsd kernel source trees.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 56.7 KB
Line 
1# $Id: Makefile.kmk 25536 2009-12-21 11:06:08Z vboxsync $
2## @file
3# Sub-Makefile for the IPRT (IPRT).
4#
5
6#
7# Copyright (C) 2006-2007 Sun Microsystems, Inc.
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# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
27# Clara, CA 95054 USA or visit http://www.sun.com if you need
28# additional information or have any questions.
29#
30
31SUB_DEPTH = ../../..
32include $(KBUILD_PATH)/subheader.kmk
33
34ifdef VBOX_ONLY_ADDITIONS
35 #
36 # Only build the additions, sort out the legacy names first.
37 #
38 LIBRARIES += RuntimeGuestR3 RuntimeGuestR3Shared RuntimeGuestR3Mini
39 ifdef VBOX_WITH_ADDITION_DRIVERS
40 LIBRARIES += RuntimeGuestR0
41 endif
42 #LIBRARIES.os2 += RuntimeGuestR0OS2Warp3
43 LIBRARIES.win.x86 += RuntimeGuestR0NT4
44
45else ifdef VBOX_ONLY_DOCS
46 #
47 # Build docs only - need just regular R3 runtime.
48 #
49 LIBRARIES += RuntimeR3
50 DLLS += VBoxRT
51
52else # !VBOX_ONLY_ADDITIONS && !VBOX_ONLY_DOCS
53
54 #
55 # Normal build.
56 #
57 include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
58
59 BLDPROGS += uniread
60 LIBRARIES += RuntimeR3 RuntimeR0 RuntimeGC RuntimeEFCPP RuntimeR3NoCRTGCC
61 ifdef VBOX_WITH_VBOXDRV
62 LIBRARIES += RuntimeR0Drv
63 endif
64 ifdef VBOX_WITH_ADDITIONS
65 LIBRARIES += RuntimeGuestR3 RuntimeGuestR3Shared RuntimeGuestR3Mini
66 ifdef VBOX_WITH_ADDITION_DRIVERS
67 LIBRARIES += RuntimeGuestR0
68 endif
69 #LIBRARIES.os2 += RuntimeGuestR0OS2Warp3
70 LIBRARIES.win.x86 += RuntimeGuestR0NT4
71 endif # VBOX_WITH_ADDITIONS
72 LIBRARIES.l4 += RuntimeR3L4 RuntimeLnxHostR3
73 DLLS += VBoxRT
74endif
75
76# Where the generated stuff goes.
77IPRT_OUT_DIR := $(PATH_TARGET)/Runtime
78BLDDIRS += $(IPRT_OUT_DIR)
79OTHER_CLEAN += \
80 $(IPRT_OUT_DIR)/errmsgdata.h \
81 $(IPRT_OUT_DIR)/errmsgcomdata.h \
82 $(IPRT_OUT_DIR)/errmsgvboxcomdata.h \
83 $(IPRT_OUT_DIR)/Doxyfile.iprt \
84 $(IPRT_OUT_DIR)/Doxyfile.iprt.dep \
85 $(IPRT_OUT_DIR)/docs.iprt
86
87
88#
89# Globals
90#
91VBOX_PATH_RUNTIME_SRC := $(PATH_SUB_CURRENT)
92
93
94#
95# Set the defines that buildconfig.cpp needs. Its used by several targets.
96#
97common/misc/buildconfig.cpp_DEFS = \
98 IPRT_BLDCFG_SCM_REV=$(VBOX_SVN_REV) \
99 IPRT_BLDCFG_VERSION_STRING=\"$(VBOX_VERSION_STRING)\" \
100 IPRT_BLDCFG_VERSION_MAJOR=$(VBOX_VERSION_MAJOR) \
101 IPRT_BLDCFG_VERSION_MINOR=$(VBOX_VERSION_MINOR) \
102 IPRT_BLDCFG_VERSION_BUILD=$(VBOX_VERSION_BUILD)
103
104#
105# Unicode Specification reader used to regenerate unidata.cpp.
106#
107uniread_TEMPLATE = VBOXBLDPROG
108uniread_SOURCES = common/string/uniread.cpp
109uniread_INCS = include
110
111#
112# Win64 assembly sources.
113#
114RuntimeWin64ASM_SOURCES = \
115 win/amd64/ASMAtomicBitClear.asm \
116 win/amd64/ASMAtomicBitTestAndToggle.asm \
117 win/amd64/ASMAtomicBitToggle.asm \
118 win/amd64/ASMAtomicReadU64.asm \
119 win/amd64/ASMAtomicXchgU16.asm \
120 win/amd64/ASMAtomicXchgU8.asm \
121 win/amd64/ASMBitFirstClear.asm \
122 win/amd64/ASMBitFirstSet.asm \
123 win/amd64/ASMGetCS.asm \
124 win/amd64/ASMGetDS.asm \
125 win/amd64/ASMGetES.asm \
126 win/amd64/ASMGetFlags.asm \
127 win/amd64/ASMGetFS.asm \
128 win/amd64/ASMGetGS.asm \
129 win/amd64/ASMGetIDTR.asm \
130 win/amd64/ASMGetGDTR.asm \
131 win/amd64/ASMGetTR.asm \
132 win/amd64/ASMGetSS.asm \
133 win/amd64/ASMProbeReadByte.asm \
134 win/amd64/ASMSetFlags.asm \
135 win/amd64/ASMGetDR0.asm \
136 win/amd64/ASMGetDR1.asm \
137 win/amd64/ASMGetDR2.asm \
138 win/amd64/ASMGetDR3.asm \
139 win/amd64/ASMGetDR6.asm \
140 win/amd64/ASMGetDR7.asm \
141 common/asm/ASMAtomicCmpXchgU8.asm \
142 common/asm/ASMMultU64ByU32DivByU32.asm \
143 common/asm/ASMNopPause.asm
144
145#
146# Win32 assembly sources.
147#
148RuntimeWin32ASM_SOURCES = \
149 common/asm/ASMAtomicCmpXchgU8.asm \
150 common/asm/ASMMultU64ByU32DivByU32.asm
151
152#
153# NoCRT sources (minus math stuff).
154#
155RuntimeNoCrt_SOURCES = \
156 common/misc/setjmp.asm \
157 common/string/memchr.asm \
158 common/string/memcmp.asm \
159 common/string/memcpy.asm \
160 common/string/mempcpy.asm \
161 common/string/memmove.asm \
162 common/string/memset.asm \
163 common/string/strchr.asm \
164 common/string/strcpy.asm \
165 common/string/strcmp.asm \
166 common/string/strlen.asm
167
168
169#
170# RuntimeR3 - Static Runtime for Ring-3 executables.
171#
172RuntimeR3_TEMPLATE = VBOXR3STATIC
173RuntimeR3_SDKS = VBOX_LIBXML2 VBOX_BOOST
174RuntimeR3_SDKS.win = WINPSDK W2K3DDK
175RuntimeR3_DEFS = IN_RT_R3 IN_SUP_R3 LDR_WITH_NATIVE LDR_WITH_ELF32 LDR_WITH_PE RT_WITH_VBOX RT_NO_GIP
176ifdef IPRT_WITH_KSTUFF
177 RuntimeR3_DEFS += LDR_WITH_KLDR
178endif
179ifdef VBOX_MAIN_RELEASE_LOG ## @todo (dmik): temporary, until RTThreadSelf/RTThreadAdopt are properly updated
180 RuntimeR3_DEFS += RTCRITSECT_STRICT
181endif
182ifdef IPRT_WITH_LZJB
183 RuntimeR3_DEFS += RTZIP_USE_LZJB
184endif
185ifdef IPRT_WITH_LZO
186 RuntimeR3_DEFS += RTZIP_USE_LZO
187endif
188ifdef IPRT_WITH_FUTEX_BASED_SEMS
189 RuntimeR3_DEFS.linux += IPRT_WITH_FUTEX_BASED_SEMS
190endif
191RuntimeR3_INCS = \
192 include \
193 $(SDK_VBOX_ZLIB_INCS)
194RuntimeR3_INCS += \
195 $(PATH_ROOT)/src/libs/liblzf-3.4
196ifdef IPRT_WITH_KSTUFF
197 RuntimeR3_INCS += \
198 $(PATH_ROOT)/src/libs/kStuff/kStuff/include
199endif
200RuntimeR3_INCS.l4 = \
201 $(L4_INCDIR)
202
203# RuntimeR3_INCS.solaris = \
204# /usr/include
205
206RuntimeR3_SOURCES = \
207 common/alloc/alloc.cpp \
208 common/alloc/heapsimple.cpp \
209 common/alloc/heapoffset.cpp \
210 common/checksum/adler32.cpp \
211 common/checksum/crc32-zlib.cpp \
212 common/checksum/crc64.cpp \
213 common/checksum/md5.cpp \
214 common/checksum/md5str.cpp \
215 common/checksum/ipv4.cpp \
216 common/dbg/dbg.cpp \
217 common/dbg/dbgas.cpp \
218 common/dbg/dbgmod.cpp \
219 common/dbg/dbgmodcontainer.cpp \
220 common/dbg/dbgmodnm.cpp \
221 common/err/errmsg.cpp \
222 common/err/RTErrConvertFromErrno.cpp \
223 common/err/RTErrConvertToErrno.cpp \
224 common/ldr/ldr.cpp \
225 common/ldr/ldrELF.cpp \
226 common/ldr/ldrEx.cpp \
227 common/ldr/ldrFile.cpp \
228 common/ldr/ldrNative.cpp \
229 common/ldr/ldrPE.cpp \
230 common/log/log.cpp \
231 common/log/logellipsis.cpp \
232 common/log/logrel.cpp \
233 common/log/logrelellipsis.cpp \
234 common/log/logcom.cpp \
235 common/log/logformat.cpp \
236 common/misc/RTAssertMsg1Weak.cpp \
237 common/misc/RTAssertMsg2.cpp \
238 common/misc/RTAssertMsg2Add.cpp \
239 common/misc/RTAssertMsg2AddWeak.cpp \
240 common/misc/RTAssertMsg2AddWeakV.cpp \
241 common/misc/RTAssertMsg2Weak.cpp \
242 common/misc/RTAssertMsg2WeakV.cpp \
243 common/misc/assert.cpp \
244 common/misc/buildconfig.cpp \
245 common/misc/cache.cpp \
246 common/misc/cidr.cpp \
247 common/misc/getopt.cpp \
248 common/misc/handletable.cpp \
249 common/misc/handletablectx.cpp \
250 common/misc/handletablesimple.cpp \
251 common/misc/lockvalidator.cpp \
252 common/misc/message.cpp \
253 common/misc/once.cpp \
254 common/misc/req.cpp \
255 common/misc/sanity-c.c \
256 common/misc/sanity-cpp.cpp \
257 common/misc/semspingpong.cpp \
258 common/misc/thread.cpp \
259 common/misc/zip.cpp \
260 common/misc/term.cpp \
261 common/misc/tar.cpp \
262 common/path/rtPathVolumeSpecLen.cpp \
263 common/path/RTPathAbsDup.cpp \
264 common/path/RTPathAbsEx.cpp \
265 common/path/RTPathAbsExDup.cpp \
266 common/path/RTPathAppend.cpp \
267 common/path/RTPathExt.cpp \
268 common/path/RTPathFilename.cpp \
269 common/path/RTPathHaveExt.cpp \
270 common/path/RTPathHavePath.cpp \
271 common/path/RTPathParse.cpp \
272 common/path/RTPathRealDup.cpp \
273 common/path/RTPathStripExt.cpp \
274 common/path/RTPathStripFilename.cpp \
275 common/path/RTPathStripTrailingSlash.cpp \
276 common/path/RTPathTraverseList.cpp \
277 common/path/comparepaths.cpp \
278 common/rand/rand.cpp \
279 common/rand/randadv.cpp \
280 common/rand/randparkmiller.cpp \
281 common/string/RTStrCmp.cpp \
282 common/string/RTStrConvertHexBytes.cpp \
283 common/string/RTStrNCmp.cpp \
284 common/string/RTStrNLen.cpp \
285 common/string/RTStrNLenEx.cpp \
286 common/string/RTStrPrintHexBytes.cpp \
287 common/string/RTStrStr.cpp \
288 common/string/base64.cpp \
289 common/string/simplepattern.cpp \
290 common/string/straprintf.cpp \
291 common/string/strformat.cpp \
292 common/string/strformatrt.cpp \
293 common/string/strformattype.cpp \
294 common/string/string.cpp \
295 common/string/strprintf.cpp \
296 common/string/strspace.cpp \
297 common/string/strstrip.cpp \
298 common/string/strtonum.cpp \
299 common/string/strversion.cpp \
300 common/string/uni.cpp \
301 common/string/unidata.cpp \
302 common/string/utf-16.cpp \
303 common/string/utf-8.cpp \
304 common/string/utf-8-case.cpp \
305 common/string/ministring.cpp \
306 common/table/avlgcptr.cpp \
307 common/table/avlhcphys.cpp \
308 common/table/avllu32.cpp \
309 common/table/avlou32.cpp \
310 common/table/avlogcphys.cpp \
311 common/table/avlogcptr.cpp \
312 common/table/avlohcphys.cpp \
313 common/table/avloioport.cpp \
314 common/table/avlpv.cpp \
315 common/table/avlrgcptr.cpp \
316 common/table/avlrogcphys.cpp \
317 common/table/avlrogcptr.cpp \
318 common/table/avlroioport.cpp \
319 common/table/avlroogcptr.cpp \
320 common/table/avlruintptr.cpp \
321 common/table/avlrfoff.cpp \
322 common/table/avlu32.cpp \
323 common/table/avluintptr.cpp \
324 common/table/avlul.cpp \
325 common/table/table.cpp \
326 common/time/time.cpp \
327 common/time/timeprog.cpp \
328 common/time/timesup.cpp \
329 generic/critsect-generic.cpp \
330 generic/env-generic.cpp \
331 generic/RTDirCreateTemp-generic.cpp \
332 generic/RTFileCopy-generic.cpp \
333 generic/RTFileQuerySize-generic.cpp \
334 generic/RTFileReadAll-generic.cpp \
335 generic/RTFileReadAllEx-generic.cpp \
336 generic/RTFileReadAllByHandle-generic.cpp \
337 generic/RTFileReadAllByHandleEx-generic.cpp \
338 generic/RTFileReadAllFree-generic.cpp \
339 generic/RTLogWriteStdErr-generic.cpp \
340 generic/RTLogWriteStdOut-generic.cpp \
341 generic/RTLogWriteUser-generic.cpp \
342 generic/RTMpGetDescription-generic.cpp \
343 generic/RTTimerLRCreate-generic.cpp \
344 generic/mempool-generic.cpp \
345 generic/semfastmutex-generic.cpp \
346 generic/semxroads-generic.cpp \
347 generic/spinlock-generic.cpp \
348 generic/strcache-stubs-generic.cpp \
349 generic/timerlr-generic.cpp \
350 r3/alloc-ef.cpp \
351 r3/alloc.cpp \
352 r3/dir.cpp \
353 r3/fileio.cpp \
354 r3/fs.cpp \
355 r3/init.cpp \
356 r3/path.cpp \
357 r3/process.cpp \
358 r3/stream.cpp \
359 r3/test.cpp \
360 r3/testi.cpp \
361 r3/tcp.cpp \
362 r3/generic/semspinmutex-r3-generic.cpp
363
364#if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
365# RuntimeR3_SOURCES += common/time/timesupA.asm
366#else
367 RuntimeR3_SOURCES += common/time/timesupref.cpp
368#endif
369
370ifdef IPRT_WITH_LZJB
371 RuntimeR3_SOURCES += common/misc/lzjb.c
372endif
373
374# Some versions of GCC might require this.
375RuntimeR3_SOURCES.x86 += \
376 common/asm/ASMAtomicCmpXchgU64.asm \
377 common/asm/ASMAtomicReadU64.asm
378
379ifdef IPRT_WITH_KSTUFF
380 RuntimeR3_SOURCES += \
381 common/ldr/ldrkStuff.cpp
382endif
383
384# VBox specific stuff.
385RuntimeR3_SOURCES += \
386 VBox/strformat-vbox.cpp \
387 VBox/RTAssertShouldPanic-vbox.cpp \
388 VBox/log-vbox.cpp
389ifneq ($(KBUILD_TARGET),win)
390RuntimeR3_SOURCES += \
391 common/err/errmsgxpcom.cpp
392endif
393if1of ($(KBUILD_TARGET),freebsd linux netbsd openbsd solaris)
394RuntimeR3_SOURCES += \
395 $(if $(VBOX_WITH_DBUS),VBox/dbus.cpp,)
396endif
397
398RuntimeR3_SOURCES.win = \
399 generic/RTDirExists-generic.cpp \
400 generic/RTDirQueryInfo-generic.cpp \
401 generic/RTDirSetTimes-generic.cpp \
402 generic/RTFileExists-generic.cpp \
403 generic/RTMpGetCurFrequency-generic.cpp \
404 generic/RTMpGetMaxFrequency-generic.cpp \
405 generic/RTRandAdvCreateSystemFaster-generic.cpp \
406 generic/RTRandAdvCreateSystemTruer-generic.cpp \
407 generic/RTSemEventWait-generic.cpp \
408 generic/RTSemEventMultiWait-generic.cpp \
409 generic/RTSemMutexRequest-generic.cpp \
410 generic/RTSemMutexRequestDebug-generic.cpp \
411 generic/mppresent-generic.cpp \
412 generic/semrw-generic.cpp \
413 generic/uuid-generic.cpp \
414 generic/RTProcIsRunningByName-generic.cpp \
415 nt/RTErrConvertFromNtStatus.cpp \
416 r3/posix/env-posix.cpp \
417 r3/win/RTSystemQueryOSInfo-win.cpp \
418 r3/win/alloc-win.cpp \
419 r3/win/dir-win.cpp \
420 r3/win/fileio-win.cpp \
421 r3/win/fs-win.cpp \
422 r3/win/ldrNative-win.cpp \
423 r3/win/localipc-win.cpp \
424 r3/win/mp-win.cpp \
425 r3/win/path-win.cpp \
426 r3/win/process-win.cpp \
427 r3/win/RTLogWriteDebugger-win.cpp \
428 r3/win/rtProcInitExePath-win.cpp \
429 r3/win/sched-win.cpp \
430 r3/win/semevent-win.cpp \
431 r3/win/semeventmulti-win.cpp \
432 r3/win/semmutex-win.cpp \
433 r3/win/rtFileNativeSetAttributes-win.cpp \
434 r3/win/thread-win.cpp \
435 r3/win/time-win.cpp \
436 r3/win/timer-win.cpp \
437 r3/win/tls-win.cpp \
438 r3/win/utf16locale-win.cpp \
439 r3/win/utf8-win.cpp \
440 r3/win/RTUuidCreate-win.cpp \
441 win/errmsgwin.cpp \
442 win/RTErrConvertFromWin32.cpp
443
444RuntimeR3_SOURCES.win.amd64 = $(RuntimeWin64ASM_SOURCES)
445RuntimeR3_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
446
447RuntimeR3_SOURCES.linux = \
448 generic/pathhost-generic.cpp \
449 generic/RTDirQueryInfo-generic.cpp \
450 generic/RTDirSetTimes-generic.cpp \
451 generic/RTFileMove-generic.cpp \
452 generic/RTLogWriteDebugger-generic.cpp \
453 generic/RTTimeLocalNow-generic.cpp \
454 generic/RTTimerCreate-generic.cpp \
455 generic/RTUuidCreate-generic.cpp \
456 generic/mppresent-generic.cpp \
457 generic/utf16locale-generic.cpp \
458 generic/uuid-generic.cpp \
459 r3/linux/mp-linux.cpp \
460 r3/linux/rtProcInitExePath-linux.cpp \
461 r3/linux/sched-linux.cpp \
462 r3/linux/sysfs.cpp \
463 r3/linux/time-linux.cpp \
464 r3/linux/RTProcIsRunningByName-linux.cpp \
465 r3/posix/RTFileQueryFsSizes-posix.cpp \
466 r3/posix/RTSystemQueryOSInfo-posix.cpp \
467 r3/posix/alloc-posix.cpp \
468 r3/posix/dir-posix.cpp \
469 r3/posix/env-posix.cpp \
470 r3/posix/fileio-posix.cpp \
471 r3/posix/filelock-posix.cpp \
472 r3/posix/fs-posix.cpp \
473 r3/posix/ldrNative-posix.cpp \
474 r3/posix/path-posix.cpp \
475 r3/posix/process-posix.cpp \
476 r3/posix/rand-posix.cpp \
477 r3/posix/RTTimeNow-posix.cpp \
478 r3/posix/semrw-posix.cpp \
479 r3/posix/thread-posix.cpp \
480 r3/posix/timelocal-posix.cpp \
481 r3/posix/timer-posix.cpp \
482 r3/posix/tls-posix.cpp \
483 r3/posix/utf8-posix.cpp
484ifdef IPRT_WITH_FUTEX_BASED_SEMS
485 RuntimeR3_SOURCES.linux += \
486 r3/linux/semevent-linux.cpp \
487 r3/linux/semeventmulti-linux.cpp \
488 r3/linux/semmutex-linux.cpp
489else
490 RuntimeR3_SOURCES.linux.x86 += \
491 r3/posix/semevent-posix.cpp \
492 r3/posix/semeventmulti-posix.cpp \
493 r3/posix/semmutex-posix.cpp
494 RuntimeR3_SOURCES.linux.amd64 += \
495 r3/linux/semevent-linux.cpp \
496 r3/linux/semeventmulti-linux.cpp
497 ifdef RT_NEW_LINUX_MUTEX_CODE
498 RuntimeR3_SOURCES.linux.amd64 += \
499 r3/linux/semmutex-linux.cpp
500 else
501 RuntimeR3_SOURCES.linux.amd64 += \
502 r3/posix/semmutex-posix.cpp
503 endif
504endif
505
506RuntimeR3_SOURCES.os2 = \
507 generic/pathhost-generic.cpp \
508 generic/RTDirQueryInfo-generic.cpp \
509 generic/RTDirSetTimes-generic.cpp \
510 generic/RTFileMove-generic.cpp \
511 generic/RTLogWriteDebugger-generic.cpp \
512 generic/RTRandAdvCreateSystemFaster-generic.cpp \
513 generic/RTRandAdvCreateSystemTruer-generic.cpp \
514 generic/RTTimeLocalNow-generic.cpp \
515 generic/RTTimerCreate-generic.cpp \
516 generic/RTUuidCreate-generic.cpp \
517 generic/mppresent-generic.cpp \
518 generic/RTSemEventWait-generic.cpp \
519 generic/RTSemEventMultiWait-generic.cpp \
520 generic/RTSemMutexRequest-generic.cpp \
521 generic/RTSemMutexRequestDebug-generic.cpp \
522 generic/semrw-generic.cpp \
523 generic/timer-generic.cpp \
524 generic/utf16locale-generic.cpp \
525 generic/uuid-generic.cpp \
526 generic/RTMpGetCurFrequency-generic.cpp \
527 generic/RTMpGetMaxFrequency-generic.cpp \
528 generic/RTProcIsRunningByName-generic.cpp \
529 os2/RTErrConvertFromOS2.cpp \
530 r3/os2/filelock-os2.cpp \
531 r3/os2/mp-os2.cpp \
532 r3/os2/rtProcInitExePath-os2.cpp \
533 r3/os2/sched-os2.cpp \
534 r3/os2/sems-os2.cpp \
535 r3/os2/thread-os2.cpp \
536 r3/os2/time-os2.cpp \
537 r3/posix/RTFileQueryFsSizes-posix.cpp \
538 r3/posix/RTSystemQueryOSInfo-posix.cpp \
539 r3/posix/alloc-posix.cpp \
540 r3/posix/dir-posix.cpp \
541 r3/posix/env-posix.cpp \
542 r3/posix/fileio-posix.cpp \
543 r3/posix/fs-posix.cpp \
544 r3/posix/ldrNative-posix.cpp \
545 r3/posix/path-posix.cpp \
546 r3/posix/process-posix.cpp \
547 r3/posix/RTTimeNow-posix.cpp \
548 r3/posix/timelocal-posix.cpp \
549 r3/posix/utf8-posix.cpp
550
551RuntimeR3_SOURCES.darwin = \
552 darwin/RTErrConvertFromDarwin.cpp \
553 darwin/RTErrConvertFromDarwinCOM.cpp \
554 darwin/RTErrConvertFromDarwinIO.cpp \
555 darwin/RTErrConvertFromDarwinKern.cpp \
556 generic/pathhost-generic.cpp \
557 generic/RTDirQueryInfo-generic.cpp \
558 generic/RTDirSetTimes-generic.cpp \
559 generic/RTFileMove-generic.cpp \
560 generic/RTLogWriteDebugger-generic.cpp \
561 generic/RTTimeLocalNow-generic.cpp \
562 generic/RTTimerCreate-generic.cpp \
563 generic/RTUuidCreate-generic.cpp \
564 generic/mppresent-generic.cpp \
565 generic/semrw-generic.cpp \
566 generic/timer-generic.cpp \
567 generic/utf16locale-generic.cpp \
568 generic/uuid-generic.cpp\
569 generic/RTProcIsRunningByName-generic.cpp \
570 r3/darwin/alloc-darwin.cpp \
571 r3/darwin/filelock-darwin.cpp \
572 r3/darwin/mp-darwin.cpp \
573 r3/darwin/rtProcInitExePath-darwin.cpp \
574 r3/darwin/sched-darwin.cpp \
575 r3/darwin/time-darwin.cpp \
576 r3/posix/RTFileQueryFsSizes-posix.cpp \
577 r3/posix/RTSystemQueryOSInfo-posix.cpp \
578 r3/posix/dir-posix.cpp \
579 r3/posix/env-posix.cpp \
580 r3/posix/fileio-posix.cpp \
581 r3/posix/fs-posix.cpp \
582 r3/posix/ldrNative-posix.cpp \
583 r3/posix/path-posix.cpp \
584 r3/posix/process-posix.cpp \
585 r3/posix/rand-posix.cpp \
586 r3/posix/semevent-posix.cpp \
587 r3/posix/semeventmulti-posix.cpp \
588 r3/posix/semmutex-posix.cpp \
589 r3/posix/thread-posix.cpp \
590 r3/posix/timelocal-posix.cpp \
591 r3/posix/tls-posix.cpp \
592 r3/posix/utf8-posix.cpp
593
594## @todo Make BSD sched, implement RTMP*.
595RuntimeR3_SOURCES.freebsd = \
596 generic/pathhost-generic.cpp \
597 generic/RTDirQueryInfo-generic.cpp \
598 generic/RTDirSetTimes-generic.cpp \
599 generic/RTFileMove-generic.cpp \
600 generic/RTLogWriteDebugger-generic.cpp \
601 generic/RTTimeLocalNow-generic.cpp \
602 generic/RTTimerCreate-generic.cpp \
603 generic/RTUuidCreate-generic.cpp \
604 generic/mppresent-generic.cpp \
605 generic/sched-generic.cpp \
606 generic/utf16locale-generic.cpp \
607 generic/uuid-generic.cpp \
608 generic/RTMpCpuId-generic.cpp \
609 generic/RTMpCpuIdFromSetIndex-generic.cpp \
610 generic/RTMpCpuIdToSetIndex-generic.cpp \
611 generic/RTMpIsCpuPossible-generic.cpp \
612 generic/RTMpGetMaxCpuId-generic.cpp \
613 generic/RTMpGetOnlineSet-generic.cpp \
614 generic/RTMpGetSet-generic.cpp \
615 generic/RTMpIsCpuOnline-generic.cpp \
616 generic/RTProcIsRunningByName-generic.cpp \
617 r3/freebsd/mp-freebsd.cpp \
618 r3/freebsd/alloc-freebsd.cpp \
619 r3/freebsd/rtProcInitExePath-freebsd.cpp \
620 r3/posix/RTFileQueryFsSizes-posix.cpp \
621 r3/posix/RTSystemQueryOSInfo-posix.cpp \
622 r3/posix/dir-posix.cpp \
623 r3/posix/env-posix.cpp \
624 r3/posix/fileio-posix.cpp \
625 r3/posix/filelock-posix.cpp \
626 r3/posix/fs-posix.cpp \
627 r3/posix/ldrNative-posix.cpp \
628 r3/posix/path-posix.cpp \
629 r3/posix/process-posix.cpp \
630 r3/posix/rand-posix.cpp \
631 r3/posix/RTMpGetCount-posix.cpp \
632 r3/posix/RTTimeNow-posix.cpp \
633 r3/posix/semevent-posix.cpp \
634 r3/posix/semeventmulti-posix.cpp \
635 r3/posix/semmutex-posix.cpp \
636 r3/posix/semrw-posix.cpp \
637 r3/posix/thread-posix.cpp \
638 r3/posix/time-posix.cpp \
639 r3/posix/timelocal-posix.cpp \
640 r3/posix/timer-posix.cpp \
641 r3/posix/tls-posix.cpp \
642 r3/posix/utf8-posix.cpp
643
644RuntimeR3_SOURCES.solaris = \
645 generic/pathhost-generic.cpp \
646 generic/RTDirQueryInfo-generic.cpp \
647 generic/RTDirSetTimes-generic.cpp \
648 generic/RTFileMove-generic.cpp \
649 generic/RTLogWriteDebugger-generic.cpp \
650 generic/RTTimeLocalNow-generic.cpp \
651 generic/RTTimerCreate-generic.cpp \
652 generic/RTUuidCreate-generic.cpp \
653 generic/sched-generic.cpp \
654 generic/utf16locale-generic.cpp \
655 generic/uuid-generic.cpp \
656 generic/RTProcIsRunningByName-generic.cpp \
657 r3/posix/RTFileQueryFsSizes-posix.cpp \
658 r3/posix/RTSystemQueryOSInfo-posix.cpp \
659 r3/posix/dir-posix.cpp \
660 r3/posix/env-posix.cpp \
661 r3/posix/fileio-posix.cpp \
662 r3/posix/filelock-posix.cpp \
663 r3/posix/fs-posix.cpp \
664 r3/posix/ldrNative-posix.cpp \
665 r3/posix/path-posix.cpp \
666 r3/posix/process-posix.cpp \
667 r3/posix/rand-posix.cpp \
668 r3/posix/RTTimeNow-posix.cpp \
669 r3/posix/semevent-posix.cpp \
670 r3/posix/semeventmulti-posix.cpp \
671 r3/posix/semmutex-posix.cpp \
672 r3/posix/semrw-posix.cpp \
673 r3/posix/thread-posix.cpp \
674 r3/posix/time-posix.cpp \
675 r3/posix/timelocal-posix.cpp \
676 r3/posix/timer-posix.cpp \
677 r3/posix/tls-posix.cpp \
678 r3/posix/utf8-posix.cpp \
679 r3/solaris/alloc-solaris.cpp \
680 r3/solaris/mp-solaris.cpp \
681 r3/solaris/rtProcInitExePath-solaris.cpp \
682
683## PORTME: Porters add their selection of platform specific files for Ring-3 here.
684
685
686#
687# L4 RuntimeR3 subtarget since L4 headers won't work with VBOXR3.
688#
689RuntimeR3L4_TEMPLATE = VBOXR3NP
690RuntimeR3L4_DEFS = IN_RT_R3 IN_SUP_R3 LDR_WITH_NATIVE LDR_WITH_ELF LDR_WITH_PE
691ifneq ($(KBUILD_TARGET_ARCH),amd64)
692RuntimeR3L4_DEFS += __PIC__
693endif
694RuntimeR3L4_INCS = \
695 include \
696 $(L4_INCDIR)
697
698RuntimeR3L4_SOURCES = \
699 generic/fs-stubs-generic.cpp \
700 generic/pathhost-generic.cpp \
701 generic/RTDirQueryInfo-generic.cpp \
702 generic/RTDirSetTimes-generic.cpp \
703 generic/RTFileMove-generic.cpp \
704 generic/RTLogWriteDebugger-generic.cpp \
705 generic/RTSystemQueryOSInfo-generic.cpp \
706 generic/RTTimeLocalNow-generic.cpp \
707 generic/RTUuidCreate-generic.cpp \
708 generic/mppresent-generic.cpp \
709 generic/sched-generic.cpp \
710 generic/RTSemEventWait-generic.cpp \
711 generic/RTSemEventMultiWait-generic.cpp \
712 generic/RTSemMutexRequest-generic.cpp \
713 generic/RTSemMutexRequestDebug-generic.cpp \
714 generic/semrw-generic.cpp \
715 generic/utf16locale-generic.cpp \
716 generic/uuid-generic.cpp \
717 generic/RTProcIsRunningByName-generic.cpp \
718 l4/l4-errno.cpp \
719 l4/rtProcInitExePath-l4.cpp \
720 l4/process-l4env.cpp \
721 l4/sems-l4env.cpp \
722 l4/thread-l4env.cpp \
723 l4/timer-l4env.cpp \
724 l4/utf8-l4env.cpp \
725 r3/posix/RTFileQueryFsSizes-posix.cpp \
726 r3/posix/alloc-posix.cpp \
727 r3/posix/dir-posix.cpp \
728 r3/posix/env-posix.cpp \
729 r3/posix/fileio-posix.cpp \
730 r3/posix/filelock-posix.cpp \
731 r3/posix/ldrNative-posix.cpp \
732 r3/posix/path-posix.cpp \
733 r3/posix/rand-posix.cpp \
734 r3/posix/RTTimeNow-posix.cpp \
735 r3/posix/time-posix.cpp \
736 r3/posix/timelocal-posix.cpp
737
738
739#
740# RuntimeGuestR3 - Guest Additions Runtime (static/exe).
741# (The KBUILD_HOST inheritance here is for l4 cross building the linux
742# additions, while .x86 is for cross building x86 while targeting amd64.)
743#
744RuntimeGuestR3_TEMPLATE := VBOXGUESTR3LIB
745## @todo change this to EXTEND the RuntimeR3 target.
746RuntimeGuestR3_SDKS.win := $(RuntimeR3_SDKS.win)
747RuntimeGuestR3_DEFS := $(filter-out RTCRITSECT_STRICT RT_NO_GIP, $(RuntimeR3_DEFS))
748RuntimeGuestR3_DEFS.$(KBUILD_TARGET) := $(RuntimeR3_DEFS.$(KBUILD_TARGET))
749RuntimeGuestR3_DEFS.$(KBUILD_HOST) := $(RuntimeR3_DEFS.$(KBUILD_HOST))
750RuntimeGuestR3_INCS := $(RuntimeR3_INCS)
751RuntimeGuestR3_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
752RuntimeGuestR3_INCS.$(KBUILD_HOST) := $(RuntimeR3_INCS.$(KBUILD_HOST))
753RuntimeGuestR3_SOURCES := $(filter-out \
754 common/time/timesupref.cpp \
755 common/time/timesupA.asm \
756 common/time/timesup.cpp \
757 generic/RTLogWriteUser-generic.cpp \
758 , $(RuntimeR3_SOURCES))
759RuntimeGuestR3_SOURCES += \
760 common/time/timesysalias.cpp \
761 VBox/logbackdoor.cpp
762RuntimeGuestR3_SOURCES.$(KBUILD_TARGET) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET))
763RuntimeGuestR3_SOURCES.$(KBUILD_HOST) := $(RuntimeR3_SOURCES.$(KBUILD_HOST))
764RuntimeGuestR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
765RuntimeGuestR3_SOURCES.$(KBUILD_HOST).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_HOST).$(KBUILD_TARGET_ARCH))
766
767
768#
769# RuntimeGuestR3Shared - Guest Additions Runtime (static/dll).
770#
771RuntimeGuestR3Shared_TEMPLATE := VBOXGUESTR3DLL
772RuntimeGuestR3Shared_EXTENDS := RuntimeGuestR3
773RuntimeGuestR3Shared_INST = $(INST_ADDITIONS_LIB)
774
775
776#
777# RuntimeGuestR3Mini - Minimal Guest Additions Runtime which does not require
778# initialization and can be linked into an .so. Intended
779# for X11 drivers, GRADD and similar.
780#
781RuntimeGuestR3Mini_TEMPLATE := VBOXGUESTR3DLL
782## @todo change this to EXTEND the RuntimeGuestR3 target.
783RuntimeGuestR3Mini_INST := $(INST_ADDITIONS_LIB)
784RuntimeGuestR3Mini_SDKS.win := $(RuntimeR3_SDKS.win)
785RuntimeGuestR3Mini_DEFS := $(filter-out RTCRITSECT_STRICT RT_NO_GIP, $(RuntimeR3_DEFS)) RT_MINI
786RuntimeGuestR3Mini_DEFS.$(KBUILD_TARGET) := $(RuntimeR3_DEFS.$(KBUILD_TARGET))
787RuntimeGuestR3Mini_DEFS.$(KBUILD_HOST) := $(RuntimeR3_DEFS.$(KBUILD_HOST))
788RuntimeGuestR3Mini_INCS := $(RuntimeR3_INCS)
789RuntimeGuestR3Mini_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
790RuntimeGuestR3Mini_INCS.$(KBUILD_HOST) := $(RuntimeR3_INCS.$(KBUILD_HOST))
791RuntimeGuestR3Mini_SOURCES = \
792 common/err/errmsg.cpp \
793 common/err/errmsgxpcom.cpp \
794 common/err/RTErrConvertFromErrno.cpp \
795 common/log/logformat.cpp \
796 common/misc/RTAssertMsg1Weak.cpp \
797 common/misc/RTAssertMsg2.cpp \
798 common/misc/RTAssertMsg2Add.cpp \
799 common/misc/RTAssertMsg2AddWeak.cpp \
800 common/misc/RTAssertMsg2AddWeakV.cpp \
801 common/misc/RTAssertMsg2Weak.cpp \
802 common/misc/RTAssertMsg2WeakV.cpp \
803 common/misc/assert.cpp \
804 common/misc/buildconfig.cpp \
805 common/misc/sanity-c.c \
806 common/misc/sanity-cpp.cpp \
807 common/path/rtPathVolumeSpecLen.cpp \
808 common/path/RTPathAbsDup.cpp \
809 common/path/RTPathAbsEx.cpp \
810 common/path/RTPathAbsExDup.cpp \
811 common/path/RTPathAppend.cpp \
812 common/path/RTPathExt.cpp \
813 common/path/RTPathFilename.cpp \
814 common/path/RTPathHaveExt.cpp \
815 common/path/RTPathHavePath.cpp \
816 common/path/RTPathParse.cpp \
817 common/path/RTPathRealDup.cpp \
818 common/path/RTPathStripExt.cpp \
819 common/path/RTPathStripFilename.cpp \
820 common/path/RTPathStripTrailingSlash.cpp \
821 common/string/RTStrCmp.cpp \
822 common/string/RTStrNCmp.cpp \
823 common/string/RTStrNLen.cpp \
824 common/string/RTStrNLenEx.cpp \
825 common/string/RTStrStr.cpp \
826 common/string/straprintf.cpp \
827 common/string/strformat.cpp \
828 common/string/strformatrt.cpp \
829 common/string/strformattype.cpp \
830 common/string/string.cpp \
831 common/string/strprintf.cpp \
832 common/string/strtonum.cpp \
833 common/string/unidata.cpp \
834 common/string/utf-8.cpp \
835 common/string/utf-8-case.cpp \
836 common/string/utf-16.cpp \
837 generic/pathhost-generic.cpp \
838 generic/RTAssertShouldPanic-generic.cpp \
839 r3/alloc.cpp \
840 r3/fileio.cpp \
841 r3/fs.cpp
842RuntimeGuestR3Mini_SOURCES.freebsd = \
843 r3/posix/env-posix.cpp \
844 r3/posix/fileio-posix.cpp \
845 r3/posix/path-posix.cpp \
846 r3/posix/utf8-posix.cpp
847RuntimeGuestR3Mini_SOURCES.linux = \
848 r3/posix/env-posix.cpp \
849 r3/posix/fileio-posix.cpp \
850 r3/posix/path-posix.cpp \
851 r3/posix/utf8-posix.cpp
852RuntimeGuestR3Mini_SOURCES.solaris = \
853 r3/posix/env-posix.cpp \
854 r3/posix/fileio-posix.cpp \
855 r3/posix/path-posix.cpp \
856 r3/posix/utf8-posix.cpp
857RuntimeGuestR3Mini_SOURCES.win = \
858 r3/win/fileio-win.cpp \
859 r3/win/path-win.cpp \
860 r3/win/utf8-win.cpp \
861 win/errmsgwin.cpp \
862 win/RTErrConvertFromWin32.cpp
863
864# VBox specific stuff.
865RuntimeGuestR3Mini_SOURCES += \
866 VBox/logbackdoor.cpp \
867 VBox/logbackdoor-redirect.cpp \
868 VBox/strformat-vbox.cpp
869
870
871#
872# RuntimeLnxHostR3 Linux host program runtime
873# (Only used when building L4.)
874#
875RuntimeLnxHostR3_TEMPLATE = VBOXLNXHOSTR3LIB
876RuntimeLnxHostR3_DEFS = IN_RT_R3 IN_SUP_R3 RT_WITH_VBOX RT_NO_GIP
877RuntimeLnxHostR3_SOURCES = \
878 $(RuntimeR3_SOURCES.linux.$(KBUILD_TARGET_ARCH)) \
879 $(RuntimeR3_SOURCES.linux) \
880 $(RuntimeR3_SOURCES)
881RuntimeLnxHostR3_INCS = \
882 $(RuntimeR3_INCS.linux.$(KBUILD_TARGET_ARCH)) \
883 $(RuntimeR3_INCS.linux) \
884 $(RuntimeR3_INCS)
885
886
887#
888# VBoxRT - Shared Object / DLL version.
889#
890VBoxRT_TEMPLATE = VBOXR3
891VBoxRT_SDKS = VBOX_OPENSSL VBOX_LIBXML2 VBOX_LIBCURL VBOX_BOOST
892VBoxRT_SDKS.win = WINPSDK W2K3DDK VBOX_NTDLL
893ifeq ($(KBUILD_TARGET)$(VBOX_WITH_HARDENING),darwin)
894VBoxRT_INST = $(INST_DLL) $(INST_TESTCASE)
895endif
896VBoxRT_DEFS = $(filter-out RT_NO_GIP,$(RuntimeR3_DEFS)) IN_SUP_R3 IN_SUP_R3
897VBoxRT_DEFS.$(KBUILD_TYPE) = $(RuntimeR3_DEFS.$(KBUILD_TYPE))
898VBoxRT_SOURCES = \
899 VBox/VBoxRTDeps.cpp \
900 $(RuntimeR3_SOURCES)
901VBoxRT_SOURCES += \
902 common/misc/s3.cpp \
903 r3/xml.cpp \
904 common/checksum/RTSha1Digest.cpp \
905 common/checksum/manifest.cpp \
906 common/checksum/sha1.cpp \
907 common/checksum/sha1str.cpp \
908 common/checksum/sha256.cpp \
909 common/checksum/sha256str.cpp \
910 common/checksum/sha512.cpp \
911 common/checksum/sha512str.cpp
912VBoxRT_SOURCES.$(KBUILD_TARGET) = $(RuntimeR3_SOURCES.$(KBUILD_TARGET))
913VBoxRT_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) = $(RuntimeR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
914VBoxRT_SOURCES.$(KBUILD_TARGET_ARCH) = $(RuntimeR3_SOURCES.$(KBUILD_TARGET_ARCH))
915VBoxRT_SOURCES.win += \
916 r3/win/dllmain-win.cpp \
917 r3/win/fileaio-win.cpp \
918 $(VBoxRT_0_OUTDIR)/VBoxRT.def
919VBoxRT_SOURCES.linux += \
920 r3/linux/fileaio-linux.cpp
921VBoxRT_SOURCES.solaris += \
922 r3/solaris/fileaio-solaris.cpp
923VBoxRT_SOURCES.darwin += \
924 r3/posix/fileaio-posix.cpp
925VBoxRT_SOURCES.freebsd += \
926 r3/freebsd/fileaio-freebsd.cpp
927VBoxRT_INCS = $(RuntimeR3_INCS)
928VBoxRT_INCS.$(KBUILD_TARGET) = $(RuntimeR3_INCS.$(KBUILD_TARGET))
929VBoxRT_INCS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) = $(RuntimeR3_INCS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
930VBoxRT_LIBS = \
931 $(PATH_LIB)/SUPR3$(VBOX_SUFF_LIB) \
932 $(PATH_LIB)/VBox-liblzf$(VBOX_SUFF_LIB) \
933 $(SDK_VBOX_ZLIB_LIBS)
934ifdef IPRT_WITH_KSTUFF
935 VBoxRT_LIBS += \
936 $(PATH_LIB)/VBox-kStuff$(VBOX_SUFF_LIB)
937endif
938ifndef SDK_VBOX_LIBXML2_LIBS
939 VBoxRT_LIBS += \
940 $(PATH_LIB)/VBox-libxml2$(VBOX_SUFF_LIB)
941endif
942ifndef SDK_VBOX_OPENSSL_LIBS
943 VBoxRT_LIBS += \
944 $(PATH_LIB)/VBox-libcrypto$(VBOX_SUFF_LIB)
945endif
946ifdef IPRT_WITH_LZO
947 VBoxRT_LIBS += lzo2
948endif
949VBoxRT_LIBS.darwin = \
950 iconv
951VBoxRT_LIBS.freebsd = \
952 iconv \
953 rt
954VBoxRT_LIBS.solaris = \
955 kstat
956VBoxRT_LDFLAGS.darwin = -framework IOKit -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxRT.dylib
957ifdef VBOX_USE_VCC80
958VBoxRT_LDFLAGS.win = /MANIFEST
959endif
960VBoxRT_LDFLAGS.l4 = \
961 -Wl,-whole-archive \
962 $(PATH_LIB)/RuntimeR3L4$(VBOX_SUFF_LIB) \
963 -Wl,-no-whole-archive
964ifeq ($(KBUILD_TARGET),l4)
965VBoxRT_LIBS += \
966 $(L4_LIBDIR)/libl4sys.a \
967 $(L4_LIBDIR)/libl4sys.p.a
968endif
969VBoxRT_LIBS.l4 = \
970 $(PATH_LIB)/RuntimeR3L4$(VBOX_SUFF_LIB)
971
972if1of ($(DLLS), VBoxRT)
973$$(VBoxRT_0_OUTDIR)/VBoxRT.def: \
974 $(PATH_SUB_CURRENT)/r3/win/VBoxRT-$$(if-expr $$(KBUILD_TARGET_ARCH) == amd64,win64,win32).def \
975 $(PATH_SUB_CURRENT)/r3/win/$(if $(VBOX_OSE),VBoxRT-openssl-ose.def,VBoxRT-openssl.def)
976 $(RM) -f -- $@
977 $(REDIRECT) -wto $@ -- $(CAT_EXT) $^
978endif
979
980
981#
982# HACK ALLERT! Make testcase run during build on SELinux boxes.
983# Create a dummy DLL that ensure that VBoxRT is installed
984# during the DLL pass and cleaned up later.
985#
986ifeq ($(KBUILD_TARGET),linux)
987 if1of (VBoxRT, $(DLLS))
988 ifneq ($(wildcard /usr/bin/chcon),)
989VBoxRT_NOINST = true
990
991DLLS += VBoxRTDummy
992VBoxRTDummy_TEMPLATE = VBOXR3
993VBoxRTDummy_NOINST = true
994VBoxRTDummy_LIBS = $(PATH_BIN)/VBoxRT.so
995VBoxRTDummy_CLEAN= $(PATH_BIN)/VBoxRT.so
996BLDDIRS += $(PATH_BIN)
997
998$(PATH_BIN)/VBoxRT.so: $$(TARGET_VBoxRT) | $$(dir $$@)
999 $(INSTALL) $< $@
1000 chcon -t texrel_shlib_t $@ || true
1001
1002VBoxRT:: VBoxRTDummy
1003 endif # chcon present.
1004 endif # building VBoxRT
1005endif # linux
1006
1007#
1008# RuntimeR3NoCRTGCC - CRT replacement lib for VBoxREM.
1009# This is used together with VBoxRT.
1010#
1011## @todo the *_alias.c stuff is busted, remove and use RT_WITH_NOCRT_ALIASES instead.
1012RuntimeR3NoCRTGCC_TEMPLATE = VBOXNOCRTGCC
1013RuntimeR3NoCRTGCC_LIBSUFF = $(VBOX_SUFF_LIB)
1014RuntimeR3NoCRTGCC_INCS = include
1015RuntimeR3NoCRTGCC_SOURCES = \
1016 common/misc/sanity-cpp.cpp \
1017 common/misc/sanity-c.c \
1018 \
1019 common/math/ceill.asm \
1020 common/math/cosl.asm \
1021 common/math/fabs.asm \
1022 common/math/fabsf.asm \
1023 common/math/fabsl.asm \
1024 common/math/floor.asm \
1025 common/math/floorf.asm \
1026 common/math/floorl.asm \
1027 common/math/ldexpl.asm \
1028 common/math/llrint.asm \
1029 common/math/llrintf.asm \
1030 common/math/llrintl.asm \
1031 common/math/logl.asm \
1032 common/math/lrint.asm \
1033 common/math/lrintf.asm \
1034 common/math/lrintl.asm \
1035 common/math/remainder.asm \
1036 common/math/remainderf.asm \
1037 common/math/remainderl.asm \
1038 common/math/sinl.asm \
1039 common/math/tanl.asm \
1040 common/math/trunc.asm \
1041 common/math/truncf.asm \
1042 common/math/truncl.asm \
1043 \
1044 $(RuntimeNoCrt_SOURCES) \
1045 \
1046 common/string/memchr_alias.c \
1047 common/string/memcmp_alias.c \
1048 common/string/memcpy_alias.c \
1049 common/string/memmove_alias.c \
1050 common/string/memset_alias.c \
1051 common/string/strchr_alias.c \
1052 common/string/strcmp_alias.c \
1053 common/string/strlen_alias.c
1054
1055RuntimeR3NoCRTGCC_SOURCES.x86 = \
1056 common/math/x86/fenv-x86.c \
1057 common/math/gcc/adddi3.c \
1058 common/math/gcc/anddi3.c \
1059 common/math/gcc/ashldi3.c \
1060 common/math/gcc/ashrdi3.c \
1061 common/math/gcc/cmpdi2.c \
1062 common/math/gcc/divdi3.c \
1063 common/math/gcc/iordi3.c \
1064 common/math/gcc/lshldi3.c \
1065 common/math/gcc/lshrdi3.c \
1066 common/math/gcc/moddi3.c \
1067 common/math/gcc/muldi3.c \
1068 common/math/gcc/negdi2.c \
1069 common/math/gcc/notdi2.c \
1070 common/math/gcc/qdivrem.c \
1071 common/math/gcc/subdi3.c \
1072 common/math/gcc/ucmpdi2.c \
1073 common/math/gcc/udivdi3.c \
1074 common/math/gcc/umoddi3.c \
1075 common/math/gcc/xordi3.c
1076
1077
1078## @todo stop using the old memcpy.c and memset.c code.
1079
1080#
1081# RuntimeR0 - Ring0 library for VMMR0.
1082#
1083RuntimeR0_TEMPLATE = VBOXR0
1084RuntimeR0_DEFS = IN_RT_R0 RT_WITH_VBOX
1085RuntimeR0_INCS = include
1086RuntimeR0_SOURCES = \
1087 common/checksum/crc32.cpp \
1088 common/checksum/crc64.cpp \
1089 common/checksum/md5.cpp \
1090 common/checksum/ipv4.cpp \
1091 common/log/logellipsis.cpp \
1092 common/log/logrelellipsis.cpp \
1093 common/log/logcom.cpp \
1094 common/log/logformat.cpp \
1095 common/misc/RTAssertMsg1Weak.cpp \
1096 common/misc/RTAssertMsg2.cpp \
1097 common/misc/RTAssertMsg2Add.cpp \
1098 common/misc/RTAssertMsg2AddWeak.cpp \
1099 common/misc/RTAssertMsg2AddWeakV.cpp \
1100 common/misc/RTAssertMsg2Weak.cpp \
1101 common/misc/RTAssertMsg2WeakV.cpp \
1102 common/misc/buildconfig.cpp \
1103 common/misc/handletable.cpp \
1104 common/misc/handletablectx.cpp \
1105 common/misc/handletablesimple.cpp \
1106 common/misc/sanity-c.c \
1107 common/misc/sanity-cpp.cpp \
1108 common/misc/term.cpp \
1109 common/string/strformat.cpp \
1110 common/string/strformatrt.cpp \
1111 common/string/strformattype.cpp \
1112 common/string/strncmp.cpp \
1113 common/string/strpbrk.cpp \
1114 common/string/strprintf.cpp \
1115 common/table/avlgcptr.cpp \
1116 common/table/avlhcphys.cpp \
1117 common/table/avllu32.cpp \
1118 common/table/avlogcphys.cpp \
1119 common/table/avlogcptr.cpp \
1120 common/table/avlohcphys.cpp \
1121 common/table/avloioport.cpp \
1122 common/table/avlpv.cpp \
1123 common/table/avlrogcphys.cpp \
1124 common/table/avlrogcptr.cpp \
1125 common/table/avlroioport.cpp \
1126 common/table/avlroogcptr.cpp \
1127 common/table/avlu32.cpp \
1128 common/table/avlou32.cpp \
1129 common/time/timesup.cpp \
1130 generic/RTAssertShouldPanic-generic.cpp \
1131 VBox/strformat-vbox.cpp \
1132 \
1133 $(RuntimeNoCrt_SOURCES)
1134
1135if1of ($(KBUILD_TARGET), darwin solaris freebsd)
1136RuntimeR0_SOURCES += \
1137 common/math/gcc/adddi3.c \
1138 common/math/gcc/anddi3.c \
1139 common/math/gcc/ashldi3.c \
1140 common/math/gcc/ashrdi3.c \
1141 common/math/gcc/cmpdi2.c \
1142 common/math/gcc/divdi3.c \
1143 common/math/gcc/iordi3.c \
1144 common/math/gcc/lshldi3.c \
1145 common/math/gcc/lshrdi3.c \
1146 common/math/gcc/moddi3.c \
1147 common/math/gcc/muldi3.c \
1148 common/math/gcc/negdi2.c \
1149 common/math/gcc/notdi2.c \
1150 common/math/gcc/qdivrem.c \
1151 common/math/gcc/subdi3.c \
1152 common/math/gcc/ucmpdi2.c \
1153 common/math/gcc/udivdi3.c \
1154 common/math/gcc/umoddi3.c \
1155 common/math/gcc/xordi3.c
1156endif
1157
1158#if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
1159# RuntimeR0_SOURCES += common/time/timesupA.asm
1160#else
1161 RuntimeR0_SOURCES += common/time/timesupref.cpp
1162#endif
1163
1164RuntimeR0_SOURCES.win.amd64 = $(RuntimeWin64ASM_SOURCES)
1165RuntimeR0_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
1166RuntimeR0_SOURCES.win = \
1167 nt/NtProcessStartup-stub.cpp
1168
1169RuntimeR0_SOURCES.os2 = \
1170 os2/RTErrConvertFromOS2.cpp \
1171 os2/sys0.asm
1172
1173
1174#
1175# RuntimeR0Drv - Ring0 library for host drivers.
1176#
1177RuntimeR0Drv_TEMPLATE = VBOXR0DRV
1178RuntimeR0Drv_SDKS.win = W2K3DDK WINPSDKINCS
1179RuntimeR0Drv_DEFS = IN_RT_R0 RT_WITH_VBOX RT_WITHOUT_NOCRT_WRAPPERS RT_NO_EXPORT_SYMBOL
1180RuntimeR0Drv_DEFS.win = IN_SUP_R0
1181RuntimeR0Drv_DEFS.linux = MODULE KBUILD_MODNAME=KBUILD_STR\(vboxdrv\) KBUILD_BASENAME=KBUILD_STR\(vboxdrv\) IN_SUP_R0
1182
1183RuntimeR0Drv_INCS := $(PATH_SUB_CURRENT) include
1184RuntimeR0Drv_INCS.freebsd = \
1185 $(PATH_INS)/gen-sys-hdrs
1186RuntimeR0Drv_INCS.linux = \
1187 r0drv/linux
1188RuntimeR0Drv_INCS.solaris = \
1189 r0drv/solaris/vbi/i86pc \
1190 r0drv/solaris/vbi/i86pc/sys
1191
1192RuntimeR0Drv_SOURCES = \
1193 common/alloc/alloc.cpp \
1194 common/alloc/heapsimple.cpp \
1195 common/alloc/heapoffset.cpp \
1196 common/checksum/crc32.cpp \
1197 common/checksum/crc64.cpp \
1198 common/checksum/md5.cpp \
1199 common/checksum/ipv4.cpp \
1200 common/log/log.cpp \
1201 common/log/logellipsis.cpp \
1202 common/log/logrel.cpp \
1203 common/log/logrelellipsis.cpp \
1204 common/log/logcom.cpp \
1205 common/log/logformat.cpp \
1206 common/misc/RTAssertMsg1Weak.cpp \
1207 common/misc/RTAssertMsg2.cpp \
1208 common/misc/RTAssertMsg2Add.cpp \
1209 common/misc/RTAssertMsg2AddWeak.cpp \
1210 common/misc/RTAssertMsg2AddWeakV.cpp \
1211 common/misc/RTAssertMsg2Weak.cpp \
1212 common/misc/RTAssertMsg2WeakV.cpp \
1213 common/misc/assert.cpp \
1214 common/misc/buildconfig.cpp \
1215 common/misc/handletable.cpp \
1216 common/misc/handletablectx.cpp \
1217 common/misc/handletablesimple.cpp \
1218 common/misc/once.cpp \
1219 common/misc/sanity-c.c \
1220 common/misc/sanity-cpp.cpp \
1221 common/misc/term.cpp \
1222 common/path/rtPathVolumeSpecLen.cpp \
1223 common/path/RTPathAbsDup.cpp \
1224 common/path/RTPathAbsEx.cpp \
1225 common/path/RTPathAbsExDup.cpp \
1226 common/path/RTPathAppend.cpp \
1227 common/path/RTPathExt.cpp \
1228 common/path/RTPathFilename.cpp \
1229 common/path/RTPathHaveExt.cpp \
1230 common/path/RTPathHavePath.cpp \
1231 common/path/RTPathParse.cpp \
1232 common/path/RTPathRealDup.cpp \
1233 common/path/RTPathStripExt.cpp \
1234 common/path/RTPathStripFilename.cpp \
1235 common/path/RTPathStripTrailingSlash.cpp \
1236 common/rand/rand.cpp \
1237 common/rand/randadv.cpp \
1238 common/rand/randparkmiller.cpp \
1239 common/string/strformat.cpp \
1240 common/string/strformatrt.cpp \
1241 common/string/strformattype.cpp \
1242 common/string/strprintf.cpp \
1243 common/string/strtonum.cpp \
1244 common/string/string.cpp \
1245 common/string/utf-16.cpp \
1246 common/string/utf-8.cpp \
1247 common/table/avlpv.cpp \
1248 generic/RTLogWriteStdErr-stub-generic.cpp \
1249 generic/RTLogWriteUser-generic.cpp \
1250 generic/RTRandAdvCreateSystemFaster-generic.cpp \
1251 generic/uuid-generic.cpp \
1252 r0drv/alloc-r0drv.cpp \
1253 r0drv/initterm-r0drv.cpp \
1254 r0drv/generic/semspinmutex-r0drv-generic.c \
1255 VBox/log-vbox.cpp \
1256 VBox/strformat-vbox.cpp
1257
1258## @todo: Linking against RuntimeR0Drv on Linux will result in unresolved external
1259## references to several string functions (e.g. strlen). We could include the
1260## missing functions here but our own implementations conflict with declarations
1261## of some Linux kernels (inline versus not inline, size_t versus unsigned int).
1262##
1263## The prototypes for the unresolved externals are declared in <linux/string.h>.
1264## This file is not included with extern "C" { ... } and therefore the function
1265## prototypes are mangled during C++ compilation. That's why we have to provide
1266## implementations with mangled function names.
1267##
1268## bird: Why don't we just extern "C" {} that file then?
1269RuntimeR0Drv_SOURCES.linux = \
1270 common/string/strpbrk.cpp \
1271 common/err/RTErrConvertToErrno.cpp \
1272 common/err/RTErrConvertFromErrno.cpp \
1273 generic/RTAssertShouldPanic-generic.cpp \
1274 generic/RTLogWriteStdOut-stub-generic.cpp \
1275 generic/mppresent-generic.cpp \
1276 r0drv/linux/alloc-r0drv-linux.c \
1277 r0drv/linux/assert-r0drv-linux.c \
1278 r0drv/linux/initterm-r0drv-linux.c \
1279 r0drv/linux/memobj-r0drv-linux.c \
1280 r0drv/linux/memuserkernel-r0drv-linux.c \
1281 r0drv/linux/mp-r0drv-linux.c \
1282 r0drv/linux/mpnotification-r0drv-linux.c \
1283 r0drv/linux/process-r0drv-linux.c \
1284 r0drv/linux/RTLogWriteDebugger-r0drv-linux.c \
1285 r0drv/linux/semevent-r0drv-linux.c \
1286 r0drv/linux/semeventmulti-r0drv-linux.c \
1287 r0drv/linux/semfastmutex-r0drv-linux.c \
1288 r0drv/linux/spinlock-r0drv-linux.c \
1289 r0drv/linux/thread-r0drv-linux.c \
1290 r0drv/linux/thread2-r0drv-linux.c \
1291 r0drv/linux/time-r0drv-linux.c \
1292 r0drv/linux/timer-r0drv-linux.c \
1293 r0drv/memobj-r0drv.cpp \
1294 r0drv/mpnotification-r0drv.c \
1295 r0drv/powernotification-r0drv.c
1296## @todo thread2-r0drv-linux.c and assert-r0drv-linux.c
1297
1298RuntimeR0Drv_SOURCES.win = \
1299 common/misc/thread.cpp \
1300 common/string/memcmp.asm \
1301 common/string/memchr.asm \
1302 common/string/memcpy.asm \
1303 common/string/memset.asm \
1304 common/string/memmove.asm \
1305 common/string/strlen.asm \
1306 common/string/strncmp.cpp \
1307 common/string/strpbrk.cpp \
1308 generic/RTAssertShouldPanic-generic.cpp \
1309 generic/RTLogWriteStdOut-stub-generic.cpp \
1310 generic/mppresent-generic.cpp \
1311 nt/RTErrConvertFromNtStatus.cpp \
1312 r0drv/memobj-r0drv.cpp \
1313 r0drv/mpnotification-r0drv.c \
1314 r0drv/powernotification-r0drv.c \
1315 r0drv/nt/alloc-r0drv-nt.cpp \
1316 r0drv/nt/assert-r0drv-nt.cpp \
1317 r0drv/nt/initterm-r0drv-nt.cpp \
1318 r0drv/nt/memobj-r0drv-nt.cpp \
1319 r0drv/nt/memuserkernel-r0drv-nt.cpp \
1320 r0drv/nt/mp-r0drv-nt.cpp \
1321 r0drv/nt/mpnotification-r0drv-nt.cpp \
1322 r0drv/nt/process-r0drv-nt.cpp \
1323 r0drv/nt/RTLogWriteDebugger-r0drv-nt.cpp \
1324 r0drv/nt/semevent-r0drv-nt.cpp \
1325 r0drv/nt/semeventmulti-r0drv-nt.cpp \
1326 r0drv/nt/semfastmutex-r0drv-nt.cpp \
1327 r0drv/nt/semmutex-r0drv-nt.cpp \
1328 r0drv/nt/spinlock-r0drv-nt.cpp \
1329 r0drv/nt/thread-r0drv-nt.cpp \
1330 r0drv/nt/thread2-r0drv-nt.cpp \
1331 r0drv/nt/time-r0drv-nt.cpp \
1332 r0drv/nt/timer-r0drv-nt.cpp
1333
1334RuntimeR0Drv_SOURCES.win.amd64 = $(RuntimeWin64ASM_SOURCES)
1335RuntimeR0Drv_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
1336
1337RuntimeR0Drv_SOURCES.darwin = \
1338 common/err/RTErrConvertFromErrno.cpp \
1339 common/misc/thread.cpp \
1340 common/string/memchr.asm \
1341 common/string/strpbrk.cpp \
1342 darwin/RTErrConvertFromDarwin.cpp \
1343 darwin/RTErrConvertFromDarwinIO.cpp \
1344 darwin/RTErrConvertFromDarwinKern.cpp \
1345 generic/RTAssertShouldPanic-generic.cpp \
1346 generic/RTTimerCreate-generic.cpp \
1347 generic/mppresent-generic.cpp \
1348 generic/timer-generic.cpp \
1349 r0drv/generic/mpnotification-r0drv-generic.cpp \
1350 r0drv/darwin/alloc-r0drv-darwin.cpp \
1351 r0drv/darwin/assert-r0drv-darwin.cpp \
1352 r0drv/darwin/initterm-r0drv-darwin.cpp \
1353 r0drv/darwin/memobj-r0drv-darwin.cpp \
1354 r0drv/darwin/mp-r0drv-darwin.cpp \
1355 r0drv/darwin/memuserkernel-r0drv-darwin.cpp \
1356 r0drv/darwin/process-r0drv-darwin.cpp \
1357 r0drv/darwin/RTLogWriteDebugger-r0drv-darwin.cpp \
1358 r0drv/darwin/RTLogWriteStdOut-r0drv-darwin.cpp \
1359 r0drv/darwin/semaphore-r0drv-darwin.cpp \
1360 r0drv/darwin/spinlock-r0drv-darwin.cpp \
1361 r0drv/darwin/thread-r0drv-darwin.cpp \
1362 r0drv/darwin/thread2-r0drv-darwin.cpp \
1363 r0drv/darwin/threadpreempt-r0drv-darwin.cpp \
1364 r0drv/darwin/time-r0drv-darwin.cpp \
1365 r0drv/memobj-r0drv.cpp \
1366 r0drv/powernotification-r0drv.c
1367
1368RuntimeR0Drv_SOURCES.os2 = \
1369 common/string/memchr.asm \
1370 common/string/memcmp.asm \
1371 common/string/memcpy.asm \
1372 common/string/mempcpy.asm \
1373 common/string/memmove.asm \
1374 common/string/memset.asm \
1375 common/string/strchr.asm \
1376 common/string/strcmp.asm \
1377 common/string/strcpy.asm \
1378 common/string/strlen.asm \
1379 \
1380 common/string/strncmp.cpp \
1381 common/string/strpbrk.cpp \
1382 \
1383 common/misc/thread.cpp \
1384 generic/RTAssertShouldPanic-generic.cpp \
1385 generic/RTLogWriteDebugger-generic.cpp \
1386 generic/RTLogWriteStdOut-stub-generic.cpp \
1387 generic/RTMpCpuId-generic.cpp \
1388 generic/RTMpCpuIdFromSetIndex-generic.cpp \
1389 generic/RTMpCpuIdToSetIndex-generic.cpp \
1390 generic/RTMpIsCpuPossible-generic.cpp \
1391 generic/RTMpGetCount-generic.cpp \
1392 generic/RTMpGetMaxCpuId-generic.cpp \
1393 generic/RTMpGetOnlineCount-generic.cpp \
1394 generic/RTMpGetOnlineSet-generic.cpp \
1395 generic/RTMpGetSet-generic.cpp \
1396 generic/RTMpIsCpuOnline-generic.cpp \
1397 generic/RTTimerCreate-generic.cpp \
1398 generic/mppresent-generic.cpp \
1399 os2/RTErrConvertFromOS2.cpp \
1400 os2/sys0.asm \
1401 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
1402 r0drv/generic/RTMpOn-r0drv-generic.cpp \
1403 r0drv/generic/mpnotification-r0drv-generic.cpp \
1404 r0drv/memobj-r0drv.cpp \
1405 r0drv/powernotification-r0drv.c \
1406 r0drv/os2/alloc-r0drv-os2.cpp \
1407 r0drv/os2/assert-r0drv-os2.cpp \
1408 r0drv/os2/assertA-r0drv-os2.asm \
1409 r0drv/os2/initterm-r0drv-os2.cpp \
1410 r0drv/os2/memobj-r0drv-os2.cpp \
1411 r0drv/os2/memuserkernel-r0drv-os2.cpp \
1412 r0drv/os2/os2imports.imp \
1413 r0drv/os2/process-r0drv-os2.cpp \
1414 r0drv/os2/RTR0AssertPanicSystem-r0drv-os2.asm \
1415 r0drv/os2/RTR0Os2DHQueryDOSVar.asm \
1416 r0drv/os2/RTR0Os2DHVMGlobalToProcess.asm \
1417 r0drv/os2/semevent-r0drv-os2.cpp \
1418 r0drv/os2/semeventmulti-r0drv-os2.cpp \
1419 r0drv/os2/semfastmutex-r0drv-os2.cpp \
1420 r0drv/os2/spinlock-r0drv-os2.cpp \
1421 r0drv/os2/thread-r0drv-os2.cpp \
1422 r0drv/os2/thread2-r0drv-os2.cpp \
1423 r0drv/os2/time-r0drv-os2.cpp \
1424 r0drv/os2/timer-r0drv-os2.cpp \
1425 r0drv/os2/timerA-r0drv-os2.asm
1426
1427RuntimeR0Drv_SOURCES.freebsd = \
1428 common/err/RTErrConvertFromErrno.cpp \
1429 common/err/RTErrConvertToErrno.cpp \
1430 common/misc/thread.cpp \
1431 common/string/memchr.asm \
1432 common/string/memmove.asm \
1433 common/string/strpbrk.cpp \
1434 common/string/memcmp.asm \
1435 common/string/strchr.asm \
1436 generic/RTAssertShouldPanic-generic.cpp \
1437 generic/RTLogWriteDebugger-generic.cpp \
1438 generic/RTLogWriteStdOut-stub-generic.cpp \
1439 generic/RTTimerCreate-generic.cpp \
1440 generic/mppresent-generic.cpp \
1441 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
1442 r0drv/generic/mpnotification-r0drv-generic.cpp \
1443 r0drv/freebsd/alloc-r0drv-freebsd.c \
1444 r0drv/freebsd/assert-r0drv-freebsd.c \
1445 r0drv/freebsd/initterm-r0drv-freebsd.c \
1446 r0drv/freebsd/memobj-r0drv-freebsd.c \
1447 r0drv/freebsd/memuserkernel-r0drv-freebsd.c \
1448 r0drv/freebsd/process-r0drv-freebsd.c \
1449 r0drv/freebsd/semevent-r0drv-freebsd.c \
1450 r0drv/freebsd/semeventmulti-r0drv-freebsd.c \
1451 r0drv/freebsd/semfastmutex-r0drv-freebsd.c \
1452 r0drv/freebsd/spinlock-r0drv-freebsd.c \
1453 r0drv/freebsd/thread-r0drv-freebsd.c \
1454 r0drv/freebsd/thread2-r0drv-freebsd.c \
1455 r0drv/freebsd/time-r0drv-freebsd.c \
1456 r0drv/freebsd/mp-r0drv-freebsd.c \
1457 generic/timer-generic.cpp \
1458 r0drv/memobj-r0drv.cpp \
1459 r0drv/powernotification-r0drv.c
1460
1461RuntimeR0Drv_SOURCES.solaris = \
1462 common/err/RTErrConvertFromErrno.cpp \
1463 common/err/RTErrConvertToErrno.cpp \
1464 common/misc/thread.cpp \
1465 common/string/memchr.asm \
1466 generic/RTAssertShouldPanic-generic.cpp \
1467 generic/RTLogWriteStdOut-stub-generic.cpp \
1468 generic/RTTimerCreate-generic.cpp \
1469 generic/mppresent-generic.cpp \
1470 r0drv/memobj-r0drv.cpp \
1471 r0drv/mpnotification-r0drv.c \
1472 r0drv/powernotification-r0drv.c \
1473 r0drv/solaris/RTLogWriteDebugger-r0drv-solaris.c \
1474 r0drv/solaris/assert-r0drv-solaris.c \
1475 r0drv/solaris/initterm-r0drv-solaris.c \
1476 r0drv/solaris/memuserkernel-r0drv-solaris.c \
1477 r0drv/solaris/semevent-r0drv-solaris.c \
1478 r0drv/solaris/semeventmulti-r0drv-solaris.c \
1479 r0drv/solaris/semfastmutex-r0drv-solaris.c \
1480 r0drv/solaris/spinlock-r0drv-solaris.c
1481
1482 # VBI is now compiled into IPRT
1483 RuntimeR0Drv_SOURCES.solaris += \
1484 r0drv/solaris/vbi/RTMpPokeCpu-r0drv-solaris.c \
1485 r0drv/solaris/vbi/mpnotification-r0drv-solaris.c \
1486 r0drv/solaris/vbi/alloc-r0drv-solaris.c \
1487 r0drv/solaris/vbi/memobj-r0drv-solaris.c \
1488 r0drv/solaris/vbi/mp-r0drv-solaris.c \
1489 r0drv/solaris/vbi/process-r0drv-solaris.c \
1490 r0drv/solaris/vbi/thread-r0drv-solaris.c \
1491 r0drv/solaris/vbi/thread2-r0drv-solaris.c \
1492 r0drv/solaris/vbi/time-r0drv-solaris.c \
1493 r0drv/solaris/vbi/timer-r0drv-solaris.c \
1494 r0drv/solaris/vbi/i86pc/os/vbi.c
1495
1496
1497## PORTME: Porters create and add their selection of platform specific Ring-0 Driver files here.
1498
1499RuntimeR0Drv_ORDERDEPS.freebsd = \
1500 $(PATH_INS)/gen-sys-hdrs/bus_if.h \
1501 $(PATH_INS)/gen-sys-hdrs/device_if.h
1502
1503
1504#
1505# RuntimeGuestR0 - Guest driver runtime.
1506# This is almost the same as the RuntimeR0Drv, the main difference
1507# is in the backdoor logging and the lack of sup.h (which should be
1508# made irrelevant even for RuntimeR0Drv).
1509#
1510RuntimeGuestR0_TEMPLATE := VBOXGUESTR0LIB
1511RuntimeGuestR0_SOURCES := $(filter-out generic/RTLogWriteUser-generic.cpp, $(RuntimeR0Drv_SOURCES))
1512RuntimeGuestR0_SOURCES += \
1513 VBox/logbackdoor.cpp
1514RuntimeGuestR0_EXTENDS = RuntimeR0Drv
1515
1516
1517#
1518# RuntimeGuestR0NT4 - Win32 NT4 guest driver runtime.
1519#
1520RuntimeGuestR0NT4_EXTENDS = RuntimeGuestR0
1521RuntimeGuestR0NT4_EXTENDS_BY = appending
1522RuntimeGuestR0NT4_DEFS = IPRT_TARGET_NT4
1523
1524
1525#
1526# RuntimeGC - Guest context library.
1527#
1528RuntimeGC_TEMPLATE = VBOXGC
1529RuntimeGC_DEFS = IN_RT_GC RT_WITH_VBOX
1530RuntimeGC_INCS = include
1531RuntimeGC_SOURCES = \
1532 common/log/log.cpp \
1533 common/log/logellipsis.cpp \
1534 common/log/logrel.cpp \
1535 common/log/logrelellipsis.cpp \
1536 common/log/logcom.cpp \
1537 common/log/logformat.cpp \
1538 common/misc/RTAssertMsg1Weak.cpp \
1539 common/misc/RTAssertMsg2.cpp \
1540 common/misc/RTAssertMsg2Add.cpp \
1541 common/misc/RTAssertMsg2AddWeak.cpp \
1542 common/misc/RTAssertMsg2AddWeakV.cpp \
1543 common/misc/RTAssertMsg2Weak.cpp \
1544 common/misc/RTAssertMsg2WeakV.cpp \
1545 common/misc/assert.cpp \
1546 common/misc/buildconfig.cpp \
1547 common/misc/sanity-c.c \
1548 common/misc/sanity-cpp.cpp \
1549 common/string/strformat.cpp \
1550 common/string/strformatrt.cpp \
1551 common/string/strformattype.cpp \
1552 common/string/strncmp.cpp \
1553 common/string/strpbrk.cpp \
1554 common/string/strprintf.cpp \
1555 common/table/avllu32.cpp \
1556 common/table/avlou32.cpp \
1557 common/table/avlogcphys.cpp \
1558 common/table/avlogcptr.cpp \
1559 common/table/avlohcphys.cpp \
1560 common/table/avloioport.cpp \
1561 common/table/avlrogcphys.cpp \
1562 common/table/avlrogcptr.cpp \
1563 common/table/avlroioport.cpp \
1564 common/table/avlroogcptr.cpp \
1565 common/table/avlu32.cpp \
1566 common/time/timeprog.cpp \
1567 common/time/timesup.cpp \
1568 gc/initterm-gc.cpp \
1569 generic/RTAssertShouldPanic-generic.cpp \
1570 VBox/strformat-vbox.cpp \
1571 \
1572 $(RuntimeNoCrt_SOURCES)
1573
1574#if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
1575# RuntimeGC_SOURCES += common/time/timesupA.asm
1576#else
1577 RuntimeGC_SOURCES += common/time/timesupref.cpp
1578#endif
1579
1580RuntimeGC_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
1581
1582ifeq ($(VBOX_LDR_FMT32),lx)
1583 RuntimeGC_SOURCES += os2/sys0.asm
1584endif
1585
1586if1of ($(KBUILD_TARGET), darwin solaris freebsd)
1587RuntimeGC_SOURCES += \
1588 common/math/gcc/adddi3.c \
1589 common/math/gcc/anddi3.c \
1590 common/math/gcc/ashldi3.c \
1591 common/math/gcc/ashrdi3.c \
1592 common/math/gcc/cmpdi2.c \
1593 common/math/gcc/divdi3.c \
1594 common/math/gcc/iordi3.c \
1595 common/math/gcc/lshldi3.c \
1596 common/math/gcc/lshrdi3.c \
1597 common/math/gcc/moddi3.c \
1598 common/math/gcc/muldi3.c \
1599 common/math/gcc/negdi2.c \
1600 common/math/gcc/notdi2.c \
1601 common/math/gcc/qdivrem.c \
1602 common/math/gcc/subdi3.c \
1603 common/math/gcc/ucmpdi2.c \
1604 common/math/gcc/udivdi3.c \
1605 common/math/gcc/umoddi3.c \
1606 common/math/gcc/xordi3.c
1607endif
1608
1609
1610#
1611# Static library for new & delete for the electric fence.
1612#
1613RuntimeEFCPP_TEMPLATE = $(RuntimeR3_TEMPLATE)
1614RuntimeEFCPP_SDKS = $(RuntimeR3_SDKS)
1615RuntimeEFCPP_SDKS.$(KBUILD_TARGET) = $(RuntimeR3_SDKS.$(KBUILD_TARGET))
1616RuntimeEFCPP_DEFS = $(RuntimeR3_DEFS)
1617RuntimeEFCPP_DEFS.$(KBUILD_TARGET) = $(RuntimeR3_DEFS.$(KBUILD_TARGET))
1618RuntimeEFCPP_INCS = $(RuntimeR3_INCS)
1619RuntimeEFCPP_INCS.$(KBUILD_TARGET) = $(RuntimeR3_INCS.$(KBUILD_TARGET))
1620RuntimeEFCPP_SOURCES = r3/alloc-ef-cpp.cpp
1621
1622
1623
1624#
1625# errmsg.cpp depends on a generated header.
1626#
1627common/err/errmsg.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgdata.h
1628common/err/errmsg.cpp_INCS = $(IPRT_OUT_DIR)
1629
1630win/errmsgwin.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgcomdata.h
1631win/errmsgwin.cpp_INCS = $(IPRT_OUT_DIR)
1632
1633# Our COM errors only for R3 libraries on the host
1634define def_errmsgwin_deps
1635 $(lib)_win/errmsgwin.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
1636 $(lib)_common/err/errmsgxpcom.cpp_INCS = $(IPRT_OUT_DIR)
1637 $(lib)_common/err/errmsgxpcom.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
1638endef
1639$(foreach lib,RuntimeR3 VBoxRT RuntimeLnxHostR3,$(eval $(def_errmsgwin_deps)))
1640
1641
1642#
1643# Generate the status code data.
1644#
1645$(IPRT_OUT_DIR)/errmsgdata.h: \
1646 $(VBOX_PATH_RUNTIME_SRC)/common/err/errmsg.sed \
1647 $(PATH_ROOT)/include/iprt/err.h \
1648 $(PATH_ROOT)/include/VBox/err.h \
1649 | $$(dir $$@)
1650 $(call MSG_GENERATE,,$@,$(filter %.h,$^))
1651 $(QUIET)$(REDIRECT) -wo $@ -- $(SED) -f $< $(filter %.h,$^)
1652
1653## @todo r=bird: rename this to indicate that it's not only COM errors, but all win32/64 errors.
1654$(IPRT_OUT_DIR)/errmsgcomdata.h: \
1655 $(VBOX_PATH_RUNTIME_SRC)/common/err/errmsgcom.sed \
1656 $$(PATH_SDK_WINPSDK_INC)/WinError.h \
1657 | $$(dir $$@)
1658 $(call MSG_GENERATE,,$@,$(filter %.h,$^))
1659 $(QUIET)$(REDIRECT) -wo $@ -- $(SED) -f $< $(filter %.h,$^)
1660
1661$(IPRT_OUT_DIR)/errmsgvboxcomdata.h: \
1662 $(VBOX_PATH_RUNTIME_SRC)/VBox/errmsgvboxcom.xsl \
1663 $(VBOX_XIDL_FILE_SRC) \
1664 | $$(dir $$@)
1665 $(call MSG_GENERATE,,$@,$(filter %.xidl,$^))
1666 $(VBOX_XSLTPROC) -o $@ $< $(filter %.xidl,$^)
1667
1668
1669if "$(KBUILD_TARGET)" == "freebsd"
1670#
1671# FreeBSDGeneratedKernelHeaders - Generate some kernel interface headers.
1672#
1673# These are used by:
1674# - The RTMp* API in IPRT.
1675# - VBoxGuest
1676#
1677# Note! We cannot give a output path to the awk program, it will always
1678# generate the header next to the source. So, we'll have to temporarily copy
1679# the source file to the destination directory to work.
1680#
1681VBOX_AWK := /usr/bin/awk
1682INSTALLS += FreeBSDGeneratedKernelHeaders
1683FreeBSDGeneratedKernelHeaders_INST = gen-sys-hdrs/
1684FreeBSDGeneratedKernelHeaders_SOURCES = \
1685 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/bus_if.h \
1686 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/device_if.h \
1687 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/pci_if.h
1688FreeBSDGeneratedKernelHeaders_CLEAN = $(FreeBSDGeneratedKernelHeaders_SOURCES)
1689
1690$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/bus_if.h: $(VBOX_FREEBSD_SRC)/kern/bus_if.m | $$(dir $$@)
1691 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
1692 $(QUIET)$(CP) -f $< $(@D)/bus_if.m
1693 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/bus_if.m -h -p
1694 $(QUIET)$(RM) $(@D)/bus_if.m
1695
1696$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/device_if.h: $(VBOX_FREEBSD_SRC)/kern/device_if.m | $$(dir $$@)
1697 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
1698 $(QUIET)$(CP) -f $< $(@D)/device_if.m
1699 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/device_if.m -h -p
1700 $(QUIET)$(RM) $(@D)/device_if.m
1701
1702$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/pci_if.h: $(VBOX_FREEBSD_SRC)/dev/pci/pci_if.m | $$(dir $$@)
1703 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
1704 $(QUIET)$(CP) -f $< $(@D)/pci_if.m
1705 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/pci_if.m -h -p
1706 $(QUIET)$(RM) $(@D)/pci_if.m
1707endif # FreeBSD
1708
1709
1710#
1711# Aliases for .cpp.h files so we can more easily do syntax checking from the editor.
1712#
1713ldrELFRelocatable.cpp.o: ldrELF.o
1714ldrELFRelocatable.cpp.obj: ldrELF.obj
1715
1716
1717#
1718# Doxygen documentation.
1719#
1720IPRT_DOXYFILE_INPUT_DIRS = \
1721 $(PATH_ROOT)/include/iprt \
1722 $(PATH_ROOT)/include/iprt/nocrt \
1723 $(PATH_ROOT)/include/iprt/nocrt/x86 \
1724 $(PATH_ROOT)/include/iprt/nocrt/amd64 \
1725 $(VBOX_PATH_RUNTIME_SRC)/include/internal \
1726 $(VBOX_PATH_RUNTIME_SRC)/common/alloc \
1727 $(VBOX_PATH_RUNTIME_SRC)/common/checksum \
1728 $(VBOX_PATH_RUNTIME_SRC)/common/err \
1729 $(VBOX_PATH_RUNTIME_SRC)/common/ldr \
1730 $(VBOX_PATH_RUNTIME_SRC)/common/log \
1731 $(VBOX_PATH_RUNTIME_SRC)/common/misc \
1732 $(VBOX_PATH_RUNTIME_SRC)/common/string \
1733 $(VBOX_PATH_RUNTIME_SRC)/common/table \
1734 $(VBOX_PATH_RUNTIME_SRC)/common/time \
1735 $(VBOX_PATH_RUNTIME_SRC)/VBox \
1736 $(foreach dir, $(VBOX_PATH_RUNTIME_SRC) $(VBOX_PATH_RUNTIME_SRC)/r3 $(VBOX_PATH_RUNTIME_SRC)/r0drv,\
1737 $(dir) \
1738 $(dir)/darwin \
1739 $(dir)/l4 \
1740 $(dir)/linux \
1741 $(dir)/nt \
1742 $(dir)/os2 \
1743 $(dir)/win \
1744 $(dir)/win32 \
1745 $(dir)/win64 \
1746 $(dir)/generic \
1747 )
1748
1749# These must come first in order to make things look nice.
1750IPRT_DOXYFILE_INPUT_FIRST =\
1751 $(PATH_ROOT)/include/iprt/cdefs.h \
1752 $(PATH_ROOT)/include/iprt/types.h \
1753 $(PATH_ROOT)/include/iprt/runtime.h \
1754 $(PATH_ROOT)/include/iprt/param.h \
1755 $(PATH_ROOT)/include/iprt/assert.h \
1756 $(PATH_ROOT)/include/iprt/asm.h \
1757
1758IPRT_DOXYFILE_INPUT := \
1759 $(filter-out %.cpp.h, $(sort $(wildcard $(addsuffix /*.h, $(IPRT_DOXYFILE_INPUT_DIRS)))) ) \
1760 $(foreach dir, $(IPRT_DOXYFILE_INPUT_DIRS), $(wildcard $(dir)/*.cpp $(dir)/.c $(dir)/.asm))
1761IPRT_DOXYFILE_INPUT := \
1762 $(IPRT_DOXYFILE_INPUT_FIRST) \
1763 $(filter-out $(IPRT_DOXYFILE_INPUT_FIRST), $(IPRT_DOXYFILE_INPUT))
1764
1765
1766IPRT_DOXYFILE_OUTPUT = $(PATH_OUT)/docs/iprt
1767BLDDIRS += $(IPRT_DOXYFILE_OUTPUT)
1768
1769includedep $(IPRT_OUT_DIR)/Doxyfile.iprt.dep
1770
1771# Generate the Doxyfile
1772$(IPRT_OUT_DIR)/Doxyfile.iprt: \
1773 $(VBOX_PATH_RUNTIME_SRC)/Doxyfile \
1774 $(VBOX_PATH_RUNTIME_SRC)/Makefile.kmk \
1775 $(comp-vars IPRT_DOXYFILE_INPUT,DOXYGEN_INPUT_PREV,FORCE) \
1776 $(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE) \
1777 | $$(dir $$@)
1778 $(RM) -f $@ [email protected] [email protected]
1779 $(CP) -f $(VBOX_PATH_RUNTIME_SRC)/Doxyfile [email protected]
1780 $(APPEND) [email protected]
1781 $(APPEND) [email protected] "OUTPUT_DIRECTORY = $(IPRT_DOXYFILE_OUTPUT)"
1782 $(APPEND) [email protected] "WARN_LOGFILE = $(IPRT_DOXYFILE_OUTPUT)/errors"
1783 $(APPEND) [email protected] "INCLUDE_PATH = $(PATH_ROOT)/include include . common/table"
1784 $(APPEND) [email protected] "INCLUDE_FILE_PATTERNS = *.cpp.h"
1785 $(APPEND) [email protected] "PREDEFINED += $(ARCH_BITS_DEFS)"
1786 $(APPEND) [email protected]
1787 $(APPEND) [email protected] "INPUT = $(IPRT_DOXYFILE_INPUT)"
1788 $(APPEND) [email protected]
1789 $(MV) -f [email protected] $@
1790 @$(APPEND) [email protected] "DOXYGEN_OUTPUT_PREV = $(IPRT_DOXYFILE_OUTPUT)"
1791 @$(APPEND) [email protected] "DOXYGEN_INPUT_PREV = $(IPRT_DOXYFILE_INPUT)"
1792
1793# Do the actual job.
1794$(IPRT_OUT_DIR)/docs.iprt: $(IPRT_OUT_DIR)/Doxyfile.iprt $$(IPRT_DOXYFILE_INPUT) | $(IPRT_DOXYFILE_OUTPUT)/
1795 $(RM) -f $(wildcard $(IPRT_DOXYFILE_OUTPUT)/html/*) $(IPRT_OUT_DIR)/docs.iprt
1796 doxygen $(IPRT_OUT_DIR)/Doxyfile.iprt
1797 $(APPEND) $(IPRT_OUT_DIR)/docs.iprt
1798
1799# aliases
1800docs.iprt: $(IPRT_OUT_DIR)/docs.iprt
1801if !defined(VBOX_ONLY_DOCS) && defined(VBOX_WITH_ALL_DOXYGEN_TARGETS)
1802docs: $(IPRT_OUT_DIR)/docs.iprt
1803endif
1804
1805test-doxygen::
1806 @echo test-$(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE)
1807 @echo $(IPRT_DOXYFILE_OUTPUT)
1808 @echo $(DOXYGEN_OUTPUT_PREV)
1809 @echo $(IPRT_DOXYFILE_INPUT)
1810
1811#
1812# Generate the rules (we're the to sub-makefile).
1813#
1814include $(KBUILD_PATH)/subfooter.kmk
1815
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