VirtualBox

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

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

Generic implementations of the new RTMp functions.

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