VirtualBox

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

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

Solaris/vboxdrv/vboxflt: Fixed incorrect return value on failure on _init.

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