VirtualBox

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

Last change on this file since 4953 was 4822, checked in by vboxsync, 17 years ago

Fixed bad name.

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