VirtualBox

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

Last change on this file since 9780 was 9741, checked in by vboxsync, 17 years ago

Split out RTUuidCreate, so we don't drag in RTRand when we don't need to create UUIDs.

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