VirtualBox

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

Last change on this file since 21593 was 21588, checked in by vboxsync, 15 years ago

Main: move vbox-independent OVF reader code to separate file; move some more string implementation from com::UTF8Str to iprt::MiniString

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