VirtualBox

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

Last change on this file since 37490 was 37409, checked in by vboxsync, 13 years ago

iprt/trace: Added the CPU/APIC ID to the trace entires. Added some introspection APIs

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