VirtualBox

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

Last change on this file since 18930 was 18921, checked in by vboxsync, 16 years ago

Runtime/R0/FreeBSD: Makefile changes for the FreeBSD port. Use the generic timer implementation instead of the freebsd specific one because it doesn't work with small tick

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