VirtualBox

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

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

build fix

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