VirtualBox

source: vbox/trunk/Makefile.kmk@ 24819

Last change on this file since 24819 was 24819, checked in by vboxsync, 15 years ago

fix burns

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 38.0 KB
Line 
1# $Id: Makefile.kmk 24819 2009-11-20 10:32:30Z 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
41#
42# Clean up global stuff that Config.kmk generates.
43#
44OTHER_CLEAN += \
45 $(VBOX_PACKAGE_HEADER) \
46 $(VBOX_LICENSE_VER_KMK) \
47 $(VBOX_VERSION_MK) \
48 $(VBOX_VERSION_HEADER) \
49 $(VBOX_VERSION_STAMP) \
50 $(wildcard $(PATH_OUT)/version-stamp-*.*.*) \
51 $(VBOX_SVN_REV_KMK).ts \
52 $(VBOX_SVN_REV_KMK) \
53 $(PATH_OUT)/GCCConfig.kmk
54
55
56ifndef VBOX_ONLY_DOCS
57ifndef VBOX_ONLY_ADDITIONS
58
59ifndef VBOX_OSE
60 #
61 # Install the license (and misc non-executable stuff).
62 #
63 INSTALLS += nobin
64 nobin_INST = $(INST_BIN)
65 nobin_MODE = 0644
66 nobin_SOURCES =
67 ifdef VBOX_LICENSE_FILES
68 nobin_SOURCES += \
69 $(VBOX_BRAND_LICENSE_HTML)=>License-$(VBOX_LICENSE_VER).html \
70 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES),$(VBOX_BRAND_$(f)_LICENSE_HTML)=>License-$(VBOX_LICENSE_VER)-$(f).html)
71 endif
72endif # !OSE
73
74
75#
76# Install external binaries (mostly redistributable parts of tools we use).
77# This must be done *before* we build the manual.
78#
79# To avoid dragging in unnecessary tools and sdks here, we don't use the .win
80# and .linux property suffixes.
81#
82INSTALLS += bin
83
84bin_INST = $(INST_BIN)
85
86# The SDL DLLs
87if1of ($(KBUILD_TARGET), win os2)
88 ifneq ($(VBOX_WITH_VBOXSDL)$(VBOX_WITH_VBOXBFE),)
89 include $(KBUILD_PATH)/sdks/LIBSDL.kmk
90 bin_SOURCES += \
91 $(DLL_SDK_LIBSDL_SDL)
92 ifdef VBOX_WITH_SECURELABEL
93 bin_SOURCES += \
94 $(DLL_SDK_LIBSDL_SDLTTF)
95 endif
96 ifeq ($(KBUILD_TARGET),os2)
97 bin_SOURCES += \
98 $(DLL_SDK_LIBSDL_FSLIB)
99 endif
100 endif
101endif
102
103
104# The compiler runtime DLLs.
105ifeq ($(KBUILD_TARGET).$(VBOX_WITHOUT_COMPILER_REDIST),win.)
106 ifdef VBOX_USE_VCC80
107 include $(KBUILD_PATH)/tools/VCC80X86.kmk
108 include $(KBUILD_PATH)/tools/VCC80AMD64.kmk
109 bin_SOURCES.x86 += \
110 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
111 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcr80.dll=>Microsoft.VC80.CRT/msvcr80.dll \
112 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcp80.dll=>Microsoft.VC80.CRT/msvcp80.dll \
113 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>testcase/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
114 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcr80.dll=>testcase/Microsoft.VC80.CRT/msvcr80.dll \
115 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcp80.dll=>testcase/Microsoft.VC80.CRT/msvcp80.dll
116 bin_SOURCES.amd64 += \
117 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
118 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcr80.dll=>Microsoft.VC80.CRT/msvcr80.dll \
119 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcp80.dll=>Microsoft.VC80.CRT/msvcp80.dll \
120 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>testcase/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
121 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcr80.dll=>testcase/Microsoft.VC80.CRT/msvcr80.dll \
122 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcp80.dll=>testcase/Microsoft.VC80.CRT/msvcp80.dll
123 endif
124 ifndef VBOX_USE_VCC80
125 VBOX_INSTALL_VCC70_RT = 1
126 endif
127 ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.x86)
128 VBOX_INSTALL_VCC70_RT = 1
129 endif
130 ifdef VBOX_INSTALL_VCC70_RT
131 include $(KBUILD_PATH)/tools/VCC70.kmk
132 ## @todo Move these defines to VCC70.
133 DLL_TOOL_VCC70_MSVCR71 ?= $(PATH_TOOL_VCC70)/bin/msvcr71.dll
134 ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCR71)),)
135 bin_SOURCES += \
136 $(DLL_TOOL_VCC70_MSVCR71)=>msvcr71.dll \
137 $(DLL_TOOL_VCC70_MSVCR71)=>testcase/msvcr71.dll
138 endif
139 DLL_TOOL_VCC70_MSVCP71 ?= $(PATH_TOOL_VCC70)/bin/msvcp71.dll
140 ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCP71)),)
141 bin_SOURCES += \
142 $(DLL_TOOL_VCC70_MSVCP71)=>msvcp71.dll \
143 $(DLL_TOOL_VCC70_MSVCP71)=>testcase/msvcp71.dll
144 endif
145 DLL_TOOL_VCC70_MSVCRT ?= $(PATH_TOOL_VCC70)/bin/msvcrt.dll
146 ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCRT)),)
147 bin_SOURCES += \
148 $(DLL_TOOL_VCC70_MSVCRT)=>msvcrt.dll \
149 $(DLL_TOOL_VCC70_MSVCRT)=>testcase/msvcrt.dll
150 endif
151 endif
152endif
153
154
155ifdef VBOX_WITH_QT4_SUN
156#
157# Install our Qt DLLs / Shared Objects / Frameworks.
158# Note: The installer fixes the darwin .dylibs when hardening is enabled.
159#
160 INSTALLS += qt4-bin
161 qt4-bin_MODE = 755
162 ifeq ($(KBUILD_TARGET),darwin)
163 qt4-bin_INST = $(INST_VIRTUALBOX)Contents/
164 qt4-bin_SOURCES = $(foreach qtmod, QtCore QtGui QtNetwork $(if $(VBOX_GUI_USE_QGL), QtOpenGL,) \
165 ,$(VBOX_PATH_QT4)/Frameworks/$(qtmod)VBox.framework/Versions/4/$(qtmod)VBox=>Frameworks/$(qtmod)VBox.framework/Versions/4/$(qtmod)VBox)
166 ifdef VBOX_WITH_COCOA_QT
167 qt4-bin_SOURCES += \
168 $(VBOX_PATH_QT4)/Frameworks/QtGuiVBox.framework/Versions/4/Resources/qt_menu.nib/classes.nib=>Frameworks/QtGuiVBox.framework/Versions/4/Resources/qt_menu.nib/classes.nib \
169 $(VBOX_PATH_QT4)/Frameworks/QtGuiVBox.framework/Versions/4/Resources/qt_menu.nib/info.nib=>Frameworks/QtGuiVBox.framework/Versions/4/Resources/qt_menu.nib/info.nib \
170 $(VBOX_PATH_QT4)/Frameworks/QtGuiVBox.framework/Versions/4/Resources/qt_menu.nib/keyedobjects.nib=>Frameworks/QtGuiVBox.framework/Versions/4/Resources/qt_menu.nib/keyedobjects.nib
171 endif
172 qt4-bin_SOURCES += \
173 $(VBOX_PATH_QT4)/plugins/accessible/libqtaccessiblewidgets.dylib=>MacOS/accessible/libqtaccessiblewidgets.dylib
174 qt4-bin_SYMLINKS = $(foreach qtmod, QtCore QtGui QtNetwork $(if $(VBOX_GUI_USE_QGL), QtOpenGL,) \
175 ,Frameworks/$(qtmod)VBox.framework/$(qtmod)VBox=>Versions/4/$(qtmod)VBox)
176 ifdef VBOX_WITH_COCOA_QT
177 qt4-bin_SYMLINKS += \
178 Frameworks/QtGuiVBox.framework/Resources=>Versions/4/Resources/
179 endif
180 else ifeq ($(KBUILD_TARGET),win)
181 qt4-bin_INST = $(INST_BIN)
182 qt4-bin_SOURCES = \
183 $(VBOX_PATH_QT4_LIB)/QtCoreVBox4.dll \
184 $(VBOX_PATH_QT4_LIB)/QtGuiVBox4.dll \
185 $(VBOX_PATH_QT4_LIB)/QtNetworkVBox4.dll \
186 $(if $(VBOX_GUI_USE_QGL), $(VBOX_PATH_QT4_LIB)/QtOpenGLVBox4.dll,) \
187 $(VBOX_PATH_QT4)/plugins/accessible/qtaccessiblewidgets4.dll=>accessible/qtaccessiblewidgets4.dll
188 else
189 qt4-bin_INST = $(INST_BIN)
190 qt4-bin_SOURCES = \
191 $(VBOX_PATH_QT4_LIB)/libQtCoreVBox.so.4 \
192 $(VBOX_PATH_QT4_LIB)/libQtGuiVBox.so.4 \
193 $(VBOX_PATH_QT4_LIB)/libQtNetworkVBox.so.4 \
194 $(if $(VBOX_GUI_USE_QGL), $(VBOX_PATH_QT4_LIB)/libQtOpenGLVBox.so.4,) \
195 $(VBOX_PATH_QT4)/plugins/accessible/libqtaccessiblewidgets$(SUFF_DLL)=>accessible/libqtaccessiblewidgets$(SUFF_DLL)
196 endif
197endif # VBOX_WITH_QT4_SUN
198
199
200#
201# For building the combined package, just get the additions .ISO
202# once for amd64 to prevent version inconsistences. In all other
203# cases we get the .ISO per target architecture.
204#
205ifdef VBOX_WITH_ADDITIONS_FROM_BUILD_SERVER
206 ifdef VBOX_WITH_COMBINED_PACKAGE
207 ifeq ($(KBUILD_TARGET_ARCH),amd64)
208 INSTALLS += buildserver-additions
209 endif
210 else
211 INSTALLS += buildserver-additions
212 endif
213
214#
215# Install additions iso from the build server.
216# The $(CP)/$(RM) stuff can be replaced by a simple $(TOUCH) once that has
217# been added to kBuild.
218#
219buildserver-additions_INST = $(INST_ADDITIONS_ISO)
220buildserver-additions_MODE = 0644
221buildserver-additions_SOURCES = $(PATH_TARGET)/VBoxGuestAdditions.iso
222buildserver-additions_CLEANS = $(PATH_TARGET)/VBoxGuestAdditions.iso $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
223
224$(PATH_TARGET)/VBoxGuestAdditions.iso: $(VBOX_SVN_REV_KMK) $(PATH_DEVTOOLS)/bin/additions.sh | $$(dir $$@)
225 $(RM) -f $(PATH_TARGET)/VBoxGuestAdditions.iso $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
226 ifneq ($(KBUILD_HOST),win)
227 $(SHELL) $(PATH_DEVTOOLS)/bin/additions.sh --cmd fetch --filename $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
228 else
229 $(KMK) --affinity 1 -f $(MAKEFILE) VBOX_SINGLE_MAKEFILE= buildserver-additions-affinity-hack
230 endif
231 $(CP) -f $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp $(PATH_TARGET)/VBoxGuestAdditions.iso
232 $(RM) -f $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
233
234 ifeq ($(KBUILD_HOST),win)
235buildserver-additions-affinity-hack:
236 $(SHELL) $(PATH_DEVTOOLS)/bin/additions.sh --cmd fetch --filename $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
237 endif
238endif
239
240
241#
242#
243# Install documentation files (at the moment the .chm) from the build server.
244#
245ifdef VBOX_WITH_DOCS_FROM_BUILD_SERVER
246## @todo r=bird: Too much mess now for $(PATH_TARGET); move to doc/manual/.
247INSTALLS += buildserver-docs
248buildserver-docs_INST = $(INST_BIN)
249buildserver-docs_MODE = 0644
250buildserver-docs_SOURCES = \
251 $(addprefix $(PATH_TARGET)/, \
252 VirtualBox.chm UserManual.pdf \
253 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),VirtualBox_$(f).chm UserManual_$(f).pdf))
254buildserver-docs_CLEANS = \
255 $(buildserver-docs_0_OUTDIR)/unpacked.ts \
256 $(buildserver-docs_0_OUTDIR)/VBoxDocumentation.zip \
257 $(buildserver-docs_0_OUTDIR)/VBoxDocumentation.zip.tmp \
258 $(addprefix $(PATH_TARGET)/, \
259 VirtualBox.chm UserManual.pdf \
260 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),VirtualBox_$(f).chm UserManual_$(f).pdf))
261
262## @todo Hack to get at TOOL_ZIP_UNPACK; see if this can be integrated somehow...
263include $(KBUILD_PATH)/tools/ZIP.kmk
264
265$$(buildserver-docs_0_OUTDIR)/unpacked.ts +| $(PATH_TARGET)/VirtualBox.chm $(PATH_TARGET)/UserManual.pdf \
266$(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_TARGET)/VirtualBox_$(f).chm $(PATH_TARGET)/UserManual_$(f).pdf): \
267 $$(buildserver-docs_0_OUTDIR)/VBoxDocumentation.zip
268 $(call MSG_L1,Unpacking documentation)
269 $(QUIET)$(TOOL_ZIP_UNPACK) $(TOOL_ZIP_UNPACKFLAGS) -o $< -d $(PATH_TARGET)
270 $(APPEND) -t $@ "done"
271
272$$(buildserver-docs_0_OUTDIR)/VBoxDocumentation.zip: $(VBOX_SVN_REV_KMK) $(PATH_DEVTOOLS)/bin/documentation.sh | $$(dir $$@)
273 $(RM) -f $@ [email protected]
274 ifneq ($(KBUILD_HOST),win)
275 $(SHELL) $(PATH_DEVTOOLS)/bin/documentation.sh --cmd fetch --filename [email protected]
276 else
277 $(KMK) --affinity 1 -f $(MAKEFILE) VBOX_SINGLE_MAKEFILE= buildserver-documentation-affinity-hack
278 endif
279 $(CP) -f [email protected] $@
280 $(RM) -f [email protected]
281## @todo kBuild: The $(CP)/$(RM) stuff can be replaced by a simple $(TOUCH) once that has been added to kBuild.
282
283 ifeq ($(KBUILD_HOST),win)
284buildserver-documentation-affinity-hack:
285 $(SHELL) $(PATH_DEVTOOLS)/bin/documentation.sh --cmd fetch --filename $(buildserver-docs_0_OUTDIR)/VBoxDocumentation.zip.tmp
286 endif
287endif # VBOX_WITH_DOCS_FROM_BUILD_SERVER
288
289
290#
291# Install EFI firmware image
292#
293ifdef VBOX_WITH_EFIFW_FROM_BUILD_SERVER
294#
295# Either from the build server.
296#
297INSTALLS += buildserver-efifw
298buildserver-efifw_INST = $(INST_BIN)
299buildserver-efifw_MODE = 0644
300buildserver-efifw_SOURCES = \
301 $(buildserver-efifw_0_OUTDIR)/FV/VBOX.fd=>vboxefi.fv \
302 $(buildserver-efifw_0_OUTDIR)/FV/VBOX64.fd=>vboxefi64.fv
303buildserver-efifw_CLEANS = \
304 $(buildserver-efifw_0_OUTDIR)/FV/VBOX.fd \
305 $(buildserver-efifw_0_OUTDIR)/FV/VBOX64.fd \
306 $(buildserver-efifw_0_OUTDIR)/VBoxEfiFirmware.zip \
307 $(buildserver-efifw_0_OUTDIR)/VBoxEfiFirmware.zip.tmp
308## @todo rainy day: cleanup the output directory (zip contains lots more)
309
310## @todo Hack to get at TOOL_ZIP_UNPACK; see if this can be integrated somehow...
311include $(KBUILD_PATH)/tools/ZIP.kmk
312
313$$(buildserver-efifw_0_OUTDIR)/FV/VBOX.fd $$(buildserver-efifw_0_OUTDIR)/FV/VBOX64.fd: $$(buildserver-efifw_0_OUTDIR)/VBoxEfiFirmware.zip
314 $(QUIET)$(TOOL_ZIP_UNPACK) $(TOOL_ZIP_UNPACKFLAGS) -o $< -d $(buildserver-efifw_0_OUTDIR)
315
316$$(buildserver-efifw_0_OUTDIR)/VBoxEfiFirmware.zip: $(VBOX_SVN_REV_KMK) $(PATH_DEVTOOLS)/bin/efi_firmware.sh | $$(dir $$@)
317 $(RM) -f $@ [email protected]
318 ifneq ($(KBUILD_HOST),win)
319 $(SHELL) $(PATH_DEVTOOLS)/bin/efi_firmware.sh --cmd fetch --filename [email protected]
320 else
321 $(KMK) --affinity 1 -f $(MAKEFILE) VBOX_SINGLE_MAKEFILE= buildserver-efifw-affinity-hack
322 endif
323 $(CP) -f [email protected] $@
324 $(RM) -f [email protected]
325## @todo kBuild: The $(CP)/$(RM) stuff can be replaced by a simple $(TOUCH) once that has been added to kBuild.
326
327 ifeq ($(KBUILD_HOST),win)
328buildserver-efifw-affinity-hack:
329 $(SHELL) $(PATH_DEVTOOLS)/bin/efi_firmware.sh --cmd fetch --filename $(buildserver-efifw_0_OUTDIR)/VBoxEfiFirmware.zip.tmp
330 endif
331else
332#
333# Or from the local copy
334#
335INSTALLS += local-efifw
336local-efifw_INST = $(INST_BIN)
337local-efifw_MODE = 0644
338local-efifw_SOURCES = \
339 $(PATH_ROOT)/src/VBox/Devices/EFI/FirmwareBin/vboxefi.fv=>vboxefi.fv \
340 $(PATH_ROOT)/src/VBox/Devices/EFI/FirmwareBin/vboxefi64.fv=>vboxefi64.fv
341endif # VBOX_WITH_EFIFW_FROM_BUILD_SERVER
342
343
344#
345# Install staged binaries on platforms where we can't cross
346# compile things.
347#
348ifn1of ($(KBUILD_TARGET), l4 linux win)
349 VBOX_PATH_STAGED ?= .
350
351 # Additions.
352 ifndef VBOX_WITH_LINUX_ADDITIONS
353 ifndef VBOX_WITH_WIN32_ADDITIONS
354 ifneq ($(wildcard $(VBOX_PATH_STAGED)/VBoxGuestAdditions.iso),)
355 INSTALLS += staged-additions
356 staged-additions_INST = $(INST_ADDITIONS_ISO)
357 staged-additions_MODE = 0644
358 staged-additions_SOURCES = $(VBOX_PATH_STAGED)/VBoxGuestAdditions.iso
359 endif
360 endif
361 endif
362
363 # guesttool.exe
364 ifndef VBOX_WITH_WIN32_ADDITIONS
365 ifneq ($(wildcard $(VBOX_PATH_STAGED)/guesttool.exe),)
366 INSTALLS += staged-guesttool
367 staged-guesttool_INST = $(INST_BIN)
368 staged-guesttool_SOURCES = $(VBOX_PATH_STAGED)/guesttool.exe
369 endif
370 endif
371
372endif
373
374endif # !VBOX_ONLY_ADDITIONS
375endif # !VBOX_ONLY_DOCS
376
377
378ifdef VBOX_ONLY_DOCS
379# It may sound a bit odd, but for preparing the documentation package the
380# doxygen documentation isn't needed and increases the build time a lot.
381docs:
382else # !VBOX_ONLY_DOCS
383#
384# Generate documentation.
385# (This should be converted into a separate pass or merged with an existing one later.)
386#
387 ifdef VBOX_SINGLE_MAKEFILE
388 ifdef VBOX_WITH_ALL_DOXYGEN_TARGETS
389docs: docs.Core
390 endif
391 else # !VBOX_SINGLE_MAKEFILE
392docs: $(if $(VBOX_WITH_ALL_DOXYGEN_TARGETS),docs.Core)
393 $(KMK) -C src/VBox/Main docs.Main
394 ifdef VBOX_WITH_ALL_DOXYGEN_TARGETS
395 $(KMK) -C src/VBox/Runtime docs.iprt
396 endif
397 endif # !VBOX_SINGLE_MAKEFILE
398endif # !VBOX_ONLY_DOCS
399
400docs.Core docs.core: $(PATH_TARGET)/docs.Core
401
402
403
404#
405# The core (VMM+REM+Devices+Main) documentation.
406#
407# This includes so much because we wish to have the complete CFGM
408# and GCFGM lists.
409#
410OTHER_CLEAN += \
411 $(PATH_TARGET)/Doxyfile.Core \
412 $(PATH_TARGET)/Doxyfile.Core.dep
413
414VBOX_CORE_DOXYFILE_INPUT_DIRS = \
415 include/iprt \
416 include/VBox \
417 include/VBox/com \
418 include/VBox/HostServices \
419 src/VBox/VMM \
420 src/VBox/VMM/VMMR0 \
421 src/VBox/VMM/VMMGC \
422 src/VBox/VMM/VMMAll \
423 src/VBox/VMM/PATM \
424 src/VBox/VMM/PATM/VMMR0 \
425 src/VBox/VMM/PATM/VMMGC \
426 src/VBox/VMM/PATM/VMMAll \
427 src/VBox/VMM/VMMSwitcher \
428 src/VBox/Debugger \
429 src/VBox/Devices \
430 src/VBox/Devices/Audio \
431 src/VBox/Devices/Bus \
432 src/VBox/Devices/Graphics \
433 src/VBox/Devices/Graphics/BIOS \
434 src/VBox/Devices/Input \
435 src/VBox/Devices/Networking \
436 src/VBox/Devices/PC \
437 src/VBox/Devices/PC/BIOS \
438 src/VBox/Devices/Parallel \
439 src/VBox/Devices/Serial \
440 src/VBox/Devices/Storage \
441 src/VBox/Devices/VBoxHDDFormats \
442 src/VBox/Devices/VBoxHDDFormats/StorageCraft \
443 src/VBox/Devices/USB \
444 src/VBox/Devices/USB/darwin \
445 src/VBox/Devices/USB/linux \
446 src/VBox/Devices/USB/os2 \
447 src/VBox/Devices/USB/solaris \
448 src/VBox/Devices/USB/vrdp \
449 src/VBox/Devices/USB/win32 \
450 src/VBox/Devices/VMMDev \
451 src/VBox/Main/include \
452 src/VBox/Main/include/hgcm \
453 src/VBox/Main \
454 src/VBox/Main/glue \
455 src/VBox/Main/hgcm \
456 src/VBox/Main/webservice \
457 src/VBox/Main/xml \
458 src/VBox/Main/darwin \
459 src/VBox/Main/linux \
460 src/VBox/Main/os2 \
461 src/VBox/Main/solaris \
462 src/VBox/Main/win \
463 src/VBox/Main/xpcom \
464 src/VBox/HostServices \
465 src/VBox/HostServices/SharedClipboard \
466 src/VBox/HostServices/SharedFolders \
467 src/VBox/HostServices/SharedInfoServices \
468 src/VBox/HostServices/SharedOpenGL \
469 src/VBox/HostDrivers/Support \
470 src/VBox/HostDrivers/Support/darwin \
471 src/VBox/HostDrivers/Support/freebsd \
472 src/VBox/HostDrivers/Support/l4 \
473 src/VBox/HostDrivers/Support/linux \
474 src/VBox/HostDrivers/Support/os2 \
475 src/VBox/HostDrivers/Support/solaris \
476 src/VBox/HostDrivers/Support/win \
477 src/VBox/HostDrivers/VBoxNetFlt \
478 src/VBox/HostDrivers/VBoxNetFlt/darwin \
479 src/VBox/HostDrivers/VBoxNetFlt/linux \
480 src/VBox/HostDrivers/VBoxNetFlt/solaris \
481 src/VBox/HostDrivers/VBoxNetFlt/win \
482 src/VBox/HostDrivers/VBoxNetNat \
483 src/VBox/HostDrivers/VBoxNetNat/darwin \
484 src/VBox/HostDrivers/VBoxNetNat/linux \
485 src/VBox/HostDrivers/VBoxNetNat/solaris \
486 src/VBox/HostDrivers/VBoxNetNat/win \
487 src/VBox/HostDrivers/VBoxNetAdp \
488 src/VBox/HostDrivers/VBoxNetAdp/darwin \
489 src/VBox/HostDrivers/VBoxNetAdp/linux \
490 src/VBox/HostDrivers/VBoxNetAdp/solaris \
491 src/VBox/HostDrivers/VBoxNetAdp/win \
492 src/VBox/HostDrivers/VBoxUSB \
493 src/VBox/HostDrivers/VBoxUSB/darwin \
494 src/VBox/HostDrivers/VBoxUSB/os2 \
495 src/VBox/HostDrivers/VBoxUSB/solaris \
496 src/VBox/HostDrivers/VBoxUSB/win \
497 src/VBox/HostDrivers/VBoxUSB/win/Device \
498 src/VBox/HostDrivers/VBoxUSB/win/Device/amd64 \
499 src/VBox/HostDrivers/VBoxUSB/win/Device/x86 \
500 src/VBox/HostDrivers/VBoxUSB/win/Filter \
501 src/VBox/HostDrivers/VBoxUSB/win/Install \
502 src/VBox/HostDrivers/VBoxUSB/win/Monitor \
503 src/VBox/HostDrivers/VBoxUSB/win/Monitor/win32 \
504 src/VBox/HostDrivers/VBoxUSB/win/Monitor/win64 \
505 src/VBox/HostDrivers/VBoxUSB/win/usbd \
506
507# These must come first in order to make things look nice.
508VBOX_CORE_DOXYFILE_INPUT_FIRST =\
509 $(PATH_ROOT)/doc/VBox-doc.c \
510 $(PATH_ROOT)/doc/VBox-CodingGuidelines.cpp \
511 $(PATH_ROOT)/doc/VBox-MakefileGuidelines.cpp \
512 $(PATH_ROOT)/src/VBox/VMM/VMMCodingGuidelines.cpp \
513 $(PATH_ROOT)/src/VBox/VMM/VMMDocsRawMode.cpp \
514 $(PATH_ROOT)/include/VBox/cdefs.h \
515 $(PATH_ROOT)/include/VBox/vmapi.h \
516 $(PATH_ROOT)/include/VBox/vmm.h \
517 $(PATH_ROOT)/include/VBox/cpum.h \
518 $(PATH_ROOT)/include/VBox/mm.h \
519 $(PATH_ROOT)/include/VBox/pgm.h \
520 $(PATH_ROOT)/include/VBox/selm.h \
521 $(PATH_ROOT)/include/VBox/trpm.h \
522 $(PATH_ROOT)/include/VBox/patm.h \
523 $(PATH_ROOT)/include/VBox/dbgf.h \
524 $(PATH_ROOT)/include/VBox/stam.h \
525 $(PATH_ROOT)/include/VBox/em.h \
526 $(PATH_ROOT)/include/VBox/pdm.h \
527 $(PATH_ROOT)/include/VBox/rem.h \
528 $(PATH_ROOT)/include/VBox/iom.h \
529 $(PATH_ROOT)/include/VBox/cfgm.h \
530 $(PATH_ROOT)/include/VBox/tm.h \
531 $(PATH_ROOT)/include/VBox/csam.h \
532 $(PATH_ROOT)/include/VBox/ssm.h \
533 $(PATH_ROOT)/include/VBox/hwaccm.h \
534 $(PATH_ROOT)/include/VBox/hwacc_svm.h \
535 $(PATH_ROOT)/include/VBox/hwacc_vmx.h \
536 \
537 $(PATH_ROOT)/src/VBox/VMM/CFGMInternal.h \
538 $(PATH_ROOT)/src/VBox/VMM/CPUMInternal.h \
539 $(PATH_ROOT)/src/VBox/VMM/DBGFInternal.h \
540 $(PATH_ROOT)/src/VBox/VMM/EMInternal.h \
541 $(PATH_ROOT)/src/VBox/VMM/HWACCMInternal.h \
542 $(PATH_ROOT)/src/VBox/VMM/IOMInternal.h \
543 $(PATH_ROOT)/src/VBox/VMM/MMInternal.h \
544 $(PATH_ROOT)/src/VBox/VMM/PDMInternal.h \
545 $(PATH_ROOT)/src/VBox/VMM/PGMInternal.h \
546 $(PATH_ROOT)/src/VBox/VMM/PATM/CSAMInternal.h \
547 $(PATH_ROOT)/src/VBox/VMM/PATM/PATMInternal.h \
548 $(PATH_ROOT)/src/VBox/VMM/REMInternal.h \
549 $(PATH_ROOT)/src/VBox/VMM/SELMInternal.h \
550 $(PATH_ROOT)/src/VBox/VMM/SSMInternal.h \
551 $(PATH_ROOT)/src/VBox/VMM/STAMInternal.h \
552 $(PATH_ROOT)/src/VBox/VMM/TMInternal.h \
553 $(PATH_ROOT)/src/VBox/VMM/TRPMInternal.h \
554 $(PATH_ROOT)/src/VBox/VMM/VMInternal.h \
555 $(PATH_ROOT)/src/VBox/VMM/VMMInternal.h \
556 \
557 $(PATH_ROOT)/include/VBox/vm.h \
558 \
559 $(PATH_ROOT)/include/VBox/sup.h \
560 $(PATH_ROOT)/include/VBox/VBoxHDD.h \
561 $(PATH_ROOT)/include/VBox/types.h \
562 $(PATH_ROOT)/include/VBox/err.h \
563 $(PATH_ROOT)/include/VBox/x86.h \
564 $(PATH_ROOT)/include/VBox/cpumdis.h \
565 $(PATH_ROOT)/include/VBox/dbggui.h \
566 $(PATH_ROOT)/include/VBox/dis.h \
567 $(PATH_ROOT)/include/VBox/disopcode.h \
568 $(PATH_ROOT)/include/VBox/intnet.h \
569 $(PATH_ROOT)/include/VBox/settings.h \
570 $(PATH_ROOT)/include/VBox/pci.h \
571 $(PATH_ROOT)/include/VBox/scsi.h \
572 $(PATH_ROOT)/include/VBox/shflsvc.h \
573 $(PATH_ROOT)/include/VBox/hgcmsvc.h \
574 $(PATH_ROOT)/include/VBox/usb.h \
575 $(PATH_ROOT)/include/VBox/vusb.h \
576 \
577 $(PATH_ROOT)/include/VBox/log.h \
578 $(PATH_ROOT)/include/VBox/param.h \
579 $(PATH_ROOT)/include/VBox/version.h
580
581VBOX_CORE_DOXYFILE_INPUT := \
582 $(filter-out %.cpp.h, $(sort $(wildcard $(addsuffix /*.h, $(VBOX_CORE_DOXYFILE_INPUT_DIRS)))) ) \
583 $(foreach dir, $(VBOX_CORE_DOXYFILE_INPUT_DIRS), $(wildcard $(dir)/*.cpp $(dir)/*.c $(dir)/.asm))
584VBOX_CORE_DOXYFILE_INPUT := \
585 $(VBOX_CORE_DOXYFILE_INPUT_FIRST) \
586 $(filter-out $(VBOX_CORE_DOXYFILE_INPUT_FIRST), $(VBOX_CORE_DOXYFILE_INPUT))
587
588# And some some additional stuff.
589VBOX_CORE_DOXYFILE_INPUT += \
590 $(PATH_ROOT)/src/recompiler/VBoxRecompiler.c \
591 $(PATH_ROOT)/src/recompiler/VBoxREMWrapper.cpp
592
593
594VBOX_CORE_DOXYFILE_OUTPUT = $(PATH_OUT)/docs/Core
595BLDDIRS += $(VBOX_CORE_DOXYFILE_OUTPUT)
596
597-include $(PATH_TARGET)/Doxyfile.Core.dep
598
599# Generate the Doxyfile
600$(PATH_TARGET)/Doxyfile.Core: Doxyfile.Core \
601 $(comp-vars VBOX_CORE_DOXYFILE_INPUT,DOXYGEN_INPUT_PREV,FORCE) \
602 $(comp-vars VBOX_CORE_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE) \
603 | $$(dir $$@)
604 $(RM) -f $@ [email protected] $(PATH_TARGET)/Doxyfile.Core.dep
605 $(CP) -f Doxyfile.Core [email protected]
606 $(APPEND) [email protected]
607 $(APPEND) [email protected] "OUTPUT_DIRECTORY = $(VBOX_CORE_DOXYFILE_OUTPUT)"
608 $(APPEND) [email protected] "WARN_LOGFILE = $(VBOX_CORE_DOXYFILE_OUTPUT)/errors"
609 $(APPEND) [email protected] "INCLUDE_PATH = $(PATH_ROOT)/include $(PATH_ROOT)/src/VBox/VMM $(PATH_ROOT)/src/VBox/Main/include "
610 $(APPEND) [email protected] "INCLUDE_FILE_PATTERNS = *.cpp.h"
611 $(APPEND) [email protected]
612 $(APPEND) [email protected] "INPUT = $(VBOX_CORE_DOXYFILE_INPUT)"
613 $(APPEND) [email protected]
614 $(APPEND) [email protected] "PREDEFINED += $(DEFS) $(DEFS.$(KBUILD_TARGET)) $(DEFS.$(KBUILD_TARGET_ARCH)) $(ARCH_BITS_DEFS)"
615 $(APPEND) [email protected] "PREDEFINED += ARCH_BITS=HC_ARCH_BITS R3_ARCH_BITS=HC_ARCH_BITS R0_ARCH_BITS=HC_ARCH_BITS "
616 $(APPEND) [email protected]
617 $(MV) -f [email protected] $@
618 @$(APPEND) $(PATH_TARGET)/Doxyfile.Core.dep "DOXYGEN_OUTPUT_PREV = $(VBOX_CORE_DOXYFILE_OUTPUT)"
619 @$(APPEND) $(PATH_TARGET)/Doxyfile.Core.dep "DOXYGEN_INPUT_PREV = $(VBOX_CORE_DOXYFILE_INPUT)"
620
621# Do the actual job.
622$(PATH_TARGET)/docs.Core: $(PATH_TARGET)/Doxyfile.Core $$(VBOX_CORE_DOXYFILE_INPUT) | $(VBOX_CORE_DOXYFILE_OUTPUT)/
623 $(RM) -f $(PATH_TARGET)/docs.Core
624 $(RM) -Rf $(VBOX_CORE_DOXYFILE_OUTPUT)/html/
625 doxygen $(PATH_TARGET)/Doxyfile.Core
626 $(APPEND) $(PATH_TARGET)/docs.Core
627
628
629
630#
631# Build the additions, all of them.
632#
633# This is currently tailored (hardcoded) for the additions
634# build box. Can make it pretty and configurable later.
635#
636# The fetching must be done in serial fashion, while the building
637# should be more flexible wrt to -jN.
638#
639additions-fetch:
640 + $(KMK) -C tools fetch
641 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=linux BUILD_TARGET_ARCH=amd64 BUILD_TARGET=linux
642 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=linux BUILD_TARGET_ARCH=x86 BUILD_TARGET=linux
643# + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=os2 BUILD_TARGET_ARCH=x86 BUILD_TARGET=os2
644 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=solaris BUILD_TARGET_ARCH=amd64 BUILD_TARGET=solaris
645 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=solaris BUILD_TARGET_ARCH=x86 BUILD_TARGET=solaris
646 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=win BUILD_TARGET_ARCH=amd64 BUILD_TARGET=win
647 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=win BUILD_TARGET_ARCH=x86 BUILD_TARGET=win
648
649
650## @todo Currently combined solaris additions building assumes that amd64 is
651# built first. The windows amd64 additions need some x86 files, so don't change
652# the order of the windows builds.
653# Do not change the order of dependencies here without testing.
654additions-build: \
655 additions-build-win.x86 \
656 additions-build-win.amd64 \
657 additions-build-solaris.amd64 \
658 additions-build-solaris.x86 \
659 additions-build-os2.x86 \
660 additions-build-linux.amd64 \
661 additions-build-linux.x86
662
663VBOX_ADDITIONS_BUILD.amd64 = VBOX_ONLY_ADDITIONS=1 VBOX_WITHOUT_ADDITIONS_ISO=1 \
664 KBUILD_TYPE=$(KBUILD_TYPE) BUILD_TYPE=$(KBUILD_TYPE) \
665 KBUILD_TARGET_ARCH=amd64 BUILD_TARGET_ARCH=amd64 \
666 VBOX_SVN_REV=$(VBOX_SVN_REV) \
667 all packing
668
669VBOX_ADDITIONS_BUILD.x86 = VBOX_ONLY_ADDITIONS=1 VBOX_WITHOUT_ADDITIONS_ISO=1 \
670 KBUILD_TYPE=$(KBUILD_TYPE) BUILD_TYPE=$(KBUILD_TYPE) \
671 KBUILD_TARGET_ARCH=x86 BUILD_TARGET_ARCH=x86 \
672 VBOX_SVN_REV=$(VBOX_SVN_REV) \
673 all packing
674
675# Automatically determine the additions build subdir name. Used for figuring
676# out directory names inside the additions building VMs.
677VBOX_ADDITIONS_BUILD_SUBDIRNAME := $(lastword $(subst /, ,$(PATH_ROOT)))
678
679VBOX_KMK_TIME = $(KBUILD_BIN_PATH)/kmk_time
680
681additions-build-win.amd64:
682ifeq ($(KBUILD_TARGET),win)
683 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.amd64)
684else
685 $(call MSG_L1,Building Windows/amd64 additions)
686 $(VBOX_KMK_TIME) ssh [email protected] "cd e:/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh kmk $(VBOX_ADDITIONS_BUILD.amd64)"
687endif
688
689additions-build-win.x86:
690ifeq ($(KBUILD_TARGET),win)
691 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86)
692else
693 $(call MSG_L1,Building Windows/x86 additions)
694 $(VBOX_KMK_TIME) ssh [email protected] " cd e:/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh kmk $(VBOX_ADDITIONS_BUILD.x86)"
695endif
696
697additions-build-solaris.amd64:
698ifeq ($(KBUILD_TARGET),solaris)
699 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.amd64)
700else
701 $(call MSG_L1,Building Solaris/amd64 additions)
702 rsync -a --delete --delete-excluded --exclude .svn --exclude FetchDir --exclude tinderclient.log --exclude win.amd64 --exclude win.x86 . 192.168.27.4:/mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME)
703 $(VBOX_KMK_TIME) ssh [email protected] " cd /mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.amd64) "
704 rsync -a --delete 192.168.27.4:/mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME)/out/solaris.amd64 out/
705endif
706
707# ASSUMES 64-bit is built already. See @todo above.
708additions-build-solaris.x86:
709ifeq ($(KBUILD_TARGET),solaris)
710 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86) VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE=1
711else
712 $(call MSG_L1,Building Solaris/x86 additions)
713 rsync -a --delete --delete-excluded --exclude .svn --exclude FetchDir --exclude tinderclient.log --exclude win.amd64 --exclude win.x86 . 192.168.27.4:/mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME)
714 $(VBOX_KMK_TIME) ssh [email protected] " cd /mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.x86) VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE=1"
715 rsync -a --delete 192.168.27.4:/mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME)/out/solaris.x86 out/
716endif
717
718additions-build-os2.x86:
719#ifeq ($(KBUILD_TARGET),os2)
720# + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86)
721#else
722# $(VBOX_KMK_TIME) ssh [email protected] " cd /mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.x86) "
723#endif
724
725additions-build-linux.amd64:
726ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),linux.amd64)
727 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.amd64)
728else
729 $(call MSG_L1,Building Linux/amd64 additions)
730 $(VBOX_KMK_TIME) ssh [email protected] " cd /mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.amd64) "
731endif
732
733additions-build-linux.x86:
734ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),linux.x86)
735 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86)
736else
737 $(call MSG_L1,Building Linux/x86 additions)
738 $(VBOX_KMK_TIME) ssh [email protected] " cd /mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.x86) "
739endif
740
741
742additions-packing:
743 + $(KMK) VBOX_ONLY_ADDITIONS=1 \
744 VBOX_WITH_ADDITIONS_ISO.freebsd.amd64= \
745 VBOX_WITH_ADDITIONS_ISO.freebsd.x86= \
746 VBOX_WITH_ADDITIONS_ISO.linux.amd64=1 \
747 VBOX_WITH_ADDITIONS_ISO.linux.x86=1 \
748 VBOX_WITH_ADDITIONS_ISO.solaris.amd64=1 \
749 VBOX_WITH_ADDITIONS_ISO.solaris.x86=1 \
750 VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE=1 \
751 VBOX_WITH_ADDITIONS_ISO.win.amd64=1 \
752 VBOX_WITH_ADDITIONS_ISO.win.x86=1 \
753 -C src/VBox/Additions \
754 $(VBOX_PATH_ADDITIONS)/VBoxGuestAdditions.iso
755
756
757
758#
759# Build the EFI firmware, all of it.
760#
761# Mainly hooks right now, maybe we need them later.
762#
763efi-fetch:
764
765efi-build: $(VBOX_VERSION_HEADER)
766 $(PATH_ROOT)/webtools/tinderbox/client/efi-build.sh
767
768efi-packing:
769
770#
771# Generate VirtualBox-OSE-x.x.x.tar.bz2 (OSE) tarballs for distribution
772# - includes kBuild
773# - must be executed on an OSE checkout
774#
775
776# the path where to store the tarball
777TARBALLPATH ?= $(abspath $(PATH_ROOT)/..)
778# the root directory inside the tarball
779TARBALLROOT ?= VirtualBox-$(VBOX_VERSION_STRING)
780# the name of the tarball file
781TARBALLNAME ?= VirtualBox-$(VBOX_VERSION_STRING).tar.bz2
782snapshot-ose:
783 @$(call MSG_L1,Creating tarball $(TARBALLPATH)/$(TARBALLNAME))
784 @if [ -d "$(PATH_ROOT)/src/VBox/Devices/USB" ]; then \
785 echo; \
786 echo "Found USB stuff, refused to build OSE tarball!"; \
787 echo; \
788 exit 1; \
789 fi; \
790 if [ -z "$(VBOX_OSE)" ]; then \
791 echo; \
792 echo "Please do 'kmk snapshot-ose VBOX_OSE=1'"; \
793 echo; \
794 exit 1; \
795 fi
796 $(QUIET)$(MKDIR) -p $(TARBALLPATH)
797 $(QUIET)$(RM) -f $(TARBALLPATH)/$(TARBALLROOT)
798 $(QUIET)$(LN_SYMLINK) $(PATH_ROOT) $(TARBALLPATH)/$(TARBALLROOT)
799 $(QUIET)tar -cjh --owner 0 --group 0 --totals \
800 --exclude=.svn \
801 --exclude=$(TARBALLROOT)/out \
802 --exclude=$(TARBALLROOT)/env.sh \
803 --exclude=$(TARBALLROOT)/configure.log \
804 --exclude=$(TARBALLROOT)/build.log \
805 --exclude=$(TARBALLROOT)/AutoConfig.kmk \
806 --exclude=$(TARBALLROOT)/LocalConfig.kmk \
807 --exclude=$(TARBALLROOT)/prebuild \
808 -C $(TARBALLPATH) \
809 -f $(TARBALLPATH)/$(TARBALLNAME) \
810 $(TARBALLROOT)
811 $(QUIET)$(RM) $(TARBALLPATH)/$(TARBALLROOT)
812
813
814#
815# Generate VirtualBox-x.x.x.tar.bz2 (PUEL) zip archives for internal use only
816# - includes kBuild
817# - must be executed on an PUEL checkout
818#
819
820# the path where to store the zip archive
821ZIPPATH ?= $(abspath $(PATH_ROOT)/..)
822# the root directory inside the zip archive
823ZIPROOT ?= VirtualBox-$(VBOX_VERSION_STRING)
824# the name of the zip archive
825ZIPNAME ?= VirtualBox-$(VBOX_VERSION_STRING).zip
826snapshot-puel:
827 @$(call MSG_L1,Creating zip $(ZIPPATH)/$(ZIPNAME))
828 @if [ ! -d "$(PATH_ROOT)/src/VBox/Devices/USB" ]; then \
829 echo; \
830 echo "Did not find USB stuff, is this an OSE branch?"; \
831 echo; \
832 exit 1; \
833 fi
834 @if [ -z "$(PASSWORD)" ]; then \
835 echo; \
836 echo "Please specify a password with PASSWORD=..."; \
837 echo; \
838 exit 1; \
839 fi
840 $(QUIET)$(MKDIR) -p $(ZIPPATH)
841 $(QUIET)$(RM) -f $(ZIPPATH)/$(ZIPROOT)
842 $(QUIET)$(RM) -f $(ZIPPATH)/$(ZIPNAME)
843 $(QUIET)$(LN_SYMLINK) $(PATH_ROOT) $(ZIPPATH)/$(ZIPROOT)
844 $(QUIET)(cd $(ZIPPATH); 7z a \
845 -l -tzip -mmt=on -mx=7 -p$(PASSWORD) \
846 -xr!.svn \
847 -i!$(ZIPROOT)/Config.kmk \
848 -i!$(ZIPROOT)/Doxyfile.Core \
849 -i!$(ZIPROOT)/Makefile.kmk \
850 -i!$(ZIPROOT)/configure \
851 -i!$(ZIPROOT)/configure.vbs \
852 -i!$(ZIPROOT)/doc \
853 -i!$(ZIPROOT)/include \
854 -i!$(ZIPROOT)/kBuild \
855 -i!$(ZIPROOT)/src \
856 -i!$(ZIPROOT)/tools/env.sh \
857 -i!$(ZIPROOT)/tools/linux.x86/bin/* \
858 -i!$(ZIPROOT)/tools/linux.amd64/bin/* \
859 -x!$(ZIPROOT)/doc/Devices \
860 -x!$(ZIPROOT)/doc/\*pdf \
861 -x!$(ZIPROOT)/doc/L4VM \
862 -x!$(ZIPROOT)/doc/VMM \
863 -x!$(ZIPROOT)/doc/licenses_old \
864 -x!$(ZIPROOT)/doc/manual/de_DE \
865 -x!$(ZIPROOT)/doc/manual/fr_FR \
866 -x!$(ZIPROOT)/src/tests \
867 -x!$(ZIPROOT)/src/VBox/Artwork/2008-\* \
868 -x!$(ZIPROOT)/src/VBox/Installer/AMI \
869 -x!$(ZIPROOT)/src/VBox/Installer/Avanquest \
870 -x!$(ZIPROOT)/src/VBox/Installer/Encore \
871 -x!$(ZIPROOT)/src/VBox/Installer/linux/debian \
872 -x!$(ZIPROOT)/src/VBox/Installer/linux/rpm \
873 $(ZIPPATH)/$(ZIPNAME))
874 $(QUIET)$(RM) $(ZIPPATH)/$(ZIPROOT)
875
876
877#
878# Generate ALL the rules.
879#
880include $(KBUILD_PATH)/subfooter.kmk
881
882
883#
884# Generate x86.mac and err.mac.
885#
886incs:
887 $(SED) -f include/VBox/err.sed --output include/VBox/err.mac include/VBox/err.h
888 $(APPEND) include/VBox/err.mac '%include "iprt/err.mac"'
889 $(SED) -f include/VBox/err.sed --output include/iprt/err.mac include/iprt/err.h
890 $(SED) -f include/VBox/various.sed --output include/VBox/x86.mac include/VBox/x86.h
891 $(SED) -f include/VBox/various.sed --output include/VBox/param.mac include/VBox/param.h
892
893
894#
895# Generate Visual SlickEdit tagging #defines.
896#
897vslick.h: include/VBox/cdefs.h include/iprt/cdefs.h $(MAKEFILE)
898 $(RM) -f -- $@ [email protected] [email protected] [email protected]
899 $(APPEND) [email protected] '// autogenerated'
900 @$(APPEND) [email protected] '#define RT_C_DECLS_BEGIN '
901 @$(APPEND) [email protected] '#define RT_C_DECLS_END '
902
903 @$(APPEND) [email protected] '#define ATL_NO_VTABLE '
904 @$(APPEND) [email protected] '#define BEGIN_COM_MAP(a) '
905 @$(APPEND) [email protected] '#define COM_INTERFACE_ENTRY(a) '
906 @$(APPEND) [email protected] '#define COM_INTERFACE_ENTRY2(a,b) '
907 @$(APPEND) [email protected] '#define COM_INTERFACE_ENTRY3(a,b,c) '
908 @$(APPEND) [email protected] '#define COM_INTERFACE_ENTRY4(a,b,c,d) '
909 @$(APPEND) [email protected] '#define END_COM_MAP(a) '
910
911 @$(APPEND) [email protected] '#define COM_DECL_READONLY_ENUM_AND_COLLECTION(a) '
912 @$(APPEND) [email protected] '#define COMGETTER(n) Get##n '
913 @$(APPEND) [email protected] '#define COMSETTER(n) Set##n '
914 @$(APPEND) [email protected] '#define ComSafeArrayIn(t,a) t a[] '
915 @$(APPEND) [email protected] '#define ComSafeArrayOut(t,a) t * a[] '
916 @$(APPEND) [email protected] '#define DECLARE_CLASSFACTORY(a) '
917 @$(APPEND) [email protected] '#define DECLARE_CLASSFACTORY_SINGLETON(a) '
918 @$(APPEND) [email protected] '#define DECLARE_REGISTRY_RESOURCEID(a) '
919 @$(APPEND) [email protected] '#define DECLARE_NOT_AGGREGATABLE(a) '
920 @$(APPEND) [email protected] '#define DECLARE_PROTECT_FINAL_CONSTRUCT(a) '
921 @$(APPEND) [email protected] '#define DECLARE_EMPTY_CTOR_DTOR(a) a(); ~a();'
922 @$(APPEND) [email protected] '#define DEFINE_EMPTY_CTOR_DTOR(a) a::a() {} a::~a() {}'
923 @$(APPEND) [email protected] '#define NS_DECL_ISUPPORTS '
924 @$(APPEND) [email protected] '#define NS_IMETHOD virtual nsresult '
925 @$(APPEND) [email protected] '#define NS_IMETHOD_(type) virtual type '
926 @$(APPEND) [email protected] '#define NS_IMETHODIMP nsresult '
927 @$(APPEND) [email protected] '#define NS_IMETHODIMP_(type) type '
928 @$(APPEND) [email protected] '#define PARSERS_EXPORT '
929if1of ($(KBUILD_HOST),win)
930 @$(APPEND) [email protected] '#define STDMETHOD(m) virtual HRESULT m '
931 @$(APPEND) [email protected] '#define STDMETHOD_(type,m) virtual type m '
932 @$(APPEND) [email protected] '#define STDMETHODIMP HRESULT '
933 @$(APPEND) [email protected] '#define STDMETHODIMP_(type) type '
934else
935 @$(APPEND) [email protected] '#define STDMETHOD(m) virtual nsresult m '
936 @$(APPEND) [email protected] '#define STDMETHOD_(type,m) virtual type m '
937 @$(APPEND) [email protected] '#define STDMETHODIMP nsresult '
938 @$(APPEND) [email protected] '#define STDMETHODIMP_(type) type '
939endif
940 @$(APPEND) [email protected] '#define VBOX_SCRIPTABLE(a) public a '
941 @$(APPEND) [email protected] '#define VBOX_SCRIPTABLE_IMPL(a) '
942 @$(APPEND) [email protected] '#define VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(a) '
943
944 @$(APPEND) [email protected] '#define CTX_SUFF(var) var##R3 '
945 @$(APPEND) [email protected] '#define CTXAllSUFF(var) var##R3 '
946 @$(APPEND) [email protected] '#define CTXSUFF(var) var##HC '
947 @$(APPEND) [email protected] '#define OTHERCTXSUFF(var) var##GC '
948 @$(APPEND) [email protected] '#define CTXALLMID(first, last) first##R3##last '
949 @$(APPEND) [email protected] '#define CTXMID(first, last) first##HC##last '
950 @$(APPEND) [email protected] '#define OTHERCTXMID(first, last) first##GC##last '
951 @$(APPEND) [email protected] '#define CTXTYPE(GCType, R3Type, R0Type) R3Type '
952 @$(APPEND) [email protected] '#define RCTYPE(RCType, HCType) RCType '
953 @$(APPEND) [email protected] '#define GCTYPE(GCType, HCType) GCType '
954 @$(APPEND) [email protected] '#define RCPTRTYPE(RCType) RCType '
955 @$(APPEND) [email protected] '#define GCPTRTYPE(GCType) GCType '
956 @$(APPEND) [email protected] '#define HCPTRTYPE(HCType) HCType '
957 @$(APPEND) [email protected] '#define R3R0PTRTYPE(HCType) HCType '
958 @$(APPEND) [email protected] '#define R0PTRTYPE(R3Type) R3Type '
959 @$(APPEND) [email protected] '#define R3PTRTYPE(R0Type) R0Type '
960 @$(APPEND) [email protected] '#define RT_SRC_POS __FILE__, __LINE__, __PRETTY_FUNCTION__ '
961 @$(APPEND) [email protected] '#define RT_SRC_POS_DECL const char *pszFile, unsigned iLine, const char *pszFunction '
962 @$(APPEND) [email protected] '#define RT_SRC_POS_ARGS pszFile, iLine, pszFunction '
963 @$(APPEND) [email protected] '#define RTCALL'
964 @$(APPEND) [email protected] '#define DECLINLINE(type) inline type '
965 @$(APPEND) [email protected] '#define DECL_FORCED_INLINE(type) inline type '
966 @$(APPEND) [email protected] '#define DECL_INVALID(type) type '
967
968 @$(APPEND) [email protected] '#define PDMDEVINSINT_DECLARED 1'
969 @$(APPEND) [email protected] '#define VBOX_WITH_HGCM 1'
970 @$(APPEND) [email protected] '#define VBOXCALL'
971
972 $(SED) -e '/__cdecl/d' \
973 -e '/^ *# *define.*DECL/!d' \
974 -e '/DECLS/d' \
975 -e '/DECLARE_CLS_/d' \
976 -e '/_SRC_POS_DECL/d' \
977 -e '/declspec/d' \
978 -e '/__attribute__/d' \
979 -e 's/# */#/g' \
980 -e 's/ */ /g' \
981 -e '/(type) DECLEXPORT/d' \
982 -e '/ DECLEXPORT_CLASS/d' \
983 -e 's/ *VBOXCALL//' \
984 -e 's/ *RTCALL//' \
985 -e 's/(type) DECLIMPORT(type)/(type) type/' \
986 -e '/ DECLASM(type) type/d' \
987 -e '/define *DECL..CALLBACKMEMBER(type[^)]*) *RT/d' \
988 -e '/define *DECLINLINE(type)/d' \
989 -e '/ *DECL_INVALID(/d' \
990 -e '/define RT[DATGRC03]*DECL(type) *DECLHIDDEN(type)/d' \
991 \
992 --append [email protected] \
993 $(filter-out include/VBox/err.h, $(wildcard include/VBox/*.h)) \
994 include/iprt/cdefs.h
995 $(CAT_EXT) [email protected] | sort | $(SED_EXT) -e 's/$$/\n/' --output [email protected]
996 $(MV) -f [email protected] $@
997 $(RM) -f [email protected] [email protected] [email protected]
998ifeq ($(KBUILD_HOST),win)
999 @$(ECHO) 'TODO: Merge vslick.h with your "$(HOMEDRIVE)$(HOMEPATH)\Documents\My SlickEdit Config\x.y.z\usercpp.h" file.'
1000else
1001 @$(ECHO) "TODO: Merge ./vslick.h with your ~/.slickedit/x.y.z/unxcpp.h file."
1002endif
1003
1004
1005#
1006# Add fetching of the tools to the 'up[date][2]' targets.
1007#
1008up update up2 update2::
1009ifndef VBOX_OSE
1010 +$(MAKE) -C tools fetch
1011else
1012 $(MAKE) -C tools -f Makefile-ose.kmk fetch
1013endif
1014
1015
1016
1017#
1018# Aliases for building the SDK.
1019#
1020.NOTPARALLEL: sdk sdk-fetch
1021sdk:
1022 + $(KMK) VBOX_ONLY_SDK=1 \
1023 pass_bldprogs pass_others pass_installs pass_packing
1024
1025sdk-fetch:
1026 + $(KMK) KBUILD_TARGET=win KBUILD_TARGET_ARCH=x86 -C tools fetch
1027
1028
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