VirtualBox

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

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

Introducing VBOX_ONLY_ADDITIONS.

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