VirtualBox

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

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

RTMpGetCount for 'posix'.

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