VirtualBox

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

最後變更 在這個檔案從22062是 21920,由 vboxsync 提交於 16 年 前

IPRT: Added a RTCrc32 that uses crc32() from zlib since we already have zlib as a dependency and it's crc32 implemention is 2.5 times faster than ours.

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

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette