VirtualBox

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

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

Misc: made it possible to do: DEFS += RTMEM_WRAP_TO_EF_APIS RTALLOC_USE_EFENCE

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