VirtualBox

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

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

Use RTAssertDoBreakpoint everywhere. (part II)

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