VirtualBox

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

最後變更 在這個檔案從33279是 33279,由 vboxsync 提交於 14 年 前

IPRT: Use the mmap+heap stuff on all posixy platforms.

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

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