VirtualBox

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

Last change on this file since 33516 was 33498, checked in by vboxsync, 14 years ago

Added RTSystemQueryTotalRam

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

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