VirtualBox

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

Last change on this file since 38419 was 38419, checked in by vboxsync, 14 years ago

Runtime: fixed an accident

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