VirtualBox

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

Last change on this file since 34536 was 34492, checked in by vboxsync, 14 years ago

VBOX_ONLY_EXTPACKS changes.

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

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