VirtualBox

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

Last change on this file since 27842 was 27800, checked in by vboxsync, 15 years ago

iprt: applying sparc patch (selectively).

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