VirtualBox

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

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

The Giant CDDL Dual-License Header Change.

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