VirtualBox

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

Last change on this file since 3672 was 3622, checked in by vboxsync, 17 years ago

typo. (FreeBSD)

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