VirtualBox

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

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

Merged r3/win32 and r3/win64

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