VirtualBox

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

Last change on this file since 19402 was 19389, checked in by vboxsync, 16 years ago

IPRT: Implemented RTMpPokeCpu where it made sense (untested).

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