VirtualBox

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

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

Solaris.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 31.4 KB
Line 
1# $Id: Makefile.kmk 3916 2007-07-29 22:25:12Z 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 IPRT_WITH_KLDR=1
69 IPRT_PATH_KLDR=./kLdr
70endif
71
72#
73# Unicode Specification reader used to regenerate unidata.cpp.
74#
75uniread_TEMPLATE = VBOXBLDPROG
76uniread_SOURCES = uniread.cpp
77
78#
79# Win64 assembly sources.
80#
81RuntimeWin64ASM_SOURCES = \
82 win64/ASMAtomicBitClear.asm \
83 win64/ASMAtomicBitTestAndToggle.asm \
84 win64/ASMAtomicBitToggle.asm \
85 win64/ASMAtomicReadU64.asm \
86 win64/ASMAtomicXchgU16.asm \
87 win64/ASMAtomicXchgU8.asm \
88 win64/ASMBitFirstClear.asm \
89 win64/ASMBitFirstSet.asm \
90 win64/ASMGetCS.asm \
91 win64/ASMGetDS.asm \
92 win64/ASMGetES.asm \
93 win64/ASMGetFlags.asm \
94 win64/ASMGetFS.asm \
95 win64/ASMGetGS.asm \
96 win64/ASMGetIDTR.asm \
97 win64/ASMGetGDTR.asm \
98 win64/ASMGetTR.asm \
99 win64/ASMGetSS.asm \
100 win64/ASMProbeReadByte.asm \
101 win64/ASMSetFlags.asm \
102 win64/ASMGetDR0.asm \
103 win64/ASMGetDR1.asm \
104 win64/ASMGetDR2.asm \
105 win64/ASMGetDR3.asm \
106 win64/ASMGetDR6.asm \
107 win64/ASMGetDR7.asm \
108 win64/ASMMultU64ByU32DivByU32.asm \
109
110#
111# RuntimeR3 - Static Runtime for Ring-3 executables.
112#
113RuntimeR3_TEMPLATE = VBOXR3EXE
114RuntimeR3_SDKS.win = WINPSDK W2K3DDK
115RuntimeR3_DEFS = IN_RT_R3 IN_SUP_R3 LDR_WITH_NATIVE LDR_WITH_ELF32 LDR_WITH_PE RT_WITH_VBOX
116ifdef IPRT_WITH_KLDR
117 RuntimeR3_DEFS += LDR_WITH_KLDR KLDR_USE_CRT
118 RuntimeR3_DEFS.debug += KLDRMOD_STRICT KLDRMODLX_STRICT KLDRMODPE_STRICT KLDRMODNATIVE_STRICT KLDRRDR_STRICT
119endif
120ifdef VBOX_MAIN_RELEASE_LOG ## @todo (dmik): temporary, until RTThreadSelf/RTThreadAdopt are properly updated
121 RuntimeR3_DEFS += RTCRITSECT_STRICT
122endif
123RuntimeR3_INCS = \
124 $(PATH_ROOT)/src/libs/liblzf-1.51
125ifdef IPRT_WITH_KLDR
126 RuntimeR3_INCS += \
127 $(IPRT_PATH_KLDR)
128endif
129RuntimeR3_INCS.l4 = \
130 $(L4_INCDIR)
131# for iconv.h
132RuntimeR3_INCS.freebsd = \
133 /usr/local/include
134
135
136# RuntimeR3_INCS.solaris = \
137# /usr/include
138
139RuntimeR3_SOURCES = \
140 misc/sanity-cpp.cpp \
141 misc/sanity-c.c \
142 alloc.cpp \
143 alloc/heapsimple.cpp \
144 assert.cpp \
145 table/avlhcphys.cpp \
146 table/avlgcptr.cpp \
147 table/avlogcphys.cpp \
148 table/avlogcptr.cpp \
149 table/avlohcphys.cpp \
150 table/avloioport.cpp \
151 table/avlpv.cpp \
152 table/avlrgcptr.cpp \
153 table/avlrogcphys.cpp \
154 table/avlrogcptr.cpp \
155 table/avlroogcptr.cpp \
156 table/avlroioport.cpp \
157 table/avlu32.cpp \
158 table/avlul.cpp \
159 table/table.cpp \
160 crc32.cpp \
161 crc64.cpp \
162 dir.cpp \
163 errmsg.cpp \
164 fileio.cpp \
165 fs.cpp \
166 generic/critsect-generic.cpp \
167 generic/RTFileCopy-generic.cpp \
168 generic/RTLogWriteStdErr-generic.cpp \
169 generic/RTLogWriteStdOut-generic.cpp \
170 generic/RTLogWriteUser-generic.cpp \
171 generic/semfastmutex-generic.cpp \
172 generic/spinlock-generic.cpp \
173 ldr.cpp \
174 ldrFile.cpp \
175 ldrNative.cpp \
176 ldrELF.cpp \
177 ldrEx.cpp \
178 ldrPE.cpp \
179 log.cpp \
180 logcom.cpp \
181 logformat.cpp \
182 md5.cpp \
183 path.cpp \
184 req.cpp \
185 r3/alloc-ef.cpp \
186 r3/alloc.cpp \
187 r3/init.cpp \
188 r3/process.cpp \
189 r3/stream.cpp \
190 r3/tcp.cpp \
191 RTErrConvertFromErrno.cpp \
192 semspingpong.cpp \
193 straprintf.cpp \
194 strformat.cpp \
195 strformatrt.cpp \
196 string.cpp \
197 strprintf.cpp \
198 strspace.cpp \
199 strstrip.cpp \
200 strtonum.cpp \
201 thread.cpp \
202 time.cpp \
203 timeprog.cpp \
204 uni.cpp \
205 unidata.cpp \
206 utf-16.cpp \
207 utf-8.cpp \
208 zip.cpp \
209 misc/rand.cpp \
210
211ifdef IPRT_WITH_KLDR
212 RuntimeR3_SOURCES += \
213 ldrkLdr.cpp \
214 $(IPRT_PATH_KLDR)/kLdrMod.c \
215 $(IPRT_PATH_KLDR)/kLdrModLX.c \
216 $(IPRT_PATH_KLDR)/kLdrModPE.c \
217 $(IPRT_PATH_KLDR)/kLdrModMachO.c \
218 $(IPRT_PATH_KLDR)/kLdrModNative.c \
219 $(IPRT_PATH_KLDR)/kLdrMisc.c \
220 $(IPRT_PATH_KLDR)/kLdrRdr.c \
221 $(IPRT_PATH_KLDR)/kLdrHlpStr.c
222# We Implement these using IPRT facilities.
223# $(IPRT_PATH_KLDR)/kLdrHlp.c \
224# $(IPRT_PATH_KLDR)/kLdrHlpHeap.c \
225# $(IPRT_PATH_KLDR)/kLdrHlpSem.c \
226# $(IPRT_PATH_KLDR)/kLdrHlpMem.c \
227# $(IPRT_PATH_KLDR)/kLdrHlpPath.c
228
229endif
230
231# VBox specific stuff.
232RuntimeR3_SOURCES += \
233 VBox/strformat-vbox.cpp \
234 VBox/RTAssertDoBreakpoint-vbox.cpp \
235 VBox/log-vbox.cpp
236
237RuntimeR3_SOURCES.win = \
238 generic/RTDirQueryInfo-generic.cpp \
239 generic/RTDirSetTimes-generic.cpp \
240 generic/semsrw-generic.cpp \
241 generic/semnoint-generic.cpp \
242 generic/rand-stubs-generic.cpp \
243 nt/RTErrConvertFromNtStatus.cpp \
244 win32/errmsgwin.cpp \
245 r3/posix/env-posix.cpp \
246 r3/win32/alloc-win32.cpp \
247 r3/win32/dir-win32.cpp \
248 r3/win32/fileio-win32.cpp \
249 r3/win32/fs-win32.cpp \
250 r3/win32/ldrNative-win32.cpp \
251 r3/win32/path-win32.cpp \
252 r3/win32/process-win32.cpp \
253 r3/win32/RTLogWriteDebugger-win32.cpp \
254 r3/win32/sched-win32.cpp \
255 r3/win32/sems-win32.cpp \
256 r3/win32/system-win32.cpp \
257 r3/win32/thread-win32.cpp \
258 r3/win32/time-win32.cpp \
259 r3/win32/timer-win32.cpp \
260 r3/win32/utf16locale-win32.cpp \
261 r3/win32/utf8-win32.cpp \
262 r3/win32/uuid-win32.cpp \
263 timesup.cpp \
264 win32/RTErrConvertFromWin32.cpp
265
266RuntimeR3_SOURCES.win.amd64 = \
267 $(RuntimeWin64ASM_SOURCES)
268
269RuntimeR3_SOURCES.linux = \
270 generic/RTDirQueryInfo-generic.cpp \
271 generic/RTDirSetTimes-generic.cpp \
272 generic/RTFileMove-generic.cpp \
273 generic/RTLogWriteDebugger-generic.cpp \
274 generic/RTTimeLocalNow-generic.cpp \
275 generic/RTTimerCreate-generic.cpp \
276 r3/posix/RTTimeNow-posix.cpp \
277 r3/posix/alloc-posix.cpp \
278 r3/posix/dir-posix.cpp \
279 r3/posix/env-posix.cpp \
280 r3/posix/fileio-posix.cpp \
281 r3/posix/filelock-posix.cpp \
282 r3/posix/fs-posix.cpp \
283 r3/posix/ldrNative-posix.cpp \
284 r3/posix/path-posix.cpp \
285 generic/pathhost-generic.cpp \
286 r3/posix/process-posix.cpp \
287 r3/posix/rand-posix.cpp \
288 r3/posix/system-posix.cpp \
289 r3/linux/sched-linux.cpp \
290 r3/posix/thread-posix.cpp \
291 r3/linux/time-linux.cpp \
292 r3/posix/timelocal-posix.cpp \
293 r3/posix/timer-posix.cpp \
294 generic/utf16locale-generic.cpp \
295 r3/posix/utf8-posix.cpp \
296 generic/uuid-generic.cpp \
297 timesup.cpp
298ifeq ($(BUILD_TARGET_ARCH),amd64)
299 RuntimeR3_SOURCES.linux += r3/linux/sems-linux.cpp
300else
301 RuntimeR3_SOURCES.linux += r3/posix/sems-posix.cpp
302endif
303
304RuntimeR3_SOURCES.os2 = \
305 generic/RTDirQueryInfo-generic.cpp \
306 generic/RTDirSetTimes-generic.cpp \
307 generic/RTFileMove-generic.cpp \
308 generic/RTLogWriteDebugger-generic.cpp \
309 generic/RTTimeLocalNow-generic.cpp \
310 generic/RTTimerCreate-generic.cpp \
311 os2/RTErrConvertFromOS2.cpp \
312 r3/os2/sems-os2.cpp \
313 r3/os2/system-os2.cpp \
314 r3/os2/thread-os2.cpp \
315 r3/posix/alloc-posix.cpp \
316 r3/posix/dir-posix.cpp \
317 r3/posix/env-posix.cpp \
318 r3/posix/fileio-posix.cpp \
319 r3/posix/filelock-posix.cpp \
320 r3/posix/fs-posix.cpp \
321 r3/posix/ldrNative-posix.cpp \
322 r3/posix/path-posix.cpp \
323 generic/pathhost-generic.cpp \
324 r3/posix/process-posix.cpp \
325 generic/rand-stubs-generic.cpp \
326 generic/semsrw-generic.cpp \
327 generic/semnoint-generic.cpp \
328 generic/sched-generic.cpp \
329 r3/os2/time-os2.cpp \
330 r3/posix/timelocal-posix.cpp \
331 generic/timer-generic.cpp \
332 r3/posix/RTTimeNow-posix.cpp \
333 generic/utf16locale-generic.cpp \
334 r3/posix/utf8-posix.cpp \
335 generic/uuid-generic.cpp \
336 timesup.cpp \
337
338RuntimeR3_SOURCES.darwin = \
339 darwin/RTErrConvertFromDarwinCOM.cpp \
340 darwin/RTErrConvertFromDarwinIO.cpp \
341 darwin/RTErrConvertFromDarwinKern.cpp \
342 generic/RTDirQueryInfo-generic.cpp \
343 generic/RTDirSetTimes-generic.cpp \
344 generic/RTFileMove-generic.cpp \
345 generic/RTLogWriteDebugger-generic.cpp \
346 generic/RTTimeLocalNow-generic.cpp \
347 generic/RTTimerCreate-generic.cpp \
348 generic/pathhost-generic.cpp \
349 generic/sched-generic.cpp \
350 generic/timer-generic.cpp \
351 generic/utf16locale-generic.cpp \
352 generic/uuid-generic.cpp\
353 r3/darwin/alloc-darwin.cpp \
354 r3/posix/dir-posix.cpp \
355 r3/posix/env-posix.cpp \
356 r3/posix/fileio-posix.cpp \
357 r3/darwin/filelock-darwin.cpp \
358 r3/posix/fs-posix.cpp \
359 r3/posix/ldrNative-posix.cpp \
360 r3/posix/path-posix.cpp \
361 r3/posix/process-posix.cpp \
362 r3/posix/rand-posix.cpp \
363 r3/posix/sems-posix.cpp \
364 r3/posix/system-posix.cpp \
365 r3/posix/thread-posix.cpp \
366 r3/darwin/time-darwin.cpp \
367 r3/posix/timelocal-posix.cpp \
368 r3/posix/utf8-posix.cpp \
369 timesup.cpp \
370
371## @todo Make BSD sched.
372RuntimeR3_SOURCES.freebsd = \
373 generic/RTDirQueryInfo-generic.cpp \
374 generic/RTDirSetTimes-generic.cpp \
375 generic/RTFileMove-generic.cpp \
376 generic/RTLogWriteDebugger-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 logcom.cpp \
664 logformat.cpp \
665 strformat.cpp \
666 strformatrt.cpp \
667 strprintf.cpp \
668 string/memchr.cpp \
669 string/memcmp.cpp \
670 string/memcpy.cpp \
671 string/memset.cpp \
672 string/strcpy.cpp \
673 string/strlen.cpp \
674 string/strncmp.cpp \
675 string/strpbrk.cpp \
676 VBox/strformat-vbox.cpp \
677 timesup.cpp
678
679RuntimeR0_SOURCES.win.amd64 = $(RuntimeWin64ASM_SOURCES)
680
681RuntimeR0_SOURCES.os2 = \
682 os2/RTErrConvertFromOS2.cpp \
683 os2/sys0.asm
684
685RuntimeR0_SOURCES.darwin.x86 = \
686 math/gcc/adddi3.c \
687 math/gcc/anddi3.c \
688 math/gcc/ashldi3.c \
689 math/gcc/ashrdi3.c \
690 math/gcc/cmpdi2.c \
691 math/gcc/divdi3.c \
692 math/gcc/iordi3.c \
693 math/gcc/lshldi3.c \
694 math/gcc/lshrdi3.c \
695 math/gcc/moddi3.c \
696 math/gcc/muldi3.c \
697 math/gcc/negdi2.c \
698 math/gcc/notdi2.c \
699 math/gcc/qdivrem.c \
700 math/gcc/subdi3.c \
701 math/gcc/ucmpdi2.c \
702 math/gcc/udivdi3.c \
703 math/gcc/umoddi3.c \
704 math/gcc/xordi3.c
705
706
707string/memchr.cpp_CXXFLAGS.win = -Oi-
708string/memcmp.cpp_CXXFLAGS.win = -Oi-
709string/memcpy.cpp_CXXFLAGS.win = -Oi-
710string/memset.cpp_CXXFLAGS.win = -Oi-
711string/strcpy.cpp_CXXFLAGS.win = -Oi-
712string/strlen.cpp_CXXFLAGS.win = -Oi-
713
714ifeq ($(BUILD_TARGET),l4)
715RuntimeR0Drv_BLD_TRG = linux
716RuntimeR0Drv_BLD_TRG_ARCH = x86
717RuntimeR0Drv_BLD_TRG_CPU = i386
718endif
719
720#
721# RuntimeR0Drv - Ring0 library for host drivers.
722#
723RuntimeR0Drv_TEMPLATE = VBOXR0DRV
724RuntimeR0Drv_SDKS.win = W2K3DDK WINPSDKINCS
725RuntimeR0Drv_INCS := $(PATH_SUB_CURRENT)
726RuntimeR0Drv_DEFS = IN_RT_R0 RT_WITH_VBOX RT_WITHOUT_NOCRT_WRAPPERS
727RuntimeR0Drv_DEFS.win = IN_SUP_R0
728RuntimeR0Drv_DEFS.linux = MODULE KBUILD_MODNAME=KBUILD_STR\(vboxdrv\) KBUILD_BASENAME=KBUILD_STR\(vboxdrv\) IN_SUP_R0 # why is IN_SUP_R0 here? because!
729
730RuntimeR0Drv_INCS.linux = \
731 r0drv/linux
732
733RuntimeR0Drv_SOURCES = \
734 misc/sanity-cpp.cpp \
735 misc/sanity-c.c \
736 assert.cpp \
737 log.cpp \
738 logcom.cpp \
739 logformat.cpp \
740 string/strpbrk.cpp \
741 strformat.cpp \
742 strformatrt.cpp \
743 strtonum.cpp \
744 strprintf.cpp \
745 VBox/strformat-vbox.cpp \
746 r0drv/alloc-r0drv.cpp \
747 r0drv/initterm-r0drv.cpp \
748 generic/RTLogWriteStdErr-stub-generic.cpp \
749 generic/RTLogWriteStdOut-stub-generic.cpp \
750 generic/RTLogWriteUser-generic.cpp \
751 VBox/log-vbox.cpp \
752 table/avlpv.cpp \
753 crc32.cpp \
754 crc64.cpp
755
756RuntimeR0Drv_SOURCES.linux = \
757 generic/RTAssertDoBreakpoint-generic.cpp \
758 alloc/heapsimple.cpp \
759 r0drv/linux/alloc-r0drv-linux.c \
760 r0drv/linux/initterm-r0drv-linux.c \
761 r0drv/linux/process-r0drv-linux.c \
762 r0drv/linux/RTLogWriteDebugger-r0drv-linux.c \
763 r0drv/linux/semaphore-r0drv-linux.c \
764 r0drv/linux/spinlock-r0drv-linux.c \
765 r0drv/linux/thread-r0drv-linux.c
766
767# SOLARISTODO - Todo for Solaris
768# RuntimeR0Drv_SOURCES.solaris = \
769# generic/RTAssertDoBreakpoint-generic.cpp \
770# r0drv/solaris/alloc-r0drv-solaris.c \
771# r0drv/solaris/initterm-r0drv-solaris.c
772
773
774RuntimeR0Drv_SOURCES.win = \
775 generic/RTAssertDoBreakpoint-generic.cpp \
776 nt/RTErrConvertFromNtStatus.cpp \
777 r0drv/nt/alloc-r0drv-nt.cpp \
778 r0drv/nt/initterm-r0drv-nt.cpp \
779 r0drv/nt/process-r0drv-nt.cpp \
780 r0drv/nt/RTLogWriteDebugger-r0drv-nt.cpp \
781 r0drv/nt/semaphore-r0drv-nt.cpp \
782 r0drv/nt/spinlock-r0drv-nt.cpp \
783 r0drv/nt/thread-r0drv-nt.cpp \
784 string/strncmp.cpp
785
786RuntimeR0Drv_SOURCES.win.amd64 = \
787 $(RuntimeWin64ASM_SOURCES)
788
789RuntimeR0Drv_SOURCES.darwin = \
790 darwin/RTErrConvertFromDarwinKern.cpp \
791 darwin/RTErrConvertFromDarwinIO.cpp \
792 generic/RTAssertDoBreakpoint-generic.cpp \
793 generic/RTTimerCreate-generic.cpp \
794 RTErrConvertFromErrno.cpp \
795 string/memchr.asm \
796 r0drv/memobj-r0drv.cpp \
797 r0drv/darwin/alloc-r0drv-darwin.cpp \
798 r0drv/darwin/assert-r0drv-darwin.cpp \
799 r0drv/darwin/memobj-r0drv-darwin.cpp \
800 r0drv/darwin/initterm-r0drv-darwin.cpp \
801 r0drv/darwin/process-r0drv-darwin.cpp \
802 r0drv/darwin/RTLogWriteDebugger-r0drv-darwin.cpp \
803 r0drv/darwin/semaphore-r0drv-darwin.cpp \
804 r0drv/darwin/spinlock-r0drv-darwin.cpp \
805 r0drv/darwin/thread-r0drv-darwin.cpp \
806 r0drv/darwin/thread2-r0drv-darwin.cpp \
807 r0drv/darwin/time-r0drv-darwin.cpp \
808 thread.cpp \
809 generic/timer-generic.cpp
810
811RuntimeR0Drv_DEFS.os2 += RT_WITHOUT_NOCRT_WRAPPERS
812RuntimeR0Drv_SOURCES.os2 = \
813 string/memchr.asm \
814 string/memcmp.asm \
815 string/memcpy.asm \
816 string/mempcpy.asm \
817 string/memset.asm \
818 string/strchr.asm \
819 string/strcmp.asm \
820 \
821 string/strcpy.cpp \
822 string/strlen.cpp \
823 string/strncmp.cpp \
824 \
825 os2/RTErrConvertFromOS2.cpp \
826 os2/sys0.asm \
827 thread.cpp \
828 r0drv/memobj-r0drv.cpp \
829 r0drv/os2/alloc-r0drv-os2.cpp \
830 r0drv/os2/assert-r0drv-os2.cpp \
831 r0drv/os2/assertA-r0drv-os2.asm \
832 r0drv/os2/initterm-r0drv-os2.cpp \
833 r0drv/os2/memobj-r0drv-os2.cpp \
834 r0drv/os2/os2imports.imp \
835 r0drv/os2/process-r0drv-os2.cpp \
836 r0drv/os2/semevent-r0drv-os2.cpp \
837 r0drv/os2/semeventmulti-r0drv-os2.cpp \
838 r0drv/os2/semfastmutex-r0drv-os2.cpp \
839 r0drv/os2/spinlock-r0drv-os2.cpp \
840 r0drv/os2/thread-r0drv-os2.cpp \
841 r0drv/os2/thread2-r0drv-os2.cpp \
842 r0drv/os2/time-r0drv-os2.cpp \
843 r0drv/os2/timer-r0drv-os2.cpp \
844 r0drv/os2/timerA-r0drv-os2.asm \
845 r0drv/os2/RTAssertDoBreakpoint-r0drv-os2.asm \
846 r0drv/os2/RTR0Os2DHQueryDOSVar.asm \
847 r0drv/os2/RTR0Os2DHVMGlobalToProcess.asm \
848 generic/RTLogWriteDebugger-generic.cpp
849
850RuntimeR0Drv_SOURCES.freebsd = \
851 generic/RTAssertDoBreakpoint-generic.cpp \
852 generic/RTLogWriteDebugger-generic.cpp \
853 RTErrConvertFromErrno.cpp \
854 string/memchr.asm \
855 r0drv/memobj-r0drv.cpp \
856 thread.cpp \
857 r0drv/freebsd/alloc-r0drv-freebsd.c \
858 r0drv/freebsd/assert-r0drv-freebsd.c \
859 r0drv/freebsd/initterm-r0drv-freebsd.c \
860 r0drv/freebsd/process-r0drv-freebsd.c \
861 r0drv/freebsd/semevent-r0drv-freebsd.c \
862 r0drv/freebsd/semeventmulti-r0drv-freebsd.c \
863 r0drv/freebsd/semfastmutex-r0drv-freebsd.c \
864 r0drv/freebsd/spinlock-r0drv-freebsd.c \
865 r0drv/freebsd/thread-r0drv-freebsd.c \
866 r0drv/freebsd/thread2-r0drv-freebsd.c \
867 generic/RTTimerCreate-generic.cpp
868# r0drv/freebsd/memobj-r0drv-freebsd.cpp \
869# r0drv/freebsd/time-r0drv-freebsd.cpp \
870# generic/timer-generic.cpp ??
871
872## PORTME: Porters create and add their selection of platform specific Ring-0 Driver files here.
873
874#
875# RuntimeW32GuestR0 - Win32 guest driver runtime.
876#
877RuntimeW32GuestR0_TEMPLATE = VBOXW32GUESTR0LIB
878RuntimeW32GuestR0_SDKS = W2K3DDKX86 WINPSDKINCS
879RuntimeW32GuestR0_INCS := $(PATH_SUB_CURRENT)
880RuntimeW32GuestR0_DEFS = IN_RT_R0 RT_WITH_VBOX RT_WITHOUT_NOCRT_WRAPPERS IN_SUP_R0
881RuntimeW32GuestR0_SOURCES = \
882 $(filter-out generic/RTLogWriteUser-generic.cpp,$(RuntimeR0Drv_SOURCES)) \
883 $(RuntimeR0Drv_SOURCES.win) \
884 VBox/logbackdoor.cpp
885ifdef VBOX_USE_VCC80
886RuntimeW32GuestR0_SOURCES += \
887 string/memchr.cpp \
888 string/memcmp.cpp \
889 string/memcpy.cpp \
890 string/memset.cpp \
891 string/strlen.cpp
892endif
893
894
895#
896# RuntimeW32NT4GuestR0 - Win32 NT4 guest driver runtime.
897#
898RuntimeW32NT4GuestR0_TEMPLATE = VBOXW32GUESTR0LIB
899RuntimeW32NT4GuestR0_SDKS = $(RuntimeW32GuestR0_SDKS)
900RuntimeW32NT4GuestR0_DEFS = $(RuntimeW32GuestR0_DEFS) IPRT_TARGET_NT4
901RuntimeW32NT4GuestR0_INCS = $(RuntimeW32GuestR0_INCS)
902RuntimeW32NT4GuestR0_SOURCES = $(RuntimeW32GuestR0_SOURCES)
903
904
905#
906# RuntimeLnx32GuestR0 - 32-bit Linux guest driver runtime.
907#
908RuntimeLnx32GuestR0_TEMPLATE = VBOXLNX32GUESTR0
909RuntimeLnx32GuestR0_DEFS = RT_WITH_VBOX RT_WITHOUT_NOCRT_WRAPPERS IN_SUP_R0 \
910 MODULE KBUILD_MODNAME=KBUILD_STR\(vboxdrv\) KBUILD_BASENAME=KBUILD_STR\(vboxdrv\)
911RuntimeLnx32GuestR0_INCS = $(RuntimeR0Drv_INCS.linux) $(RuntimeR0Drv_INCS)
912RuntimeLnx32GuestR0_SOURCES = \
913 $(RuntimeR0Drv_SOURCES) \
914 $(RuntimeR0Drv_SOURCES.linux) \
915 VBox/logbackdoor.cpp
916
917
918#
919# RuntimeOS2GuestR0 - OS/2 Warp 4.5 guest driver runtime.
920#
921RuntimeOS2GuestR0_TEMPLATE = VBOXOS2GUESTR0LIB
922RuntimeOS2GuestR0_INCS := $(PATH_SUB_CURRENT)
923RuntimeOS2GuestR0_DEFS = RT_WITH_VBOX RT_WITHOUT_NOCRT_WRAPPERS
924RuntimeOS2GuestR0_SOURCES = \
925 $(filter-out assert.cpp generic/RTLogWriteUser-generic.cpp,$(RuntimeR0Drv_SOURCES)) \
926 $(RuntimeR0Drv_SOURCES.os2) \
927 VBox/logbackdoor.cpp
928
929
930#
931# RuntimeGC - Guest context library.
932#
933RuntimeGC_TEMPLATE = VBOXGC
934RuntimeGC_DEFS = IN_RT_GC RT_WITH_VBOX
935RuntimeGC_SOURCES = \
936 gc/initterm-gc.cpp \
937 misc/sanity-cpp.cpp \
938 misc/sanity-c.c \
939 table/avlogcphys.cpp \
940 table/avlrogcphys.cpp \
941 table/avlogcptr.cpp \
942 table/avlohcphys.cpp \
943 table/avlrogcptr.cpp \
944 table/avlroogcptr.cpp \
945 table/avloioport.cpp \
946 table/avlroioport.cpp \
947 assert.cpp \
948 generic/RTAssertDoBreakpoint-generic.cpp \
949 log.cpp \
950 logcom.cpp \
951 logformat.cpp \
952 string/strpbrk.cpp \
953 string/strncmp.cpp \
954 strformat.cpp \
955 strformatrt.cpp \
956 strprintf.cpp \
957 VBox/strformat-vbox.cpp \
958 timesup.cpp \
959 timeprog.cpp \
960 string/memchr.cpp \
961 string/memcmp.cpp \
962 string/memcpy.cpp \
963 string/memset.cpp \
964 string/strcpy.cpp \
965 string/strlen.cpp
966
967ifeq ($(VBOX_LDR_FMT32),lx)
968RuntimeGC_SOURCES += os2/sys0.asm
969endif
970
971RuntimeGC_SOURCES.darwin = \
972 math/gcc/adddi3.c \
973 math/gcc/anddi3.c \
974 math/gcc/ashldi3.c \
975 math/gcc/ashrdi3.c \
976 math/gcc/cmpdi2.c \
977 math/gcc/divdi3.c \
978 math/gcc/iordi3.c \
979 math/gcc/lshldi3.c \
980 math/gcc/lshrdi3.c \
981 math/gcc/moddi3.c \
982 math/gcc/muldi3.c \
983 math/gcc/negdi2.c \
984 math/gcc/notdi2.c \
985 math/gcc/qdivrem.c \
986 math/gcc/subdi3.c \
987 math/gcc/ucmpdi2.c \
988 math/gcc/udivdi3.c \
989 math/gcc/umoddi3.c \
990 math/gcc/xordi3.c
991
992
993#
994# Static library for new & delete for the electric fence.
995#
996RuntimeEFCPP_TEMPLATE = $(RuntimeR3_TEMPLATE)
997RuntimeEFCPP_SDKS = $(RuntimeR3_SDKS)
998RuntimeEFCPP_SDKS.$(BUILD_TARGET) = $(RuntimeR3_SDKS.$(BUILD_TARGET))
999RuntimeEFCPP_DEFS = $(RuntimeR3_DEFS)
1000RuntimeEFCPP_DEFS.$(BUILD_TARGET) = $(RuntimeR3_DEFS.$(BUILD_TARGET))
1001RuntimeEFCPP_INCS = $(RuntimeR3_INCS)
1002RuntimeEFCPP_INCS.$(BUILD_TARGET) = $(RuntimeR3_INCS.$(BUILD_TARGET))
1003RuntimeEFCPP_SOURCES = r3/alloc-ef-cpp.cpp
1004
1005
1006
1007#
1008# errmsg.cpp depends on a generated header.
1009#
1010errmsg.cpp_DEPS = $(PATH_TARGET)/errmsgdata.h
1011errmsg.cpp_INCS = $(PATH_TARGET)
1012
1013win32/errmsgwin.cpp_DEPS = $(PATH_TARGET)/errmsgcomdata.h
1014win32/errmsgwin.cpp_INCS = $(PATH_TARGET)
1015
1016linux/errmsglinux.cpp_DEPS = $(PATH_TARGET)/errmsgxpcomdata.h
1017linux/errmsglinux.cpp_INCS = $(PATH_TARGET)
1018
1019
1020# Generate the rules
1021include $(PATH_KBUILD)/footer.kmk
1022
1023
1024ifneq ($(wildcard /usr/bin/chcon),)
1025# this is needed for testcases executed at build time
1026$(PATH_BIN)/VBoxRT.so:
1027 $(INSTALL) $(out) $@
1028 chcon -t texrel_shlib_t $@ || true
1029endif
1030
1031
1032#
1033# Generate the status code data.
1034#
1035$(PATH_TARGET)/errmsgdata.h: errmsg.sed $(DEPTH)/include/iprt/err.h $(DEPTH)/include/VBox/err.h
1036 $(call MSG_GENERATE,,$@,$(filter %.h,$^))
1037 $(QUIET)$(MKDIR) -p $(PATH_TARGET)
1038 $(QUIET)$(SED) -f $< $(filter %.h,$^) > $@
1039## @todo r=bird: rename this to indicate that it's not only COM errors, but all win32/64 errors.
1040$(PATH_TARGET)/errmsgcomdata.h: errmsgcom.sed $(PATH_SDK_WINPSDK_INC)/WinError.h
1041 $(call MSG_GENERATE,,$@,$(filter %.h,$^))
1042 $(QUIET)$(MKDIR) -p $(PATH_TARGET)
1043 $(QUIET)$(SED) -f $< $(filter %.h,$^) > $@
1044$(PATH_TARGET)/errmsgxpcomdata.h: errmsgxpcom.sed $(DEPTH)/src/libs/xpcom18a4/xpcom/base/nsError.h
1045 $(call MSG_GENERATE,,$@,$(filter %.h,$^))
1046 $(QUIET)$(MKDIR) -p $(PATH_TARGET)
1047 $(QUIET)$(SED) -f $< $(filter %.h,$^) > $@
1048
1049
1050#
1051# Aliases for .cpp.h files so we can more easily do syntax checking from the editor.
1052#
1053ldrELFRelocatable.cpp.o: ldrELF.o
1054ldrELFRelocatable.cpp.obj: ldrELF.obj
1055
1056
1057#
1058# Doxygen documentation.
1059#
1060DOXYGEN_INPUT_DIRS = \
1061 $(PATH_ROOT)/include/iprt \
1062 $(PATH_ROOT)/include/iprt/nocrt \
1063 $(PATH_ROOT)/include/iprt/nocrt/x86 \
1064 $(PATH_ROOT)/include/iprt/nocrt/amd64 \
1065 include/internal \
1066 string \
1067 table \
1068 $(foreach dir, . r3 r0drv,\
1069 $(dir) \
1070 $(dir)/darwin \
1071 $(dir)/l4 \
1072 $(dir)/linux \
1073 $(dir)/nt \
1074 $(dir)/os2 \
1075 $(dir)/win \
1076 $(dir)/win32 \
1077 $(dir)/win64 \
1078 $(dir)/generic \
1079 )
1080
1081# These must come first in order to make things look nice.
1082DOXYGEN_INPUT_FIRST =\
1083 $(PATH_ROOT)/include/iprt/cdefs.h \
1084 $(PATH_ROOT)/include/iprt/types.h \
1085 $(PATH_ROOT)/include/iprt/runtime.h \
1086 $(PATH_ROOT)/include/iprt/param.h \
1087 $(PATH_ROOT)/include/iprt/assert.h \
1088 $(PATH_ROOT)/include/iprt/asm.h \
1089
1090DOXYGEN_INPUT := \
1091 $(filter-out %.cpp.h, $(sort $(wildcard $(addsuffix /*.h, $(DOXYGEN_INPUT_DIRS)))) ) \
1092 $(foreach dir, $(DOXYGEN_INPUT_DIRS), $(wildcard $(dir)/*.cpp $(dir)/.c $(dir)/.asm))
1093DOXYGEN_INPUT := \
1094 $(DOXYGEN_INPUT_FIRST) \
1095 $(filter-out $(DOXYGEN_INPUT_FIRST), $(DOXYGEN_INPUT))
1096
1097
1098DOXYGEN_OUTPUT = $(PATH_OUT)/docs/iprt
1099
1100-include $(PATH_TARGET)/Doxyfile.dep
1101
1102# Generate the Doxyfile
1103$(PATH_TARGET)/Doxyfile: Doxyfile \
1104 $(comp-vars DOXYGEN_INPUT,DOXYGEN_INPUT_PREV,FORCE) \
1105 $(comp-vars DOXYGEN_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE) \
1106 | $(call DIRDEP, $(PATH_TARGET))
1107 $(RM) -f $@ [email protected] $(PATH_TARGET)/Doxyfile.dep
1108 $(CP) -f Doxyfile [email protected]
1109 $(APPEND) [email protected]
1110 $(APPEND) [email protected] "OUTPUT_DIRECTORY = $(DOXYGEN_OUTPUT)"
1111 $(APPEND) [email protected] "WARN_LOGFILE = $(DOXYGEN_OUTPUT)/errors"
1112 $(APPEND) [email protected] "INCLUDE_PATH = $(PATH_ROOT)/include include . table"
1113 $(APPEND) [email protected] "INCLUDE_FILE_PATTERNS = *.cpp.h"
1114 $(APPEND) [email protected]
1115 $(APPEND) [email protected] "INPUT = $(DOXYGEN_INPUT)"
1116 $(APPEND) [email protected]
1117 $(MV) -f [email protected] $@
1118 @$(APPEND) $(PATH_TARGET)/Doxyfile.dep "DOXYGEN_OUTPUT_PREV = $(DOXYGEN_OUTPUT)"
1119 @$(APPEND) $(PATH_TARGET)/Doxyfile.dep "DOXYGEN_INPUT_PREV = $(DOXYGEN_INPUT)"
1120
1121# Create the output directory.
1122$(call DIRDEP, $(DOXYGEN_OUTPUT)):
1123 $(MKDIR) -p $@
1124
1125# Do the actual job.
1126$(PATH_TARGET)/docs.iprt: $(PATH_TARGET)/Doxyfile $(DOXYGEN_INPUT) | $(call DIRDEP, $(DOXYGEN_OUTPUT))
1127 $(RM) -f $(wildcard $(DOXYGEN_OUTPUT)/html/*) $(PATH_TARGET)/docs.iprt
1128 doxygen $(PATH_TARGET)/Doxyfile
1129 $(APPEND) $(PATH_TARGET)/docs.iprt
1130
1131# alias
1132docs: $(PATH_TARGET)/docs.iprt
1133
1134test:
1135 @echo test-$(comp-vars DOXYGEN_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE)
1136 @echo $(DOXYGEN_OUTPUT)
1137 @echo $(DOXYGEN_OUTPUT_PREV)
1138
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