VirtualBox

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

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