VirtualBox

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

Last change on this file since 22509 was 22308, checked in by vboxsync, 15 years ago

Runtime: Add RTFOFF Avl tree variant for the I/O cache

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