VirtualBox

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

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

More extpack build speedup hacking.

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