VirtualBox

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

Last change on this file since 25485 was 25438, checked in by vboxsync, 15 years ago

semsrw-generic.cpp -> semrw-generic.cpp.

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

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette