VirtualBox

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

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

IPRT: simple HTTP interface

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