VirtualBox

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

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

Runtime: added SHA1 and manifest file support

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