VirtualBox

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

Last change on this file since 49724 was 49724, checked in by vboxsync, 11 years ago

Added ASMAtomicUo[And|Or]U[32|64].

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