VirtualBox

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

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

#3282: API, RT generic part, updated VBoxManage list hostif.

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