VirtualBox

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

Last change on this file since 25307 was 25296, checked in by vboxsync, 15 years ago

IPRT: splitting up utf-8.cpp

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

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette