VirtualBox

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

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

Runtime: Implemented tar archive I/O.

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

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