VirtualBox

source: vbox/trunk/src/VBox/Runtime/Makefile.kmk@ 26550

Last change on this file since 26550 was 26524, checked in by vboxsync, 15 years ago

Only build RuntimeR?Stub on windows.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 59.1 KB
Line 
1# $Id: Makefile.kmk 26524 2010-02-15 02:23:19Z vboxsync $
2## @file
3# Sub-Makefile for the IPRT (IPRT).
4#
5
6#
7# Copyright (C) 2006-2010 Sun Microsystems, Inc.
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 (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17# The contents of this file may alternatively be used under the terms
18# of the Common Development and Distribution License Version 1.0
19# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20# VirtualBox OSE distribution, in which case the provisions of the
21# CDDL are applicable instead of those of the GPL.
22#
23# You may elect to license modified versions of this file under the
24# terms and conditions of either the GPL or the CDDL or both.
25#
26# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
27# Clara, CA 95054 USA or visit http://www.sun.com if you need
28# additional information or have any questions.
29#
30
31SUB_DEPTH = ../../..
32include $(KBUILD_PATH)/subheader.kmk
33
34ifdef VBOX_ONLY_ADDITIONS
35 #
36 # Only build the additions, sort out the legacy names first.
37 #
38 LIBRARIES += RuntimeGuestR3 RuntimeGuestR3Shared RuntimeGuestR3Mini
39 ifdef VBOX_WITH_ADDITION_DRIVERS
40 LIBRARIES += RuntimeGuestR0
41 endif
42 #LIBRARIES.os2 += RuntimeGuestR0OS2Warp3
43 LIBRARIES.win.x86 += RuntimeGuestR0NT4
44
45else ifdef VBOX_ONLY_DOCS
46 #
47 # Build docs only - need just regular R3 runtime.
48 #
49 LIBRARIES += RuntimeR3
50 DLLS += VBoxRT
51
52else # !VBOX_ONLY_ADDITIONS && !VBOX_ONLY_DOCS
53
54 #
55 # Normal build.
56 #
57 include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
58
59 BLDPROGS += uniread
60 LIBRARIES += RuntimeR3 RuntimeR0 RuntimeEFCPP RuntimeR3NoCRTGCC
61 LIBRARIES.win += RuntimeR0Stub
62 ifdef VBOX_WITH_RAW_MODE
63 LIBRARIES += RuntimeRC
64 LIBRARIES.win += RuntimeRCStub
65 endif
66 ifdef VBOX_WITH_VBOXDRV
67 LIBRARIES += RuntimeR0Drv
68 endif
69 ifdef VBOX_WITH_ADDITIONS
70 LIBRARIES += RuntimeGuestR3 RuntimeGuestR3Shared RuntimeGuestR3Mini
71 ifdef VBOX_WITH_ADDITION_DRIVERS
72 LIBRARIES += RuntimeGuestR0
73 endif
74 #LIBRARIES.os2 += RuntimeGuestR0OS2Warp3
75 LIBRARIES.win.x86 += RuntimeGuestR0NT4
76 endif # VBOX_WITH_ADDITIONS
77 LIBRARIES.l4 += RuntimeR3L4 RuntimeLnxHostR3
78 DLLS += VBoxRT
79endif
80
81# Where the generated stuff goes.
82IPRT_OUT_DIR := $(PATH_TARGET)/Runtime
83BLDDIRS += $(IPRT_OUT_DIR)
84OTHER_CLEAN += \
85 $(IPRT_OUT_DIR)/errmsgdata.h \
86 $(IPRT_OUT_DIR)/errmsgcomdata.h \
87 $(IPRT_OUT_DIR)/errmsgvboxcomdata.h \
88 $(IPRT_OUT_DIR)/Doxyfile.iprt \
89 $(IPRT_OUT_DIR)/Doxyfile.iprt.dep \
90 $(IPRT_OUT_DIR)/docs.iprt
91
92
93#
94# Globals
95#
96VBOX_PATH_RUNTIME_SRC := $(PATH_SUB_CURRENT)
97
98
99#
100# Set the defines that buildconfig.cpp needs. Its used by several targets.
101#
102common/misc/buildconfig.cpp_DEFS = \
103 IPRT_BLDCFG_SCM_REV=$(VBOX_SVN_REV) \
104 IPRT_BLDCFG_VERSION_STRING=\"$(VBOX_VERSION_STRING)\" \
105 IPRT_BLDCFG_VERSION_MAJOR=$(VBOX_VERSION_MAJOR) \
106 IPRT_BLDCFG_VERSION_MINOR=$(VBOX_VERSION_MINOR) \
107 IPRT_BLDCFG_VERSION_BUILD=$(VBOX_VERSION_BUILD)
108
109#
110# Unicode Specification reader used to regenerate unidata.cpp.
111#
112uniread_TEMPLATE = VBOXBLDPROG
113uniread_SOURCES = common/string/uniread.cpp
114uniread_INCS = include
115
116#
117# Win64 assembly sources.
118#
119RuntimeWin64ASM_SOURCES = \
120 win/amd64/ASMAtomicBitClear.asm \
121 win/amd64/ASMAtomicBitTestAndToggle.asm \
122 win/amd64/ASMAtomicBitToggle.asm \
123 win/amd64/ASMAtomicReadU64.asm \
124 win/amd64/ASMAtomicXchgU16.asm \
125 win/amd64/ASMAtomicXchgU8.asm \
126 win/amd64/ASMBitFirstClear.asm \
127 win/amd64/ASMBitFirstSet.asm \
128 win/amd64/ASMGetCS.asm \
129 win/amd64/ASMGetDS.asm \
130 win/amd64/ASMGetES.asm \
131 win/amd64/ASMGetFlags.asm \
132 win/amd64/ASMGetFS.asm \
133 win/amd64/ASMGetGS.asm \
134 win/amd64/ASMGetIDTR.asm \
135 win/amd64/ASMGetGDTR.asm \
136 win/amd64/ASMGetTR.asm \
137 win/amd64/ASMGetSS.asm \
138 win/amd64/ASMProbeReadByte.asm \
139 win/amd64/ASMSetFlags.asm \
140 win/amd64/ASMGetDR0.asm \
141 win/amd64/ASMGetDR1.asm \
142 win/amd64/ASMGetDR2.asm \
143 win/amd64/ASMGetDR3.asm \
144 win/amd64/ASMGetDR6.asm \
145 win/amd64/ASMGetDR7.asm \
146 common/asm/ASMAtomicCmpXchgU8.asm \
147 common/asm/ASMMultU64ByU32DivByU32.asm \
148 common/asm/ASMNopPause.asm
149
150#
151# Win32 assembly sources.
152#
153RuntimeWin32ASM_SOURCES = \
154 common/asm/ASMAtomicCmpXchgU8.asm \
155 common/asm/ASMMultU64ByU32DivByU32.asm
156
157#
158# NoCRT sources (minus math stuff).
159#
160RuntimeNoCrt_SOURCES = \
161 common/misc/setjmp.asm \
162 common/string/memchr.asm \
163 common/string/memcmp.asm \
164 common/string/memcpy.asm \
165 common/string/mempcpy.asm \
166 common/string/memmove.asm \
167 common/string/memset.asm \
168 common/string/strchr.asm \
169 common/string/strcpy.asm \
170 common/string/strcmp.asm \
171 common/string/strlen.asm
172
173
174#
175# RuntimeR3 - Static Runtime for Ring-3 executables.
176#
177RuntimeR3_TEMPLATE = VBoxR3Static
178RuntimeR3_SDKS = VBOX_LIBXML2 VBOX_BOOST
179RuntimeR3_SDKS.win = WINPSDK W2K3DDK
180RuntimeR3_DEFS = IN_RT_R3 IN_SUP_R3 LDR_WITH_NATIVE LDR_WITH_ELF32 LDR_WITH_PE RT_WITH_VBOX RT_NO_GIP
181ifdef IPRT_WITH_KSTUFF
182 RuntimeR3_DEFS += LDR_WITH_KLDR
183endif
184ifdef VBOX_MAIN_RELEASE_LOG ## @todo (dmik): temporary, until RTThreadSelf/RTThreadAdopt are properly updated
185 RuntimeR3_DEFS += RTCRITSECT_STRICT
186endif
187ifdef IPRT_WITH_LZJB
188 RuntimeR3_DEFS += RTZIP_USE_LZJB
189endif
190ifdef IPRT_WITH_LZO
191 RuntimeR3_DEFS += RTZIP_USE_LZO
192endif
193ifdef IPRT_WITH_FUTEX_BASED_SEMS
194 RuntimeR3_DEFS.linux += IPRT_WITH_FUTEX_BASED_SEMS
195endif
196RuntimeR3_INCS = \
197 include \
198 $(SDK_VBOX_ZLIB_INCS)
199RuntimeR3_INCS += \
200 $(PATH_ROOT)/src/libs/liblzf-3.4
201ifdef IPRT_WITH_KSTUFF
202 RuntimeR3_INCS += \
203 $(PATH_ROOT)/src/libs/kStuff/kStuff/include
204endif
205RuntimeR3_INCS.l4 = \
206 $(L4_INCDIR)
207
208# RuntimeR3_INCS.solaris = \
209# /usr/include
210
211RuntimeR3_SOURCES = \
212 common/alloc/alloc.cpp \
213 common/alloc/heapsimple.cpp \
214 common/alloc/heapoffset.cpp \
215 common/alloc/memcache.cpp \
216 common/checksum/adler32.cpp \
217 common/checksum/crc32-zlib.cpp \
218 common/checksum/crc64.cpp \
219 common/checksum/md5.cpp \
220 common/checksum/md5str.cpp \
221 common/checksum/ipv4.cpp \
222 common/dbg/dbg.cpp \
223 common/dbg/dbgas.cpp \
224 common/dbg/dbgmod.cpp \
225 common/dbg/dbgmodcontainer.cpp \
226 common/dbg/dbgmodnm.cpp \
227 common/err/errmsg.cpp \
228 common/err/RTErrConvertFromErrno.cpp \
229 common/err/RTErrConvertToErrno.cpp \
230 common/ldr/ldr.cpp \
231 common/ldr/ldrELF.cpp \
232 common/ldr/ldrEx.cpp \
233 common/ldr/ldrFile.cpp \
234 common/ldr/ldrNative.cpp \
235 common/ldr/ldrPE.cpp \
236 common/log/log.cpp \
237 common/log/logellipsis.cpp \
238 common/log/logrel.cpp \
239 common/log/logrelellipsis.cpp \
240 common/log/logcom.cpp \
241 common/log/logformat.cpp \
242 common/misc/RTAssertMsg1Weak.cpp \
243 common/misc/RTAssertMsg2.cpp \
244 common/misc/RTAssertMsg2Add.cpp \
245 common/misc/RTAssertMsg2AddWeak.cpp \
246 common/misc/RTAssertMsg2AddWeakV.cpp \
247 common/misc/RTAssertMsg2Weak.cpp \
248 common/misc/RTAssertMsg2WeakV.cpp \
249 common/misc/RTFileOpenF.cpp \
250 common/misc/RTFileOpenV.cpp \
251 common/misc/assert.cpp \
252 common/misc/buildconfig.cpp \
253 common/misc/cache.cpp \
254 common/misc/cidr.cpp \
255 common/misc/getopt.cpp \
256 common/misc/getoptargv.cpp \
257 common/misc/handletable.cpp \
258 common/misc/handletablectx.cpp \
259 common/misc/handletablesimple.cpp \
260 common/misc/lockvalidator.cpp \
261 common/misc/message.cpp \
262 common/misc/once.cpp \
263 common/misc/req.cpp \
264 common/misc/sanity-c.c \
265 common/misc/sanity-cpp.cpp \
266 common/misc/semspingpong.cpp \
267 common/misc/thread.cpp \
268 common/misc/zip.cpp \
269 common/misc/term.cpp \
270 common/misc/tar.cpp \
271 common/path/rtPathRootSpecLen.cpp \
272 common/path/rtPathVolumeSpecLen.cpp \
273 common/path/RTPathAbsDup.cpp \
274 common/path/RTPathAbsEx.cpp \
275 common/path/RTPathAbsExDup.cpp \
276 common/path/RTPathAppend.cpp \
277 common/path/RTPathChangeToDosSlashes.cpp \
278 common/path/RTPathChangeToUnixSlashes.cpp \
279 common/path/RTPathCopyComponents.cpp \
280 common/path/RTPathCountComponents.cpp \
281 common/path/RTPathExt.cpp \
282 common/path/RTPathFilename.cpp \
283 common/path/RTPathHaveExt.cpp \
284 common/path/RTPathHavePath.cpp \
285 common/path/RTPathJoin.cpp \
286 common/path/RTPathParse.cpp \
287 common/path/RTPathRealDup.cpp \
288 common/path/RTPathStripExt.cpp \
289 common/path/RTPathStripFilename.cpp \
290 common/path/RTPathStripTrailingSlash.cpp \
291 common/path/RTPathTraverseList.cpp \
292 common/path/comparepaths.cpp \
293 common/rand/rand.cpp \
294 common/rand/randadv.cpp \
295 common/rand/randparkmiller.cpp \
296 common/string/RTStrCmp.cpp \
297 common/string/RTStrConvertHexBytes.cpp \
298 common/string/RTStrNCmp.cpp \
299 common/string/RTStrNLen.cpp \
300 common/string/RTStrNLenEx.cpp \
301 common/string/RTStrPrintHexBytes.cpp \
302 common/string/RTStrStr.cpp \
303 common/string/base64.cpp \
304 common/string/simplepattern.cpp \
305 common/string/straprintf.cpp \
306 common/string/strformat.cpp \
307 common/string/strformatrt.cpp \
308 common/string/strformattype.cpp \
309 common/string/stringalloc.cpp \
310 common/string/strprintf.cpp \
311 common/string/strspace.cpp \
312 common/string/strstrip.cpp \
313 common/string/strtonum.cpp \
314 common/string/strversion.cpp \
315 common/string/uni.cpp \
316 common/string/unidata.cpp \
317 common/string/utf-16.cpp \
318 common/string/utf-8.cpp \
319 common/string/utf-8-case.cpp \
320 common/string/ministring.cpp \
321 common/table/avlgcptr.cpp \
322 common/table/avlhcphys.cpp \
323 common/table/avllu32.cpp \
324 common/table/avlou32.cpp \
325 common/table/avlogcphys.cpp \
326 common/table/avlogcptr.cpp \
327 common/table/avlohcphys.cpp \
328 common/table/avloioport.cpp \
329 common/table/avlpv.cpp \
330 common/table/avlrgcptr.cpp \
331 common/table/avlrogcphys.cpp \
332 common/table/avlrogcptr.cpp \
333 common/table/avlroioport.cpp \
334 common/table/avlroogcptr.cpp \
335 common/table/avlruintptr.cpp \
336 common/table/avlrfoff.cpp \
337 common/table/avlu32.cpp \
338 common/table/avluintptr.cpp \
339 common/table/avlul.cpp \
340 common/table/table.cpp \
341 common/time/time.cpp \
342 common/time/timeprog.cpp \
343 common/time/timesup.cpp \
344 generic/critsect-generic.cpp \
345 generic/env-generic.cpp \
346 generic/RTDirCreateTemp-generic.cpp \
347 generic/RTEnvDupEx-generic.cpp \
348 generic/RTFileCopy-generic.cpp \
349 generic/RTFileQuerySize-generic.cpp \
350 generic/RTFileReadAll-generic.cpp \
351 generic/RTFileReadAllEx-generic.cpp \
352 generic/RTFileReadAllByHandle-generic.cpp \
353 generic/RTFileReadAllByHandleEx-generic.cpp \
354 generic/RTFileReadAllFree-generic.cpp \
355 generic/RTLogWriteStdErr-generic.cpp \
356 generic/RTLogWriteStdOut-generic.cpp \
357 generic/RTLogWriteUser-generic.cpp \
358 generic/RTMpGetDescription-generic.cpp \
359 generic/RTTimerLRCreate-generic.cpp \
360 generic/mempool-generic.cpp \
361 generic/semfastmutex-generic.cpp \
362 generic/semxroads-generic.cpp \
363 generic/spinlock-generic.cpp \
364 generic/strcache-stubs-generic.cpp \
365 generic/timerlr-generic.cpp \
366 r3/alloc-ef.cpp \
367 r3/alloc.cpp \
368 r3/dir.cpp \
369 r3/fileio.cpp \
370 r3/fs.cpp \
371 r3/init.cpp \
372 r3/path.cpp \
373 r3/process.cpp \
374 r3/stream.cpp \
375 r3/test.cpp \
376 r3/testi.cpp \
377 r3/tcp.cpp \
378 r3/generic/semspinmutex-r3-generic.cpp
379
380#if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
381# RuntimeR3_SOURCES += common/time/timesupA.asm
382#else
383 RuntimeR3_SOURCES += common/time/timesupref.cpp
384#endif
385
386ifdef IPRT_WITH_LZJB
387 RuntimeR3_SOURCES += common/misc/lzjb.c
388endif
389
390# Some versions of GCC might require this.
391RuntimeR3_SOURCES.x86 += \
392 common/asm/ASMAtomicXchgU64.asm \
393 common/asm/ASMAtomicCmpXchgU64.asm \
394 common/asm/ASMAtomicCmpXchgExU64.asm \
395 common/asm/ASMAtomicReadU64.asm \
396 common/asm/ASMAtomicUoReadU64.asm
397
398ifdef IPRT_WITH_KSTUFF
399 RuntimeR3_SOURCES += \
400 common/ldr/ldrkStuff.cpp
401endif
402
403# VBox specific stuff.
404RuntimeR3_SOURCES += \
405 VBox/RTAssertShouldPanic-vbox.cpp \
406 VBox/log-vbox.cpp
407ifneq ($(KBUILD_TARGET),win)
408RuntimeR3_SOURCES += \
409 common/err/errmsgxpcom.cpp
410endif
411if1of ($(KBUILD_TARGET),freebsd linux netbsd openbsd solaris)
412RuntimeR3_SOURCES += \
413 $(if $(VBOX_WITH_DBUS),VBox/dbus.cpp,)
414endif
415
416RuntimeR3_SOURCES.win = \
417 generic/RTDirExists-generic.cpp \
418 generic/RTDirQueryInfo-generic.cpp \
419 generic/RTDirSetTimes-generic.cpp \
420 generic/RTFileExists-generic.cpp \
421 generic/RTMpGetCurFrequency-generic.cpp \
422 generic/RTMpGetMaxFrequency-generic.cpp \
423 generic/RTRandAdvCreateSystemFaster-generic.cpp \
424 generic/RTRandAdvCreateSystemTruer-generic.cpp \
425 generic/RTSemEventWait-generic.cpp \
426 generic/RTSemEventMultiWait-generic.cpp \
427 generic/RTSemMutexRequest-generic.cpp \
428 generic/RTSemMutexRequestDebug-generic.cpp \
429 generic/mppresent-generic.cpp \
430 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
431 generic/uuid-generic.cpp \
432 generic/RTProcIsRunningByName-generic.cpp \
433 generic/RTThreadGetNativeState-generic.cpp \
434 nt/RTErrConvertFromNtStatus.cpp \
435 r3/posix/env-posix.cpp \
436 r3/win/RTSystemQueryOSInfo-win.cpp \
437 r3/win/alloc-win.cpp \
438 r3/win/dir-win.cpp \
439 r3/win/fileio-win.cpp \
440 r3/win/fs-win.cpp \
441 r3/win/ldrNative-win.cpp \
442 r3/win/localipc-win.cpp \
443 r3/win/mp-win.cpp \
444 r3/win/path-win.cpp \
445 r3/win/process-win.cpp \
446 r3/win/RTLogWriteDebugger-win.cpp \
447 r3/win/rtProcInitExePath-win.cpp \
448 r3/win/sched-win.cpp \
449 r3/win/semevent-win.cpp \
450 r3/win/semeventmulti-win.cpp \
451 r3/win/semmutex-win.cpp \
452 r3/win/rtFileNativeSetAttributes-win.cpp \
453 r3/win/thread-win.cpp \
454 r3/win/time-win.cpp \
455 r3/win/timer-win.cpp \
456 r3/win/tls-win.cpp \
457 r3/win/utf16locale-win.cpp \
458 r3/win/utf8-win.cpp \
459 r3/win/RTUuidCreate-win.cpp \
460 win/errmsgwin.cpp \
461 win/RTErrConvertFromWin32.cpp
462
463RuntimeR3_SOURCES.win.amd64 = $(RuntimeWin64ASM_SOURCES)
464RuntimeR3_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
465
466RuntimeR3_SOURCES.linux = \
467 generic/pathhost-generic.cpp \
468 generic/RTDirQueryInfo-generic.cpp \
469 generic/RTDirSetTimes-generic.cpp \
470 generic/RTFileMove-generic.cpp \
471 generic/RTLogWriteDebugger-generic.cpp \
472 generic/RTTimeLocalNow-generic.cpp \
473 generic/RTTimerCreate-generic.cpp \
474 generic/RTUuidCreate-generic.cpp \
475 generic/mppresent-generic.cpp \
476 generic/utf16locale-generic.cpp \
477 generic/uuid-generic.cpp \
478 r3/linux/RTThreadGetNativeState-linux.cpp \
479 r3/linux/mp-linux.cpp \
480 r3/linux/rtProcInitExePath-linux.cpp \
481 r3/linux/sched-linux.cpp \
482 r3/linux/sysfs.cpp \
483 r3/linux/time-linux.cpp \
484 r3/linux/RTProcIsRunningByName-linux.cpp \
485 r3/posix/RTFileQueryFsSizes-posix.cpp \
486 r3/posix/RTSystemQueryOSInfo-posix.cpp \
487 r3/posix/alloc-posix.cpp \
488 r3/posix/dir-posix.cpp \
489 r3/posix/env-posix.cpp \
490 r3/posix/fileio-posix.cpp \
491 r3/posix/filelock-posix.cpp \
492 r3/posix/fs-posix.cpp \
493 r3/posix/ldrNative-posix.cpp \
494 r3/posix/path-posix.cpp \
495 r3/posix/process-posix.cpp \
496 r3/posix/rand-posix.cpp \
497 r3/posix/RTTimeNow-posix.cpp \
498 r3/posix/RTTimeSet-posix.cpp \
499 r3/posix/semrw-posix.cpp \
500 r3/posix/thread-posix.cpp \
501 r3/posix/timelocal-posix.cpp \
502 r3/posix/timer-posix.cpp \
503 r3/posix/tls-posix.cpp \
504 r3/posix/utf8-posix.cpp
505ifdef IPRT_WITH_FUTEX_BASED_SEMS
506 RuntimeR3_SOURCES.linux += \
507 r3/linux/semevent-linux.cpp \
508 r3/linux/semeventmulti-linux.cpp \
509 r3/linux/semmutex-linux.cpp
510else
511 RuntimeR3_SOURCES.linux.x86 += \
512 r3/posix/semevent-posix.cpp \
513 r3/posix/semeventmulti-posix.cpp \
514 r3/posix/semmutex-posix.cpp
515 RuntimeR3_SOURCES.linux.amd64 += \
516 r3/linux/semevent-linux.cpp \
517 r3/linux/semeventmulti-linux.cpp
518 ifdef RT_NEW_LINUX_MUTEX_CODE
519 RuntimeR3_SOURCES.linux.amd64 += \
520 r3/linux/semmutex-linux.cpp
521 else
522 RuntimeR3_SOURCES.linux.amd64 += \
523 r3/posix/semmutex-posix.cpp
524 endif
525endif
526
527RuntimeR3_SOURCES.os2 = \
528 generic/pathhost-generic.cpp \
529 generic/RTDirQueryInfo-generic.cpp \
530 generic/RTDirSetTimes-generic.cpp \
531 generic/RTFileMove-generic.cpp \
532 generic/RTLogWriteDebugger-generic.cpp \
533 generic/RTRandAdvCreateSystemFaster-generic.cpp \
534 generic/RTRandAdvCreateSystemTruer-generic.cpp \
535 generic/RTTimeLocalNow-generic.cpp \
536 generic/RTTimerCreate-generic.cpp \
537 generic/RTUuidCreate-generic.cpp \
538 generic/mppresent-generic.cpp \
539 generic/RTSemEventWait-generic.cpp \
540 generic/RTSemEventMultiWait-generic.cpp \
541 generic/RTSemMutexRequest-generic.cpp \
542 generic/RTSemMutexRequestDebug-generic.cpp \
543 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
544 generic/timer-generic.cpp \
545 generic/utf16locale-generic.cpp \
546 generic/uuid-generic.cpp \
547 generic/RTMpGetCurFrequency-generic.cpp \
548 generic/RTMpGetMaxFrequency-generic.cpp \
549 generic/RTProcIsRunningByName-generic.cpp \
550 generic/RTThreadGetNativeState-generic.cpp \
551 os2/RTErrConvertFromOS2.cpp \
552 r3/os2/filelock-os2.cpp \
553 r3/os2/mp-os2.cpp \
554 r3/os2/rtProcInitExePath-os2.cpp \
555 r3/os2/sched-os2.cpp \
556 r3/os2/sems-os2.cpp \
557 r3/os2/thread-os2.cpp \
558 r3/os2/time-os2.cpp \
559 r3/posix/RTFileQueryFsSizes-posix.cpp \
560 r3/posix/RTSystemQueryOSInfo-posix.cpp \
561 r3/posix/alloc-posix.cpp \
562 r3/posix/dir-posix.cpp \
563 r3/posix/env-posix.cpp \
564 r3/posix/fileio-posix.cpp \
565 r3/posix/fs-posix.cpp \
566 r3/posix/ldrNative-posix.cpp \
567 r3/posix/path-posix.cpp \
568 r3/posix/process-posix.cpp \
569 r3/posix/RTTimeNow-posix.cpp \
570 r3/posix/RTTimeSet-posix.cpp \
571 r3/posix/timelocal-posix.cpp \
572 r3/posix/utf8-posix.cpp
573
574RuntimeR3_SOURCES.darwin = \
575 darwin/RTErrConvertFromDarwin.cpp \
576 darwin/RTErrConvertFromDarwinCOM.cpp \
577 darwin/RTErrConvertFromDarwinIO.cpp \
578 darwin/RTErrConvertFromDarwinKern.cpp \
579 generic/pathhost-generic.cpp \
580 generic/RTDirQueryInfo-generic.cpp \
581 generic/RTDirSetTimes-generic.cpp \
582 generic/RTFileMove-generic.cpp \
583 generic/RTLogWriteDebugger-generic.cpp \
584 generic/RTTimeLocalNow-generic.cpp \
585 generic/RTTimerCreate-generic.cpp \
586 generic/RTUuidCreate-generic.cpp \
587 generic/mppresent-generic.cpp \
588 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
589 generic/timer-generic.cpp \
590 generic/utf16locale-generic.cpp \
591 generic/uuid-generic.cpp\
592 generic/RTProcIsRunningByName-generic.cpp \
593 generic/RTThreadGetNativeState-generic.cpp \
594 r3/darwin/alloc-darwin.cpp \
595 r3/darwin/filelock-darwin.cpp \
596 r3/darwin/mp-darwin.cpp \
597 r3/darwin/rtProcInitExePath-darwin.cpp \
598 r3/darwin/sched-darwin.cpp \
599 r3/darwin/time-darwin.cpp \
600 r3/posix/RTFileQueryFsSizes-posix.cpp \
601 r3/posix/RTSystemQueryOSInfo-posix.cpp \
602 r3/posix/RTTimeSet-posix.cpp \
603 r3/posix/dir-posix.cpp \
604 r3/posix/env-posix.cpp \
605 r3/posix/fileio-posix.cpp \
606 r3/posix/fs-posix.cpp \
607 r3/posix/ldrNative-posix.cpp \
608 r3/posix/path-posix.cpp \
609 r3/posix/process-posix.cpp \
610 r3/posix/rand-posix.cpp \
611 r3/posix/semevent-posix.cpp \
612 r3/posix/semeventmulti-posix.cpp \
613 r3/posix/semmutex-posix.cpp \
614 r3/posix/thread-posix.cpp \
615 r3/posix/timelocal-posix.cpp \
616 r3/posix/tls-posix.cpp \
617 r3/posix/utf8-posix.cpp
618
619## @todo Make BSD sched, implement RTMP*.
620RuntimeR3_SOURCES.freebsd = \
621 generic/pathhost-generic.cpp \
622 generic/RTDirQueryInfo-generic.cpp \
623 generic/RTDirSetTimes-generic.cpp \
624 generic/RTFileMove-generic.cpp \
625 generic/RTLogWriteDebugger-generic.cpp \
626 generic/RTTimeLocalNow-generic.cpp \
627 generic/RTTimerCreate-generic.cpp \
628 generic/RTUuidCreate-generic.cpp \
629 generic/mppresent-generic.cpp \
630 generic/sched-generic.cpp \
631 generic/utf16locale-generic.cpp \
632 generic/uuid-generic.cpp \
633 generic/RTMpCpuId-generic.cpp \
634 generic/RTMpCpuIdFromSetIndex-generic.cpp \
635 generic/RTMpCpuIdToSetIndex-generic.cpp \
636 generic/RTMpIsCpuPossible-generic.cpp \
637 generic/RTMpGetMaxCpuId-generic.cpp \
638 generic/RTMpGetOnlineSet-generic.cpp \
639 generic/RTMpGetSet-generic.cpp \
640 generic/RTMpIsCpuOnline-generic.cpp \
641 generic/RTProcIsRunningByName-generic.cpp \
642 generic/RTThreadGetNativeState-generic.cpp \
643 r3/freebsd/mp-freebsd.cpp \
644 r3/freebsd/alloc-freebsd.cpp \
645 r3/freebsd/rtProcInitExePath-freebsd.cpp \
646 r3/posix/RTFileQueryFsSizes-posix.cpp \
647 r3/posix/RTSystemQueryOSInfo-posix.cpp \
648 r3/posix/dir-posix.cpp \
649 r3/posix/env-posix.cpp \
650 r3/posix/fileio-posix.cpp \
651 r3/posix/filelock-posix.cpp \
652 r3/posix/fs-posix.cpp \
653 r3/posix/ldrNative-posix.cpp \
654 r3/posix/path-posix.cpp \
655 r3/posix/process-posix.cpp \
656 r3/posix/rand-posix.cpp \
657 r3/posix/RTMpGetCount-posix.cpp \
658 r3/posix/RTTimeNow-posix.cpp \
659 r3/posix/RTTimeSet-posix.cpp \
660 r3/posix/semevent-posix.cpp \
661 r3/posix/semeventmulti-posix.cpp \
662 r3/posix/semmutex-posix.cpp \
663 r3/posix/semrw-posix.cpp \
664 r3/posix/thread-posix.cpp \
665 r3/posix/time-posix.cpp \
666 r3/posix/timelocal-posix.cpp \
667 r3/posix/timer-posix.cpp \
668 r3/posix/tls-posix.cpp \
669 r3/posix/utf8-posix.cpp
670
671RuntimeR3_SOURCES.solaris = \
672 generic/pathhost-generic.cpp \
673 generic/RTDirQueryInfo-generic.cpp \
674 generic/RTDirSetTimes-generic.cpp \
675 generic/RTFileMove-generic.cpp \
676 generic/RTLogWriteDebugger-generic.cpp \
677 generic/RTTimeLocalNow-generic.cpp \
678 generic/RTTimerCreate-generic.cpp \
679 generic/RTUuidCreate-generic.cpp \
680 generic/sched-generic.cpp \
681 generic/utf16locale-generic.cpp \
682 generic/uuid-generic.cpp \
683 generic/RTProcIsRunningByName-generic.cpp \
684 generic/RTThreadGetNativeState-generic.cpp \
685 r3/posix/RTFileQueryFsSizes-posix.cpp \
686 r3/posix/RTSystemQueryOSInfo-posix.cpp \
687 r3/posix/dir-posix.cpp \
688 r3/posix/env-posix.cpp \
689 r3/posix/fileio-posix.cpp \
690 r3/posix/filelock-posix.cpp \
691 r3/posix/fs-posix.cpp \
692 r3/posix/ldrNative-posix.cpp \
693 r3/posix/path-posix.cpp \
694 r3/posix/process-posix.cpp \
695 r3/posix/rand-posix.cpp \
696 r3/posix/RTTimeNow-posix.cpp \
697 r3/posix/RTTimeSet-posix.cpp \
698 r3/posix/semevent-posix.cpp \
699 r3/posix/semeventmulti-posix.cpp \
700 r3/posix/semmutex-posix.cpp \
701 r3/posix/semrw-posix.cpp \
702 r3/posix/thread-posix.cpp \
703 r3/posix/time-posix.cpp \
704 r3/posix/timelocal-posix.cpp \
705 r3/posix/timer-posix.cpp \
706 r3/posix/tls-posix.cpp \
707 r3/posix/utf8-posix.cpp \
708 r3/solaris/alloc-solaris.cpp \
709 r3/solaris/mp-solaris.cpp \
710 r3/solaris/rtProcInitExePath-solaris.cpp \
711
712## PORTME: Porters add their selection of platform specific files for Ring-3 here.
713
714
715#
716# L4 RuntimeR3 subtarget since L4 headers won't work with VBOXR3.
717#
718RuntimeR3L4_TEMPLATE = VBOXR3NP
719RuntimeR3L4_DEFS = IN_RT_R3 IN_SUP_R3 LDR_WITH_NATIVE LDR_WITH_ELF LDR_WITH_PE
720ifneq ($(KBUILD_TARGET_ARCH),amd64)
721RuntimeR3L4_DEFS += __PIC__
722endif
723RuntimeR3L4_INCS = \
724 include \
725 $(L4_INCDIR)
726
727RuntimeR3L4_SOURCES = \
728 generic/fs-stubs-generic.cpp \
729 generic/pathhost-generic.cpp \
730 generic/RTDirQueryInfo-generic.cpp \
731 generic/RTDirSetTimes-generic.cpp \
732 generic/RTFileMove-generic.cpp \
733 generic/RTLogWriteDebugger-generic.cpp \
734 generic/RTSystemQueryOSInfo-generic.cpp \
735 generic/RTTimeLocalNow-generic.cpp \
736 generic/RTUuidCreate-generic.cpp \
737 generic/mppresent-generic.cpp \
738 generic/sched-generic.cpp \
739 generic/RTSemEventWait-generic.cpp \
740 generic/RTSemEventMultiWait-generic.cpp \
741 generic/RTSemMutexRequest-generic.cpp \
742 generic/RTSemMutexRequestDebug-generic.cpp \
743 generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
744 generic/utf16locale-generic.cpp \
745 generic/uuid-generic.cpp \
746 generic/RTProcIsRunningByName-generic.cpp \
747 generic/RTThreadGetNativeState-generic.cpp \
748 l4/l4-errno.cpp \
749 l4/rtProcInitExePath-l4.cpp \
750 l4/process-l4env.cpp \
751 l4/sems-l4env.cpp \
752 l4/thread-l4env.cpp \
753 l4/timer-l4env.cpp \
754 l4/utf8-l4env.cpp \
755 r3/posix/RTFileQueryFsSizes-posix.cpp \
756 r3/posix/alloc-posix.cpp \
757 r3/posix/dir-posix.cpp \
758 r3/posix/env-posix.cpp \
759 r3/posix/fileio-posix.cpp \
760 r3/posix/filelock-posix.cpp \
761 r3/posix/ldrNative-posix.cpp \
762 r3/posix/path-posix.cpp \
763 r3/posix/rand-posix.cpp \
764 r3/posix/RTTimeNow-posix.cpp \
765 r3/posix/RTTimeSet-posix.cpp \
766 r3/posix/time-posix.cpp \
767 r3/posix/timelocal-posix.cpp
768
769
770#
771# RuntimeGuestR3 - Guest Additions Runtime (static/exe).
772# (The KBUILD_HOST inheritance here is for l4 cross building the linux
773# additions, while .x86 is for cross building x86 while targeting amd64.)
774#
775RuntimeGuestR3_TEMPLATE := VBOXGUESTR3LIB
776## @todo change this to EXTEND the RuntimeR3 target.
777RuntimeGuestR3_SDKS.win := $(RuntimeR3_SDKS.win)
778RuntimeGuestR3_DEFS := $(filter-out RTCRITSECT_STRICT RT_NO_GIP, $(RuntimeR3_DEFS))
779RuntimeGuestR3_DEFS.$(KBUILD_TARGET) := $(RuntimeR3_DEFS.$(KBUILD_TARGET))
780RuntimeGuestR3_DEFS.$(KBUILD_HOST) := $(RuntimeR3_DEFS.$(KBUILD_HOST))
781RuntimeGuestR3_INCS := $(RuntimeR3_INCS)
782RuntimeGuestR3_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
783RuntimeGuestR3_INCS.$(KBUILD_HOST) := $(RuntimeR3_INCS.$(KBUILD_HOST))
784RuntimeGuestR3_SOURCES := $(filter-out \
785 common/time/timesupref.cpp \
786 common/time/timesupA.asm \
787 common/time/timesup.cpp \
788 generic/RTLogWriteUser-generic.cpp \
789 , $(RuntimeR3_SOURCES))
790RuntimeGuestR3_SOURCES += \
791 common/time/timesysalias.cpp \
792 VBox/logbackdoor.cpp
793RuntimeGuestR3_SOURCES.$(KBUILD_TARGET) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET))
794RuntimeGuestR3_SOURCES.$(KBUILD_HOST) := $(RuntimeR3_SOURCES.$(KBUILD_HOST))
795RuntimeGuestR3_SOURCES.$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET_ARCH))
796RuntimeGuestR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
797RuntimeGuestR3_SOURCES.$(KBUILD_HOST).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_HOST).$(KBUILD_TARGET_ARCH))
798
799
800#
801# RuntimeGuestR3Shared - Guest Additions Runtime (static/dll).
802#
803RuntimeGuestR3Shared_TEMPLATE := VBOXGUESTR3DLL
804RuntimeGuestR3Shared_EXTENDS := RuntimeGuestR3
805RuntimeGuestR3Shared_INST = $(INST_ADDITIONS_LIB)
806
807
808#
809# RuntimeGuestR3Mini - Minimal Guest Additions Runtime which does not require
810# initialization and can be linked into an .so. Intended
811# for X11 drivers, GRADD and similar.
812#
813RuntimeGuestR3Mini_TEMPLATE := VBOXGUESTR3DLL
814## @todo change this to EXTEND the RuntimeGuestR3 target.
815RuntimeGuestR3Mini_INST := $(INST_ADDITIONS_LIB)
816RuntimeGuestR3Mini_SDKS.win := $(RuntimeR3_SDKS.win)
817RuntimeGuestR3Mini_DEFS := $(filter-out RTCRITSECT_STRICT RT_NO_GIP, $(RuntimeR3_DEFS)) RT_MINI
818RuntimeGuestR3Mini_DEFS.$(KBUILD_TARGET) := $(RuntimeR3_DEFS.$(KBUILD_TARGET))
819RuntimeGuestR3Mini_DEFS.$(KBUILD_HOST) := $(RuntimeR3_DEFS.$(KBUILD_HOST))
820RuntimeGuestR3Mini_INCS := $(RuntimeR3_INCS)
821RuntimeGuestR3Mini_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
822RuntimeGuestR3Mini_INCS.$(KBUILD_HOST) := $(RuntimeR3_INCS.$(KBUILD_HOST))
823RuntimeGuestR3Mini_SOURCES = \
824 common/err/errmsg.cpp \
825 common/err/errmsgxpcom.cpp \
826 common/err/RTErrConvertFromErrno.cpp \
827 common/log/logformat.cpp \
828 common/misc/RTAssertMsg1Weak.cpp \
829 common/misc/RTAssertMsg2.cpp \
830 common/misc/RTAssertMsg2Add.cpp \
831 common/misc/RTAssertMsg2AddWeak.cpp \
832 common/misc/RTAssertMsg2AddWeakV.cpp \
833 common/misc/RTAssertMsg2Weak.cpp \
834 common/misc/RTAssertMsg2WeakV.cpp \
835 common/misc/assert.cpp \
836 common/misc/buildconfig.cpp \
837 common/misc/sanity-c.c \
838 common/misc/sanity-cpp.cpp \
839 common/path/rtPathVolumeSpecLen.cpp \
840 common/path/RTPathAbsDup.cpp \
841 common/path/RTPathAbsEx.cpp \
842 common/path/RTPathAbsExDup.cpp \
843 common/path/RTPathAppend.cpp \
844 common/path/RTPathExt.cpp \
845 common/path/RTPathFilename.cpp \
846 common/path/RTPathHaveExt.cpp \
847 common/path/RTPathHavePath.cpp \
848 common/path/RTPathJoin.cpp \
849 common/path/RTPathParse.cpp \
850 common/path/RTPathRealDup.cpp \
851 common/path/RTPathStripExt.cpp \
852 common/path/RTPathStripFilename.cpp \
853 common/path/RTPathStripTrailingSlash.cpp \
854 common/string/RTStrCmp.cpp \
855 common/string/RTStrNCmp.cpp \
856 common/string/RTStrNLen.cpp \
857 common/string/RTStrNLenEx.cpp \
858 common/string/RTStrStr.cpp \
859 common/string/straprintf.cpp \
860 common/string/strformat.cpp \
861 common/string/strformatrt.cpp \
862 common/string/strformattype.cpp \
863 common/string/stringalloc.cpp \
864 common/string/strprintf.cpp \
865 common/string/strtonum.cpp \
866 common/string/unidata.cpp \
867 common/string/utf-8.cpp \
868 common/string/utf-8-case.cpp \
869 common/string/utf-16.cpp \
870 generic/pathhost-generic.cpp \
871 generic/RTAssertShouldPanic-generic.cpp \
872 r3/alloc.cpp \
873 r3/fileio.cpp \
874 r3/fs.cpp
875RuntimeGuestR3Mini_SOURCES.freebsd = \
876 r3/posix/env-posix.cpp \
877 r3/posix/fileio-posix.cpp \
878 r3/posix/path-posix.cpp \
879 r3/posix/utf8-posix.cpp
880RuntimeGuestR3Mini_SOURCES.linux = \
881 r3/posix/env-posix.cpp \
882 r3/posix/fileio-posix.cpp \
883 r3/posix/path-posix.cpp \
884 r3/posix/utf8-posix.cpp
885RuntimeGuestR3Mini_SOURCES.solaris = \
886 r3/posix/env-posix.cpp \
887 r3/posix/fileio-posix.cpp \
888 r3/posix/path-posix.cpp \
889 r3/posix/utf8-posix.cpp
890RuntimeGuestR3Mini_SOURCES.win = \
891 r3/win/fileio-win.cpp \
892 r3/win/path-win.cpp \
893 r3/win/utf8-win.cpp \
894 win/errmsgwin.cpp \
895 win/RTErrConvertFromWin32.cpp
896
897# VBox specific stuff.
898RuntimeGuestR3Mini_SOURCES += \
899 VBox/logbackdoor.cpp \
900 VBox/logbackdoor-redirect.cpp
901
902
903#
904# RuntimeLnxHostR3 Linux host program runtime
905# (Only used when building L4.)
906#
907RuntimeLnxHostR3_TEMPLATE = VBOXLNXHOSTR3LIB
908RuntimeLnxHostR3_DEFS = IN_RT_R3 IN_SUP_R3 RT_WITH_VBOX RT_NO_GIP
909RuntimeLnxHostR3_SOURCES = \
910 $(RuntimeR3_SOURCES.linux.$(KBUILD_TARGET_ARCH)) \
911 $(RuntimeR3_SOURCES.linux) \
912 $(RuntimeR3_SOURCES)
913RuntimeLnxHostR3_INCS = \
914 $(RuntimeR3_INCS.linux.$(KBUILD_TARGET_ARCH)) \
915 $(RuntimeR3_INCS.linux) \
916 $(RuntimeR3_INCS)
917
918
919#
920# VBoxRT - Shared Object / DLL version.
921#
922VBoxRT_TEMPLATE = VBoxR3Dll
923VBoxRT_SDKS = VBOX_OPENSSL VBOX_LIBXML2 VBOX_LIBCURL VBOX_BOOST
924VBoxRT_SDKS.win = WINPSDK W2K3DDK VBOX_NTDLL
925if1of ($(KBUILD_TARGET)$(VBOX_WITH_HARDENING), darwin win)
926VBoxRT_INST = $(INST_DLL) $(INST_TESTCASE)
927endif
928VBoxRT_DEFS = $(filter-out RT_NO_GIP,$(RuntimeR3_DEFS)) IN_SUP_R3 IN_SUP_R3
929VBoxRT_DEFS.$(KBUILD_TYPE) = $(RuntimeR3_DEFS.$(KBUILD_TYPE))
930VBoxRT_SOURCES = \
931 VBox/VBoxRTDeps.cpp \
932 $(RuntimeR3_SOURCES)
933VBoxRT_SOURCES += \
934 common/misc/s3.cpp \
935 r3/xml.cpp \
936 common/checksum/RTSha1Digest.cpp \
937 common/checksum/manifest.cpp \
938 common/checksum/sha1.cpp \
939 common/checksum/sha1str.cpp \
940 common/checksum/sha256.cpp \
941 common/checksum/sha256str.cpp \
942 common/checksum/sha512.cpp \
943 common/checksum/sha512str.cpp
944VBoxRT_SOURCES.$(KBUILD_TARGET) = $(RuntimeR3_SOURCES.$(KBUILD_TARGET))
945VBoxRT_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) = $(RuntimeR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
946VBoxRT_SOURCES.$(KBUILD_TARGET_ARCH) = $(RuntimeR3_SOURCES.$(KBUILD_TARGET_ARCH))
947VBoxRT_SOURCES.win += \
948 r3/win/dllmain-win.cpp \
949 r3/win/fileaio-win.cpp \
950 $(VBoxRT_0_OUTDIR)/VBoxRT.def
951VBoxRT_SOURCES.linux += \
952 r3/linux/fileaio-linux.cpp
953VBoxRT_SOURCES.solaris += \
954 r3/solaris/fileaio-solaris.cpp
955VBoxRT_SOURCES.darwin += \
956 r3/posix/fileaio-posix.cpp
957VBoxRT_SOURCES.freebsd += \
958 r3/freebsd/fileaio-freebsd.cpp
959VBoxRT_INCS = $(RuntimeR3_INCS)
960VBoxRT_INCS.$(KBUILD_TARGET) = $(RuntimeR3_INCS.$(KBUILD_TARGET))
961VBoxRT_INCS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) = $(RuntimeR3_INCS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
962VBoxRT_LIBS = \
963 $(PATH_LIB)/SUPR3$(VBOX_SUFF_LIB) \
964 $(PATH_LIB)/VBox-liblzf$(VBOX_SUFF_LIB) \
965 $(SDK_VBOX_ZLIB_LIBS)
966ifdef IPRT_WITH_KSTUFF
967 VBoxRT_LIBS += \
968 $(PATH_LIB)/VBox-kStuff$(VBOX_SUFF_LIB)
969endif
970ifndef SDK_VBOX_LIBXML2_LIBS
971 VBoxRT_LIBS += \
972 $(PATH_LIB)/VBox-libxml2$(VBOX_SUFF_LIB)
973endif
974ifndef SDK_VBOX_OPENSSL_LIBS
975 VBoxRT_LIBS += \
976 $(PATH_LIB)/VBox-libcrypto$(VBOX_SUFF_LIB)
977endif
978ifdef IPRT_WITH_LZO
979 VBoxRT_LIBS += lzo2
980endif
981VBoxRT_LIBS.darwin = \
982 iconv
983VBoxRT_LIBS.freebsd = \
984 iconv \
985 rt
986VBoxRT_LIBS.solaris = \
987 kstat
988VBoxRT_LDFLAGS.darwin = -framework IOKit -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxRT.dylib
989ifdef VBOX_USE_VCC80
990VBoxRT_LDFLAGS.win = /MANIFEST
991endif
992VBoxRT_LDFLAGS.l4 = \
993 -Wl,-whole-archive \
994 $(PATH_LIB)/RuntimeR3L4$(VBOX_SUFF_LIB) \
995 -Wl,-no-whole-archive
996ifeq ($(KBUILD_TARGET),l4)
997VBoxRT_LIBS += \
998 $(L4_LIBDIR)/libl4sys.a \
999 $(L4_LIBDIR)/libl4sys.p.a
1000endif
1001VBoxRT_LIBS.l4 = \
1002 $(PATH_LIB)/RuntimeR3L4$(VBOX_SUFF_LIB)
1003
1004if1of ($(DLLS), VBoxRT)
1005$$(VBoxRT_0_OUTDIR)/VBoxRT.def: \
1006 $(PATH_SUB_CURRENT)/r3/win/VBoxRT-$$(if-expr $$(KBUILD_TARGET_ARCH) == amd64,win64,win32).def \
1007 $(PATH_SUB_CURRENT)/r3/win/$(if $(VBOX_OSE),VBoxRT-openssl-ose.def,VBoxRT-openssl.def)
1008 $(RM) -f -- $@
1009 $(REDIRECT) -wto $@ -- $(CAT_EXT) $^
1010endif
1011
1012
1013#
1014# HACK ALLERT! Make testcase run during build on SELinux boxes.
1015# Create a dummy DLL that ensure that VBoxRT is installed
1016# during the DLL pass and cleaned up later.
1017#
1018ifeq ($(KBUILD_TARGET),linux)
1019 if1of (VBoxRT, $(DLLS))
1020 ifneq ($(wildcard /usr/bin/chcon),)
1021VBoxRT_NOINST = true
1022
1023DLLS += VBoxRTDummy
1024VBoxRTDummy_TEMPLATE = VBOXR3
1025VBoxRTDummy_NOINST = true
1026VBoxRTDummy_LIBS = $(PATH_BIN)/VBoxRT.so
1027VBoxRTDummy_CLEAN= $(PATH_BIN)/VBoxRT.so
1028BLDDIRS += $(PATH_BIN)
1029
1030$(PATH_BIN)/VBoxRT.so: $$(TARGET_VBoxRT) | $$(dir $$@)
1031 $(INSTALL) $< $@
1032 chcon -t texrel_shlib_t $@ || true
1033
1034VBoxRT:: VBoxRTDummy
1035 endif # chcon present.
1036 endif # building VBoxRT
1037endif # linux
1038
1039#
1040# RuntimeR3NoCRTGCC - CRT replacement lib for VBoxREM.
1041# This is used together with VBoxRT.
1042#
1043## @todo the *_alias.c stuff is busted, remove and use RT_WITH_NOCRT_ALIASES instead.
1044RuntimeR3NoCRTGCC_TEMPLATE = VBOXNOCRTGCC
1045RuntimeR3NoCRTGCC_LIBSUFF = $(VBOX_SUFF_LIB)
1046RuntimeR3NoCRTGCC_INCS = include
1047RuntimeR3NoCRTGCC_SOURCES = \
1048 common/misc/sanity-cpp.cpp \
1049 common/misc/sanity-c.c \
1050 \
1051 common/math/ceill.asm \
1052 common/math/cosl.asm \
1053 common/math/fabs.asm \
1054 common/math/fabsf.asm \
1055 common/math/fabsl.asm \
1056 common/math/floor.asm \
1057 common/math/floorf.asm \
1058 common/math/floorl.asm \
1059 common/math/ldexpl.asm \
1060 common/math/llrint.asm \
1061 common/math/llrintf.asm \
1062 common/math/llrintl.asm \
1063 common/math/logl.asm \
1064 common/math/lrint.asm \
1065 common/math/lrintf.asm \
1066 common/math/lrintl.asm \
1067 common/math/remainder.asm \
1068 common/math/remainderf.asm \
1069 common/math/remainderl.asm \
1070 common/math/sinl.asm \
1071 common/math/tanl.asm \
1072 common/math/trunc.asm \
1073 common/math/truncf.asm \
1074 common/math/truncl.asm \
1075 \
1076 $(RuntimeNoCrt_SOURCES) \
1077 \
1078 common/string/memchr_alias.c \
1079 common/string/memcmp_alias.c \
1080 common/string/memcpy_alias.c \
1081 common/string/memmove_alias.c \
1082 common/string/memset_alias.c \
1083 common/string/strchr_alias.c \
1084 common/string/strcmp_alias.c \
1085 common/string/strlen_alias.c
1086
1087RuntimeR3NoCRTGCC_SOURCES.x86 = \
1088 common/math/x86/fenv-x86.c \
1089 common/math/gcc/adddi3.c \
1090 common/math/gcc/anddi3.c \
1091 common/math/gcc/ashldi3.c \
1092 common/math/gcc/ashrdi3.c \
1093 common/math/gcc/cmpdi2.c \
1094 common/math/gcc/divdi3.c \
1095 common/math/gcc/iordi3.c \
1096 common/math/gcc/lshldi3.c \
1097 common/math/gcc/lshrdi3.c \
1098 common/math/gcc/moddi3.c \
1099 common/math/gcc/muldi3.c \
1100 common/math/gcc/negdi2.c \
1101 common/math/gcc/notdi2.c \
1102 common/math/gcc/qdivrem.c \
1103 common/math/gcc/subdi3.c \
1104 common/math/gcc/ucmpdi2.c \
1105 common/math/gcc/udivdi3.c \
1106 common/math/gcc/umoddi3.c \
1107 common/math/gcc/xordi3.c
1108
1109
1110## @todo stop using the old memcpy.c and memset.c code.
1111
1112#
1113# RuntimeR0 - Ring-0 library for VMMR0.
1114#
1115RuntimeR0_TEMPLATE = VBoxR0
1116RuntimeR0_DEFS = IN_RT_R0 RT_WITH_VBOX
1117RuntimeR0_INCS = include
1118RuntimeR0_SOURCES = \
1119 common/checksum/crc32.cpp \
1120 common/checksum/crc64.cpp \
1121 common/checksum/md5.cpp \
1122 common/checksum/ipv4.cpp \
1123 common/log/logellipsis.cpp \
1124 common/log/logrelellipsis.cpp \
1125 common/log/logcom.cpp \
1126 common/log/logformat.cpp \
1127 common/misc/RTAssertMsg1Weak.cpp \
1128 common/misc/RTAssertMsg2.cpp \
1129 common/misc/RTAssertMsg2Add.cpp \
1130 common/misc/RTAssertMsg2AddWeak.cpp \
1131 common/misc/RTAssertMsg2AddWeakV.cpp \
1132 common/misc/RTAssertMsg2Weak.cpp \
1133 common/misc/RTAssertMsg2WeakV.cpp \
1134 common/misc/buildconfig.cpp \
1135 common/misc/handletable.cpp \
1136 common/misc/handletablectx.cpp \
1137 common/misc/handletablesimple.cpp \
1138 common/misc/sanity-c.c \
1139 common/misc/sanity-cpp.cpp \
1140 common/misc/term.cpp \
1141 common/string/strformat.cpp \
1142 common/string/strformatrt.cpp \
1143 common/string/strformattype.cpp \
1144 common/string/strncmp.cpp \
1145 common/string/strpbrk.cpp \
1146 common/string/strprintf.cpp \
1147 common/table/avlgcptr.cpp \
1148 common/table/avlhcphys.cpp \
1149 common/table/avllu32.cpp \
1150 common/table/avlogcphys.cpp \
1151 common/table/avlogcptr.cpp \
1152 common/table/avlohcphys.cpp \
1153 common/table/avloioport.cpp \
1154 common/table/avlpv.cpp \
1155 common/table/avlrogcphys.cpp \
1156 common/table/avlrogcptr.cpp \
1157 common/table/avlroioport.cpp \
1158 common/table/avlroogcptr.cpp \
1159 common/table/avlu32.cpp \
1160 common/table/avlou32.cpp \
1161 common/time/timesup.cpp \
1162 generic/RTAssertShouldPanic-generic.cpp \
1163 \
1164 $(RuntimeNoCrt_SOURCES)
1165
1166if1of ($(KBUILD_TARGET), darwin solaris freebsd)
1167RuntimeR0_SOURCES += \
1168 common/math/gcc/adddi3.c \
1169 common/math/gcc/anddi3.c \
1170 common/math/gcc/ashldi3.c \
1171 common/math/gcc/ashrdi3.c \
1172 common/math/gcc/cmpdi2.c \
1173 common/math/gcc/divdi3.c \
1174 common/math/gcc/iordi3.c \
1175 common/math/gcc/lshldi3.c \
1176 common/math/gcc/lshrdi3.c \
1177 common/math/gcc/moddi3.c \
1178 common/math/gcc/muldi3.c \
1179 common/math/gcc/negdi2.c \
1180 common/math/gcc/notdi2.c \
1181 common/math/gcc/qdivrem.c \
1182 common/math/gcc/subdi3.c \
1183 common/math/gcc/ucmpdi2.c \
1184 common/math/gcc/udivdi3.c \
1185 common/math/gcc/umoddi3.c \
1186 common/math/gcc/xordi3.c
1187endif
1188
1189#if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
1190# RuntimeR0_SOURCES += common/time/timesupA.asm
1191#else
1192 RuntimeR0_SOURCES += common/time/timesupref.cpp
1193#endif
1194
1195RuntimeR0_SOURCES.win.amd64 = $(RuntimeWin64ASM_SOURCES)
1196RuntimeR0_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
1197RuntimeR0_SOURCES.win = \
1198 nt/NtProcessStartup-stub.cpp
1199
1200RuntimeR0_SOURCES.os2 = \
1201 os2/RTErrConvertFromOS2.cpp \
1202 os2/sys0.asm
1203
1204
1205#
1206# RuntimeR0Stub - Ring-0 context startup stub for Windows.
1207#
1208RuntimeR0Stub_TEMPLATE = VBoxR0
1209RuntimeR0Stub_SOURCES.win = \
1210 nt/NtProcessStartup-stub.cpp
1211
1212
1213#
1214# RuntimeR0Drv - Ring-0 library for host drivers.
1215#
1216RuntimeR0Drv_TEMPLATE = VBOXR0DRV
1217RuntimeR0Drv_SDKS.win = W2K3DDK WINPSDKINCS
1218RuntimeR0Drv_DEFS = IN_RT_R0 RT_WITH_VBOX RT_WITHOUT_NOCRT_WRAPPERS RT_NO_EXPORT_SYMBOL
1219RuntimeR0Drv_DEFS.win = IN_SUP_R0
1220RuntimeR0Drv_DEFS.linux = MODULE KBUILD_MODNAME=KBUILD_STR\(vboxdrv\) KBUILD_BASENAME=KBUILD_STR\(vboxdrv\) IN_SUP_R0
1221
1222RuntimeR0Drv_INCS := $(PATH_SUB_CURRENT) include
1223RuntimeR0Drv_INCS.freebsd = \
1224 $(PATH_INS)/gen-sys-hdrs
1225RuntimeR0Drv_INCS.linux = \
1226 r0drv/linux
1227RuntimeR0Drv_INCS.solaris = \
1228 r0drv/solaris/vbi/i86pc \
1229 r0drv/solaris/vbi/i86pc/sys
1230
1231RuntimeR0Drv_SOURCES = \
1232 common/alloc/alloc.cpp \
1233 common/alloc/heapsimple.cpp \
1234 common/alloc/heapoffset.cpp \
1235 common/checksum/crc32.cpp \
1236 common/checksum/crc64.cpp \
1237 common/checksum/md5.cpp \
1238 common/checksum/ipv4.cpp \
1239 common/log/log.cpp \
1240 common/log/logellipsis.cpp \
1241 common/log/logrel.cpp \
1242 common/log/logrelellipsis.cpp \
1243 common/log/logcom.cpp \
1244 common/log/logformat.cpp \
1245 common/misc/RTAssertMsg1Weak.cpp \
1246 common/misc/RTAssertMsg2.cpp \
1247 common/misc/RTAssertMsg2Add.cpp \
1248 common/misc/RTAssertMsg2AddWeak.cpp \
1249 common/misc/RTAssertMsg2AddWeakV.cpp \
1250 common/misc/RTAssertMsg2Weak.cpp \
1251 common/misc/RTAssertMsg2WeakV.cpp \
1252 common/misc/assert.cpp \
1253 common/misc/buildconfig.cpp \
1254 common/misc/handletable.cpp \
1255 common/misc/handletablectx.cpp \
1256 common/misc/handletablesimple.cpp \
1257 common/misc/once.cpp \
1258 common/misc/sanity-c.c \
1259 common/misc/sanity-cpp.cpp \
1260 common/misc/term.cpp \
1261 common/path/rtPathVolumeSpecLen.cpp \
1262 common/path/RTPathAbsDup.cpp \
1263 common/path/RTPathAbsEx.cpp \
1264 common/path/RTPathAbsExDup.cpp \
1265 common/path/RTPathAppend.cpp \
1266 common/path/RTPathExt.cpp \
1267 common/path/RTPathFilename.cpp \
1268 common/path/RTPathHaveExt.cpp \
1269 common/path/RTPathHavePath.cpp \
1270 common/path/RTPathParse.cpp \
1271 common/path/RTPathRealDup.cpp \
1272 common/path/RTPathStripExt.cpp \
1273 common/path/RTPathStripFilename.cpp \
1274 common/path/RTPathStripTrailingSlash.cpp \
1275 common/rand/rand.cpp \
1276 common/rand/randadv.cpp \
1277 common/rand/randparkmiller.cpp \
1278 common/string/RTStrCmp.cpp \
1279 common/string/RTStrNCmp.cpp \
1280 common/string/RTStrNLen.cpp \
1281 common/string/RTStrNLenEx.cpp \
1282 common/string/strformat.cpp \
1283 common/string/strformatrt.cpp \
1284 common/string/strformattype.cpp \
1285 common/string/strprintf.cpp \
1286 common/string/strtonum.cpp \
1287 common/string/stringalloc.cpp \
1288 common/string/utf-16.cpp \
1289 common/string/utf-8.cpp \
1290 common/table/avlpv.cpp \
1291 generic/RTLogWriteStdErr-stub-generic.cpp \
1292 generic/RTLogWriteUser-generic.cpp \
1293 generic/RTRandAdvCreateSystemFaster-generic.cpp \
1294 generic/uuid-generic.cpp \
1295 r0drv/alloc-r0drv.cpp \
1296 r0drv/initterm-r0drv.cpp \
1297 r0drv/generic/semspinmutex-r0drv-generic.c \
1298 VBox/log-vbox.cpp \
1299
1300## @todo: Linking against RuntimeR0Drv on Linux will result in unresolved external
1301## references to several string functions (e.g. strlen). We could include the
1302## missing functions here but our own implementations conflict with declarations
1303## of some Linux kernels (inline versus not inline, size_t versus unsigned int).
1304##
1305## The prototypes for the unresolved externals are declared in <linux/string.h>.
1306## This file is not included with extern "C" { ... } and therefore the function
1307## prototypes are mangled during C++ compilation. That's why we have to provide
1308## implementations with mangled function names.
1309##
1310## bird: Why don't we just extern "C" {} that file then?
1311RuntimeR0Drv_SOURCES.linux = \
1312 common/string/strpbrk.cpp \
1313 common/err/RTErrConvertToErrno.cpp \
1314 common/err/RTErrConvertFromErrno.cpp \
1315 generic/RTAssertShouldPanic-generic.cpp \
1316 generic/RTLogWriteStdOut-stub-generic.cpp \
1317 generic/mppresent-generic.cpp \
1318 r0drv/linux/alloc-r0drv-linux.c \
1319 r0drv/linux/assert-r0drv-linux.c \
1320 r0drv/linux/initterm-r0drv-linux.c \
1321 r0drv/linux/memobj-r0drv-linux.c \
1322 r0drv/linux/memuserkernel-r0drv-linux.c \
1323 r0drv/linux/mp-r0drv-linux.c \
1324 r0drv/linux/mpnotification-r0drv-linux.c \
1325 r0drv/linux/process-r0drv-linux.c \
1326 r0drv/linux/RTLogWriteDebugger-r0drv-linux.c \
1327 r0drv/linux/semevent-r0drv-linux.c \
1328 r0drv/linux/semeventmulti-r0drv-linux.c \
1329 r0drv/linux/semfastmutex-r0drv-linux.c \
1330 r0drv/linux/semmutex-r0drv-linux.c \
1331 r0drv/linux/spinlock-r0drv-linux.c \
1332 r0drv/linux/thread-r0drv-linux.c \
1333 r0drv/linux/thread2-r0drv-linux.c \
1334 r0drv/linux/time-r0drv-linux.c \
1335 r0drv/linux/timer-r0drv-linux.c \
1336 r0drv/memobj-r0drv.cpp \
1337 r0drv/mpnotification-r0drv.c \
1338 r0drv/powernotification-r0drv.c
1339## @todo thread2-r0drv-linux.c and assert-r0drv-linux.c
1340
1341RuntimeR0Drv_SOURCES.win = \
1342 common/misc/thread.cpp \
1343 common/string/memcmp.asm \
1344 common/string/memchr.asm \
1345 common/string/memcpy.asm \
1346 common/string/memset.asm \
1347 common/string/memmove.asm \
1348 common/string/strlen.asm \
1349 common/string/strncmp.cpp \
1350 common/string/strpbrk.cpp \
1351 generic/RTAssertShouldPanic-generic.cpp \
1352 generic/RTLogWriteStdOut-stub-generic.cpp \
1353 generic/mppresent-generic.cpp \
1354 nt/RTErrConvertFromNtStatus.cpp \
1355 r0drv/memobj-r0drv.cpp \
1356 r0drv/mpnotification-r0drv.c \
1357 r0drv/powernotification-r0drv.c \
1358 r0drv/nt/alloc-r0drv-nt.cpp \
1359 r0drv/nt/assert-r0drv-nt.cpp \
1360 r0drv/nt/initterm-r0drv-nt.cpp \
1361 r0drv/nt/memobj-r0drv-nt.cpp \
1362 r0drv/nt/memuserkernel-r0drv-nt.cpp \
1363 r0drv/nt/mp-r0drv-nt.cpp \
1364 r0drv/nt/mpnotification-r0drv-nt.cpp \
1365 r0drv/nt/process-r0drv-nt.cpp \
1366 r0drv/nt/RTLogWriteDebugger-r0drv-nt.cpp \
1367 r0drv/nt/semevent-r0drv-nt.cpp \
1368 r0drv/nt/semeventmulti-r0drv-nt.cpp \
1369 r0drv/nt/semfastmutex-r0drv-nt.cpp \
1370 r0drv/nt/semmutex-r0drv-nt.cpp \
1371 r0drv/nt/spinlock-r0drv-nt.cpp \
1372 r0drv/nt/thread-r0drv-nt.cpp \
1373 r0drv/nt/thread2-r0drv-nt.cpp \
1374 r0drv/nt/time-r0drv-nt.cpp \
1375 r0drv/nt/timer-r0drv-nt.cpp
1376
1377RuntimeR0Drv_SOURCES.win.amd64 = $(RuntimeWin64ASM_SOURCES)
1378RuntimeR0Drv_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
1379
1380RuntimeR0Drv_SOURCES.darwin = \
1381 common/err/RTErrConvertFromErrno.cpp \
1382 common/misc/thread.cpp \
1383 common/string/memchr.asm \
1384 common/string/strpbrk.cpp \
1385 darwin/RTErrConvertFromDarwin.cpp \
1386 darwin/RTErrConvertFromDarwinIO.cpp \
1387 darwin/RTErrConvertFromDarwinKern.cpp \
1388 generic/RTAssertShouldPanic-generic.cpp \
1389 generic/RTTimerCreate-generic.cpp \
1390 generic/mppresent-generic.cpp \
1391 generic/timer-generic.cpp \
1392 r0drv/generic/mpnotification-r0drv-generic.cpp \
1393 r0drv/darwin/alloc-r0drv-darwin.cpp \
1394 r0drv/darwin/assert-r0drv-darwin.cpp \
1395 r0drv/darwin/initterm-r0drv-darwin.cpp \
1396 r0drv/darwin/memobj-r0drv-darwin.cpp \
1397 r0drv/darwin/mp-r0drv-darwin.cpp \
1398 r0drv/darwin/memuserkernel-r0drv-darwin.cpp \
1399 r0drv/darwin/process-r0drv-darwin.cpp \
1400 r0drv/darwin/RTLogWriteDebugger-r0drv-darwin.cpp \
1401 r0drv/darwin/RTLogWriteStdOut-r0drv-darwin.cpp \
1402 r0drv/darwin/semaphore-r0drv-darwin.cpp \
1403 r0drv/darwin/spinlock-r0drv-darwin.cpp \
1404 r0drv/darwin/thread-r0drv-darwin.cpp \
1405 r0drv/darwin/thread2-r0drv-darwin.cpp \
1406 r0drv/darwin/threadpreempt-r0drv-darwin.cpp \
1407 r0drv/darwin/time-r0drv-darwin.cpp \
1408 r0drv/memobj-r0drv.cpp \
1409 r0drv/powernotification-r0drv.c
1410
1411RuntimeR0Drv_SOURCES.os2 = \
1412 common/string/memchr.asm \
1413 common/string/memcmp.asm \
1414 common/string/memcpy.asm \
1415 common/string/mempcpy.asm \
1416 common/string/memmove.asm \
1417 common/string/memset.asm \
1418 common/string/strchr.asm \
1419 common/string/strcmp.asm \
1420 common/string/strcpy.asm \
1421 common/string/strlen.asm \
1422 \
1423 common/string/strncmp.cpp \
1424 common/string/strpbrk.cpp \
1425 \
1426 common/misc/thread.cpp \
1427 generic/RTAssertShouldPanic-generic.cpp \
1428 generic/RTLogWriteDebugger-generic.cpp \
1429 generic/RTLogWriteStdOut-stub-generic.cpp \
1430 generic/RTMpCpuId-generic.cpp \
1431 generic/RTMpCpuIdFromSetIndex-generic.cpp \
1432 generic/RTMpCpuIdToSetIndex-generic.cpp \
1433 generic/RTMpIsCpuPossible-generic.cpp \
1434 generic/RTMpGetCount-generic.cpp \
1435 generic/RTMpGetMaxCpuId-generic.cpp \
1436 generic/RTMpGetOnlineCount-generic.cpp \
1437 generic/RTMpGetOnlineSet-generic.cpp \
1438 generic/RTMpGetSet-generic.cpp \
1439 generic/RTMpIsCpuOnline-generic.cpp \
1440 generic/RTTimerCreate-generic.cpp \
1441 generic/mppresent-generic.cpp \
1442 os2/RTErrConvertFromOS2.cpp \
1443 os2/sys0.asm \
1444 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
1445 r0drv/generic/RTMpOn-r0drv-generic.cpp \
1446 r0drv/generic/mpnotification-r0drv-generic.cpp \
1447 r0drv/memobj-r0drv.cpp \
1448 r0drv/powernotification-r0drv.c \
1449 r0drv/os2/alloc-r0drv-os2.cpp \
1450 r0drv/os2/assert-r0drv-os2.cpp \
1451 r0drv/os2/assertA-r0drv-os2.asm \
1452 r0drv/os2/initterm-r0drv-os2.cpp \
1453 r0drv/os2/memobj-r0drv-os2.cpp \
1454 r0drv/os2/memuserkernel-r0drv-os2.cpp \
1455 r0drv/os2/os2imports.imp \
1456 r0drv/os2/process-r0drv-os2.cpp \
1457 r0drv/os2/RTR0AssertPanicSystem-r0drv-os2.asm \
1458 r0drv/os2/RTR0Os2DHQueryDOSVar.asm \
1459 r0drv/os2/RTR0Os2DHVMGlobalToProcess.asm \
1460 r0drv/os2/semevent-r0drv-os2.cpp \
1461 r0drv/os2/semeventmulti-r0drv-os2.cpp \
1462 r0drv/os2/semfastmutex-r0drv-os2.cpp \
1463 r0drv/os2/spinlock-r0drv-os2.cpp \
1464 r0drv/os2/thread-r0drv-os2.cpp \
1465 r0drv/os2/thread2-r0drv-os2.cpp \
1466 r0drv/os2/time-r0drv-os2.cpp \
1467 r0drv/os2/timer-r0drv-os2.cpp \
1468 r0drv/os2/timerA-r0drv-os2.asm
1469
1470RuntimeR0Drv_SOURCES.freebsd = \
1471 common/err/RTErrConvertFromErrno.cpp \
1472 common/err/RTErrConvertToErrno.cpp \
1473 common/misc/thread.cpp \
1474 common/string/memchr.asm \
1475 common/string/memmove.asm \
1476 common/string/strpbrk.cpp \
1477 common/string/memcmp.asm \
1478 common/string/strchr.asm \
1479 generic/RTAssertShouldPanic-generic.cpp \
1480 generic/RTLogWriteDebugger-generic.cpp \
1481 generic/RTLogWriteStdOut-stub-generic.cpp \
1482 generic/RTTimerCreate-generic.cpp \
1483 generic/mppresent-generic.cpp \
1484 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \
1485 r0drv/generic/mpnotification-r0drv-generic.cpp \
1486 r0drv/freebsd/alloc-r0drv-freebsd.c \
1487 r0drv/freebsd/assert-r0drv-freebsd.c \
1488 r0drv/freebsd/initterm-r0drv-freebsd.c \
1489 r0drv/freebsd/memobj-r0drv-freebsd.c \
1490 r0drv/freebsd/memuserkernel-r0drv-freebsd.c \
1491 r0drv/freebsd/process-r0drv-freebsd.c \
1492 r0drv/freebsd/semevent-r0drv-freebsd.c \
1493 r0drv/freebsd/semeventmulti-r0drv-freebsd.c \
1494 r0drv/freebsd/semfastmutex-r0drv-freebsd.c \
1495 r0drv/freebsd/spinlock-r0drv-freebsd.c \
1496 r0drv/freebsd/thread-r0drv-freebsd.c \
1497 r0drv/freebsd/thread2-r0drv-freebsd.c \
1498 r0drv/freebsd/time-r0drv-freebsd.c \
1499 r0drv/freebsd/mp-r0drv-freebsd.c \
1500 generic/timer-generic.cpp \
1501 r0drv/memobj-r0drv.cpp \
1502 r0drv/powernotification-r0drv.c
1503
1504RuntimeR0Drv_SOURCES.solaris = \
1505 common/err/RTErrConvertFromErrno.cpp \
1506 common/err/RTErrConvertToErrno.cpp \
1507 common/misc/thread.cpp \
1508 common/string/memchr.asm \
1509 generic/RTAssertShouldPanic-generic.cpp \
1510 generic/RTLogWriteStdOut-stub-generic.cpp \
1511 generic/RTTimerCreate-generic.cpp \
1512 generic/mppresent-generic.cpp \
1513 r0drv/memobj-r0drv.cpp \
1514 r0drv/mpnotification-r0drv.c \
1515 r0drv/powernotification-r0drv.c \
1516 r0drv/solaris/RTLogWriteDebugger-r0drv-solaris.c \
1517 r0drv/solaris/assert-r0drv-solaris.c \
1518 r0drv/solaris/initterm-r0drv-solaris.c \
1519 r0drv/solaris/memuserkernel-r0drv-solaris.c \
1520 r0drv/solaris/semevent-r0drv-solaris.c \
1521 r0drv/solaris/semeventmulti-r0drv-solaris.c \
1522 r0drv/solaris/semfastmutex-r0drv-solaris.c \
1523 r0drv/solaris/spinlock-r0drv-solaris.c
1524
1525 # VBI is now compiled into IPRT
1526 RuntimeR0Drv_SOURCES.solaris += \
1527 r0drv/solaris/vbi/RTMpPokeCpu-r0drv-solaris.c \
1528 r0drv/solaris/vbi/mpnotification-r0drv-solaris.c \
1529 r0drv/solaris/vbi/alloc-r0drv-solaris.c \
1530 r0drv/solaris/vbi/memobj-r0drv-solaris.c \
1531 r0drv/solaris/vbi/mp-r0drv-solaris.c \
1532 r0drv/solaris/vbi/process-r0drv-solaris.c \
1533 r0drv/solaris/vbi/thread-r0drv-solaris.c \
1534 r0drv/solaris/vbi/thread2-r0drv-solaris.c \
1535 r0drv/solaris/vbi/time-r0drv-solaris.c \
1536 r0drv/solaris/vbi/timer-r0drv-solaris.c \
1537 r0drv/solaris/vbi/i86pc/os/vbi.c
1538
1539
1540## PORTME: Porters create and add their selection of platform specific Ring-0 Driver files here.
1541
1542RuntimeR0Drv_ORDERDEPS.freebsd = \
1543 $(PATH_INS)/gen-sys-hdrs/bus_if.h \
1544 $(PATH_INS)/gen-sys-hdrs/device_if.h
1545
1546
1547#
1548# RuntimeGuestR0 - Guest driver runtime.
1549# This is almost the same as the RuntimeR0Drv, the main difference
1550# is in the backdoor logging and the lack of sup.h (which should be
1551# made irrelevant even for RuntimeR0Drv).
1552#
1553RuntimeGuestR0_TEMPLATE := VBOXGUESTR0LIB
1554RuntimeGuestR0_SOURCES := $(filter-out generic/RTLogWriteUser-generic.cpp, $(RuntimeR0Drv_SOURCES))
1555RuntimeGuestR0_SOURCES += \
1556 VBox/logbackdoor.cpp
1557RuntimeGuestR0_EXTENDS = RuntimeR0Drv
1558
1559
1560#
1561# RuntimeGuestR0NT4 - Win32 NT4 guest driver runtime.
1562#
1563RuntimeGuestR0NT4_EXTENDS = RuntimeGuestR0
1564RuntimeGuestR0NT4_EXTENDS_BY = appending
1565RuntimeGuestR0NT4_DEFS = IPRT_TARGET_NT4
1566
1567
1568ifdef VBOX_WITH_RAW_MODE
1569 #
1570 # RuntimeRC - Raw-mode context library.
1571 #
1572 RuntimeRC_TEMPLATE = VBoxRc
1573 RuntimeRC_DEFS = IN_RT_RC RT_WITH_VBOX
1574 RuntimeRC_INCS = include
1575 RuntimeRC_SOURCES = \
1576 common/log/log.cpp \
1577 common/log/logellipsis.cpp \
1578 common/log/logrel.cpp \
1579 common/log/logrelellipsis.cpp \
1580 common/log/logcom.cpp \
1581 common/log/logformat.cpp \
1582 common/misc/RTAssertMsg1Weak.cpp \
1583 common/misc/RTAssertMsg2.cpp \
1584 common/misc/RTAssertMsg2Add.cpp \
1585 common/misc/RTAssertMsg2AddWeak.cpp \
1586 common/misc/RTAssertMsg2AddWeakV.cpp \
1587 common/misc/RTAssertMsg2Weak.cpp \
1588 common/misc/RTAssertMsg2WeakV.cpp \
1589 common/misc/assert.cpp \
1590 common/misc/buildconfig.cpp \
1591 common/misc/sanity-c.c \
1592 common/misc/sanity-cpp.cpp \
1593 common/string/strformat.cpp \
1594 common/string/strformatrt.cpp \
1595 common/string/strformattype.cpp \
1596 common/string/strncmp.cpp \
1597 common/string/strpbrk.cpp \
1598 common/string/strprintf.cpp \
1599 common/table/avllu32.cpp \
1600 common/table/avlou32.cpp \
1601 common/table/avlogcphys.cpp \
1602 common/table/avlogcptr.cpp \
1603 common/table/avlohcphys.cpp \
1604 common/table/avloioport.cpp \
1605 common/table/avlrogcphys.cpp \
1606 common/table/avlrogcptr.cpp \
1607 common/table/avlroioport.cpp \
1608 common/table/avlroogcptr.cpp \
1609 common/table/avlu32.cpp \
1610 common/time/timeprog.cpp \
1611 common/time/timesup.cpp \
1612 gc/initterm-gc.cpp \
1613 generic/RTAssertShouldPanic-generic.cpp \
1614 \
1615 $(RuntimeNoCrt_SOURCES)
1616
1617 #if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
1618 # RuntimeRC_SOURCES += common/time/timesupA.asm
1619 #else
1620 RuntimeRC_SOURCES += common/time/timesupref.cpp
1621 #endif
1622
1623 RuntimeRC_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
1624
1625 ifeq ($(VBOX_LDR_FMT32),lx)
1626 RuntimeRC_SOURCES += os2/sys0.asm
1627 endif
1628
1629 if1of ($(KBUILD_TARGET), darwin solaris freebsd)
1630 RuntimeRC_SOURCES += \
1631 common/math/gcc/adddi3.c \
1632 common/math/gcc/anddi3.c \
1633 common/math/gcc/ashldi3.c \
1634 common/math/gcc/ashrdi3.c \
1635 common/math/gcc/cmpdi2.c \
1636 common/math/gcc/divdi3.c \
1637 common/math/gcc/iordi3.c \
1638 common/math/gcc/lshldi3.c \
1639 common/math/gcc/lshrdi3.c \
1640 common/math/gcc/moddi3.c \
1641 common/math/gcc/muldi3.c \
1642 common/math/gcc/negdi2.c \
1643 common/math/gcc/notdi2.c \
1644 common/math/gcc/qdivrem.c \
1645 common/math/gcc/subdi3.c \
1646 common/math/gcc/ucmpdi2.c \
1647 common/math/gcc/udivdi3.c \
1648 common/math/gcc/umoddi3.c \
1649 common/math/gcc/xordi3.c
1650 endif
1651
1652
1653 #
1654 # RuntimeRCStub - Raw-mode context startup stub for Windows.
1655 #
1656 RuntimeRCStub_TEMPLATE = VBoxRc
1657 RuntimeRCStub_SOURCES.win = \
1658 nt/NtProcessStartup-stub.cpp
1659
1660
1661endif # VBOX_WITH_RAW_MODE
1662
1663
1664#
1665# Static library for new & delete for the electric fence.
1666#
1667RuntimeEFCPP_TEMPLATE = $(RuntimeR3_TEMPLATE)
1668RuntimeEFCPP_SDKS = $(RuntimeR3_SDKS)
1669RuntimeEFCPP_SDKS.$(KBUILD_TARGET) = $(RuntimeR3_SDKS.$(KBUILD_TARGET))
1670RuntimeEFCPP_DEFS = $(RuntimeR3_DEFS)
1671RuntimeEFCPP_DEFS.$(KBUILD_TARGET) = $(RuntimeR3_DEFS.$(KBUILD_TARGET))
1672RuntimeEFCPP_INCS = $(RuntimeR3_INCS)
1673RuntimeEFCPP_INCS.$(KBUILD_TARGET) = $(RuntimeR3_INCS.$(KBUILD_TARGET))
1674RuntimeEFCPP_SOURCES = r3/alloc-ef-cpp.cpp
1675
1676
1677
1678#
1679# errmsg.cpp depends on a generated header.
1680#
1681common/err/errmsg.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgdata.h
1682common/err/errmsg.cpp_INCS = $(IPRT_OUT_DIR)
1683
1684win/errmsgwin.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgcomdata.h
1685win/errmsgwin.cpp_INCS = $(IPRT_OUT_DIR)
1686
1687# Our COM errors only for R3 libraries on the host
1688define def_errmsgwin_deps
1689 $(lib)_win/errmsgwin.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
1690 $(lib)_common/err/errmsgxpcom.cpp_INCS = $(IPRT_OUT_DIR)
1691 $(lib)_common/err/errmsgxpcom.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
1692endef
1693$(foreach lib,RuntimeR3 VBoxRT RuntimeLnxHostR3,$(eval $(def_errmsgwin_deps)))
1694
1695
1696#
1697# Generate the status code data.
1698#
1699$(IPRT_OUT_DIR)/errmsgdata.h: \
1700 $(VBOX_PATH_RUNTIME_SRC)/common/err/errmsg.sed \
1701 $(PATH_ROOT)/include/iprt/err.h \
1702 $(PATH_ROOT)/include/VBox/err.h \
1703 | $$(dir $$@)
1704 $(call MSG_GENERATE,,$@,$(filter %.h,$^))
1705 $(QUIET)$(REDIRECT) -wo $@ -- $(SED) -f $< $(filter %.h,$^)
1706
1707## @todo r=bird: rename this to indicate that it's not only COM errors, but all win32/64 errors.
1708$(IPRT_OUT_DIR)/errmsgcomdata.h: \
1709 $(VBOX_PATH_RUNTIME_SRC)/common/err/errmsgcom.sed \
1710 $$(PATH_SDK_WINPSDK_INC)/WinError.h \
1711 | $$(dir $$@)
1712 $(call MSG_GENERATE,,$@,$(filter %.h,$^))
1713 $(QUIET)$(REDIRECT) -wo $@ -- $(SED) -f $< $(filter %.h,$^)
1714
1715$(IPRT_OUT_DIR)/errmsgvboxcomdata.h: \
1716 $(VBOX_PATH_RUNTIME_SRC)/VBox/errmsgvboxcom.xsl \
1717 $(VBOX_XIDL_FILE_SRC) \
1718 | $$(dir $$@)
1719 $(call MSG_GENERATE,,$@,$(filter %.xidl,$^))
1720 $(VBOX_XSLTPROC) -o $@ $< $(filter %.xidl,$^)
1721
1722
1723if "$(KBUILD_TARGET)" == "freebsd"
1724#
1725# FreeBSDGeneratedKernelHeaders - Generate some kernel interface headers.
1726#
1727# These are used by:
1728# - The RTMp* API in IPRT.
1729# - VBoxGuest
1730#
1731# Note! We cannot give a output path to the awk program, it will always
1732# generate the header next to the source. So, we'll have to temporarily copy
1733# the source file to the destination directory to work.
1734#
1735VBOX_AWK := /usr/bin/awk
1736INSTALLS += FreeBSDGeneratedKernelHeaders
1737FreeBSDGeneratedKernelHeaders_INST = gen-sys-hdrs/
1738FreeBSDGeneratedKernelHeaders_SOURCES = \
1739 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/bus_if.h \
1740 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/device_if.h \
1741 $(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/pci_if.h
1742FreeBSDGeneratedKernelHeaders_CLEAN = $(FreeBSDGeneratedKernelHeaders_SOURCES)
1743
1744$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/bus_if.h: $(VBOX_FREEBSD_SRC)/kern/bus_if.m | $$(dir $$@)
1745 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
1746 $(QUIET)$(CP) -f $< $(@D)/bus_if.m
1747 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/bus_if.m -h -p
1748 $(QUIET)$(RM) $(@D)/bus_if.m
1749
1750$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/device_if.h: $(VBOX_FREEBSD_SRC)/kern/device_if.m | $$(dir $$@)
1751 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
1752 $(QUIET)$(CP) -f $< $(@D)/device_if.m
1753 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/device_if.m -h -p
1754 $(QUIET)$(RM) $(@D)/device_if.m
1755
1756$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/pci_if.h: $(VBOX_FREEBSD_SRC)/dev/pci/pci_if.m | $$(dir $$@)
1757 $(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
1758 $(QUIET)$(CP) -f $< $(@D)/pci_if.m
1759 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/pci_if.m -h -p
1760 $(QUIET)$(RM) $(@D)/pci_if.m
1761endif # FreeBSD
1762
1763
1764#
1765# Aliases for .cpp.h files so we can more easily do syntax checking from the editor.
1766#
1767ldrELFRelocatable.cpp.o: ldrELF.o
1768ldrELFRelocatable.cpp.obj: ldrELF.obj
1769
1770
1771#
1772# Doxygen documentation.
1773#
1774IPRT_DOXYFILE_INPUT_DIRS = \
1775 $(PATH_ROOT)/include/iprt \
1776 $(PATH_ROOT)/include/iprt/cpp \
1777 $(PATH_ROOT)/include/iprt/linux \
1778 $(PATH_ROOT)/include/iprt/nocrt \
1779 $(PATH_ROOT)/include/iprt/nocrt/x86 \
1780 $(PATH_ROOT)/include/iprt/nocrt/amd64 \
1781 $(PATH_ROOT)/include/iprt/nocrt/compiler \
1782 $(VBOX_PATH_RUNTIME_SRC)/include/internal \
1783 $(VBOX_PATH_RUNTIME_SRC)/common/alloc \
1784 $(VBOX_PATH_RUNTIME_SRC)/common/asm \
1785 $(VBOX_PATH_RUNTIME_SRC)/common/checksum \
1786 $(VBOX_PATH_RUNTIME_SRC)/common/dbg \
1787 $(VBOX_PATH_RUNTIME_SRC)/common/err \
1788 $(VBOX_PATH_RUNTIME_SRC)/common/ldr \
1789 $(VBOX_PATH_RUNTIME_SRC)/common/log \
1790 $(VBOX_PATH_RUNTIME_SRC)/common/math \
1791 $(VBOX_PATH_RUNTIME_SRC)/common/math/amd64 \
1792 $(VBOX_PATH_RUNTIME_SRC)/common/math/gcc \
1793 $(VBOX_PATH_RUNTIME_SRC)/common/math/x86 \
1794 $(VBOX_PATH_RUNTIME_SRC)/common/misc \
1795 $(VBOX_PATH_RUNTIME_SRC)/common/path \
1796 $(VBOX_PATH_RUNTIME_SRC)/common/rand \
1797 $(VBOX_PATH_RUNTIME_SRC)/common/string \
1798 $(VBOX_PATH_RUNTIME_SRC)/common/table \
1799 $(VBOX_PATH_RUNTIME_SRC)/common/time \
1800 $(VBOX_PATH_RUNTIME_SRC)/VBox \
1801 $(foreach dir, $(VBOX_PATH_RUNTIME_SRC) $(VBOX_PATH_RUNTIME_SRC)/r3 $(VBOX_PATH_RUNTIME_SRC)/r0drv,\
1802 $(dir) \
1803 $(dir)/darwin \
1804 $(dir)/l4 \
1805 $(dir)/linux \
1806 $(dir)/nt \
1807 $(dir)/os2 \
1808 $(dir)/win \
1809 $(dir)/win32 \
1810 $(dir)/win64 \
1811 $(dir)/generic \
1812 )
1813
1814# These must come first in order to make things look nice.
1815IPRT_DOXYFILE_INPUT_FIRST =\
1816 $(PATH_ROOT)/include/iprt/cdefs.h \
1817 $(PATH_ROOT)/include/iprt/types.h \
1818 $(PATH_ROOT)/include/iprt/runtime.h \
1819 $(PATH_ROOT)/include/iprt/param.h \
1820 $(PATH_ROOT)/include/iprt/assert.h \
1821 $(PATH_ROOT)/include/iprt/asm.h \
1822
1823IPRT_DOXYFILE_INPUT := \
1824 $(filter-out %.cpp.h, $(sort $(wildcard $(addsuffix /*.h, $(IPRT_DOXYFILE_INPUT_DIRS)))) ) \
1825 $(foreach dir, $(IPRT_DOXYFILE_INPUT_DIRS), $(wildcard $(dir)/*.cpp $(dir)/.c $(dir)/.asm))
1826IPRT_DOXYFILE_INPUT := \
1827 $(IPRT_DOXYFILE_INPUT_FIRST) \
1828 $(filter-out $(IPRT_DOXYFILE_INPUT_FIRST), $(IPRT_DOXYFILE_INPUT))
1829
1830
1831IPRT_DOXYFILE_OUTPUT = $(PATH_OUT)/docs/iprt
1832BLDDIRS += $(IPRT_DOXYFILE_OUTPUT)
1833
1834includedep $(IPRT_OUT_DIR)/Doxyfile.iprt.dep
1835
1836# Generate the Doxyfile
1837$(IPRT_OUT_DIR)/Doxyfile.iprt: \
1838 $(VBOX_PATH_RUNTIME_SRC)/Doxyfile \
1839 $(VBOX_PATH_RUNTIME_SRC)/Makefile.kmk \
1840 $(comp-vars IPRT_DOXYFILE_INPUT,DOXYGEN_INPUT_PREV,FORCE) \
1841 $(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE) \
1842 | $$(dir $$@)
1843 $(RM) -f $@ $@.tmp $@.dep
1844 $(CP) -f $(VBOX_PATH_RUNTIME_SRC)/Doxyfile $@.tmp
1845 $(APPEND) $@.tmp
1846 $(APPEND) $@.tmp "OUTPUT_DIRECTORY = $(IPRT_DOXYFILE_OUTPUT)"
1847 $(APPEND) $@.tmp "WARN_LOGFILE = $(IPRT_DOXYFILE_OUTPUT)/errors"
1848 $(APPEND) $@.tmp "INCLUDE_PATH = $(PATH_ROOT)/include include . common/table"
1849 $(APPEND) $@.tmp "INCLUDE_FILE_PATTERNS = *.cpp.h"
1850 $(APPEND) $@.tmp "PREDEFINED += $(ARCH_BITS_DEFS)"
1851 $(APPEND) $@.tmp
1852 $(APPEND) $@.tmp "INPUT = $(IPRT_DOXYFILE_INPUT)"
1853 $(APPEND) $@.tmp
1854 $(MV) -f $@.tmp $@
1855 @$(APPEND) $@.dep "DOXYGEN_OUTPUT_PREV = $(IPRT_DOXYFILE_OUTPUT)"
1856 @$(APPEND) $@.dep "DOXYGEN_INPUT_PREV = $(IPRT_DOXYFILE_INPUT)"
1857
1858# Do the actual job.
1859$(IPRT_OUT_DIR)/docs.iprt: $(IPRT_OUT_DIR)/Doxyfile.iprt $$(IPRT_DOXYFILE_INPUT) | $(IPRT_DOXYFILE_OUTPUT)/
1860 $(RM) -f $(wildcard $(IPRT_DOXYFILE_OUTPUT)/html/*) $(IPRT_OUT_DIR)/docs.iprt
1861 doxygen $(IPRT_OUT_DIR)/Doxyfile.iprt
1862 $(APPEND) $(IPRT_OUT_DIR)/docs.iprt
1863
1864# aliases
1865docs.iprt: $(IPRT_OUT_DIR)/docs.iprt
1866if !defined(VBOX_ONLY_DOCS) && defined(VBOX_WITH_ALL_DOXYGEN_TARGETS)
1867docs: $(IPRT_OUT_DIR)/docs.iprt
1868endif
1869
1870test-doxygen::
1871 @echo test-$(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE)
1872 @echo $(IPRT_DOXYFILE_OUTPUT)
1873 @echo $(DOXYGEN_OUTPUT_PREV)
1874 @echo $(IPRT_DOXYFILE_INPUT)
1875
1876#
1877# Generate the rules (we're the to sub-makefile).
1878#
1879include $(KBUILD_PATH)/subfooter.kmk
1880
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