VirtualBox

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

Last change on this file since 129 was 129, checked in by vboxsync, 18 years ago

Generic Uuid. Corrected Gen.u16TimeMin to Gen.u16TimeMid.

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

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