VirtualBox

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

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

Runtime: errmsgxpcom only for non-Windows

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