VirtualBox

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

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

RuntimeGuestR3Mini: windows update.

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

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette