VirtualBox

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

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

IPRT: Merge RTThreadPreemptDisable-r0drv-linux.c & RTThreadPreemptRestore-r0drv-linux.c into thread-r0drv-linux.c and move over the preemption stuff from thread2-r0drv-linux.c.

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