VirtualBox

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

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

*.kmk: Installation/staging adjustments (kBuild 0.2.0 preps).

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