VirtualBox

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

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

A stab at generic timers (untested).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 21.6 KB
Line 
1# $Id: Makefile 197 2007-01-20 01:22:45Z 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
394ifdef VBOX_USE_VCC80
395VBoxRT_LDFLAGS.win = /MANIFEST
396endif
397VBoxRT_LDFLAGS.l4 = \
398 -Wl,-whole-archive \
399 $(PATH_LIB)/RuntimeR3L4$(VBOX_SUFF_LIB) \
400 -Wl,-no-whole-archive
401ifeq ($(BUILD_TARGET),l4)
402VBoxRT_LIBS += \
403 $(L4_LIBDIR)/libl4sys.a \
404 $(L4_LIBDIR)/libl4sys.p.a
405endif
406VBoxRT_LIBS.l4 = \
407 $(PATH_LIB)/VBox-uuid$(VBOX_SUFF_LIB) \
408 $(PATH_LIB)/RuntimeR3L4$(VBOX_SUFF_LIB)
409
410#
411# RuntimeR3NoCRTGCC - CRT replacement lib for VBoxREM.
412# This is used together with VBoxRT.
413#
414RuntimeR3NoCRTGCC_TEMPLATE = VBOXNOCRTGCC
415RuntimeR3NoCRTGCC_SOURCES = \
416 \
417 math/ceill.asm \
418 math/cosl.asm \
419 math/fabs.asm \
420 math/fabsf.asm \
421 math/fabsl.asm \
422 math/floor.asm \
423 math/floorf.asm \
424 math/floorl.asm \
425 math/ldexpl.asm \
426 math/llrint.asm \
427 math/llrintf.asm \
428 math/llrintl.asm \
429 math/logl.asm \
430 math/lrint.asm \
431 math/lrintf.asm \
432 math/lrintl.asm \
433 math/remainder.asm \
434 math/remainderf.asm \
435 math/remainderl.asm \
436 math/sinl.asm \
437 math/tanl.asm \
438 math/trunc.asm \
439 math/truncf.asm \
440 math/truncl.asm \
441 \
442 misc/setjmp.asm \
443 \
444 string/memchr.asm \
445 string/memchr_alias.c \
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 RT_WITHOUT_NOCRT_WRAPPERS
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 string/memchr.asm \
563 r0drv/initterm-r0drv.cpp \
564 r0drv/memobj-r0drv.cpp \
565 r0drv/thread-r0drv.cpp \
566 r0drv/darwin/alloc-r0drv-darwin.cpp \
567 r0drv/darwin/memobj-r0drv-darwin.cpp \
568 r0drv/darwin/initterm-r0drv-darwin.cpp \
569 r0drv/darwin/RTLogWriteDebugger-r0drv-darwin.cpp \
570 r0drv/darwin/semaphore-r0drv-darwin.cpp \
571 r0drv/darwin/spinlock-r0drv-darwin.cpp \
572 r0drv/darwin/thread-r0drv-darwin.cpp \
573 r0drv/darwin/time-r0drv-darwin.cpp \
574 generic/timer-generic.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
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