VirtualBox

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

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

IPRT: assert-r0drv-nt.c -> assert-r0drv-nt.cpp.

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