VirtualBox

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

Last change on this file since 27721 was 27618, checked in by vboxsync, 15 years ago

iprt: Enabled RTSystemQueryDmiString-win.cpp. Fixed the header from the DDK instead of the SDK issue, by dropping the C++ conveniences and just program COM the good old C way. Btw. TEXT doesn't work on variables.

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