VirtualBox

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

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

It's BUILD_TARGET not TARGET.

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

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette