VirtualBox

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

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

Replaced VBOXLNX32GUESTR0 by VBOXGUESTR0, VBOX_WITH_LINUX_ADDITIONS_32BIT_R0 by VBOX_WITH_ADDITION_DRIVERS, RuntimeLnx32GuestR0 by RuntimeW32GuestR0, and VBoxGuestLib[Base]Linux to VBoxGuestR0Lib[Base].

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