VirtualBox

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

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

IPRT,DoxyFile.Core: Mopped up the errors in the IPRT doxygen run.

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