VirtualBox

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

Last change on this file since 28298 was 28271, checked in by vboxsync, 15 years ago

IPRT: Some efence adjustments, adding RTMemAllocVar and RTMemAllocZVar for dealing with struct + string style allocations.

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

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette