VirtualBox

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

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

s/IN_RT_GC/IN_RT_RC/g

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