VirtualBox

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

Last change on this file since 23546 was 23507, checked in by vboxsync, 15 years ago

IPRT: Added APIs for convering digests to/from strings.

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