VirtualBox

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

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

IPRT,SUPDrv,++: AssertMsg[12] -> AssertMsg1Weak, AssertMsg1, AssertMsg2Weak, AssertMsg2, AssertMsg2WeakV and AssertMsg2V. Doing more of the assertion machinery in common/misc/assert.cpp to avoid code duplication (ring-0). Major SUPDrv version bump.

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

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