VirtualBox

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

Last change on this file since 29576 was 29534, checked in by vboxsync, 15 years ago

RuntimeR0: Added common/misc/once.cpp (RTOnce()).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 62.5 KB
Line 
1# $Id: Makefile.kmk 29534 2010-05-17 11:53:42Z vboxsync $
2## @file
3# Sub-Makefile for the IPRT (IPRT).
4#
5
6#
7# Copyright (C) 2006-2010 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 ifdef VBOX_WITH_ADDITION_DRIVERS
36 LIBRARIES += RuntimeGuestR0
37 #LIBRARIES.os2 += RuntimeGuestR0OS2Warp3
38 LIBRARIES.win.x86 += RuntimeGuestR0NT4
39 endif
40
41else ifdef VBOX_ONLY_TESTSUITE
42 #
43 # Only build the testsuite.
44 #
45 LIBRARIES += RuntimeGuestR3 RuntimeGuestR3Shared RuntimeR3 RuntimeR0
46 LIBRARIES.win += RuntimeR0Stub
47
48else ifdef VBOX_ONLY_DOCS
49 #
50 # Build docs only - need just regular R3 runtime.
51 #
52 LIBRARIES += RuntimeR3
53 DLLS += VBoxRT
54
55else # !VBOX_ONLY_ADDITIONS && !VBOX_ONLY_TESTSUITE && !VBOX_ONLY_DOCS
56
57 #
58 # Normal build.
59 #
60 include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
61
62 BLDPROGS += uniread
63 LIBRARIES += RuntimeR3 RuntimeR0 RuntimeEFCPP RuntimeR3NoCRTGCC
64 LIBRARIES.win += RuntimeR0Stub
65 ifdef VBOX_WITH_RAW_MODE
66 LIBRARIES += RuntimeRC
67 LIBRARIES.win += RuntimeRCStub
68 endif
69 ifdef VBOX_WITH_VBOXDRV
70 LIBRARIES += RuntimeR0Drv
71 endif
72 ifdef VBOX_WITH_ADDITIONS
73 LIBRARIES += RuntimeGuestR3 RuntimeGuestR3Shared RuntimeGuestR3Mini
74 ifdef VBOX_WITH_ADDITION_DRIVERS
75 LIBRARIES += RuntimeGuestR0
76 endif
77 #LIBRARIES.os2 += RuntimeGuestR0OS2Warp3
78 LIBRARIES.win.x86 += RuntimeGuestR0NT4
79 endif # VBOX_WITH_ADDITIONS
80 LIBRARIES.l4 += RuntimeR3L4 RuntimeLnxHostR3
81 DLLS += VBoxRT
82endif
83
84# Where the generated stuff goes.
85IPRT_OUT_DIR := $(PATH_TARGET)/Runtime
86BLDDIRS += $(IPRT_OUT_DIR)
87OTHER_CLEAN += \
88 $(IPRT_OUT_DIR)/errmsgdata.h \
89 $(IPRT_OUT_DIR)/errmsgcomdata.h \
90 $(IPRT_OUT_DIR)/errmsgvboxcomdata.h \
91 $(IPRT_OUT_DIR)/Doxyfile.iprt \
92 $(IPRT_OUT_DIR)/Doxyfile.iprt.dep \
93 $(IPRT_OUT_DIR)/docs.iprt
94
95
96#
97# Globals
98#
99VBOX_PATH_RUNTIME_SRC := $(PATH_SUB_CURRENT)
100
101
102#
103# Set the defines that buildconfig.cpp needs. Its used by several targets.
104#
105common/misc/buildconfig.cpp_DEFS = \
106 IPRT_BLDCFG_SCM_REV=$(VBOX_SVN_REV) \
107 IPRT_BLDCFG_VERSION_STRING=\"$(VBOX_VERSION_STRING)\" \
108 IPRT_BLDCFG_VERSION_MAJOR=$(VBOX_VERSION_MAJOR) \
109 IPRT_BLDCFG_VERSION_MINOR=$(VBOX_VERSION_MINOR) \
110 IPRT_BLDCFG_VERSION_BUILD=$(VBOX_VERSION_BUILD)
111
112#
113# Unicode Specification reader used to regenerate unidata.cpp.
114#
115uniread_TEMPLATE = VBOXBLDPROG
116uniread_SOURCES = common/string/uniread.cpp
117uniread_INCS = include
118
119#
120# Win64 assembly sources.
121#
122RuntimeWin64ASM_SOURCES = \
123 win/amd64/ASMAtomicBitClear.asm \
124 win/amd64/ASMAtomicBitTestAndToggle.asm \
125 win/amd64/ASMAtomicBitToggle.asm \
126 win/amd64/ASMAtomicReadU64.asm \
127 win/amd64/ASMAtomicXchgU16.asm \
128 win/amd64/ASMAtomicXchgU8.asm \
129 win/amd64/ASMBitFirstClear.asm \
130 win/amd64/ASMBitFirstSet.asm \
131 win/amd64/ASMGetCS.asm \
132 win/amd64/ASMGetDS.asm \
133 win/amd64/ASMGetES.asm \
134 win/amd64/ASMGetFlags.asm \
135 win/amd64/ASMGetFS.asm \
136 win/amd64/ASMGetGS.asm \
137 win/amd64/ASMGetIDTR.asm \
138 win/amd64/ASMGetGDTR.asm \
139 win/amd64/ASMGetTR.asm \
140 win/amd64/ASMGetSS.asm \
141 win/amd64/ASMProbeReadByte.asm \
142 win/amd64/ASMSetFlags.asm \
143 win/amd64/ASMGetDR0.asm \
144 win/amd64/ASMGetDR1.asm \
145 win/amd64/ASMGetDR2.asm \
146 win/amd64/ASMGetDR3.asm \
147 win/amd64/ASMGetDR6.asm \
148 win/amd64/ASMGetDR7.asm \
149 common/asm/ASMAtomicCmpXchgU8.asm \
150 common/asm/ASMMultU64ByU32DivByU32.asm \
151 common/asm/ASMNopPause.asm
152
153#
154# Win32 assembly sources.
155#
156RuntimeWin32ASM_SOURCES = \
157 common/asm/ASMAtomicCmpXchgU8.asm \
158 common/asm/ASMMultU64ByU32DivByU32.asm
159
160#
161# NoCRT sources (minus math stuff).
162#
163if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
164RuntimeNoCrt_SOURCES = \
165 common/misc/setjmp.asm \
166 common/string/memchr.asm \
167 common/string/memcmp.asm \
168 common/string/memcpy.asm \
169 common/string/mempcpy.asm \
170 common/string/memmove.asm \
171 common/string/memset.asm \
172 common/string/strchr.asm \
173 common/string/strcpy.asm \
174 common/string/strcmp.asm \
175 common/string/strlen.asm
176endif
177
178
179#
180# RuntimeR3 - Static Runtime for Ring-3 executables.
181#
182RuntimeR3_TEMPLATE = VBoxR3Static
183RuntimeR3_SDKS = VBOX_LIBXML2 VBOX_BOOST
184RuntimeR3_SDKS.win = WINPSDK W2K3DDK
185RuntimeR3_DEFS = IN_RT_R3 IN_SUP_R3 LDR_WITH_NATIVE LDR_WITH_ELF32 LDR_WITH_PE RT_WITH_VBOX RT_NO_GIP
186#RuntimeR3_DEFS += RTMEM_WRAP_TO_EF_APIS
187ifdef IPRT_WITH_KSTUFF
188 RuntimeR3_DEFS += LDR_WITH_KLDR
189endif
190ifdef VBOX_MAIN_RELEASE_LOG ## @todo (dmik): temporary, until RTThreadSelf/RTThreadAdopt are properly updated
191 RuntimeR3_DEFS += RTCRITSECT_STRICT
192endif
193ifdef IPRT_WITH_LZJB
194 RuntimeR3_DEFS += RTZIP_USE_LZJB
195endif
196ifdef IPRT_WITH_LZO
197 RuntimeR3_DEFS += RTZIP_USE_LZO
198endif
199ifn1of ($(KBUILD_TARGET), win)
200 RuntimeR3_DEFS += RT_WITH_ICONV_CACHE
201endif
202ifdef IPRT_WITH_FUTEX_BASED_SEMS
203 RuntimeR3_DEFS.linux += IPRT_WITH_FUTEX_BASED_SEMS
204endif
205RuntimeR3_INCS = \
206 include \
207 $(SDK_VBOX_ZLIB_INCS)
208RuntimeR3_INCS += \
209 $(PATH_ROOT)/src/libs/liblzf-3.4
210ifdef IPRT_WITH_KSTUFF
211 RuntimeR3_INCS += \
212 $(PATH_ROOT)/src/libs/kStuff/kStuff/include
213endif
214RuntimeR3_INCS.l4 = \
215 $(L4_INCDIR)
216
217# RuntimeR3_INCS.solaris = \
218# /usr/include
219
220RuntimeR3_SOURCES = \
221 common/alloc/alloc.cpp \
222 common/alloc/heapsimple.cpp \
223 common/alloc/heapoffset.cpp \
224 common/alloc/memcache.cpp \
225 common/checksum/adler32.cpp \
226 common/checksum/crc32.cpp \
227 common/checksum/crc64.cpp \
228 common/checksum/md5.cpp \
229 common/checksum/md5str.cpp \
230 common/checksum/ipv4.cpp \
231 common/checksum/ipv6.cpp \
232 common/dbg/dbg.cpp \
233 common/dbg/dbgas.cpp \
234 common/dbg/dbgmod.cpp \
235 common/dbg/dbgmodcontainer.cpp \
236 common/dbg/dbgmodnm.cpp \
237 common/err/errmsg.cpp \
238 common/err/RTErrConvertFromErrno.cpp \
239 common/err/RTErrConvertToErrno.cpp \
240 common/ldr/ldr.cpp \
241 common/ldr/ldrELF.cpp \
242 common/ldr/ldrEx.cpp \
243 common/ldr/ldrFile.cpp \
244 common/ldr/ldrNative.cpp \
245 common/ldr/ldrPE.cpp \
246 common/log/log.cpp \
247 common/log/logellipsis.cpp \
248 common/log/logrel.cpp \
249 common/log/logrelellipsis.cpp \
250 common/log/logcom.cpp \
251 common/log/logformat.cpp \
252 common/misc/RTAssertMsg1Weak.cpp \
253 common/misc/RTAssertMsg2.cpp \
254 common/misc/RTAssertMsg2Add.cpp \
255 common/misc/RTAssertMsg2AddWeak.cpp \
256 common/misc/RTAssertMsg2AddWeakV.cpp \
257 common/misc/RTAssertMsg2Weak.cpp \
258 common/misc/RTAssertMsg2WeakV.cpp \
259 common/misc/RTFileOpenF.cpp \
260 common/misc/RTFileOpenV.cpp \
261 common/misc/assert.cpp \
262 common/misc/buildconfig.cpp \
263 common/misc/cidr.cpp \
264 common/misc/getopt.cpp \
265 common/misc/getoptargv.cpp \
266 common/misc/handle.cpp \
267 common/misc/handletable.cpp \
268 common/misc/handletablectx.cpp \
269 common/misc/handletablesimple.cpp \
270 common/misc/lockvalidator.cpp \
271 common/misc/message.cpp \
272 common/misc/once.cpp \
273 common/misc/req.cpp \
274 common/misc/sanity-c.c \
275 common/misc/sanity-cpp.cpp \
276 common/misc/semspingpong.cpp \
277 common/misc/sg.cpp \
278 common/misc/thread.cpp \
279 common/misc/zip.cpp \
280 common/misc/term.cpp \
281 common/misc/tar.cpp \
282 common/path/rtPathRootSpecLen.cpp \
283 common/path/rtPathVolumeSpecLen.cpp \
284 common/path/RTPathAbsDup.cpp \
285 common/path/RTPathAbsEx.cpp \
286 common/path/RTPathAbsExDup.cpp \
287 common/path/RTPathAppend.cpp \
288 common/path/RTPathChangeToDosSlashes.cpp \
289 common/path/RTPathChangeToUnixSlashes.cpp \
290 common/path/RTPathCopyComponents.cpp \
291 common/path/RTPathCountComponents.cpp \
292 common/path/RTPathExt.cpp \
293 common/path/RTPathFilename.cpp \
294 common/path/RTPathHaveExt.cpp \
295 common/path/RTPathHavePath.cpp \
296 common/path/RTPathJoin.cpp \
297 common/path/RTPathParse.cpp \
298 common/path/RTPathRealDup.cpp \
299 common/path/RTPathStripExt.cpp \
300 common/path/RTPathStripFilename.cpp \
301 common/path/RTPathStripTrailingSlash.cpp \
302 common/path/RTPathTraverseList.cpp \
303 common/path/comparepaths.cpp \
304 common/rand/rand.cpp \
305 common/rand/randadv.cpp \
306 common/rand/randparkmiller.cpp \
307 common/sort/RTSortIsSorted.cpp \
308 common/sort/RTSortApvIsSorted.cpp \
309 common/sort/shellsort.cpp \
310 common/string/RTStrCmp.cpp \
311 common/string/RTStrConvertHexBytes.cpp \
312 common/string/RTStrCopy.cpp \
313 common/string/RTStrCopyEx.cpp \
314 common/string/RTStrNCmp.cpp \
315 common/string/RTStrNLen.cpp \
316 common/string/RTStrNLenEx.cpp \
317 common/string/RTStrPrintHexBytes.cpp \
318 common/string/RTStrStr.cpp \
319 common/string/base64.cpp \
320 common/string/simplepattern.cpp \
321 common/string/straprintf.cpp \
322 common/string/strformat.cpp \
323 common/string/strformatrt.cpp \
324 common/string/strformattype.cpp \
325 common/string/stringalloc.cpp \
326 common/string/strprintf.cpp \
327 common/string/strspace.cpp \
328 common/string/strstrip.cpp \
329 common/string/strtonum.cpp \
330 common/string/strversion.cpp \
331 common/string/uni.cpp \
332 common/string/unidata.cpp \
333 common/string/utf-16.cpp \
334 common/string/utf-8.cpp \
335 common/string/utf-8-case.cpp \
336 common/string/ministring.cpp \
337 common/table/avlgcptr.cpp \
338 common/table/avlhcphys.cpp \
339 common/table/avllu32.cpp \
340 common/table/avlou32.cpp \
341 common/table/avlogcphys.cpp \
342 common/table/avlogcptr.cpp \
343 common/table/avlohcphys.cpp \
344 common/table/avloioport.cpp \
345 common/table/avlpv.cpp \
346 common/table/avlrgcptr.cpp \
347 common/table/avlrogcphys.cpp \
348 common/table/avlrogcptr.cpp \
349 common/table/avlroioport.cpp \
350 common/table/avlroogcptr.cpp \
351 common/table/avlruintptr.cpp \
352 common/table/avlrfoff.cpp \
353 common/table/avlu32.cpp \
354 common/table/avluintptr.cpp \
355 common/table/avlul.cpp \
356 common/table/table.cpp \
357 common/time/time.cpp \
358 common/time/timeprog.cpp \
359 common/time/timesup.cpp \
360 generic/critsect-generic.cpp \
361 generic/env-generic.cpp \
362 generic/RTDirCreateTemp-generic.cpp \
363 generic/RTEnvDupEx-generic.cpp \
364 generic/RTFileCopy-generic.cpp \
365 generic/RTFileQuerySize-generic.cpp \
366 generic/RTFileReadAll-generic.cpp \
367 generic/RTFileReadAllEx-generic.cpp \
368 generic/RTFileReadAllByHandle-generic.cpp \
369 generic/RTFileReadAllByHandleEx-generic.cpp \
370 generic/RTFileReadAllFree-generic.cpp \
371 generic/RTLogWriteStdErr-generic.cpp \
372 generic/RTLogWriteStdOut-generic.cpp \
373 generic/RTLogWriteUser-generic.cpp \
374 generic/RTTimerLRCreate-generic.cpp \
375 generic/mempool-generic.cpp \
376 generic/semfastmutex-generic.cpp \
377 generic/semxroads-generic.cpp \
378 generic/spinlock-generic.cpp \
379 generic/strcache-stubs-generic.cpp \
380 generic/timerlr-generic.cpp \
381 r3/alloc-ef.cpp \
382 r3/alloc.cpp \
383 r3/dir.cpp \
384 r3/fileio.cpp \
385 r3/fs.cpp \
386 r3/init.cpp \
387 r3/path.cpp \
388 r3/process.cpp \
389 r3/socket.cpp \
390 r3/stream.cpp \
391 r3/test.cpp \
392 r3/testi.cpp \
393 r3/tcp.cpp \
394 r3/generic/semspinmutex-r3-generic.cpp
395
396#if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
397# RuntimeR3_SOURCES += common/time/timesupA.asm
398#else
399 RuntimeR3_SOURCES += common/time/timesupref.cpp
400#endif
401
402RuntimeR3_SOURCES.x86 += \
403 generic/RTMpGetDescription-generic.cpp
404RuntimeR3_SOURCES.amd64 += \
405 generic/RTMpGetDescription-generic.cpp
406RuntimeR3_SOURCES.sparc32 += \
407 generic/RTMpGetDescription-generic-stub.cpp \
408 common/asm/asm-fake.cpp
409RuntimeR3_SOURCES.sparc64 += \
410 generic/RTMpGetDescription-generic-stub.cpp \
411 common/asm/asm-fake.cpp
412
413ifdef IPRT_WITH_LZJB
414 RuntimeR3_SOURCES += common/misc/lzjb.c
415endif
416
417# Some versions of GCC might require this.
418RuntimeR3_SOURCES.x86 += \
419 common/asm/ASMAtomicXchgU64.asm \
420 common/asm/ASMAtomicCmpXchgU64.asm \
421 common/asm/ASMAtomicCmpXchgExU64.asm \
422 common/asm/ASMAtomicReadU64.asm \
423 common/asm/ASMAtomicUoReadU64.asm
424
425ifdef IPRT_WITH_KSTUFF
426 RuntimeR3_SOURCES += \
427 common/ldr/ldrkStuff.cpp
428endif
429
430# VBox specific stuff.
431RuntimeR3_SOURCES += \
432 VBox/RTAssertShouldPanic-vbox.cpp \
433 VBox/log-vbox.cpp
434ifneq ($(KBUILD_TARGET),win)
435RuntimeR3_SOURCES += \
436 common/err/errmsgxpcom.cpp
437endif
438if1of ($(KBUILD_TARGET),freebsd linux netbsd openbsd solaris)
439RuntimeR3_SOURCES += \
440 $(if $(VBOX_WITH_DBUS),VBox/dbus.cpp,)
441endif
442
443RuntimeR3_SOURCES.win = \
444 generic/RTDirExists-generic.cpp \
445 generic/RTDirQueryInfo-generic.cpp \
446 generic/RTDirSetTimes-generic.cpp \
447 generic/RTFileExists-generic.cpp \
448 generic/RTMpGetCurFrequency-generic.cpp \
449 generic/RTMpGetMaxFrequency-generic.cpp \
450 generic/RTRandAdvCreateSystemFaster-generic.cpp \
451 generic/RTRandAdvCreateSystemTruer-generic.cpp \
452 generic/RTSemEventWait-generic.cpp \
453 generic/RTSemEventMultiWait-generic.cpp \
454 generic/RTSemMutexRequest-generic.cpp \
455 generic/RTSemMutexRequestDebug-generic.cpp \
456 generic/mppresent-generic.cpp \
457 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
458 generic/uuid-generic.cpp \
459 generic/RTProcDaemonize-generic.cpp \
460 generic/RTProcIsRunningByName-generic.cpp \
461 generic/RTThreadGetNativeState-generic.cpp \
462 nt/RTErrConvertFromNtStatus.cpp \
463 r3/posix/env-posix.cpp \
464 r3/win/RTSystemQueryOSInfo-win.cpp \
465 r3/win/RTSystemQueryDmiString-win.cpp \
466 r3/win/alloc-win.cpp \
467 r3/win/dir-win.cpp \
468 r3/win/fileio-win.cpp \
469 r3/win/fs-win.cpp \
470 r3/win/ldrNative-win.cpp \
471 r3/win/localipc-win.cpp \
472 r3/win/mp-win.cpp \
473 r3/win/path-win.cpp \
474 r3/win/pipe-win.cpp \
475 r3/win/poll-win.cpp \
476 r3/win/process-win.cpp \
477 r3/win/RTLogWriteDebugger-win.cpp \
478 r3/win/rtProcInitExePath-win.cpp \
479 r3/win/sched-win.cpp \
480 r3/win/semevent-win.cpp \
481 r3/win/semeventmulti-win.cpp \
482 r3/win/semmutex-win.cpp \
483 r3/win/rtFileNativeSetAttributes-win.cpp \
484 r3/win/thread-win.cpp \
485 r3/win/time-win.cpp \
486 r3/win/timer-win.cpp \
487 r3/win/tls-win.cpp \
488 r3/win/utf16locale-win.cpp \
489 r3/win/utf8-win.cpp \
490 r3/win/RTUuidCreate-win.cpp \
491 win/errmsgwin.cpp \
492 win/RTErrConvertFromWin32.cpp
493
494RuntimeR3_SOURCES.win.amd64 = $(RuntimeWin64ASM_SOURCES)
495RuntimeR3_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
496
497RuntimeR3_SOURCES.linux = \
498 generic/RTDirQueryInfo-generic.cpp \
499 generic/RTDirSetTimes-generic.cpp \
500 generic/RTFileMove-generic.cpp \
501 generic/RTLogWriteDebugger-generic.cpp \
502 generic/RTProcDaemonize-generic.cpp \
503 generic/RTTimeLocalNow-generic.cpp \
504 generic/RTTimerCreate-generic.cpp \
505 generic/RTUuidCreate-generic.cpp \
506 generic/mppresent-generic.cpp \
507 generic/utf16locale-generic.cpp \
508 generic/uuid-generic.cpp \
509 r3/linux/RTThreadGetNativeState-linux.cpp \
510 r3/linux/mp-linux.cpp \
511 r3/linux/rtProcInitExePath-linux.cpp \
512 r3/linux/sched-linux.cpp \
513 r3/linux/sysfs.cpp \
514 r3/linux/time-linux.cpp \
515 r3/linux/RTProcIsRunningByName-linux.cpp \
516 r3/linux/RTSystemQueryDmiString-linux.cpp \
517 r3/posix/RTFileQueryFsSizes-posix.cpp \
518 r3/posix/RTSystemQueryOSInfo-posix.cpp \
519 r3/posix/alloc-posix.cpp \
520 r3/posix/dir-posix.cpp \
521 r3/posix/env-posix.cpp \
522 r3/posix/fileio-posix.cpp \
523 r3/posix/filelock-posix.cpp \
524 r3/posix/fs-posix.cpp \
525 r3/posix/ldrNative-posix.cpp \
526 r3/posix/path-posix.cpp \
527 r3/posix/pathhost-posix.cpp \
528 r3/posix/pipe-posix.cpp \
529 r3/posix/poll-posix.cpp \
530 r3/posix/process-posix.cpp \
531 r3/posix/rand-posix.cpp \
532 r3/posix/RTTimeNow-posix.cpp \
533 r3/posix/RTTimeSet-posix.cpp \
534 r3/posix/semrw-posix.cpp \
535 r3/posix/thread-posix.cpp \
536 r3/posix/timelocal-posix.cpp \
537 r3/posix/timer-posix.cpp \
538 r3/posix/tls-posix.cpp \
539 r3/posix/utf8-posix.cpp
540ifdef IPRT_WITH_FUTEX_BASED_SEMS
541 RuntimeR3_SOURCES.linux += \
542 r3/linux/semevent-linux.cpp \
543 r3/linux/semeventmulti-linux.cpp \
544 r3/linux/semmutex-linux.cpp
545else
546 RuntimeR3_SOURCES.linux.x86 += \
547 r3/posix/semevent-posix.cpp \
548 r3/posix/semeventmulti-posix.cpp \
549 r3/posix/semmutex-posix.cpp
550 RuntimeR3_SOURCES.linux.amd64 += \
551 r3/linux/semevent-linux.cpp \
552 r3/linux/semeventmulti-linux.cpp
553 ifdef RT_NEW_LINUX_MUTEX_CODE
554 RuntimeR3_SOURCES.linux.amd64 += \
555 r3/linux/semmutex-linux.cpp
556 else
557 RuntimeR3_SOURCES.linux.amd64 += \
558 r3/posix/semmutex-posix.cpp
559 endif
560endif
561
562RuntimeR3_SOURCES.os2 = \
563 generic/RTDirQueryInfo-generic.cpp \
564 generic/RTDirSetTimes-generic.cpp \
565 generic/RTFileMove-generic.cpp \
566 generic/RTLogWriteDebugger-generic.cpp \
567 generic/RTProcDaemonize-generic.cpp \
568 generic/RTRandAdvCreateSystemFaster-generic.cpp \
569 generic/RTRandAdvCreateSystemTruer-generic.cpp \
570 generic/RTSystemQueryDmiString-generic.cpp \
571 generic/RTTimeLocalNow-generic.cpp \
572 generic/RTTimerCreate-generic.cpp \
573 generic/RTUuidCreate-generic.cpp \
574 generic/mppresent-generic.cpp \
575 generic/RTSemEventWait-generic.cpp \
576 generic/RTSemEventMultiWait-generic.cpp \
577 generic/RTSemMutexRequest-generic.cpp \
578 generic/RTSemMutexRequestDebug-generic.cpp \
579 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
580 generic/timer-generic.cpp \
581 generic/utf16locale-generic.cpp \
582 generic/uuid-generic.cpp \
583 generic/RTMpGetCurFrequency-generic.cpp \
584 generic/RTMpGetMaxFrequency-generic.cpp \
585 generic/RTProcIsRunningByName-generic.cpp \
586 generic/RTThreadGetNativeState-generic.cpp \
587 os2/RTErrConvertFromOS2.cpp \
588 r3/os2/filelock-os2.cpp \
589 r3/os2/mp-os2.cpp \
590 r3/os2/pipe-os2.cpp \
591 r3/os2/poll-os2.cpp \
592 r3/os2/rtProcInitExePath-os2.cpp \
593 r3/os2/sched-os2.cpp \
594 r3/os2/sems-os2.cpp \
595 r3/os2/thread-os2.cpp \
596 r3/os2/time-os2.cpp \
597 r3/posix/RTFileQueryFsSizes-posix.cpp \
598 r3/posix/RTSystemQueryOSInfo-posix.cpp \
599 r3/posix/alloc-posix.cpp \
600 r3/posix/dir-posix.cpp \
601 r3/posix/env-posix.cpp \
602 r3/posix/fileio-posix.cpp \
603 r3/posix/fs-posix.cpp \
604 r3/posix/ldrNative-posix.cpp \
605 r3/posix/path-posix.cpp \
606 r3/posix/pathhost-posix.cpp \
607 r3/posix/process-posix.cpp \
608 r3/posix/RTTimeNow-posix.cpp \
609 r3/posix/RTTimeSet-posix.cpp \
610 r3/posix/timelocal-posix.cpp \
611 r3/posix/utf8-posix.cpp
612
613RuntimeR3_SOURCES.darwin = \
614 darwin/RTErrConvertFromDarwin.cpp \
615 darwin/RTErrConvertFromDarwinCOM.cpp \
616 darwin/RTErrConvertFromDarwinIO.cpp \
617 darwin/RTErrConvertFromDarwinKern.cpp \
618 generic/RTDirQueryInfo-generic.cpp \
619 generic/RTDirSetTimes-generic.cpp \
620 generic/RTFileMove-generic.cpp \
621 generic/RTLogWriteDebugger-generic.cpp \
622 generic/RTProcDaemonize-generic.cpp \
623 generic/RTTimeLocalNow-generic.cpp \
624 generic/RTTimerCreate-generic.cpp \
625 generic/RTUuidCreate-generic.cpp \
626 generic/mppresent-generic.cpp \
627 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
628 generic/timer-generic.cpp \
629 generic/utf16locale-generic.cpp \
630 generic/uuid-generic.cpp\
631 generic/RTProcIsRunningByName-generic.cpp \
632 generic/RTThreadGetNativeState-generic.cpp \
633 r3/darwin/alloc-darwin.cpp \
634 r3/darwin/filelock-darwin.cpp \
635 r3/darwin/mp-darwin.cpp \
636 r3/darwin/pathhost-darwin.cpp \
637 r3/darwin/rtProcInitExePath-darwin.cpp \
638 r3/darwin/RTSystemQueryDmiString-darwin.cpp \
639 r3/darwin/sched-darwin.cpp \
640 r3/darwin/time-darwin.cpp \
641 r3/posix/RTFileQueryFsSizes-posix.cpp \
642 r3/posix/RTSystemQueryOSInfo-posix.cpp \
643 r3/posix/RTTimeSet-posix.cpp \
644 r3/posix/dir-posix.cpp \
645 r3/posix/env-posix.cpp \
646 r3/posix/fileio-posix.cpp \
647 r3/posix/fs-posix.cpp \
648 r3/posix/ldrNative-posix.cpp \
649 r3/posix/path-posix.cpp \
650 r3/posix/pipe-posix.cpp \
651 r3/posix/poll-posix.cpp \
652 r3/posix/process-posix.cpp \
653 r3/posix/rand-posix.cpp \
654 r3/posix/semevent-posix.cpp \
655 r3/posix/semeventmulti-posix.cpp \
656 r3/posix/semmutex-posix.cpp \
657 r3/posix/thread-posix.cpp \
658 r3/posix/timelocal-posix.cpp \
659 r3/posix/tls-posix.cpp \
660 r3/posix/utf8-posix.cpp
661
662## @todo Make BSD sched, implement RTMP*.
663RuntimeR3_SOURCES.freebsd = \
664 generic/RTDirQueryInfo-generic.cpp \
665 generic/RTDirSetTimes-generic.cpp \
666 generic/RTFileMove-generic.cpp \
667 generic/RTLogWriteDebugger-generic.cpp \
668 generic/RTSystemQueryDmiString-generic.cpp \
669 generic/RTTimeLocalNow-generic.cpp \
670 generic/RTTimerCreate-generic.cpp \
671 generic/RTUuidCreate-generic.cpp \
672 generic/mppresent-generic.cpp \
673 generic/sched-generic.cpp \
674 generic/utf16locale-generic.cpp \
675 generic/uuid-generic.cpp \
676 generic/RTMpCpuId-generic.cpp \
677 generic/RTMpCpuIdFromSetIndex-generic.cpp \
678 generic/RTMpCpuIdToSetIndex-generic.cpp \
679 generic/RTMpIsCpuPossible-generic.cpp \
680 generic/RTMpGetMaxCpuId-generic.cpp \
681 generic/RTMpGetOnlineSet-generic.cpp \
682 generic/RTMpGetSet-generic.cpp \
683 generic/RTMpIsCpuOnline-generic.cpp \
684 generic/RTProcDaemonize-generic.cpp \
685 generic/RTProcIsRunningByName-generic.cpp \
686 generic/RTThreadGetNativeState-generic.cpp \
687 r3/freebsd/mp-freebsd.cpp \
688 r3/freebsd/alloc-freebsd.cpp \
689 r3/freebsd/rtProcInitExePath-freebsd.cpp \
690 r3/posix/RTFileQueryFsSizes-posix.cpp \
691 r3/posix/RTSystemQueryOSInfo-posix.cpp \
692 r3/posix/dir-posix.cpp \
693 r3/posix/env-posix.cpp \
694 r3/posix/fileio-posix.cpp \
695 r3/posix/filelock-posix.cpp \
696 r3/posix/fs-posix.cpp \
697 r3/posix/ldrNative-posix.cpp \
698 r3/posix/path-posix.cpp \
699 r3/posix/pathhost-posix.cpp \
700 r3/posix/pipe-posix.cpp \
701 r3/posix/poll-posix.cpp \
702 r3/posix/process-posix.cpp \
703 r3/posix/rand-posix.cpp \
704 r3/posix/RTMpGetCount-posix.cpp \
705 r3/posix/RTTimeNow-posix.cpp \
706 r3/posix/RTTimeSet-posix.cpp \
707 r3/posix/semevent-posix.cpp \
708 r3/posix/semeventmulti-posix.cpp \
709 r3/posix/semmutex-posix.cpp \
710 r3/posix/semrw-posix.cpp \
711 r3/posix/thread-posix.cpp \
712 r3/posix/time-posix.cpp \
713 r3/posix/timelocal-posix.cpp \
714 r3/posix/timer-posix.cpp \
715 r3/posix/tls-posix.cpp \
716 r3/posix/utf8-posix.cpp
717
718RuntimeR3_SOURCES.solaris = \
719 generic/RTDirQueryInfo-generic.cpp \
720 generic/RTDirSetTimes-generic.cpp \
721 generic/RTFileMove-generic.cpp \
722 generic/RTLogWriteDebugger-generic.cpp \
723 generic/RTProcDaemonize-generic.cpp \
724 generic/RTProcIsRunningByName-generic.cpp \
725 generic/RTTimeLocalNow-generic.cpp \
726 generic/RTTimerCreate-generic.cpp \
727 generic/RTUuidCreate-generic.cpp \
728 generic/sched-generic.cpp \
729 generic/utf16locale-generic.cpp \
730 generic/uuid-generic.cpp \
731 generic/RTThreadGetNativeState-generic.cpp \
732 r3/posix/RTFileQueryFsSizes-posix.cpp \
733 r3/posix/RTSystemQueryOSInfo-posix.cpp \
734 r3/posix/dir-posix.cpp \
735 r3/posix/env-posix.cpp \
736 r3/posix/fileio-posix.cpp \
737 r3/posix/filelock-posix.cpp \
738 r3/posix/fs-posix.cpp \
739 r3/posix/ldrNative-posix.cpp \
740 r3/posix/path-posix.cpp \
741 r3/posix/pathhost-posix.cpp \
742 r3/posix/pipe-posix.cpp \
743 r3/posix/poll-posix.cpp \
744 r3/posix/process-posix.cpp \
745 r3/posix/rand-posix.cpp \
746 r3/posix/RTTimeNow-posix.cpp \
747 r3/posix/RTTimeSet-posix.cpp \
748 r3/posix/semevent-posix.cpp \
749 r3/posix/semeventmulti-posix.cpp \
750 r3/posix/semmutex-posix.cpp \
751 r3/posix/semrw-posix.cpp \
752 r3/posix/thread-posix.cpp \
753 r3/posix/time-posix.cpp \
754 r3/posix/timelocal-posix.cpp \
755 r3/posix/timer-posix.cpp \
756 r3/posix/tls-posix.cpp \
757 r3/posix/utf8-posix.cpp \
758 r3/solaris/alloc-solaris.cpp \
759 r3/solaris/mp-solaris.cpp \
760 r3/solaris/rtProcInitExePath-solaris.cpp
761RuntimeR3_SOURCES.solaris.amd64 = \
762 r3/solaris/RTSystemQueryDmiString-solaris.cpp
763RuntimeR3_SOURCES.solaris.x86 = \
764 r3/solaris/RTSystemQueryDmiString-solaris.cpp
765RuntimeR3_SOURCES.solaris.sparc32 = \
766 generic/RTSystemQueryDmiString-generic.cpp
767RuntimeR3_SOURCES.solaris.sparc64 = \
768 generic/RTSystemQueryDmiString-generic.cpp
769
770## PORTME: Porters add their selection of platform specific files for Ring-3 here.
771
772
773#
774# L4 RuntimeR3 subtarget since L4 headers won't work with VBOXR3.
775#
776RuntimeR3L4_TEMPLATE = VBOXR3NP
777RuntimeR3L4_DEFS = IN_RT_R3 IN_SUP_R3 LDR_WITH_NATIVE LDR_WITH_ELF LDR_WITH_PE
778ifneq ($(KBUILD_TARGET_ARCH),amd64)
779RuntimeR3L4_DEFS += __PIC__
780endif
781RuntimeR3L4_INCS = \
782 include \
783 $(L4_INCDIR)
784
785RuntimeR3L4_SOURCES = \
786 generic/fs-stubs-generic.cpp \
787 generic/pathhost-generic.cpp \
788 generic/RTDirQueryInfo-generic.cpp \
789 generic/RTDirSetTimes-generic.cpp \
790 generic/RTFileMove-generic.cpp \
791 generic/RTLogWriteDebugger-generic.cpp \
792 generic/RTProcDaemonize-generic.cpp \
793 generic/RTSystemQueryOSInfo-generic.cpp \
794 generic/RTSystemQueryDmiString-generic.cpp \
795 generic/RTTimeLocalNow-generic.cpp \
796 generic/RTUuidCreate-generic.cpp \
797 generic/mppresent-generic.cpp \
798 generic/sched-generic.cpp \
799 generic/RTSemEventWait-generic.cpp \
800 generic/RTSemEventMultiWait-generic.cpp \
801 generic/RTSemMutexRequest-generic.cpp \
802 generic/RTSemMutexRequestDebug-generic.cpp \
803 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
804 generic/utf16locale-generic.cpp \
805 generic/uuid-generic.cpp \
806 generic/RTProcIsRunningByName-generic.cpp \
807 generic/RTThreadGetNativeState-generic.cpp \
808 l4/l4-errno.cpp \
809 l4/rtProcInitExePath-l4.cpp \
810 l4/process-l4env.cpp \
811 l4/sems-l4env.cpp \
812 l4/thread-l4env.cpp \
813 l4/timer-l4env.cpp \
814 l4/utf8-l4env.cpp \
815 r3/posix/RTFileQueryFsSizes-posix.cpp \
816 r3/posix/alloc-posix.cpp \
817 r3/posix/dir-posix.cpp \
818 r3/posix/env-posix.cpp \
819 r3/posix/fileio-posix.cpp \
820 r3/posix/filelock-posix.cpp \
821 r3/posix/ldrNative-posix.cpp \
822 r3/posix/path-posix.cpp \
823 r3/posix/rand-posix.cpp \
824 r3/posix/RTTimeNow-posix.cpp \
825 r3/posix/RTTimeSet-posix.cpp \
826 r3/posix/time-posix.cpp \
827 r3/posix/timelocal-posix.cpp
828
829
830#
831# RuntimeGuestR3 - Guest Additions Runtime (static/exe).
832# (The KBUILD_HOST inheritance here is for l4 cross building the linux
833# additions, while .x86 is for cross building x86 while targeting amd64.)
834#
835RuntimeGuestR3_TEMPLATE := VBOXGUESTR3LIB
836## @todo change this to EXTEND the RuntimeR3 target.
837RuntimeGuestR3_SDKS.win := $(RuntimeR3_SDKS.win)
838RuntimeGuestR3_DEFS := $(filter-out RTCRITSECT_STRICT RT_NO_GIP, $(RuntimeR3_DEFS))
839RuntimeGuestR3_DEFS.$(KBUILD_TARGET) := $(RuntimeR3_DEFS.$(KBUILD_TARGET))
840RuntimeGuestR3_DEFS.$(KBUILD_HOST) := $(RuntimeR3_DEFS.$(KBUILD_HOST))
841RuntimeGuestR3_INCS := $(RuntimeR3_INCS)
842RuntimeGuestR3_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
843RuntimeGuestR3_INCS.$(KBUILD_HOST) := $(RuntimeR3_INCS.$(KBUILD_HOST))
844RuntimeGuestR3_SOURCES := $(filter-out \
845 common/time/timesupref.cpp \
846 common/time/timesupA.asm \
847 common/time/timesup.cpp \
848 generic/RTLogWriteUser-generic.cpp \
849 , $(RuntimeR3_SOURCES))
850RuntimeGuestR3_SOURCES += \
851 common/time/timesysalias.cpp \
852 VBox/logbackdoor.cpp
853RuntimeGuestR3_SOURCES.$(KBUILD_TARGET) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET))
854RuntimeGuestR3_SOURCES.$(KBUILD_HOST) := $(RuntimeR3_SOURCES.$(KBUILD_HOST))
855RuntimeGuestR3_SOURCES.$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET_ARCH))
856RuntimeGuestR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
857RuntimeGuestR3_SOURCES.$(KBUILD_HOST).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_HOST).$(KBUILD_TARGET_ARCH))
858
859
860#
861# RuntimeGuestR3Shared - Guest Additions Runtime (static/dll).
862#
863RuntimeGuestR3Shared_TEMPLATE := VBOXGUESTR3DLL
864RuntimeGuestR3Shared_EXTENDS := RuntimeGuestR3
865RuntimeGuestR3Shared_INST = $(INST_ADDITIONS_LIB)
866
867
868#
869# RuntimeGuestR3Mini - Minimal Guest Additions Runtime which does not require
870# initialization and can be linked into an .so. Intended
871# for X11 drivers, GRADD and similar.
872#
873RuntimeGuestR3Mini_TEMPLATE := VBOXGUESTR3DLL
874## @todo change this to EXTEND the RuntimeGuestR3 target.
875RuntimeGuestR3Mini_INST := $(INST_ADDITIONS_LIB)
876RuntimeGuestR3Mini_SDKS.win := $(RuntimeR3_SDKS.win)
877RuntimeGuestR3Mini_DEFS := $(filter-out RTCRITSECT_STRICT RT_NO_GIP, $(RuntimeR3_DEFS)) RT_MINI
878RuntimeGuestR3Mini_DEFS.$(KBUILD_TARGET) := $(RuntimeR3_DEFS.$(KBUILD_TARGET))
879RuntimeGuestR3Mini_DEFS.$(KBUILD_HOST) := $(RuntimeR3_DEFS.$(KBUILD_HOST))
880RuntimeGuestR3Mini_INCS := $(RuntimeR3_INCS)
881RuntimeGuestR3Mini_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
882RuntimeGuestR3Mini_INCS.$(KBUILD_HOST) := $(RuntimeR3_INCS.$(KBUILD_HOST))
883RuntimeGuestR3Mini_SOURCES = \
884 common/alloc/alloc.cpp \
885 common/err/errmsg.cpp \
886 common/err/errmsgxpcom.cpp \
887 common/err/RTErrConvertFromErrno.cpp \
888 common/log/logformat.cpp \
889 common/misc/RTAssertMsg1Weak.cpp \
890 common/misc/RTAssertMsg2.cpp \
891 common/misc/RTAssertMsg2Add.cpp \
892 common/misc/RTAssertMsg2AddWeak.cpp \
893 common/misc/RTAssertMsg2AddWeakV.cpp \
894 common/misc/RTAssertMsg2Weak.cpp \
895 common/misc/RTAssertMsg2WeakV.cpp \
896 common/misc/assert.cpp \
897 common/misc/buildconfig.cpp \
898 common/misc/sanity-c.c \
899 common/misc/sanity-cpp.cpp \
900 common/path/rtPathVolumeSpecLen.cpp \
901 common/path/RTPathAbsDup.cpp \
902 common/path/RTPathAbsEx.cpp \
903 common/path/RTPathAbsExDup.cpp \
904 common/path/RTPathAppend.cpp \
905 common/path/RTPathExt.cpp \
906 common/path/RTPathFilename.cpp \
907 common/path/RTPathHaveExt.cpp \
908 common/path/RTPathHavePath.cpp \
909 common/path/RTPathJoin.cpp \
910 common/path/RTPathParse.cpp \
911 common/path/RTPathRealDup.cpp \
912 common/path/RTPathStripExt.cpp \
913 common/path/RTPathStripFilename.cpp \
914 common/path/RTPathStripTrailingSlash.cpp \
915 common/string/RTStrCmp.cpp \
916 common/string/RTStrCopy.cpp \
917 common/string/RTStrCopyEx.cpp \
918 common/string/RTStrNCmp.cpp \
919 common/string/RTStrNLen.cpp \
920 common/string/RTStrNLenEx.cpp \
921 common/string/RTStrStr.cpp \
922 common/string/straprintf.cpp \
923 common/string/strformat.cpp \
924 common/string/strformatrt.cpp \
925 common/string/strformattype.cpp \
926 common/string/stringalloc.cpp \
927 common/string/strprintf.cpp \
928 common/string/strtonum.cpp \
929 common/string/unidata.cpp \
930 common/string/utf-8.cpp \
931 common/string/utf-8-case.cpp \
932 common/string/utf-16.cpp \
933 common/table/avlpv.cpp \
934 generic/pathhost-generic.cpp \
935 generic/RTAssertShouldPanic-generic.cpp \
936 r3/alloc.cpp \
937 r3/alloc-ef.cpp \
938 r3/fileio.cpp \
939 r3/fs.cpp
940RuntimeGuestR3Mini_SOURCES.freebsd = \
941 r3/posix/alloc-posix.cpp \
942 r3/posix/env-posix.cpp \
943 r3/posix/fileio-posix.cpp \
944 r3/posix/path-posix.cpp \
945 r3/posix/utf8-posix.cpp
946RuntimeGuestR3Mini_SOURCES.linux = \
947 r3/posix/alloc-posix.cpp \
948 r3/posix/env-posix.cpp \
949 r3/posix/fileio-posix.cpp \
950 r3/posix/path-posix.cpp \
951 r3/posix/utf8-posix.cpp
952RuntimeGuestR3Mini_SOURCES.solaris = \
953 r3/posix/alloc-posix.cpp \
954 r3/posix/env-posix.cpp \
955 r3/posix/fileio-posix.cpp \
956 r3/posix/path-posix.cpp \
957 r3/posix/utf8-posix.cpp
958RuntimeGuestR3Mini_SOURCES.win = \
959 r3/win/alloc-win.cpp \
960 r3/win/fileio-win.cpp \
961 r3/win/path-win.cpp \
962 r3/win/utf8-win.cpp \
963 win/errmsgwin.cpp \
964 win/RTErrConvertFromWin32.cpp
965
966# VBox specific stuff.
967RuntimeGuestR3Mini_SOURCES += \
968 VBox/logbackdoor.cpp \
969 VBox/logbackdoor-redirect.cpp
970
971
972#
973# RuntimeLnxHostR3 Linux host program runtime
974# (Only used when building L4.)
975#
976RuntimeLnxHostR3_TEMPLATE = VBOXLNXHOSTR3LIB
977RuntimeLnxHostR3_DEFS = IN_RT_R3 IN_SUP_R3 RT_WITH_VBOX RT_NO_GIP
978RuntimeLnxHostR3_SOURCES = \
979 $(RuntimeR3_SOURCES.linux.$(KBUILD_TARGET_ARCH)) \
980 $(RuntimeR3_SOURCES.linux) \
981 $(RuntimeR3_SOURCES)
982RuntimeLnxHostR3_INCS = \
983 $(RuntimeR3_INCS.linux.$(KBUILD_TARGET_ARCH)) \
984 $(RuntimeR3_INCS.linux) \
985 $(RuntimeR3_INCS)
986
987
988#
989# VBoxRT - Shared Object / DLL version.
990#
991VBoxRT_TEMPLATE = VBoxR3Dll
992VBoxRT_SDKS = VBOX_OPENSSL VBOX_LIBXML2 VBOX_BOOST
993ifdef VBOX_WITH_LIBCURL
994 VBoxRT_SDKS += VBOX_LIBCURL
995endif
996VBoxRT_SDKS.win = WINPSDK W2K3DDK VBOX_NTDLL
997if1of ($(KBUILD_TARGET)$(VBOX_WITH_HARDENING), darwin win)
998VBoxRT_INST = $(INST_DLL) $(INST_TESTCASE)
999endif
1000VBoxRT_DEFS = $(filter-out RT_NO_GIP,$(RuntimeR3_DEFS)) IN_SUP_R3 IN_SUP_R3
1001ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1002 VBoxRT_DEFS += RT_NO_GIP
1003endif
1004VBoxRT_DEFS.$(KBUILD_TYPE) = $(RuntimeR3_DEFS.$(KBUILD_TYPE))
1005VBoxRT_SOURCES = \
1006 VBox/VBoxRTDeps.cpp \
1007 $(filter-out common/checksum/crc32.cpp, $(RuntimeR3_SOURCES))
1008VBoxRT_SOURCES += \
1009 r3/xml.cpp \
1010 common/checksum/RTSha1Digest.cpp \
1011 common/checksum/crc32-zlib.cpp \
1012 common/checksum/manifest.cpp \
1013 common/checksum/sha1.cpp \
1014 common/checksum/sha1str.cpp \
1015 common/checksum/sha256.cpp \
1016 common/checksum/sha256str.cpp \
1017 common/checksum/sha512.cpp \
1018 common/checksum/sha512str.cpp
1019ifdef VBOX_WITH_LIBCURL
1020 VBoxRT_SOURCES += common/misc/s3.cpp
1021endif
1022VBoxRT_SOURCES.$(KBUILD_TARGET) = $(RuntimeR3_SOURCES.$(KBUILD_TARGET))
1023VBoxRT_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) = $(RuntimeR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
1024VBoxRT_SOURCES.$(KBUILD_TARGET_ARCH) = $(RuntimeR3_SOURCES.$(KBUILD_TARGET_ARCH))
1025VBoxRT_SOURCES.win += \
1026 r3/win/dllmain-win.cpp \
1027 r3/win/fileaio-win.cpp \
1028 $(VBoxRT_0_OUTDIR)/VBoxRT.def
1029VBoxRT_SOURCES.linux += \
1030 r3/linux/fileaio-linux.cpp
1031VBoxRT_SOURCES.solaris += \
1032 r3/solaris/fileaio-solaris.cpp
1033VBoxRT_SOURCES.darwin += \
1034 r3/posix/fileaio-posix.cpp
1035VBoxRT_SOURCES.freebsd += \
1036 r3/freebsd/fileaio-freebsd.cpp
1037VBoxRT_INCS = $(RuntimeR3_INCS)
1038VBoxRT_INCS.$(KBUILD_TARGET) = $(RuntimeR3_INCS.$(KBUILD_TARGET))
1039VBoxRT_INCS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) = $(RuntimeR3_INCS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
1040VBoxRT_LIBS = \
1041 $(PATH_LIB)/VBox-liblzf$(VBOX_SUFF_LIB) \
1042 $(SDK_VBOX_ZLIB_LIBS)
1043if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1044VBoxRT_LIBS += \
1045 $(PATH_LIB)/SUPR3$(VBOX_SUFF_LIB)
1046endif
1047ifdef IPRT_WITH_KSTUFF
1048 VBoxRT_LIBS += \
1049 $(PATH_LIB)/VBox-kStuff$(VBOX_SUFF_LIB)
1050endif
1051ifndef SDK_VBOX_LIBXML2_LIBS
1052 VBoxRT_LIBS += \
1053 $(PATH_LIB)/VBox-libxml2$(VBOX_SUFF_LIB)
1054endif
1055ifndef SDK_VBOX_OPENSSL_LIBS
1056 VBoxRT_LIBS += \
1057 $(PATH_LIB)/VBox-libcrypto$(VBOX_SUFF_LIB)
1058endif
1059ifdef IPRT_WITH_LZO
1060 VBoxRT_LIBS += lzo2
1061endif
1062VBoxRT_LIBS.darwin = \
1063 iconv
1064VBoxRT_LIBS.freebsd = \
1065 iconv \
1066 rt
1067VBoxRT_LIBS.solaris = \
1068 kstat
1069ifn1of ($(KBUILD_TARGET_ARCH), sparc32 sparc64)
1070 # SMBIOS not available on Solaris SPARC.
1071 VBoxRT_LIBS.solaris += smbios
1072endif
1073VBoxRT_LIBS.win = \
1074 $(PATH_SDK_W2K3DDK_LIB)/vccomsup.lib \
1075 $(PATH_SDK_W2K3DDK_LIB)/wbemuuid.lib
1076VBoxRT_LDFLAGS.darwin = -framework IOKit -framework CoreFoundation -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxRT.dylib
1077ifdef VBOX_USE_VCC80
1078VBoxRT_LDFLAGS.win = /MANIFEST
1079endif
1080VBoxRT_LDFLAGS.l4 = \
1081 -Wl,-whole-archive \
1082 $(PATH_LIB)/RuntimeR3L4$(VBOX_SUFF_LIB) \
1083 -Wl,-no-whole-archive
1084ifeq ($(KBUILD_TARGET),l4)
1085VBoxRT_LIBS += \
1086 $(L4_LIBDIR)/libl4sys.a \
1087 $(L4_LIBDIR)/libl4sys.p.a
1088endif
1089VBoxRT_LIBS.l4 = \
1090 $(PATH_LIB)/RuntimeR3L4$(VBOX_SUFF_LIB)
1091
1092if1of ($(DLLS), VBoxRT)
1093$$(VBoxRT_0_OUTDIR)/VBoxRT.def: \
1094 $(PATH_SUB_CURRENT)/r3/win/VBoxRT-$$(if-expr $$(KBUILD_TARGET_ARCH) == amd64,win64,win32).def \
1095 $(PATH_SUB_CURRENT)/r3/win/$(if $(VBOX_OSE),VBoxRT-openssl-ose.def,VBoxRT-openssl.def)
1096 $(RM) -f -- $@
1097 $(REDIRECT) -wto $@ -- $(CAT_EXT) $^
1098endif
1099
1100
1101#
1102# HACK ALLERT! Make testcase run during build on SELinux boxes.
1103# Create a dummy DLL that ensure that VBoxRT is installed
1104# during the DLL pass and cleaned up later.
1105#
1106ifeq ($(KBUILD_TARGET),linux)
1107 if1of (VBoxRT, $(DLLS))
1108 ifneq ($(wildcard /usr/bin/chcon),)
1109VBoxRT_NOINST = true
1110
1111DLLS += VBoxRTDummy
1112VBoxRTDummy_TEMPLATE = VBOXR3
1113VBoxRTDummy_NOINST = true
1114VBoxRTDummy_LIBS = $(PATH_BIN)/VBoxRT.so
1115VBoxRTDummy_CLEAN= $(PATH_BIN)/VBoxRT.so
1116BLDDIRS += $(PATH_BIN)
1117
1118$(PATH_BIN)/VBoxRT.so: $$(TARGET_VBoxRT) | $$(dir $$@)
1119 $(INSTALL) $< $@
1120 chcon -t texrel_shlib_t $@ || true
1121
1122VBoxRT:: VBoxRTDummy
1123 endif # chcon present.
1124 endif # building VBoxRT
1125endif # linux
1126
1127#
1128# RuntimeR3NoCRTGCC - CRT replacement lib for VBoxREM.
1129# This is used together with VBoxRT.
1130#
1131## @todo the *_alias.c stuff is busted, remove and use RT_WITH_NOCRT_ALIASES instead.
1132RuntimeR3NoCRTGCC_TEMPLATE = VBOXNOCRTGCC
1133RuntimeR3NoCRTGCC_LIBSUFF = $(VBOX_SUFF_LIB)
1134ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1135 RuntimeR3NoCRTGCC_DEFS += RT_NO_GIP
1136endif
1137RuntimeR3NoCRTGCC_INCS = include
1138RuntimeR3NoCRTGCC_SOURCES = \
1139 common/misc/sanity-cpp.cpp \
1140 common/misc/sanity-c.c \
1141 \
1142 $(RuntimeNoCrt_SOURCES)
1143
1144if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1145RuntimeR3NoCRTGCC_SOURCES += \
1146 common/math/ceill.asm \
1147 common/math/cosl.asm \
1148 common/math/fabs.asm \
1149 common/math/fabsf.asm \
1150 common/math/fabsl.asm \
1151 common/math/floor.asm \
1152 common/math/floorf.asm \
1153 common/math/floorl.asm \
1154 common/math/ldexpl.asm \
1155 common/math/llrint.asm \
1156 common/math/llrintf.asm \
1157 common/math/llrintl.asm \
1158 common/math/logl.asm \
1159 common/math/lrint.asm \
1160 common/math/lrintf.asm \
1161 common/math/lrintl.asm \
1162 common/math/remainder.asm \
1163 common/math/remainderf.asm \
1164 common/math/remainderl.asm \
1165 common/math/sinl.asm \
1166 common/math/tanl.asm \
1167 common/math/trunc.asm \
1168 common/math/truncf.asm \
1169 common/math/truncl.asm \
1170 \
1171 common/string/memchr_alias.c \
1172 common/string/memcmp_alias.c \
1173 common/string/memcpy_alias.c \
1174 common/string/memmove_alias.c \
1175 common/string/memset_alias.c \
1176 common/string/strchr_alias.c \
1177 common/string/strcmp_alias.c \
1178 common/string/strlen_alias.c
1179endif
1180
1181RuntimeR3NoCRTGCC_SOURCES.x86 = \
1182 common/math/x86/fenv-x86.c \
1183 common/math/gcc/adddi3.c \
1184 common/math/gcc/anddi3.c \
1185 common/math/gcc/ashldi3.c \
1186 common/math/gcc/ashrdi3.c \
1187 common/math/gcc/cmpdi2.c \
1188 common/math/gcc/divdi3.c \
1189 common/math/gcc/iordi3.c \
1190 common/math/gcc/lshldi3.c \
1191 common/math/gcc/lshrdi3.c \
1192 common/math/gcc/moddi3.c \
1193 common/math/gcc/muldi3.c \
1194 common/math/gcc/negdi2.c \
1195 common/math/gcc/notdi2.c \
1196 common/math/gcc/qdivrem.c \
1197 common/math/gcc/subdi3.c \
1198 common/math/gcc/ucmpdi2.c \
1199 common/math/gcc/udivdi3.c \
1200 common/math/gcc/umoddi3.c \
1201 common/math/gcc/xordi3.c
1202
1203
1204## @todo stop using the old memcpy.c and memset.c code.
1205
1206#
1207# RuntimeR0 - Ring-0 library for VMMR0.
1208#
1209RuntimeR0_TEMPLATE = VBoxR0
1210RuntimeR0_DEFS = IN_RT_R0 RT_WITH_VBOX
1211ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
1212 RuntimeR0_DEFS += RT_NO_GIP
1213endif
1214RuntimeR0_INCS = include
1215RuntimeR0_SOURCES = \
1216 common/log/logellipsis.cpp \
1217 common/log/logrelellipsis.cpp \
1218 common/log/logcom.cpp \
1219 common/log/logformat.cpp \
1220 common/misc/RTAssertMsg1Weak.cpp \
1221 common/misc/RTAssertMsg2.cpp \
1222 common/misc/RTAssertMsg2Add.cpp \
1223 common/misc/RTAssertMsg2AddWeak.cpp \
1224 common/misc/RTAssertMsg2AddWeakV.cpp \
1225 common/misc/RTAssertMsg2Weak.cpp \
1226 common/misc/RTAssertMsg2WeakV.cpp \
1227 common/misc/buildconfig.cpp \
1228 common/misc/once.cpp \
1229 common/misc/sanity-c.c \
1230 common/misc/sanity-cpp.cpp \
1231 common/misc/term.cpp \
1232 common/string/strncmp.cpp \
1233 common/string/strpbrk.cpp \
1234 common/table/avlgcptr.cpp \
1235 common/table/avlhcphys.cpp \
1236 common/table/avllu32.cpp \
1237 common/table/avlogcphys.cpp \
1238 common/table/avlogcptr.cpp \
1239 common/table/avlohcphys.cpp \
1240 common/table/avloioport.cpp \
1241 common/table/avlpv.cpp \
1242 common/table/avlrogcphys.cpp \
1243 common/table/avlrogcptr.cpp \
1244 common/table/avlroioport.cpp \
1245 common/table/avlroogcptr.cpp \
1246 common/table/avlu32.cpp \
1247 common/table/avlou32.cpp \
1248 common/time/timesup.cpp \
1249 generic/RTAssertShouldPanic-generic.cpp \
1250 \
1251 $(RuntimeNoCrt_SOURCES)
1252
1253ifneq ($(KBUILD_TARGET),win)
1254RuntimeR0_SOURCES += \
1255 common/checksum/crc32.cpp \
1256 common/checksum/crc64.cpp \
1257 common/checksum/md5.cpp \
1258 common/checksum/ipv4.cpp \
1259 common/checksum/ipv6.cpp \
1260 common/misc/handletable.cpp \
1261 common/misc/handletablectx.cpp \
1262 common/misc/handletablesimple.cpp \
1263 common/string/strformat.cpp \
1264 common/string/strformatrt.cpp \
1265 common/string/strformattype.cpp \
1266 common/string/strprintf.cpp
1267endif
1268
1269if1of ($(KBUILD_TARGET), darwin solaris freebsd)
1270RuntimeR0_SOURCES += \
1271 common/math/gcc/adddi3.c \
1272 common/math/gcc/anddi3.c \
1273 common/math/gcc/ashldi3.c \
1274 common/math/gcc/ashrdi3.c \
1275 common/math/gcc/cmpdi2.c \
1276 common/math/gcc/divdi3.c \
1277 common/math/gcc/iordi3.c \
1278 common/math/gcc/lshldi3.c \
1279 common/math/gcc/lshrdi3.c \
1280 common/math/gcc/moddi3.c \
1281 common/math/gcc/muldi3.c \
1282 common/math/gcc/negdi2.c \
1283 common/math/gcc/notdi2.c \
1284 common/math/gcc/qdivrem.c \
1285 common/math/gcc/subdi3.c \
1286 common/math/gcc/ucmpdi2.c \
1287 common/math/gcc/udivdi3.c \
1288 common/math/gcc/umoddi3.c \
1289 common/math/gcc/xordi3.c
1290endif
1291
1292#if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
1293# RuntimeR0_SOURCES += common/time/timesupA.asm
1294#else
1295 RuntimeR0_SOURCES += common/time/timesupref.cpp
1296#endif
1297
1298RuntimeR0_SOURCES.win.amd64 = $(RuntimeWin64ASM_SOURCES)
1299RuntimeR0_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
1300RuntimeR0_SOURCES.win = \
1301 nt/NtProcessStartup-stub.cpp
1302
1303RuntimeR0_SOURCES.os2 = \
1304 os2/RTErrConvertFromOS2.cpp \
1305 os2/sys0.asm
1306
1307
1308#
1309# RuntimeR0Stub - Ring-0 context startup stub for Windows.
1310#
1311RuntimeR0Stub_TEMPLATE = VBoxR0
1312RuntimeR0Stub_SOURCES.win = \
1313 nt/NtProcessStartup-stub.cpp
1314
1315
1316#
1317# RuntimeR0Drv - Ring-0 library for host drivers.
1318#
1319RuntimeR0Drv_TEMPLATE = VBOXR0DRV
1320RuntimeR0Drv_SDKS.win = W2K3DDK WINPSDKINCS
1321RuntimeR0Drv_DEFS = IN_RT_R0 RT_WITH_VBOX RT_WITHOUT_NOCRT_WRAPPERS RT_NO_EXPORT_SYMBOL
1322RuntimeR0Drv_DEFS.win = IN_SUP_R0
1323RuntimeR0Drv_DEFS.linux = MODULE KBUILD_MODNAME=KBUILD_STR\(vboxdrv\) KBUILD_BASENAME=KBUILD_STR\(vboxdrv\) IN_SUP_R0
1324
1325RuntimeR0Drv_INCS := $(PATH_SUB_CURRENT) include
1326RuntimeR0Drv_INCS.freebsd = \
1327 $(PATH_INS)/gen-sys-hdrs
1328RuntimeR0Drv_INCS.linux = \
1329 r0drv/linux
1330RuntimeR0Drv_INCS.solaris = \
1331 r0drv/solaris/vbi/i86pc \
1332 r0drv/solaris/vbi/i86pc/sys
1333
1334RuntimeR0Drv_SOURCES = \
1335 common/alloc/alloc.cpp \
1336 common/alloc/heapsimple.cpp \
1337 common/alloc/heapoffset.cpp \
1338 common/checksum/crc32.cpp \
1339 common/checksum/crc64.cpp \
1340 common/checksum/md5.cpp \
1341 common/checksum/ipv4.cpp \
1342 common/checksum/ipv6.cpp \
1343 common/log/log.cpp \
1344 common/log/logellipsis.cpp \
1345 common/log/logrel.cpp \
1346 common/log/logrelellipsis.cpp \
1347 common/log/logcom.cpp \
1348 common/log/logformat.cpp \
1349 common/misc/RTAssertMsg1Weak.cpp \
1350 common/misc/RTAssertMsg2.cpp \
1351 common/misc/RTAssertMsg2Add.cpp \
1352 common/misc/RTAssertMsg2AddWeak.cpp \
1353 common/misc/RTAssertMsg2AddWeakV.cpp \
1354 common/misc/RTAssertMsg2Weak.cpp \
1355 common/misc/RTAssertMsg2WeakV.cpp \
1356 common/misc/assert.cpp \
1357 common/misc/buildconfig.cpp \
1358 common/misc/handletable.cpp \
1359 common/misc/handletablectx.cpp \
1360 common/misc/handletablesimple.cpp \
1361 common/misc/once.cpp \
1362 common/misc/sanity-c.c \
1363 common/misc/sanity-cpp.cpp \
1364 common/misc/term.cpp \
1365 common/path/rtPathVolumeSpecLen.cpp \
1366 common/path/RTPathAbsDup.cpp \
1367 common/path/RTPathAbsEx.cpp \
1368 common/path/RTPathAbsExDup.cpp \
1369 common/path/RTPathAppend.cpp \
1370 common/path/RTPathExt.cpp \
1371 common/path/RTPathFilename.cpp \
1372 common/path/RTPathHaveExt.cpp \
1373 common/path/RTPathHavePath.cpp \
1374 common/path/RTPathParse.cpp \
1375 common/path/RTPathRealDup.cpp \
1376 common/path/RTPathStripExt.cpp \
1377 common/path/RTPathStripFilename.cpp \
1378 common/path/RTPathStripTrailingSlash.cpp \
1379 common/rand/rand.cpp \
1380 common/rand/randadv.cpp \
1381 common/rand/randparkmiller.cpp \
1382 common/string/RTStrCmp.cpp \
1383 common/string/RTStrCopy.cpp \
1384 common/string/RTStrCopyEx.cpp \
1385 common/string/RTStrNCmp.cpp \
1386 common/string/RTStrNLen.cpp \
1387 common/string/RTStrNLenEx.cpp \
1388 common/string/strformat.cpp \
1389 common/string/strformatrt.cpp \
1390 common/string/strformattype.cpp \
1391 common/string/strprintf.cpp \
1392 common/string/strtonum.cpp \
1393 common/string/stringalloc.cpp \
1394 common/string/utf-16.cpp \
1395 common/string/utf-8.cpp \
1396 common/table/avlpv.cpp \
1397 generic/RTLogWriteStdErr-stub-generic.cpp \
1398 generic/RTLogWriteUser-generic.cpp \
1399 generic/RTRandAdvCreateSystemFaster-generic.cpp \
1400 generic/uuid-generic.cpp \
1401 r0drv/alloc-r0drv.cpp \
1402 r0drv/initterm-r0drv.cpp \
1403 r0drv/generic/semspinmutex-r0drv-generic.c \
1404 VBox/log-vbox.cpp \
1405
1406## @todo: Linking against RuntimeR0Drv on Linux will result in unresolved external
1407## references to several string functions (e.g. strlen). We could include the
1408## missing functions here but our own implementations conflict with declarations
1409## of some Linux kernels (inline versus not inline, size_t versus unsigned int).
1410##
1411## The prototypes for the unresolved externals are declared in <linux/string.h>.
1412## This file is not included with extern "C" { ... } and therefore the function
1413## prototypes are mangled during C++ compilation. That's why we have to provide
1414## implementations with mangled function names.
1415##
1416## bird: Why don't we just extern "C" {} that file then?
1417RuntimeR0Drv_SOURCES.linux = \
1418 common/string/strpbrk.cpp \
1419 common/err/RTErrConvertToErrno.cpp \
1420 common/err/RTErrConvertFromErrno.cpp \
1421 generic/RTAssertShouldPanic-generic.cpp \
1422 generic/RTLogWriteStdOut-stub-generic.cpp \
1423 generic/mppresent-generic.cpp \
1424 r0drv/linux/alloc-r0drv-linux.c \
1425 r0drv/linux/assert-r0drv-linux.c \
1426 r0drv/linux/initterm-r0drv-linux.c \
1427 r0drv/linux/memobj-r0drv-linux.c \
1428 r0drv/linux/memuserkernel-r0drv-linux.c \
1429 r0drv/linux/mp-r0drv-linux.c \
1430 r0drv/linux/mpnotification-r0drv-linux.c \
1431 r0drv/linux/process-r0drv-linux.c \
1432 r0drv/linux/RTLogWriteDebugger-r0drv-linux.c \
1433 r0drv/linux/semevent-r0drv-linux.c \
1434 r0drv/linux/semeventmulti-r0drv-linux.c \
1435 r0drv/linux/semfastmutex-r0drv-linux.c \
1436 r0drv/linux/semmutex-r0drv-linux.c \
1437 r0drv/linux/spinlock-r0drv-linux.c \
1438 r0drv/linux/thread-r0drv-linux.c \
1439 r0drv/linux/thread2-r0drv-linux.c \
1440 r0drv/linux/time-r0drv-linux.c \
1441 r0drv/linux/timer-r0drv-linux.c \
1442 r0drv/memobj-r0drv.cpp \
1443 r0drv/mpnotification-r0drv.c \
1444 r0drv/powernotification-r0drv.c
1445## @todo thread2-r0drv-linux.c and assert-r0drv-linux.c
1446
1447RuntimeR0Drv_SOURCES.win = \
1448 common/misc/thread.cpp \
1449 common/string/memcmp.asm \
1450 common/string/memchr.asm \
1451 common/string/memcpy.asm \
1452 common/string/memset.asm \
1453 common/string/memmove.asm \
1454 common/string/strlen.asm \
1455 common/string/strncmp.cpp \
1456 common/string/strpbrk.cpp \
1457 generic/RTAssertShouldPanic-generic.cpp \
1458 generic/RTLogWriteStdOut-stub-generic.cpp \
1459 generic/mppresent-generic.cpp \
1460 nt/RTErrConvertFromNtStatus.cpp \
1461 r0drv/memobj-r0drv.cpp \
1462 r0drv/mpnotification-r0drv.c \
1463 r0drv/powernotification-r0drv.c \
1464 r0drv/nt/alloc-r0drv-nt.cpp \
1465 r0drv/nt/assert-r0drv-nt.cpp \
1466 r0drv/nt/initterm-r0drv-nt.cpp \
1467 r0drv/nt/memobj-r0drv-nt.cpp \
1468 r0drv/nt/memuserkernel-r0drv-nt.cpp \
1469 r0drv/nt/mp-r0drv-nt.cpp \
1470 r0drv/nt/mpnotification-r0drv-nt.cpp \
1471 r0drv/nt/process-r0drv-nt.cpp \
1472 r0drv/nt/RTLogWriteDebugger-r0drv-nt.cpp \
1473 r0drv/nt/semevent-r0drv-nt.cpp \
1474 r0drv/nt/semeventmulti-r0drv-nt.cpp \
1475 r0drv/nt/semfastmutex-r0drv-nt.cpp \
1476 r0drv/nt/semmutex-r0drv-nt.cpp \
1477 r0drv/nt/spinlock-r0drv-nt.cpp \
1478 r0drv/nt/thread-r0drv-nt.cpp \
1479 r0drv/nt/thread2-r0drv-nt.cpp \
1480 r0drv/nt/time-r0drv-nt.cpp \
1481 r0drv/nt/timer-r0drv-nt.cpp
1482
1483RuntimeR0Drv_SOURCES.win.amd64 = $(RuntimeWin64ASM_SOURCES)
1484RuntimeR0Drv_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
1485
1486RuntimeR0Drv_SOURCES.darwin = \
1487 common/err/RTErrConvertFromErrno.cpp \
1488 common/misc/thread.cpp \
1489 common/string/memchr.asm \
1490 common/string/strpbrk.cpp \
1491 darwin/RTErrConvertFromDarwin.cpp \
1492 darwin/RTErrConvertFromDarwinIO.cpp \
1493 darwin/RTErrConvertFromDarwinKern.cpp \
1494 generic/RTAssertShouldPanic-generic.cpp \
1495 generic/RTTimerCreate-generic.cpp \
1496 generic/mppresent-generic.cpp \
1497 generic/timer-generic.cpp \
1498 r0drv/generic/mpnotification-r0drv-generic.cpp \
1499 r0drv/darwin/alloc-r0drv-darwin.cpp \
1500 r0drv/darwin/assert-r0drv-darwin.cpp \
1501 r0drv/darwin/initterm-r0drv-darwin.cpp \
1502 r0drv/darwin/memobj-r0drv-darwin.cpp \
1503 r0drv/darwin/mp-r0drv-darwin.cpp \
1504 r0drv/darwin/memuserkernel-r0drv-darwin.cpp \
1505 r0drv/darwin/process-r0drv-darwin.cpp \
1506 r0drv/darwin/RTLogWriteDebugger-r0drv-darwin.cpp \
1507 r0drv/darwin/RTLogWriteStdOut-r0drv-darwin.cpp \
1508 r0drv/darwin/semevent-r0drv-darwin.cpp \
1509 r0drv/darwin/semeventmulti-r0drv-darwin.cpp \
1510 r0drv/darwin/semfastmutex-r0drv-darwin.cpp \
1511 r0drv/darwin/semmutex-r0drv-darwin.cpp \
1512 r0drv/darwin/spinlock-r0drv-darwin.cpp \
1513 r0drv/darwin/thread-r0drv-darwin.cpp \
1514 r0drv/darwin/thread2-r0drv-darwin.cpp \
1515 r0drv/darwin/threadpreempt-r0drv-darwin.cpp \
1516 r0drv/darwin/time-r0drv-darwin.cpp \
1517 r0drv/memobj-r0drv.cpp \
1518 r0drv/powernotification-r0drv.c
1519
1520RuntimeR0Drv_SOURCES.os2 = \
1521 common/string/memchr.asm \
1522 common/string/memcmp.asm \
1523 common/string/memcpy.asm \
1524 common/string/mempcpy.asm \
1525 common/string/memmove.asm \
1526 common/string/memset.asm \
1527 common/string/strchr.asm \
1528 common/string/strcmp.asm \
1529 common/string/strcpy.asm \
1530 common/string/strlen.asm \
1531 \
1532 common/string/strncmp.cpp \
1533 common/string/strpbrk.cpp \
1534 \
1535 common/misc/thread.cpp \
1536 generic/RTAssertShouldPanic-generic.cpp \
1537 generic/RTLogWriteDebugger-generic.cpp \
1538 generic/RTLogWriteStdOut-stub-generic.cpp \
1539 generic/RTMpCpuId-generic.cpp \
1540 generic/RTMpCpuIdFromSetIndex-generic.cpp \
1541 generic/RTMpCpuIdToSetIndex-generic.cpp \
1542 generic/RTMpIsCpuPossible-generic.cpp \
1543 generic/RTMpGetCount-generic.cpp \
1544 generic/RTMpGetMaxCpuId-generic.cpp \
1545 generic/RTMpGetOnlineCount-generic.cpp \
1546 generic/RTMpGetOnlineSet-generic.cpp \
1547 generic/RTMpGetSet-generic.cpp \
1548 generic/RTMpIsCpuOnline-generic.cpp \
1549 generic/RTTimerCreate-generic.cpp \
1550 generic/mppresent-generic.cpp \
1551 os2/RTErrConvertFromOS2.cpp \
1552 os2/sys0.asm \
1553 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
1554 r0drv/generic/RTMpOn-r0drv-generic.cpp \
1555 r0drv/generic/mpnotification-r0drv-generic.cpp \
1556 r0drv/memobj-r0drv.cpp \
1557 r0drv/powernotification-r0drv.c \
1558 r0drv/os2/alloc-r0drv-os2.cpp \
1559 r0drv/os2/assert-r0drv-os2.cpp \
1560 r0drv/os2/assertA-r0drv-os2.asm \
1561 r0drv/os2/initterm-r0drv-os2.cpp \
1562 r0drv/os2/memobj-r0drv-os2.cpp \
1563 r0drv/os2/memuserkernel-r0drv-os2.cpp \
1564 r0drv/os2/os2imports.imp \
1565 r0drv/os2/process-r0drv-os2.cpp \
1566 r0drv/os2/RTR0AssertPanicSystem-r0drv-os2.asm \
1567 r0drv/os2/RTR0Os2DHQueryDOSVar.asm \
1568 r0drv/os2/RTR0Os2DHVMGlobalToProcess.asm \
1569 r0drv/os2/semevent-r0drv-os2.cpp \
1570 r0drv/os2/semeventmulti-r0drv-os2.cpp \
1571 r0drv/os2/semfastmutex-r0drv-os2.cpp \
1572 r0drv/os2/spinlock-r0drv-os2.cpp \
1573 r0drv/os2/thread-r0drv-os2.cpp \
1574 r0drv/os2/thread2-r0drv-os2.cpp \
1575 r0drv/os2/time-r0drv-os2.cpp \
1576 r0drv/os2/timer-r0drv-os2.cpp \
1577 r0drv/os2/timerA-r0drv-os2.asm
1578
1579RuntimeR0Drv_SOURCES.freebsd = \
1580 common/err/RTErrConvertFromErrno.cpp \
1581 common/err/RTErrConvertToErrno.cpp \
1582 common/misc/thread.cpp \
1583 common/string/memchr.asm \
1584 common/string/memmove.asm \
1585 common/string/strpbrk.cpp \
1586 common/string/memcmp.asm \
1587 common/string/strchr.asm \
1588 generic/RTAssertShouldPanic-generic.cpp \
1589 generic/RTLogWriteDebugger-generic.cpp \
1590 generic/RTLogWriteStdOut-stub-generic.cpp \
1591 generic/RTTimerCreate-generic.cpp \
1592 generic/mppresent-generic.cpp \
1593 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
1594 r0drv/generic/mpnotification-r0drv-generic.cpp \
1595 r0drv/freebsd/alloc-r0drv-freebsd.c \
1596 r0drv/freebsd/assert-r0drv-freebsd.c \
1597 r0drv/freebsd/initterm-r0drv-freebsd.c \
1598 r0drv/freebsd/memobj-r0drv-freebsd.c \
1599 r0drv/freebsd/memuserkernel-r0drv-freebsd.c \
1600 r0drv/freebsd/process-r0drv-freebsd.c \
1601 r0drv/freebsd/semevent-r0drv-freebsd.c \
1602 r0drv/freebsd/semeventmulti-r0drv-freebsd.c \
1603 r0drv/freebsd/semfastmutex-r0drv-freebsd.c \
1604 r0drv/freebsd/semmutex-r0drv-freebsd.c \
1605 r0drv/freebsd/spinlock-r0drv-freebsd.c \
1606 r0drv/freebsd/thread-r0drv-freebsd.c \
1607 r0drv/freebsd/thread2-r0drv-freebsd.c \
1608 r0drv/freebsd/time-r0drv-freebsd.c \
1609 r0drv/freebsd/mp-r0drv-freebsd.c \
1610 generic/timer-generic.cpp \
1611 r0drv/memobj-r0drv.cpp \
1612 r0drv/powernotification-r0drv.c
1613
1614RuntimeR0Drv_SOURCES.solaris = \
1615 common/err/RTErrConvertFromErrno.cpp \
1616 common/err/RTErrConvertToErrno.cpp \
1617 common/misc/thread.cpp \
1618 common/string/memchr.asm \
1619 generic/RTAssertShouldPanic-generic.cpp \
1620 generic/RTLogWriteStdOut-stub-generic.cpp \
1621 generic/RTTimerCreate-generic.cpp \
1622 generic/mppresent-generic.cpp \
1623 r0drv/memobj-r0drv.cpp \
1624 r0drv/mpnotification-r0drv.c \
1625 r0drv/powernotification-r0drv.c \
1626 r0drv/solaris/RTLogWriteDebugger-r0drv-solaris.c \
1627 r0drv/solaris/assert-r0drv-solaris.c \
1628 r0drv/solaris/initterm-r0drv-solaris.c \
1629 r0drv/solaris/memuserkernel-r0drv-solaris.c \
1630 r0drv/solaris/semevent-r0drv-solaris.c \
1631 r0drv/solaris/semeventmulti-r0drv-solaris.c \
1632 r0drv/solaris/semfastmutex-r0drv-solaris.c \
1633 r0drv/solaris/semmutex-r0drv-solaris.c \
1634 r0drv/solaris/spinlock-r0drv-solaris.c
1635
1636 # VBI is now compiled into IPRT
1637 RuntimeR0Drv_SOURCES.solaris += \
1638 r0drv/solaris/vbi/RTMpPokeCpu-r0drv-solaris.c \
1639 r0drv/solaris/vbi/mpnotification-r0drv-solaris.c \
1640 r0drv/solaris/vbi/alloc-r0drv-solaris.c \
1641 r0drv/solaris/vbi/memobj-r0drv-solaris.c \
1642 r0drv/solaris/vbi/mp-r0drv-solaris.c \
1643 r0drv/solaris/vbi/process-r0drv-solaris.c \
1644 r0drv/solaris/vbi/thread-r0drv-solaris.c \
1645 r0drv/solaris/vbi/thread2-r0drv-solaris.c \
1646 r0drv/solaris/vbi/time-r0drv-solaris.c \
1647 r0drv/solaris/vbi/timer-r0drv-solaris.c \
1648 r0drv/solaris/vbi/i86pc/os/vbi.c
1649
1650
1651## PORTME: Porters create and add their selection of platform specific Ring-0 Driver files here.
1652
1653RuntimeR0Drv_ORDERDEPS.freebsd = \
1654 $(PATH_INS)/gen-sys-hdrs/bus_if.h \
1655 $(PATH_INS)/gen-sys-hdrs/device_if.h
1656
1657
1658#
1659# RuntimeGuestR0 - Guest driver runtime.
1660# This is almost the same as the RuntimeR0Drv, the main difference
1661# is in the backdoor logging and the lack of sup.h (which should be
1662# made irrelevant even for RuntimeR0Drv).
1663#
1664RuntimeGuestR0_TEMPLATE := VBOXGUESTR0LIB
1665RuntimeGuestR0_SOURCES := $(filter-out generic/RTLogWriteUser-generic.cpp, $(RuntimeR0Drv_SOURCES))
1666RuntimeGuestR0_SOURCES += \
1667 VBox/logbackdoor.cpp
1668RuntimeGuestR0_EXTENDS = RuntimeR0Drv
1669
1670
1671#
1672# RuntimeGuestR0NT4 - Win32 NT4 guest driver runtime.
1673#
1674RuntimeGuestR0NT4_EXTENDS = RuntimeGuestR0
1675RuntimeGuestR0NT4_EXTENDS_BY = appending
1676RuntimeGuestR0NT4_DEFS = IPRT_TARGET_NT4
1677
1678
1679ifdef VBOX_WITH_RAW_MODE
1680 #
1681 # RuntimeRC - Raw-mode context library.
1682 #
1683 RuntimeRC_TEMPLATE = VBoxRc
1684 RuntimeRC_DEFS = IN_RT_RC RT_WITH_VBOX
1685 RuntimeRC_INCS = include
1686 RuntimeRC_SOURCES = \
1687 common/checksum/crc32.cpp \
1688 common/checksum/crc64.cpp \
1689 common/checksum/md5.cpp \
1690 common/log/log.cpp \
1691 common/log/logellipsis.cpp \
1692 common/log/logrel.cpp \
1693 common/log/logrelellipsis.cpp \
1694 common/log/logcom.cpp \
1695 common/log/logformat.cpp \
1696 common/misc/RTAssertMsg1Weak.cpp \
1697 common/misc/RTAssertMsg2.cpp \
1698 common/misc/RTAssertMsg2Add.cpp \
1699 common/misc/RTAssertMsg2AddWeak.cpp \
1700 common/misc/RTAssertMsg2AddWeakV.cpp \
1701 common/misc/RTAssertMsg2Weak.cpp \
1702 common/misc/RTAssertMsg2WeakV.cpp \
1703 common/misc/assert.cpp \
1704 common/misc/buildconfig.cpp \
1705 common/misc/sanity-c.c \
1706 common/misc/sanity-cpp.cpp \
1707 common/string/strformat.cpp \
1708 common/string/strformatrt.cpp \
1709 common/string/strformattype.cpp \
1710 common/string/strncmp.cpp \
1711 common/string/strpbrk.cpp \
1712 common/string/strprintf.cpp \
1713 common/table/avllu32.cpp \
1714 common/table/avlou32.cpp \
1715 common/table/avlogcphys.cpp \
1716 common/table/avlogcptr.cpp \
1717 common/table/avlohcphys.cpp \
1718 common/table/avloioport.cpp \
1719 common/table/avlrogcphys.cpp \
1720 common/table/avlrogcptr.cpp \
1721 common/table/avlroioport.cpp \
1722 common/table/avlroogcptr.cpp \
1723 common/table/avlu32.cpp \
1724 common/time/timeprog.cpp \
1725 common/time/timesup.cpp \
1726 gc/initterm-gc.cpp \
1727 generic/RTAssertShouldPanic-generic.cpp \
1728 \
1729 $(RuntimeNoCrt_SOURCES)
1730
1731 #if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
1732 # RuntimeRC_SOURCES += common/time/timesupA.asm
1733 #else
1734 RuntimeRC_SOURCES += common/time/timesupref.cpp
1735 #endif
1736
1737 RuntimeRC_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
1738
1739 ifeq ($(VBOX_LDR_FMT32),lx)
1740 RuntimeRC_SOURCES += os2/sys0.asm
1741 endif
1742
1743 if1of ($(KBUILD_TARGET), darwin solaris freebsd)
1744 RuntimeRC_SOURCES += \
1745 common/math/gcc/adddi3.c \
1746 common/math/gcc/anddi3.c \
1747 common/math/gcc/ashldi3.c \
1748 common/math/gcc/ashrdi3.c \
1749 common/math/gcc/cmpdi2.c \
1750 common/math/gcc/divdi3.c \
1751 common/math/gcc/iordi3.c \
1752 common/math/gcc/lshldi3.c \
1753 common/math/gcc/lshrdi3.c \
1754 common/math/gcc/moddi3.c \
1755 common/math/gcc/muldi3.c \
1756 common/math/gcc/negdi2.c \
1757 common/math/gcc/notdi2.c \
1758 common/math/gcc/qdivrem.c \
1759 common/math/gcc/subdi3.c \
1760 common/math/gcc/ucmpdi2.c \
1761 common/math/gcc/udivdi3.c \
1762 common/math/gcc/umoddi3.c \
1763 common/math/gcc/xordi3.c
1764 endif
1765
1766
1767 #
1768 # RuntimeRCStub - Raw-mode context startup stub for Windows.
1769 #
1770 RuntimeRCStub_TEMPLATE = VBoxRc
1771 RuntimeRCStub_SOURCES.win = \
1772 nt/NtProcessStartup-stub.cpp
1773
1774
1775endif # VBOX_WITH_RAW_MODE
1776
1777
1778#
1779# Static library for new & delete for the electric fence.
1780#
1781RuntimeEFCPP_TEMPLATE = $(VBoxRT_TEMPLATE)
1782RuntimeEFCPP_SDKS = $(RuntimeR3_SDKS)
1783RuntimeEFCPP_SDKS.$(KBUILD_TARGET) = $(RuntimeR3_SDKS.$(KBUILD_TARGET))
1784RuntimeEFCPP_DEFS = $(RuntimeR3_DEFS)
1785RuntimeEFCPP_DEFS.$(KBUILD_TARGET) = $(RuntimeR3_DEFS.$(KBUILD_TARGET))
1786RuntimeEFCPP_INCS = $(RuntimeR3_INCS)
1787RuntimeEFCPP_INCS.$(KBUILD_TARGET) = $(RuntimeR3_INCS.$(KBUILD_TARGET))
1788RuntimeEFCPP_SOURCES = r3/alloc-ef-cpp.cpp
1789
1790
1791
1792#
1793# errmsg.cpp depends on a generated header.
1794#
1795common/err/errmsg.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgdata.h
1796common/err/errmsg.cpp_INCS = $(IPRT_OUT_DIR)
1797
1798win/errmsgwin.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgcomdata.h
1799win/errmsgwin.cpp_INCS = $(IPRT_OUT_DIR)
1800
1801# Our COM errors only for R3 libraries on the host
1802define def_errmsgwin_deps
1803 $(lib)_win/errmsgwin.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
1804 $(lib)_common/err/errmsgxpcom.cpp_INCS = $(IPRT_OUT_DIR)
1805 $(lib)_common/err/errmsgxpcom.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
1806endef
1807$(foreach lib,RuntimeR3 VBoxRT RuntimeLnxHostR3,$(eval $(def_errmsgwin_deps)))
1808
1809
1810#
1811# Generate the status code data.
1812#
1813$(IPRT_OUT_DIR)/errmsgdata.h: \
1814 $(VBOX_PATH_RUNTIME_SRC)/common/err/errmsg.sed \
1815 $(PATH_ROOT)/include/iprt/err.h \
1816 $(PATH_ROOT)/include/VBox/err.h \
1817 | $$(dir $$@)
1818 $(call MSG_GENERATE,,$@,$(filter %.h,$^))
1819 $(QUIET)$(REDIRECT) -wo $@ -- $(SED) -f $< $(filter %.h,$^)
1820
1821## @todo r=bird: rename this to indicate that it's not only COM errors, but all win32/64 errors.
1822$(IPRT_OUT_DIR)/errmsgcomdata.h: \
1823 $(VBOX_PATH_RUNTIME_SRC)/common/err/errmsgcom.sed \
1824 $$(PATH_SDK_WINPSDK_INC)/WinError.h \
1825 | $$(dir $$@)
1826 $(call MSG_GENERATE,,$@,$(filter %.h,$^))
1827 $(QUIET)$(REDIRECT) -wo $@ -- $(SED) -f $< $(filter %.h,$^)
1828
1829$(IPRT_OUT_DIR)/errmsgvboxcomdata.h: \
1830 $(VBOX_PATH_RUNTIME_SRC)/VBox/errmsgvboxcom.xsl \
1831 $(VBOX_XIDL_FILE_SRC) \
1832 | $$(dir $$@)
1833 $(call MSG_GENERATE,,$@,$(filter %.xidl,$^))
1834 $(VBOX_XSLTPROC) -o $@ $< $(filter %.xidl,$^)
1835
1836
1837if "$(KBUILD_TARGET)" == "freebsd"
1838#
1839# FreeBSDGeneratedKernelHeaders - Generate some kernel interface headers.
1840#
1841# These are used by:
1842# - The RTMp* API in IPRT.
1843# - VBoxGuest
1844#
1845# Note! We cannot give a output path to the awk program, it will always
1846# generate the header next to the source. So, we'll have to temporarily copy
1847# the source file to the destination directory to work.
1848#
1849VBOX_AWK := /usr/bin/awk
1850INSTALLS += FreeBSDGeneratedKernelHeaders
1851FreeBSDGeneratedKernelHeaders_INST = gen-sys-hdrs/
1852FreeBSDGeneratedKernelHeaders_SOURCES = \
1853 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/bus_if.h \
1854 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/device_if.h \
1855 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/pci_if.h
1856FreeBSDGeneratedKernelHeaders_CLEAN = $(FreeBSDGeneratedKernelHeaders_SOURCES)
1857
1858$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/bus_if.h: $(VBOX_FREEBSD_SRC)/kern/bus_if.m | $$(dir $$@)
1859 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
1860 $(QUIET)$(CP) -f $< $(@D)/bus_if.m
1861 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/bus_if.m -h -p
1862 $(QUIET)$(RM) $(@D)/bus_if.m
1863
1864$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/device_if.h: $(VBOX_FREEBSD_SRC)/kern/device_if.m | $$(dir $$@)
1865 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
1866 $(QUIET)$(CP) -f $< $(@D)/device_if.m
1867 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/device_if.m -h -p
1868 $(QUIET)$(RM) $(@D)/device_if.m
1869
1870$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/pci_if.h: $(VBOX_FREEBSD_SRC)/dev/pci/pci_if.m | $$(dir $$@)
1871 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
1872 $(QUIET)$(CP) -f $< $(@D)/pci_if.m
1873 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/pci_if.m -h -p
1874 $(QUIET)$(RM) $(@D)/pci_if.m
1875endif # FreeBSD
1876
1877
1878#
1879# Aliases for .cpp.h files so we can more easily do syntax checking from the editor.
1880#
1881ldrELFRelocatable.cpp.o: ldrELF.o
1882ldrELFRelocatable.cpp.obj: ldrELF.obj
1883
1884
1885#
1886# Doxygen documentation.
1887#
1888IPRT_DOXYFILE_INPUT_DIRS = \
1889 $(PATH_ROOT)/include/iprt \
1890 $(PATH_ROOT)/include/iprt/cpp \
1891 $(PATH_ROOT)/include/iprt/linux \
1892 $(PATH_ROOT)/include/iprt/nocrt \
1893 $(PATH_ROOT)/include/iprt/nocrt/x86 \
1894 $(PATH_ROOT)/include/iprt/nocrt/amd64 \
1895 $(PATH_ROOT)/include/iprt/nocrt/compiler \
1896 $(VBOX_PATH_RUNTIME_SRC)/include/internal \
1897 $(VBOX_PATH_RUNTIME_SRC)/common/alloc \
1898 $(VBOX_PATH_RUNTIME_SRC)/common/asm \
1899 $(VBOX_PATH_RUNTIME_SRC)/common/checksum \
1900 $(VBOX_PATH_RUNTIME_SRC)/common/dbg \
1901 $(VBOX_PATH_RUNTIME_SRC)/common/err \
1902 $(VBOX_PATH_RUNTIME_SRC)/common/ldr \
1903 $(VBOX_PATH_RUNTIME_SRC)/common/log \
1904 $(VBOX_PATH_RUNTIME_SRC)/common/math \
1905 $(VBOX_PATH_RUNTIME_SRC)/common/math/amd64 \
1906 $(VBOX_PATH_RUNTIME_SRC)/common/math/gcc \
1907 $(VBOX_PATH_RUNTIME_SRC)/common/math/x86 \
1908 $(VBOX_PATH_RUNTIME_SRC)/common/misc \
1909 $(VBOX_PATH_RUNTIME_SRC)/common/path \
1910 $(VBOX_PATH_RUNTIME_SRC)/common/rand \
1911 $(VBOX_PATH_RUNTIME_SRC)/common/string \
1912 $(VBOX_PATH_RUNTIME_SRC)/common/table \
1913 $(VBOX_PATH_RUNTIME_SRC)/common/time \
1914 $(VBOX_PATH_RUNTIME_SRC)/VBox \
1915 $(foreach dir, $(VBOX_PATH_RUNTIME_SRC) $(VBOX_PATH_RUNTIME_SRC)/r3 $(VBOX_PATH_RUNTIME_SRC)/r0drv,\
1916 $(dir) \
1917 $(dir)/darwin \
1918 $(dir)/l4 \
1919 $(dir)/linux \
1920 $(dir)/nt \
1921 $(dir)/os2 \
1922 $(dir)/win \
1923 $(dir)/win32 \
1924 $(dir)/win64 \
1925 $(dir)/generic \
1926 )
1927
1928# These must come first in order to make things look nice.
1929IPRT_DOXYFILE_INPUT_FIRST =\
1930 $(PATH_ROOT)/include/iprt/cdefs.h \
1931 $(PATH_ROOT)/include/iprt/types.h \
1932 $(PATH_ROOT)/include/iprt/runtime.h \
1933 $(PATH_ROOT)/include/iprt/param.h \
1934 $(PATH_ROOT)/include/iprt/assert.h \
1935 $(PATH_ROOT)/include/iprt/asm.h \
1936
1937IPRT_DOXYFILE_INPUT := \
1938 $(filter-out %.cpp.h, $(sort $(wildcard $(addsuffix /*.h, $(IPRT_DOXYFILE_INPUT_DIRS)))) ) \
1939 $(foreach dir, $(IPRT_DOXYFILE_INPUT_DIRS), $(wildcard $(dir)/*.cpp $(dir)/.c $(dir)/.asm))
1940IPRT_DOXYFILE_INPUT := \
1941 $(IPRT_DOXYFILE_INPUT_FIRST) \
1942 $(filter-out $(IPRT_DOXYFILE_INPUT_FIRST), $(IPRT_DOXYFILE_INPUT))
1943
1944
1945IPRT_DOXYFILE_OUTPUT = $(PATH_OUT)/docs/iprt
1946BLDDIRS += $(IPRT_DOXYFILE_OUTPUT)
1947
1948includedep $(IPRT_OUT_DIR)/Doxyfile.iprt.dep
1949
1950# Generate the Doxyfile
1951$(IPRT_OUT_DIR)/Doxyfile.iprt: \
1952 $(VBOX_PATH_RUNTIME_SRC)/Doxyfile \
1953 $(VBOX_PATH_RUNTIME_SRC)/Makefile.kmk \
1954 $(comp-vars IPRT_DOXYFILE_INPUT,DOXYGEN_INPUT_PREV,FORCE) \
1955 $(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE) \
1956 | $$(dir $$@)
1957 $(RM) -f $@ [email protected] [email protected]
1958 $(CP) -f $(VBOX_PATH_RUNTIME_SRC)/Doxyfile [email protected]
1959 $(APPEND) [email protected]
1960 $(APPEND) [email protected] "OUTPUT_DIRECTORY = $(IPRT_DOXYFILE_OUTPUT)"
1961 $(APPEND) [email protected] "WARN_LOGFILE = $(IPRT_DOXYFILE_OUTPUT)/errors"
1962 $(APPEND) [email protected] "INCLUDE_PATH = $(PATH_ROOT)/include include . common/table"
1963 $(APPEND) [email protected] "INCLUDE_FILE_PATTERNS = *.cpp.h"
1964 $(APPEND) [email protected] "PREDEFINED += $(ARCH_BITS_DEFS)"
1965 $(APPEND) [email protected]
1966 $(APPEND) [email protected] "INPUT = $(IPRT_DOXYFILE_INPUT)"
1967 $(APPEND) [email protected]
1968 $(MV) -f [email protected] $@
1969 @$(APPEND) [email protected] "DOXYGEN_OUTPUT_PREV = $(IPRT_DOXYFILE_OUTPUT)"
1970 @$(APPEND) [email protected] "DOXYGEN_INPUT_PREV = $(IPRT_DOXYFILE_INPUT)"
1971
1972# Do the actual job.
1973$(IPRT_OUT_DIR)/docs.iprt: $(IPRT_OUT_DIR)/Doxyfile.iprt $$(IPRT_DOXYFILE_INPUT) | $(IPRT_DOXYFILE_OUTPUT)/
1974 $(RM) -f $(wildcard $(IPRT_DOXYFILE_OUTPUT)/html/*) $(IPRT_OUT_DIR)/docs.iprt
1975 doxygen $(IPRT_OUT_DIR)/Doxyfile.iprt
1976 $(APPEND) $(IPRT_OUT_DIR)/docs.iprt
1977
1978# aliases
1979docs.iprt: $(IPRT_OUT_DIR)/docs.iprt
1980if !defined(VBOX_ONLY_DOCS) && defined(VBOX_WITH_ALL_DOXYGEN_TARGETS)
1981docs: $(IPRT_OUT_DIR)/docs.iprt
1982endif
1983
1984test-doxygen::
1985 @echo test-$(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE)
1986 @echo $(IPRT_DOXYFILE_OUTPUT)
1987 @echo $(DOXYGEN_OUTPUT_PREV)
1988 @echo $(IPRT_DOXYFILE_INPUT)
1989
1990#
1991# Generate the rules (we're the to sub-makefile).
1992#
1993include $(KBUILD_PATH)/subfooter.kmk
1994
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