VirtualBox

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

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

iprt: Added RTMpGetDescription.

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