VirtualBox

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

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

Removed RuntimeLnx32GuestR3, nobody is using it any longer.

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