VirtualBox

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

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

IPRT: Working on debug info again.

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