VirtualBox

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

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

Converted gcc ASMMultU64ByU32DivByU32 inline code to nasm in order to speed up the MSC builds (yes, it makes a noticable difference for TSC).

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

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette