VirtualBox

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

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

use the mscount member of the GIS for system monotonic time source on OS/2.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 27.1 KB
Line 
1# $Id: Makefile 1206 2007-03-05 00:58:31Z 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 r3/posix/RTTimeNow-posix.cpp \
269 r3/posix/alloc-posix.cpp \
270 r3/posix/dir-posix.cpp \
271 r3/posix/env-posix.cpp \
272 r3/posix/fileio-posix.cpp \
273 r3/posix/fs-posix.cpp \
274 r3/posix/ldrNative-posix.cpp \
275 r3/posix/path-posix.cpp \
276 generic/pathhost-generic.cpp \
277 r3/posix/process-posix.cpp \
278 r3/posix/rand-posix.cpp \
279 r3/posix/system-posix.cpp \
280 r3/linux/sched-linux.cpp \
281 r3/posix/thread-posix.cpp \
282 r3/linux/time-linux.cpp \
283 r3/posix/timer-posix.cpp \
284 generic/utf16locale-generic.cpp \
285 r3/posix/utf8-posix.cpp \
286 generic/uuid-generic.cpp \
287 timesup.cpp
288ifeq ($(BUILD_TARGET_ARCH),amd64)
289 RuntimeR3_SOURCES.linux += r3/linux/sems-linux.cpp
290else
291 RuntimeR3_SOURCES.linux += r3/posix/sems-posix.cpp
292endif
293
294RuntimeR3_SOURCES.os2 = \
295 generic/RTDirQueryInfo-generic.cpp \
296 generic/RTDirSetTimes-generic.cpp \
297 generic/RTFileMove-generic.cpp \
298 generic/RTLogWriteDebugger-generic.cpp \
299 os2/RTErrConvertFromOS2.cpp \
300 r3/os2/sems-os2.cpp \
301 r3/os2/system-os2.cpp \
302 r3/os2/thread-os2.cpp \
303 r3/posix/alloc-posix.cpp \
304 r3/posix/dir-posix.cpp \
305 r3/posix/env-posix.cpp \
306 r3/posix/fileio-posix.cpp \
307 r3/posix/fs-posix.cpp \
308 r3/posix/ldrNative-posix.cpp \
309 r3/posix/path-posix.cpp \
310 generic/pathhost-generic.cpp \
311 r3/posix/process-posix.cpp \
312 generic/rand-stubs-generic.cpp \
313 generic/semsrw-generic.cpp \
314 generic/semnoint-generic.cpp \
315 generic/sched-generic.cpp \
316 r3/os2/time-os2.cpp \
317 r3/posix/timer-posix.cpp \
318 r3/posix/RTTimeNow-posix.cpp \
319 generic/utf16locale-generic.cpp \
320 r3/posix/utf8-posix.cpp \
321 generic/uuid-generic.cpp \
322 timesup.cpp \
323
324RuntimeR3_SOURCES.darwin = \
325 generic/RTDirQueryInfo-generic.cpp \
326 generic/RTDirSetTimes-generic.cpp \
327 generic/RTFileMove-generic.cpp \
328 generic/RTLogWriteDebugger-generic.cpp \
329 generic/pathhost-generic.cpp \
330 generic/sched-generic.cpp \
331 generic/timer-generic.cpp \
332 generic/utf16locale-generic.cpp \
333 generic/uuid-generic.cpp\
334 r3/darwin/alloc-darwin.cpp \
335 r3/posix/dir-posix.cpp \
336 r3/posix/env-posix.cpp \
337 r3/posix/fileio-posix.cpp \
338 r3/posix/fs-posix.cpp \
339 r3/posix/ldrNative-posix.cpp \
340 r3/posix/path-posix.cpp \
341 r3/posix/process-posix.cpp \
342 r3/posix/rand-posix.cpp \
343 r3/posix/sems-posix.cpp \
344 r3/posix/system-posix.cpp \
345 r3/posix/thread-posix.cpp \
346 r3/posix/utf8-posix.cpp \
347 r3/darwin/time-darwin.cpp \
348 timesup.cpp \
349
350## @todo Make BSD sched.
351RuntimeR3_SOURCES.freebsd = \
352 generic/RTDirQueryInfo-generic.cpp \
353 generic/RTDirSetTimes-generic.cpp \
354 generic/RTFileMove-generic.cpp \
355 generic/RTLogWriteDebugger-generic.cpp \
356 generic/pathhost-generic.cpp \
357 generic/sched-generic.cpp \
358 generic/uuid-generic.cpp \
359 r3/freebsd/alloc-freebsd.cpp \
360 r3/posix/dir-posix.cpp \
361 r3/posix/env-posix.cpp \
362 r3/posix/fileio-posix.cpp \
363 r3/posix/fs-posix.cpp \
364 r3/posix/ldrNative-posix.cpp \
365 r3/posix/path-posix.cpp \
366 r3/posix/process-posix.cpp \
367 r3/posix/rand-posix.cpp \
368 r3/posix/sems-posix.cpp \
369 r3/posix/system-posix.cpp \
370 r3/posix/thread-posix.cpp \
371 r3/posix/time-posix.cpp \
372 r3/posix/timer-posix.cpp \
373 r3/posix/RTTimeNow-posix.cpp \
374 generic/utf16locale-generic.cpp \
375 r3/posix/utf8-posix.cpp \
376 timesup.cpp \
377
378## PORTME: Porters add their selection of platform specific files for Ring-3 here.
379
380
381#
382# L4 RuntimeR3 subtarget since L4 headers won't work with VBOXR3.
383#
384RuntimeR3L4_TEMPLATE = VBOXR3NP
385RuntimeR3L4_DEFS = IN_RT_R3 IN_SUP_R3 LDR_WITH_NATIVE LDR_WITH_ELF LDR_WITH_PE
386RuntimeR3L4_INCS = $(L4_INCDIR) \
387 $(PATH_ROOT)/src/libs/libuuid
388
389RuntimeR3L4_SOURCES = \
390 generic/RTDirQueryInfo-generic.cpp \
391 generic/RTDirSetTimes-generic.cpp \
392 generic/RTFileMove-generic.cpp \
393 generic/RTLogWriteDebugger-generic.cpp \
394 generic/fs-stubs-generic.cpp \
395 generic/pathhost-generic.cpp \
396 generic/sched-generic.cpp \
397 generic/semsrw-generic.cpp \
398 generic/semnoint-generic.cpp \
399 generic/uuid-generic.cpp \
400 l4/l4-errno.cpp \
401 l4/process-l4env.cpp \
402 l4/sems-l4env.cpp \
403 l4/system-l4env.cpp \
404 l4/thread-l4env.cpp \
405 l4/timer-l4env.cpp \
406 generic/utf16locale-generic.cpp \
407 l4/utf8-l4env.cpp \
408 r3/posix/alloc-posix.cpp \
409 r3/posix/env-posix.cpp \
410 r3/posix/dir-posix.cpp \
411 r3/posix/fileio-posix.cpp \
412 r3/posix/ldrNative-posix.cpp \
413 r3/posix/path-posix.cpp \
414 r3/posix/rand-posix.cpp \
415 r3/posix/time-posix.cpp \
416 r3/posix/RTTimeNow-posix.cpp \
417 timesup.cpp
418
419#
420# RuntimeW32GuestR3 - Win32 guest program runtime.
421#
422RuntimeW32GuestR3_TEMPLATE = VBOXW32GUESTR3LIB
423RuntimeW32GuestR3_SDKS = WINPSDK W2K3DDK
424RuntimeW32GuestR3_DEFS = IN_RT_R3 IN_SUP_R3 LDR_WITH_NATIVE LDR_WITH_ELF32 LDR_WITH_PE RT_WITH_VBOX
425ifdef IPRT_WITH_KLDR
426 RuntimeW32GuestR3_DEFS += LDR_WITH_KLDR KLDR_USE_CRT
427 RuntimeW32GuestR3_DEFS.debug += KLDRMOD_STRICT KLDRMODLX_STRICT KLDRMODPE_STRICT KLDRMODNATIVE_STRICT KLDRRDR_STRICT
428endif
429RuntimeW32GuestR3_SOURCES = $(RuntimeR3_SOURCES.win) $(RuntimeR3_SOURCES)
430RuntimeW32GuestR3_INCS = $(RuntimeR3_INCS.win) $(RuntimeR3_INCS)
431
432
433#
434# RuntimeLnx32GuestR3 - 32-bit Linux guest program runtime.
435#
436RuntimeLnx32GuestR3_TEMPLATE = VBOXLNX32GUESTR3LIB
437RuntimeLnx32GuestR3_DEFS = IN_RT_R3 IN_SUP_R3 LDR_WITH_NATIVE LDR_WITH_ELF32 LDR_WITH_PE RT_WITH_VBOX
438ifdef IPRT_WITH_KLDR
439 RuntimeLnx32GuestR3_DEFS += LDR_WITH_KLDR KLDR_USE_CRT
440 RuntimeLnx32GuestR3_DEFS.debug += KLDRMOD_STRICT KLDRMODLX_STRICT KLDRMODPE_STRICT KLDRMODNATIVE_STRICT KLDRRDR_STRICT
441endif
442RuntimeLnx32GuestR3_SOURCES = $(RuntimeR3_SOURCES.linux) $(RuntimeR3_SOURCES)
443RuntimeLnx32GuestR3_INCS = $(RuntimeR3_INCS.linux) $(RuntimeR3_INCS)
444
445
446#
447# VBoxRT - Shared Object / DLL version.
448#
449VBoxRT_TEMPLATE = VBOXR3
450VBoxRT_SDKS.win = WINPSDK W2K3DDK VBOX_NTDLL
451ifeq ($(BUILD_TARGET),darwin)
452VBoxRT_INST = $(INST_DLL) $(INST_TESTCASE)
453endif
454VBoxRT_DEFS = $(RuntimeR3_DEFS) IN_SUP_R3 IN_SUP_R3
455VBoxRT_DEFS.$(BUILD_TYPE) = $(RuntimeR3_DEFS.$(BUILD_TYPE))
456VBoxRT_SOURCES = \
457 VBox/VBoxRTDeps.cpp \
458 $(RuntimeR3_SOURCES)
459VBoxRT_SOURCES.$(BUILD_TARGET) = $(RuntimeR3_SOURCES.$(BUILD_TARGET))
460VBoxRT_SOURCES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH) = $(RuntimeR3_SOURCES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH))
461VBoxRT_SOURCES.win += r3/win32/dllmain-win32.cpp
462VBoxRT_SOURCES.win.amd64 += r3/win64/VBoxRT-win64.def
463VBoxRT_INCS = $(RuntimeR3_INCS)
464VBoxRT_INCS.$(BUILD_TARGET) = $(RuntimeR3_INCS.$(BUILD_TARGET))
465VBoxRT_INCS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH) = $(RuntimeR3_INCS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH))
466VBoxRT_LIBS = \
467 $(PATH_LIB)/SUPR3$(VBOX_SUFF_LIB) \
468 $(PATH_LIB)/VBox-liblzf$(VBOX_SUFF_LIB)
469VBoxRT_LIBS.darwin = \
470 iconv
471VBoxRT_LIBS.freebsd = \
472 iconv
473VBoxRT_LIBPATH.freebsd = \
474 /usr/local/lib
475VBoxRT_LDFLAGS.darwin = -framework IOKit -install_name @executable_path/VBoxRT.dylib
476ifdef VBOX_USE_VCC80
477VBoxRT_LDFLAGS.win = /MANIFEST
478endif
479VBoxRT_LDFLAGS.l4 = \
480 -Wl,-whole-archive \
481 $(PATH_LIB)/RuntimeR3L4$(VBOX_SUFF_LIB) \
482 -Wl,-no-whole-archive
483ifeq ($(BUILD_TARGET),l4)
484VBoxRT_LIBS += \
485 $(L4_LIBDIR)/libl4sys.a \
486 $(L4_LIBDIR)/libl4sys.p.a
487endif
488VBoxRT_LIBS.l4 = \
489 $(PATH_LIB)/VBox-uuid$(VBOX_SUFF_LIB) \
490 $(PATH_LIB)/RuntimeR3L4$(VBOX_SUFF_LIB)
491
492
493#
494# RuntimeR3NoCRTGCC - CRT replacement lib for VBoxREM.
495# This is used together with VBoxRT.
496#
497RuntimeR3NoCRTGCC_TEMPLATE = VBOXNOCRTGCC
498RuntimeR3NoCRTGCC_LIBSUFF = $(VBOX_SUFF_LIB)
499RuntimeR3NoCRTGCC_SOURCES = \
500 misc/sanity-cpp.cpp \
501 misc/sanity-c.c \
502 \
503 math/ceill.asm \
504 math/cosl.asm \
505 math/fabs.asm \
506 math/fabsf.asm \
507 math/fabsl.asm \
508 math/floor.asm \
509 math/floorf.asm \
510 math/floorl.asm \
511 math/ldexpl.asm \
512 math/llrint.asm \
513 math/llrintf.asm \
514 math/llrintl.asm \
515 math/logl.asm \
516 math/lrint.asm \
517 math/lrintf.asm \
518 math/lrintl.asm \
519 math/remainder.asm \
520 math/remainderf.asm \
521 math/remainderl.asm \
522 math/sinl.asm \
523 math/tanl.asm \
524 math/trunc.asm \
525 math/truncf.asm \
526 math/truncl.asm \
527 \
528 misc/setjmp.asm \
529 \
530 string/memchr.asm \
531 string/memchr_alias.c \
532 string/memcmp.asm \
533 string/memcmp_alias.c \
534 string/memcpy.asm \
535 string/memcpy_alias.c \
536 string/mempcpy.asm \
537 string/memset.asm \
538 string/memset_alias.c \
539 string/strchr.asm \
540 string/strchr_alias.c \
541 string/strcmp.asm \
542 string/strcmp_alias.c
543
544RuntimeR3NoCRTGCC_SOURCES.x86 = \
545 math/x86/fenv-x86.c \
546 math/gcc/adddi3.c \
547 math/gcc/anddi3.c \
548 math/gcc/ashldi3.c \
549 math/gcc/ashrdi3.c \
550 math/gcc/cmpdi2.c \
551 math/gcc/divdi3.c \
552 math/gcc/iordi3.c \
553 math/gcc/lshldi3.c \
554 math/gcc/lshrdi3.c \
555 math/gcc/moddi3.c \
556 math/gcc/muldi3.c \
557 math/gcc/negdi2.c \
558 math/gcc/notdi2.c \
559 math/gcc/qdivrem.c \
560 math/gcc/subdi3.c \
561 math/gcc/ucmpdi2.c \
562 math/gcc/udivdi3.c \
563 math/gcc/umoddi3.c \
564 math/gcc/xordi3.c
565
566
567## @todo stop using the old memcpy.c and memset.c code.
568
569#
570# RuntimeR0 - Ring0 library for VMMR0.
571#
572RuntimeR0_TEMPLATE = VBOXR0
573RuntimeR0_DEFS = IN_RT_R0 RT_WITH_VBOX
574RuntimeR0_SOURCES = \
575 misc/sanity-cpp.cpp \
576 misc/sanity-c.c \
577 assert.cpp \
578 generic/RTAssertDoBreakpoint-generic.cpp \
579 table/avlhcphys.cpp \
580 table/avlgcptr.cpp \
581 table/avlogcphys.cpp \
582 table/avlohcphys.cpp \
583 table/avlpv.cpp \
584 table/avlrogcphys.cpp \
585 table/avlogcptr.cpp \
586 table/avlrogcptr.cpp \
587 table/avlroogcptr.cpp \
588 table/avloioport.cpp \
589 table/avlroioport.cpp \
590 logcom.cpp \
591 logformat.cpp \
592 strformat.cpp \
593 strformatrt.cpp \
594 strprintf.cpp \
595 string/memchr.cpp \
596 string/memcmp.cpp \
597 string/memcpy.cpp \
598 string/memset.cpp \
599 string/strcpy.cpp \
600 string/strlen.cpp \
601 string/strncmp.cpp \
602 string/strpbrk.cpp \
603 VBox/strformat-vbox.cpp \
604 timesup.cpp
605
606RuntimeR0_SOURCES.win.amd64 = $(RuntimeWin64ASM_SOURCES)
607
608RuntimeR0_SOURCES.os2 = \
609 os2/RTErrConvertFromOS2.cpp \
610 os2/sys0.asm
611
612RuntimeR0_SOURCES.darwin.x86 = \
613 math/gcc/adddi3.c \
614 math/gcc/anddi3.c \
615 math/gcc/ashldi3.c \
616 math/gcc/ashrdi3.c \
617 math/gcc/cmpdi2.c \
618 math/gcc/divdi3.c \
619 math/gcc/iordi3.c \
620 math/gcc/lshldi3.c \
621 math/gcc/lshrdi3.c \
622 math/gcc/moddi3.c \
623 math/gcc/muldi3.c \
624 math/gcc/negdi2.c \
625 math/gcc/notdi2.c \
626 math/gcc/qdivrem.c \
627 math/gcc/subdi3.c \
628 math/gcc/ucmpdi2.c \
629 math/gcc/udivdi3.c \
630 math/gcc/umoddi3.c \
631 math/gcc/xordi3.c
632
633
634string/memchr.cpp_CXXFLAGS.win = -Oi-
635string/memcmp.cpp_CXXFLAGS.win = -Oi-
636string/memcpy.cpp_CXXFLAGS.win = -Oi-
637string/memset.cpp_CXXFLAGS.win = -Oi-
638string/strcpy.cpp_CXXFLAGS.win = -Oi-
639string/strlen.cpp_CXXFLAGS.win = -Oi-
640
641ifeq ($(BUILD_TARGET),l4)
642RuntimeR0Drv_BLD_TRG = linux
643RuntimeR0Drv_BLD_TRG_ARCH = x86
644RuntimeR0Drv_BLD_TRG_CPU = i386
645endif
646
647#
648# RuntimeR0Drv - Ring0 library for host drivers.
649#
650RuntimeR0Drv_TEMPLATE = VBOXR0DRV
651RuntimeR0Drv_SDKS.win = W2K3DDK WINPSDKINCS
652RuntimeR0Drv_DEFS = IN_RT_R0 RT_WITH_VBOX RT_WITHOUT_NOCRT_WRAPPERS
653RuntimeR0Drv_DEFS.win = IN_SUP_R0
654RuntimeR0Drv_DEFS.linux = MODULE KBUILD_MODNAME=KBUILD_STR\(vboxdrv\) KBUILD_BASENAME=KBUILD_STR\(vboxdrv\) IN_SUP_R0 # why is IN_SUP_R0 here? because!
655
656RuntimeR0Drv_INCS.linux = \
657 r0drv/linux
658
659RuntimeR0Drv_SOURCES = \
660 misc/sanity-cpp.cpp \
661 misc/sanity-c.c \
662 assert.cpp \
663 log.cpp \
664 logcom.cpp \
665 logformat.cpp \
666 string/strpbrk.cpp \
667 strformat.cpp \
668 strformatrt.cpp \
669 strtonum.cpp \
670 strprintf.cpp \
671 VBox/strformat-vbox.cpp \
672 r0drv/alloc-r0drv.cpp \
673 r0drv/initterm-r0drv.cpp \
674 generic/RTLogWriteStdErr-stub-generic.cpp \
675 generic/RTLogWriteStdOut-stub-generic.cpp \
676 generic/RTLogWriteUser-generic.cpp \
677 VBox/log-vbox.cpp \
678 table/avlpv.cpp \
679 crc32.cpp \
680 crc64.cpp
681
682RuntimeR0Drv_SOURCES.linux = \
683 generic/RTAssertDoBreakpoint-generic.cpp \
684 alloc/heapsimple.cpp \
685 r0drv/linux/alloc-r0drv-linux.c \
686 r0drv/linux/initterm-r0drv-linux.c \
687 r0drv/linux/process-r0drv-linux.c \
688 r0drv/linux/RTLogWriteDebugger-r0drv-linux.c \
689 r0drv/linux/semaphore-r0drv-linux.c \
690 r0drv/linux/spinlock-r0drv-linux.c \
691 r0drv/linux/thread-r0drv-linux.c
692
693RuntimeR0Drv_SOURCES.win = \
694 generic/RTAssertDoBreakpoint-generic.cpp \
695 nt/RTErrConvertFromNtStatus.cpp \
696 r0drv/nt/alloc-r0drv-nt.cpp \
697 r0drv/nt/initterm-r0drv-nt.cpp \
698 r0drv/nt/process-r0drv-nt.cpp \
699 r0drv/nt/RTLogWriteDebugger-r0drv-nt.cpp \
700 r0drv/nt/semaphore-r0drv-nt.cpp \
701 r0drv/nt/spinlock-r0drv-nt.cpp \
702 r0drv/nt/thread-r0drv-nt.cpp \
703 string/strncmp.cpp
704
705RuntimeR0Drv_SOURCES.win.amd64 = \
706 $(RuntimeWin64ASM_SOURCES)
707
708RuntimeR0Drv_SOURCES.darwin = \
709 generic/RTAssertDoBreakpoint-generic.cpp \
710 RTErrConvertFromErrno.cpp \
711 string/memchr.asm \
712 r0drv/memobj-r0drv.cpp \
713 r0drv/darwin/alloc-r0drv-darwin.cpp \
714 r0drv/darwin/memobj-r0drv-darwin.cpp \
715 r0drv/darwin/initterm-r0drv-darwin.cpp \
716 r0drv/darwin/process-r0drv-darwin.cpp \
717 r0drv/darwin/RTLogWriteDebugger-r0drv-darwin.cpp \
718 r0drv/darwin/semaphore-r0drv-darwin.cpp \
719 r0drv/darwin/spinlock-r0drv-darwin.cpp \
720 r0drv/darwin/thread-r0drv-darwin.cpp \
721 r0drv/darwin/thread2-r0drv-darwin.cpp \
722 r0drv/darwin/time-r0drv-darwin.cpp \
723 thread.cpp \
724 generic/timer-generic.cpp \
725
726RuntimeR0Drv_DEFS.os2 += RT_WITHOUT_NOCRT_WRAPPERS
727RuntimeR0Drv_SOURCES.os2 = \
728 string/memchr.asm \
729 string/memcmp.asm \
730 string/memcpy.asm \
731 string/mempcpy.asm \
732 string/memset.asm \
733 string/strchr.asm \
734 string/strcmp.asm \
735 \
736 string/strcpy.cpp \
737 string/strlen.cpp \
738 string/strncmp.cpp \
739 \
740 os2/RTErrConvertFromOS2.cpp \
741 os2/sys0.asm \
742 thread.cpp \
743 r0drv/memobj-r0drv.cpp \
744 r0drv/os2/alloc-r0drv-os2.cpp \
745 r0drv/os2/assert-r0drv-os2.cpp \
746 r0drv/os2/assertA-r0drv-os2.asm \
747 r0drv/os2/initterm-r0drv-os2.cpp \
748 r0drv/os2/memobj-r0drv-os2.cpp \
749 r0drv/os2/os2imports.imp \
750 r0drv/os2/process-r0drv-os2.cpp \
751 r0drv/os2/semevent-r0drv-os2.cpp \
752 r0drv/os2/semeventmulti-r0drv-os2.cpp \
753 r0drv/os2/semfastmutex-r0drv-os2.cpp \
754 r0drv/os2/spinlock-r0drv-os2.cpp \
755 r0drv/os2/thread-r0drv-os2.cpp \
756 r0drv/os2/thread2-r0drv-os2.cpp \
757 r0drv/os2/time-r0drv-os2.cpp \
758 r0drv/os2/timer-r0drv-os2.cpp \
759 r0drv/os2/timerA-r0drv-os2.asm \
760 r0drv/os2/RTAssertDoBreakpoint-r0drv-os2.asm \
761 r0drv/os2/RTR0Os2DHQueryDOSVar.asm \
762 r0drv/os2/RTR0Os2DHVMGlobalToProcess.asm \
763 generic/RTLogWriteDebugger-generic.cpp
764
765## PORTME: Porters create and add their selection of platform specific Ring-0 Driver files here.
766
767#
768# RuntimeW32GuestR0 - Win32 guest driver runtime.
769#
770RuntimeW32GuestR0_TEMPLATE = VBOXW32GUESTR0LIB
771RuntimeW32GuestR0_SDKS = W2K3DDKX86 WINPSDKINCS
772RuntimeW32GuestR0_DEFS = IN_RT_R0 RT_WITH_VBOX RT_WITHOUT_NOCRT_WRAPPERS IN_SUP_R0
773RuntimeW32GuestR0_SOURCES = \
774 $(RuntimeR0Drv_SOURCES) \
775 $(RuntimeR0Drv_SOURCES.win) \
776 VBox/logbackdoor.cpp \
777 logR0.cpp
778ifdef VBOX_USE_VCC80
779RuntimeW32GuestR0_SOURCES += \
780 string/memchr.cpp \
781 string/memcmp.cpp \
782 string/memcpy.cpp \
783 string/memset.cpp \
784 string/strlen.cpp
785endif
786
787
788#
789# RuntimeW32NT4GuestR0 - Win32 NT4 guest driver runtime.
790#
791RuntimeW32NT4GuestR0_TEMPLATE = VBOXW32GUESTR0LIB
792RuntimeW32NT4GuestR0_SDKS = $(RuntimeW32GuestR0_SDKS)
793RuntimeW32NT4GuestR0_DEFS = $(RuntimeW32GuestR0_DEFS) IPRT_TARGET_NT4
794RuntimeW32NT4GuestR0_INCS = $(RuntimeW32GuestR0_INCS)
795RuntimeW32NT4GuestR0_SOURCES = $(RuntimeW32GuestR0_SOURCES)
796
797
798#
799# RuntimeLnx32GuestR0 - 32-bit Linux guest driver runtime.
800#
801RuntimeLnx32GuestR0_TEMPLATE = VBOXLNX32GUESTR0
802RuntimeLnx32GuestR0_DEFS = RT_WITH_VBOX RT_WITHOUT_NOCRT_WRAPPERS IN_SUP_R0 \
803 MODULE KBUILD_MODNAME=KBUILD_STR\(vboxdrv\) KBUILD_BASENAME=KBUILD_STR\(vboxdrv\)
804RuntimeLnx32GuestR0_INCS = $(RuntimeR0Drv_INCS.linux) $(RuntimeR0Drv_INCS)
805RuntimeLnx32GuestR0_SOURCES = \
806 $(RuntimeR0Drv_SOURCES) \
807 $(RuntimeR0Drv_SOURCES.linux) \
808 VBox/logbackdoor.cpp
809
810#
811# RuntimeGC - Guest context library.
812#
813RuntimeGC_TEMPLATE = VBOXGC
814RuntimeGC_DEFS = IN_RT_GC RT_WITH_VBOX
815RuntimeGC_SOURCES = \
816 misc/sanity-cpp.cpp \
817 misc/sanity-c.c \
818 table/avlogcphys.cpp \
819 table/avlrogcphys.cpp \
820 table/avlogcptr.cpp \
821 table/avlohcphys.cpp \
822 table/avlrogcptr.cpp \
823 table/avlroogcptr.cpp \
824 table/avloioport.cpp \
825 table/avlroioport.cpp \
826 assert.cpp \
827 generic/RTAssertDoBreakpoint-generic.cpp \
828 log.cpp \
829 logcom.cpp \
830 logformat.cpp \
831 string/strpbrk.cpp \
832 string/strncmp.cpp \
833 strformat.cpp \
834 strformatrt.cpp \
835 strprintf.cpp \
836 VBox/strformat-vbox.cpp \
837 timesup.cpp \
838 string/memchr.cpp \
839 string/memcmp.cpp \
840 string/memcpy.cpp \
841 string/memset.cpp \
842 string/strcpy.cpp \
843 string/strlen.cpp
844
845ifeq ($(VBOX_LDR_FMT32),lx)
846RuntimeGC_SOURCES += os2/sys0.asm
847endif
848
849RuntimeGC_SOURCES.darwin = \
850 math/gcc/adddi3.c \
851 math/gcc/anddi3.c \
852 math/gcc/ashldi3.c \
853 math/gcc/ashrdi3.c \
854 math/gcc/cmpdi2.c \
855 math/gcc/divdi3.c \
856 math/gcc/iordi3.c \
857 math/gcc/lshldi3.c \
858 math/gcc/lshrdi3.c \
859 math/gcc/moddi3.c \
860 math/gcc/muldi3.c \
861 math/gcc/negdi2.c \
862 math/gcc/notdi2.c \
863 math/gcc/qdivrem.c \
864 math/gcc/subdi3.c \
865 math/gcc/ucmpdi2.c \
866 math/gcc/udivdi3.c \
867 math/gcc/umoddi3.c \
868 math/gcc/xordi3.c
869
870
871#
872# Static library for new & delete for the electric fence.
873#
874RuntimeEFCPP_TEMPLATE = $(RuntimeR3_TEMPLATE)
875RuntimeEFCPP_SDKS = $(RuntimeR3_SDKS)
876RuntimeEFCPP_SDKS.$(BUILD_TARGET) = $(RuntimeR3_SDKS.$(BUILD_TARGET))
877RuntimeEFCPP_DEFS = $(RuntimeR3_DEFS)
878RuntimeEFCPP_DEFS.$(BUILD_TARGET) = $(RuntimeR3_DEFS.$(BUILD_TARGET))
879RuntimeEFCPP_INCS = $(RuntimeR3_INCS)
880RuntimeEFCPP_INCS.$(BUILD_TARGET) = $(RuntimeR3_INCS.$(BUILD_TARGET))
881RuntimeEFCPP_SOURCES = r3/alloc-ef-cpp.cpp
882
883
884
885#
886# errmsg.cpp depends on a generated header.
887#
888errmsg.cpp_DEPS = $(PATH_TARGET)/errmsgdata.h
889errmsg.cpp_INCS = $(PATH_TARGET)
890
891win32/errmsgwin.cpp_DEPS = $(PATH_TARGET)/errmsgcomdata.h
892win32/errmsgwin.cpp_INCS = $(PATH_TARGET)
893
894linux/errmsglinux.cpp_DEPS = $(PATH_TARGET)/errmsgxpcomdata.h
895linux/errmsglinux.cpp_INCS = $(PATH_TARGET)
896
897
898# Generate the rules
899include $(PATH_KBUILD)/footer.kmk
900
901
902#
903# Generate the status code data.
904#
905$(PATH_TARGET)/errmsgdata.h: errmsg.sed $(DEPTH)/include/iprt/err.h $(DEPTH)/include/VBox/err.h
906 $(call MSG_L1,Generating $@)
907 $(QUIET)$(MKDIR) -p $(PATH_TARGET)
908 $(QUIET)$(SED) -f $< $(filter %.h,$^) > $@
909## @todo r=bird: rename this to indicate that it's not only COM errors, but all win32/64 errors.
910$(PATH_TARGET)/errmsgcomdata.h: errmsgcom.sed $(PATH_SDK_WINPSDK_INC)/WinError.h
911 $(call MSG_L1,Generating $@)
912 $(QUIET)$(MKDIR) -p $(PATH_TARGET)
913 $(QUIET)$(SED) -f $< $(filter %.h,$^) > $@
914$(PATH_TARGET)/errmsgxpcomdata.h: errmsgxpcom.sed $(DEPTH)/src/libs/xpcom18a4/xpcom/base/nsError.h
915 $(call MSG_L1,Generating $@)
916 $(QUIET)$(MKDIR) -p $(PATH_TARGET)
917 $(QUIET)$(SED) -f $< $(filter %.h,$^) > $@
918
919
920#
921# Aliases for .cpp.h files so we can more easily do syntax checking from the editor.
922#
923ldrELFRelocatable.cpp.o: ldrELF.o
924ldrELFRelocatable.cpp.obj: ldrELF.obj
925
926
927#
928# Doxygen documentation.
929#
930DOXYGEN_INPUT_DIRS = \
931 $(PATH_ROOT)/include/iprt \
932 $(PATH_ROOT)/include/iprt/nocrt \
933 $(PATH_ROOT)/include/iprt/nocrt/x86 \
934 $(PATH_ROOT)/include/iprt/nocrt/amd64 \
935 include/internal \
936 string \
937 table \
938 $(foreach dir, . r3 r0drv,\
939 $(dir) \
940 $(dir)/darwin \
941 $(dir)/l4 \
942 $(dir)/linux \
943 $(dir)/nt \
944 $(dir)/os2 \
945 $(dir)/win \
946 $(dir)/win32 \
947 $(dir)/win64 \
948 $(dir)/generic \
949 )
950
951# These must come first in order to make things look nice.
952DOXYGEN_INPUT_FIRST =\
953 $(PATH_ROOT)/include/iprt/cdefs.h \
954 $(PATH_ROOT)/include/iprt/types.h \
955 $(PATH_ROOT)/include/iprt/runtime.h \
956 $(PATH_ROOT)/include/iprt/param.h \
957 $(PATH_ROOT)/include/iprt/assert.h \
958 $(PATH_ROOT)/include/iprt/asm.h \
959
960DOXYGEN_INPUT := \
961 $(filter-out %.cpp.h, $(sort $(wildcard $(addsuffix /*.h, $(DOXYGEN_INPUT_DIRS)))) ) \
962 $(foreach dir, $(DOXYGEN_INPUT_DIRS), $(wildcard $(dir)/*.cpp $(dir)/.c $(dir)/.asm))
963DOXYGEN_INPUT := \
964 $(DOXYGEN_INPUT_FIRST) \
965 $(filter-out $(DOXYGEN_INPUT_FIRST), $(DOXYGEN_INPUT))
966
967
968DOXYGEN_OUTPUT = $(PATH_OUT)/docs/iprt
969
970-include $(PATH_TARGET)/Doxyfile.dep
971
972# Generate the Doxyfile
973$(PATH_TARGET)/Doxyfile: Doxyfile \
974 $(comp-vars DOXYGEN_INPUT,DOXYGEN_INPUT_PREV,FORCE) \
975 $(comp-vars DOXYGEN_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE) \
976 | $(call DIRDEP, $(PATH_TARGET))
977 $(RM) -f $@ $@.tmp $(PATH_TARGET)/Doxyfile.dep
978 $(CP) -f Doxyfile $@.tmp
979 $(APPEND) $@.tmp
980 $(APPEND) $@.tmp "OUTPUT_DIRECTORY = $(DOXYGEN_OUTPUT)"
981 $(APPEND) $@.tmp "WARN_LOGFILE = $(DOXYGEN_OUTPUT)/errors"
982 $(APPEND) $@.tmp "INCLUDE_PATH = $(PATH_ROOT)/include include . table"
983 $(APPEND) $@.tmp "INCLUDE_FILE_PATTERNS = *.cpp.h"
984 $(APPEND) $@.tmp
985 $(APPEND) $@.tmp "INPUT = $(DOXYGEN_INPUT)"
986 $(APPEND) $@.tmp
987 $(MV) -f $@.tmp $@
988 @$(APPEND) $(PATH_TARGET)/Doxyfile.dep "DOXYGEN_OUTPUT_PREV = $(DOXYGEN_OUTPUT)"
989 @$(APPEND) $(PATH_TARGET)/Doxyfile.dep "DOXYGEN_INPUT_PREV = $(DOXYGEN_INPUT)"
990
991# Create the output directory.
992$(call DIRDEP, $(DOXYGEN_OUTPUT)):
993 $(MKDIR) -p $@
994
995# Do the actual job.
996$(PATH_TARGET)/docs.iprt: $(PATH_TARGET)/Doxyfile $(DOXYGEN_INPUT) | $(call DIRDEP, $(DOXYGEN_OUTPUT))
997 $(RM) -f $(wildcard $(DOXYGEN_OUTPUT)/html/*) $(PATH_TARGET)/docs.iprt
998 doxygen $(PATH_TARGET)/Doxyfile
999 $(APPEND) $(PATH_TARGET)/docs.iprt
1000
1001# alias
1002docs: $(PATH_TARGET)/docs.iprt
1003
1004test:
1005 @echo test-$(comp-vars DOXYGEN_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE)
1006 @echo $(DOXYGEN_OUTPUT)
1007 @echo $(DOXYGEN_OUTPUT_PREV)
1008
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