VirtualBox

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

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

iprt: more tar code and vfs filesystem stream bugfixes.

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