VirtualBox

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

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

IPRT/SUPDrv/VMM: Made RTR0AssertPanicSystem available to VMMR0.r0 on darwin & solaris (only platforms implemting it currently). Created RTAssertMsg1, RTAssertMsg2 and RTAssertMsg2V (darwin only atm) in addition to AssertMsg1/2 and delcared the latter two as weak and overridable by users, while the former are strong and exposed by SUPDrv. This way we can get the full assertion text in the 'Problem Report for Mac OS X Kernel' thing. Will propagte the changes to the other platforms and rings later.

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