VirtualBox

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

Last change on this file since 25045 was 24825, checked in by vboxsync, 15 years ago

IPRT: Added RTMsgError, RTMsgErrorV and RTGetOptPrintError.

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