VirtualBox

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

Last change on this file since 27766 was 27743, checked in by vboxsync, 15 years ago

IPRT,*: Renamed RTProcDaemonize to RTProcDaemonizeUsingFork. Added a new RTPRocDaemonize that is portable. RTProcCreate* got a new flag RTPROC_FLAGS_DETACHED, while RTPROC_FLAGS_DAEMONIZE got renamed to RTPROC_FLAGS_DAEMONIZE_DEPRECATED.

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