VirtualBox

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

Last change on this file since 25240 was 25076, checked in by vboxsync, 15 years ago

RTFileQueryFsSizes: Moving it to a separate file so we can select platform specific implementations where it becomes necessary..

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