VirtualBox

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

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

ASMMultU64ByU32DivByU32 (for TSC calculation).

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