VirtualBox

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

Last change on this file since 25414 was 25406, checked in by vboxsync, 14 years ago

IPRT,PDMCritSect: Lock validation can only be performed in ring-3; fixed #PF on 32-bit darwin with debug builds. Hopefully fixed the recursion issue on windows.

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

© 2023 Oracle
ContactPrivacy policyTerms of Use