VirtualBox

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

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

kStuff on Darwin and OS/2, no more special magic in src/VBox/Runtime.

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