VirtualBox

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

Last change on this file since 33605 was 33602, checked in by vboxsync, 14 years ago

IPRT/r3/posix: Split out RTPathUserHome and the process creation APIs into separate files to avoid linker warnings on linux when linking statically.

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