VirtualBox

source: vbox/trunk/Makefile.kmk@ 11686

Last change on this file since 11686 was 11686, checked in by vboxsync, 16 years ago

Build system: implement fetching documentation from build server if enabled.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 26.5 KB
Line 
1# $Id: Makefile.kmk 11686 2008-08-26 18:21:33Z vboxsync $
2## @file
3# Top level makefile.
4#
5
6#
7# Copyright (C) 2006-2007 Sun Microsystems, Inc.
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 (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18# Clara, CA 95054 USA or visit http://www.sun.com if you need
19# additional information or have any questions.
20#
21
22SUB_DEPTH = .
23include $(KBUILD_PATH)/subheader.kmk
24
25ifdef VBOX_WITH_DOCS
26 ifndef VBOX_ONLY_ADDITIONS
27 ifdef VBOX_SINGLE_MAKEFILE
28 include $(PATH_SUB_CURRENT)/doc/manual/Makefile.kmk
29 else
30 SUBDIRS = doc/manual
31 endif
32 endif
33endif
34ifdef VBOX_SINGLE_MAKEFILE
35 include $(PATH_SUB_CURRENT)/src/Makefile.kmk
36else
37 SUBDIRS += src
38endif
39
40ifndef VBOX_ONLY_ADDITIONS
41#
42# Install external binaries (mostly redistributable parts of tools we use).
43# This must be done *before* we build the manual.
44#
45# To avoid dragging in unnecessary tools and sdks here, we don't use the .win
46# and .linux property suffixes.
47#
48INSTALLS += bin
49
50bin_INST = $(INST_BIN)
51
52# The SDL DLLs
53if1of ($(KBUILD_TARGET), win os2)
54 ifneq ($(VBOX_WITH_VBOXSDL)$(VBOX_WITH_VBOXBFE),)
55 include $(KBUILD_PATH)/sdks/LIBSDL.kmk
56 bin_SOURCES += \
57 $(DLL_SDK_LIBSDL_SDL)
58 ifdef VBOX_WITH_SECURELABEL
59 bin_SOURCES += \
60 $(DLL_SDK_LIBSDL_SDLTTF)
61 endif
62 ifeq ($(KBUILD_TARGET),os2)
63 bin_SOURCES += \
64 $(DLL_SDK_LIBSDL_FSLIB)
65 endif
66 endif
67endif
68
69
70# The Qt DLLs.
71ifneq ($(VBOX_WITH_QTGUI),)
72 if1of ($(KBUILD_TARGET), win os2)
73 #include $(KBUILD_PATH)/sdks/QT3.kmk
74 #bin_SOURCES += \
75 # $(DLL_SDK_QT3_QT)
76 ifneq ($(strip $(VBOX_DLL_QT)),)
77 bin_SOURCES += \
78 $(VBOX_DLL_QT)=>$(not-dir $(VBOX_DLL_QT))
79 endif
80 ifdef VBOX_QT_BINARIES
81 bin_SOURCES += $(VBOX_QT_BINARIES)
82 endif
83 else ifeq ($(VBOX_MUST_INSTALL_LIB_QT),1)
84 bin_SOURCES += \
85 $(LIB_QT)
86 endif
87endif
88
89
90# The compiler runtime DLLs.
91ifeq ($(KBUILD_TARGET).$(VBOX_WITHOUT_COMPILER_REDIST),win.)
92 ifdef VBOX_USE_VCC80
93 include $(KBUILD_PATH)/tools/VCC80X86.kmk
94 include $(KBUILD_PATH)/tools/VCC80AMD64.kmk
95 bin_SOURCES.x86 += \
96 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
97 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcr80.dll=>Microsoft.VC80.CRT/msvcr80.dll \
98 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcp80.dll=>Microsoft.VC80.CRT/msvcp80.dll \
99 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>testcase/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
100 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcr80.dll=>testcase/Microsoft.VC80.CRT/msvcr80.dll \
101 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcp80.dll=>testcase/Microsoft.VC80.CRT/msvcp80.dll
102 bin_SOURCES.amd64 += \
103 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
104 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcr80.dll=>Microsoft.VC80.CRT/msvcr80.dll \
105 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcp80.dll=>Microsoft.VC80.CRT/msvcp80.dll \
106 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>testcase/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
107 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcr80.dll=>testcase/Microsoft.VC80.CRT/msvcr80.dll \
108 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcp80.dll=>testcase/Microsoft.VC80.CRT/msvcp80.dll
109 endif
110 ifndef VBOX_USE_VCC80
111 VBOX_INSTALL_VCC70_RT = 1
112 endif
113 ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.x86)
114 VBOX_INSTALL_VCC70_RT = 1
115 endif
116 ifdef VBOX_INSTALL_VCC70_RT
117 include $(KBUILD_PATH)/tools/VCC70.kmk
118 ## @todo Move these defines to VCC70.
119 DLL_TOOL_VCC70_MSVCR71 ?= $(PATH_TOOL_VCC70)/bin/msvcr71.dll
120 ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCR71)),)
121 bin_SOURCES += \
122 $(DLL_TOOL_VCC70_MSVCR71)=>msvcr71.dll \
123 $(DLL_TOOL_VCC70_MSVCR71)=>testcase/msvcr71.dll
124 endif
125 DLL_TOOL_VCC70_MSVCP71 ?= $(PATH_TOOL_VCC70)/bin/msvcp71.dll
126 ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCP71)),)
127 bin_SOURCES += \
128 $(DLL_TOOL_VCC70_MSVCP71)=>msvcp71.dll \
129 $(DLL_TOOL_VCC70_MSVCP71)=>testcase/msvcp71.dll
130 endif
131 DLL_TOOL_VCC70_MSVCRT ?= $(PATH_TOOL_VCC70)/bin/msvcrt.dll
132 ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCRT)),)
133 bin_SOURCES += \
134 $(DLL_TOOL_VCC70_MSVCRT)=>msvcrt.dll \
135 $(DLL_TOOL_VCC70_MSVCRT)=>testcase/msvcrt.dll
136 endif
137 endif
138endif
139
140
141#
142# Install additions iso from the build server.
143# The $(CP)/$(RM) stuff can be replaced by a simple $(TOUCH) once that has
144# been added to kBuild.
145#
146## @todo need kmk_builtin_touch!
147ifdef VBOX_WITH_ADDITIONS_FROM_BUILD_SERVER
148INSTALLS += buildserver-additions
149buildserver-additions_INST = $(INST_ADDITIONS)
150buildserver-additions_MODE = 0644
151buildserver-additions_SOURCES = $(PATH_TARGET)/VBoxGuestAdditions.iso
152buildserver-additions_CLEANS = $(PATH_TARGET)/VBoxGuestAdditions.iso $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
153
154$(PATH_TARGET)/VBoxGuestAdditions.iso: $(VBOX_SVN_REV_KMK) $(PATH_DEVTOOLS)/bin/additions.sh | $(call DIRDEP, $(PATH_TARGET))
155 $(RM) -f $(PATH_TARGET)/VBoxGuestAdditions.iso $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
156# $(PATH_DEVTOOLS)/bin/additions.sh --cmd fetch --filename $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
157 $(KMK) --affinity 1 -f $(MAKEFILE) buildserver-additions-affinity-hack
158 $(CP) -f $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp $(PATH_TARGET)/VBoxGuestAdditions.iso
159 $(RM) -f $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
160
161buildserver-additions-affinity-hack:
162 $(SHELL) $(PATH_DEVTOOLS)/bin/additions.sh --cmd fetch --filename $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
163endif
164
165
166#
167#
168# Install documentation files (at the moment the .chm) from the build server.
169# The $(CP)/$(RM) stuff can be replaced by a simple $(TOUCH) once that has
170# been added to kBuild.
171#
172## @todo need kmk_builtin_touch!
173ifdef VBOX_WITH_DOCS_FROM_BUILD_SERVER
174INSTALLS += buildserver-docs
175buildserver-docs_INST = $(INST_BIN)
176buildserver-docs_MODE = 0644
177buildserver-docs_SOURCES = $(PATH_TARGET)/VirtualBox.chm $(PATH_TARGET)/UserManual.pdf
178buildserver-docs_CLEANS = $(PATH_TARGET)/VBoxDocumentation.zip $(PATH_TARGET)/VBoxDocumentation.zip.tmp $(PATH_TARGET)/VirtualBox.chm $(PATH_TARGET)/UserManual.pdf
179
180## @todo including this directly is a hack, but using the tool variables
181# is simply too tempting. Could all go away once we have plain unzip targets.
182include $(KBUILD_PATH)/tools/ZIP.kmk
183
184# Make this a pattern rule to handle multiple targets correctly.
185$(PATH_TARGET)/VirtualBox.chm $(PATH_TARGET)/UserManua%.pdf: $(PATH_TARGET)/VBoxDocumentation.zip
186 $(call MSG_L1,Unpacking documentation)
187 $(QUIET)$(TOOL_ZIP_UNPACK) $(TOOL_ZIP_UNPACKFLAGS) -o $< -d $(PATH_TARGET)
188
189$(PATH_TARGET)/VBoxDocumentation.zip: $(VBOX_SVN_REV_KMK) $(PATH_DEVTOOLS)/bin/documentation.sh | $(call DIRDEP, $(PATH_TARGET))
190 $(RM) -f $(PATH_TARGET)/VBoxDocumentation.zip $(PATH_TARGET)/VBoxDocumentation.zip.tmp
191# $(PATH_DEVTOOLS)/bin/documentation.sh --cmd fetch --filename $(PATH_TARGET)/VBoxDocumentation.zip.tmp
192 $(KMK) --affinity 1 -f $(MAKEFILE) buildserver-documentation-affinity-hack
193 $(CP) -f $(PATH_TARGET)/VBoxDocumentation.zip.tmp $(PATH_TARGET)/VBoxDocumentation.zip
194 $(RM) -f $(PATH_TARGET)/VBoxDocumentation.zip.tmp
195
196buildserver-documentation-affinity-hack:
197 $(SHELL) $(PATH_DEVTOOLS)/bin/documentation.sh --cmd fetch --filename $(PATH_TARGET)/VBoxDocumentation.zip.tmp
198endif
199
200
201#
202# Install staged binaries on platforms where we can't cross
203# compile things.
204#
205ifn1of ($(KBUILD_TARGET), l4 linux win)
206 VBOX_PATH_STAGED ?= .
207
208 # Additions.
209 ifndef VBOX_WITH_LINUX_ADDITIONS
210 ifndef VBOX_WITH_WIN32_ADDITIONS
211 ifneq ($(wildcard $(VBOX_PATH_STAGED)/VBoxGuestAdditions.iso),)
212 INSTALLS += staged-additions
213 staged-additions_INST = $(INST_ADDITIONS)
214 staged-additions_MODE = 0644
215 staged-additions_SOURCES = $(VBOX_PATH_STAGED)/VBoxGuestAdditions.iso
216 endif
217 endif
218 endif
219
220 # guesttool.exe
221 ifndef VBOX_WITH_WIN32_ADDITIONS
222 ifneq ($(wildcard $(VBOX_PATH_STAGED)/guesttool.exe),)
223 INSTALLS += staged-guesttool
224 staged-guesttool_INST = $(INST_BIN)
225 staged-guesttool_SOURCES = $(VBOX_PATH_STAGED)/guesttool.exe
226 endif
227 endif
228
229endif
230
231endif # !VBOX_ONLY_ADDITIONS
232
233
234include $(KBUILD_PATH)/subfooter.kmk
235
236
237#
238# Generate documentation.
239# (This should be converted into a separate pass or merged with an existing one later.)
240#
241docs: $(if $(VBOX_WITH_ALL_DOXYGEN_TARGETS),docs.Core)
242 $(KMK) -C src/VBox/Main docs
243ifdef VBOX_WITH_ALL_DOXYGEN_TARGETS
244 $(KMK) -C src/VBox/Runtime docs
245endif
246
247docs.Core: $(PATH_TARGET)/docs.Core
248
249
250
251#
252# The core (VMM+REM+Devices+Main) documentation.
253#
254# This includes so much because we wish to have the complete CFGM
255# and GCFGM lists.
256#
257OTHER_CLEAN += \
258 $(PATH_TARGET)/Doxyfile.Core \
259 $(PATH_TARGET)/Doxyfile.Core.dep
260
261VBOX_CORE_DOXYFILE_INPUT_DIRS = \
262 include/iprt \
263 include/VBox \
264 include/VBox/com \
265 include/VBox/HostServices \
266 src/VBox/VMM \
267 src/VBox/VMM/VMMR0 \
268 src/VBox/VMM/VMMGC \
269 src/VBox/VMM/VMMAll \
270 src/VBox/VMM/PATM \
271 src/VBox/VMM/PATM/VMMR0 \
272 src/VBox/VMM/PATM/VMMGC \
273 src/VBox/VMM/PATM/VMMAll \
274 src/VBox/VMM/VMMSwitcher \
275 src/VBox/Debugger \
276 src/VBox/Devices \
277 src/VBox/Devices/Audio \
278 src/VBox/Devices/Bus \
279 src/VBox/Devices/Graphics \
280 src/VBox/Devices/Graphics/BIOS \
281 src/VBox/Devices/Input \
282 src/VBox/Devices/Networking \
283 src/VBox/Devices/PC \
284 src/VBox/Devices/PC/BIOS \
285 src/VBox/Devices/Parallel \
286 src/VBox/Devices/Serial \
287 src/VBox/Devices/Storage \
288 src/VBox/Devices/VBoxHDDFormats \
289 src/VBox/Devices/VBoxHDDFormats/StorageCraft \
290 src/VBox/Devices/USB \
291 src/VBox/Devices/USB/darwin \
292 src/VBox/Devices/USB/linux \
293 src/VBox/Devices/USB/os2 \
294 src/VBox/Devices/USB/solaris \
295 src/VBox/Devices/USB/vrdp \
296 src/VBox/Devices/USB/win32 \
297 src/VBox/Devices/VMMDev \
298 src/VBox/Main/include \
299 src/VBox/Main/include/hgcm \
300 src/VBox/Main \
301 src/VBox/Main/glue \
302 src/VBox/Main/hgcm \
303 src/VBox/Main/webservice \
304 src/VBox/Main/xml \
305 src/VBox/Main/darwin \
306 src/VBox/Main/linux \
307 src/VBox/Main/os2 \
308 src/VBox/Main/solaris \
309 src/VBox/Main/win \
310 src/VBox/Main/xpcom \
311 src/VBox/HostServices \
312 src/VBox/HostServices/SharedClipboard \
313 src/VBox/HostServices/SharedFolders \
314 src/VBox/HostServices/SharedInfoServices \
315 src/VBox/HostServices/SharedOpenGL \
316 src/VBox/HostDrivers/Support \
317 src/VBox/HostDrivers/Support/darwin \
318 src/VBox/HostDrivers/Support/freebsd \
319 src/VBox/HostDrivers/Support/l4 \
320 src/VBox/HostDrivers/Support/linux \
321 src/VBox/HostDrivers/Support/os2 \
322 src/VBox/HostDrivers/Support/solaris \
323 src/VBox/HostDrivers/Support/win \
324 src/VBox/HostDrivers/VBoxNetFlt \
325 src/VBox/HostDrivers/VBoxNetFlt/darwin \
326 src/VBox/HostDrivers/VBoxNetFlt/linux \
327 src/VBox/HostDrivers/VBoxNetFlt/solaris \
328 src/VBox/HostDrivers/VBoxNetFlt/win \
329 src/VBox/HostDrivers/VBoxNetNat \
330 src/VBox/HostDrivers/VBoxNetNat/darwin \
331 src/VBox/HostDrivers/VBoxNetNat/linux \
332 src/VBox/HostDrivers/VBoxNetNat/solaris \
333 src/VBox/HostDrivers/VBoxNetNat/win \
334 src/VBox/HostDrivers/VBoxNetTap \
335 src/VBox/HostDrivers/VBoxNetTap/darwin \
336 src/VBox/HostDrivers/VBoxNetTap/linux \
337 src/VBox/HostDrivers/VBoxNetTap/solaris \
338 src/VBox/HostDrivers/VBoxNetTap/win \
339 src/VBox/HostDrivers/VBoxTAP \
340 src/VBox/HostDrivers/VBoxTAP/win \
341 src/VBox/HostDrivers/VBoxUSB \
342 src/VBox/HostDrivers/VBoxUSB/darwin \
343 src/VBox/HostDrivers/VBoxUSB/os2 \
344 src/VBox/HostDrivers/VBoxUSB/solaris \
345 src/VBox/HostDrivers/VBoxUSB/win \
346 src/VBox/HostDrivers/VBoxUSB/win/Device \
347 src/VBox/HostDrivers/VBoxUSB/win/Device/amd64 \
348 src/VBox/HostDrivers/VBoxUSB/win/Device/x86 \
349 src/VBox/HostDrivers/VBoxUSB/win/Filter \
350 src/VBox/HostDrivers/VBoxUSB/win/Install \
351 src/VBox/HostDrivers/VBoxUSB/win/Monitor \
352 src/VBox/HostDrivers/VBoxUSB/win/Monitor/win32 \
353 src/VBox/HostDrivers/VBoxUSB/win/Monitor/win64 \
354 src/VBox/HostDrivers/VBoxUSB/win/usbd \
355
356# These must come first in order to make things look nice.
357VBOX_CORE_DOXYFILE_INPUT_FIRST =\
358 $(PATH_ROOT)/doc/VBox-doc.c \
359 $(PATH_ROOT)/doc/VBox-CodingGuidelines.cpp \
360 $(PATH_ROOT)/src/VBox/VMM/VMMCodingGuidelines.cpp \
361 $(PATH_ROOT)/src/VBox/VMM/VMMDocsRawMode.cpp \
362 $(PATH_ROOT)/include/VBox/cdefs.h \
363 $(PATH_ROOT)/include/VBox/vmapi.h \
364 $(PATH_ROOT)/include/VBox/vmm.h \
365 $(PATH_ROOT)/include/VBox/cpum.h \
366 $(PATH_ROOT)/include/VBox/mm.h \
367 $(PATH_ROOT)/include/VBox/pgm.h \
368 $(PATH_ROOT)/include/VBox/selm.h \
369 $(PATH_ROOT)/include/VBox/trpm.h \
370 $(PATH_ROOT)/include/VBox/patm.h \
371 $(PATH_ROOT)/include/VBox/dbgf.h \
372 $(PATH_ROOT)/include/VBox/stam.h \
373 $(PATH_ROOT)/include/VBox/em.h \
374 $(PATH_ROOT)/include/VBox/pdm.h \
375 $(PATH_ROOT)/include/VBox/rem.h \
376 $(PATH_ROOT)/include/VBox/iom.h \
377 $(PATH_ROOT)/include/VBox/cfgm.h \
378 $(PATH_ROOT)/include/VBox/tm.h \
379 $(PATH_ROOT)/include/VBox/csam.h \
380 $(PATH_ROOT)/include/VBox/ssm.h \
381 $(PATH_ROOT)/include/VBox/hwaccm.h \
382 $(PATH_ROOT)/include/VBox/hwacc_svm.h \
383 $(PATH_ROOT)/include/VBox/hwacc_vmx.h \
384 \
385 $(PATH_ROOT)/src/VBox/VMM/CFGMInternal.h \
386 $(PATH_ROOT)/src/VBox/VMM/CPUMInternal.h \
387 $(PATH_ROOT)/src/VBox/VMM/DBGFInternal.h \
388 $(PATH_ROOT)/src/VBox/VMM/EMInternal.h \
389 $(PATH_ROOT)/src/VBox/VMM/HWACCMInternal.h \
390 $(PATH_ROOT)/src/VBox/VMM/IOMInternal.h \
391 $(PATH_ROOT)/src/VBox/VMM/MMInternal.h \
392 $(PATH_ROOT)/src/VBox/VMM/PDMInternal.h \
393 $(PATH_ROOT)/src/VBox/VMM/PGMInternal.h \
394 $(PATH_ROOT)/src/VBox/VMM/PATM/CSAMInternal.h \
395 $(PATH_ROOT)/src/VBox/VMM/PATM/PATMInternal.h \
396 $(PATH_ROOT)/src/VBox/VMM/REMInternal.h \
397 $(PATH_ROOT)/src/VBox/VMM/SELMInternal.h \
398 $(PATH_ROOT)/src/VBox/VMM/SSMInternal.h \
399 $(PATH_ROOT)/src/VBox/VMM/STAMInternal.h \
400 $(PATH_ROOT)/src/VBox/VMM/TMInternal.h \
401 $(PATH_ROOT)/src/VBox/VMM/TRPMInternal.h \
402 $(PATH_ROOT)/src/VBox/VMM/VMInternal.h \
403 $(PATH_ROOT)/src/VBox/VMM/VMMInternal.h \
404 \
405 $(PATH_ROOT)/include/VBox/vm.h \
406 \
407 $(PATH_ROOT)/include/VBox/sup.h \
408 $(PATH_ROOT)/include/VBox/VBoxHDD.h \
409 $(PATH_ROOT)/include/VBox/types.h \
410 $(PATH_ROOT)/include/VBox/err.h \
411 $(PATH_ROOT)/include/VBox/x86.h \
412 $(PATH_ROOT)/include/VBox/cpumdis.h \
413 $(PATH_ROOT)/include/VBox/dbggui.h \
414 $(PATH_ROOT)/include/VBox/dis.h \
415 $(PATH_ROOT)/include/VBox/disopcode.h \
416 $(PATH_ROOT)/include/VBox/intnet.h \
417 $(PATH_ROOT)/include/VBox/settings.h \
418 $(PATH_ROOT)/include/VBox/pci.h \
419 $(PATH_ROOT)/include/VBox/scsi.h \
420 $(PATH_ROOT)/include/VBox/shflsvc.h \
421 $(PATH_ROOT)/include/VBox/hgcmsvc.h \
422 $(PATH_ROOT)/include/VBox/usb.h \
423 $(PATH_ROOT)/include/VBox/vusb.h \
424 \
425 $(PATH_ROOT)/include/VBox/log.h \
426 $(PATH_ROOT)/include/VBox/param.h \
427 $(PATH_ROOT)/include/VBox/version.h
428
429VBOX_CORE_DOXYFILE_INPUT := \
430 $(filter-out %.cpp.h, $(sort $(wildcard $(addsuffix /*.h, $(VBOX_CORE_DOXYFILE_INPUT_DIRS)))) ) \
431 $(foreach dir, $(VBOX_CORE_DOXYFILE_INPUT_DIRS), $(wildcard $(dir)/*.cpp $(dir)/*.c $(dir)/.asm))
432VBOX_CORE_DOXYFILE_INPUT := \
433 $(VBOX_CORE_DOXYFILE_INPUT_FIRST) \
434 $(filter-out $(VBOX_CORE_DOXYFILE_INPUT_FIRST), $(VBOX_CORE_DOXYFILE_INPUT))
435
436# And some some additional stuff.
437VBOX_CORE_DOXYFILE_INPUT += \
438 $(PATH_ROOT)/src/recompiler/VBoxRecompiler.c \
439 $(PATH_ROOT)/src/recompiler/VBoxREMWrapper.cpp
440
441
442VBOX_CORE_DOXYFILE_OUTPUT = $(PATH_OUT)/docs/Core
443
444-include $(PATH_TARGET)/Doxyfile.Core.dep
445
446# Generate the Doxyfile
447$(PATH_TARGET)/Doxyfile.Core: Doxyfile.Core \
448 $(comp-vars VBOX_CORE_DOXYFILE_INPUT,DOXYGEN_INPUT_PREV,FORCE) \
449 $(comp-vars VBOX_CORE_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE) \
450 | $(call DIRDEP, $(PATH_TARGET))
451 $(RM) -f $@ $@.tmp $(PATH_TARGET)/Doxyfile.Core.dep
452 $(CP) -f Doxyfile.Core $@.tmp
453 $(APPEND) $@.tmp
454 $(APPEND) $@.tmp "OUTPUT_DIRECTORY = $(VBOX_CORE_DOXYFILE_OUTPUT)"
455 $(APPEND) $@.tmp "WARN_LOGFILE = $(VBOX_CORE_DOXYFILE_OUTPUT)/errors"
456 $(APPEND) $@.tmp "INCLUDE_PATH = $(PATH_ROOT)/include $(PATH_ROOT)/src/VBox/VMM $(PATH_ROOT)/src/VBox/Main/include "
457 $(APPEND) $@.tmp "INCLUDE_FILE_PATTERNS = *.cpp.h"
458 $(APPEND) $@.tmp
459 $(APPEND) $@.tmp "INPUT = $(VBOX_CORE_DOXYFILE_INPUT)"
460 $(APPEND) $@.tmp
461 $(APPEND) $@.tmp "PREDEFINED += $(DEFS) $(DEFS.$(KBUILD_TARGET)) $(DEFS.$(KBUILD_TARGET_ARCH)) $(ARCH_BITS_DEFS)"
462 $(APPEND) $@.tmp "PREDEFINED += ARCH_BITS=HC_ARCH_BITS R3_ARCH_BITS=HC_ARCH_BITS R0_ARCH_BITS=HC_ARCH_BITS "
463 $(APPEND) $@.tmp
464 $(MV) -f $@.tmp $@
465 @$(APPEND) $(PATH_TARGET)/Doxyfile.Core.dep "DOXYGEN_OUTPUT_PREV = $(VBOX_CORE_DOXYFILE_OUTPUT)"
466 @$(APPEND) $(PATH_TARGET)/Doxyfile.Core.dep "DOXYGEN_INPUT_PREV = $(VBOX_CORE_DOXYFILE_INPUT)"
467
468# Create the output directory.
469$(call DIRDEP, $(VBOX_CORE_DOXYFILE_OUTPUT)):
470 $(MKDIR) -p $@
471
472# Do the actual job.
473$(PATH_TARGET)/docs.Core: $(PATH_TARGET)/Doxyfile.Core $(VBOX_CORE_DOXYFILE_INPUT) | $(call DIRDEP, $(VBOX_CORE_DOXYFILE_OUTPUT))
474 $(RM) -f $(PATH_TARGET)/docs.Core
475 $(RM) -Rf $(VBOX_CORE_DOXYFILE_OUTPUT)/html/
476 doxygen $(PATH_TARGET)/Doxyfile.Core
477 $(APPEND) $(PATH_TARGET)/docs.Core
478
479
480#
481# Generate x86.mac and err.mac.
482#
483incs:
484 $(SED) -f include/VBox/err.sed --output include/VBox/err.mac include/VBox/err.h
485 $(APPEND) include/VBox/err.mac '%include "iprt/err.mac"'
486 $(SED) -f include/VBox/err.sed --output include/iprt/err.mac include/iprt/err.h
487 $(SED) \
488 -e '/__VBox_x86_h__/d' \
489 -e '/#define/!d' \
490 -e '/\\$$/d' \
491 -e 's/#define/%define/' \
492 --output include/VBox/x86.mac \
493 include/VBox/x86.h
494
495
496#
497# Generate Visual SlickEdit tagging #defines.
498#
499vslick.h: include/VBox/cdefs.h include/iprt/cdefs.h $(MAKEFILE)
500 $(RM) -f -- $@ $@.tmp $@.tmp2 $@.tmp3
501 $(APPEND) $@.tmp '// autogenerated'
502 #@$(APPEND) $@.tmp '#define __BEGIN_DECLS '
503 #@$(APPEND) $@.tmp '#define __END_DECLS '
504
505 @$(APPEND) $@.tmp '#define ATL_NO_VTABLE '
506 @$(APPEND) $@.tmp '#define BEGIN_COM_MAP(a) '
507 @$(APPEND) $@.tmp '#define END_COM_MAP(a) '
508
509 @$(APPEND) $@.tmp '#define CHECKREADY if(!isReady()) return E_UNEXPECTED; '
510 @$(APPEND) $@.tmp '#define COM_DECL_READONLY_ENUM_AND_COLLECTION(a) '
511 @$(APPEND) $@.tmp '#define COM_INTERFACE_ENTRY(a) '
512 @$(APPEND) $@.tmp '#define COMGETTER(n) Get##n '
513 @$(APPEND) $@.tmp '#define COMSETTER(n) Set##n '
514 @$(APPEND) $@.tmp '#define ComSafeArrayIn(t,a) t a[] '
515 @$(APPEND) $@.tmp '#define ComSafeArrayOut(t,a) t * a[] '
516 @$(APPEND) $@.tmp '#define DECLARE_NOT_AGGREGATABLE(a) '
517 @$(APPEND) $@.tmp '#define DECLARE_PROTECT_FINAL_CONSTRUCT(a) '
518 @$(APPEND) $@.tmp '#define NS_DECL_ISUPPORTS '
519 @$(APPEND) $@.tmp '#define NS_IMETHOD NS_IMETHOD_(nsresult) '
520 @$(APPEND) $@.tmp '#define NS_IMETHOD_(type) type '
521 @$(APPEND) $@.tmp '#define PARSERS_EXPORT '
522 @$(APPEND) $@.tmp '#define STDMETHOD(a) NS_IMETHOD a '
523
524 @$(APPEND) $@.tmp '#define CTX_SUFF(var) var##R3 '
525 @$(APPEND) $@.tmp '#define CTXAllSUFF(var) var##R3 '
526 @$(APPEND) $@.tmp '#define CTXSUFF(var) var##HC '
527 @$(APPEND) $@.tmp '#define OTHERCTXSUFF(var) var##GC '
528 @$(APPEND) $@.tmp '#define CTXALLMID(first, last) first##R3##last '
529 @$(APPEND) $@.tmp '#define CTXMID(first, last) first##HC##last '
530 @$(APPEND) $@.tmp '#define OTHERCTXMID(first, last) first##GC##last '
531 @$(APPEND) $@.tmp '#define CTXTYPE(GCType, R3Type, R0Type) R3Type '
532 @$(APPEND) $@.tmp '#define RCTYPE(RCType, HCType) RCType '
533 @$(APPEND) $@.tmp '#define GCTYPE(GCType, HCType) GCType '
534 @$(APPEND) $@.tmp '#define RCPTRTYPE(RCType) RCType '
535 @$(APPEND) $@.tmp '#define GCPTRTYPE(GCType) GCType '
536 @$(APPEND) $@.tmp '#define HCPTRTYPE(HCType) HCType '
537 @$(APPEND) $@.tmp '#define R3R0PTRTYPE(HCType) HCType '
538 @$(APPEND) $@.tmp '#define R0PTRTYPE(R3Type) R3Type '
539 @$(APPEND) $@.tmp '#define R3PTRTYPE(R0Type) R0Type '
540 @$(APPEND) $@.tmp '#define RT_SRC_POS __FILE__, __LINE__, __PRETTY_FUNCTION__ '
541 @$(APPEND) $@.tmp '#define RT_SRC_POS_DECL const char *pszFile, unsigned iLine, const char *pszFunction '
542 @$(APPEND) $@.tmp '#define RT_SRC_POS_ARGS pszFile, iLine, pszFunction '
543 @$(APPEND) $@.tmp '#define RTCALL'
544 @$(APPEND) $@.tmp '#define DECLINLINE(type) inline type '
545
546 @$(APPEND) $@.tmp '#define PDMDEVINSINT_DECLARED 1'
547 @$(APPEND) $@.tmp '#define VBOXCALL'
548
549 $(SED) -e '/__cdecl/d' \
550 -e '/^ *# *define.*DECL/!d' \
551 -e '/DECLS/d' \
552 -e '/DECLARE_CLS_/d' \
553 -e '/_SRC_POS_DECL/d' \
554 -e '/declspec/d' \
555 -e '/__attribute__/d' \
556 -e 's/# */#/g' \
557 -e 's/ */ /g' \
558 -e '/(type) DECLEXPORT/d' \
559 -e '/ DECLEXPORT_CLASS/d' \
560 -e 's/ *VBOXCALL//' \
561 -e 's/ *RTCALL//' \
562 -e 's/(type) DECLIMPORT(type)/(type) type/' \
563 -e '/ DECLASM(type) type/d' \
564 -e '/define *DECL..CALLBACKMEMBER(type[^)]*) *RT/d' \
565 -e '/define *DECLINLINE(type)/d' \
566 -e '/define RT[DATGRC03]*DECL(type) *DECLHIDDEN(type)/d' \
567 \
568 --append $@.tmp \
569 $(filter-out include/VBox/err.h, $(wildcard include/VBox/*.h)) \
570 include/iprt/cdefs.h
571 $(CAT_EXT) $@.tmp | sort | $(SED_EXT) -e 's/$$/\n/' --output $@.tmp2
572 $(MV) -f $@.tmp2 $@
573 $(RM) -f $@.tmp $@.tmp2 $@.tmp3
574ifeq ($(KBUILD_HOST),win)
575 @$(ECHO) 'TODO: Merge vslick.h with your "$(HOMEDRIVE)$(HOMEPATH)\Documents\My SlickEdit Config\x.y.z\usercpp.h" file.'
576else
577 @$(ECHO) "TODO: Merge ./vslick.h with your ~/.slickedit/x.y.z/unxcpp.h file."
578endif
579
580
581#
582# Add fetching of the tools to the 'up[date][2]' targets.
583#
584up update up2 update2::
585ifndef VBOX_OSE
586 $(MAKE) -C tools fetch
587else
588 $(MAKE) -C tools -f Makefile-ose.kmk fetch
589endif
590
591
592#
593# Build the additions, all of them.
594#
595# This is currently tailored (hardcoded) for the additions
596# build box. Can make it pretty and configurable later.
597#
598# The fetching must be done in serial fashion, while the building
599# should be more flexible wrt to -jN.
600#
601additions-fetch:
602 + $(KMK) -C tools fetch
603 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=linux BUILD_TARGET_ARCH=x86 BUILD_TARGET=linux
604# + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=os2 BUILD_TARGET_ARCH=x86 BUILD_TARGET=os2
605 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=solaris BUILD_TARGET_ARCH=x86 BUILD_TARGET=solaris
606 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=win BUILD_TARGET_ARCH=x86 BUILD_TARGET=win
607
608
609additions-build: \
610 additions-build-win.x86 \
611 additions-build-solaris.x86 \
612 additions-build-os2.x86 \
613 additions-build-linux.x86
614
615VBOX_ADDITIONS_BUILD.amd64 = VBOX_ONLY_ADDITIONS=1 VBOX_WITHOUT_ADDITIONS_ISO=1 \
616 KBUILD_TYPE=$(KBUILD_TYPE) BUILD_TYPE=$(KBUILD_TYPE) \
617 KBUILD_TARGET_ARCH=amd64 BUILD_TARGET_ARCH=amd64 \
618 VBOX_SVN_REV=$(VBOX_SVN_REV) \
619 all packing
620
621VBOX_ADDITIONS_BUILD.x86 = VBOX_ONLY_ADDITIONS=1 VBOX_WITHOUT_ADDITIONS_ISO=1 \
622 KBUILD_TYPE=$(KBUILD_TYPE) BUILD_TYPE=$(KBUILD_TYPE) \
623 KBUILD_TARGET_ARCH=x86 BUILD_TARGET_ARCH=x86 \
624 VBOX_SVN_REV=$(VBOX_SVN_REV) \
625 all packing
626
627additions-build-win.amd64:
628ifeq ($(KBUILD_TARGET),win)
629 + $(KMK) $(VBOX_ADDITIONS_BUILD.amd64)
630else
631 false
632 rsync -av --delete --delete-excluded --exclude .svn/ --exclude out/ --exclude tinderclient.log . 192.168.27.5:/cygdrive/c/vbox
633 ssh vbox@192.168.27.15 " cd /cygdrive/c/vbox && PATH_OUT_BASE=Z:/add/out tools/env.sh kmk $(VBOX_ADDITIONS_BUILD.amd64)"
634# ssh vbox@192.168.27.15 "cmd.exe /c cd /d z:\\add && set PATH_DEVTOOLS=c:\\vbox\\tools && c:\\vbox\\tools\\env.cmd -KBUILD c:\\vbox\\kBuild && set KMK_DONT_USE_NT_QUERY_INFORMATION_FILE=1 && set USER=vbox && kmk $(VBOX_ADDITIONS_BUILD.amd64)"
635endif
636
637additions-build-win.x86:
638ifeq ($(KBUILD_TARGET),win)
639 + $(KMK) $(VBOX_ADDITIONS_BUILD.x86)
640else
641 rsync -av --delete --delete-excluded --exclude .svn/ --exclude out/ --exclude tinderclient.log . 192.168.27.5:/cygdrive/c/vbox
642 ssh vbox@192.168.27.5 " cd /cygdrive/c/vbox && PATH_OUT_BASE=Z:/add/out tools/env.sh kmk $(VBOX_ADDITIONS_BUILD.x86)"
643# ssh vbox@192.168.27.5 "cmd.exe /c cd /d z:\\add && set PATH_DEVTOOLS=c:\\vbox\\tools && c:\\vbox\\tools\\env.cmd -KBUILD c:\\vbox\\kBuild && set KMK_DONT_USE_NT_QUERY_INFORMATION_FILE=1 && set USER=vbox && kmk $(VBOX_ADDITIONS_BUILD.x86)"
644endif
645
646additions-build-solaris.amd64:
647ifeq ($(KBUILD_TARGET),solaris)
648 + $(KMK) $(VBOX_ADDITIONS_BUILD.amd64)
649else
650 ssh vbox@192.168.27.14 " cd /mnt/vbox/add && ./tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.amd64) "
651endif
652
653additions-build-solaris.x86:
654ifeq ($(KBUILD_TARGET),solaris)
655 + $(KMK) $(VBOX_ADDITIONS_BUILD.x86)
656else
657 ssh vbox@192.168.27.4 " cd /mnt/vbox/add && ./tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.x86) "
658endif
659
660additions-build-os2.x86:
661#ifeq ($(KBUILD_TARGET),os2)
662# + $(KMK) $(VBOX_ADDITIONS_BUILD.x86)
663#else
664# ssh vbox@192.168.27.3 " cd /mnt/vbox/add && ./tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.x86) "
665#endif
666
667additions-build-linux.amd64:
668ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),linux.amd64)
669 + $(KMK) $(VBOX_ADDITIONS_BUILD.amd64)
670else
671 ssh vbox@192.168.27.12 " cd /mnt/vbox/add && ./tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.amd64) "
672endif
673
674additions-build-linux.x86:
675ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),linux.x86)
676 + $(KMK) $(VBOX_ADDITIONS_BUILD.x86)
677else
678 ssh vbox@192.168.27.2 " cd /mnt/vbox/add && ./tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.x86) "
679endif
680
681
682additions-packing:
683 + $(KMK) VBOX_ONLY_ADDITIONS=1 \
684 VBOX_WITH_ADDITIONS_ISO.freebsd.amd64= \
685 VBOX_WITH_ADDITIONS_ISO.freebsd.x86= \
686 VBOX_WITH_ADDITIONS_ISO.linux.amd64= \
687 VBOX_WITH_ADDITIONS_ISO.linux.x86=1 \
688 VBOX_WITH_ADDITIONS_ISO.solaris.amd64= \
689 VBOX_WITH_ADDITIONS_ISO.solaris.x86=1 \
690 VBOX_WITH_ADDITIONS_ISO.win.amd64= \
691 VBOX_WITH_ADDITIONS_ISO.win.x86=1 \
692 -C src/VBox/Additions \
693 $(VBOX_PATH_ADDITIONS)/VBoxGuestAdditions.iso
694
695
696#
697# Generate VirtualBox-OSE-x.x.x.tar.bz2 tarballs for distribution
698#
699# - includes kBuild
700# - must be executed on an OSE checkout
701#
702
703# the path where to store the tarball
704TARBALLPATH ?= $(shell cd $(PATH_ROOT)/..; pwd)
705#TARBALLPATH ?= $(abspath $(PATH_ROOT)/..) - this should also do the trick without spawning a shell.
706# the root directory inside the tarball
707TARBALLROOT ?= VirtualBox-$(VBOX_VERSION_STRING)
708# the name of the tarball file
709TARBALLNAME ?= VirtualBox-$(VBOX_VERSION_STRING).tar.bz2
710snapshot:
711 @$(call MSG_L1,Creating tarball $(TARBALLPATH)/$(TARBALLNAME))
712 @if [ -d "$(PATH_ROOT)/src/VBox/Devices/USB" ]; then echo; echo "Found USB stuff, refused to build OSE tarball!"; echo; exit 1; fi
713 $(QUIET)$(MKDIR) -p $(TARBALLPATH)
714 $(QUIET)$(RM) -f $(wildcard $(TARBALLPATH)/VirtualBox*)
715 $(QUIET)$(LN_SYMLINK) $(PATH_ROOT) $(TARBALLPATH)/$(TARBALLROOT)
716 $(QUIET)tar -cjh --owner 0 --group 0 --totals \
717 --exclude=.svn \
718 --exclude=$(TARBALLROOT)/out \
719 --exclude=$(TARBALLROOT)/env.sh \
720 --exclude=$(TARBALLROOT)/configure.log \
721 --exclude=$(TARBALLROOT)/AutoConfig.kmk \
722 --exclude=$(TARBALLROOT)/LocalConfig.kmk \
723 -C $(TARBALLPATH) \
724 -f $(TARBALLPATH)/$(TARBALLNAME) \
725 $(TARBALLROOT)
726 $(QUIET)$(RM) $(TARBALLPATH)/$(TARBALLROOT)
727
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