VirtualBox

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

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

Runtime/mp-freebsd.cpp: Implement enough to make tstMp-1 happy

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