VirtualBox

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

Last change on this file since 26433 was 26416, checked in by vboxsync, 15 years ago

RTMemCache: Initial coding (completely untested).

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