VirtualBox

source: vbox/trunk/src/VBox/Runtime/Makefile@ 1

最後變更 在這個檔案從1是 1,由 vboxsync 提交於 55 年 前

import

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 21.6 KB
 
1# $Id: Makefile 1 1970-01-01 00:00:00Z vboxsync $
2## @file
3# Makefile for the InnoTek Portable Runtime (IPRT).
4#
5
6#
7# Copyright (C) 2006 InnoTek Systemberatung GmbH
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.alldomusa.eu.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# If you received this file as part of a commercial VirtualBox
18# distribution, then only the terms of your commercial VirtualBox
19# license agreement apply instead of the previous paragraph.
20#
21
22
23DEPTH = ../../..
24include $(PATH_KBUILD)/header.kmk
25
26ifndef VBOX_ADDITIONS_LINUX_ONLY
27 # Normal mode.
28 BLDPROGS = uniread
29 LIBRARIES = RuntimeR3 RuntimeR0 RuntimeGC RuntimeEFCPP RuntimeR3NoCRTGCC
30 ifdef VBOX_WITH_VBOXDRV
31 LIBRARIES += RuntimeR0Drv
32 endif
33 ifdef VBOX_WITH_WIN32_ADDITIONS
34 LIBRARIES += RuntimeW32GuestR0 RuntimeW32GuestR3 RuntimeW32NT4GuestR0
35 endif
36 ifdef VBOX_WITH_LINUX_ADDITIONS
37 LIBRARIES += RuntimeLnx32GuestR0 RuntimeLnx32GuestR3
38 endif
39 LIBRARIES.l4= RuntimeR3L4
40 DLLS = VBoxRT
41 OTHER_CLEAN = \
42 $(PATH_TARGET)/errmsgdata.h \
43 $(PATH_TARGET)/errmsgcomdata.h \
44 $(PATH_TARGET)/Doxyfile \
45 $(PATH_TARGET)/Doxyfile.dep \
46 $(PATH_TARGET)/docs.iprt
47
48 SUBDIRS_AFTER = testcase
49
50else
51 # Linux target guest runtime only mode.
52 LIBRARIES = RuntimeLnx32GuestR0 RuntimeLnx32GuestR3
53endif # only linux guest additions
54
55
56# global (for now at least)
57INCS += include
58
59
60#
61# Unicode Specification reader used to regenerate unidata.cpp.
62#
63uniread_TEMPLATE = VBOXBLDPROG
64uniread_SOURCES = uniread.cpp
65
66#
67# Win64 assembly sources.
68#
69RuntimeWin64ASM_SOURCES = \
70 win64/ASMAtomicBitClear.asm \
71 win64/ASMAtomicBitTestAndToggle.asm \
72 win64/ASMAtomicBitToggle.asm \
73 win64/ASMAtomicReadU64.asm \
74 win64/ASMAtomicXchgU16.asm \
75 win64/ASMAtomicXchgU8.asm \
76 win64/ASMBitFirstClear.asm \
77 win64/ASMBitFirstSet.asm \
78 win64/ASMGetCS.asm \
79 win64/ASMGetDS.asm \
80 win64/ASMGetES.asm \
81 win64/ASMGetFlags.asm \
82 win64/ASMGetFS.asm \
83 win64/ASMGetGS.asm \
84 win64/ASMGetIDTR.asm \
85 win64/ASMGetSS.asm \
86 win64/ASMProbeReadByte.asm \
87 win64/ASMSetFlags.asm \
88 win64/ASMGetDR0.asm \
89 win64/ASMGetDR1.asm \
90 win64/ASMGetDR2.asm \
91 win64/ASMGetDR3.asm \
92 win64/ASMGetDR6.asm \
93 win64/ASMGetDR7.asm \
94
95#
96# RuntimeR3 - Static Runtime for Ring-3 executables.
97#
98RuntimeR3_TEMPLATE = VBOXR3EXE
99RuntimeR3_SDKS.win = WINPSDK W2K3DDK
100RuntimeR3_DEFS = IN_RT_R3 IN_SUP_R3 LDR_WITH_NATIVE LDR_WITH_ELF32 LDR_WITH_PE RT_WITH_VBOX
101ifdef IPRT_WITH_KLDR
102 RuntimeR3_DEFS += LDR_WITH_KLDR KLDR_USE_CRT
103 RuntimeR3_DEFS.debug += KLDRMOD_STRICT KLDRMODLX_STRICT KLDRMODPE_STRICT KLDRMODNATIVE_STRICT KLDRRDR_STRICT
104endif
105RuntimeR3_DEFS.l4 = L4
106ifdef VBOX_MAIN_RELEASE_LOG ## @todo (dmik): temporary, until RTThreadSelf/RTThreadAdopt are properly updated
107 RuntimeR3_DEFS += RTCRITSECT_STRICT
108endif
109RuntimeR3_INCS = \
110 $(PATH_ROOT)/src/libs/liblzf-1.51
111ifdef IPRT_WITH_KLDR
112 RuntimeR3_INCS += \
113 $(IPRT_PATH_KLDR)
114endif
115RuntimeR3_INCS.os2 = \
116 $(PATH_ROOT)/src/libs/libuuid
117RuntimeR3_INCS.l4 = \
118 $(PATH_ROOT)/src/libs/libuuid \
119 $(L4_INCDIR)
120
121RuntimeR3_SOURCES = \
122 alloc.cpp \
123 assert.cpp \
124 table/avlhcphys.cpp \
125 table/avlogcphys.cpp \
126 table/avlogcptr.cpp \
127 table/avlohcphys.cpp \
128 table/avloioport.cpp \
129 table/avlpv.cpp \
130 table/avlrogcphys.cpp \
131 table/avlrogcptr.cpp \
132 table/avlroogcptr.cpp \
133 table/avlroioport.cpp \
134 table/avlu32.cpp \
135 table/avlul.cpp \
136 table/table.cpp \
137 crc32.cpp \
138 crc64.cpp \
139 dir.cpp \
140 errmsg.cpp \
141 fileio.cpp \
142 fs.cpp \
143 generic/critsect-generic.cpp \
144 generic/RTFileCopy-generic.cpp \
145 generic/RTLogWriteStdErr-generic.cpp \
146 generic/RTLogWriteStdOut-generic.cpp \
147 generic/RTLogWriteUser-generic.cpp \
148 generic/semfastmutex-generic.cpp \
149 generic/spinlock-generic.cpp \
150 ldr.cpp \
151 ldrFile.cpp \
152 ldrNative.cpp \
153 ldrELF.cpp \
154 ldrEx.cpp \
155 ldrPE.cpp \
156 log.cpp \
157 logcom.cpp \
158 logformat.cpp \
159 md5.cpp \
160 path.cpp \
161 r3/alloc-ef.cpp \
162 r3/alloc.cpp \
163 r3/init.cpp \
164 r3/process.cpp \
165 r3/stream.cpp \
166 r3/tcp.cpp \
167 RTErrConvertFromErrno.cpp \
168 semspingpong.cpp \
169 straprintf.cpp \
170 strformat.cpp \
171 strformatrt.cpp \
172 string.cpp \
173 strprintf.cpp \
174 strspace.cpp \
175 strstrip.cpp \
176 strtonum.cpp \
177 thread.cpp \
178 time.cpp \
179 timeprog.cpp \
180 uni.cpp \
181 unidata.cpp \
182 utf-16.cpp \
183 utf-8.cpp \
184 zip.cpp \
185
186ifdef IPRT_WITH_KLDR
187 RuntimeR3_SOURCES += \
188 ldrkLdr.cpp \
189 $(IPRT_PATH_KLDR)/kLdrMod.c \
190 $(IPRT_PATH_KLDR)/kLdrModLX.c \
191 $(IPRT_PATH_KLDR)/kLdrModPE.c \
192 $(IPRT_PATH_KLDR)/kLdrModNative.c \
193 $(IPRT_PATH_KLDR)/kLdrMisc.c \
194 $(IPRT_PATH_KLDR)/kLdrRdr.c \
195 $(IPRT_PATH_KLDR)/kLdrHlpStr.c
196# We Implement these using IPRT facilities.
197# $(IPRT_PATH_KLDR)/kLdrHlp.c \
198# $(IPRT_PATH_KLDR)/kLdrHlpHeap.c \
199# $(IPRT_PATH_KLDR)/kLdrHlpSem.c \
200# $(IPRT_PATH_KLDR)/kLdrHlpMem.c \
201# $(IPRT_PATH_KLDR)/kLdrHlpPath.c
202
203endif
204
205# VBox specific stuff.
206RuntimeR3_SOURCES += \
207 VBox/strformat-vbox.cpp \
208 VBox/log-vbox.cpp
209
210RuntimeR3_SOURCES.win = \
211 generic/RTDirQueryInfo-generic.cpp \
212 generic/RTDirSetTimes-generic.cpp \
213 generic/semsrw-generic.cpp \
214 generic/semnoint-generic.cpp \
215 nt/RTErrConvertFromNtStatus.cpp \
216 win32/errmsgwin.cpp \
217 r3/win32/alloc-win32.cpp \
218 r3/win32/dir-win32.cpp \
219 r3/win32/fileio-win32.cpp \
220 r3/win32/fs-win32.cpp \
221 r3/win32/ldrNative-win32.cpp \
222 r3/win32/path-win32.cpp \
223 r3/win32/process-win32.cpp \
224 r3/win32/RTLogWriteDebugger-win32.cpp \
225 r3/win32/sched-win32.cpp \
226 r3/win32/sems-win32.cpp \
227 r3/win32/system-win32.cpp \
228 r3/win32/thread-win32.cpp \
229 r3/win32/time-win32.cpp \
230 r3/win32/timer-win32.cpp \
231 r3/win32/utf16locale-win32.cpp \
232 r3/win32/utf8-win32.cpp \
233 r3/win32/uuid-win32.cpp \
234 timesup.cpp \
235 win32/RTErrConvertFromWin32.cpp
236
237RuntimeR3_SOURCES.win.amd64 = \
238 $(RuntimeWin64ASM_SOURCES)
239
240RuntimeR3_SOURCES.linux = \
241 generic/RTDirQueryInfo-generic.cpp \
242 generic/RTDirSetTimes-generic.cpp \
243 generic/RTFileMove-generic.cpp \
244 generic/RTLogWriteDebugger-generic.cpp \
245 generic/pathhost-generic.cpp \
246 r3/linux/sched-linux.cpp \
247 r3/linux/uuid-linux.cpp \
248 r3/posix/alloc-posix.cpp \
249 r3/posix/dir-posix.cpp \
250 r3/posix/fileio-posix.cpp \
251 r3/posix/fs-posix.cpp \
252 r3/posix/ldrNative-posix.cpp \
253 r3/posix/path-posix.cpp \
254 r3/posix/process-posix.cpp \
255 r3/posix/sems-posix.cpp \
256 r3/posix/system-posix.cpp \
257 r3/posix/thread-posix.cpp \
258 r3/posix/time-posix.cpp \
259 r3/posix/timer-posix.cpp \
260 generic/utf16locale-generic.cpp \
261 r3/posix/utf8-posix.cpp \
262 timesup.cpp \
263
264RuntimeR3_SOURCES.os2 = \
265 generic/RTDirQueryInfo-generic.cpp \
266 generic/RTDirSetTimes-generic.cpp \
267 generic/RTFileMove-generic.cpp \
268 generic/RTLogWriteDebugger-generic.cpp \
269 generic/pathhost-generic.cpp \
270 generic/semsrw-generic.cpp \
271 generic/semnoint-generic.cpp \
272 generic/sched-generic.cpp \
273 os2/RTErrConvertFromOS2.cpp \
274 r3/linux/uuid-linux.cpp \
275 r3/os2/sems-os2.cpp \
276 r3/os2/system-os2.cpp \
277 r3/os2/thread-os2.cpp \
278 r3/posix/alloc-posix.cpp \
279 r3/posix/dir-posix.cpp \
280 r3/posix/fileio-posix.cpp \
281 r3/posix/fs-posix.cpp \
282 r3/posix/ldrNative-posix.cpp \
283 r3/posix/path-posix.cpp \
284 r3/posix/process-posix.cpp \
285 r3/posix/time-posix.cpp \
286 r3/posix/timer-posix.cpp \
287 generic/utf16locale-generic.cpp \
288 r3/posix/utf8-posix.cpp \
289 timesup.cpp \
290
291RuntimeR3_SOURCES.darwin = \
292 generic/RTDirQueryInfo-generic.cpp \
293 generic/RTDirSetTimes-generic.cpp \
294 generic/RTFileMove-generic.cpp \
295 generic/RTLogWriteDebugger-generic.cpp \
296 generic/pathhost-generic.cpp \
297 r3/darwin/alloc-darwin.cpp \
298 r3/posix/dir-posix.cpp \
299 r3/posix/fileio-posix.cpp \
300 r3/posix/fs-posix.cpp \
301 r3/posix/ldrNative-posix.cpp \
302 r3/posix/path-posix.cpp \
303 r3/posix/process-posix.cpp \
304 generic/sched-generic.cpp \
305 r3/posix/sems-posix.cpp \
306 r3/posix/system-posix.cpp \
307 r3/posix/thread-posix.cpp \
308 r3/darwin/time-darwin.cpp \
309 r3/posix/timer-posix.cpp \
310 generic/utf16locale-generic.cpp \
311 r3/posix/utf8-posix.cpp \
312 r3/linux/uuid-linux.cpp \
313 timesup.cpp \
314
315
316
317#
318# L4 RuntimeR3 subtarget since L4 headers won't work with VBOXR3.
319#
320RuntimeR3L4_TEMPLATE = VBOXR3NP
321RuntimeR3L4_DEFS = IN_RT_R3 IN_SUP_R3 LDR_WITH_NATIVE LDR_WITH_ELF LDR_WITH_PE
322RuntimeR3L4_INCS = $(L4_INCDIR) \
323 $(PATH_ROOT)/src/libs/libuuid
324
325RuntimeR3L4_SOURCES = \
326 generic/RTDirQueryInfo-generic.cpp \
327 generic/RTDirSetTimes-generic.cpp \
328 generic/RTFileMove-generic.cpp \
329 generic/RTLogWriteDebugger-generic.cpp \
330 generic/fs-stubs-generic.cpp \
331 generic/pathhost-generic.cpp \
332 generic/sched-generic.cpp \
333 generic/semsrw-generic.cpp \
334 generic/semnoint-generic.cpp \
335 l4/l4-errno.cpp \
336 l4/process-l4env.cpp \
337 l4/sems-l4env.cpp \
338 l4/system-l4env.cpp \
339 l4/thread-l4env.cpp \
340 l4/timer-l4env.cpp \
341 generic/utf16locale-generic.cpp \
342 l4/utf8-l4env.cpp \
343 r3/linux/uuid-linux.cpp \
344 r3/posix/alloc-posix.cpp \
345 r3/posix/dir-posix.cpp \
346 r3/posix/fileio-posix.cpp \
347 r3/posix/ldrNative-posix.cpp \
348 r3/posix/path-posix.cpp \
349 r3/posix/time-posix.cpp \
350 timesup.cpp
351
352#
353# RuntimeW32GuestR3 - Win32 guest program runtime.
354#
355RuntimeW32GuestR3_TEMPLATE = VBOXW32GUESTR3LIB
356RuntimeW32GuestR3_SDKS = $(RuntimeR3_SDKS.win) $(RuntimeR3_SDKS.win.x86) $(RuntimeR3_SDKS)
357RuntimeW32GuestR3_DEFS = $(RuntimeR3_DEFS)
358RuntimeW32GuestR3_DEFS.$(BUILD_TYPE) = $(RuntimeR3_DEFS).$(BUILD_TYPE)
359RuntimeW32GuestR3_SOURCES = $(RuntimeR3_SOURCES.win) $(RuntimeR3_SOURCES)
360RuntimeW32GuestR3_INCS = $(RuntimeR3_INCS.win) $(RuntimeR3_INCS)
361
362
363#
364# RuntimeLnx32GuestR3 - 32-bit Linux guest program runtime.
365#
366RuntimeLnx32GuestR3_TEMPLATE = VBOXLNX32GUESTR3LIB
367RuntimeLnx32GuestR3_DEFS = $(RuntimeR3_DEFS.linux) $(RuntimeR3_DEFS) IN_GUEST IN_GUEST_R3
368RuntimeLnx32GuestR3_DEFS.$(BUILD_TYPE) = $(RuntimeR3_DEFS.$(BUILD_TYPE))
369RuntimeLnx32GuestR3_SOURCES = $(RuntimeR3_SOURCES.linux) $(RuntimeR3_SOURCES)
370RuntimeLnx32GuestR3_INCS = $(RuntimeR3_INCS.linux) $(RuntimeR3_INCS)
371
372
373#
374# VBoxRT - Shared Object / DLL version.
375#
376VBoxRT_TEMPLATE = VBOXR3
377VBoxRT_SDKS.win = WINPSDK W2K3DDK
378VBoxRT_DEFS = $(RuntimeR3_DEFS) IN_SUP_R3 IN_SUP_R3
379VBoxRT_DEFS.$(BUILD_TYPE) = $(RuntimeR3_DEFS.$(BUILD_TYPE))
380VBoxRT_SOURCES = \
381 VBox/VBoxRTDeps.cpp \
382 $(RuntimeR3_SOURCES)
383VBoxRT_SOURCES.$(BUILD_TARGET) = $(RuntimeR3_SOURCES.$(BUILD_TARGET))
384VBoxRT_SOURCES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH) = $(RuntimeR3_SOURCES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH))
385VBoxRT_SOURCES.win += r3/win32/dllmain-win32.cpp
386VBoxRT_SOURCES.win.amd64 += r3/win64/VBoxRT-win64.def
387VBoxRT_INCS = $(RuntimeR3_INCS)
388VBoxRT_INCS.$(BUILD_TARGET) = $(RuntimeR3_INCS.$(BUILD_TARGET))
389VBoxRT_INCS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH) = $(RuntimeR3_INCS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH))
390VBoxRT_LIBS = \
391 $(PATH_LIB)/SUPR3$(VBOX_SUFF_LIB) \
392 $(PATH_LIB)/VBox-liblzf$(VBOX_SUFF_LIB)
393VBoxRT_LIBS.darwin = \
394 iconv
395VBoxRT_LIBS.win = \
396 $(PATH_SDK_W2K3DDK_LIB)/ntdll.lib
397VBoxRT_LIBS.os2 = \
398 $(PATH_LIB)/VBox-uuid$(VBOX_SUFF_LIB)
399ifdef VBOX_USE_VCC80
400VBoxRT_LDFLAGS.win = /MANIFEST
401endif
402VBoxRT_LDFLAGS.l4 = \
403 -Wl,-whole-archive \
404 $(PATH_LIB)/RuntimeR3L4$(VBOX_SUFF_LIB) \
405 -Wl,-no-whole-archive
406ifeq ($(BUILD_TARGET),l4)
407VBoxRT_LIBS += \
408 $(L4_LIBDIR)/libl4sys.a \
409 $(L4_LIBDIR)/libl4sys.p.a
410endif
411VBoxRT_LIBS.l4 = \
412 $(PATH_LIB)/VBox-uuid$(VBOX_SUFF_LIB) \
413 $(PATH_LIB)/RuntimeR3L4$(VBOX_SUFF_LIB)
414
415#
416# RuntimeR3NoCRTGCC - CRT replacement lib for VBoxREM.
417# This is used together with VBoxRT.
418#
419RuntimeR3NoCRTGCC_TEMPLATE = VBOXNOCRTGCC
420RuntimeR3NoCRTGCC_SOURCES = \
421 \
422 math/ceill.asm \
423 math/cosl.asm \
424 math/fabs.asm \
425 math/fabsf.asm \
426 math/fabsl.asm \
427 math/floor.asm \
428 math/floorf.asm \
429 math/floorl.asm \
430 math/ldexpl.asm \
431 math/llrint.asm \
432 math/llrintf.asm \
433 math/llrintl.asm \
434 math/logl.asm \
435 math/lrint.asm \
436 math/lrintf.asm \
437 math/lrintl.asm \
438 math/remainder.asm \
439 math/remainderf.asm \
440 math/remainderl.asm \
441 math/sinl.asm \
442 math/tanl.asm \
443 math/trunc.asm \
444 math/truncf.asm \
445 math/truncl.asm \
446 \
447 misc/setjmp.asm \
448 \
449 string/memcpy.asm \
450 string/memcpy_alias.c \
451 string/mempcpy.asm \
452 string/memset.asm \
453 string/memset_alias.c
454
455RuntimeR3NoCRTGCC_SOURCES.x86 = \
456 math/x86/fenv-x86.c
457
458
459## @todo stop using the old memcpy.c and memset.c code.
460
461#
462# RuntimeR0 - Ring0 library for VMMR0.
463#
464RuntimeR0_TEMPLATE = VBOXR0
465RuntimeR0_DEFS = IN_RT_R0 RT_WITH_VBOX
466RuntimeR0_SOURCES = \
467 assert.cpp \
468 table/avlhcphys.cpp \
469 table/avlogcphys.cpp \
470 table/avlohcphys.cpp \
471 table/avlpv.cpp \
472 table/avlrogcphys.cpp \
473 table/avlogcptr.cpp \
474 table/avlrogcptr.cpp \
475 table/avlroogcptr.cpp \
476 table/avloioport.cpp \
477 table/avlroioport.cpp \
478 logcom.cpp \
479 logformat.cpp \
480 strformat.cpp \
481 strformatrt.cpp \
482 strprintf.cpp \
483 string/memchr.cpp \
484 string/memcmp.cpp \
485 string/memcpy.cpp \
486 string/memset.cpp \
487 string/strcpy.cpp \
488 string/strlen.cpp \
489 string/strncmp.cpp \
490 string/strpbrk.cpp \
491 VBox/strformat-vbox.cpp \
492 timesup.cpp
493
494RuntimeR0_SOURCES.win.amd64 = $(RuntimeWin64ASM_SOURCES)
495
496RuntimeR0_SOURCES.os2 = \
497 os2/RTErrConvertFromOS2.cpp \
498 os2/sys0.asm
499
500string/memchr.cpp_CXXFLAGS.win = -Oi-
501string/memcmp.cpp_CXXFLAGS.win = -Oi-
502string/memcpy.cpp_CXXFLAGS.win = -Oi-
503string/memset.cpp_CXXFLAGS.win = -Oi-
504string/strcpy.cpp_CXXFLAGS.win = -Oi-
505string/strlen.cpp_CXXFLAGS.win = -Oi-
506
507ifeq ($(BUILD_TARGET),l4)
508RuntimeR0Drv_BLD_TRG = linux
509RuntimeR0Drv_BLD_TRG_ARCH = x86
510RuntimeR0Drv_BLD_TRG_CPU = i386
511endif
512
513#
514# RuntimeR0Drv - Ring0 library for host drivers.
515#
516RuntimeR0Drv_TEMPLATE = VBOXR0DRV
517RuntimeR0Drv_SDKS.win = W2K3DDK WINPSDKINCS
518RuntimeR0Drv_DEFS = IN_RT_R0 RT_WITH_VBOX
519RuntimeR0Drv_DEFS.win = IN_SUP_R0
520RuntimeR0Drv_DEFS.linux = MODULE KBUILD_MODNAME=KBUILD_STR\(vboxdrv\) KBUILD_BASENAME=KBUILD_STR\(vboxdrv\) IN_SUP_R0 # why is IN_SUP_R0 here? because!
521
522RuntimeR0Drv_INCS.linux = \
523 r0drv/linux
524
525RuntimeR0Drv_SOURCES = \
526 assert.cpp \
527 log.cpp \
528 logcom.cpp \
529 logformat.cpp \
530 string/strpbrk.cpp \
531 strformat.cpp \
532 strformatrt.cpp \
533 strtonum.cpp \
534 VBox/strformat-vbox.cpp \
535 r0drv/alloc-r0drv.cpp \
536 generic/RTLogWriteStdErr-stub-generic.cpp \
537 generic/RTLogWriteStdOut-stub-generic.cpp \
538 generic/RTLogWriteUser-generic.cpp \
539 VBox/log-vbox.cpp \
540 crc32.cpp \
541 crc64.cpp
542
543RuntimeR0Drv_SOURCES.linux = \
544 r0drv/linux/alloc-r0drv-linux.c \
545 r0drv/linux/RTLogWriteDebugger-r0drv-linux.c \
546 r0drv/linux/semaphore-r0drv-linux.c \
547 r0drv/linux/spinlock-r0drv-linux.c \
548 r0drv/linux/thread-r0drv-linux.c
549
550RuntimeR0Drv_SOURCES.win = \
551 nt/RTErrConvertFromNtStatus.cpp \
552 r0drv/nt/alloc-r0drv-nt.cpp \
553 r0drv/nt/RTLogWriteDebugger-r0drv-nt.cpp \
554 r0drv/nt/semaphore-r0drv-nt.cpp \
555 r0drv/nt/spinlock-r0drv-nt.cpp \
556 r0drv/nt/thread-r0drv-nt.cpp \
557 string/strncmp.cpp
558
559RuntimeR0Drv_SOURCES.win.amd64 = \
560 $(RuntimeWin64ASM_SOURCES)
561
562RuntimeR0Drv_SOURCES.darwin = \
563 RTErrConvertFromErrno.cpp \
564 r0drv/initterm-r0drv.cpp \
565 r0drv/memobj-r0drv.cpp \
566 r0drv/thread-r0drv.cpp \
567 r0drv/darwin/alloc-r0drv-darwin.cpp \
568 r0drv/darwin/memobj-r0drv-darwin.cpp \
569 r0drv/darwin/initterm-r0drv-darwin.cpp \
570 r0drv/darwin/RTLogWriteDebugger-r0drv-darwin.cpp \
571 r0drv/darwin/semaphore-r0drv-darwin.cpp \
572 r0drv/darwin/spinlock-r0drv-darwin.cpp \
573 r0drv/darwin/thread-r0drv-darwin.cpp \
574 r0drv/darwin/time-r0drv-darwin.cpp \
575
576RuntimeR0Drv_SOURCES.os2 = \
577 os2/RTErrConvertFromOS2.cpp \
578 os2/sys0.asm
579
580
581#
582# RuntimeW32GuestR0 - Win32 guest driver runtime.
583#
584RuntimeW32GuestR0_TEMPLATE = VBOXW32GUESTR0LIB
585RuntimeW32GuestR0_SDKS = W2K3DDKX86 WINPSDKINCS
586RuntimeW32GuestR0_DEFS = $(RuntimeR0Drv_DEFS.win) $(RuntimeR0Drv_DEFS.win.x86) $(RuntimeR0Drv_DEFS)
587RuntimeW32GuestR0_INCS = $(RuntimeR0Drv_INCS.win) $(RuntimeR0Drv_INCS.win.x86) $(RuntimeR0Drv_INCS)
588RuntimeW32GuestR0_SOURCES = \
589 $(RuntimeR0Drv_SOURCES) \
590 $(RuntimeR0Drv_SOURCES.win) \
591 VBox/logbackdoor.cpp \
592 logR0.cpp
593ifdef VBOX_USE_VCC80
594RuntimeW32GuestR0_SOURCES += \
595 string/memchr.cpp \
596 string/memcmp.cpp \
597 string/memcpy.cpp \
598 string/memset.cpp \
599 string/strlen.cpp
600endif
601
602
603#
604# RuntimeW32NT4GuestR0 - Win32 NT4 guest driver runtime.
605#
606RuntimeW32NT4GuestR0_TEMPLATE = VBOXW32GUESTR0LIB
607RuntimeW32NT4GuestR0_SDKS = $(RuntimeW32GuestR0_SDKS)
608RuntimeW32NT4GuestR0_DEFS = $(RuntimeW32GuestR0_DEFS) IPRT_TARGET_NT4
609RuntimeW32NT4GuestR0_INCS = $(RuntimeW32GuestR0_INCS)
610RuntimeW32NT4GuestR0_SOURCES = $(RuntimeW32GuestR0_SOURCES)
611
612
613#
614# RuntimeLnx32GuestR0 - 32-bit Linux guest driver runtime.
615#
616RuntimeLnx32GuestR0_TEMPLATE = VBOXLNX32GUESTR0
617RuntimeLnx32GuestR0_DEFS = $(RuntimeR0Drv_DEFS.linux) $(RuntimeR0Drv_DEFS) IN_GUEST IN_GUEST_R0
618RuntimeLnx32GuestR0_INCS = $(RuntimeR0Drv_INCS.linux) $(RuntimeR0Drv_INCS)
619RuntimeLnx32GuestR0_SOURCES = \
620 $(RuntimeR0Drv_SOURCES) \
621 $(RuntimeR0Drv_SOURCES.linux) \
622 VBox/logbackdoor.cpp
623
624#
625# RuntimeGC - Guest context library.
626#
627RuntimeGC_TEMPLATE = VBOXGC
628RuntimeGC_DEFS = IN_RT_GC RT_WITH_VBOX
629RuntimeGC_SOURCES = \
630 table/avlogcphys.cpp \
631 table/avlrogcphys.cpp \
632 table/avlogcptr.cpp \
633 table/avlohcphys.cpp \
634 table/avlrogcptr.cpp \
635 table/avlroogcptr.cpp \
636 table/avloioport.cpp \
637 table/avlroioport.cpp \
638 assert.cpp \
639 log.cpp \
640 logcom.cpp \
641 logformat.cpp \
642 string/strpbrk.cpp \
643 string/strncmp.cpp \
644 strformat.cpp \
645 strformatrt.cpp \
646 strprintf.cpp \
647 VBox/strformat-vbox.cpp \
648 timesup.cpp \
649 string/memchr.cpp \
650 string/memcmp.cpp \
651 string/memcpy.cpp \
652 string/memset.cpp \
653 string/strcpy.cpp \
654 string/strlen.cpp
655
656ifeq ($(VBOX_LDR_FMT32),lx)
657RuntimeGC_SOURCES += os2/sys0.asm
658endif
659
660
661#
662# Static library for new & delete for the electric fence.
663#
664RuntimeEFCPP_TEMPLATE = $(RuntimeR3_TEMPLATE)
665RuntimeEFCPP_SDKS = $(RuntimeR3_SDKS)
666RuntimeEFCPP_SDKS.$(BUILD_TARGET) = $(RuntimeR3_SDKS.$(BUILD_TARGET))
667RuntimeEFCPP_DEFS = $(RuntimeR3_DEFS)
668RuntimeEFCPP_DEFS.$(BUILD_TARGET) = $(RuntimeR3_DEFS.$(BUILD_TARGET))
669RuntimeEFCPP_INCS = $(RuntimeR3_INCS)
670RuntimeEFCPP_INCS.$(BUILD_TARGET) = $(RuntimeR3_INCS.$(BUILD_TARGET))
671RuntimeEFCPP_SOURCES = r3/alloc-ef-cpp.cpp
672
673
674
675#
676# errmsg.cpp depends on a generated header.
677#
678errmsg.cpp_DEPS = $(PATH_TARGET)/errmsgdata.h
679errmsg.cpp_INCS = $(PATH_TARGET)
680
681win32/errmsgwin.cpp_DEPS = $(PATH_TARGET)/errmsgcomdata.h
682win32/errmsgwin.cpp_INCS = $(PATH_TARGET)
683
684linux/errmsglinux.cpp_DEPS = $(PATH_TARGET)/errmsgxpcomdata.h
685linux/errmsglinux.cpp_INCS = $(PATH_TARGET)
686
687
688# Generate the rules
689include $(PATH_KBUILD)/footer.kmk
690
691
692#
693# Generate the status code data.
694#
695$(PATH_TARGET)/errmsgdata.h: errmsg.sed $(DEPTH)/include/iprt/err.h $(DEPTH)/include/VBox/err.h
696 $(call MSG_L1,Generating $@)
697 $(QUIET)$(MKDIR) -p $(PATH_TARGET)
698 $(QUIET)$(SED) -f $< $(filter %.h,$^) > $@
699## @todo r=bird: rename this to indicate that it's not only COM errors, but all win32/64 errors.
700$(PATH_TARGET)/errmsgcomdata.h: errmsgcom.sed $(PATH_SDK_WINPSDK_INC)/WinError.h
701 $(call MSG_L1,Generating $@)
702 $(QUIET)$(MKDIR) -p $(PATH_TARGET)
703 $(QUIET)$(SED) -f $< $(filter %.h,$^) > $@
704$(PATH_TARGET)/errmsgxpcomdata.h: errmsgxpcom.sed $(DEPTH)/src/libs/xpcom18a4/xpcom/base/nsError.h
705 $(call MSG_L1,Generating $@)
706 $(QUIET)$(MKDIR) -p $(PATH_TARGET)
707 $(QUIET)$(SED) -f $< $(filter %.h,$^) > $@
708
709
710#
711# Aliases for .cpp.h files so we can more easily do syntax checking from the editor.
712#
713ldrELFRelocatable.cpp.o: ldrELF.o
714ldrELFRelocatable.cpp.obj: ldrELF.obj
715
716
717#
718# Doxygen documentation.
719#
720DOXYGEN_INPUT_DIRS = \
721 $(PATH_ROOT)/include/iprt \
722 $(PATH_ROOT)/include/iprt/nocrt \
723 $(PATH_ROOT)/include/iprt/nocrt/x86 \
724 $(PATH_ROOT)/include/iprt/nocrt/amd64 \
725 include/internal \
726 string \
727 table \
728 $(foreach dir, . r3 r0drv,\
729 $(dir) \
730 $(dir)/darwin \
731 $(dir)/l4 \
732 $(dir)/linux \
733 $(dir)/nt \
734 $(dir)/os2 \
735 $(dir)/win \
736 $(dir)/win32 \
737 $(dir)/win64 \
738 $(dir)/generic \
739 )
740
741# These must come first in order to make things look nice.
742DOXYGEN_INPUT_FIRST =\
743 $(PATH_ROOT)/include/iprt/cdefs.h \
744 $(PATH_ROOT)/include/iprt/types.h \
745 $(PATH_ROOT)/include/iprt/runtime.h \
746 $(PATH_ROOT)/include/iprt/param.h \
747 $(PATH_ROOT)/include/iprt/assert.h \
748 $(PATH_ROOT)/include/iprt/asm.h \
749
750DOXYGEN_INPUT := \
751 $(filter-out %.cpp.h, $(sort $(wildcard $(addsuffix /*.h, $(DOXYGEN_INPUT_DIRS)))) ) \
752 $(foreach dir, $(DOXYGEN_INPUT_DIRS), $(wildcard $(dir)/*.cpp $(dir)/.c $(dir)/.asm))
753DOXYGEN_INPUT := \
754 $(DOXYGEN_INPUT_FIRST) \
755 $(filter-out $(DOXYGEN_INPUT_FIRST), $(DOXYGEN_INPUT))
756
757
758DOXYGEN_OUTPUT = $(PATH_OUT)/docs/iprt
759
760-include $(PATH_TARGET)/Doxyfile.dep
761
762# Generate the Doxyfile
763$(PATH_TARGET)/Doxyfile: Doxyfile \
764 $(comp-vars DOXYGEN_INPUT,DOXYGEN_INPUT_PREV,FORCE) \
765 $(comp-vars DOXYGEN_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE) \
766 | $(call DIRDEP, $(PATH_TARGET))
767 $(RM) -f $@ $@.tmp $(PATH_TARGET)/Doxyfile.dep
768 $(CP) -f Doxyfile $@.tmp
769 $(APPEND) $@.tmp
770 $(APPEND) $@.tmp "OUTPUT_DIRECTORY = $(DOXYGEN_OUTPUT)"
771 $(APPEND) $@.tmp "WARN_LOGFILE = $(DOXYGEN_OUTPUT)/errors"
772 $(APPEND) $@.tmp "INCLUDE_PATH = $(PATH_ROOT)/include include . table"
773 $(APPEND) $@.tmp "INCLUDE_FILE_PATTERNS = *.cpp.h"
774 $(APPEND) $@.tmp
775 $(APPEND) $@.tmp "INPUT = $(DOXYGEN_INPUT)"
776 $(APPEND) $@.tmp
777 $(MV) -f $@.tmp $@
778 @$(APPEND) $(PATH_TARGET)/Doxyfile.dep "DOXYGEN_OUTPUT_PREV = $(DOXYGEN_OUTPUT)"
779 @$(APPEND) $(PATH_TARGET)/Doxyfile.dep "DOXYGEN_INPUT_PREV = $(DOXYGEN_INPUT)"
780
781# Create the output directory.
782$(call DIRDEP, $(DOXYGEN_OUTPUT)):
783 $(MKDIR) -p $@
784
785# Do the actual job.
786$(PATH_TARGET)/docs.iprt: $(PATH_TARGET)/Doxyfile $(DOXYGEN_INPUT) | $(call DIRDEP, $(DOXYGEN_OUTPUT))
787 $(RM) -f $(wildcard $(DOXYGEN_OUTPUT)/html/*) $(PATH_TARGET)/docs.iprt
788 doxygen $(PATH_TARGET)/Doxyfile
789 $(APPEND) $(PATH_TARGET)/docs.iprt
790
791# alias
792docs: $(PATH_TARGET)/docs.iprt
793
794test:
795 @echo test-$(comp-vars DOXYGEN_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE)
796 @echo $(DOXYGEN_OUTPUT)
797 @echo $(DOXYGEN_OUTPUT_PREV)
798
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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