VirtualBox

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

Last change on this file since 24106 was 23852, checked in by vboxsync, 15 years ago

Main/D-Bus: Build fixes.

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