VirtualBox

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

Last change on this file since 24760 was 24662, checked in by vboxsync, 15 years ago

Moved RTStrVersionToUInt32 out of strtonum.cpp.

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