VirtualBox

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

Last change on this file since 21050 was 21046, checked in by vboxsync, 16 years ago

IPRT: Added a reader of NM-style map files. (Mainly for linux /proc/kallsyms and System.map.)

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