VirtualBox

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

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

generic/pathhost-generic.cpp -> r3/posix/pathhost-posix.cpp; rewrote pathhost-generic.cpp as a UTF-8 pass through.

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