VirtualBox

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

Last change on this file since 26024 was 25946, checked in by vboxsync, 15 years ago

*: VBOX_WITH_RAW_MODE - Initial build changes (builds on mac os x).

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

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