VirtualBox

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

Last change on this file since 24409 was 24386, checked in by vboxsync, 15 years ago

Solaris/r0drv: Merge VBI into IPRT.

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