VirtualBox

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

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

Added RTErrConvertFromDarwin() as a merge of the IO, Kern and COM versions.

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