VirtualBox

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

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

KMK_USE_REDIRECT

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