VirtualBox

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

Last change on this file since 42891 was 42692, checked in by vboxsync, 12 years ago

Runtime: rename RTDirCreateTemp-generic.cpp and split out the parts of the function which would be duplicated in RTFileCreateTemp.

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