VirtualBox

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

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

iprt: Working on tar vfs.

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

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