VirtualBox

source: vbox/trunk/Makefile.kmk@ 12563

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

Fix fetching/unpacking of documentation in parallel builds.

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