VirtualBox

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

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

Runtime: Added basic RTEnv...(RTENV,..) API.

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

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette