VirtualBox

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

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

Freebsd only needs one RTTimerCreate-generic.cpp.

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