VirtualBox

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

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

iprt/path: Added RTPathJoinA.

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