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