VirtualBox

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

Last change on this file since 12099 was 12099, checked in by vboxsync, 16 years ago

iprt: splitting out some log stuff from log.cpp so we can avoid some APIs that includes the ellipsis between VBoxDrv and the dynamically loaded code (VMMR0.r0 and friends).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 47.4 KB
Line 
1# $Id: Makefile.kmk 12099 2008-09-04 17:54:01Z vboxsync $
2## @file
3# Sub-Makefile for the IPRT (IPRT).
4#
5
6#
7# Copyright (C) 2006-2007 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
31ifdef VBOX_KBUILD_HACKING
32SUB_DEPTH = ../../..
33else
34SUB_DEPTH = .
35DEPTH ?= ../../..
36endif
37include $(KBUILD_PATH)/subheader.kmk
38
39ifdef VBOX_ONLY_ADDITIONS
40 #
41 # Only build the additions, sort out the legacy names first.
42 #
43 LIBRARIES += RuntimeGuestR0 RuntimeGuestR3 RuntimeGuestR3Mini
44 #LIBRARIES.os2 = RuntimeGuestR0OS2Warp3
45 LIBRARIES.win.x86 += RuntimeGuestR0NT4
46 ifndef VBOX_WITH_ADDITION_DRIVERS
47 if1of ($(KBUILD_TARGET), linux l4) # All drivers are optional, can skip RuntimeGuestR0.
48 LIBRARIES := $(filter-out RuntimeGuestR0, $(LIBRARIES))
49 endif
50 endif
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_DOCS
60
61 #
62 # Normal build.
63 #
64 include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
65
66 BLDPROGS += uniread
67 LIBRARIES += RuntimeR3 RuntimeR0 RuntimeGC RuntimeEFCPP RuntimeR3NoCRTGCC
68 ifdef VBOX_WITH_VBOXDRV
69 LIBRARIES += RuntimeR0Drv
70 endif
71 ifdef VBOX_WITH_ADDITIONS
72 LIBRARIES += RuntimeGuestR0 RuntimeGuestR3 RuntimeGuestR3Mini
73 #LIBRARIES.os2 += RuntimeGuestR0OS2Warp3
74 LIBRARIES.win.x86 += RuntimeGuestR0NT4
75 ifndef VBOX_WITH_ADDITION_DRIVERS
76 if1of ($(KBUILD_TARGET), linux l4) # All drivers are optional, can skip RuntimeGuestR0.
77 LIBRARIES := $(filter-out RuntimeGuestR0, $(LIBRARIES))
78 endif
79 endif
80 endif # VBOX_WITH_ADDITIONS
81 LIBRARIES.l4 += RuntimeR3L4 RuntimeLnxHostR3
82 DLLS += VBoxRT
83 OTHER_CLEAN += \
84 $(PATH_TARGET)/errmsgdata.h \
85 $(PATH_TARGET)/errmsgcomdata.h \
86 $(PATH_TARGET)/Doxyfile.iprt \
87 $(PATH_TARGET)/Doxyfile.iprt.dep \
88 $(PATH_TARGET)/docs.iprt
89
90endif
91
92
93#
94# Globals
95#
96VBOX_PATH_RUNTIME_SRC := $(PATH_SUB_CURRENT)
97
98
99#
100# Unicode Specification reader used to regenerate unidata.cpp.
101#
102uniread_TEMPLATE = VBOXBLDPROG
103uniread_SOURCES = common/string/uniread.cpp
104uniread_INCS = include
105
106#
107# Win64 assembly sources.
108#
109RuntimeWin64ASM_SOURCES = \
110 win/amd64/ASMAtomicBitClear.asm \
111 win/amd64/ASMAtomicBitTestAndToggle.asm \
112 win/amd64/ASMAtomicBitToggle.asm \
113 win/amd64/ASMAtomicReadU64.asm \
114 win/amd64/ASMAtomicXchgU16.asm \
115 win/amd64/ASMAtomicXchgU8.asm \
116 win/amd64/ASMBitFirstClear.asm \
117 win/amd64/ASMBitFirstSet.asm \
118 win/amd64/ASMGetCS.asm \
119 win/amd64/ASMGetDS.asm \
120 win/amd64/ASMGetES.asm \
121 win/amd64/ASMGetFlags.asm \
122 win/amd64/ASMGetFS.asm \
123 win/amd64/ASMGetGS.asm \
124 win/amd64/ASMGetIDTR.asm \
125 win/amd64/ASMGetGDTR.asm \
126 win/amd64/ASMGetTR.asm \
127 win/amd64/ASMGetSS.asm \
128 win/amd64/ASMProbeReadByte.asm \
129 win/amd64/ASMSetFlags.asm \
130 win/amd64/ASMGetDR0.asm \
131 win/amd64/ASMGetDR1.asm \
132 win/amd64/ASMGetDR2.asm \
133 win/amd64/ASMGetDR3.asm \
134 win/amd64/ASMGetDR6.asm \
135 win/amd64/ASMGetDR7.asm \
136 common/asm/ASMMultU64ByU32DivByU32.asm
137
138#
139# Win32 assembly sources.
140#
141RuntimeWin32ASM_SOURCES = \
142 common/asm/ASMMultU64ByU32DivByU32.asm
143
144#
145# RuntimeR3 - Static Runtime for Ring-3 executables.
146#
147RuntimeR3_TEMPLATE = VBOXR3EXE
148RuntimeR3_SDKS.win = WINPSDK W2K3DDK
149RuntimeR3_DEFS = IN_RT_R3 IN_SUP_R3 LDR_WITH_NATIVE LDR_WITH_ELF32 LDR_WITH_PE RT_WITH_VBOX
150ifdef IPRT_WITH_KSTUFF
151 RuntimeR3_DEFS += LDR_WITH_KLDR
152endif
153ifdef VBOX_MAIN_RELEASE_LOG ## @todo (dmik): temporary, until RTThreadSelf/RTThreadAdopt are properly updated
154 RuntimeR3_DEFS += RTCRITSECT_STRICT
155endif
156RuntimeR3_INCS = \
157 include \
158 $(PATH_ROOT)/src/libs/liblzf-1.51
159ifdef IPRT_WITH_KSTUFF
160 RuntimeR3_INCS += \
161 $(PATH_ROOT)/src/libs/kStuff/kStuff/include
162endif
163RuntimeR3_INCS.l4 = \
164 $(L4_INCDIR)
165# for iconv.h
166RuntimeR3_INCS.freebsd = \
167 /usr/local/include
168
169
170# RuntimeR3_INCS.solaris = \
171# /usr/include
172
173RuntimeR3_SOURCES = \
174 common/alloc/alloc.cpp \
175 common/alloc/heapsimple.cpp \
176 common/checksum/crc32.cpp \
177 common/checksum/crc64.cpp \
178 common/checksum/md5.cpp \
179 common/checksum/ipv4.cpp \
180 common/err/errmsg.cpp \
181 common/err/RTErrConvertFromErrno.cpp \
182 common/ldr/ldr.cpp \
183 common/ldr/ldrELF.cpp \
184 common/ldr/ldrEx.cpp \
185 common/ldr/ldrFile.cpp \
186 common/ldr/ldrNative.cpp \
187 common/ldr/ldrPE.cpp \
188 common/log/log.cpp \
189 common/log/logellipsis.cpp \
190 common/log/logrel.cpp \
191 common/log/logrelellipsis.cpp \
192 common/log/logcom.cpp \
193 common/log/logformat.cpp \
194 common/misc/assert.cpp \
195 common/misc/cache.cpp \
196 common/misc/cidr.cpp \
197 common/misc/getopt.cpp \
198 common/misc/handletable.cpp \
199 common/misc/handletablectx.cpp \
200 common/misc/handletablesimple.cpp \
201 common/misc/once.cpp \
202 common/misc/req.cpp \
203 common/misc/sanity-c.c \
204 common/misc/sanity-cpp.cpp \
205 common/misc/semspingpong.cpp \
206 common/misc/thread.cpp \
207 common/misc/zip.cpp \
208 common/rand/rand.cpp \
209 common/rand/randadv.cpp \
210 common/rand/randparkmiller.cpp \
211 common/string/RTStrNLen.cpp \
212 common/string/RTStrNLenEx.cpp \
213 common/string/straprintf.cpp \
214 common/string/strformat.cpp \
215 common/string/strformatrt.cpp \
216 common/string/strformattype.cpp \
217 common/string/string.cpp \
218 common/string/strprintf.cpp \
219 common/string/strspace.cpp \
220 common/string/strstrip.cpp \
221 common/string/strtonum.cpp \
222 common/string/uni.cpp \
223 common/string/unidata.cpp \
224 common/string/utf-16.cpp \
225 common/string/utf-8.cpp \
226 common/table/avlgcptr.cpp \
227 common/table/avlhcphys.cpp \
228 common/table/avllu32.cpp \
229 common/table/avlou32.cpp \
230 common/table/avlogcphys.cpp \
231 common/table/avlogcptr.cpp \
232 common/table/avlohcphys.cpp \
233 common/table/avloioport.cpp \
234 common/table/avlpv.cpp \
235 common/table/avlrgcptr.cpp \
236 common/table/avlrogcphys.cpp \
237 common/table/avlrogcptr.cpp \
238 common/table/avlroioport.cpp \
239 common/table/avlroogcptr.cpp \
240 common/table/avlu32.cpp \
241 common/table/avlul.cpp \
242 common/table/table.cpp \
243 common/time/time.cpp \
244 common/time/timeprog.cpp \
245 common/time/timesup.cpp \
246 generic/critsect-generic.cpp \
247 generic/env-generic.cpp \
248 generic/RTFileCopy-generic.cpp \
249 generic/RTFileReadAll-generic.cpp \
250 generic/RTFileReadAllEx-generic.cpp \
251 generic/RTFileReadAllByHandle-generic.cpp \
252 generic/RTFileReadAllByHandleEx-generic.cpp \
253 generic/RTFileReadAllFree-generic.cpp \
254 generic/RTLogWriteStdErr-generic.cpp \
255 generic/RTLogWriteStdOut-generic.cpp \
256 generic/RTLogWriteUser-generic.cpp \
257 generic/RTTimerLRCreate-generic.cpp \
258 generic/semfastmutex-generic.cpp \
259 generic/spinlock-generic.cpp \
260 generic/timerlr-generic.cpp \
261 r3/alloc-ef.cpp \
262 r3/alloc.cpp \
263 r3/dir.cpp \
264 r3/fileio.cpp \
265 r3/fs.cpp \
266 r3/init.cpp \
267 r3/path.cpp \
268 r3/process.cpp \
269 r3/stream.cpp \
270 r3/tcp.cpp
271
272#if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
273# RuntimeR3_SOURCES += common/time/timesupA.asm
274#else
275 RuntimeR3_SOURCES += common/time/timesupref.cpp
276#endif
277
278ifdef IPRT_WITH_KSTUFF
279 RuntimeR3_SOURCES += \
280 common/ldr/ldrkStuff.cpp
281endif
282
283# VBox specific stuff.
284RuntimeR3_SOURCES += \
285 VBox/strformat-vbox.cpp \
286 VBox/RTAssertDoBreakpoint-vbox.cpp \
287 VBox/log-vbox.cpp
288ifneq ($(KBUILD_TARGET),win)
289RuntimeR3_SOURCES += \
290 common/err/errmsgxpcom.cpp
291endif
292
293RuntimeR3_SOURCES.win = \
294 generic/RTDirQueryInfo-generic.cpp \
295 generic/RTDirSetTimes-generic.cpp \
296 generic/RTMpGetCurFrequency-generic.cpp \
297 generic/RTMpGetMaxFrequency-generic.cpp \
298 generic/RTRandAdvCreateSystemFaster-generic.cpp \
299 generic/RTRandAdvCreateSystemTruer-generic.cpp \
300 generic/semnoint-generic.cpp \
301 generic/semsrw-generic.cpp \
302 nt/RTErrConvertFromNtStatus.cpp \
303 r3/posix/env-posix.cpp \
304 r3/win/RTSystemQueryOSInfo-win.cpp \
305 r3/win/alloc-win.cpp \
306 r3/win/dir-win.cpp \
307 r3/win/fileio-win.cpp \
308 r3/win/fs-win.cpp \
309 r3/win/ldrNative-win.cpp \
310 r3/win/localipc-win.cpp \
311 r3/win/mp-win.cpp \
312 r3/win/path-win.cpp \
313 r3/win/process-win.cpp \
314 r3/win/RTLogWriteDebugger-win.cpp \
315 r3/win/rtProcInitExePath-win.cpp \
316 r3/win/sched-win.cpp \
317 r3/win/sems-win.cpp \
318 r3/win/thread-win.cpp \
319 r3/win/time-win.cpp \
320 r3/win/timer-win.cpp \
321 r3/win/tls-win.cpp \
322 r3/win/utf16locale-win.cpp \
323 r3/win/utf8-win.cpp \
324 r3/win/uuid-win.cpp \
325 r3/win/RTUuidCreate-win.cpp \
326 win/errmsgwin.cpp \
327 win/RTErrConvertFromWin32.cpp
328
329RuntimeR3_SOURCES.win.amd64 = $(RuntimeWin64ASM_SOURCES)
330RuntimeR3_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
331
332RuntimeR3_SOURCES.linux = \
333 generic/pathhost-generic.cpp \
334 generic/RTDirQueryInfo-generic.cpp \
335 generic/RTDirSetTimes-generic.cpp \
336 generic/RTFileMove-generic.cpp \
337 generic/RTLogWriteDebugger-generic.cpp \
338 generic/RTTimeLocalNow-generic.cpp \
339 generic/RTTimerCreate-generic.cpp \
340 generic/RTUuidCreate-generic.cpp \
341 generic/utf16locale-generic.cpp \
342 generic/uuid-generic.cpp \
343 r3/linux/mp-linux.cpp \
344 r3/linux/rtProcInitExePath-linux.cpp \
345 r3/linux/sched-linux.cpp \
346 r3/linux/time-linux.cpp \
347 r3/posix/RTSystemQueryOSInfo-posix.cpp \
348 r3/posix/alloc-posix.cpp \
349 r3/posix/dir-posix.cpp \
350 r3/posix/env-posix.cpp \
351 r3/posix/fileio-posix.cpp \
352 r3/posix/filelock-posix.cpp \
353 r3/posix/fs-posix.cpp \
354 r3/posix/ldrNative-posix.cpp \
355 r3/posix/path-posix.cpp \
356 r3/posix/process-posix.cpp \
357 r3/posix/rand-posix.cpp \
358 r3/posix/RTTimeNow-posix.cpp \
359 r3/posix/semrw-posix.cpp \
360 r3/posix/thread-posix.cpp \
361 r3/posix/timelocal-posix.cpp \
362 r3/posix/timer-posix.cpp \
363 r3/posix/tls-posix.cpp \
364 r3/posix/utf8-posix.cpp
365RuntimeR3_SOURCES.linux.x86 += \
366 r3/posix/semevent-posix.cpp \
367 r3/posix/semeventmulti-posix.cpp \
368 r3/posix/semmutex-posix.cpp
369RuntimeR3_SOURCES.linux.amd64 += \
370 r3/linux/semevent-linux.cpp \
371 r3/linux/semeventmulti-linux.cpp
372ifdef RT_NEW_LINUX_MUTEX_CODE
373 RuntimeR3_SOURCES.linux.amd64 += \
374 r3/linux/semmutex-linux.cpp
375else
376 RuntimeR3_SOURCES.linux.amd64 += \
377 r3/posix/semmutex-posix.cpp
378endif
379
380RuntimeR3_SOURCES.os2 = \
381 generic/pathhost-generic.cpp \
382 generic/RTDirQueryInfo-generic.cpp \
383 generic/RTDirSetTimes-generic.cpp \
384 generic/RTFileMove-generic.cpp \
385 generic/RTLogWriteDebugger-generic.cpp \
386 generic/RTRandAdvCreateSystemFaster-generic.cpp \
387 generic/RTRandAdvCreateSystemTruer-generic.cpp \
388 generic/RTTimeLocalNow-generic.cpp \
389 generic/RTTimerCreate-generic.cpp \
390 generic/RTUuidCreate-generic.cpp \
391 generic/semnoint-generic.cpp \
392 generic/semsrw-generic.cpp \
393 generic/timer-generic.cpp \
394 generic/utf16locale-generic.cpp \
395 generic/uuid-generic.cpp \
396 generic/RTMpGetCurFrequency-generic.cpp \
397 generic/RTMpGetMaxFrequency-generic.cpp \
398 os2/RTErrConvertFromOS2.cpp \
399 r3/os2/filelock-os2.cpp \
400 r3/os2/mp-os2.cpp \
401 r3/os2/rtProcInitExePath-os2.cpp \
402 r3/os2/sched-os2.cpp \
403 r3/os2/sems-os2.cpp \
404 r3/os2/thread-os2.cpp \
405 r3/os2/time-os2.cpp \
406 r3/posix/RTSystemQueryOSInfo-posix.cpp \
407 r3/posix/alloc-posix.cpp \
408 r3/posix/dir-posix.cpp \
409 r3/posix/env-posix.cpp \
410 r3/posix/fileio-posix.cpp \
411 r3/posix/fs-posix.cpp \
412 r3/posix/ldrNative-posix.cpp \
413 r3/posix/path-posix.cpp \
414 r3/posix/process-posix.cpp \
415 r3/posix/RTTimeNow-posix.cpp \
416 r3/posix/timelocal-posix.cpp \
417 r3/posix/utf8-posix.cpp
418
419RuntimeR3_SOURCES.darwin = \
420 darwin/RTErrConvertFromDarwin.cpp \
421 darwin/RTErrConvertFromDarwinCOM.cpp \
422 darwin/RTErrConvertFromDarwinIO.cpp \
423 darwin/RTErrConvertFromDarwinKern.cpp \
424 generic/pathhost-generic.cpp \
425 generic/RTDirQueryInfo-generic.cpp \
426 generic/RTDirSetTimes-generic.cpp \
427 generic/RTFileMove-generic.cpp \
428 generic/RTLogWriteDebugger-generic.cpp \
429 generic/RTTimeLocalNow-generic.cpp \
430 generic/RTTimerCreate-generic.cpp \
431 generic/RTUuidCreate-generic.cpp \
432 generic/sched-generic.cpp \
433 generic/timer-generic.cpp \
434 generic/utf16locale-generic.cpp \
435 generic/uuid-generic.cpp\
436 r3/darwin/alloc-darwin.cpp \
437 r3/darwin/filelock-darwin.cpp \
438 r3/darwin/mp-darwin.cpp \
439 r3/darwin/rtProcInitExePath-darwin.cpp \
440 r3/darwin/time-darwin.cpp \
441 r3/posix/RTSystemQueryOSInfo-posix.cpp \
442 r3/posix/dir-posix.cpp \
443 r3/posix/env-posix.cpp \
444 r3/posix/fileio-posix.cpp \
445 r3/posix/fs-posix.cpp \
446 r3/posix/ldrNative-posix.cpp \
447 r3/posix/path-posix.cpp \
448 r3/posix/process-posix.cpp \
449 r3/posix/rand-posix.cpp \
450 r3/posix/semevent-posix.cpp \
451 r3/posix/semeventmulti-posix.cpp \
452 r3/posix/semmutex-posix.cpp \
453 r3/posix/semrw-posix.cpp \
454 r3/posix/thread-posix.cpp \
455 r3/posix/timelocal-posix.cpp \
456 r3/posix/tls-posix.cpp \
457 r3/posix/utf8-posix.cpp
458
459## @todo Make BSD sched.
460RuntimeR3_SOURCES.freebsd = \
461 generic/pathhost-generic.cpp \
462 generic/RTDirQueryInfo-generic.cpp \
463 generic/RTDirSetTimes-generic.cpp \
464 generic/RTFileMove-generic.cpp \
465 generic/RTLogWriteDebugger-generic.cpp \
466 generic/RTTimeLocalNow-generic.cpp \
467 generic/RTTimerCreate-generic.cpp \
468 generic/RTUuidCreate-generic.cpp \
469 generic/sched-generic.cpp \
470 generic/utf16locale-generic.cpp \
471 generic/uuid-generic.cpp \
472 generic/RTMpGetCurFrequency-generic.cpp \
473 generic/RTMpGetMaxFrequency-generic.cpp \
474 r3/freebsd/alloc-freebsd.cpp \
475 r3/freebsd/rtProcInitExePath-freebsd.cpp \
476 r3/posix/RTSystemQueryOSInfo-posix.cpp \
477 r3/posix/dir-posix.cpp \
478 r3/posix/env-posix.cpp \
479 r3/posix/fileio-posix.cpp \
480 r3/posix/filelock-posix.cpp \
481 r3/posix/fs-posix.cpp \
482 r3/posix/ldrNative-posix.cpp \
483 r3/posix/path-posix.cpp \
484 r3/posix/process-posix.cpp \
485 r3/posix/rand-posix.cpp \
486 r3/posix/RTMpGetCount-posix.cpp \
487 r3/posix/RTTimeNow-posix.cpp \
488 r3/posix/semevent-posix.cpp \
489 r3/posix/semeventmulti-posix.cpp \
490 r3/posix/semmutex-posix.cpp \
491 r3/posix/semrw-posix.cpp \
492 r3/posix/thread-posix.cpp \
493 r3/posix/time-posix.cpp \
494 r3/posix/timelocal-posix.cpp \
495 r3/posix/timer-posix.cpp \
496 r3/posix/tls-posix.cpp \
497 r3/posix/utf8-posix.cpp
498
499RuntimeR3_SOURCES.solaris = \
500 generic/pathhost-generic.cpp \
501 generic/RTDirQueryInfo-generic.cpp \
502 generic/RTDirSetTimes-generic.cpp \
503 generic/RTFileMove-generic.cpp \
504 generic/RTLogWriteDebugger-generic.cpp \
505 generic/RTTimeLocalNow-generic.cpp \
506 generic/RTTimerCreate-generic.cpp \
507 generic/RTUuidCreate-generic.cpp \
508 generic/sched-generic.cpp \
509 generic/utf16locale-generic.cpp \
510 generic/uuid-generic.cpp \
511 r3/posix/RTSystemQueryOSInfo-posix.cpp \
512 r3/posix/dir-posix.cpp \
513 r3/posix/env-posix.cpp \
514 r3/posix/fileio-posix.cpp \
515 r3/posix/filelock-posix.cpp \
516 r3/posix/fs-posix.cpp \
517 r3/posix/ldrNative-posix.cpp \
518 r3/posix/path-posix.cpp \
519 r3/posix/process-posix.cpp \
520 r3/posix/rand-posix.cpp \
521 r3/posix/RTTimeNow-posix.cpp \
522 r3/posix/semevent-posix.cpp \
523 r3/posix/semeventmulti-posix.cpp \
524 r3/posix/semmutex-posix.cpp \
525 r3/posix/semrw-posix.cpp \
526 r3/posix/thread-posix.cpp \
527 r3/posix/time-posix.cpp \
528 r3/posix/timelocal-posix.cpp \
529 r3/posix/timer-posix.cpp \
530 r3/posix/tls-posix.cpp \
531 r3/posix/utf8-posix.cpp \
532 r3/solaris/alloc-solaris.cpp \
533 r3/solaris/mp-solaris.cpp \
534 r3/solaris/rtProcInitExePath-solaris.cpp
535
536## PORTME: Porters add their selection of platform specific files for Ring-3 here.
537
538
539#
540# L4 RuntimeR3 subtarget since L4 headers won't work with VBOXR3.
541#
542RuntimeR3L4_TEMPLATE = VBOXR3NP
543RuntimeR3L4_DEFS = IN_RT_R3 IN_SUP_R3 LDR_WITH_NATIVE LDR_WITH_ELF LDR_WITH_PE
544ifneq ($(KBUILD_TARGET_ARCH),amd64)
545RuntimeR3L4_DEFS += __PIC__
546endif
547RuntimeR3L4_INCS = \
548 include \
549 $(L4_INCDIR)
550
551RuntimeR3L4_SOURCES = \
552 generic/fs-stubs-generic.cpp \
553 generic/pathhost-generic.cpp \
554 generic/RTDirQueryInfo-generic.cpp \
555 generic/RTDirSetTimes-generic.cpp \
556 generic/RTFileMove-generic.cpp \
557 generic/RTLogWriteDebugger-generic.cpp \
558 generic/RTSystemQueryOSInfo-generic.cpp \
559 generic/RTTimeLocalNow-generic.cpp \
560 generic/RTUuidCreate-generic.cpp \
561 generic/sched-generic.cpp \
562 generic/semnoint-generic.cpp \
563 generic/semsrw-generic.cpp \
564 generic/utf16locale-generic.cpp \
565 generic/uuid-generic.cpp \
566 l4/l4-errno.cpp \
567 l4/rtProcInitExePath-l4.cpp \
568 l4/process-l4env.cpp \
569 l4/sems-l4env.cpp \
570 l4/thread-l4env.cpp \
571 l4/timer-l4env.cpp \
572 l4/utf8-l4env.cpp \
573 r3/posix/alloc-posix.cpp \
574 r3/posix/dir-posix.cpp \
575 r3/posix/env-posix.cpp \
576 r3/posix/fileio-posix.cpp \
577 r3/posix/filelock-posix.cpp \
578 r3/posix/ldrNative-posix.cpp \
579 r3/posix/path-posix.cpp \
580 r3/posix/rand-posix.cpp \
581 r3/posix/RTTimeNow-posix.cpp \
582 r3/posix/time-posix.cpp \
583 r3/posix/timelocal-posix.cpp
584
585
586#
587# RuntimeGuestR3 - Guest Additions Runtime (static).
588# (The KBUILD_HOST inheritance here is for l4 cross building the linux
589# additions, while .x86 is for cross building x86 while targeting amd64.)
590#
591RuntimeGuestR3_TEMPLATE := VBOXGUESTR3LIB
592## @todo change this to EXTEND the RuntimeR3 target.
593RuntimeGuestR3_SDKS.win := $(RuntimeR3_SDKS.win)
594RuntimeGuestR3_DEFS := $(filter-out RTCRITSECT_STRICT, $(RuntimeR3_DEFS))
595RuntimeGuestR3_DEFS.$(KBUILD_TARGET) := $(RuntimeR3_DEFS.$(KBUILD_TARGET))
596RuntimeGuestR3_DEFS.$(KBUILD_HOST) := $(RuntimeR3_DEFS.$(KBUILD_HOST))
597RuntimeGuestR3_INCS := $(RuntimeR3_INCS)
598RuntimeGuestR3_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
599RuntimeGuestR3_INCS.$(KBUILD_HOST) := $(RuntimeR3_INCS.$(KBUILD_HOST))
600RuntimeGuestR3_SOURCES := $(filter-out \
601 common/time/timesupref.cpp \
602 common/time/timesupA.asm \
603 common/time/timesup.cpp \
604 generic/RTLogWriteUser-generic.cpp \
605 , $(RuntimeR3_SOURCES))
606RuntimeGuestR3_SOURCES += \
607 common/time/timesysalias.cpp \
608 VBox/logbackdoor.cpp
609RuntimeGuestR3_SOURCES.$(KBUILD_TARGET) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET))
610RuntimeGuestR3_SOURCES.$(KBUILD_HOST) := $(RuntimeR3_SOURCES.$(KBUILD_HOST))
611RuntimeGuestR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
612RuntimeGuestR3_SOURCES.$(KBUILD_HOST).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_HOST).$(KBUILD_TARGET_ARCH))
613
614
615#
616# RuntimeGuestR3Mini - Minimal Guest Additions Runtime which does not require
617# initialization and can be linked into an .so. Intended
618# for X11 drivers, GRADD and similar.
619#
620RuntimeGuestR3Mini_TEMPLATE := VBOXGUESTR3DLL
621## @todo change this to EXTEND the RuntimeGuestR3 target.
622RuntimeGuestR3Mini_INST := $(INST_ADDITIONS_LIB)
623RuntimeGuestR3Mini_SDKS.win := $(RuntimeR3_SDKS.win)
624RuntimeGuestR3Mini_DEFS := $(filter-out RTCRITSECT_STRICT, $(RuntimeR3_DEFS)) RT_MINI
625RuntimeGuestR3Mini_DEFS.$(KBUILD_TARGET) := $(RuntimeR3_DEFS.$(KBUILD_TARGET))
626RuntimeGuestR3Mini_DEFS.$(KBUILD_HOST) := $(RuntimeR3_DEFS.$(KBUILD_HOST))
627RuntimeGuestR3Mini_INCS := $(RuntimeR3_INCS)
628RuntimeGuestR3Mini_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
629RuntimeGuestR3Mini_INCS.$(KBUILD_HOST) := $(RuntimeR3_INCS.$(KBUILD_HOST))
630RuntimeGuestR3Mini_SOURCES = \
631 common/err/errmsg.cpp \
632 common/err/errmsgxpcom.cpp \
633 common/err/RTErrConvertFromErrno.cpp \
634 common/log/logformat.cpp \
635 common/misc/assert.cpp \
636 common/misc/sanity-c.c \
637 common/misc/sanity-cpp.cpp \
638 common/string/strformat.cpp \
639 common/string/strformatrt.cpp \
640 common/string/strformattype.cpp \
641 common/string/string.cpp \
642 common/string/strprintf.cpp \
643 common/string/strtonum.cpp \
644 common/string/unidata.cpp \
645 common/string/utf-8.cpp \
646 common/string/utf-16.cpp \
647 generic/pathhost-generic.cpp \
648 generic/RTAssertDoBreakpoint-generic.cpp \
649 r3/alloc.cpp \
650 r3/fileio.cpp \
651 r3/fs.cpp \
652 r3/path.cpp
653RuntimeGuestR3Mini_SOURCES.linux = \
654 r3/posix/fileio-posix.cpp \
655 r3/posix/path-posix.cpp \
656 r3/posix/utf8-posix.cpp
657RuntimeGuestR3Mini_SOURCES.solaris = \
658 r3/posix/fileio-posix.cpp \
659 r3/posix/path-posix.cpp \
660 r3/posix/utf8-posix.cpp
661RuntimeGuestR3Mini_SOURCES.freebsd = \
662 r3/posix/fileio-posix.cpp \
663 r3/posix/path-posix.cpp \
664 r3/posix/utf8-posix.cpp
665# VBox specific stuff.
666RuntimeGuestR3Mini_SOURCES += \
667 VBox/logbackdoor.cpp \
668 VBox/logbackdoor-redirect.cpp \
669 VBox/strformat-vbox.cpp
670
671
672#
673# RuntimeLnxHostR3 Linux host program runtime
674# (Only used when building L4.)
675#
676RuntimeLnxHostR3_TEMPLATE = VBOXLNXHOSTR3LIB
677RuntimeLnxHostR3_DEFS = IN_RT_R3 IN_SUP_R3 RT_WITH_VBOX RT_NO_GIP
678RuntimeLnxHostR3_SOURCES = \
679 $(RuntimeR3_SOURCES.linux.$(KBUILD_TARGET_ARCH)) \
680 $(RuntimeR3_SOURCES.linux) \
681 $(RuntimeR3_SOURCES)
682RuntimeLnxHostR3_INCS = \
683 $(RuntimeR3_INCS.linux.$(KBUILD_TARGET_ARCH)) \
684 $(RuntimeR3_INCS.linux) \
685 $(RuntimeR3_INCS)
686
687
688#
689# VBoxRT - Shared Object / DLL version.
690#
691VBoxRT_TEMPLATE = VBOXR3
692VBoxRT_SDKS.win = WINPSDK W2K3DDK VBOX_NTDLL
693ifeq ($(KBUILD_TARGET)$(VBOX_WITH_HARDENING),darwin)
694VBoxRT_INST = $(INST_DLL) $(INST_TESTCASE)
695endif
696VBoxRT_DEFS = $(RuntimeR3_DEFS) IN_SUP_R3 IN_SUP_R3
697VBoxRT_DEFS.$(KBUILD_TYPE) = $(RuntimeR3_DEFS.$(KBUILD_TYPE))
698VBoxRT_SOURCES = \
699 VBox/VBoxRTDeps.cpp \
700 $(RuntimeR3_SOURCES)
701VBoxRT_SOURCES.$(KBUILD_TARGET) = $(RuntimeR3_SOURCES.$(KBUILD_TARGET))
702VBoxRT_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) = $(RuntimeR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
703VBoxRT_SOURCES.win += r3/win/dllmain-win.cpp
704VBoxRT_SOURCES.win.x86 += r3/win/VBoxRT-win32.def
705VBoxRT_SOURCES.win.amd64 += r3/win/VBoxRT-win64.def
706VBoxRT_INCS = $(RuntimeR3_INCS)
707VBoxRT_INCS.$(KBUILD_TARGET) = $(RuntimeR3_INCS.$(KBUILD_TARGET))
708VBoxRT_INCS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) = $(RuntimeR3_INCS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
709VBoxRT_LIBS = \
710 $(PATH_LIB)/SUPR3$(VBOX_SUFF_LIB) \
711 $(PATH_LIB)/VBox-liblzf$(VBOX_SUFF_LIB)
712ifdef IPRT_WITH_KSTUFF
713 VBoxRT_LIBS += \
714 $(PATH_LIB)/VBox-kStuff$(VBOX_SUFF_LIB)
715endif
716VBoxRT_LIBS.darwin = \
717 iconv
718VBoxRT_LIBS.freebsd = \
719 iconv
720VBoxRT_LIBS.solaris = \
721 kstat
722VBoxRT_LIBPATH.freebsd = \
723 /usr/local/lib
724VBoxRT_LDFLAGS.darwin = -framework IOKit -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxRT.dylib
725ifdef VBOX_USE_VCC80
726VBoxRT_LDFLAGS.win = /MANIFEST
727endif
728VBoxRT_LDFLAGS.l4 = \
729 -Wl,-whole-archive \
730 $(PATH_LIB)/RuntimeR3L4$(VBOX_SUFF_LIB) \
731 -Wl,-no-whole-archive
732ifeq ($(KBUILD_TARGET),l4)
733VBoxRT_LIBS += \
734 $(L4_LIBDIR)/libl4sys.a \
735 $(L4_LIBDIR)/libl4sys.p.a
736endif
737VBoxRT_LIBS.l4 = \
738 $(PATH_LIB)/RuntimeR3L4$(VBOX_SUFF_LIB)
739
740
741#
742# RuntimeR3NoCRTGCC - CRT replacement lib for VBoxREM.
743# This is used together with VBoxRT.
744#
745RuntimeR3NoCRTGCC_TEMPLATE = VBOXNOCRTGCC
746RuntimeR3NoCRTGCC_LIBSUFF = $(VBOX_SUFF_LIB)
747RuntimeR3NoCRTGCC_INCS = include
748RuntimeR3NoCRTGCC_SOURCES = \
749 common/misc/sanity-cpp.cpp \
750 common/misc/sanity-c.c \
751 \
752 common/math/ceill.asm \
753 common/math/cosl.asm \
754 common/math/fabs.asm \
755 common/math/fabsf.asm \
756 common/math/fabsl.asm \
757 common/math/floor.asm \
758 common/math/floorf.asm \
759 common/math/floorl.asm \
760 common/math/ldexpl.asm \
761 common/math/llrint.asm \
762 common/math/llrintf.asm \
763 common/math/llrintl.asm \
764 common/math/logl.asm \
765 common/math/lrint.asm \
766 common/math/lrintf.asm \
767 common/math/lrintl.asm \
768 common/math/remainder.asm \
769 common/math/remainderf.asm \
770 common/math/remainderl.asm \
771 common/math/sinl.asm \
772 common/math/tanl.asm \
773 common/math/trunc.asm \
774 common/math/truncf.asm \
775 common/math/truncl.asm \
776 \
777 common/misc/setjmp.asm \
778 \
779 common/string/memchr.asm \
780 common/string/memchr_alias.c \
781 common/string/memcmp.asm \
782 common/string/memcmp_alias.c \
783 common/string/memcpy.asm \
784 common/string/memcpy_alias.c \
785 common/string/mempcpy.asm \
786 common/string/memmove.asm \
787 common/string/memmove_alias.c \
788 common/string/memset.asm \
789 common/string/memset_alias.c \
790 common/string/strchr.asm \
791 common/string/strchr_alias.c \
792 common/string/strcmp.asm \
793 common/string/strcmp_alias.c \
794 common/string/strlen.asm \
795 common/string/strlen_alias.c
796
797RuntimeR3NoCRTGCC_SOURCES.x86 = \
798 common/math/x86/fenv-x86.c \
799 common/math/gcc/adddi3.c \
800 common/math/gcc/anddi3.c \
801 common/math/gcc/ashldi3.c \
802 common/math/gcc/ashrdi3.c \
803 common/math/gcc/cmpdi2.c \
804 common/math/gcc/divdi3.c \
805 common/math/gcc/iordi3.c \
806 common/math/gcc/lshldi3.c \
807 common/math/gcc/lshrdi3.c \
808 common/math/gcc/moddi3.c \
809 common/math/gcc/muldi3.c \
810 common/math/gcc/negdi2.c \
811 common/math/gcc/notdi2.c \
812 common/math/gcc/qdivrem.c \
813 common/math/gcc/subdi3.c \
814 common/math/gcc/ucmpdi2.c \
815 common/math/gcc/udivdi3.c \
816 common/math/gcc/umoddi3.c \
817 common/math/gcc/xordi3.c
818
819
820## @todo stop using the old memcpy.c and memset.c code.
821
822#
823# RuntimeR0 - Ring0 library for VMMR0.
824#
825RuntimeR0_TEMPLATE = VBOXR0
826RuntimeR0_DEFS = IN_RT_R0 RT_WITH_VBOX RT_WITHOUT_NOCRT_WRAPPERS
827RuntimeR0_INCS = include
828RuntimeR0_SOURCES = \
829 common/checksum/crc32.cpp \
830 common/checksum/crc64.cpp \
831 common/checksum/md5.cpp \
832 common/checksum/ipv4.cpp \
833 common/log/logellipsis.cpp \
834 common/log/logrelellipsis.cpp \
835 common/log/logcom.cpp \
836 common/log/logformat.cpp \
837 common/misc/assert.cpp \
838 common/misc/handletable.cpp \
839 common/misc/handletablectx.cpp \
840 common/misc/handletablesimple.cpp \
841 common/misc/sanity-c.c \
842 common/misc/sanity-cpp.cpp \
843 common/string/memchr.cpp \
844 common/string/memcmp.cpp \
845 common/string/memcpy.cpp \
846 common/string/memmove.asm \
847 common/string/memset.cpp \
848 common/string/strcmp.asm \
849 common/string/strcpy.cpp \
850 common/string/strformat.cpp \
851 common/string/strformatrt.cpp \
852 common/string/strformattype.cpp \
853 common/string/strlen.asm \
854 common/string/strncmp.cpp \
855 common/string/strpbrk.cpp \
856 common/string/strprintf.cpp \
857 common/table/avlgcptr.cpp \
858 common/table/avlhcphys.cpp \
859 common/table/avllu32.cpp \
860 common/table/avlogcphys.cpp \
861 common/table/avlogcptr.cpp \
862 common/table/avlohcphys.cpp \
863 common/table/avloioport.cpp \
864 common/table/avlpv.cpp \
865 common/table/avlrogcphys.cpp \
866 common/table/avlrogcptr.cpp \
867 common/table/avlroioport.cpp \
868 common/table/avlroogcptr.cpp \
869 common/table/avlu32.cpp \
870 common/time/timesup.cpp \
871 generic/RTAssertDoBreakpoint-generic.cpp \
872 VBox/strformat-vbox.cpp
873
874#if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
875# RuntimeR0_SOURCES += common/time/timesupA.asm
876#else
877 RuntimeR0_SOURCES += common/time/timesupref.cpp
878#endif
879
880RuntimeR0_SOURCES.win.amd64 = $(RuntimeWin64ASM_SOURCES)
881RuntimeR0_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
882
883RuntimeR0_SOURCES.os2 = \
884 os2/RTErrConvertFromOS2.cpp \
885 os2/sys0.asm
886
887ifeq ($(filter-out darwin solaris freebsd,$(KBUILD_TARGET)),)
888RuntimeR0_SOURCES += \
889 common/math/gcc/adddi3.c \
890 common/math/gcc/anddi3.c \
891 common/math/gcc/ashldi3.c \
892 common/math/gcc/ashrdi3.c \
893 common/math/gcc/cmpdi2.c \
894 common/math/gcc/divdi3.c \
895 common/math/gcc/iordi3.c \
896 common/math/gcc/lshldi3.c \
897 common/math/gcc/lshrdi3.c \
898 common/math/gcc/moddi3.c \
899 common/math/gcc/muldi3.c \
900 common/math/gcc/negdi2.c \
901 common/math/gcc/notdi2.c \
902 common/math/gcc/qdivrem.c \
903 common/math/gcc/subdi3.c \
904 common/math/gcc/ucmpdi2.c \
905 common/math/gcc/udivdi3.c \
906 common/math/gcc/umoddi3.c \
907 common/math/gcc/xordi3.c
908endif
909
910
911common/string/memchr.cpp_CXXFLAGS.win = -Oi-
912common/string/memcmp.cpp_CXXFLAGS.win = -Oi-
913common/string/memcpy.cpp_CXXFLAGS.win = -Oi-
914common/string/memset.cpp_CXXFLAGS.win = -Oi-
915common/string/strcpy.cpp_CXXFLAGS.win = -Oi-
916common/string/strlen.cpp_CXXFLAGS.win = -Oi-
917
918#
919# RuntimeR0Drv - Ring0 library for host drivers.
920#
921RuntimeR0Drv_TEMPLATE = VBOXR0DRV
922RuntimeR0Drv_SDKS.win = W2K3DDK WINPSDKINCS
923RuntimeR0Drv_INCS := $(PATH_SUB_CURRENT) include
924RuntimeR0Drv_DEFS = IN_RT_R0 RT_WITH_VBOX RT_WITHOUT_NOCRT_WRAPPERS
925RuntimeR0Drv_DEFS.win = IN_SUP_R0
926RuntimeR0Drv_DEFS.linux = MODULE KBUILD_MODNAME=KBUILD_STR\(vboxdrv\) KBUILD_BASENAME=KBUILD_STR\(vboxdrv\) IN_SUP_R0 # why is IN_SUP_R0 here? because!
927
928RuntimeR0Drv_INCS.linux = \
929 r0drv/linux
930ifdef VBOX_WITH_SOLARIS_VBI
931 RuntimeR0Drv_INCS.solaris = \
932 r0drv/solaris/vbi/i86pc
933endif
934
935RuntimeR0Drv_SOURCES = \
936 common/alloc/alloc.cpp \
937 common/checksum/crc32.cpp \
938 common/checksum/crc64.cpp \
939 common/checksum/md5.cpp \
940 common/checksum/ipv4.cpp \
941 common/log/log.cpp \
942 common/log/logellipsis.cpp \
943 common/log/logrel.cpp \
944 common/log/logrelellipsis.cpp \
945 common/log/logcom.cpp \
946 common/log/logformat.cpp \
947 common/misc/assert.cpp \
948 common/misc/handletable.cpp \
949 common/misc/handletablectx.cpp \
950 common/misc/handletablesimple.cpp \
951 common/misc/sanity-c.c \
952 common/misc/sanity-cpp.cpp \
953 common/string/strformat.cpp \
954 common/string/strformatrt.cpp \
955 common/string/strformattype.cpp \
956 common/string/strprintf.cpp \
957 common/string/strtonum.cpp \
958 common/table/avlpv.cpp \
959 generic/RTLogWriteStdErr-stub-generic.cpp \
960 generic/RTLogWriteUser-generic.cpp \
961 generic/uuid-generic.cpp \
962 r0drv/alloc-r0drv.cpp \
963 r0drv/initterm-r0drv.cpp \
964 VBox/log-vbox.cpp \
965 VBox/strformat-vbox.cpp
966
967RuntimeR0Drv_SOURCES.linux = \
968 common/alloc/heapsimple.cpp \
969 common/string/strpbrk.cpp \
970 common/err/RTErrConvertToErrno.cpp \
971 generic/RTAssertDoBreakpoint-generic.cpp \
972 generic/RTLogWriteStdOut-stub-generic.cpp \
973 r0drv/linux/alloc-r0drv-linux.c \
974 r0drv/linux/initterm-r0drv-linux.c \
975 r0drv/linux/memobj-r0drv-linux.c \
976 r0drv/linux/mp-r0drv-linux.c \
977 r0drv/linux/mpnotification-r0drv-linux.c \
978 r0drv/linux/process-r0drv-linux.c \
979 r0drv/linux/RTLogWriteDebugger-r0drv-linux.c \
980 r0drv/linux/semevent-r0drv-linux.c \
981 r0drv/linux/semeventmulti-r0drv-linux.c \
982 r0drv/linux/semfastmutex-r0drv-linux.c \
983 r0drv/linux/spinlock-r0drv-linux.c \
984 r0drv/linux/thread-r0drv-linux.c \
985 r0drv/linux/time-r0drv-linux.c \
986 r0drv/linux/timer-r0drv-linux.c \
987 r0drv/memobj-r0drv.cpp \
988 r0drv/mpnotification-r0drv.c
989## @todo thread2-r0drv-linux.c and assert-r0drv-linux.c
990
991RuntimeR0Drv_SOURCES.win = \
992 common/misc/thread.cpp \
993 common/string/memcmp.asm \
994 common/string/memchr.asm \
995 common/string/memcpy.asm \
996 common/string/memset.asm \
997 common/string/memmove.asm \
998 common/string/strlen.asm \
999 common/string/strncmp.cpp \
1000 common/string/strpbrk.cpp \
1001 generic/RTAssertDoBreakpoint-generic.cpp \
1002 generic/RTLogWriteStdOut-stub-generic.cpp \
1003 nt/RTErrConvertFromNtStatus.cpp \
1004 r0drv/memobj-r0drv.cpp \
1005 r0drv/mpnotification-r0drv.c \
1006 r0drv/nt/alloc-r0drv-nt.cpp \
1007 r0drv/nt/assert-r0drv-nt.cpp \
1008 r0drv/nt/initterm-r0drv-nt.cpp \
1009 r0drv/nt/memobj-r0drv-nt.cpp \
1010 r0drv/nt/mp-r0drv-nt.cpp \
1011 r0drv/nt/mpnotification-r0drv-nt.cpp \
1012 r0drv/nt/process-r0drv-nt.cpp \
1013 r0drv/nt/RTLogWriteDebugger-r0drv-nt.cpp \
1014 r0drv/nt/semevent-r0drv-nt.cpp \
1015 r0drv/nt/semeventmulti-r0drv-nt.cpp \
1016 r0drv/nt/semfastmutex-r0drv-nt.cpp \
1017 r0drv/nt/semmutex-r0drv-nt.cpp \
1018 r0drv/nt/spinlock-r0drv-nt.cpp \
1019 r0drv/nt/thread-r0drv-nt.cpp \
1020 r0drv/nt/thread2-r0drv-nt.cpp \
1021 r0drv/nt/time-r0drv-nt.cpp \
1022 r0drv/nt/timer-r0drv-nt.cpp
1023
1024RuntimeR0Drv_SOURCES.win.amd64 = $(RuntimeWin64ASM_SOURCES)
1025RuntimeR0Drv_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
1026
1027RuntimeR0Drv_SOURCES.darwin = \
1028 common/err/RTErrConvertFromErrno.cpp \
1029 common/misc/thread.cpp \
1030 common/string/memchr.asm \
1031 common/string/strpbrk.cpp \
1032 darwin/RTErrConvertFromDarwin.cpp \
1033 darwin/RTErrConvertFromDarwinIO.cpp \
1034 darwin/RTErrConvertFromDarwinKern.cpp \
1035 generic/RTAssertDoBreakpoint-generic.cpp \
1036 generic/RTMpCpuId-generic.cpp \
1037 generic/RTMpCpuIdFromSetIndex-generic.cpp \
1038 generic/RTMpCpuIdToSetIndex-generic.cpp \
1039 generic/RTMpIsCpuPossible-generic.cpp \
1040 generic/RTMpGetCount-generic.cpp \
1041 generic/RTMpGetMaxCpuId-generic.cpp \
1042 generic/RTMpGetOnlineCount-generic.cpp \
1043 generic/RTMpGetOnlineSet-generic.cpp \
1044 generic/RTMpGetSet-generic.cpp \
1045 generic/RTMpIsCpuOnline-generic.cpp \
1046 generic/RTTimerCreate-generic.cpp \
1047 generic/timer-generic.cpp \
1048 r0drv/generic/RTMpOn-r0drv-generic.cpp \
1049 r0drv/generic/mpnotification-r0drv-generic.cpp \
1050 r0drv/darwin/alloc-r0drv-darwin.cpp \
1051 r0drv/darwin/assert-r0drv-darwin.cpp \
1052 r0drv/darwin/initterm-r0drv-darwin.cpp \
1053 r0drv/darwin/memobj-r0drv-darwin.cpp \
1054 r0drv/darwin/process-r0drv-darwin.cpp \
1055 r0drv/darwin/RTLogWriteDebugger-r0drv-darwin.cpp \
1056 r0drv/darwin/RTLogWriteStdOut-r0drv-darwin.cpp \
1057 r0drv/darwin/semaphore-r0drv-darwin.cpp \
1058 r0drv/darwin/spinlock-r0drv-darwin.cpp \
1059 r0drv/darwin/thread-r0drv-darwin.cpp \
1060 r0drv/darwin/thread2-r0drv-darwin.cpp \
1061 r0drv/darwin/time-r0drv-darwin.cpp \
1062 r0drv/memobj-r0drv.cpp
1063
1064RuntimeR0Drv_SOURCES.os2 = \
1065 common/string/memchr.asm \
1066 common/string/memcmp.asm \
1067 common/string/memcpy.asm \
1068 common/string/mempcpy.asm \
1069 common/string/memmove.asm \
1070 common/string/memset.asm \
1071 common/string/strchr.asm \
1072 common/string/strcmp.asm \
1073 common/string/strlen.asm \
1074 \
1075 common/string/strcpy.cpp \
1076 common/string/strncmp.cpp \
1077 common/string/strpbrk.cpp \
1078 \
1079 common/misc/thread.cpp \
1080 generic/RTLogWriteDebugger-generic.cpp \
1081 generic/RTLogWriteStdOut-stub-generic.cpp \
1082 generic/RTMpCpuId-generic.cpp \
1083 generic/RTMpCpuIdFromSetIndex-generic.cpp \
1084 generic/RTMpCpuIdToSetIndex-generic.cpp \
1085 generic/RTMpIsCpuPossible-generic.cpp \
1086 generic/RTMpGetCount-generic.cpp \
1087 generic/RTMpGetMaxCpuId-generic.cpp \
1088 generic/RTMpGetOnlineCount-generic.cpp \
1089 generic/RTMpGetOnlineSet-generic.cpp \
1090 generic/RTMpGetSet-generic.cpp \
1091 generic/RTMpIsCpuOnline-generic.cpp \
1092 generic/RTTimerCreate-generic.cpp \
1093 os2/RTErrConvertFromOS2.cpp \
1094 os2/sys0.asm \
1095 r0drv/memobj-r0drv.cpp \
1096 r0drv/generic/RTMpOn-r0drv-generic.cpp \
1097 r0drv/generic/mpnotification-r0drv-generic.cpp \
1098 r0drv/os2/alloc-r0drv-os2.cpp \
1099 r0drv/os2/assert-r0drv-os2.cpp \
1100 r0drv/os2/assertA-r0drv-os2.asm \
1101 r0drv/os2/initterm-r0drv-os2.cpp \
1102 r0drv/os2/memobj-r0drv-os2.cpp \
1103 r0drv/os2/os2imports.imp \
1104 r0drv/os2/process-r0drv-os2.cpp \
1105 r0drv/os2/RTAssertDoBreakpoint-r0drv-os2.asm \
1106 r0drv/os2/RTR0Os2DHQueryDOSVar.asm \
1107 r0drv/os2/RTR0Os2DHVMGlobalToProcess.asm \
1108 r0drv/os2/semevent-r0drv-os2.cpp \
1109 r0drv/os2/semeventmulti-r0drv-os2.cpp \
1110 r0drv/os2/semfastmutex-r0drv-os2.cpp \
1111 r0drv/os2/spinlock-r0drv-os2.cpp \
1112 r0drv/os2/thread-r0drv-os2.cpp \
1113 r0drv/os2/thread2-r0drv-os2.cpp \
1114 r0drv/os2/time-r0drv-os2.cpp \
1115 r0drv/os2/timer-r0drv-os2.cpp \
1116 r0drv/os2/timerA-r0drv-os2.asm
1117
1118RuntimeR0Drv_SOURCES.freebsd = \
1119 common/err/RTErrConvertFromErrno.cpp \
1120 common/err/RTErrConvertToErrno.cpp \
1121 common/misc/thread.cpp \
1122 common/string/memchr.asm \
1123 common/string/memmove.asm \
1124 common/string/strpbrk.cpp \
1125 common/string/memcmp.asm \
1126 common/string/strchr.asm \
1127 generic/RTAssertDoBreakpoint-generic.cpp \
1128 generic/RTLogWriteDebugger-generic.cpp \
1129 generic/RTLogWriteStdOut-stub-generic.cpp \
1130 generic/RTMpCpuId-generic.cpp \
1131 generic/RTMpCpuIdFromSetIndex-generic.cpp \
1132 generic/RTMpCpuIdToSetIndex-generic.cpp \
1133 generic/RTMpIsCpuPossible-generic.cpp \
1134 generic/RTMpGetCount-generic.cpp \
1135 generic/RTMpGetMaxCpuId-generic.cpp \
1136 generic/RTMpGetOnlineCount-generic.cpp \
1137 generic/RTMpGetOnlineSet-generic.cpp \
1138 generic/RTMpGetSet-generic.cpp \
1139 generic/RTMpIsCpuOnline-generic.cpp \
1140 generic/RTTimerCreate-generic.cpp \
1141 r0drv/generic/RTMpOn-r0drv-generic.cpp \
1142 r0drv/generic/mpnotification-r0drv-generic.cpp \
1143 r0drv/freebsd/alloc-r0drv-freebsd.c \
1144 r0drv/freebsd/assert-r0drv-freebsd.c \
1145 r0drv/freebsd/initterm-r0drv-freebsd.c \
1146 r0drv/freebsd/memobj-r0drv-freebsd.c \
1147 r0drv/freebsd/process-r0drv-freebsd.c \
1148 r0drv/freebsd/semevent-r0drv-freebsd.c \
1149 r0drv/freebsd/semeventmulti-r0drv-freebsd.c \
1150 r0drv/freebsd/semfastmutex-r0drv-freebsd.c \
1151 r0drv/freebsd/spinlock-r0drv-freebsd.c \
1152 r0drv/freebsd/thread-r0drv-freebsd.c \
1153 r0drv/freebsd/thread2-r0drv-freebsd.c \
1154 r0drv/freebsd/time-r0drv-freebsd.c \
1155 r0drv/freebsd/timer-r0drv-freebsd.c \
1156 r0drv/memobj-r0drv.cpp
1157
1158RuntimeR0Drv_SOURCES.solaris = \
1159 common/err/RTErrConvertFromErrno.cpp \
1160 common/misc/thread.cpp \
1161 common/string/memchr.asm \
1162 generic/RTAssertDoBreakpoint-generic.cpp \
1163 generic/RTLogWriteStdOut-stub-generic.cpp \
1164 generic/RTTimerCreate-generic.cpp \
1165 r0drv/memobj-r0drv.cpp \
1166 r0drv/mpnotification-r0drv.c
1167
1168ifdef VBOX_WITH_SOLARIS_VBI
1169 RuntimeR0Drv_SOURCES.solaris += \
1170 r0drv/solaris/vbi/mpnotification-r0drv-solaris.c \
1171 r0drv/solaris/vbi/alloc-r0drv-solaris.c \
1172 r0drv/solaris/vbi/assert-r0drv-solaris.c \
1173 r0drv/solaris/vbi/initterm-r0drv-solaris.c \
1174 r0drv/solaris/vbi/memobj-r0drv-solaris.c \
1175 r0drv/solaris/vbi/mp-r0drv-solaris.c \
1176 r0drv/solaris/vbi/process-r0drv-solaris.c \
1177 r0drv/solaris/vbi/RTLogWriteDebugger-r0drv-solaris.c \
1178 r0drv/solaris/vbi/semevent-r0drv-solaris.c \
1179 r0drv/solaris/vbi/semeventmulti-r0drv-solaris.c \
1180 r0drv/solaris/vbi/semfastmutex-r0drv-solaris.c \
1181 r0drv/solaris/vbi/spinlock-r0drv-solaris.c \
1182 r0drv/solaris/vbi/thread-r0drv-solaris.c \
1183 r0drv/solaris/vbi/thread2-r0drv-solaris.c \
1184 r0drv/solaris/vbi/time-r0drv-solaris.c \
1185 r0drv/solaris/vbi/timer-r0drv-solaris.c
1186else # !VBOX_WITH_SOLARIS_VBI
1187 RuntimeR0Drv_SOURCES.solaris += \
1188 r0drv/solaris/mpnotification-r0drv-solaris.c \
1189 r0drv/solaris/alloc-r0drv-solaris.c \
1190 r0drv/solaris/assert-r0drv-solaris.c \
1191 r0drv/solaris/initterm-r0drv-solaris.c \
1192 r0drv/solaris/memobj-r0drv-solaris.c \
1193 r0drv/solaris/process-r0drv-solaris.c \
1194 r0drv/solaris/RTLogWriteDebugger-r0drv-solaris.c \
1195 r0drv/solaris/semevent-r0drv-solaris.c \
1196 r0drv/solaris/semeventmulti-r0drv-solaris.c \
1197 r0drv/solaris/semfastmutex-r0drv-solaris.c \
1198 r0drv/solaris/spinlock-r0drv-solaris.c \
1199 r0drv/solaris/thread-r0drv-solaris.c \
1200 r0drv/solaris/thread2-r0drv-solaris.c \
1201 r0drv/solaris/time-r0drv-solaris.c \
1202 r0drv/solaris/timer-r0drv-solaris.c
1203 # Don't use mp-r0drv-solaris.c because it will cause crashes due to incorrect memobj-r0drv-solaris.c code.
1204 ifeq (0,0)
1205 # Stub it. ## @todo limit the stubbing to RTMpOn*.
1206 RuntimeR0Drv_SOURCES.solaris += \
1207 generic/RTMpCpuId-generic.cpp \
1208 generic/RTMpCpuIdFromSetIndex-generic.cpp \
1209 generic/RTMpCpuIdToSetIndex-generic.cpp \
1210 generic/RTMpIsCpuPossible-generic.cpp \
1211 generic/RTMpGetCount-generic.cpp \
1212 generic/RTMpGetMaxCpuId-generic.cpp \
1213 generic/RTMpGetOnlineCount-generic.cpp \
1214 generic/RTMpGetOnlineSet-generic.cpp \
1215 generic/RTMpGetSet-generic.cpp \
1216 generic/RTMpIsCpuOnline-generic.cpp \
1217 r0drv/generic/RTMpOn-r0drv-generic.cpp
1218 else
1219 # Use mp-r0drv-solaris.c.
1220 RuntimeR0Drv_SOURCES.solaris += \
1221 r0drv/solaris/mp-r0drv-solaris.c
1222# r0drv/solaris/mpnotification-r0drv-solaris.c
1223 endif
1224
1225endif # !VBOX_WITH_SOLARIS_VBI
1226
1227## PORTME: Porters create and add their selection of platform specific Ring-0 Driver files here.
1228
1229
1230#
1231# RuntimeGuestR0 - Guest driver runtime.
1232# This is almost the same as the RuntimeR0Drv, the main difference
1233# is in the backdoor logging and the lack of sup.h (which should be
1234# made irrelevant even for RuntimeR0Drv).
1235#
1236RuntimeGuestR0_TEMPLATE := VBOXGUESTR0LIB
1237RuntimeGuestR0_SOURCES := $(filter-out generic/RTLogWriteUser-generic.cpp, $(RuntimeR0Drv_SOURCES))
1238RuntimeGuestR0_SOURCES += VBox/logbackdoor.cpp
1239RuntimeGuestR0_EXTENDS = RuntimeR0Drv
1240
1241# HACK: no vbi for the solaris guest additions - yet.
1242RuntimeGuestR0_SOURCES.solaris = \
1243 common/err/RTErrConvertFromErrno.cpp \
1244 common/err/RTErrConvertToErrno.cpp \
1245 common/misc/thread.cpp \
1246 common/string/memchr.asm \
1247 generic/RTAssertDoBreakpoint-generic.cpp \
1248 generic/RTTimerCreate-generic.cpp \
1249 r0drv/memobj-r0drv.cpp \
1250 generic/RTMpCpuId-generic.cpp \
1251 generic/RTMpCpuIdFromSetIndex-generic.cpp \
1252 generic/RTMpCpuIdToSetIndex-generic.cpp \
1253 generic/RTMpIsCpuPossible-generic.cpp \
1254 generic/RTMpGetCount-generic.cpp \
1255 generic/RTMpGetMaxCpuId-generic.cpp \
1256 generic/RTMpGetOnlineCount-generic.cpp \
1257 generic/RTMpGetOnlineSet-generic.cpp \
1258 generic/RTMpGetSet-generic.cpp \
1259 generic/RTMpIsCpuOnline-generic.cpp \
1260 generic/RTLogWriteStdOut-stub-generic.cpp \
1261 r0drv/generic/RTMpOn-r0drv-generic.cpp \
1262 r0drv/generic/mpnotification-r0drv-generic.cpp \
1263 r0drv/solaris/alloc-r0drv-solaris.c \
1264 r0drv/solaris/assert-r0drv-solaris.c \
1265 r0drv/solaris/initterm-r0drv-solaris.c \
1266 r0drv/solaris/memobj-r0drv-solaris.c \
1267 r0drv/solaris/process-r0drv-solaris.c \
1268 r0drv/solaris/RTLogWriteDebugger-r0drv-solaris.c \
1269 r0drv/solaris/semevent-r0drv-solaris.c \
1270 r0drv/solaris/semeventmulti-r0drv-solaris.c \
1271 r0drv/solaris/semfastmutex-r0drv-solaris.c \
1272 r0drv/solaris/spinlock-r0drv-solaris.c \
1273 r0drv/solaris/thread-r0drv-solaris.c \
1274 r0drv/solaris/thread2-r0drv-solaris.c \
1275 r0drv/solaris/time-r0drv-solaris.c \
1276 r0drv/solaris/timer-r0drv-solaris.c
1277
1278#
1279# RuntimeGuestR0NT4 - Win32 NT4 guest driver runtime.
1280#
1281RuntimeGuestR0NT4_EXTENDS = RuntimeGuestR0
1282RuntimeGuestR0NT4_EXTENDS_BY = appending
1283RuntimeGuestR0NT4_DEFS = IPRT_TARGET_NT4
1284
1285
1286#
1287# RuntimeGC - Guest context library.
1288#
1289RuntimeGC_TEMPLATE = VBOXGC
1290RuntimeGC_DEFS = IN_RT_GC RT_WITH_VBOX RT_WITHOUT_NOCRT_WRAPPERS
1291RuntimeGC_INCS = include
1292RuntimeGC_SOURCES = \
1293 common/log/log.cpp \
1294 common/log/logellipsis.cpp \
1295 common/log/logrel.cpp \
1296 common/log/logrelellipsis.cpp \
1297 common/log/logcom.cpp \
1298 common/log/logformat.cpp \
1299 common/misc/assert.cpp \
1300 common/misc/sanity-c.c \
1301 common/misc/sanity-cpp.cpp \
1302 common/string/memchr.cpp \
1303 common/string/memcmp.cpp \
1304 common/string/memcpy.cpp \
1305 common/string/memset.cpp \
1306 common/string/memmove.asm \
1307 common/string/strcpy.cpp \
1308 common/string/strformat.cpp \
1309 common/string/strformatrt.cpp \
1310 common/string/strformattype.cpp \
1311 common/string/strlen.asm \
1312 common/string/strncmp.cpp \
1313 common/string/strpbrk.cpp \
1314 common/string/strprintf.cpp \
1315 common/table/avllu32.cpp \
1316 common/table/avlou32.cpp \
1317 common/table/avlogcphys.cpp \
1318 common/table/avlogcptr.cpp \
1319 common/table/avlohcphys.cpp \
1320 common/table/avloioport.cpp \
1321 common/table/avlrogcphys.cpp \
1322 common/table/avlrogcptr.cpp \
1323 common/table/avlroioport.cpp \
1324 common/table/avlroogcptr.cpp \
1325 common/table/avlu32.cpp \
1326 common/time/timeprog.cpp \
1327 common/time/timesup.cpp \
1328 gc/initterm-gc.cpp \
1329 generic/RTAssertDoBreakpoint-generic.cpp \
1330 VBox/strformat-vbox.cpp \
1331
1332#if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
1333# RuntimeGC_SOURCES += common/time/timesupA.asm
1334#else
1335 RuntimeGC_SOURCES += common/time/timesupref.cpp
1336#endif
1337
1338RuntimeGC_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
1339
1340ifeq ($(VBOX_LDR_FMT32),lx)
1341 RuntimeGC_SOURCES += os2/sys0.asm
1342endif
1343
1344if1of ($(KBUILD_TARGET), darwin solaris freebsd)
1345RuntimeGC_SOURCES += \
1346 common/math/gcc/adddi3.c \
1347 common/math/gcc/anddi3.c \
1348 common/math/gcc/ashldi3.c \
1349 common/math/gcc/ashrdi3.c \
1350 common/math/gcc/cmpdi2.c \
1351 common/math/gcc/divdi3.c \
1352 common/math/gcc/iordi3.c \
1353 common/math/gcc/lshldi3.c \
1354 common/math/gcc/lshrdi3.c \
1355 common/math/gcc/moddi3.c \
1356 common/math/gcc/muldi3.c \
1357 common/math/gcc/negdi2.c \
1358 common/math/gcc/notdi2.c \
1359 common/math/gcc/qdivrem.c \
1360 common/math/gcc/subdi3.c \
1361 common/math/gcc/ucmpdi2.c \
1362 common/math/gcc/udivdi3.c \
1363 common/math/gcc/umoddi3.c \
1364 common/math/gcc/xordi3.c
1365endif
1366
1367
1368#
1369# Static library for new & delete for the electric fence.
1370#
1371RuntimeEFCPP_TEMPLATE = $(RuntimeR3_TEMPLATE)
1372RuntimeEFCPP_SDKS = $(RuntimeR3_SDKS)
1373RuntimeEFCPP_SDKS.$(KBUILD_TARGET) = $(RuntimeR3_SDKS.$(KBUILD_TARGET))
1374RuntimeEFCPP_DEFS = $(RuntimeR3_DEFS)
1375RuntimeEFCPP_DEFS.$(KBUILD_TARGET) = $(RuntimeR3_DEFS.$(KBUILD_TARGET))
1376RuntimeEFCPP_INCS = $(RuntimeR3_INCS)
1377RuntimeEFCPP_INCS.$(KBUILD_TARGET) = $(RuntimeR3_INCS.$(KBUILD_TARGET))
1378RuntimeEFCPP_SOURCES = r3/alloc-ef-cpp.cpp
1379
1380
1381
1382#
1383# errmsg.cpp depends on a generated header.
1384#
1385common/err/errmsg.cpp_DEPS = $(PATH_TARGET)/errmsgdata.h
1386common/err/errmsg.cpp_INCS = $(PATH_TARGET)
1387
1388win/errmsgwin.cpp_DEPS = $(PATH_TARGET)/errmsgcomdata.h
1389win/errmsgwin.cpp_INCS = $(PATH_TARGET)
1390
1391
1392#
1393# Generate the rules (we're the to sub-makefile).
1394#
1395include $(KBUILD_PATH)/subfooter.kmk
1396
1397
1398ifneq ($(wildcard /usr/bin/chcon),)
1399# this is needed for testcases executed at build time
1400## @todo Make a special installer tool that does this.
1401$(PATH_BIN)/VBoxRT.so:
1402 $(INSTALL) $(TARGET_VBoxRT) $@
1403 chcon -t texrel_shlib_t $@ || true
1404endif
1405
1406
1407#
1408# Generate the status code data.
1409#
1410$(PATH_TARGET)/errmsgdata.h: \
1411 $(VBOX_PATH_RUNTIME_SRC)/common/err/errmsg.sed \
1412 $(PATH_ROOT)/include/iprt/err.h \
1413 $(PATH_ROOT)/include/VBox/err.h
1414 $(call MSG_GENERATE,,$@,$(filter %.h,$^))
1415 $(QUIET)$(MKDIR) -p $(PATH_TARGET)
1416 $(QUIET)$(REDIRECT) -wo $@ -- $(SED) -f $< $(filter %.h,$^)
1417
1418## @todo r=bird: rename this to indicate that it's not only COM errors, but all win32/64 errors.
1419$(PATH_TARGET)/errmsgcomdata.h: \
1420 $(VBOX_PATH_RUNTIME_SRC)/common/err/errmsgcom.sed \
1421 $$(PATH_SDK_WINPSDK_INC)/WinError.h
1422 $(call MSG_GENERATE,,$@,$(filter %.h,$^))
1423 $(QUIET)$(MKDIR) -p $(PATH_TARGET)
1424 $(QUIET)$(REDIRECT) -wo $@ -- $(SED) -f $< $(filter %.h,$^)
1425
1426
1427#
1428# Aliases for .cpp.h files so we can more easily do syntax checking from the editor.
1429#
1430ldrELFRelocatable.cpp.o: ldrELF.o
1431ldrELFRelocatable.cpp.obj: ldrELF.obj
1432
1433
1434#
1435# Doxygen documentation.
1436#
1437IPRT_DOXYFILE_INPUT_DIRS = \
1438 $(PATH_ROOT)/include/iprt \
1439 $(PATH_ROOT)/include/iprt/nocrt \
1440 $(PATH_ROOT)/include/iprt/nocrt/x86 \
1441 $(PATH_ROOT)/include/iprt/nocrt/amd64 \
1442 $(VBOX_PATH_RUNTIME_SRC)/include/internal \
1443 $(VBOX_PATH_RUNTIME_SRC)/common/alloc \
1444 $(VBOX_PATH_RUNTIME_SRC)/common/checksum \
1445 $(VBOX_PATH_RUNTIME_SRC)/common/err \
1446 $(VBOX_PATH_RUNTIME_SRC)/common/ldr \
1447 $(VBOX_PATH_RUNTIME_SRC)/common/log \
1448 $(VBOX_PATH_RUNTIME_SRC)/common/misc \
1449 $(VBOX_PATH_RUNTIME_SRC)/common/string \
1450 $(VBOX_PATH_RUNTIME_SRC)/common/table \
1451 $(VBOX_PATH_RUNTIME_SRC)/common/time \
1452 $(VBOX_PATH_RUNTIME_SRC)/VBox \
1453 $(foreach dir, $(VBOX_PATH_RUNTIME_SRC) $(VBOX_PATH_RUNTIME_SRC)/r3 $(VBOX_PATH_RUNTIME_SRC)/r0drv,\
1454 $(dir) \
1455 $(dir)/darwin \
1456 $(dir)/l4 \
1457 $(dir)/linux \
1458 $(dir)/nt \
1459 $(dir)/os2 \
1460 $(dir)/win \
1461 $(dir)/win32 \
1462 $(dir)/win64 \
1463 $(dir)/generic \
1464 )
1465
1466# These must come first in order to make things look nice.
1467IPRT_DOXYFILE_INPUT_FIRST =\
1468 $(PATH_ROOT)/include/iprt/cdefs.h \
1469 $(PATH_ROOT)/include/iprt/types.h \
1470 $(PATH_ROOT)/include/iprt/runtime.h \
1471 $(PATH_ROOT)/include/iprt/param.h \
1472 $(PATH_ROOT)/include/iprt/assert.h \
1473 $(PATH_ROOT)/include/iprt/asm.h \
1474
1475IPRT_DOXYFILE_INPUT := \
1476 $(filter-out %.cpp.h, $(sort $(wildcard $(addsuffix /*.h, $(IPRT_DOXYFILE_INPUT_DIRS)))) ) \
1477 $(foreach dir, $(IPRT_DOXYFILE_INPUT_DIRS), $(wildcard $(dir)/*.cpp $(dir)/.c $(dir)/.asm))
1478IPRT_DOXYFILE_INPUT := \
1479 $(IPRT_DOXYFILE_INPUT_FIRST) \
1480 $(filter-out $(IPRT_DOXYFILE_INPUT_FIRST), $(IPRT_DOXYFILE_INPUT))
1481
1482
1483IPRT_DOXYFILE_OUTPUT = $(PATH_OUT)/docs/iprt
1484
1485-include $(PATH_TARGET)/Doxyfile.iprt.dep
1486
1487# Generate the Doxyfile
1488$(PATH_TARGET)/Doxyfile.iprt: \
1489 $(VBOX_PATH_RUNTIME_SRC)/Doxyfile \
1490 $(VBOX_PATH_RUNTIME_SRC)/Makefile.kmk \
1491 $(comp-vars IPRT_DOXYFILE_INPUT,DOXYGEN_INPUT_PREV,FORCE) \
1492 $(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE) \
1493 | $(call DIRDEP, $(PATH_TARGET))
1494 $(RM) -f $@ [email protected] $(PATH_TARGET)/Doxyfile.iprt.dep
1495 $(CP) -f $(VBOX_PATH_RUNTIME_SRC)/Doxyfile [email protected]
1496 $(APPEND) [email protected]
1497 $(APPEND) [email protected] "OUTPUT_DIRECTORY = $(IPRT_DOXYFILE_OUTPUT)"
1498 $(APPEND) [email protected] "WARN_LOGFILE = $(IPRT_DOXYFILE_OUTPUT)/errors"
1499 $(APPEND) [email protected] "INCLUDE_PATH = $(PATH_ROOT)/include include . common/table"
1500 $(APPEND) [email protected] "INCLUDE_FILE_PATTERNS = *.cpp.h"
1501 $(APPEND) [email protected] "PREDEFINED += $(ARCH_BITS_DEFS)"
1502 $(APPEND) [email protected]
1503 $(APPEND) [email protected] "INPUT = $(IPRT_DOXYFILE_INPUT)"
1504 $(APPEND) [email protected]
1505 $(MV) -f [email protected] $@
1506 @$(APPEND) $(PATH_TARGET)/Doxyfile.iprt.dep "DOXYGEN_OUTPUT_PREV = $(IPRT_DOXYFILE_OUTPUT)"
1507 @$(APPEND) $(PATH_TARGET)/Doxyfile.iprt.dep "DOXYGEN_INPUT_PREV = $(IPRT_DOXYFILE_INPUT)"
1508
1509# Create the output directory.
1510$(call DIRDEP, $(IPRT_DOXYFILE_OUTPUT)):
1511 $(MKDIR) -p $@
1512
1513# Do the actual job.
1514$(PATH_TARGET)/docs.iprt: $(PATH_TARGET)/Doxyfile.iprt $(IPRT_DOXYFILE_INPUT) | $(call DIRDEP, $(IPRT_DOXYFILE_OUTPUT))
1515 $(RM) -f $(wildcard $(IPRT_DOXYFILE_OUTPUT)/html/*) $(PATH_TARGET)/docs.iprt
1516 doxygen $(PATH_TARGET)/Doxyfile.iprt
1517 $(APPEND) $(PATH_TARGET)/docs.iprt
1518
1519# alias
1520docs: $(PATH_TARGET)/docs.iprt
1521
1522test:
1523 @echo test-$(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE)
1524 @echo $(IPRT_DOXYFILE_OUTPUT)
1525 @echo $(DOXYGEN_OUTPUT_PREV)
1526 @echo $(IPRT_DOXYFILE_INPUT)
1527
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