VirtualBox

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

Last change on this file since 19559 was 19559, checked in by vboxsync, 16 years ago

IPRT: Coded up the debug address space, adding a RTUINTPTR AVL range tree in the process. Stubbed the debug module interpreter.

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