VirtualBox

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

Last change on this file since 44426 was 44426, checked in by vboxsync, 12 years ago

IPRT: Implemented RTSystemQueryTotalRam and RTSystemQueryAvailableRam for OS/2.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 79.2 KB
Line 
1# $Id: Makefile.kmk 44426 2013-01-28 14:28:11Z vboxsync $
2## @file
3# Sub-Makefile for the IPRT.
4#
5
6#
7# Copyright (C) 2006-2012 Oracle Corporation
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
27SUB_DEPTH = ../../..
28include $(KBUILD_PATH)/subheader.kmk
29
30ifdef VBOX_ONLY_ADDITIONS
31 #
32 # Only build the additions, sort out the legacy names first.
33 #
34 LIBRARIES += RuntimeGuestR3 RuntimeGuestR3Shared RuntimeGuestR3Mini
35 LIBRARIES.win.amd64 += RuntimeGuestR3-x86 RuntimeGuestR3Shared-x86
36 ifdef VBOX_WITH_ADDITION_DRIVERS
37 LIBRARIES += RuntimeGuestR0
38 #LIBRARIES.os2 += RuntimeGuestR0OS2Warp3
39 LIBRARIES.win.x86 += RuntimeGuestR0NT4
40 endif
41
42else ifdef VBOX_ONLY_TESTSUITE
43 #
44 # Only build the testsuite.
45 #
46 LIBRARIES += RuntimeGuestR3 RuntimeGuestR3Shared RuntimeR3 RuntimeR0
47 LIBRARIES.solaris += RuntimeR0Stub
48 LIBRARIES.win += RuntimeR0Stub
49 LIBRARIES.win.x86 += RuntimeR3VccTricks
50
51else ifdef VBOX_ONLY_DOCS
52 #
53 # Build docs only - need just regular R3 runtime.
54 #
55 LIBRARIES += RuntimeR3 RuntimeBldProg
56
57else ifdef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
58 #
59 # Build docs only - need just regular R3 runtime.
60 #
61 LIBRARIES += RuntimeBldProg
62 LIBRARIES.solaris += RuntimeR0Stub
63 LIBRARIES.win += RuntimeR0Stub RuntimeRCStub
64 include $(PATH_SUB_CURRENT)/tools/Makefile.kmk
65
66else # !VBOX_ONLY_ADDITIONS && !VBOX_ONLY_TESTSUITE && !VBOX_ONLY_DOCS
67
68 #
69 # Normal build.
70 #
71 ifndef VBOX_ONLY_EXTPACKS
72 include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
73 endif
74 include $(PATH_SUB_CURRENT)/tools/Makefile.kmk
75
76 BLDPROGS += uniread
77 LIBRARIES += RuntimeR3 RuntimeBldProg RuntimeR0 RuntimeEFCPP RuntimeR3NoCRTGCC
78 LIBRARIES.solaris += RuntimeR0Stub
79 LIBRARIES.win += RuntimeR0Stub
80 ifdef VBOX_WITH_RAW_MODE
81 LIBRARIES += RuntimeRC
82 LIBRARIES.win += RuntimeRCStub
83 endif
84 ifdef VBOX_WITH_VBOXDRV
85 LIBRARIES += RuntimeR0Drv
86 endif
87 ifdef VBOX_WITH_ADDITIONS
88 LIBRARIES += RuntimeGuestR3 RuntimeGuestR3Shared RuntimeGuestR3Mini
89 LIBRARIES.win.amd64 += RuntimeGuestR3-x86 RuntimeGuestR3Shared-x86
90 ifdef VBOX_WITH_ADDITION_DRIVERS
91 LIBRARIES += RuntimeGuestR0
92 endif
93 #LIBRARIES.os2 += RuntimeGuestR0OS2Warp3
94 LIBRARIES.win.x86 += RuntimeGuestR0NT4
95 endif # VBOX_WITH_ADDITIONS
96 LIBRARIES.win.x86 += RuntimeR3VccTricks
97 LIBRARIES.l4 += RuntimeR3L4 RuntimeLnxHostR3
98 DLLS += VBoxRT
99endif
100
101
102# Always build the ntdll import libraries on windows.
103LIBRARIES.win += RuntimeR3NtDll-x86
104if1of (amd64, $(KBUILD_TARGET_ARCH) $(KBUILD_HOST_ARCH))
105 LIBRARIES.win += RuntimeR3NtDll-amd64
106endif
107
108
109# Always build the import library.
110IMPORT_LIBS += VBoxRTImp
111
112
113# Where the generated stuff goes.
114IPRT_OUT_DIR := $(PATH_TARGET)/Runtime
115BLDDIRS += $(IPRT_OUT_DIR)
116OTHER_CLEAN += \
117 $(IPRT_OUT_DIR)/errmsgdata.h \
118 $(IPRT_OUT_DIR)/errmsgcomdata.h \
119 $(IPRT_OUT_DIR)/errmsgvboxcomdata.h \
120 $(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts \
121 $(IPRT_OUT_DIR)/Doxyfile.iprt \
122 $(IPRT_OUT_DIR)/Doxyfile.iprt.dep \
123 $(IPRT_OUT_DIR)/docs.iprt
124
125
126#
127# Globals
128#
129VBOX_PATH_RUNTIME_SRC := $(PATH_SUB_CURRENT)
130
131
132#
133# Set the defines that buildconfig.cpp needs. Its used by several targets.
134#
135common/misc/buildconfig.cpp_DEFS = \
136 IPRT_BLDCFG_SCM_REV=$(VBOX_SVN_REV) \
137 IPRT_BLDCFG_VERSION_STRING=\"$(VBOX_VERSION_STRING)\" \
138 IPRT_BLDCFG_VERSION_MAJOR=$(VBOX_VERSION_MAJOR) \
139 IPRT_BLDCFG_VERSION_MINOR=$(VBOX_VERSION_MINOR) \
140 IPRT_BLDCFG_VERSION_BUILD=$(VBOX_VERSION_BUILD) \
141 IPRT_BLDCFG_TARGET=\"$(KBUILD_TARGET)\" \
142 IPRT_BLDCFG_TARGET_ARCH=\"$(KBUILD_TARGET_ARCH)\" \
143 IPRT_BLDCFG_TYPE=\"$(KBUILD_TYPE)\"
144
145#
146# Unicode Specification reader used to regenerate unidata.cpp.
147#
148uniread_TEMPLATE = VBOXBLDPROG
149uniread_SOURCES = common/string/uniread.cpp
150uniread_INCS = include
151
152#
153# Win64 assembly sources.
154#
155RuntimeWin64ASM_SOURCES = \
156 win/amd64/ASMAtomicBitClear.asm \
157 win/amd64/ASMAtomicBitTestAndToggle.asm \
158 win/amd64/ASMAtomicBitToggle.asm \
159 win/amd64/ASMAtomicReadU64.asm \
160 win/amd64/ASMAtomicXchgU16.asm \
161 win/amd64/ASMAtomicXchgU8.asm \
162 win/amd64/ASMBitFirstClear.asm \
163 win/amd64/ASMBitFirstSet.asm \
164 win/amd64/ASMGetCS.asm \
165 win/amd64/ASMGetDS.asm \
166 win/amd64/ASMGetES.asm \
167 win/amd64/ASMGetFlags.asm \
168 win/amd64/ASMGetFS.asm \
169 win/amd64/ASMGetGS.asm \
170 win/amd64/ASMGetIDTR.asm \
171 win/amd64/ASMGetGDTR.asm \
172 win/amd64/ASMGetTR.asm \
173 win/amd64/ASMGetSS.asm \
174 win/amd64/ASMProbeReadByte.asm \
175 win/amd64/ASMSetFlags.asm \
176 win/amd64/ASMGetDR0.asm \
177 win/amd64/ASMGetDR1.asm \
178 win/amd64/ASMGetDR2.asm \
179 win/amd64/ASMGetDR3.asm \
180 win/amd64/ASMGetDR6.asm \
181 win/amd64/ASMGetDR7.asm \
182 common/asm/ASMAtomicCmpXchgU8.asm \
183 common/asm/ASMMultU64ByU32DivByU32.asm \
184 common/asm/ASMCpuId_Idx_ECX.asm \
185 common/asm/ASMNopPause.asm
186
187#
188# Win32 assembly sources.
189#
190RuntimeWin32ASM_SOURCES = \
191 common/asm/ASMAtomicCmpXchgU8.asm \
192 common/asm/ASMMultU64ByU32DivByU32.asm \
193 common/asm/ASMCpuId_Idx_ECX.asm
194
195#
196# NoCRT sources (minus math stuff).
197#
198if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
199RuntimeNoCrt_SOURCES = \
200 common/misc/setjmp.asm \
201 common/string/memchr.asm \
202 common/string/memcmp.asm \
203 common/string/memcpy.asm \
204 common/string/mempcpy.asm \
205 common/string/memmove.asm \
206 common/string/memset.asm \
207 common/string/strchr.asm \
208 common/string/strcpy.asm \
209 common/string/strncpy.asm \
210 common/string/strcmp.asm \
211 common/string/strlen.asm
212endif
213
214
215#
216# RuntimeR3 - Static Runtime for Ring-3 executables.
217#
218RuntimeR3_TEMPLATE = VBoxR3Static
219RuntimeR3_SDKS = VBOX_LIBXML2 VBOX_OPENSSL VBOX_BOOST ## @todo why is BOOST and XML2 here? r3/xml.cpp is not in this lib...
220RuntimeR3_SDKS.win = $(VBOX_WINPSDK) $(VBOX_WINDDK)
221RuntimeR3_DEFS = IN_RT_R3 IN_SUP_R3 LDR_WITH_NATIVE LDR_WITH_ELF32 LDR_WITH_PE RT_WITH_VBOX RT_NO_GIP
222#RuntimeR3_DEFS += RTMEM_WRAP_TO_EF_APIS
223ifdef IPRT_WITH_KSTUFF
224 RuntimeR3_DEFS += LDR_WITH_KLDR
225endif
226ifdef IPRT_WITH_LZJB
227 RuntimeR3_DEFS += RTZIP_USE_LZJB
228endif
229ifdef IPRT_WITH_LZO
230 RuntimeR3_DEFS += RTZIP_USE_LZO
231endif
232ifn1of ($(KBUILD_TARGET), win)
233 RuntimeR3_DEFS += RT_WITH_ICONV_CACHE
234endif
235ifdef IPRT_WITH_FUTEX_BASED_SEMS
236 RuntimeR3_DEFS.linux += IPRT_WITH_FUTEX_BASED_SEMS
237endif
238RuntimeR3_INCS = \
239 include \
240 $(SDK_VBOX_ZLIB_INCS)
241RuntimeR3_INCS += \
242 $(PATH_ROOT)/src/libs/liblzf-3.4
243ifdef IPRT_WITH_KSTUFF
244 RuntimeR3_INCS += \
245 $(PATH_ROOT)/src/libs/kStuff/kStuff/include
246endif
247RuntimeR3_INCS.l4 = \
248 $(L4_INCDIR)
249
250# RuntimeR3_INCS.solaris = \
251# /usr/include
252
253RuntimeR3_SOURCES = \
254 common/alloc/alloc.cpp \
255 common/alloc/heapsimple.cpp \
256 common/alloc/heapoffset.cpp \
257 common/alloc/memcache.cpp \
258 common/alloc/memtracker.cpp \
259 common/checksum/adler32.cpp \
260 common/checksum/crc32.cpp \
261 common/checksum/crc64.cpp \
262 common/checksum/md5.cpp \
263 common/checksum/md5str.cpp \
264 common/checksum/ipv4.cpp \
265 common/checksum/ipv6.cpp \
266 common/checksum/manifest.cpp \
267 common/checksum/manifest2.cpp \
268 common/checksum/manifest3.cpp \
269 common/checksum/manifest-file.cpp \
270 common/checksum/RTSha1Digest.cpp \
271 common/checksum/sha1.cpp \
272 common/checksum/sha1str.cpp \
273 common/checksum/sha256.cpp \
274 common/checksum/sha256str.cpp \
275 common/checksum/sha512.cpp \
276 common/checksum/sha512str.cpp \
277 common/dbg/dbg.cpp \
278 common/dbg/dbgas.cpp \
279 common/dbg/dbgmod.cpp \
280 common/dbg/dbgmodcontainer.cpp \
281 common/dbg/dbgmoddwarf.cpp \
282 common/dbg/dbgmodldr.cpp \
283 common/dbg/dbgmodnm.cpp \
284 common/dvm/dvm.cpp \
285 common/dvm/dvmbsdlabel.cpp \
286 common/dvm/dvmgpt.cpp \
287 common/dvm/dvmmbr.cpp \
288 common/dvm/dvmvfs.cpp \
289 common/err/errinfo.cpp \
290 common/err/errmsg.cpp \
291 common/err/RTErrConvertFromErrno.cpp \
292 common/err/RTErrConvertToErrno.cpp \
293 common/filesystem/filesystem.cpp \
294 common/filesystem/filesystemext.cpp \
295 common/ldr/ldr.cpp \
296 common/ldr/ldrELF.cpp \
297 common/ldr/ldrEx.cpp \
298 common/ldr/ldrFile.cpp \
299 common/ldr/ldrNative.cpp \
300 common/ldr/ldrPE.cpp \
301 common/log/log.cpp \
302 common/log/logellipsis.cpp \
303 common/log/logrel.cpp \
304 common/log/logrelellipsis.cpp \
305 common/log/logcom.cpp \
306 common/log/logformat.cpp \
307 common/log/tracebuf.cpp \
308 common/log/tracedefault.cpp \
309 common/misc/RTAssertMsg1Weak.cpp \
310 common/misc/RTAssertMsg2.cpp \
311 common/misc/RTAssertMsg2Add.cpp \
312 common/misc/RTAssertMsg2AddWeak.cpp \
313 common/misc/RTAssertMsg2AddWeakV.cpp \
314 common/misc/RTAssertMsg2Weak.cpp \
315 common/misc/RTAssertMsg2WeakV.cpp \
316 common/misc/RTFileOpenF.cpp \
317 common/misc/RTFileOpenV.cpp \
318 common/misc/RTMemWipeThoroughly.cpp \
319 common/misc/assert.cpp \
320 common/misc/buildconfig.cpp \
321 common/misc/cidr.cpp \
322 common/misc/getopt.cpp \
323 common/misc/getoptargv.cpp \
324 common/misc/handle.cpp \
325 common/misc/handletable.cpp \
326 common/misc/handletablectx.cpp \
327 common/misc/handletablesimple.cpp \
328 common/misc/lockvalidator.cpp \
329 common/misc/message.cpp \
330 common/misc/once.cpp \
331 common/misc/req.cpp \
332 common/misc/reqpool.cpp \
333 common/misc/reqqueue.cpp \
334 common/misc/sanity-c.c \
335 common/misc/sanity-cpp.cpp \
336 common/misc/semspingpong.cpp \
337 common/misc/sg.cpp \
338 common/misc/circbuf.cpp \
339 common/misc/thread.cpp \
340 common/misc/term.cpp \
341 common/misc/uri.cpp \
342 common/net/netaddrstr.cpp \
343 common/path/rtPathRootSpecLen.cpp \
344 common/path/rtPathVolumeSpecLen.cpp \
345 common/path/RTPathAbsDup.cpp \
346 common/path/RTPathAbsEx.cpp \
347 common/path/RTPathAbsExDup.cpp \
348 common/path/RTPathAppend.cpp \
349 common/path/RTPathAppendEx.cpp \
350 common/path/RTPathChangeToDosSlashes.cpp \
351 common/path/RTPathChangeToUnixSlashes.cpp \
352 common/path/RTPathCopyComponents.cpp \
353 common/path/RTPathCountComponents.cpp \
354 common/path/RTPathExt.cpp \
355 common/path/RTPathFilename.cpp \
356 common/path/RTPathHasExt.cpp \
357 common/path/RTPathHasPath.cpp \
358 common/path/RTPathJoin.cpp \
359 common/path/RTPathJoinA.cpp \
360 common/path/RTPathJoinEx.cpp \
361 common/path/RTPathParse.cpp \
362 common/path/RTPathRealDup.cpp \
363 common/path/RTPathRmCmd.cpp \
364 common/path/RTPathStartsWithRoot.cpp \
365 common/path/RTPathStripExt.cpp \
366 common/path/RTPathStripFilename.cpp \
367 common/path/RTPathStripTrailingSlash.cpp \
368 common/path/RTPathTraverseList.cpp \
369 common/path/comparepaths.cpp \
370 common/rand/rand.cpp \
371 common/rand/randadv.cpp \
372 common/rand/randparkmiller.cpp \
373 common/sort/RTSortIsSorted.cpp \
374 common/sort/RTSortApvIsSorted.cpp \
375 common/sort/shellsort.cpp \
376 common/string/RTStrCat.cpp \
377 common/string/RTStrCatEx.cpp \
378 common/string/RTStrCatP.cpp \
379 common/string/RTStrCatPEx.cpp \
380 common/string/RTStrCmp.cpp \
381 common/string/RTStrCopy.cpp \
382 common/string/RTStrCopyEx.cpp \
383 common/string/RTStrCopyP.cpp \
384 common/string/RTStrCopyPEx.cpp \
385 common/string/RTStrNCmp.cpp \
386 common/string/RTStrNLen.cpp \
387 common/string/RTStrNLenEx.cpp \
388 common/string/RTStrPrintHexBytes.cpp \
389 common/string/RTStrStr.cpp \
390 common/string/base64.cpp \
391 common/string/simplepattern.cpp \
392 common/string/straprintf.cpp \
393 common/string/strformat.cpp \
394 common/string/strformatnum.cpp \
395 common/string/strformatrt.cpp \
396 common/string/strformattype.cpp \
397 common/string/strhash1.cpp \
398 common/string/stringalloc.cpp \
399 common/string/strprintf.cpp \
400 common/string/strspace.cpp \
401 common/string/strstrip.cpp \
402 common/string/strtonum.cpp \
403 common/string/strversion.cpp \
404 common/string/uni.cpp \
405 common/string/unidata.cpp \
406 common/string/utf-16.cpp \
407 common/string/utf-8.cpp \
408 common/string/utf-8-case.cpp \
409 common/string/ministring.cpp \
410 common/table/avlgcptr.cpp \
411 common/table/avlhcphys.cpp \
412 common/table/avlgcphys.cpp \
413 common/table/avllu32.cpp \
414 common/table/avlou32.cpp \
415 common/table/avlogcphys.cpp \
416 common/table/avlogcptr.cpp \
417 common/table/avlohcphys.cpp \
418 common/table/avloioport.cpp \
419 common/table/avlpv.cpp \
420 common/table/avlrgcptr.cpp \
421 common/table/avlrogcphys.cpp \
422 common/table/avlrogcptr.cpp \
423 common/table/avlroioport.cpp \
424 common/table/avlroogcptr.cpp \
425 common/table/avlrpv.cpp \
426 common/table/avlruintptr.cpp \
427 common/table/avlrfoff.cpp \
428 common/table/avlru64.cpp \
429 common/table/avlu32.cpp \
430 common/table/avluintptr.cpp \
431 common/table/avlul.cpp \
432 common/table/table.cpp \
433 common/time/time.cpp \
434 common/time/timeprog.cpp \
435 common/time/timesup.cpp \
436 common/vfs/vfsbase.cpp \
437 common/vfs/vfschain.cpp \
438 common/vfs/vfsiosmisc.cpp \
439 common/vfs/vfsmemory.cpp \
440 common/vfs/vfsmisc.cpp \
441 common/vfs/vfsstdfile.cpp \
442 common/zip/tar.cpp \
443 common/zip/tarcmd.cpp \
444 common/zip/tarvfs.cpp \
445 common/zip/gzipvfs.cpp \
446 common/zip/zip.cpp \
447 generic/createtemp-generic.cpp \
448 generic/critsect-generic.cpp \
449 generic/env-generic.cpp \
450 generic/RTDirCreateUniqueNumbered-generic.cpp \
451 generic/RTEnvDupEx-generic.cpp \
452 generic/RTFileCopy-generic.cpp \
453 generic/RTFileQuerySize-generic.cpp \
454 generic/RTFileReadAll-generic.cpp \
455 generic/RTFileReadAllEx-generic.cpp \
456 generic/RTFileReadAllByHandle-generic.cpp \
457 generic/RTFileReadAllByHandleEx-generic.cpp \
458 generic/RTFileReadAllFree-generic.cpp \
459 generic/RTLogWriteStdErr-generic.cpp \
460 generic/RTLogWriteStdOut-generic.cpp \
461 generic/RTLogWriteUser-generic.cpp \
462 generic/RTProcessQueryUsernameA-generic.cpp \
463 generic/RTTimerLRCreate-generic.cpp \
464 generic/mempool-generic.cpp \
465 generic/semfastmutex-generic.cpp \
466 generic/semxroads-generic.cpp \
467 generic/spinlock-generic.cpp \
468 generic/strcache-stubs-generic.cpp \
469 generic/timerlr-generic.cpp \
470 r3/alloc-ef.cpp \
471 r3/alloc.cpp \
472 r3/dir.cpp \
473 r3/dir2.cpp \
474 r3/fileio.cpp \
475 r3/fs.cpp \
476 r3/init.cpp \
477 r3/isofs.cpp \
478 r3/path.cpp \
479 r3/process.cpp \
480 r3/socket.cpp \
481 r3/stream.cpp \
482 r3/test.cpp \
483 r3/testi.cpp \
484 r3/tcp.cpp \
485 r3/udp.cpp \
486 r3/generic/semspinmutex-r3-generic.cpp
487
488#if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
489# RuntimeR3_SOURCES += common/time/timesupA.asm
490#else
491 RuntimeR3_SOURCES += common/time/timesupref.cpp
492#endif
493
494RuntimeR3_SOURCES.x86 += \
495 generic/RTMpGetDescription-generic.cpp
496RuntimeR3_SOURCES.amd64 += \
497 generic/RTMpGetDescription-generic.cpp
498RuntimeR3_SOURCES.sparc32 += \
499 generic/RTMpGetDescription-generic-stub.cpp \
500 common/asm/asm-fake.cpp
501RuntimeR3_SOURCES.sparc64 += \
502 generic/RTMpGetDescription-generic-stub.cpp \
503 common/asm/asm-fake.cpp
504
505ifdef IPRT_WITH_LZJB
506 RuntimeR3_SOURCES += common/misc/lzjb.c
507endif
508
509# Some versions of GCC might require this.
510RuntimeR3_SOURCES.x86 += \
511 common/asm/ASMAtomicXchgU64.asm \
512 common/asm/ASMAtomicCmpXchgU64.asm \
513 common/asm/ASMAtomicCmpXchgExU64.asm \
514 common/asm/ASMAtomicReadU64.asm \
515 common/asm/ASMAtomicUoReadU64.asm
516
517ifdef IPRT_WITH_KSTUFF
518 RuntimeR3_SOURCES += \
519 common/ldr/ldrkStuff.cpp
520endif
521
522# VBox specific stuff.
523RuntimeR3_SOURCES += \
524 VBox/RTAssertShouldPanic-vbox.cpp \
525 VBox/log-vbox.cpp
526ifneq ($(KBUILD_TARGET),win)
527RuntimeR3_SOURCES += \
528 common/err/errmsgxpcom.cpp
529endif
530if1of ($(KBUILD_TARGET),freebsd linux netbsd openbsd solaris)
531RuntimeR3_SOURCES += \
532 $(if $(VBOX_WITH_DBUS),VBox/dbus.cpp,)
533endif
534
535RuntimeR3_SOURCES.win = \
536 generic/cdrom-generic.cpp \
537 generic/RTDirExists-generic.cpp \
538 generic/RTDirQueryInfo-generic.cpp \
539 generic/RTDirSetTimes-generic.cpp \
540 generic/RTFileExists-generic.cpp \
541 generic/RTMpGetCurFrequency-generic.cpp \
542 generic/RTMpGetMaxFrequency-generic.cpp \
543 generic/RTRandAdvCreateSystemFaster-generic.cpp \
544 generic/RTRandAdvCreateSystemTruer-generic.cpp \
545 generic/RTSemEventWait-generic.cpp \
546 generic/RTSemEventMultiWait-2-ex-generic.cpp \
547 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
548 generic/RTSemMutexRequest-generic.cpp \
549 generic/RTSemMutexRequestDebug-generic.cpp \
550 generic/RTThreadSetAffinityToCpu-generic.cpp \
551 generic/mppresent-generic.cpp \
552 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
553 generic/uuid-generic.cpp \
554 generic/RTProcDaemonize-generic.cpp \
555 generic/RTProcIsRunningByName-generic.cpp \
556 generic/RTThreadGetNativeState-generic.cpp \
557 nt/RTErrConvertFromNtStatus.cpp \
558 r3/posix/env-posix.cpp \
559 r3/win/RTHandleGetStandard-win.cpp \
560 r3/win/RTSystemQueryOSInfo-win.cpp \
561 r3/win/RTSystemShutdown-win.cpp \
562 r3/win/RTSystemQueryDmiString-win.cpp \
563 r3/win/RTSystemQueryTotalRam-win.cpp \
564 r3/win/alloc-win.cpp \
565 r3/win/dir-win.cpp \
566 r3/win/errvars-win.cpp \
567 r3/win/fileio-win.cpp \
568 r3/win/fs-win.cpp \
569 r3/win/ldrNative-win.cpp \
570 r3/win/localipc-win.cpp \
571 r3/win/mp-win.cpp \
572 r3/win/path-win.cpp \
573 r3/win/pipe-win.cpp \
574 r3/win/poll-win.cpp \
575 r3/win/process-win.cpp \
576 r3/win/RTLogWriteDebugger-win.cpp \
577 r3/win/rtProcInitExePath-win.cpp \
578 r3/win/sched-win.cpp \
579 r3/win/semevent-win.cpp \
580 r3/win/semeventmulti-win.cpp \
581 r3/win/semmutex-win.cpp \
582 r3/win/symlink-win.cpp \
583 r3/win/rtFileNativeSetAttributes-win.cpp \
584 r3/win/thread-win.cpp \
585 r3/win/thread2-win.cpp \
586 r3/win/time-win.cpp \
587 r3/win/timer-win.cpp \
588 r3/win/tls-win.cpp \
589 r3/win/utf16locale-win.cpp \
590 r3/win/utf8-win.cpp \
591 r3/win/RTUuidCreate-win.cpp \
592 win/errmsgwin.cpp \
593 win/RTErrConvertFromWin32.cpp
594
595RuntimeR3_SOURCES.win.amd64 := $(RuntimeWin64ASM_SOURCES)
596RuntimeR3_SOURCES.win.x86 := $(RuntimeWin32ASM_SOURCES)
597
598RuntimeR3_SOURCES.linux = \
599 generic/cdrom-generic.cpp \
600 generic/RTDirQueryInfo-generic.cpp \
601 generic/RTDirSetTimes-generic.cpp \
602 generic/RTFileMove-generic.cpp \
603 generic/RTLogWriteDebugger-generic.cpp \
604 generic/RTProcDaemonize-generic.cpp \
605 generic/RTSemEventMultiWait-2-ex-generic.cpp \
606 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
607 generic/RTTimeLocalNow-generic.cpp \
608 generic/RTTimerCreate-generic.cpp \
609 generic/RTThreadSetAffinityToCpu-generic.cpp \
610 generic/RTUuidCreate-generic.cpp \
611 generic/mppresent-generic.cpp \
612 generic/utf16locale-generic.cpp \
613 generic/uuid-generic.cpp \
614 r3/linux/RTThreadGetNativeState-linux.cpp \
615 r3/linux/mp-linux.cpp \
616 r3/linux/rtProcInitExePath-linux.cpp \
617 r3/linux/sched-linux.cpp \
618 r3/linux/sysfs.cpp \
619 r3/linux/time-linux.cpp \
620 r3/linux/thread-affinity-linux.cpp \
621 r3/linux/RTProcIsRunningByName-linux.cpp \
622 r3/linux/RTSystemQueryDmiString-linux.cpp \
623 r3/linux/RTSystemShutdown-linux.cpp \
624 r3/posix/RTFileQueryFsSizes-posix.cpp \
625 r3/posix/RTHandleGetStandard-posix.cpp \
626 r3/posix/RTMemProtect-posix.cpp \
627 r3/posix/RTPathUserHome-posix.cpp \
628 r3/posix/RTSystemQueryOSInfo-posix.cpp \
629 r3/linux/systemmem-linux.cpp \
630 r3/posix/RTTimeNow-posix.cpp \
631 r3/posix/RTTimeSet-posix.cpp \
632 r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
633 r3/posix/dir-posix.cpp \
634 r3/posix/env-posix.cpp \
635 r3/posix/errvars-posix.cpp \
636 r3/posix/fileio-posix.cpp \
637 r3/posix/fileio2-posix.cpp \
638 r3/posix/filelock-posix.cpp \
639 r3/posix/fs-posix.cpp \
640 r3/posix/fs2-posix.cpp \
641 r3/posix/fs3-posix.cpp \
642 r3/posix/ldrNative-posix.cpp \
643 r3/posix/path-posix.cpp \
644 r3/posix/path2-posix.cpp \
645 r3/posix/pathhost-posix.cpp \
646 r3/posix/RTPathUserDocuments-posix.cpp \
647 r3/posix/pipe-posix.cpp \
648 r3/posix/poll-posix.cpp \
649 r3/posix/process-posix.cpp \
650 r3/posix/process-creation-posix.cpp \
651 r3/posix/rand-posix.cpp \
652 r3/posix/semrw-posix.cpp \
653 r3/posix/symlink-posix.cpp \
654 r3/posix/thread-posix.cpp \
655 r3/posix/thread2-posix.cpp \
656 r3/posix/timelocal-posix.cpp \
657 r3/posix/timer-posix.cpp \
658 r3/posix/tls-posix.cpp \
659 r3/posix/utf8-posix.cpp
660ifdef IPRT_WITH_FUTEX_BASED_SEMS
661 RuntimeR3_SOURCES.linux += \
662 r3/linux/semevent-linux.cpp \
663 r3/linux/semeventmulti-linux.cpp \
664 r3/linux/semmutex-linux.cpp
665else
666 RuntimeR3_SOURCES.linux.x86 += \
667 r3/posix/semevent-posix.cpp \
668 r3/posix/semeventmulti-posix.cpp \
669 r3/posix/semmutex-posix.cpp
670 RuntimeR3_SOURCES.linux.amd64 += \
671 r3/linux/semevent-linux.cpp \
672 r3/linux/semeventmulti-linux.cpp
673 ifdef RT_NEW_LINUX_MUTEX_CODE
674 RuntimeR3_SOURCES.linux.amd64 += \
675 r3/linux/semmutex-linux.cpp
676 else
677 RuntimeR3_SOURCES.linux.amd64 += \
678 r3/posix/semmutex-posix.cpp
679 endif
680endif
681
682RuntimeR3_SOURCES.os2 = \
683 generic/cdrom-generic.cpp \
684 generic/RTDirQueryInfo-generic.cpp \
685 generic/RTDirSetTimes-generic.cpp \
686 generic/RTFileMove-generic.cpp \
687 generic/RTLogWriteDebugger-generic.cpp \
688 generic/RTProcDaemonize-generic.cpp \
689 generic/RTRandAdvCreateSystemFaster-generic.cpp \
690 generic/RTRandAdvCreateSystemTruer-generic.cpp \
691 generic/RTSystemQueryDmiString-generic.cpp \
692 generic/RTSystemShutdown-generic.cpp \
693 generic/RTTimeLocalNow-generic.cpp \
694 generic/RTTimerCreate-generic.cpp \
695 generic/RTThreadSetAffinityToCpu-generic.cpp \
696 generic/RTUuidCreate-generic.cpp \
697 generic/mppresent-generic.cpp \
698 generic/RTSemEventWait-generic.cpp \
699 generic/RTSemEventMultiWait-generic.cpp \
700 generic/RTSemMutexRequest-generic.cpp \
701 generic/RTSemMutexRequestDebug-generic.cpp \
702 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
703 generic/timer-generic.cpp \
704 generic/utf16locale-generic.cpp \
705 generic/uuid-generic.cpp \
706 generic/RTMpGetCurFrequency-generic.cpp \
707 generic/RTMpGetMaxFrequency-generic.cpp \
708 generic/RTProcIsRunningByName-generic.cpp \
709 generic/RTThreadGetNativeState-generic.cpp \
710 os2/RTErrConvertFromOS2.cpp \
711 r3/os2/filelock-os2.cpp \
712 r3/os2/mp-os2.cpp \
713 r3/os2/pipe-os2.cpp \
714 r3/os2/poll-os2.cpp \
715 r3/os2/rtProcInitExePath-os2.cpp \
716 r3/os2/sched-os2.cpp \
717 r3/os2/sems-os2.cpp \
718 r3/os2/systemmem-os2.cpp \
719 r3/os2/thread-os2.cpp \
720 r3/os2/time-os2.cpp \
721 r3/posix/RTFileQueryFsSizes-posix.cpp \
722 r3/posix/RTHandleGetStandard-posix.cpp \
723 r3/posix/RTMemProtect-posix.cpp \
724 r3/posix/RTPathUserHome-posix.cpp \
725 r3/posix/RTSystemQueryOSInfo-posix.cpp \
726 r3/posix/RTTimeNow-posix.cpp \
727 r3/posix/RTTimeSet-posix.cpp \
728 r3/posix/dir-posix.cpp \
729 r3/posix/env-posix.cpp \
730 r3/posix/errvars-posix.cpp \
731 r3/posix/fileio-posix.cpp \
732 r3/posix/fileio2-posix.cpp \
733 r3/posix/fs-posix.cpp \
734 r3/posix/fs2-posix.cpp \
735 r3/posix/fs3-posix.cpp \
736 r3/posix/ldrNative-posix.cpp \
737 r3/posix/path-posix.cpp \
738 r3/posix/path2-posix.cpp \
739 r3/posix/pathhost-posix.cpp \
740 r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
741 r3/posix/RTPathUserDocuments-posix.cpp \
742 r3/posix/process-posix.cpp \
743 r3/posix/process-creation-posix.cpp \
744 r3/posix/symlink-posix.cpp \
745 r3/posix/timelocal-posix.cpp \
746 r3/posix/utf8-posix.cpp
747
748RuntimeR3_SOURCES.darwin = \
749 darwin/RTErrConvertFromDarwin.cpp \
750 darwin/RTErrConvertFromDarwinCOM.cpp \
751 darwin/RTErrConvertFromDarwinIO.cpp \
752 darwin/RTErrConvertFromDarwinKern.cpp \
753 generic/cdrom-generic.cpp \
754 generic/RTDirQueryInfo-generic.cpp \
755 generic/RTDirSetTimes-generic.cpp \
756 generic/RTFileMove-generic.cpp \
757 generic/RTLogWriteDebugger-generic.cpp \
758 generic/RTProcDaemonize-generic.cpp \
759 generic/RTThreadGetAffinity-stub-generic.cpp \
760 generic/RTThreadSetAffinity-stub-generic.cpp \
761 generic/RTThreadSetAffinityToCpu-generic.cpp \
762 generic/RTTimeLocalNow-generic.cpp \
763 generic/RTTimerCreate-generic.cpp \
764 generic/RTUuidCreate-generic.cpp \
765 generic/mppresent-generic.cpp \
766 generic/RTSemEventMultiWait-2-ex-generic.cpp \
767 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
768 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
769 generic/RTSystemShutdown-generic.cpp \
770 generic/timer-generic.cpp \
771 generic/utf16locale-generic.cpp \
772 generic/uuid-generic.cpp\
773 generic/RTProcIsRunningByName-generic.cpp \
774 generic/RTThreadGetNativeState-generic.cpp \
775 r3/darwin/filelock-darwin.cpp \
776 r3/darwin/mp-darwin.cpp \
777 r3/darwin/pathhost-darwin.cpp \
778 r3/darwin/rtProcInitExePath-darwin.cpp \
779 r3/darwin/RTSystemQueryDmiString-darwin.cpp \
780 r3/darwin/sched-darwin.cpp \
781 r3/darwin/systemmem-darwin.cpp \
782 r3/darwin/time-darwin.cpp \
783 r3/darwin/RTPathUserDocuments-darwin.cpp \
784 r3/posix/RTFileQueryFsSizes-posix.cpp \
785 r3/posix/RTHandleGetStandard-posix.cpp \
786 r3/posix/RTMemProtect-posix.cpp \
787 r3/posix/RTPathUserHome-posix.cpp \
788 r3/posix/RTSystemQueryOSInfo-posix.cpp \
789 r3/posix/RTTimeSet-posix.cpp \
790 r3/posix/dir-posix.cpp \
791 r3/posix/env-posix.cpp \
792 r3/posix/errvars-posix.cpp \
793 r3/posix/fileio-posix.cpp \
794 r3/posix/fileio2-posix.cpp \
795 r3/posix/fs-posix.cpp \
796 r3/posix/fs2-posix.cpp \
797 r3/posix/fs3-posix.cpp \
798 r3/posix/ldrNative-posix.cpp \
799 r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
800 r3/posix/path-posix.cpp \
801 r3/posix/path2-posix.cpp \
802 r3/posix/pipe-posix.cpp \
803 r3/posix/poll-posix.cpp \
804 r3/posix/process-posix.cpp \
805 r3/posix/process-creation-posix.cpp \
806 r3/posix/rand-posix.cpp \
807 r3/posix/semevent-posix.cpp \
808 r3/posix/semeventmulti-posix.cpp \
809 r3/posix/semmutex-posix.cpp \
810 r3/posix/symlink-posix.cpp \
811 r3/posix/thread-posix.cpp \
812 r3/posix/thread2-posix.cpp \
813 r3/posix/timelocal-posix.cpp \
814 r3/posix/tls-posix.cpp \
815 r3/posix/utf8-posix.cpp
816
817## @todo Make BSD sched, implement RTMP*.
818RuntimeR3_SOURCES.freebsd = \
819 generic/cdrom-generic.cpp \
820 generic/RTDirQueryInfo-generic.cpp \
821 generic/RTDirSetTimes-generic.cpp \
822 generic/RTFileMove-generic.cpp \
823 generic/RTLogWriteDebugger-generic.cpp \
824 generic/RTSemEventMultiWait-2-ex-generic.cpp \
825 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
826 generic/RTSystemQueryDmiString-generic.cpp \
827 generic/RTSystemShutdown-generic.cpp \
828 generic/RTThreadGetAffinity-stub-generic.cpp \
829 generic/RTThreadSetAffinity-stub-generic.cpp \
830 generic/RTThreadSetAffinityToCpu-generic.cpp \
831 generic/RTTimeLocalNow-generic.cpp \
832 generic/RTTimerCreate-generic.cpp \
833 generic/RTUuidCreate-generic.cpp \
834 generic/mppresent-generic.cpp \
835 generic/sched-generic.cpp \
836 generic/utf16locale-generic.cpp \
837 generic/uuid-generic.cpp \
838 generic/RTMpCpuId-generic.cpp \
839 generic/RTProcDaemonize-generic.cpp \
840 generic/RTProcIsRunningByName-generic.cpp \
841 generic/RTThreadGetNativeState-generic.cpp \
842 r3/freebsd/mp-freebsd.cpp \
843 r3/freebsd/rtProcInitExePath-freebsd.cpp \
844 r3/posix/RTFileQueryFsSizes-posix.cpp \
845 r3/posix/RTHandleGetStandard-posix.cpp \
846 r3/posix/RTMemProtect-posix.cpp \
847 r3/posix/RTPathUserHome-posix.cpp \
848 r3/posix/RTSystemQueryOSInfo-posix.cpp \
849 r3/posix/RTSystemQueryTotalRam-posix.cpp \
850 r3/posix/RTTimeNow-posix.cpp \
851 r3/posix/RTTimeSet-posix.cpp \
852 r3/posix/dir-posix.cpp \
853 r3/posix/env-posix.cpp \
854 r3/posix/errvars-posix.cpp \
855 r3/posix/fileio-posix.cpp \
856 r3/posix/fileio2-posix.cpp \
857 r3/posix/filelock-posix.cpp \
858 r3/posix/fs-posix.cpp \
859 r3/posix/fs2-posix.cpp \
860 r3/posix/fs3-posix.cpp \
861 r3/posix/ldrNative-posix.cpp \
862 r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
863 r3/posix/path-posix.cpp \
864 r3/posix/path2-posix.cpp \
865 r3/posix/pathhost-posix.cpp \
866 r3/posix/RTPathUserDocuments-posix.cpp \
867 r3/posix/pipe-posix.cpp \
868 r3/posix/poll-posix.cpp \
869 r3/posix/process-posix.cpp \
870 r3/posix/process-creation-posix.cpp \
871 r3/posix/rand-posix.cpp \
872 r3/posix/semevent-posix.cpp \
873 r3/posix/semeventmulti-posix.cpp \
874 r3/posix/semmutex-posix.cpp \
875 r3/posix/semrw-posix.cpp \
876 r3/posix/symlink-posix.cpp \
877 r3/posix/thread-posix.cpp \
878 r3/posix/thread2-posix.cpp \
879 r3/posix/time-posix.cpp \
880 r3/posix/timelocal-posix.cpp \
881 r3/posix/timer-posix.cpp \
882 r3/posix/tls-posix.cpp \
883 r3/posix/utf8-posix.cpp
884
885RuntimeR3_SOURCES.solaris = \
886 generic/cdrom-generic.cpp \
887 generic/RTDirQueryInfo-generic.cpp \
888 generic/RTDirSetTimes-generic.cpp \
889 generic/RTFileMove-generic.cpp \
890 generic/RTLogWriteDebugger-generic.cpp \
891 generic/RTProcDaemonize-generic.cpp \
892 generic/RTProcIsRunningByName-generic.cpp \
893 generic/RTSemEventMultiWait-2-ex-generic.cpp \
894 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
895 generic/RTSystemShutdown-generic.cpp \
896 generic/RTThreadSetAffinityToCpu-generic.cpp \
897 generic/RTTimeLocalNow-generic.cpp \
898 generic/RTTimerCreate-generic.cpp \
899 generic/RTUuidCreate-generic.cpp \
900 generic/sched-generic.cpp \
901 generic/utf16locale-generic.cpp \
902 generic/uuid-generic.cpp \
903 generic/RTThreadGetNativeState-generic.cpp \
904 r3/posix/RTFileQueryFsSizes-posix.cpp \
905 r3/posix/RTHandleGetStandard-posix.cpp \
906 r3/posix/RTMemProtect-posix.cpp \
907 r3/posix/RTPathUserHome-posix.cpp \
908 r3/posix/RTSystemQueryOSInfo-posix.cpp \
909 r3/posix/RTTimeNow-posix.cpp \
910 r3/posix/RTTimeSet-posix.cpp \
911 r3/posix/dir-posix.cpp \
912 r3/posix/env-posix.cpp \
913 r3/posix/errvars-posix.cpp \
914 r3/posix/fileio-posix.cpp \
915 r3/posix/fileio2-posix.cpp \
916 r3/posix/filelock-posix.cpp \
917 r3/posix/fs-posix.cpp \
918 r3/posix/fs2-posix.cpp \
919 r3/posix/fs3-posix.cpp \
920 r3/posix/ldrNative-posix.cpp \
921 r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
922 r3/posix/path-posix.cpp \
923 r3/posix/path2-posix.cpp \
924 r3/posix/pathhost-posix.cpp \
925 r3/posix/RTPathUserDocuments-posix.cpp \
926 r3/posix/pipe-posix.cpp \
927 r3/posix/poll-posix.cpp \
928 r3/posix/process-posix.cpp \
929 r3/posix/process-creation-posix.cpp \
930 r3/posix/rand-posix.cpp \
931 r3/posix/semevent-posix.cpp \
932 r3/posix/semeventmulti-posix.cpp \
933 r3/posix/semmutex-posix.cpp \
934 r3/posix/semrw-posix.cpp \
935 r3/posix/symlink-posix.cpp \
936 r3/posix/thread-posix.cpp \
937 r3/posix/thread2-posix.cpp \
938 r3/posix/time-posix.cpp \
939 r3/posix/timelocal-posix.cpp \
940 r3/posix/timer-posix.cpp \
941 r3/posix/tls-posix.cpp \
942 r3/posix/utf8-posix.cpp \
943 r3/solaris/systemmem-solaris.cpp \
944 r3/solaris/mp-solaris.cpp \
945 r3/solaris/rtProcInitExePath-solaris.cpp \
946 r3/solaris/thread-affinity-solaris.cpp
947RuntimeR3_SOURCES.solaris.amd64 = \
948 r3/solaris/coredumper-solaris.cpp \
949 r3/solaris/RTSystemQueryDmiString-solaris.cpp
950RuntimeR3_SOURCES.solaris.x86 = \
951 r3/solaris/coredumper-solaris.cpp \
952 r3/solaris/RTSystemQueryDmiString-solaris.cpp
953RuntimeR3_SOURCES.solaris.sparc32 = \
954 generic/RTSystemQueryDmiString-generic.cpp
955RuntimeR3_SOURCES.solaris.sparc64 = \
956 generic/RTSystemQueryDmiString-generic.cpp
957
958RuntimeR3_SOURCES.haiku = \
959 generic/RTDirQueryInfo-generic.cpp \
960 generic/RTDirSetTimes-generic.cpp \
961 generic/RTFileMove-generic.cpp \
962 generic/RTLogWriteDebugger-generic.cpp \
963 generic/RTProcDaemonize-generic.cpp \
964 generic/RTTimeLocalNow-generic.cpp \
965 generic/RTTimerCreate-generic.cpp \
966 generic/RTUuidCreate-generic.cpp \
967 generic/mppresent-generic.cpp \
968 generic/RTSemEventMultiWait-2-ex-generic.cpp \
969 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
970 generic/sched-generic.cpp \
971 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),ockless-,)generic.cpp \
972 generic/timer-generic.cpp \
973 generic/utf16locale-generic.cpp \
974 generic/uuid-generic.cpp\
975 generic/RTProcIsRunningByName-generic.cpp \
976 generic/RTThreadGetNativeState-generic.cpp \
977 r3/haiku/rtProcInitExePath-haiku.cpp \
978 r3/haiku/time-haiku.cpp \
979 r3/posix/RTFileQueryFsSizes-posix.cpp \
980 r3/posix/RTHandleGetStandard-posix.cpp \
981 r3/posix/RTMemProtect-posix.cpp \
982 r3/posix/RTPathUserHome-posix.cpp \
983 r3/posix/RTSystemQueryOSInfo-posix.cpp \
984 r3/posix/RTSystemQueryTotalRam-posix.cpp \
985 r3/posix/RTTimeNow-posix.cpp \
986 r3/posix/dir-posix.cpp \
987 r3/posix/env-posix.cpp \
988 r3/posix/errvars-posix.cpp \
989 r3/posix/fileio-posix.cpp \
990 r3/posix/fileio2-posix.cpp \
991 r3/posix/filelock-posix.cpp \
992 r3/posix/fs-posix.cpp \
993 r3/posix/fs2-posix.cpp \
994 r3/posix/fs3-posix.cpp \
995 r3/posix/ldrNative-posix.cpp \
996 r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
997 r3/posix/path-posix.cpp \
998 r3/posix/path2-posix.cpp \
999 r3/posix/pathhost-posix.cpp \
1000 r3/posix/pipe-posix.cpp \
1001 r3/posix/poll-posix.cpp \
1002 r3/posix/process-posix.cpp \
1003 r3/posix/process-creation-posix.cpp \
1004 r3/posix/rand-posix.cpp \
1005 r3/posix/semevent-posix.cpp \
1006 r3/posix/semeventmulti-posix.cpp \
1007 r3/posix/semmutex-posix.cpp \
1008 r3/posix/symlink-posix.cpp \
1009 r3/posix/thread-posix.cpp \
1010 r3/posix/thread2-posix.cpp \
1011 r3/posix/timelocal-posix.cpp \
1012 r3/posix/tls-posix.cpp \
1013 r3/posix/utf8-posix.cpp
1014
1015## PORTME: Porters add their selection of platform specific files for Ring-3 here.
1016
1017
1018#
1019# L4 RuntimeR3 subtarget since L4 headers won't work with VBOXR3.
1020#
1021RuntimeR3L4_TEMPLATE = VBOXR3NP
1022RuntimeR3L4_DEFS = IN_RT_R3 IN_SUP_R3 LDR_WITH_NATIVE LDR_WITH_ELF LDR_WITH_PE
1023ifneq ($(KBUILD_TARGET_ARCH),amd64)
1024RuntimeR3L4_DEFS += __PIC__
1025endif
1026RuntimeR3L4_INCS = \
1027 include \
1028 $(L4_INCDIR)
1029
1030RuntimeR3L4_SOURCES = \
1031 generic/cdrom-generic.cpp \
1032 generic/errvars-generic.cpp \
1033 generic/fs-stubs-generic.cpp \
1034 generic/pathhost-generic.cpp \
1035 generic/RTDirQueryInfo-generic.cpp \
1036 generic/RTDirSetTimes-generic.cpp \
1037 generic/RTFileMove-generic.cpp \
1038 generic/RTLogWriteDebugger-generic.cpp \
1039 generic/RTProcDaemonize-generic.cpp \
1040 generic/RTSystemQueryOSInfo-generic.cpp \
1041 generic/RTSystemQueryDmiString-generic.cpp \
1042 generic/RTSystemShutdown-generic.cpp \
1043 generic/RTThreadGetAffinity-stub-generic.cpp \
1044 generic/RTThreadSetAffinity-stub-generic.cpp \
1045 generic/RTThreadSetAffinityToCpu-generic.cpp \
1046 generic/RTTimeLocalNow-generic.cpp \
1047 generic/RTUuidCreate-generic.cpp \
1048 generic/mppresent-generic.cpp \
1049 generic/sched-generic.cpp \
1050 generic/RTSemEventWait-generic.cpp \
1051 generic/RTSemEventMultiWait-generic.cpp \
1052 generic/RTSemMutexRequest-generic.cpp \
1053 generic/RTSemMutexRequestDebug-generic.cpp \
1054 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
1055 generic/utf16locale-generic.cpp \
1056 generic/uuid-generic.cpp \
1057 generic/RTProcIsRunningByName-generic.cpp \
1058 generic/RTThreadGetNativeState-generic.cpp \
1059 l4/l4-errno.cpp \
1060 l4/rtProcInitExePath-l4.cpp \
1061 l4/process-l4env.cpp \
1062 l4/sems-l4env.cpp \
1063 l4/thread-l4env.cpp \
1064 l4/timer-l4env.cpp \
1065 l4/utf8-l4env.cpp \
1066 r3/posix/RTFileQueryFsSizes-posix.cpp \
1067 r3/posix/RTMemProtect-posix.cpp \
1068 r3/posix/rtmempage-exec-mmap-heap-posix.cpp \
1069 r3/posix/RTPathUserHome-posix.cpp \
1070 r3/posix/RTTimeNow-posix.cpp \
1071 r3/posix/RTTimeSet-posix.cpp \
1072 r3/posix/dir-posix.cpp \
1073 r3/posix/env-posix.cpp \
1074 r3/posix/fileio-posix.cpp \
1075 r3/posix/fileio2-posix.cpp \
1076 r3/posix/filelock-posix.cpp \
1077 r3/posix/ldrNative-posix.cpp \
1078 r3/posix/path-posix.cpp \
1079 r3/posix/path2-posix.cpp \
1080 r3/posix/RTPathUserDocuments-posix.cpp \
1081 r3/posix/rand-posix.cpp \
1082 r3/posix/time-posix.cpp \
1083 r3/posix/timelocal-posix.cpp
1084
1085
1086#
1087# RuntimeBldProg - Static Runtime for build programs.
1088#
1089# Note! This is a bit of hacky since kBuild doesn't support building libraries
1090# for build programs.
1091#
1092RuntimeBldProg_TEMPLATE := VBoxAdvBldProg
1093RuntimeBldProg_EXTENDS := RuntimeR3
1094RuntimeBldProg_BLD_TRG := $(KBUILD_HOST)
1095RuntimeBldProg_BLD_TRG_ARCH := $(KBUILD_HOST_ARCH)
1096RuntimeBldProg_BLD_TRG_CPU := $(KBUILD_HOST_CPU)
1097
1098
1099#
1100# RuntimeGuestR3 - Guest Additions Runtime (static/exe).
1101# (The KBUILD_HOST inheritance here is for l4 cross building the linux
1102# additions, while .x86 is for cross building x86 while targeting amd64.)
1103#
1104RuntimeGuestR3_TEMPLATE := VBoxGuestR3Lib
1105## @todo change this to EXTEND the RuntimeR3 target.
1106RuntimeGuestR3_SDKS.win := $(RuntimeR3_SDKS.win)
1107RuntimeGuestR3_DEFS := $(filter-out RTCRITSECT_STRICT RT_NO_GIP, $(RuntimeR3_DEFS))
1108RuntimeGuestR3_DEFS.$(KBUILD_TARGET) := $(RuntimeR3_DEFS.$(KBUILD_TARGET))
1109RuntimeGuestR3_DEFS.$(KBUILD_HOST) := $(RuntimeR3_DEFS.$(KBUILD_HOST))
1110RuntimeGuestR3_INCS := $(RuntimeR3_INCS)
1111RuntimeGuestR3_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
1112RuntimeGuestR3_INCS.$(KBUILD_HOST) := $(RuntimeR3_INCS.$(KBUILD_HOST))
1113RuntimeGuestR3_SOURCES := $(filter-out \
1114 common/time/timesupref.cpp \
1115 common/time/timesupA.asm \
1116 common/time/timesup.cpp \
1117 common/checksum/RTSha1Digest.cpp \
1118 common/checksum/sha% \
1119 generic/RTLogWriteUser-generic.cpp \
1120 , $(RuntimeR3_SOURCES))
1121RuntimeGuestR3_SOURCES += \
1122 common/time/timesysalias.cpp \
1123 VBox/logbackdoor.cpp
1124RuntimeGuestR3_SOURCES.$(KBUILD_TARGET) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET))
1125RuntimeGuestR3_SOURCES.$(KBUILD_HOST) := $(RuntimeR3_SOURCES.$(KBUILD_HOST))
1126RuntimeGuestR3_SOURCES.$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET_ARCH))
1127RuntimeGuestR3_SOURCES.x86 := $(RuntimeR3_SOURCES.x86)
1128RuntimeGuestR3_SOURCES.amd64 := $(RuntimeR3_SOURCES.amd64)
1129RuntimeGuestR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
1130RuntimeGuestR3_SOURCES.$(KBUILD_TARGET).x86 := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).x86)
1131RuntimeGuestR3_SOURCES.$(KBUILD_TARGET).amd64:= $(RuntimeR3_SOURCES.$(KBUILD_TARGET).amd64)
1132RuntimeGuestR3_SOURCES.$(KBUILD_HOST).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_HOST).$(KBUILD_TARGET_ARCH))
1133RuntimeGuestR3_SOURCES.win.x86 += \
1134 r3/win/vcc100-kernel32-fakes.cpp \
1135 r3/win/vcc100-kernel32-fakesA.asm
1136
1137#
1138# RuntimeGuestR3-x86 - Same as RuntimeGuestR3, except that it's targeting x86.
1139#
1140RuntimeGuestR3-x86_EXTENDS := RuntimeGuestR3
1141RuntimeGuestR3-x86_BLD_TRG_ARCH := x86
1142
1143
1144#
1145# RuntimeGuestR3Shared - Guest Additions Runtime (static/dll).
1146#
1147RuntimeGuestR3Shared_TEMPLATE := VBoxGuestR3Dll
1148RuntimeGuestR3Shared_EXTENDS := RuntimeGuestR3
1149RuntimeGuestR3Shared_INST = $(INST_ADDITIONS_LIB)
1150
1151
1152#
1153# RuntimeGuestR3Shared-x86 - Same as RuntimeGuestR3Shared, except that it's targeting x86.
1154#
1155RuntimeGuestR3Shared-x86_EXTENDS := RuntimeGuestR3Shared
1156RuntimeGuestR3Shared-x86_BLD_TRG_ARCH := x86
1157
1158
1159#
1160# RuntimeGuestR3Mini - Minimal Guest Additions Runtime which does not require
1161# initialization and can be linked into an .so. Intended
1162# for X11 drivers, GRADD and similar.
1163#
1164RuntimeGuestR3Mini_TEMPLATE := VBoxGuestR3Dll
1165## @todo change this to EXTEND the RuntimeGuestR3 target.
1166RuntimeGuestR3Mini_INST := $(INST_ADDITIONS_LIB)
1167RuntimeGuestR3Mini_SDKS.win := $(RuntimeR3_SDKS.win)
1168RuntimeGuestR3Mini_DEFS := \
1169 $(filter-out RTCRITSECT_STRICT RT_NO_GIP RT_WITH_ICONV_CACHE, $(RuntimeR3_DEFS)) \
1170 RT_MINI IN_RT_STATIC RTMEM_NO_WRAP_TO_EF_APIS
1171RuntimeGuestR3Mini_DEFS.$(KBUILD_TARGET) := $(RuntimeR3_DEFS.$(KBUILD_TARGET))
1172RuntimeGuestR3Mini_DEFS.$(KBUILD_HOST) := $(RuntimeR3_DEFS.$(KBUILD_HOST))
1173RuntimeGuestR3Mini_INCS := $(RuntimeR3_INCS)
1174RuntimeGuestR3Mini_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
1175RuntimeGuestR3Mini_INCS.$(KBUILD_HOST) := $(RuntimeR3_INCS.$(KBUILD_HOST))
1176RuntimeGuestR3Mini_SOURCES = \
1177 common/alloc/alloc.cpp \
1178 common/err/errmsg.cpp \
1179 common/err/RTErrConvertFromErrno.cpp \
1180 common/log/logformat.cpp \
1181 common/misc/RTAssertMsg1Weak.cpp \
1182 common/misc/RTAssertMsg2.cpp \
1183 common/misc/RTAssertMsg2Add.cpp \
1184 common/misc/RTAssertMsg2AddWeak.cpp \
1185 common/misc/RTAssertMsg2AddWeakV.cpp \
1186 common/misc/RTAssertMsg2Weak.cpp \
1187 common/misc/RTAssertMsg2WeakV.cpp \
1188 common/misc/assert.cpp \
1189 common/misc/buildconfig.cpp \
1190 common/misc/sanity-c.c \
1191 common/misc/sanity-cpp.cpp \
1192 common/path/rtPathVolumeSpecLen.cpp \
1193 common/path/RTPathAbsDup.cpp \
1194 common/path/RTPathAbsEx.cpp \
1195 common/path/RTPathAbsExDup.cpp \
1196 common/path/RTPathAppend.cpp \
1197 common/path/RTPathAppendEx.cpp \
1198 common/path/RTPathExt.cpp \
1199 common/path/RTPathFilename.cpp \
1200 common/path/RTPathHasExt.cpp \
1201 common/path/RTPathHasPath.cpp \
1202 common/path/RTPathJoin.cpp \
1203 common/path/RTPathJoinA.cpp \
1204 common/path/RTPathParse.cpp \
1205 common/path/RTPathRealDup.cpp \
1206 common/path/RTPathStripExt.cpp \
1207 common/path/RTPathStripFilename.cpp \
1208 common/path/RTPathStripTrailingSlash.cpp \
1209 common/string/RTStrCat.cpp \
1210 common/string/RTStrCatEx.cpp \
1211 common/string/RTStrCatP.cpp \
1212 common/string/RTStrCatPEx.cpp \
1213 common/string/RTStrCmp.cpp \
1214 common/string/RTStrCopy.cpp \
1215 common/string/RTStrCopyEx.cpp \
1216 common/string/RTStrCopyP.cpp \
1217 common/string/RTStrCopyPEx.cpp \
1218 common/string/RTStrNCmp.cpp \
1219 common/string/RTStrNLen.cpp \
1220 common/string/RTStrNLenEx.cpp \
1221 common/string/RTStrStr.cpp \
1222 common/string/straprintf.cpp \
1223 common/string/strformat.cpp \
1224 common/string/strformatnum.cpp \
1225 common/string/strformatrt.cpp \
1226 common/string/strformattype.cpp \
1227 common/string/stringalloc.cpp \
1228 common/string/strprintf.cpp \
1229 common/string/strtonum.cpp \
1230 common/string/unidata.cpp \
1231 common/string/utf-8.cpp \
1232 common/string/utf-8-case.cpp \
1233 common/string/utf-16.cpp \
1234 common/table/avlpv.cpp \
1235 generic/critsect-generic.cpp \
1236 generic/pathhost-generic.cpp \
1237 generic/RTAssertShouldPanic-generic.cpp \
1238 generic/errvars-generic.cpp \
1239 r3/alloc.cpp \
1240 r3/alloc-ef.cpp \
1241 r3/fileio.cpp \
1242 r3/fs.cpp
1243RuntimeGuestR3Mini_SOURCES.freebsd = \
1244 r3/posix/RTMemProtect-posix.cpp \
1245 r3/posix/rtmempage-exec-mmap-posix.cpp \
1246 r3/posix/RTPathUserHome-posix.cpp \
1247 r3/posix/env-posix.cpp \
1248 r3/posix/fileio-posix.cpp \
1249 r3/posix/fileio2-posix.cpp \
1250 r3/posix/path-posix.cpp \
1251 r3/posix/path2-posix.cpp \
1252 r3/posix/utf8-posix.cpp \
1253 r3/posix/thread2-posix.cpp \
1254 common/err/errmsgxpcom.cpp
1255RuntimeGuestR3Mini_SOURCES.linux = \
1256 r3/posix/RTMemProtect-posix.cpp \
1257 r3/posix/rtmempage-exec-mmap-posix.cpp \
1258 r3/posix/RTPathUserHome-posix.cpp \
1259 r3/posix/env-posix.cpp \
1260 r3/posix/fileio-posix.cpp \
1261 r3/posix/fileio2-posix.cpp \
1262 r3/posix/path-posix.cpp \
1263 r3/posix/path2-posix.cpp \
1264 r3/posix/utf8-posix.cpp \
1265 r3/posix/thread2-posix.cpp \
1266 common/err/errmsgxpcom.cpp
1267RuntimeGuestR3Mini_SOURCES.solaris = \
1268 r3/posix/RTMemProtect-posix.cpp \
1269 r3/posix/rtmempage-exec-mmap-posix.cpp \
1270 r3/posix/RTPathUserHome-posix.cpp \
1271 r3/posix/env-posix.cpp \
1272 r3/posix/fileio-posix.cpp \
1273 r3/posix/fileio2-posix.cpp \
1274 r3/posix/path-posix.cpp \
1275 r3/posix/path2-posix.cpp \
1276 r3/posix/utf8-posix.cpp \
1277 r3/posix/thread2-posix.cpp \
1278 common/err/errmsgxpcom.cpp
1279RuntimeGuestR3Mini_SOURCES.win = \
1280 r3/win/alloc-win.cpp \
1281 r3/win/fileio-win.cpp \
1282 r3/win/path-win.cpp \
1283 r3/win/utf8-win.cpp \
1284 r3/win/thread2-win.cpp \
1285 win/errmsgwin.cpp \
1286 win/RTErrConvertFromWin32.cpp
1287
1288# VBox specific stuff.
1289RuntimeGuestR3Mini_SOURCES += \
1290 VBox/logbackdoor.cpp \
1291 VBox/logbackdoor-redirect.cpp
1292
1293
1294#
1295# RuntimeLnxHostR3 Linux host program runtime
1296# (Only used when building L4.)
1297#
1298RuntimeLnxHostR3_TEMPLATE := VBOXLNXHOSTR3LIB
1299RuntimeLnxHostR3_DEFS := IN_RT_R3 IN_SUP_R3 RT_WITH_VBOX RT_NO_GIP
1300RuntimeLnxHostR3_SOURCES := \
1301 $(RuntimeR3_SOURCES.linux.$(KBUILD_TARGET_ARCH)) \
1302 $(RuntimeR3_SOURCES.linux) \
1303 $(RuntimeR3_SOURCES)
1304RuntimeLnxHostR3_INCS := \
1305 $(RuntimeR3_INCS.linux.$(KBUILD_TARGET_ARCH)) \
1306 $(RuntimeR3_INCS.linux) \
1307 $(RuntimeR3_INCS)
1308
1309
1310#
1311# VBoxRT - Shared Object / DLL version.
1312#
1313VBoxRT_TEMPLATE = VBoxR3DllNoPic
1314VBoxRT_SDKS = VBOX_LIBXML2 VBOX_BOOST
1315ifdef VBOX_WITH_LIBCURL
1316 VBoxRT_SDKS += VBOX_LIBCURL
1317endif
1318VBoxRT_SDKS += VBOX_OPENSSL
1319VBoxRT_SDKS.win = $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
1320if1of ($(KBUILD_TARGET)$(VBOX_WITH_HARDENING), darwin win)
1321VBoxRT_INST = $(INST_DLL) $(INST_TESTCASE)
1322endif
1323VBoxRT_DEFS := $(filter-out RT_NO_GIP,$(RuntimeR3_DEFS)) IN_SUP_R3 IN_SUP_R3
1324ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1325 VBoxRT_DEFS += RT_NO_GIP
1326endif
1327VBoxRT_DEFS.$(KBUILD_TYPE) := $(RuntimeR3_DEFS.$(KBUILD_TYPE))
1328VBoxRT_SOURCES := \
1329 VBox/VBoxRTDeps.cpp \
1330 r3/xml.cpp \
1331 $(filter-out common/checksum/crc32.cpp, $(RuntimeR3_SOURCES)) \
1332 common/checksum/crc32-zlib.cpp
1333ifdef VBOX_WITH_LIBCURL
1334 VBoxRT_SOURCES += common/misc/s3.cpp
1335 VBoxRT_SOURCES += common/misc/http.cpp
1336endif
1337VBoxRT_SOURCES.$(KBUILD_TARGET) = $(RuntimeR3_SOURCES.$(KBUILD_TARGET))
1338VBoxRT_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
1339VBoxRT_SOURCES.$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET_ARCH))
1340VBoxRT_SOURCES.win += \
1341 r3/win/dllmain-win.cpp \
1342 r3/win/fileaio-win.cpp \
1343 $(VBoxRT_0_OUTDIR)/VBoxRT.def
1344VBoxRT_SOURCES.linux += \
1345 r3/linux/fileaio-linux.cpp
1346VBoxRT_SOURCES.solaris += \
1347 r3/solaris/fileaio-solaris.cpp
1348VBoxRT_SOURCES.darwin += \
1349 r3/posix/fileaio-posix.cpp
1350VBoxRT_SOURCES.freebsd += \
1351 r3/freebsd/fileaio-freebsd.cpp
1352VBoxRT_INCS := $(RuntimeR3_INCS)
1353VBoxRT_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
1354VBoxRT_INCS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_INCS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
1355VBoxRT_LIBS = \
1356 $(PATH_STAGE_LIB)/VBox-liblzf$(VBOX_SUFF_LIB)
1357if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1358VBoxRT_LIBS += \
1359 $(PATH_STAGE_LIB)/SUPR3$(VBOX_SUFF_LIB)
1360endif
1361ifdef IPRT_WITH_KSTUFF
1362 VBoxRT_LIBS += \
1363 $(PATH_STAGE_LIB)/VBox-kStuff$(VBOX_SUFF_LIB)
1364endif
1365ifndef SDK_VBOX_LIBXML2_LIBS
1366 VBoxRT_LIBS += \
1367 $(PATH_STAGE_LIB)/VBox-libxml2$(VBOX_SUFF_LIB)
1368endif
1369VBoxRT_LIBS += \
1370 $(SDK_VBOX_ZLIB_LIBS)
1371ifndef SDK_VBOX_OPENSSL_LIBS
1372 VBoxRT_LIBS += \
1373 $(PATH_STAGE_LIB)/VBox-libcrypto$(VBOX_SUFF_LIB) \
1374 $(PATH_STAGE_LIB)/VBox-libssl$(VBOX_SUFF_LIB)
1375endif
1376ifdef IPRT_WITH_LZO
1377 VBoxRT_LIBS += lzo2
1378endif
1379VBoxRT_LIBS.linux = \
1380 crypt
1381VBoxRT_LIBS.darwin = \
1382 iconv
1383VBoxRT_LIBS.freebsd = \
1384 iconv \
1385 rt
1386VBoxRT_LIBS.haiku = \
1387 iconv
1388VBoxRT_LIBS.solaris = \
1389 kstat \
1390 contract
1391ifn1of ($(KBUILD_TARGET_ARCH), sparc32 sparc64)
1392 # SMBIOS not available on Solaris SPARC.
1393 VBoxRT_LIBS.solaris += smbios
1394endif
1395VBoxRT_LIBS.win = \
1396 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/vccomsup.lib \
1397 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/wbemuuid.lib
1398VBoxRT_LDFLAGS.darwin = -framework IOKit -framework CoreFoundation -framework CoreServices -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxRT.dylib
1399VBoxRT_LDFLAGS.win = /MANIFEST
1400VBoxRT_LDFLAGS.l4 = \
1401 -Wl,-whole-archive \
1402 $(PATH_STAGE_LIB)/RuntimeR3L4$(VBOX_SUFF_LIB) \
1403 -Wl,-no-whole-archive
1404ifeq ($(KBUILD_TARGET),l4)
1405VBoxRT_LIBS += \
1406 $(L4_LIBDIR)/libl4sys.a \
1407 $(L4_LIBDIR)/libl4sys.p.a
1408endif
1409VBoxRT_LIBS.l4 = \
1410 $(PATH_STAGE_LIB)/RuntimeR3L4$(VBOX_SUFF_LIB)
1411
1412if1of ($(DLLS), VBoxRT)
1413$$(VBoxRT_0_OUTDIR)/VBoxRT.def: \
1414 $(PATH_SUB_CURRENT)/r3/win/VBoxRT-$$(if-expr $$(KBUILD_TARGET_ARCH) == amd64,win64,win32).def \
1415 $(PATH_SUB_CURRENT)/r3/win/$(if $(VBOX_OSE),VBoxRT-openssl-ose.def,VBoxRT-openssl.def)
1416 $(RM) -f -- $@
1417 $(REDIRECT) -wto $@ -- $(CAT_EXT) $^
1418endif
1419
1420
1421#
1422# HACK ALERT! Make testcase run during build on SELinux boxes.
1423# Create a dummy DLL that ensure that VBoxRT is installed
1424# during the DLL pass and cleaned up later.
1425#
1426ifeq ($(KBUILD_TARGET),linux)
1427 if1of (VBoxRT, $(DLLS))
1428 ifneq ($(wildcard /usr/bin/chcon),)
1429VBoxRT_INSTTYPE = none
1430VBoxRT_DEBUG_INSTTYPE = both
1431
1432DLLS += VBoxRTDummy
1433VBoxRTDummy_TEMPLATE = VBOXR3
1434VBoxRTDummy_INSTTYPE = none
1435VBoxRTDummy_LIBS = $(PATH_STAGE_BIN)/VBoxRT.so
1436VBoxRTDummy_CLEAN = $(PATH_STAGE_BIN)/VBoxRT.so
1437BLDDIRS += $(PATH_STAGE_BIN)
1438
1439$(PATH_STAGE_BIN)/VBoxRT.so: $$(VBoxRT_1_TARGET) | $$(dir $$@)
1440 $(INSTALL) $< $@
1441 chcon -t texrel_shlib_t $@ || true
1442
1443VBoxRT:: VBoxRTDummy
1444 endif # chcon present.
1445 endif # building VBoxRT
1446endif # linux
1447
1448
1449#
1450# VBoxRTImp - Import library/hack.
1451#
1452ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.amd64)
1453$(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxRTImp,VBoxRT,VBox/VBoxRTImp.def r3/win/VBoxRT-openssl-ose.def r3/win/VBoxRT-win64.def)
1454else ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.x86)
1455$(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxRTImp,VBoxRT,VBox/VBoxRTImp.def r3/win/VBoxRT-openssl-ose.def r3/win/VBoxRT-win32.def)
1456else
1457$(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxRTImp,VBoxRT,VBox/VBoxRTImp.def r3/win/VBoxRT-openssl-ose.def)
1458endif
1459
1460
1461#
1462# RuntimeR3NoCRTGCC - CRT replacement lib for VBoxREM.
1463# This is used together with VBoxRT.
1464#
1465## @todo the *_alias.c stuff is busted, remove and use RT_WITH_NOCRT_ALIASES instead.
1466RuntimeR3NoCRTGCC_TEMPLATE = VBOXNOCRTGCC
1467RuntimeR3NoCRTGCC_LIBSUFF = $(VBOX_SUFF_LIB)
1468ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1469 RuntimeR3NoCRTGCC_DEFS += RT_NO_GIP
1470endif
1471RuntimeR3NoCRTGCC_INCS = include
1472RuntimeR3NoCRTGCC_SOURCES := \
1473 common/misc/sanity-cpp.cpp \
1474 common/misc/sanity-c.c \
1475 \
1476 $(RuntimeNoCrt_SOURCES)
1477
1478if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1479RuntimeR3NoCRTGCC_SOURCES += \
1480 common/math/ceill.asm \
1481 common/math/cosl.asm \
1482 common/math/fabs.asm \
1483 common/math/fabsf.asm \
1484 common/math/fabsl.asm \
1485 common/math/floor.asm \
1486 common/math/floorf.asm \
1487 common/math/floorl.asm \
1488 common/math/ldexpl.asm \
1489 common/math/llrint.asm \
1490 common/math/llrintf.asm \
1491 common/math/llrintl.asm \
1492 common/math/logl.asm \
1493 common/math/lrint.asm \
1494 common/math/lrintf.asm \
1495 common/math/lrintl.asm \
1496 common/math/remainder.asm \
1497 common/math/remainderf.asm \
1498 common/math/remainderl.asm \
1499 common/math/sinl.asm \
1500 common/math/tanl.asm \
1501 common/math/trunc.asm \
1502 common/math/truncf.asm \
1503 common/math/truncl.asm \
1504 \
1505 common/string/memchr_alias.c \
1506 common/string/memcmp_alias.c \
1507 common/string/memcpy_alias.c \
1508 common/string/memmove_alias.c \
1509 common/string/memset_alias.c \
1510 common/string/strchr_alias.c \
1511 common/string/strcmp_alias.c \
1512 common/string/strlen_alias.c
1513endif
1514
1515RuntimeR3NoCRTGCC_SOURCES.x86 = \
1516 common/math/x86/fenv-x86.c \
1517 common/math/gcc/adddi3.c \
1518 common/math/gcc/anddi3.c \
1519 common/math/gcc/ashldi3.c \
1520 common/math/gcc/ashrdi3.c \
1521 common/math/gcc/cmpdi2.c \
1522 common/math/gcc/divdi3.c \
1523 common/math/gcc/iordi3.c \
1524 common/math/gcc/lshldi3.c \
1525 common/math/gcc/lshrdi3.c \
1526 common/math/gcc/moddi3.c \
1527 common/math/gcc/muldi3.c \
1528 common/math/gcc/negdi2.c \
1529 common/math/gcc/notdi2.c \
1530 common/math/gcc/qdivrem.c \
1531 common/math/gcc/subdi3.c \
1532 common/math/gcc/ucmpdi2.c \
1533 common/math/gcc/udivdi3.c \
1534 common/math/gcc/umoddi3.c \
1535 common/math/gcc/xordi3.c
1536
1537
1538## @todo stop using the old memcpy.c and memset.c code.
1539
1540#
1541# RuntimeR0 - Ring-0 library for VMMR0.
1542#
1543RuntimeR0_TEMPLATE = VBoxR0
1544RuntimeR0_DEFS = IN_RT_R0 RT_WITH_VBOX
1545ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1546 RuntimeR0_DEFS += RT_NO_GIP
1547endif
1548RuntimeR0_INCS = include
1549RuntimeR0_SOURCES := \
1550 common/log/logellipsis.cpp \
1551 common/log/logrelellipsis.cpp \
1552 common/log/logcom.cpp \
1553 common/log/logformat.cpp \
1554 common/log/tracebuf.cpp \
1555 common/log/tracedefault.cpp \
1556 common/misc/RTAssertMsg1Weak.cpp \
1557 common/misc/RTAssertMsg2.cpp \
1558 common/misc/RTAssertMsg2Add.cpp \
1559 common/misc/RTAssertMsg2AddWeak.cpp \
1560 common/misc/RTAssertMsg2AddWeakV.cpp \
1561 common/misc/RTAssertMsg2Weak.cpp \
1562 common/misc/RTAssertMsg2WeakV.cpp \
1563 common/misc/buildconfig.cpp \
1564 common/misc/once.cpp \
1565 common/misc/sanity-c.c \
1566 common/misc/sanity-cpp.cpp \
1567 common/misc/term.cpp \
1568 common/path/RTPathFilename.cpp \
1569 common/string/strhash1.cpp \
1570 common/string/strncmp.cpp \
1571 common/string/strpbrk.cpp \
1572 common/string/RTStrCat.cpp \
1573 common/string/RTStrCatEx.cpp \
1574 common/string/RTStrCatP.cpp \
1575 common/string/RTStrCatPEx.cpp \
1576 common/string/RTStrCopy.cpp \
1577 common/string/RTStrCopyEx.cpp \
1578 common/string/RTStrCopyP.cpp \
1579 common/string/RTStrCopyPEx.cpp \
1580 common/string/RTStrNLen.cpp \
1581 common/string/RTStrNLenEx.cpp \
1582 common/table/avlgcptr.cpp \
1583 common/table/avlhcphys.cpp \
1584 common/table/avllu32.cpp \
1585 common/table/avlogcphys.cpp \
1586 common/table/avlogcptr.cpp \
1587 common/table/avlohcphys.cpp \
1588 common/table/avloioport.cpp \
1589 common/table/avlpv.cpp \
1590 common/table/avlrogcphys.cpp \
1591 common/table/avlrogcptr.cpp \
1592 common/table/avlroioport.cpp \
1593 common/table/avlroogcptr.cpp \
1594 common/table/avlu32.cpp \
1595 common/table/avlou32.cpp \
1596 common/time/timesup.cpp \
1597 generic/RTAssertShouldPanic-generic.cpp \
1598 \
1599 $(RuntimeNoCrt_SOURCES)
1600
1601if1of ($(KBUILD_TARGET), darwin solaris freebsd)
1602RuntimeR0_SOURCES += \
1603 common/math/gcc/adddi3.c \
1604 common/math/gcc/anddi3.c \
1605 common/math/gcc/ashldi3.c \
1606 common/math/gcc/ashrdi3.c \
1607 common/math/gcc/cmpdi2.c \
1608 common/math/gcc/divdi3.c \
1609 common/math/gcc/iordi3.c \
1610 common/math/gcc/lshldi3.c \
1611 common/math/gcc/lshrdi3.c \
1612 common/math/gcc/moddi3.c \
1613 common/math/gcc/muldi3.c \
1614 common/math/gcc/negdi2.c \
1615 common/math/gcc/notdi2.c \
1616 common/math/gcc/qdivrem.c \
1617 common/math/gcc/subdi3.c \
1618 common/math/gcc/ucmpdi2.c \
1619 common/math/gcc/udivdi3.c \
1620 common/math/gcc/umoddi3.c \
1621 common/math/gcc/xordi3.c
1622endif
1623
1624#if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
1625# RuntimeR0_SOURCES += common/time/timesupA.asm
1626#else
1627 RuntimeR0_SOURCES += common/time/timesupref.cpp
1628#endif
1629
1630RuntimeR0_SOURCES.win.amd64 := $(RuntimeWin64ASM_SOURCES)
1631RuntimeR0_SOURCES.win.x86 := $(RuntimeWin32ASM_SOURCES)
1632RuntimeR0_SOURCES.win = \
1633 nt/NtProcessStartup-stub.cpp
1634
1635RuntimeR0_SOURCES.os2 = \
1636 os2/sys0.asm
1637
1638
1639#
1640# RuntimeR0Stub - Ring-0 context startup stub for Windows and Solaris.
1641#
1642RuntimeR0Stub_TEMPLATE = $(if-expr "$(KBUILD_TARGET)" == "solaris",VBoxR0DrvLib,VBoxR0)
1643RuntimeR0Stub_SOURCES.win = \
1644 nt/NtProcessStartup-stub.cpp
1645RuntimeR0Stub_SOURCES.solaris = \
1646 r0drv/solaris/modulestub-r0drv-solaris.c
1647
1648
1649#
1650# RuntimeR0Drv - Ring-0 library for host drivers.
1651#
1652RuntimeR0Drv_TEMPLATE = VBoxR0DrvLib
1653RuntimeR0Drv_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK) $(VBOX_WINPSDK)INCS
1654RuntimeR0Drv_DEFS = IN_RT_R0 RT_WITH_VBOX RT_WITHOUT_NOCRT_WRAPPERS RT_NO_EXPORT_SYMBOL
1655RuntimeR0Drv_DEFS.win = IN_SUP_R0
1656RuntimeR0Drv_DEFS.linux = MODULE KBUILD_MODNAME=KBUILD_STR\(vboxdrv\) KBUILD_BASENAME=KBUILD_STR\(vboxdrv\) IN_SUP_R0
1657
1658RuntimeR0Drv_INCS := $(PATH_SUB_CURRENT) include
1659RuntimeR0Drv_INCS.freebsd = \
1660 $(PATH_STAGE)/gen-sys-hdrs
1661RuntimeR0Drv_INCS.linux = \
1662 r0drv/linux
1663RuntimeR0Drv_INCS.solaris = \
1664 r0drv/solaris/vbi/i86pc \
1665 r0drv/solaris/vbi/i86pc/sys
1666
1667RuntimeR0Drv_SOURCES = \
1668 common/alloc/alloc.cpp \
1669 common/alloc/heapsimple.cpp \
1670 common/alloc/heapoffset.cpp \
1671 common/checksum/crc32.cpp \
1672 common/checksum/crc64.cpp \
1673 common/checksum/md5.cpp \
1674 common/checksum/ipv4.cpp \
1675 common/checksum/ipv6.cpp \
1676 common/err/RTErrConvertToErrno.cpp \
1677 common/err/RTErrConvertFromErrno.cpp \
1678 common/log/log.cpp \
1679 common/log/logellipsis.cpp \
1680 common/log/logrel.cpp \
1681 common/log/logrelellipsis.cpp \
1682 common/log/logcom.cpp \
1683 common/log/logformat.cpp \
1684 common/log/tracebuf.cpp \
1685 common/log/tracedefault.cpp \
1686 common/misc/RTAssertMsg1Weak.cpp \
1687 common/misc/RTAssertMsg2.cpp \
1688 common/misc/RTAssertMsg2Add.cpp \
1689 common/misc/RTAssertMsg2AddWeak.cpp \
1690 common/misc/RTAssertMsg2AddWeakV.cpp \
1691 common/misc/RTAssertMsg2Weak.cpp \
1692 common/misc/RTAssertMsg2WeakV.cpp \
1693 common/misc/assert.cpp \
1694 common/misc/buildconfig.cpp \
1695 common/misc/handletable.cpp \
1696 common/misc/handletablectx.cpp \
1697 common/misc/handletablesimple.cpp \
1698 common/misc/once.cpp \
1699 common/misc/sanity-c.c \
1700 common/misc/sanity-cpp.cpp \
1701 common/misc/term.cpp \
1702 common/path/rtPathVolumeSpecLen.cpp \
1703 common/path/RTPathAbsDup.cpp \
1704 common/path/RTPathAbsEx.cpp \
1705 common/path/RTPathAbsExDup.cpp \
1706 common/path/RTPathAppend.cpp \
1707 common/path/RTPathAppendEx.cpp \
1708 common/path/RTPathExt.cpp \
1709 common/path/RTPathFilename.cpp \
1710 common/path/RTPathHasExt.cpp \
1711 common/path/RTPathHasPath.cpp \
1712 common/path/RTPathParse.cpp \
1713 common/path/RTPathRealDup.cpp \
1714 common/path/RTPathStripExt.cpp \
1715 common/path/RTPathStripFilename.cpp \
1716 common/path/RTPathStripTrailingSlash.cpp \
1717 common/rand/rand.cpp \
1718 common/rand/randadv.cpp \
1719 common/rand/randparkmiller.cpp \
1720 common/string/RTStrCat.cpp \
1721 common/string/RTStrCatEx.cpp \
1722 common/string/RTStrCatP.cpp \
1723 common/string/RTStrCatPEx.cpp \
1724 common/string/RTStrCmp.cpp \
1725 common/string/RTStrCopy.cpp \
1726 common/string/RTStrCopyEx.cpp \
1727 common/string/RTStrCopyP.cpp \
1728 common/string/RTStrCopyPEx.cpp \
1729 common/string/RTStrNCmp.cpp \
1730 common/string/RTStrNLen.cpp \
1731 common/string/RTStrNLenEx.cpp \
1732 common/string/straprintf.cpp \
1733 common/string/strformat.cpp \
1734 common/string/strformatnum.cpp \
1735 common/string/strformatrt.cpp \
1736 common/string/strformattype.cpp \
1737 common/string/strhash1.cpp \
1738 common/string/strprintf.cpp \
1739 common/string/strtonum.cpp \
1740 common/string/stringalloc.cpp \
1741 common/string/utf-16.cpp \
1742 common/string/utf-8.cpp \
1743 common/table/avlpv.cpp \
1744 common/time/time.cpp \
1745 generic/RTLogWriteStdErr-stub-generic.cpp \
1746 generic/RTLogWriteUser-generic.cpp \
1747 generic/RTMpGetArraySize-generic.cpp \
1748 generic/RTRandAdvCreateSystemFaster-generic.cpp \
1749 generic/RTSemEventWait-2-ex-generic.cpp \
1750 generic/RTSemEventWaitNoResume-2-ex-generic.cpp \
1751 generic/RTSemEventMultiWait-2-ex-generic.cpp \
1752 generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
1753 generic/errvars-generic.cpp \
1754 generic/uuid-generic.cpp \
1755 r0drv/alloc-r0drv.cpp \
1756 r0drv/initterm-r0drv.cpp \
1757 r0drv/generic/semspinmutex-r0drv-generic.c \
1758 VBox/log-vbox.cpp \
1759
1760RuntimeR0Drv_SOURCES.linux = \
1761 common/misc/thread.cpp \
1762 common/string/strpbrk.cpp \
1763 generic/RTAssertShouldPanic-generic.cpp \
1764 generic/RTLogWriteStdOut-stub-generic.cpp \
1765 generic/mppresent-generic.cpp \
1766 r0drv/linux/alloc-r0drv-linux.c \
1767 r0drv/linux/assert-r0drv-linux.c \
1768 r0drv/linux/initterm-r0drv-linux.c \
1769 r0drv/linux/memobj-r0drv-linux.c \
1770 r0drv/linux/memuserkernel-r0drv-linux.c \
1771 r0drv/linux/mp-r0drv-linux.c \
1772 r0drv/linux/mpnotification-r0drv-linux.c \
1773 r0drv/linux/process-r0drv-linux.c \
1774 r0drv/linux/RTLogWriteDebugger-r0drv-linux.c \
1775 r0drv/linux/semevent-r0drv-linux.c \
1776 r0drv/linux/semeventmulti-r0drv-linux.c \
1777 r0drv/linux/semfastmutex-r0drv-linux.c \
1778 r0drv/linux/semmutex-r0drv-linux.c \
1779 r0drv/linux/spinlock-r0drv-linux.c \
1780 r0drv/linux/thread-r0drv-linux.c \
1781 r0drv/linux/thread2-r0drv-linux.c \
1782 r0drv/linux/time-r0drv-linux.c \
1783 r0drv/linux/timer-r0drv-linux.c \
1784 r0drv/memobj-r0drv.cpp \
1785 r0drv/mpnotification-r0drv.c \
1786 r0drv/powernotification-r0drv.c
1787
1788RuntimeR0Drv_SOURCES.win = \
1789 common/misc/thread.cpp \
1790 common/string/memcmp.asm \
1791 common/string/memchr.asm \
1792 common/string/memcpy.asm \
1793 common/string/memset.asm \
1794 common/string/memmove.asm \
1795 common/string/strlen.asm \
1796 common/string/strncmp.cpp \
1797 common/string/strpbrk.cpp \
1798 generic/RTAssertShouldPanic-generic.cpp \
1799 generic/RTLogWriteStdOut-stub-generic.cpp \
1800 generic/RTTimerCreate-generic.cpp \
1801 generic/mppresent-generic.cpp \
1802 nt/RTErrConvertFromNtStatus.cpp \
1803 r0drv/memobj-r0drv.cpp \
1804 r0drv/mpnotification-r0drv.c \
1805 r0drv/powernotification-r0drv.c \
1806 r0drv/nt/alloc-r0drv-nt.cpp \
1807 r0drv/nt/assert-r0drv-nt.cpp \
1808 r0drv/nt/initterm-r0drv-nt.cpp \
1809 r0drv/nt/memobj-r0drv-nt.cpp \
1810 r0drv/nt/memuserkernel-r0drv-nt.cpp \
1811 r0drv/nt/mp-r0drv-nt.cpp \
1812 r0drv/nt/mpnotification-r0drv-nt.cpp \
1813 r0drv/nt/process-r0drv-nt.cpp \
1814 r0drv/nt/RTLogWriteDebugger-r0drv-nt.cpp \
1815 r0drv/nt/semevent-r0drv-nt.cpp \
1816 r0drv/nt/semeventmulti-r0drv-nt.cpp \
1817 r0drv/nt/semfastmutex-r0drv-nt.cpp \
1818 r0drv/nt/semmutex-r0drv-nt.cpp \
1819 r0drv/nt/spinlock-r0drv-nt.cpp \
1820 r0drv/nt/thread-r0drv-nt.cpp \
1821 r0drv/nt/thread2-r0drv-nt.cpp \
1822 r0drv/nt/time-r0drv-nt.cpp \
1823 r0drv/nt/timer-r0drv-nt.cpp \
1824 r0drv/nt/RTTimerGetSystemGranularity-r0drv-nt.cpp
1825
1826RuntimeR0Drv_SOURCES.win.amd64 := $(RuntimeWin64ASM_SOURCES)
1827RuntimeR0Drv_SOURCES.win.x86 := $(RuntimeWin32ASM_SOURCES)
1828
1829RuntimeR0Drv_SOURCES.darwin = \
1830 common/misc/thread.cpp \
1831 common/string/memchr.asm \
1832 common/string/strpbrk.cpp \
1833 darwin/RTErrConvertFromDarwin.cpp \
1834 darwin/RTErrConvertFromDarwinIO.cpp \
1835 darwin/RTErrConvertFromDarwinKern.cpp \
1836 generic/RTAssertShouldPanic-generic.cpp \
1837 generic/RTTimerCreate-generic.cpp \
1838 generic/mppresent-generic.cpp \
1839 generic/timer-generic.cpp \
1840 r0drv/generic/mpnotification-r0drv-generic.cpp \
1841 r0drv/darwin/alloc-r0drv-darwin.cpp \
1842 r0drv/darwin/assert-r0drv-darwin.cpp \
1843 r0drv/darwin/initterm-r0drv-darwin.cpp \
1844 r0drv/darwin/dbgkrnlinfo-r0drv-darwin.cpp \
1845 r0drv/darwin/memobj-r0drv-darwin.cpp \
1846 r0drv/darwin/mp-r0drv-darwin.cpp \
1847 r0drv/darwin/memuserkernel-r0drv-darwin.cpp \
1848 r0drv/darwin/process-r0drv-darwin.cpp \
1849 r0drv/darwin/RTLogWriteDebugger-r0drv-darwin.cpp \
1850 r0drv/darwin/RTLogWriteStdOut-r0drv-darwin.cpp \
1851 r0drv/darwin/semevent-r0drv-darwin.cpp \
1852 r0drv/darwin/semeventmulti-r0drv-darwin.cpp \
1853 r0drv/darwin/semfastmutex-r0drv-darwin.cpp \
1854 r0drv/darwin/semmutex-r0drv-darwin.cpp \
1855 r0drv/darwin/spinlock-r0drv-darwin.cpp \
1856 r0drv/darwin/thread-r0drv-darwin.cpp \
1857 r0drv/darwin/thread2-r0drv-darwin.cpp \
1858 r0drv/darwin/threadpreempt-r0drv-darwin.cpp \
1859 r0drv/darwin/time-r0drv-darwin.cpp \
1860 r0drv/memobj-r0drv.cpp \
1861 r0drv/powernotification-r0drv.c
1862
1863RuntimeR0Drv_SOURCES.os2 = \
1864 common/string/memchr.asm \
1865 common/string/memcmp.asm \
1866 common/string/memcpy.asm \
1867 common/string/mempcpy.asm \
1868 common/string/memmove.asm \
1869 common/string/memset.asm \
1870 common/string/strchr.asm \
1871 common/string/strcmp.asm \
1872 common/string/strcpy.asm \
1873 common/string/strlen.asm \
1874 \
1875 common/string/strncmp.cpp \
1876 common/string/strpbrk.cpp \
1877 \
1878 common/misc/thread.cpp \
1879 generic/RTAssertShouldPanic-generic.cpp \
1880 generic/RTLogWriteDebugger-generic.cpp \
1881 generic/RTLogWriteStdOut-stub-generic.cpp \
1882 generic/RTMpCpuId-generic.cpp \
1883 generic/RTMpCpuIdFromSetIndex-generic.cpp \
1884 generic/RTMpCpuIdToSetIndex-generic.cpp \
1885 generic/RTMpIsCpuPossible-generic.cpp \
1886 generic/RTMpGetCount-generic.cpp \
1887 generic/RTMpGetMaxCpuId-generic.cpp \
1888 generic/RTMpGetOnlineCount-generic.cpp \
1889 generic/RTMpGetOnlineSet-generic.cpp \
1890 generic/RTMpGetSet-generic.cpp \
1891 generic/RTMpIsCpuOnline-generic.cpp \
1892 generic/RTTimerCreate-generic.cpp \
1893 generic/mppresent-generic.cpp \
1894 os2/RTErrConvertFromOS2.cpp \
1895 os2/rtSemWaitOs2ConvertTimeout.cpp \
1896 os2/sys0.asm \
1897 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
1898 r0drv/generic/RTMpOn-r0drv-generic.cpp \
1899 r0drv/generic/mpnotification-r0drv-generic.cpp \
1900 r0drv/memobj-r0drv.cpp \
1901 r0drv/powernotification-r0drv.c \
1902 r0drv/os2/alloc-r0drv-os2.cpp \
1903 r0drv/os2/assert-r0drv-os2.cpp \
1904 r0drv/os2/assertA-r0drv-os2.asm \
1905 r0drv/os2/initterm-r0drv-os2.cpp \
1906 r0drv/os2/memobj-r0drv-os2.cpp \
1907 r0drv/os2/memuserkernel-r0drv-os2.cpp \
1908 r0drv/os2/os2imports.imp \
1909 r0drv/os2/process-r0drv-os2.cpp \
1910 r0drv/os2/RTR0AssertPanicSystem-r0drv-os2.asm \
1911 r0drv/os2/RTR0Os2DHQueryDOSVar.asm \
1912 r0drv/os2/RTR0Os2DHVMGlobalToProcess.asm \
1913 r0drv/os2/semevent-r0drv-os2.cpp \
1914 r0drv/os2/semeventmulti-r0drv-os2.cpp \
1915 r0drv/os2/semfastmutex-r0drv-os2.cpp \
1916 r0drv/os2/spinlock-r0drv-os2.cpp \
1917 r0drv/os2/thread-r0drv-os2.cpp \
1918 r0drv/os2/thread2-r0drv-os2.cpp \
1919 r0drv/os2/time-r0drv-os2.cpp \
1920 r0drv/os2/timer-r0drv-os2.cpp \
1921 r0drv/os2/timerA-r0drv-os2.asm
1922
1923RuntimeR0Drv_SOURCES.freebsd = \
1924 common/misc/thread.cpp \
1925 common/string/memchr.asm \
1926 common/string/memmove.asm \
1927 common/string/strpbrk.cpp \
1928 common/string/memcmp.asm \
1929 common/string/strchr.asm \
1930 generic/RTAssertShouldPanic-generic.cpp \
1931 generic/RTLogWriteDebugger-generic.cpp \
1932 generic/RTLogWriteStdOut-stub-generic.cpp \
1933 generic/RTTimerCreate-generic.cpp \
1934 generic/mppresent-generic.cpp \
1935 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
1936 r0drv/generic/mpnotification-r0drv-generic.cpp \
1937 r0drv/freebsd/alloc-r0drv-freebsd.c \
1938 r0drv/freebsd/assert-r0drv-freebsd.c \
1939 r0drv/freebsd/initterm-r0drv-freebsd.c \
1940 r0drv/freebsd/memobj-r0drv-freebsd.c \
1941 r0drv/freebsd/memuserkernel-r0drv-freebsd.c \
1942 r0drv/freebsd/process-r0drv-freebsd.c \
1943 r0drv/freebsd/semevent-r0drv-freebsd.c \
1944 r0drv/freebsd/semeventmulti-r0drv-freebsd.c \
1945 r0drv/freebsd/semfastmutex-r0drv-freebsd.c \
1946 r0drv/freebsd/semmutex-r0drv-freebsd.c \
1947 r0drv/freebsd/spinlock-r0drv-freebsd.c \
1948 r0drv/freebsd/thread-r0drv-freebsd.c \
1949 r0drv/freebsd/thread2-r0drv-freebsd.c \
1950 r0drv/freebsd/time-r0drv-freebsd.c \
1951 r0drv/freebsd/mp-r0drv-freebsd.c \
1952 generic/timer-generic.cpp \
1953 r0drv/memobj-r0drv.cpp \
1954 r0drv/powernotification-r0drv.c
1955
1956RuntimeR0Drv_SOURCES.solaris = \
1957 common/misc/thread.cpp \
1958 common/string/memchr.asm \
1959 generic/RTAssertShouldPanic-generic.cpp \
1960 generic/RTLogWriteStdOut-stub-generic.cpp \
1961 generic/RTTimerCreate-generic.cpp \
1962 generic/mppresent-generic.cpp \
1963 r0drv/memobj-r0drv.cpp \
1964 r0drv/mpnotification-r0drv.c \
1965 r0drv/powernotification-r0drv.c \
1966 r0drv/solaris/RTLogWriteDebugger-r0drv-solaris.c \
1967 r0drv/solaris/RTMpPokeCpu-r0drv-solaris.c \
1968 r0drv/solaris/alloc-r0drv-solaris.c \
1969 r0drv/solaris/assert-r0drv-solaris.c \
1970 r0drv/solaris/dbgkrnlinfo-r0drv-solaris.c \
1971 r0drv/solaris/initterm-r0drv-solaris.c \
1972 r0drv/solaris/memuserkernel-r0drv-solaris.c \
1973 r0drv/solaris/mpnotification-r0drv-solaris.c \
1974 r0drv/solaris/memobj-r0drv-solaris.c \
1975 r0drv/solaris/mp-r0drv-solaris.c \
1976 r0drv/solaris/process-r0drv-solaris.c \
1977 r0drv/solaris/semevent-r0drv-solaris.c \
1978 r0drv/solaris/semeventmulti-r0drv-solaris.c \
1979 r0drv/solaris/semfastmutex-r0drv-solaris.c \
1980 r0drv/solaris/semmutex-r0drv-solaris.c \
1981 r0drv/solaris/spinlock-r0drv-solaris.c \
1982 r0drv/solaris/thread-r0drv-solaris.c \
1983 r0drv/solaris/thread2-r0drv-solaris.c \
1984 r0drv/solaris/time-r0drv-solaris.c \
1985 r0drv/solaris/timer-r0drv-solaris.c
1986
1987RuntimeR0Drv_SOURCES.haiku = \
1988 common/misc/thread.cpp \
1989 common/string/memchr.asm \
1990 common/string/memmove.asm \
1991 common/string/strpbrk.cpp \
1992 common/string/memcmp.asm \
1993 common/string/strchr.asm \
1994 generic/RTAssertShouldPanic-generic.cpp \
1995 generic/RTTimerCreate-generic.cpp \
1996 generic/mppresent-generic.cpp \
1997 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
1998 r0drv/generic/mpnotification-r0drv-generic.cpp \
1999 r0drv/haiku/alloc-r0drv-haiku.c \
2000 r0drv/haiku/assert-r0drv-haiku.c \
2001 r0drv/haiku/initterm-r0drv-haiku.c \
2002 r0drv/haiku/memobj-r0drv-haiku.c \
2003 r0drv/haiku/mp-r0drv-haiku.c \
2004 r0drv/haiku/process-r0drv-haiku.c \
2005 r0drv/haiku/RTLogWriteDebugger-r0drv-haiku.c \
2006 r0drv/haiku/RTLogWriteStdOut-r0drv-haiku.c \
2007 r0drv/haiku/semevent-r0drv-haiku.c \
2008 r0drv/haiku/semeventmulti-r0drv-haiku.c \
2009 r0drv/haiku/semfastmutex-r0drv-haiku.c \
2010 r0drv/haiku/semmutex-r0drv-haiku.c \
2011 r0drv/haiku/spinlock-r0drv-haiku.c \
2012 r0drv/haiku/thread-r0drv-haiku.c \
2013 r0drv/haiku/thread2-r0drv-haiku.c \
2014 r0drv/haiku/time-r0drv-haiku.c \
2015 generic/timer-generic.cpp \
2016 r0drv/memobj-r0drv.cpp \
2017 r0drv/powernotification-r0drv.c
2018
2019## PORTME: Porters create and add their selection of platform specific Ring-0 Driver files here.
2020
2021RuntimeR0Drv_ORDERDEPS.freebsd = \
2022 $(PATH_STAGE)/gen-sys-hdrs/bus_if.h \
2023 $(PATH_STAGE)/gen-sys-hdrs/device_if.h
2024
2025
2026#
2027# RuntimeGuestR0 - Guest driver runtime.
2028# This is almost the same as the RuntimeR0Drv, the main difference
2029# is in the backdoor logging and the lack of sup.h (which should be
2030# made irrelevant even for RuntimeR0Drv).
2031#
2032RuntimeGuestR0_TEMPLATE := VBOXGUESTR0LIB
2033RuntimeGuestR0_EXTENDS = RuntimeR0Drv
2034RuntimeGuestR0_SOURCES := $(filter-out generic/RTLogWriteUser-generic.cpp, $(RuntimeR0Drv_SOURCES))
2035RuntimeGuestR0_SOURCES += \
2036 VBox/logbackdoor.cpp
2037
2038
2039#
2040# RuntimeGuestR0NT4 - Win32 NT4 guest driver runtime.
2041#
2042RuntimeGuestR0NT4_EXTENDS = RuntimeGuestR0
2043RuntimeGuestR0NT4_EXTENDS_BY = appending
2044RuntimeGuestR0NT4_DEFS = IPRT_TARGET_NT4
2045
2046
2047ifdef VBOX_WITH_RAW_MODE
2048 #
2049 # RuntimeRC - Raw-mode context library.
2050 #
2051 RuntimeRC_TEMPLATE = VBoxRc
2052 RuntimeRC_DEFS = IN_RT_RC RT_WITH_VBOX
2053 RuntimeRC_INCS = include
2054 RuntimeRC_SOURCES := \
2055 common/checksum/crc32.cpp \
2056 common/checksum/crc64.cpp \
2057 common/checksum/md5.cpp \
2058 common/log/log.cpp \
2059 common/log/logellipsis.cpp \
2060 common/log/logrel.cpp \
2061 common/log/logrelellipsis.cpp \
2062 common/log/logcom.cpp \
2063 common/log/logformat.cpp \
2064 common/log/tracebuf.cpp \
2065 common/log/tracedefault.cpp \
2066 common/misc/RTAssertMsg1Weak.cpp \
2067 common/misc/RTAssertMsg2.cpp \
2068 common/misc/RTAssertMsg2Add.cpp \
2069 common/misc/RTAssertMsg2AddWeak.cpp \
2070 common/misc/RTAssertMsg2AddWeakV.cpp \
2071 common/misc/RTAssertMsg2Weak.cpp \
2072 common/misc/RTAssertMsg2WeakV.cpp \
2073 common/misc/assert.cpp \
2074 common/misc/buildconfig.cpp \
2075 common/misc/sanity-c.c \
2076 common/misc/sanity-cpp.cpp \
2077 common/path/RTPathFilename.cpp \
2078 common/string/strformat.cpp \
2079 common/string/strformatnum.cpp \
2080 common/string/strformatrt.cpp \
2081 common/string/strformattype.cpp \
2082 common/string/strncmp.cpp \
2083 common/string/strpbrk.cpp \
2084 common/string/strprintf.cpp \
2085 common/string/RTStrCopy.cpp \
2086 common/string/RTStrCopyEx.cpp \
2087 common/table/avllu32.cpp \
2088 common/table/avlou32.cpp \
2089 common/table/avlogcphys.cpp \
2090 common/table/avlogcptr.cpp \
2091 common/table/avlohcphys.cpp \
2092 common/table/avloioport.cpp \
2093 common/table/avlrogcphys.cpp \
2094 common/table/avlrogcptr.cpp \
2095 common/table/avlroioport.cpp \
2096 common/table/avlroogcptr.cpp \
2097 common/table/avlu32.cpp \
2098 common/time/timeprog.cpp \
2099 common/time/timesup.cpp \
2100 gc/initterm-gc.cpp \
2101 generic/RTAssertShouldPanic-generic.cpp \
2102 generic/errvars-generic.cpp \
2103 \
2104 $(RuntimeNoCrt_SOURCES)
2105
2106 #if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
2107 # RuntimeRC_SOURCES += common/time/timesupA.asm
2108 #else
2109 RuntimeRC_SOURCES += common/time/timesupref.cpp
2110 #endif
2111
2112 RuntimeRC_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
2113
2114 ifeq ($(VBOX_LDR_FMT32),lx)
2115 RuntimeRC_SOURCES += os2/sys0.asm
2116 endif
2117
2118 if1of ($(KBUILD_TARGET), darwin solaris freebsd)
2119 RuntimeRC_SOURCES += \
2120 common/math/gcc/adddi3.c \
2121 common/math/gcc/anddi3.c \
2122 common/math/gcc/ashldi3.c \
2123 common/math/gcc/ashrdi3.c \
2124 common/math/gcc/cmpdi2.c \
2125 common/math/gcc/divdi3.c \
2126 common/math/gcc/iordi3.c \
2127 common/math/gcc/lshldi3.c \
2128 common/math/gcc/lshrdi3.c \
2129 common/math/gcc/moddi3.c \
2130 common/math/gcc/muldi3.c \
2131 common/math/gcc/negdi2.c \
2132 common/math/gcc/notdi2.c \
2133 common/math/gcc/qdivrem.c \
2134 common/math/gcc/subdi3.c \
2135 common/math/gcc/ucmpdi2.c \
2136 common/math/gcc/udivdi3.c \
2137 common/math/gcc/umoddi3.c \
2138 common/math/gcc/xordi3.c
2139 endif
2140
2141
2142 #
2143 # RuntimeRCStub - Raw-mode context startup stub for Windows.
2144 #
2145 RuntimeRCStub_TEMPLATE = VBoxRc
2146 RuntimeRCStub_SOURCES.win = \
2147 nt/NtProcessStartup-stub.cpp
2148
2149
2150endif # VBOX_WITH_RAW_MODE
2151
2152
2153#
2154# Static library for new & delete for the electric fence.
2155#
2156RuntimeEFCPP_TEMPLATE := $(VBoxRT_TEMPLATE)
2157RuntimeEFCPP_SDKS := $(RuntimeR3_SDKS)
2158RuntimeEFCPP_SDKS.$(KBUILD_TARGET) := $(RuntimeR3_SDKS.$(KBUILD_TARGET))
2159RuntimeEFCPP_DEFS := $(RuntimeR3_DEFS)
2160RuntimeEFCPP_DEFS.$(KBUILD_TARGET) := $(RuntimeR3_DEFS.$(KBUILD_TARGET))
2161RuntimeEFCPP_INCS := $(RuntimeR3_INCS)
2162RuntimeEFCPP_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
2163RuntimeEFCPP_SOURCES := r3/alloc-ef-cpp.cpp
2164
2165
2166
2167#
2168# The NTDLL mini import library.
2169#
2170# Note! The reason for doing this is to avoid importing CRT symbols from the
2171# NTDLL. We do not wish to do this because:
2172# - Our compiler is usually a different one and we should use the
2173# matching CRT,
2174# - Older versions of NTDLL may not sport all the exports our w2k3 or
2175# later WINDDK ntdll.lib have and thus we may easily end up with
2176# images that does not load on older windows versions.
2177#
2178RuntimeR3NtDll-amd64_TEMPLATE = VBoxR3Dll
2179RuntimeR3NtDll-amd64_BLD_TRG_ARCH = amd64
2180RuntimeR3NtDll-amd64_ARFLAGS = /NODEFAULTLIB /MACHINE:amd64
2181RuntimeR3NtDll-amd64_SOURCES = \
2182 r3/win/ntdll-mini-implib.c \
2183 r3/win/ntdll-mini-implib.def
2184
2185RuntimeR3NtDll-x86_EXTENDS = RuntimeR3NtDll-amd64
2186RuntimeR3NtDll-x86_BLD_TRG_ARCH = x86
2187RuntimeR3NtDll-x86_ARFLAGS = /NODEFAULTLIB /MACHINE:x86
2188
2189
2190#
2191# Bag of tricks required for making VCC100 output binaries work on NT4, W2K
2192# early XP and early W2K3.
2193#
2194RuntimeR3VccTricks_TEMPLATE = VBoxR3Dll
2195RuntimeR3VccTricks_SOURCES = \
2196 r3/win/vcc100-kernel32-fakes.cpp \
2197 r3/win/vcc100-kernel32-fakesA.asm
2198
2199
2200#
2201# errmsg.cpp depends on a generated header.
2202#
2203common/err/errmsg.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgdata.h
2204common/err/errmsg.cpp_INCS = $(IPRT_OUT_DIR)
2205
2206win/errmsgwin.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgcomdata.h
2207win/errmsgwin.cpp_INCS = $(IPRT_OUT_DIR)
2208
2209# Our COM errors only for R3 libraries on the host
2210define def_errmsgwin_deps
2211 $(lib)_win/errmsgwin.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
2212 $(lib)_common/err/errmsgxpcom.cpp_INCS = $(IPRT_OUT_DIR)
2213 $(lib)_common/err/errmsgxpcom.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
2214endef
2215$(foreach lib,RuntimeR3 RuntimeBldProg VBoxRT RuntimeLnxHostR3,$(eval $(def_errmsgwin_deps)))
2216
2217
2218#
2219# Generate the status code data.
2220#
2221$(IPRT_OUT_DIR)/errmsgdata.h: \
2222 $(VBOX_PATH_RUNTIME_SRC)/common/err/errmsg.sed \
2223 $(PATH_ROOT)/include/iprt/err.h \
2224 $(PATH_ROOT)/include/VBox/err.h \
2225 | $$(dir $$@)
2226 $(call MSG_GENERATE,,$@,$(filter %.h,$^))
2227 $(QUIET)$(REDIRECT) -wo $@ -- $(SED) -f $< $(filter %.h,$^)
2228
2229## @todo r=bird: rename this to indicate that it's not only COM errors, but all win32/64 errors.
2230$(IPRT_OUT_DIR)/errmsgcomdata.h: \
2231 $(VBOX_PATH_RUNTIME_SRC)/common/err/errmsgcom.sed \
2232 $$(PATH_SDK_$(VBOX_WINPSDK)_INC)/WinError.h \
2233 | $$(dir $$@)
2234 $(call MSG_GENERATE,,$@,$(filter %.h,$^))
2235 $(QUIET)$(REDIRECT) -wo $@ -- $(SED) -f $< $(filter %.h,$^)
2236
2237$(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts +| $(IPRT_OUT_DIR)/errmsgvboxcomdata.h: \
2238 $(VBOX_PATH_RUNTIME_SRC)/VBox/errmsgvboxcom.xsl \
2239 $(VBOX_XIDL_FILE_SRC) \
2240 | $$(dir $$@)
2241 $(call MSG_GENERATE,,$@,$(filter %.xidl,$^))
2242 $(QUIET)$(VBOX_XSLTPROC) -o $(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts $< $(filter %.xidl,$^)
2243 $(QUIET)$(CP) --changed -fv $(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
2244
2245
2246if "$(KBUILD_TARGET)" == "freebsd"
2247#
2248# FreeBSDGeneratedKernelHeaders - Generate some kernel interface headers.
2249#
2250# These are used by:
2251# - The RTMp* API in IPRT.
2252# - VBoxGuest
2253#
2254# Note! We cannot give a output path to the awk program, it will always
2255# generate the header next to the source. So, we'll have to temporarily copy
2256# the source file to the destination directory to work.
2257#
2258VBOX_AWK := /usr/bin/awk
2259INSTALLS += FreeBSDGeneratedKernelHeaders
2260FreeBSDGeneratedKernelHeaders_INST = gen-sys-hdrs/
2261FreeBSDGeneratedKernelHeaders_SOURCES = \
2262 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/bus_if.h \
2263 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/device_if.h \
2264 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/pci_if.h
2265FreeBSDGeneratedKernelHeaders_CLEAN = $(FreeBSDGeneratedKernelHeaders_SOURCES)
2266
2267$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/bus_if.h: $(VBOX_FREEBSD_SRC)/kern/bus_if.m | $$(dir $$@)
2268 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
2269 $(QUIET)$(CP) -f $< $(@D)/bus_if.m
2270 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/bus_if.m -h -p
2271 $(QUIET)$(RM) $(@D)/bus_if.m
2272
2273$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/device_if.h: $(VBOX_FREEBSD_SRC)/kern/device_if.m | $$(dir $$@)
2274 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
2275 $(QUIET)$(CP) -f $< $(@D)/device_if.m
2276 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/device_if.m -h -p
2277 $(QUIET)$(RM) $(@D)/device_if.m
2278
2279$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/pci_if.h: $(VBOX_FREEBSD_SRC)/dev/pci/pci_if.m | $$(dir $$@)
2280 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
2281 $(QUIET)$(CP) -f $< $(@D)/pci_if.m
2282 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/pci_if.m -h -p
2283 $(QUIET)$(RM) $(@D)/pci_if.m
2284endif # FreeBSD
2285
2286
2287#
2288# Aliases for .cpp.h files so we can more easily do syntax checking from the editor.
2289#
2290ldrELFRelocatable.cpp.o: ldrELF.o
2291ldrELFRelocatable.cpp.obj: ldrELF.obj
2292
2293
2294#
2295# Doxygen documentation.
2296#
2297IPRT_DOXYFILE_INPUT_DIRS = \
2298 $(PATH_ROOT)/include/iprt \
2299 $(PATH_ROOT)/include/iprt/cpp \
2300 $(PATH_ROOT)/include/iprt/linux \
2301 $(PATH_ROOT)/include/iprt/nocrt \
2302 $(PATH_ROOT)/include/iprt/nocrt/x86 \
2303 $(PATH_ROOT)/include/iprt/nocrt/amd64 \
2304 $(PATH_ROOT)/include/iprt/nocrt/compiler \
2305 $(VBOX_PATH_RUNTIME_SRC)/include/internal \
2306 $(VBOX_PATH_RUNTIME_SRC)/common/alloc \
2307 $(VBOX_PATH_RUNTIME_SRC)/common/asm \
2308 $(VBOX_PATH_RUNTIME_SRC)/common/checksum \
2309 $(VBOX_PATH_RUNTIME_SRC)/common/dbg \
2310 $(VBOX_PATH_RUNTIME_SRC)/common/err \
2311 $(VBOX_PATH_RUNTIME_SRC)/common/ldr \
2312 $(VBOX_PATH_RUNTIME_SRC)/common/log \
2313 $(VBOX_PATH_RUNTIME_SRC)/common/math \
2314 $(VBOX_PATH_RUNTIME_SRC)/common/math/amd64 \
2315 $(VBOX_PATH_RUNTIME_SRC)/common/math/gcc \
2316 $(VBOX_PATH_RUNTIME_SRC)/common/math/x86 \
2317 $(VBOX_PATH_RUNTIME_SRC)/common/misc \
2318 $(VBOX_PATH_RUNTIME_SRC)/common/path \
2319 $(VBOX_PATH_RUNTIME_SRC)/common/rand \
2320 $(VBOX_PATH_RUNTIME_SRC)/common/string \
2321 $(VBOX_PATH_RUNTIME_SRC)/common/table \
2322 $(VBOX_PATH_RUNTIME_SRC)/common/time \
2323 $(VBOX_PATH_RUNTIME_SRC)/VBox \
2324 $(foreach dir, $(VBOX_PATH_RUNTIME_SRC) $(VBOX_PATH_RUNTIME_SRC)/r3 $(VBOX_PATH_RUNTIME_SRC)/r0drv,\
2325 $(dir) \
2326 $(dir)/darwin \
2327 $(dir)/haiku \
2328 $(dir)/l4 \
2329 $(dir)/linux \
2330 $(dir)/nt \
2331 $(dir)/os2 \
2332 $(dir)/solaris \
2333 $(dir)/win \
2334 $(dir)/win32 \
2335 $(dir)/win64 \
2336 $(dir)/generic \
2337 )
2338
2339# These must come first in order to make things look nice.
2340IPRT_DOXYFILE_INPUT_FIRST =\
2341 $(PATH_ROOT)/include/iprt/cdefs.h \
2342 $(PATH_ROOT)/include/iprt/types.h \
2343 $(PATH_ROOT)/include/iprt/runtime.h \
2344 $(PATH_ROOT)/include/iprt/param.h \
2345 $(PATH_ROOT)/include/iprt/assert.h \
2346 $(PATH_ROOT)/include/iprt/asm.h \
2347
2348IPRT_DOXYFILE_INPUT := \
2349 $(filter-out %.cpp.h, $(sort $(wildcard $(addsuffix /*.h, $(IPRT_DOXYFILE_INPUT_DIRS)))) ) \
2350 $(foreach dir, $(IPRT_DOXYFILE_INPUT_DIRS), $(wildcard $(dir)/*.cpp $(dir)/.c $(dir)/.asm))
2351IPRT_DOXYFILE_INPUT := \
2352 $(IPRT_DOXYFILE_INPUT_FIRST) \
2353 $(filter-out $(IPRT_DOXYFILE_INPUT_FIRST), $(IPRT_DOXYFILE_INPUT))
2354
2355
2356IPRT_DOXYFILE_OUTPUT = $(PATH_OUT)/docs/iprt
2357BLDDIRS += $(IPRT_DOXYFILE_OUTPUT)
2358
2359includedep $(IPRT_OUT_DIR)/Doxyfile.iprt.dep
2360
2361# Generate the Doxyfile
2362$(IPRT_OUT_DIR)/Doxyfile.iprt: \
2363 $(VBOX_PATH_RUNTIME_SRC)/Doxyfile \
2364 $(VBOX_PATH_RUNTIME_SRC)/Makefile.kmk \
2365 $(comp-vars IPRT_DOXYFILE_INPUT,DOXYGEN_INPUT_PREV,FORCE) \
2366 $(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE) \
2367 | $$(dir $$@)
2368 $(RM) -f $@ $@.tmp $@.dep
2369 $(CP) -f $(VBOX_PATH_RUNTIME_SRC)/Doxyfile $@.tmp
2370 $(APPEND) $@.tmp
2371 $(APPEND) $@.tmp "OUTPUT_DIRECTORY = $(IPRT_DOXYFILE_OUTPUT)"
2372 $(APPEND) $@.tmp "WARN_LOGFILE = $(IPRT_DOXYFILE_OUTPUT)/errors"
2373 $(APPEND) $@.tmp "INCLUDE_PATH = $(PATH_ROOT)/include include . common/table"
2374 $(APPEND) $@.tmp "INCLUDE_FILE_PATTERNS = *.cpp.h"
2375 $(APPEND) $@.tmp "PREDEFINED += $(ARCH_BITS_DEFS)"
2376 $(APPEND) $@.tmp
2377 $(APPEND) $@.tmp "INPUT = $(IPRT_DOXYFILE_INPUT)"
2378 $(APPEND) $@.tmp
2379 $(MV) -f $@.tmp $@
2380 @$(APPEND) $@.dep "DOXYGEN_OUTPUT_PREV = $(IPRT_DOXYFILE_OUTPUT)"
2381 @$(APPEND) $@.dep "DOXYGEN_INPUT_PREV = $(IPRT_DOXYFILE_INPUT)"
2382
2383# Do the actual job.
2384$(IPRT_OUT_DIR)/docs.iprt: $(IPRT_OUT_DIR)/Doxyfile.iprt $$(IPRT_DOXYFILE_INPUT) | $(IPRT_DOXYFILE_OUTPUT)/
2385 $(RM) -f $(wildcard $(IPRT_DOXYFILE_OUTPUT)/html/*) $(IPRT_OUT_DIR)/docs.iprt
2386 doxygen $(IPRT_OUT_DIR)/Doxyfile.iprt
2387 $(APPEND) $(IPRT_OUT_DIR)/docs.iprt
2388
2389# aliases
2390docs.iprt: $(IPRT_OUT_DIR)/docs.iprt
2391if !defined(VBOX_ONLY_DOCS) && defined(VBOX_WITH_ALL_DOXYGEN_TARGETS)
2392docs: $(IPRT_OUT_DIR)/docs.iprt
2393endif
2394
2395test-doxygen::
2396 @echo test-$(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE)
2397 @echo $(IPRT_DOXYFILE_OUTPUT)
2398 @echo $(DOXYGEN_OUTPUT_PREV)
2399 @echo $(IPRT_DOXYFILE_INPUT)
2400
2401
2402#
2403# Test mangling.
2404#
2405if1of ($(LIBRARIES),RuntimeR3 RuntimeR0 RuntimeR0Drv RuntimeRC)
2406 test-mangling:: $(IPRT_OUT_DIR)/mangling.run
2407 OTHERS += $(IPRT_OUT_DIR)/mangling.run
2408 CLEANS += $(IPRT_OUT_DIR)/mangling.run
2409 $(IPRT_OUT_DIR)/mangling.run: \
2410 $$(RuntimeR3_1_TARGET) \
2411 $$(RuntimeR0_1_TARGET) \
2412 $$(RuntimeR0Drv_1_TARGET) \
2413 $$(RuntimeRC_1_TARGET)
2414 if1of ($(KBUILD_TARGET), win os2)
2415 $(call MSG_L1,IPRT: skipped mangling test.)
2416 else
2417# Generate a SED script from mangling.h that checks for known symbols.
2418 @$(SED) \
2419 -e '/# *define.*RT_MANGLER/!d' \
2420 -e 's/^.*RT_MANGLER(\([^)][^)]*\)).*$(DOLLAR)/\/^\1$(DOLLAR)\/b ok/' \
2421 $(PATH_ROOT)/include/iprt/mangling.h \
2422 --output "$@"
2423 @$(APPEND) -n '$@' \
2424 ':bad' \
2425 's/^\(.*\)$(DOLLAR)/error: Missing # define \1 RT_MANGLER(\1)/' \
2426 'p' \
2427 'q 1' \
2428 '' \
2429 ':ok' \
2430 'd'
2431# Find the best way to generate a symbol list and subject it to mangling.h.
2432 if $(intersects $(KBUILD_TARGET), linux) && "$(VBOX_GCC_fvisibility-hidden)"
2433 $(call MSG_L1,IPRT: Testing mangling and visiblity...)
2434 @readelf -Ws $^ \
2435 | $(SED) \
2436 -e '/^ *[[:digit:]]\+:/!d' \
2437 -e 's/^ \+[[:digit:]]\+: \+[[:xdigit:]]\+ \+[[:digit:]]\+ \+//' \
2438 -e '/^SECTION/d' \
2439 -e '/^FILE/d' \
2440 -e 's/^[[:alpha:]]\+ \+//' \
2441 -e '/LOCAL/d' \
2442 -e 's/^[[:alpha:]]\+ \+//' \
2443 -e '/^HIDDEN/d' \
2444 -e 's/^[[:alpha:]]\+ \+//' \
2445 -e '/^UND/d' \
2446 -e 's/^[[:digit:]]\+ \+//' \
2447 \
2448 -e '/^nocrt_/d' \
2449 -e '/^memchr/d' \
2450 -e '/^memcmp/d' \
2451 -e '/^memcpy/d' \
2452 -e '/^mempcpy/d' \
2453 -e '/^memmove/d' \
2454 -e '/^memset/d' \
2455 -e '/^strchr/d' \
2456 -e '/^strpbrk/d' \
2457 -e '/^_Z7strpbrk/d' \
2458 -e '/^strcmp/d' \
2459 -e '/^strcpy/d' \
2460 -e '/^strncpy/d' \
2461 -e '/^strlen/d' \
2462 -e '/^_Z[[:alpha:]]*[[:digit:]]\+RTC/d' \
2463 \
2464 -e '/^_ZNSt9bad_allocC1Ev/d' \
2465 -e '/^_ZNSt9exceptionC2Ev/d' \
2466 \
2467 -e '/^_Z[[:digit:]]\+dbus/d' \
2468 -e '/^_Z13RTDBusLoadLibv/d' \
2469 \
2470 -e '/^VBoxHost_/d'\
2471 -e '/^VBoxGuest_/d'\
2472 | $(SED) -nf "$@"
2473 else
2474 $(call MSG_L1,IPRT: Testing mangling...)
2475 nm $^ | $(SED) -n \
2476 -e 's/^[0-9a-f][0-9a-f]* //' \
2477 -e '/^[TUDB] /!d' \
2478 -e 's/^. //' \
2479 \
2480 -e '/^g_cchrt/d'\
2481 -e '/^g_frt/d'\
2482 -e '/^g_offrt/d'\
2483 -e '/^g_pfnrt/d'\
2484 -e '/^g_rt/d'\
2485 -e '/^g_szrt/d'\
2486 -e '/^g_ProcessSelf/d'\
2487 -e '/^g_u64ProgramStart/d'\
2488 -e '/^g_enmProcessPriority/d'\
2489 -e '/^g_hDbgModStrCache/d'\
2490 \
2491 -e '/^RTDBusLoadLib/d' \
2492 \
2493 -e '/^RT/p' \
2494 -e '/^g_/p' \
2495 | $(SED) -nf "$@"
2496 endif
2497 endif
2498endif
2499 $(QUIET)$(APPEND) -t $@
2500
2501
2502#
2503# Generate the rules (we're the to sub-makefile).
2504#
2505include $(FILE_KBUILD_SUB_FOOTER)
2506
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