VirtualBox

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

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

Drop the old remote building.

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