VirtualBox

source: vbox/trunk/Makefile.kmk@ 31967

Last change on this file since 31967 was 31967, checked in by vboxsync, 14 years ago

Installer-OSX: use current Qt version in the installer

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 55.3 KB
Line 
1# $Id: Makefile.kmk 31967 2010-08-25 18:12:00Z vboxsync $
2## @file
3# Top level makefile.
4#
5
6#
7# Copyright (C) 2006-2010 Oracle Corporation
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
18SUB_DEPTH = .
19include $(KBUILD_PATH)/subheader.kmk
20
21#
22# Sub-makefiles / Sub-directories.
23#
24ifdef VBOX_SINGLE_MAKEFILE
25 if defined(VBOX_WITH_DOCS) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_TESTSUITE)
26 include $(PATH_SUB_CURRENT)/doc/manual/Makefile.kmk
27 endif
28 include $(PATH_SUB_CURRENT)/src/Makefile.kmk
29else
30 if defined(VBOX_WITH_DOCS) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_TESTSUITE)
31 SUBDIRS = doc/manual
32 endif
33 SUBDIRS += src
34endif
35
36
37#
38# Clean up global stuff that Config.kmk generates.
39#
40OTHER_CLEAN += \
41 $(VBOX_PACKAGE_HEADER) \
42 $(VBOX_LICENSE_VER_KMK) \
43 $(VBOX_VERSION_MK) \
44 $(VBOX_VERSION_HEADER) \
45 $(VBOX_VERSION_STAMP) \
46 $(wildcard $(PATH_OUT)/version-stamp-*.*.*) \
47 $(VBOX_SVN_REV_KMK).ts \
48 $(VBOX_SVN_REV_KMK) \
49 $(PATH_OUT)/GCCConfig.kmk
50
51
52if !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_TESTSUITE) && !defined(VBOX_ONLY_DOCS) # -> line 412b ;-)
53
54ifndef VBOX_OSE
55 #
56 # Install the license (and misc non-executable stuff).
57 #
58 INSTALLS += nobin
59 nobin_INST = $(INST_BIN)
60 nobin_MODE = 0644
61 nobin_SOURCES =
62 ifdef VBOX_LICENSE_FILES
63 nobin_SOURCES += \
64 $(VBOX_BRAND_LICENSE_HTML)=>License-$(VBOX_LICENSE_VER).html \
65 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES),$(VBOX_BRAND_$(f)_LICENSE_HTML)=>License-$(VBOX_LICENSE_VER)-$(f).html)
66 endif
67endif # !OSE
68
69
70#
71# Install external binaries (mostly redistributable parts of tools we use).
72# This must be done *before* we build the manual.
73#
74# To avoid dragging in unnecessary tools and sdks here, we don't use the .win
75# and .linux property suffixes.
76#
77INSTALLS += bin
78
79bin_INST = $(INST_BIN)
80
81# The SDL DLLs
82if1of ($(KBUILD_TARGET), win os2)
83 ifneq ($(VBOX_WITH_VBOXSDL)$(VBOX_WITH_VBOXBFE),)
84 include $(KBUILD_PATH)/sdks/LIBSDL.kmk
85 bin_SOURCES += \
86 $(DLL_SDK_LIBSDL_SDL)
87 ifdef VBOX_WITH_SECURELABEL
88 bin_SOURCES += \
89 $(DLL_SDK_LIBSDL_SDLTTF)
90 endif
91 ifeq ($(KBUILD_TARGET),os2)
92 bin_SOURCES += \
93 $(DLL_SDK_LIBSDL_FSLIB)
94 endif
95 endif
96endif
97
98
99# The compiler runtime DLLs.
100ifeq ($(KBUILD_TARGET).$(VBOX_WITHOUT_COMPILER_REDIST),win.)
101 ifdef VBOX_USE_VCC80
102 include $(KBUILD_PATH)/tools/VCC80X86.kmk
103 include $(KBUILD_PATH)/tools/VCC80AMD64.kmk
104 bin_SOURCES.x86 += \
105 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
106 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcr80.dll=>Microsoft.VC80.CRT/msvcr80.dll \
107 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcp80.dll=>Microsoft.VC80.CRT/msvcp80.dll \
108 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>testcase/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
109 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcr80.dll=>testcase/Microsoft.VC80.CRT/msvcr80.dll \
110 $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcp80.dll=>testcase/Microsoft.VC80.CRT/msvcp80.dll
111 bin_SOURCES.amd64 += \
112 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
113 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcr80.dll=>Microsoft.VC80.CRT/msvcr80.dll \
114 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcp80.dll=>Microsoft.VC80.CRT/msvcp80.dll \
115 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>testcase/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
116 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcr80.dll=>testcase/Microsoft.VC80.CRT/msvcr80.dll \
117 $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcp80.dll=>testcase/Microsoft.VC80.CRT/msvcp80.dll
118 ifeq ($(VBOX_VCC_CRT_TYPE),d)
119 bin_SOURCES.x86 += \
120 $(PATH_TOOL_VCC80X86)/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT/Microsoft.VC80.DebugCRT.manifest=>Microsoft.VC80.DebugCRT/Microsoft.VC80.DebugCRT.manifest \
121 $(PATH_TOOL_VCC80X86)/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT/msvcr80d.dll=>Microsoft.VC80.DebugCRT/msvcr80d.dll \
122 $(PATH_TOOL_VCC80X86)/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT/msvcp80d.dll=>Microsoft.VC80.DebugCRT/msvcp80d.dll \
123 $(PATH_TOOL_VCC80X86)/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT/Microsoft.VC80.DebugCRT.manifest=>testcase/Microsoft.VC80.DebugCRT/Microsoft.VC80.DebugCRT.manifest \
124 $(PATH_TOOL_VCC80X86)/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT/msvcr80d.dll=>testcase/Microsoft.VC80.DebugCRT/msvcr80d.dll \
125 $(PATH_TOOL_VCC80X86)/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT/msvcp80d.dll=>testcase/Microsoft.VC80.DebugCRT/msvcp80d.dll
126 bin_SOURCES.amd64 += \
127 $(PATH_TOOL_VCC80AMD64)/redist/Debug_NonRedist/amd64/Microsoft.VC80.DebugCRT/Microsoft.VC80.DebugCRT.manifest=>Microsoft.VC80.DebugCRT/Microsoft.VC80.DebugCRT.manifest \
128 $(PATH_TOOL_VCC80AMD64)/redist/Debug_NonRedist/amd64/Microsoft.VC80.DebugCRT/msvcr80d.dll=>Microsoft.VC80.DebugCRT/msvcr80d.dll \
129 $(PATH_TOOL_VCC80AMD64)/redist/Debug_NonRedist/amd64/Microsoft.VC80.DebugCRT/msvcp80d.dll=>Microsoft.VC80.DebugCRT/msvcp80d.dll \
130 $(PATH_TOOL_VCC80AMD64)/redist/Debug_NonRedist/amd64/Microsoft.VC80.DebugCRT/Microsoft.VC80.DebugCRT.manifest=>testcase/Microsoft.VC80.DebugCRT/Microsoft.VC80.DebugCRT.manifest \
131 $(PATH_TOOL_VCC80AMD64)/redist/Debug_NonRedist/amd64/Microsoft.VC80.DebugCRT/msvcr80d.dll=>testcase/Microsoft.VC80.DebugCRT/msvcr80d.dll \
132 $(PATH_TOOL_VCC80AMD64)/redist/Debug_NonRedist/amd64/Microsoft.VC80.DebugCRT/msvcp80d.dll=>testcase/Microsoft.VC80.DebugCRT/msvcp80d.dll
133 endif
134 endif
135 ifndef VBOX_USE_VCC80
136 VBOX_INSTALL_VCC70_RT = 1
137 endif
138 ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.x86)
139 VBOX_INSTALL_VCC70_RT = 1
140 endif
141 ifdef VBOX_INSTALL_VCC70_RT
142 include $(KBUILD_PATH)/tools/VCC70.kmk
143
144 ## @todo Move these defines to VCC70.
145 DLL_TOOL_VCC70_MSVCR71 ?= $(PATH_TOOL_VCC70)/bin/msvcr71.dll
146 ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCR71)),)
147 bin_SOURCES += \
148 $(DLL_TOOL_VCC70_MSVCR71)=>msvcr71.dll \
149 $(DLL_TOOL_VCC70_MSVCR71)=>testcase/msvcr71.dll
150 endif
151 ifeq ($(VBOX_VCC_CRT_TYPE),d)
152 DLL_TOOL_VCC70_MSVCR71D ?= $(PATH_TOOL_VCC70)/bin/msvcr71d.dll
153 ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCR71D)),)
154 bin_SOURCES += \
155 $(DLL_TOOL_VCC70_MSVCR71D)=>msvcr71d.dll \
156 $(DLL_TOOL_VCC70_MSVCR71D)=>testcase/msvcr71d.dll
157 endif
158 endif
159
160 DLL_TOOL_VCC70_MSVCP71 ?= $(PATH_TOOL_VCC70)/bin/msvcp71.dll
161 ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCP71)),)
162 bin_SOURCES += \
163 $(DLL_TOOL_VCC70_MSVCP71)=>msvcp71.dll \
164 $(DLL_TOOL_VCC70_MSVCP71)=>testcase/msvcp71.dll
165 endif
166 ifeq ($(VBOX_VCC_CRT_TYPE),d)
167 DLL_TOOL_VCC70_MSVCP71D ?= $(PATH_TOOL_VCC70)/bin/msvcp71d.dll
168 ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCP71D)),)
169 bin_SOURCES += \
170 $(DLL_TOOL_VCC70_MSVCP71D)=>msvcp71d.dll \
171 $(DLL_TOOL_VCC70_MSVCP71D)=>testcase/msvcp71d.dll
172 endif
173 endif
174
175 DLL_TOOL_VCC70_MSVCRT ?= $(PATH_TOOL_VCC70)/bin/msvcrt.dll
176 ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCRT)),)
177 bin_SOURCES += \
178 $(DLL_TOOL_VCC70_MSVCRT)=>msvcrt.dll \
179 $(DLL_TOOL_VCC70_MSVCRT)=>testcase/msvcrt.dll
180 endif
181 endif
182endif
183
184
185#
186# Install our Qt DLLs / Shared Objects / Frameworks.
187# Note: The installer fixes the darwin .dylibs when hardening is enabled.
188#
189ifeq ($(KBUILD_TARGET),darwin)
190 INSTALLS += qt4-bin
191 qt4-bin_MODE = 755
192 qt4-bin_INST = $(INST_VIRTUALBOX)Contents/
193 qt4-bin_SOURCES = $(foreach qtmod, QtCore QtGui QtNetwork $(if $(VBOX_GUI_USE_QGL), QtOpenGL,) \
194 ,$(PATH_SDK_QT4_LIB)/$(qtmod)$(VBOX_QT4_INFIX).framework/Versions/4/$(qtmod)$(VBOX_QT4_INFIX)=>Frameworks/$(qtmod)$(VBOX_QT4_INFIX).framework/Versions/4/$(qtmod)$(VBOX_QT4_INFIX))
195 ifdef VBOX_WITH_COCOA_QT
196 qt4-bin_SOURCES += \
197 $(PATH_SDK_QT4_LIB)/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/classes.nib=>Frameworks/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/classes.nib \
198 $(PATH_SDK_QT4_LIB)/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/info.nib=>Frameworks/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/info.nib \
199 $(PATH_SDK_QT4_LIB)/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/keyedobjects.nib=>Frameworks/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/keyedobjects.nib
200 endif
201 ifneq ($(wildcard $(VBOX_PATH_QT4)/plugins/accessible/libqtaccessiblewidgets.dylib),)
202 qt4-bin_SOURCES += \
203 $(VBOX_PATH_QT4)/plugins/accessible/libqtaccessiblewidgets.dylib=>MacOS/accessible/libqtaccessiblewidgets.dylib
204 endif
205 qt4-bin_SYMLINKS = $(foreach qtmod, QtCore QtGui QtNetwork $(if $(VBOX_GUI_USE_QGL), QtOpenGL,) \
206 ,Frameworks/$(qtmod)$(VBOX_QT4_INFIX).framework/$(qtmod)$(VBOX_QT4_INFIX)=>Versions/4/$(qtmod)$(VBOX_QT4_INFIX))
207 ifdef VBOX_WITH_COCOA_QT
208 qt4-bin_SYMLINKS += \
209 Frameworks/QtGui$(VBOX_QT4_INFIX).framework/Resources=>Versions/4/Resources/
210 endif
211else
212 ifdef VBOX_WITH_QT4_SUN
213 ifeq ($(KBUILD_TARGET),win)
214 INSTALLS += qt4-bin
215 qt4-bin_MODE = 755
216 qt4-bin_INST = $(INST_BIN)
217 qt4-bin_SOURCES = \
218 $(VBOX_PATH_QT4_LIB)/QtCoreVBox4.dll \
219 $(VBOX_PATH_QT4_LIB)/QtGuiVBox4.dll \
220 $(VBOX_PATH_QT4_LIB)/QtNetworkVBox4.dll \
221 $(if $(VBOX_GUI_USE_QGL), $(VBOX_PATH_QT4_LIB)/QtOpenGLVBox4.dll,) \
222 $(VBOX_PATH_QT4)/plugins/accessible/qtaccessiblewidgets4.dll=>accessible/qtaccessiblewidgets4.dll
223 else
224 INSTALLS += qt4-bin
225 qt4-bin_MODE = 755
226 qt4-bin_INST = $(INST_BIN)
227 qt4-bin_SOURCES = \
228 $(VBOX_PATH_QT4_LIB)/libQtCoreVBox.so.4 \
229 $(VBOX_PATH_QT4_LIB)/libQtGuiVBox.so.4 \
230 $(VBOX_PATH_QT4_LIB)/libQtNetworkVBox.so.4 \
231 $(if $(VBOX_GUI_USE_QGL), $(VBOX_PATH_QT4_LIB)/libQtOpenGLVBox.so.4,) \
232 $(VBOX_PATH_QT4)/plugins/accessible/libqtaccessiblewidgets$(SUFF_DLL)=>accessible/libqtaccessiblewidgets$(SUFF_DLL)
233 endif
234 endif # VBOX_WITH_QT4_SUN
235endif
236
237
238#
239# For building the combined package, just get the additions .ISO
240# once for amd64 to prevent version inconsistences. In all other
241# cases we get the .ISO per target architecture.
242#
243ifdef VBOX_WITH_ADDITIONS_FROM_BUILD_SERVER
244 ifdef VBOX_WITH_COMBINED_PACKAGE
245 ifeq ($(KBUILD_TARGET_ARCH),amd64)
246 INSTALLS += buildserver-additions
247 endif
248 else
249 INSTALLS += buildserver-additions
250 endif
251
252#
253# Install additions iso from the build server.
254# The $(CP)/$(RM) stuff can be replaced by a simple $(TOUCH) once that has
255# been added to kBuild.
256#
257buildserver-additions_INST = $(INST_ADDITIONS_ISO)
258buildserver-additions_MODE = 0644
259buildserver-additions_SOURCES = $(PATH_TARGET)/VBoxGuestAdditions.iso
260buildserver-additions_CLEANS = $(PATH_TARGET)/VBoxGuestAdditions.iso $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
261
262$(PATH_TARGET)/VBoxGuestAdditions.iso: $(VBOX_SVN_REV_KMK) $(PATH_DEVTOOLS)/bin/additions.sh | $$(dir $$@)
263 $(RM) -f $(PATH_TARGET)/VBoxGuestAdditions.iso $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
264 ifneq ($(KBUILD_HOST),win)
265 $(SHELL) $(PATH_DEVTOOLS)/bin/additions.sh --cmd fetch --filename $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
266 else
267 $(KMK) --affinity 1 -f $(MAKEFILE) VBOX_SINGLE_MAKEFILE= buildserver-additions-affinity-hack
268 endif
269 $(CP) -f $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp $(PATH_TARGET)/VBoxGuestAdditions.iso
270 $(RM) -f $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
271
272 ifeq ($(KBUILD_HOST),win)
273buildserver-additions-affinity-hack:
274 $(SHELL) $(PATH_DEVTOOLS)/bin/additions.sh --cmd fetch --filename $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
275 endif
276endif
277
278
279#
280#
281# Install documentation files (at the moment the .chm) from the build server.
282#
283ifdef VBOX_WITH_DOCS_FROM_BUILD_SERVER
284## @todo r=bird: Too much mess now for $(PATH_TARGET); move to doc/manual/.
285INSTALLS += buildserver-docs
286buildserver-docs_INST = $(INST_BIN)
287buildserver-docs_MODE = 0644
288buildserver-docs_SOURCES = \
289 $(addprefix $(PATH_TARGET)/, \
290 VirtualBox.chm UserManual.pdf \
291 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),VirtualBox_$(f).chm UserManual_$(f).pdf))
292buildserver-docs_CLEANS = \
293 $(buildserver-docs_0_OUTDIR)/unpacked.ts \
294 $(buildserver-docs_0_OUTDIR)/VBoxDocumentation.zip \
295 $(buildserver-docs_0_OUTDIR)/VBoxDocumentation.zip.tmp \
296 $(addprefix $(PATH_TARGET)/, \
297 VirtualBox.chm UserManual.pdf \
298 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),VirtualBox_$(f).chm UserManual_$(f).pdf))
299
300## @todo Hack to get at TOOL_ZIP_UNPACK; see if this can be integrated somehow...
301include $(KBUILD_PATH)/tools/ZIP.kmk
302
303$$(buildserver-docs_0_OUTDIR)/unpacked.ts +| $(PATH_TARGET)/VirtualBox.chm $(PATH_TARGET)/UserManual.pdf \
304$(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_TARGET)/VirtualBox_$(f).chm $(PATH_TARGET)/UserManual_$(f).pdf): \
305 $$(buildserver-docs_0_OUTDIR)/VBoxDocumentation.zip
306 $(call MSG_L1,Unpacking documentation)
307 $(QUIET)$(TOOL_ZIP_UNPACK) $(TOOL_ZIP_UNPACKFLAGS) -o $< -d $(PATH_TARGET)
308 $(APPEND) -t $@ "done"
309
310$$(buildserver-docs_0_OUTDIR)/VBoxDocumentation.zip: $(VBOX_SVN_REV_KMK) $(PATH_DEVTOOLS)/bin/documentation.sh | $$(dir $$@)
311 $(RM) -f $@ $@.tmp
312 ifneq ($(KBUILD_HOST),win)
313 $(SHELL) $(PATH_DEVTOOLS)/bin/documentation.sh --cmd fetch --filename $@.tmp
314 else
315 $(KMK) --affinity 1 -f $(MAKEFILE) VBOX_SINGLE_MAKEFILE= buildserver-documentation-affinity-hack
316 endif
317 $(CP) -f $@.tmp $@
318 $(RM) -f $@.tmp
319## @todo kBuild: The $(CP)/$(RM) stuff can be replaced by a simple $(TOUCH) once that has been added to kBuild.
320
321 ifeq ($(KBUILD_HOST),win)
322buildserver-documentation-affinity-hack:
323 $(SHELL) $(PATH_DEVTOOLS)/bin/documentation.sh --cmd fetch --filename $(buildserver-docs_0_OUTDIR)/VBoxDocumentation.zip.tmp
324 endif
325endif # VBOX_WITH_DOCS_FROM_BUILD_SERVER
326
327
328 ifdef VBOX_WITH_EFI
329 #
330 # Install EFI firmware image
331 #
332 ifdef VBOX_WITH_EFIFW_FROM_BUILD_SERVER
333 #
334 # Either from the build server.
335 #
336 INSTALLS += buildserver-efifw
337 buildserver-efifw_INST = $(INST_BIN)
338 buildserver-efifw_MODE = 0644
339 buildserver-efifw_SOURCES = \
340 $(buildserver-efifw_0_OUTDIR)/FV/VBOX.fd=>VBoxEFI32.fd \
341 $(buildserver-efifw_0_OUTDIR)/FV/VBOX64.fd=>VBoxEFI64.fd
342 buildserver-efifw_CLEANS = \
343 $(buildserver-efifw_0_OUTDIR)/unpacked.ts \
344 $(buildserver-efifw_0_OUTDIR)/FV/VBOX.fd \
345 $(buildserver-efifw_0_OUTDIR)/FV/VBOX64.fd \
346 $(buildserver-efifw_0_OUTDIR)/VBoxEfiFirmware.zip \
347 $(buildserver-efifw_0_OUTDIR)/VBoxEfiFirmware.zip.tmp
348 ## @todo rainy day: cleanup the output directory (zip contains lots more)
349
350 ## @todo Hack to get at TOOL_ZIP_UNPACK; see if this can be integrated somehow...
351 include $(KBUILD_PATH)/tools/ZIP.kmk
352
353 $$(buildserver-efifw_0_OUTDIR)/unpacked.ts \
354 +| $$(buildserver-efifw_0_OUTDIR)/FV/VBOX.fd \
355 $$(buildserver-efifw_0_OUTDIR)/FV/VBOX64.fd: \
356 $$(buildserver-efifw_0_OUTDIR)/VBoxEfiFirmware.zip
357 $(call MSG_L1,Unpacking EFI firmware)
358 $(QUIET)$(TOOL_ZIP_UNPACK) $(TOOL_ZIP_UNPACKFLAGS) -o $< -d $(buildserver-efifw_0_OUTDIR)
359 $(APPEND) -t $@ "done"
360
361 $$(buildserver-efifw_0_OUTDIR)/VBoxEfiFirmware.zip: \
362 $(VBOX_SVN_REV_KMK) $(PATH_DEVTOOLS)/bin/efi_firmware.sh | $$(dir $$@)
363 $(RM) -f $@ $@.tmp
364 ifneq ($(KBUILD_HOST),win)
365 $(SHELL) $(PATH_DEVTOOLS)/bin/efi_firmware.sh --cmd fetch --filename $@.tmp
366 else
367 $(KMK) --affinity 1 -f $(MAKEFILE) VBOX_SINGLE_MAKEFILE= buildserver-efifw-affinity-hack
368 endif
369 $(CP) -f $@.tmp $@
370 $(RM) -f $@.tmp
371## @todo kBuild: The $(CP)/$(RM) stuff can be replaced by a simple $(TOUCH) once that has been added to kBuild.
372
373 ifeq ($(KBUILD_HOST),win)
374 buildserver-efifw-affinity-hack:
375 $(SHELL) $(PATH_DEVTOOLS)/bin/efi_firmware.sh --cmd fetch --filename $(buildserver-efifw_0_OUTDIR)/VBoxEfiFirmware.zip.tmp
376 endif
377 else # !VBOX_WITH_EFIFW_FROM_BUILD_SERVER
378 #
379 # Or from the local copy
380 #
381 INSTALLS += local-efifw
382 local-efifw_INST = $(INST_BIN)
383 local-efifw_MODE = 0644
384 local-efifw_SOURCES = \
385 $(PATH_ROOT)/src/VBox/Devices/EFI/FirmwareBin/VBoxEFI32.fd=>VBoxEFI32.fd \
386 $(PATH_ROOT)/src/VBox/Devices/EFI/FirmwareBin/VBoxEFI64.fd=>VBoxEFI64.fd
387 endif # !VBOX_WITH_EFIFW_FROM_BUILD_SERVER
388 endif # VBOX_WITH_EFI
389
390
391#
392# Install staged binaries on platforms where we can't cross
393# compile things.
394#
395ifn1of ($(KBUILD_TARGET), l4 linux win)
396 VBOX_PATH_STAGED ?= .
397
398 # Additions.
399 ifndef VBOX_WITH_LINUX_ADDITIONS
400 ifndef VBOX_WITH_WIN32_ADDITIONS
401 ifneq ($(wildcard $(VBOX_PATH_STAGED)/VBoxGuestAdditions.iso),)
402 INSTALLS += staged-additions
403 staged-additions_INST = $(INST_ADDITIONS_ISO)
404 staged-additions_MODE = 0644
405 staged-additions_SOURCES = $(VBOX_PATH_STAGED)/VBoxGuestAdditions.iso
406 endif
407 endif
408 endif
409
410 # guesttool.exe
411 ifndef VBOX_WITH_WIN32_ADDITIONS
412 ifneq ($(wildcard $(VBOX_PATH_STAGED)/guesttool.exe),)
413 INSTALLS += staged-guesttool
414 staged-guesttool_INST = $(INST_BIN)
415 staged-guesttool_SOURCES = $(VBOX_PATH_STAGED)/guesttool.exe
416 endif
417 endif
418
419endif
420
421endif # !VBOX_ONLY_ADDITIONS && !VBOX_ONLY_TESTSUITE && !VBOX_ONLY_DOCS
422
423
424ifdef VBOX_ONLY_DOCS
425# It may sound a bit odd, but for preparing the documentation package the
426# doxygen documentation isn't needed and increases the build time a lot.
427docs:
428else # !VBOX_ONLY_DOCS
429#
430# Generate documentation.
431# (This should be converted into a separate pass or merged with an existing one later.)
432#
433 ifdef VBOX_SINGLE_MAKEFILE
434 ifdef VBOX_WITH_ALL_DOXYGEN_TARGETS
435docs: docs.Core
436 endif
437 else # !VBOX_SINGLE_MAKEFILE
438docs: $(if $(VBOX_WITH_ALL_DOXYGEN_TARGETS),docs.Core)
439 $(KMK) -C src/VBox/Main docs.Main
440 ifdef VBOX_WITH_ALL_DOXYGEN_TARGETS
441 $(KMK) -C src/VBox/Runtime docs.iprt
442 endif
443 endif # !VBOX_SINGLE_MAKEFILE
444endif # !VBOX_ONLY_DOCS
445
446docs.Core docs.core: $(PATH_TARGET)/docs.Core
447
448
449
450#
451# The core (VMM+REM+Devices+Main) documentation.
452#
453# This includes so much because we wish to have the complete CFGM
454# and GCFGM lists.
455#
456OTHER_CLEAN += \
457 $(PATH_TARGET)/Doxyfile.Core \
458 $(PATH_TARGET)/Doxyfile.Core.dep
459
460VBOX_CORE_DOXYFILE_INPUT_DIRS = \
461 include/iprt \
462 include/iprt/cpp \
463 include/iprt/linux \
464 include/VBox \
465 include/VBox/com \
466 include/VBox/HostServices \
467 include/VBox/GuestHost \
468 include/VBox/HGSMI \
469 src/VBox/VMM \
470 src/VBox/VMM/VMMR0 \
471 src/VBox/VMM/VMMGC \
472 src/VBox/VMM/VMMAll \
473 src/VBox/VMM/PATM \
474 src/VBox/VMM/PATM/VMMR0 \
475 src/VBox/VMM/PATM/VMMGC \
476 src/VBox/VMM/PATM/VMMAll \
477 src/VBox/VMM/VMMSwitcher \
478 src/VBox/Debugger \
479 src/VBox/Devices \
480 src/VBox/Devices/Audio \
481 src/VBox/Devices/Bus \
482 src/VBox/Devices/Graphics \
483 src/VBox/Devices/Graphics/BIOS \
484 src/VBox/Devices/Input \
485 src/VBox/Devices/Networking \
486 src/VBox/Devices/PC \
487 src/VBox/Devices/PC/BIOS \
488 src/VBox/Devices/Parallel \
489 src/VBox/Devices/Serial \
490 src/VBox/Devices/Storage \
491 src/VBox/Devices/VBoxHDDFormats \
492 src/VBox/Devices/VBoxHDDFormats/StorageCraft \
493 src/VBox/Devices/USB \
494 src/VBox/Devices/USB/darwin \
495 src/VBox/Devices/USB/linux \
496 src/VBox/Devices/USB/os2 \
497 src/VBox/Devices/USB/solaris \
498 src/VBox/Devices/USB/vrdp \
499 src/VBox/Devices/USB/win32 \
500 src/VBox/Devices/VMMDev \
501 src/VBox/Main/include \
502 src/VBox/Main/include/hgcm \
503 src/VBox/Main \
504 src/VBox/Main/glue \
505 src/VBox/Main/hgcm \
506 src/VBox/Main/webservice \
507 src/VBox/Main/xml \
508 src/VBox/Main/darwin \
509 src/VBox/Main/linux \
510 src/VBox/Main/os2 \
511 src/VBox/Main/solaris \
512 src/VBox/Main/win \
513 src/VBox/Main/xpcom \
514 src/VBox/HostServices \
515 src/VBox/HostServices/SharedClipboard \
516 src/VBox/HostServices/SharedFolders \
517 src/VBox/HostServices/SharedInfoServices \
518 src/VBox/HostServices/SharedOpenGL \
519 src/VBox/HostDrivers/Support \
520 src/VBox/HostDrivers/Support/darwin \
521 src/VBox/HostDrivers/Support/freebsd \
522 src/VBox/HostDrivers/Support/l4 \
523 src/VBox/HostDrivers/Support/linux \
524 src/VBox/HostDrivers/Support/os2 \
525 src/VBox/HostDrivers/Support/solaris \
526 src/VBox/HostDrivers/Support/win \
527 src/VBox/HostDrivers/VBoxNetFlt \
528 src/VBox/HostDrivers/VBoxNetFlt/darwin \
529 src/VBox/HostDrivers/VBoxNetFlt/linux \
530 src/VBox/HostDrivers/VBoxNetFlt/solaris \
531 src/VBox/HostDrivers/VBoxNetFlt/win \
532 src/VBox/HostDrivers/VBoxNetNat \
533 src/VBox/HostDrivers/VBoxNetNat/darwin \
534 src/VBox/HostDrivers/VBoxNetNat/linux \
535 src/VBox/HostDrivers/VBoxNetNat/solaris \
536 src/VBox/HostDrivers/VBoxNetNat/win \
537 src/VBox/HostDrivers/VBoxNetAdp \
538 src/VBox/HostDrivers/VBoxNetAdp/darwin \
539 src/VBox/HostDrivers/VBoxNetAdp/linux \
540 src/VBox/HostDrivers/VBoxNetAdp/solaris \
541 src/VBox/HostDrivers/VBoxNetAdp/win \
542 src/VBox/HostDrivers/VBoxUSB \
543 src/VBox/HostDrivers/VBoxUSB/darwin \
544 src/VBox/HostDrivers/VBoxUSB/os2 \
545 src/VBox/HostDrivers/VBoxUSB/solaris \
546 src/VBox/HostDrivers/VBoxUSB/win \
547 src/VBox/HostDrivers/VBoxUSB/win/Device \
548 src/VBox/HostDrivers/VBoxUSB/win/Device/amd64 \
549 src/VBox/HostDrivers/VBoxUSB/win/Device/x86 \
550 src/VBox/HostDrivers/VBoxUSB/win/Filter \
551 src/VBox/HostDrivers/VBoxUSB/win/Install \
552 src/VBox/HostDrivers/VBoxUSB/win/Monitor \
553 src/VBox/HostDrivers/VBoxUSB/win/Monitor/win32 \
554 src/VBox/HostDrivers/VBoxUSB/win/Monitor/win64 \
555 src/VBox/HostDrivers/VBoxUSB/win/usbd \
556
557# These must come first in order to make things look nice.
558VBOX_CORE_DOXYFILE_INPUT_FIRST =\
559 $(PATH_ROOT)/doc/VBox-doc.c \
560 $(PATH_ROOT)/doc/VBox-CodingGuidelines.cpp \
561 $(PATH_ROOT)/doc/VBox-MakefileGuidelines.cpp \
562 $(PATH_ROOT)/src/VBox/VMM/VMMCodingGuidelines.cpp \
563 $(PATH_ROOT)/src/VBox/VMM/VMMDocsRawMode.cpp \
564 $(PATH_ROOT)/include/VBox/cdefs.h \
565 $(PATH_ROOT)/include/VBox/vmapi.h \
566 $(PATH_ROOT)/include/VBox/vmm.h \
567 $(PATH_ROOT)/include/VBox/cpum.h \
568 $(PATH_ROOT)/include/VBox/mm.h \
569 $(PATH_ROOT)/include/VBox/pgm.h \
570 $(PATH_ROOT)/include/VBox/selm.h \
571 $(PATH_ROOT)/include/VBox/trpm.h \
572 $(PATH_ROOT)/include/VBox/patm.h \
573 $(PATH_ROOT)/include/VBox/dbgf.h \
574 $(PATH_ROOT)/include/VBox/stam.h \
575 $(PATH_ROOT)/include/VBox/em.h \
576 $(PATH_ROOT)/include/VBox/pdm.h \
577 $(PATH_ROOT)/include/VBox/rem.h \
578 $(PATH_ROOT)/include/VBox/iom.h \
579 $(PATH_ROOT)/include/VBox/cfgm.h \
580 $(PATH_ROOT)/include/VBox/tm.h \
581 $(PATH_ROOT)/include/VBox/csam.h \
582 $(PATH_ROOT)/include/VBox/ssm.h \
583 $(PATH_ROOT)/include/VBox/hwaccm.h \
584 $(PATH_ROOT)/include/VBox/hwacc_svm.h \
585 $(PATH_ROOT)/include/VBox/hwacc_vmx.h \
586 \
587 $(PATH_ROOT)/src/VBox/VMM/CFGMInternal.h \
588 $(PATH_ROOT)/src/VBox/VMM/CPUMInternal.h \
589 $(PATH_ROOT)/src/VBox/VMM/DBGFInternal.h \
590 $(PATH_ROOT)/src/VBox/VMM/EMInternal.h \
591 $(PATH_ROOT)/src/VBox/VMM/HWACCMInternal.h \
592 $(PATH_ROOT)/src/VBox/VMM/IOMInternal.h \
593 $(PATH_ROOT)/src/VBox/VMM/MMInternal.h \
594 $(PATH_ROOT)/src/VBox/VMM/PDMInternal.h \
595 $(PATH_ROOT)/src/VBox/VMM/PGMInternal.h \
596 $(PATH_ROOT)/src/VBox/VMM/PATM/CSAMInternal.h \
597 $(PATH_ROOT)/src/VBox/VMM/PATM/PATMInternal.h \
598 $(PATH_ROOT)/src/VBox/VMM/REMInternal.h \
599 $(PATH_ROOT)/src/VBox/VMM/SELMInternal.h \
600 $(PATH_ROOT)/src/VBox/VMM/SSMInternal.h \
601 $(PATH_ROOT)/src/VBox/VMM/STAMInternal.h \
602 $(PATH_ROOT)/src/VBox/VMM/TMInternal.h \
603 $(PATH_ROOT)/src/VBox/VMM/TRPMInternal.h \
604 $(PATH_ROOT)/src/VBox/VMM/VMInternal.h \
605 $(PATH_ROOT)/src/VBox/VMM/VMMInternal.h \
606 \
607 $(PATH_ROOT)/include/VBox/vm.h \
608 \
609 $(PATH_ROOT)/include/VBox/sup.h \
610 $(PATH_ROOT)/include/VBox/VBoxHDD.h \
611 $(PATH_ROOT)/include/VBox/types.h \
612 $(PATH_ROOT)/include/VBox/err.h \
613 $(PATH_ROOT)/include/VBox/x86.h \
614 $(PATH_ROOT)/include/VBox/cpumdis.h \
615 $(PATH_ROOT)/include/VBox/dbggui.h \
616 $(PATH_ROOT)/include/VBox/dis.h \
617 $(PATH_ROOT)/include/VBox/disopcode.h \
618 $(PATH_ROOT)/include/VBox/intnet.h \
619 $(PATH_ROOT)/include/VBox/settings.h \
620 $(PATH_ROOT)/include/VBox/pci.h \
621 $(PATH_ROOT)/include/VBox/scsi.h \
622 $(PATH_ROOT)/include/VBox/shflsvc.h \
623 $(PATH_ROOT)/include/VBox/hgcmsvc.h \
624 $(PATH_ROOT)/include/VBox/usb.h \
625 $(PATH_ROOT)/include/VBox/vusb.h \
626 \
627 $(PATH_ROOT)/include/VBox/log.h \
628 $(PATH_ROOT)/include/VBox/param.h \
629 $(PATH_ROOT)/include/VBox/version.h
630
631VBOX_CORE_DOXYFILE_INPUT := \
632 $(filter-out %.cpp.h, $(sort $(wildcard $(addsuffix /*.h, $(VBOX_CORE_DOXYFILE_INPUT_DIRS)))) ) \
633 $(foreach dir, $(VBOX_CORE_DOXYFILE_INPUT_DIRS), $(wildcard $(dir)/*.cpp $(dir)/*.c $(dir)/.asm))
634VBOX_CORE_DOXYFILE_INPUT := \
635 $(VBOX_CORE_DOXYFILE_INPUT_FIRST) \
636 $(filter-out $(VBOX_CORE_DOXYFILE_INPUT_FIRST), $(VBOX_CORE_DOXYFILE_INPUT))
637
638# And some some additional stuff.
639VBOX_CORE_DOXYFILE_INPUT += \
640 $(PATH_ROOT)/src/recompiler/VBoxRecompiler.c \
641 $(PATH_ROOT)/src/recompiler/VBoxREMWrapper.cpp
642
643
644VBOX_CORE_DOXYFILE_OUTPUT = $(PATH_OUT)/docs/Core
645BLDDIRS += $(VBOX_CORE_DOXYFILE_OUTPUT)
646
647-include $(PATH_TARGET)/Doxyfile.Core.dep
648
649# Generate the Doxyfile
650$(PATH_TARGET)/Doxyfile.Core: Doxyfile.Core \
651 $(comp-vars VBOX_CORE_DOXYFILE_INPUT,DOXYGEN_INPUT_PREV,FORCE) \
652 $(comp-vars VBOX_CORE_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE) \
653 | $$(dir $$@)
654 $(RM) -f $@ $@.tmp $(PATH_TARGET)/Doxyfile.Core.dep
655 $(CP) -f Doxyfile.Core $@.tmp
656 $(APPEND) $@.tmp
657 $(APPEND) $@.tmp "OUTPUT_DIRECTORY = $(VBOX_CORE_DOXYFILE_OUTPUT)"
658 $(APPEND) $@.tmp "WARN_LOGFILE = $(VBOX_CORE_DOXYFILE_OUTPUT)/errors"
659 $(APPEND) $@.tmp "INCLUDE_PATH = $(PATH_ROOT)/include $(PATH_ROOT)/src/VBox/VMM $(PATH_ROOT)/src/VBox/Main/include "
660 $(APPEND) $@.tmp "INCLUDE_FILE_PATTERNS = *.cpp.h"
661 $(APPEND) $@.tmp
662 $(APPEND) $@.tmp "INPUT = $(VBOX_CORE_DOXYFILE_INPUT)"
663 $(APPEND) $@.tmp
664 $(APPEND) $@.tmp "PREDEFINED += $(DEFS) $(DEFS.$(KBUILD_TARGET)) $(DEFS.$(KBUILD_TARGET_ARCH)) $(ARCH_BITS_DEFS)"
665 $(APPEND) $@.tmp "PREDEFINED += ARCH_BITS=HC_ARCH_BITS R3_ARCH_BITS=HC_ARCH_BITS R0_ARCH_BITS=HC_ARCH_BITS "
666 $(APPEND) $@.tmp
667 $(MV) -f $@.tmp $@
668 @$(APPEND) $(PATH_TARGET)/Doxyfile.Core.dep "DOXYGEN_OUTPUT_PREV = $(VBOX_CORE_DOXYFILE_OUTPUT)"
669 @$(APPEND) $(PATH_TARGET)/Doxyfile.Core.dep "DOXYGEN_INPUT_PREV = $(VBOX_CORE_DOXYFILE_INPUT)"
670
671# Do the actual job.
672$(PATH_TARGET)/docs.Core: $(PATH_TARGET)/Doxyfile.Core $$(VBOX_CORE_DOXYFILE_INPUT) | $(VBOX_CORE_DOXYFILE_OUTPUT)/
673 $(RM) -f $(PATH_TARGET)/docs.Core
674 $(RM) -Rf $(VBOX_CORE_DOXYFILE_OUTPUT)/html/
675 doxygen $(PATH_TARGET)/Doxyfile.Core
676 $(APPEND) $(PATH_TARGET)/docs.Core
677
678
679#
680# Alias for kmk_time. Used by both the additions and testsuite build setups.
681#
682VBOX_KMK_TIME = $(KBUILD_BIN_PATH)/kmk_time
683
684
685#
686# Build the additions, all of them.
687#
688# This is currently tailored (hardcoded) for the additions
689# build box. Can make it pretty and configurable later.
690#
691# The fetching must be done in serial fashion, while the building
692# should be more flexible wrt to -jN.
693#
694additions-fetch:
695 + $(KMK) -C tools fetch VBOX_ONLY_ADDITIONS=1
696 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=linux BUILD_TARGET_ARCH=amd64 BUILD_TARGET=linux VBOX_ONLY_ADDITIONS=1
697 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=linux BUILD_TARGET_ARCH=x86 BUILD_TARGET=linux VBOX_ONLY_ADDITIONS=1
698# + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=os2 BUILD_TARGET_ARCH=x86 BUILD_TARGET=os2 VBOX_ONLY_ADDITIONS=1
699 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=solaris BUILD_TARGET_ARCH=amd64 BUILD_TARGET=solaris VBOX_ONLY_ADDITIONS=1
700 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=solaris BUILD_TARGET_ARCH=x86 BUILD_TARGET=solaris VBOX_ONLY_ADDITIONS=1
701 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=win BUILD_TARGET_ARCH=amd64 BUILD_TARGET=win VBOX_ONLY_ADDITIONS=1
702 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=win BUILD_TARGET_ARCH=x86 BUILD_TARGET=win VBOX_ONLY_ADDITIONS=1
703
704
705## @todo Currently combined solaris additions building assumes that amd64 is
706# built first. The windows amd64 additions need some x86 files, so don't change
707# the order of the windows builds. TODO: Split building and packing for these two VMs.
708additions-build: \
709 additions-build-solaris.amd64 \
710 additions-build-solaris.x86 \
711 additions-build-win.x86 \
712 additions-build-win.amd64 \
713 additions-build-os2.x86 \
714 additions-build-linux.x86.combined
715
716VBOX_ADDITIONS_BUILD.amd64 = VBOX_ONLY_ADDITIONS=1 VBOX_WITHOUT_ADDITIONS_ISO=1 \
717 KBUILD_TYPE=$(KBUILD_TYPE) BUILD_TYPE=$(KBUILD_TYPE) \
718 KBUILD_TARGET_ARCH=amd64 BUILD_TARGET_ARCH=amd64 \
719 VBOX_SVN_REV=$(VBOX_SVN_REV)
720
721VBOX_ADDITIONS_BUILD.x86 = VBOX_ONLY_ADDITIONS=1 VBOX_WITHOUT_ADDITIONS_ISO=1 \
722 KBUILD_TYPE=$(KBUILD_TYPE) BUILD_TYPE=$(KBUILD_TYPE) \
723 KBUILD_TARGET_ARCH=x86 BUILD_TARGET_ARCH=x86 \
724 VBOX_SVN_REV=$(VBOX_SVN_REV)
725
726# Automatically determine the additions build subdir name. Used for figuring
727# out directory names inside the additions building VMs.
728VBOX_ADDITIONS_BUILD_SUBDIRNAME := $(lastword $(subst /, ,$(PATH_ROOT)))
729
730# When building in parallel on a Windows host, make sure we finish the host
731# bit before kicking off any UNIX guest or we'll run into file sharing issues.
732ifeq ($(KBUILD_TARGET),win)
733VBOX_ADDITIONS_BUILD_WIN_HOST_FIRST = additions-build-win.x86 additions-build-win.amd64
734else
735VBOX_ADDITIONS_BUILD_WIN_HOST_FIRST =
736endif
737
738# ASSUMES the 32-bit edition has been built already. Also for serializing VM access.
739additions-build-win.amd64: additions-build-win.x86
740ifeq ($(KBUILD_TARGET),win)
741 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.amd64) all $(VBOX_ADD_HOST_BUILD_TWEAK)
742 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.amd64) packing
743else
744 $(call MSG_L1,Building Windows/amd64 additions)
745 $(VBOX_KMK_TIME) ssh vbox@192.168.27.5 " echo $@ && cd e:/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh kmk $(VBOX_ADDITIONS_BUILD.amd64) all packing "
746endif
747
748additions-build-win.x86:
749ifeq ($(KBUILD_TARGET),win)
750 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86) all $(VBOX_ADD_HOST_BUILD_TWEAK)
751 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86) packing
752else
753 $(call MSG_L1,Building Windows/x86 additions)
754 $(VBOX_KMK_TIME) ssh vbox@192.168.27.5 " echo $@ && cd e:/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh kmk $(VBOX_ADDITIONS_BUILD.x86) all packing"
755endif
756
757# ASSUMES the 64-bit edition are built first. This also serializes VM access.
758ifeq ($(KBUILD_TARGET),solaris)
759additions-build-solaris.amd64:
760 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.amd64) all $(VBOX_ADD_HOST_BUILD_TWEAK)
761 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.amd64) packing
762
763additions-build-solaris.x86: additions-build-solaris.amd64
764 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86) VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE=1 all $(VBOX_ADD_HOST_BUILD_TWEAK)
765 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86) VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE=1 packing
766
767else
768additions-build-solaris.rsync-into-vm: $(VBOX_ADDITIONS_BUILD_WIN_HOST_FIRST)
769 $(VBOX_KMK_TIME) 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)
770
771additions-build-solaris.build-it: additions-build-solaris.rsync-into-vm
772 $(call MSG_L1,Building Solaris/amd64 additions)
773 $(VBOX_KMK_TIME) ssh vbox@192.168.27.4 " echo $@/amd64 && cd /mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.amd64) all packing"
774 $(call MSG_L1,Building Solaris/x86 additions)
775 $(VBOX_KMK_TIME) ssh vbox@192.168.27.4 " echo $@/x86 && cd /mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.x86) all packing VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE=1"
776
777additions-build-solaris.rsync-out-of-vm: additions-build-solaris.build-it
778 $(VBOX_KMK_TIME) rsync -a --delete 192.168.27.4:/mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME)/out/solaris.x86 out/
779 $(VBOX_KMK_TIME) rsync -a --delete 192.168.27.4:/mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME)/out/solaris.amd64 out/
780
781.NOTPARALLEL: additions-build-solaris.rsync-out-of-vm additions-build-solaris.rsync-into-vm
782.PHONY: additions-build-solaris.rsync-out-of-vm additions-build-solaris.rsync-into-vm additions-build-solaris.build-it
783
784additions-build-solaris.amd64: additions-build-solaris.rsync-out-of-vm
785additions-build-solaris.x86: additions-build-solaris.rsync-out-of-vm
786endif
787
788additions-build-os2.x86:
789#ifeq ($(KBUILD_TARGET),os2)
790# + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86) all $(VBOX_ADD_HOST_BUILD_TWEAK)
791# + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86) packing
792#else
793# $(VBOX_KMK_TIME) ssh vbox@192.168.27.3 " cd /mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.x86) "
794#endif
795
796additions-build-linux.amd64: $(VBOX_ADDITIONS_BUILD_WIN_HOST_FIRST)
797ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),linux.amd64)
798 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.amd64) all $(VBOX_ADD_HOST_BUILD_TWEAK)
799 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.amd64) packing VBOX_WITHOUT_LINUX_GUEST_PACKAGE=1
800else
801 $(call MSG_L1,Building Linux/amd64 additions)
802 $(VBOX_KMK_TIME) ssh vbox@192.168.27.12 " echo $@ && cd /mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.amd64) all packing VBOX_WITHOUT_LINUX_GUEST_PACKAGE=1"
803endif
804
805additions-build-linux.x86: $(VBOX_ADDITIONS_BUILD_WIN_HOST_FIRST)
806ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),linux.x86)
807 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86) all $(VBOX_ADD_HOST_BUILD_TWEAK)
808 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86) packing VBOX_WITHOUT_LINUX_GUEST_PACKAGE=1
809else
810 $(call MSG_L1,Building Linux/x86 additions)
811 $(VBOX_KMK_TIME) ssh vbox@192.168.27.2 " echo $@ && cd /mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.x86) all packing VBOX_WITHOUT_LINUX_GUEST_PACKAGE=1"
812endif
813
814# Combined Linux Additions .run package. This depends on the archives
815# created during packing by the archetecture-specific builds.
816additions-build-linux.x86.combined: $(VBOX_ADDITIONS_BUILD_WIN_HOST_FIRST) additions-build-linux.x86 additions-build-linux.amd64
817ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),linux.x86)
818 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86) all $(VBOX_ADD_HOST_BUILD_TWEAK)
819 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_ADDITIONS_BUILD.x86) packing VBOX_WITH_COMBINED_LINUX_GUEST_PACKAGE=1
820else
821 $(call MSG_L1,Building Linux/x86 additions)
822 $(VBOX_KMK_TIME) ssh vbox@192.168.27.2 " echo $@ && cd /mnt/tinderbox/$(VBOX_ADDITIONS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_ADDITIONS_BUILD.x86) all packing VBOX_WITH_COMBINED_LINUX_GUEST_PACKAGE=1"
823endif
824
825
826additions-packing:
827 + $(KMK) VBOX_ONLY_ADDITIONS=1 \
828 VBOX_WITH_ADDITIONS_ISO.freebsd.amd64= \
829 VBOX_WITH_ADDITIONS_ISO.freebsd.x86= \
830 VBOX_WITH_ADDITIONS_ISO.linux.amd64= \
831 VBOX_WITH_ADDITIONS_ISO.linux.x86=1 \
832 VBOX_WITH_COMBINED_LINUX_GUEST_PACKAGE=1 \
833 VBOX_WITH_ADDITIONS_ISO.solaris.amd64=1 \
834 VBOX_WITH_ADDITIONS_ISO.solaris.x86=1 \
835 VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE=1 \
836 VBOX_WITH_ADDITIONS_ISO.win.amd64=1 \
837 VBOX_WITH_ADDITIONS_ISO.win.x86=1 \
838 -C src/VBox/Additions \
839 $(VBOX_PATH_ADDITIONS)/VBoxGuestAdditions.iso
840
841.PHONY: \
842 additions-build-win.x86 \
843 additions-build-win.amd64 \
844 additions-build-solaris.amd64 \
845 additions-build-solaris.x86 \
846 additions-build-os2.x86 \
847 additions-build-linux.amd64 \
848 additions-build-linux.x86 \
849 additions-build-linux.x86.combined \
850 additions-packing
851
852
853#
854# Build the test suite, all of it.
855#
856# This is currently tailored (hardcoded) for the additions build box just like
857# the additions build above, which it in fact is a copy of.
858#
859testsuite-fetch:
860 + $(KMK) -C tools fetch VBOX_ONLY_TESTSUITE=1
861# + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=darwin BUILD_TARGET_ARCH=amd64 BUILD_TARGET=darwin VBOX_ONLY_TESTSUITE=1
862# + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=darwin BUILD_TARGET_ARCH=x86 BUILD_TARGET=darwin VBOX_ONLY_TESTSUITE=1
863 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=linux BUILD_TARGET_ARCH=amd64 BUILD_TARGET=linux VBOX_ONLY_TESTSUITE=1
864 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=linux BUILD_TARGET_ARCH=x86 BUILD_TARGET=linux VBOX_ONLY_TESTSUITE=1
865# + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=os2 BUILD_TARGET_ARCH=x86 BUILD_TARGET=os2 VBOX_ONLY_TESTSUITE=1
866 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=solaris BUILD_TARGET_ARCH=amd64 BUILD_TARGET=solaris VBOX_ONLY_TESTSUITE=1
867 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=solaris BUILD_TARGET_ARCH=x86 BUILD_TARGET=solaris VBOX_ONLY_TESTSUITE=1
868 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=win BUILD_TARGET_ARCH=amd64 BUILD_TARGET=win VBOX_ONLY_TESTSUITE=1
869 + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=win BUILD_TARGET_ARCH=x86 BUILD_TARGET=win VBOX_ONLY_TESTSUITE=1
870
871
872testsuite-build: \
873 testsuite-build-solaris.amd64 \
874 testsuite-build-solaris.x86 \
875 testsuite-build-win.x86 \
876 testsuite-build-win.amd64 \
877 testsuite-build-os2.x86 \
878 testsuite-build-linux.amd64 \
879 testsuite-build-linux.x86
880
881VBOX_TESTSUITE_BUILD.amd64 = VBOX_ONLY_TESTSUITE=1 \
882 KBUILD_TYPE=$(KBUILD_TYPE) BUILD_TYPE=$(KBUILD_TYPE) \
883 KBUILD_TARGET_ARCH=amd64 BUILD_TARGET_ARCH=amd64 \
884 VBOX_SVN_REV=$(VBOX_SVN_REV)
885
886VBOX_TESTSUITE_BUILD.x86 = VBOX_ONLY_TESTSUITE=1 \
887 KBUILD_TYPE=$(KBUILD_TYPE) BUILD_TYPE=$(KBUILD_TYPE) \
888 KBUILD_TARGET_ARCH=x86 BUILD_TARGET_ARCH=x86 \
889 VBOX_SVN_REV=$(VBOX_SVN_REV)
890
891# Automatically determine the testsuite build subdir name. Used for figuring
892# out directory names inside the test suite building VMs.
893VBOX_TESTSUITE_BUILD_SUBDIRNAME := $(lastword $(subst /, ,$(PATH_ROOT)))
894
895# When building in parallel on a Windows host, make sure we finish the host
896# bit before kicking off any UNIX guest or we'll run into file sharing issues.
897ifeq ($(KBUILD_TARGET),win)
898VBOX_TESTSUITE_BUILD_WIN_HOST_FIRST = testsuite-build-win.x86 testsuite-build-win.amd64
899else
900VBOX_TESTSUITE_BUILD_WIN_HOST_FIRST =
901endif
902
903# ASSUMES the 32-bit edition has been built already. Also for serializing VM access.
904testsuite-build-win.amd64: testsuite-build-win.x86
905ifeq ($(KBUILD_TARGET),win)
906 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_TESTSUITE_BUILD.amd64) all $(VBOX_TESTSUITE_HOST_BUILD_TWEAK)
907else
908 $(call MSG_L1,Building Windows/amd64 testsuite)
909 $(VBOX_KMK_TIME) ssh vbox@192.168.27.5 " echo $@ && cd e:/$(VBOX_TESTSUITE_BUILD_SUBDIRNAME) && tools/env.sh kmk $(VBOX_TESTSUITE_BUILD.amd64) all "
910endif
911
912testsuite-build-win.x86:
913ifeq ($(KBUILD_TARGET),win)
914 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_TESTSUITE_BUILD.x86) all $(VBOX_TESTSUITE_HOST_BUILD_TWEAK)
915else
916 $(call MSG_L1,Building Windows/x86 testsuite)
917 $(VBOX_KMK_TIME) ssh vbox@192.168.27.5 " echo $@ && cd e:/$(VBOX_TESTSUITE_BUILD_SUBDIRNAME) && tools/env.sh kmk $(VBOX_TESTSUITE_BUILD.x86) all"
918endif
919
920ifeq ($(KBUILD_TARGET),solaris)
921testsuite-build-solaris.amd64:
922 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_TESTSUITE_BUILD.amd64) all $(VBOX_TESTSUITE_HOST_BUILD_TWEAK)
923
924testsuite-build-solaris.x86:
925 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_TESTSUITE_BUILD.x86) all $(VBOX_TESTSUITE_HOST_BUILD_TWEAK)
926
927else
928testsuite-build-solaris.rsync-into-vm: $(VBOX_TESTSUITE_BUILD_WIN_HOST_FIRST)
929 $(VBOX_KMK_TIME) 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_TESTSUITE_BUILD_SUBDIRNAME)
930
931testsuite-build-solaris.build-it: testsuite-build-solaris.rsync-into-vm
932 $(call MSG_L1,Building Solaris/amd64 testsuite)
933 $(VBOX_KMK_TIME) ssh vbox@192.168.27.4 " echo $@/amd64 && cd /mnt/tinderbox/$(VBOX_TESTSUITE_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_TESTSUITE_BUILD.amd64) all"
934 $(call MSG_L1,Building Solaris/x86 testsuite)
935 $(VBOX_KMK_TIME) ssh vbox@192.168.27.4 " echo $@/x86 && cd /mnt/tinderbox/$(VBOX_TESTSUITE_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_TESTSUITE_BUILD.x86) all "
936
937testsuite-build-solaris.rsync-out-of-vm: testsuite-build-solaris.build-it
938 $(VBOX_KMK_TIME) rsync -a --delete 192.168.27.4:/mnt/tinderbox/$(VBOX_TESTSUITE_BUILD_SUBDIRNAME)/out/solaris.x86 out/
939 $(VBOX_KMK_TIME) rsync -a --delete 192.168.27.4:/mnt/tinderbox/$(VBOX_TESTSUITE_BUILD_SUBDIRNAME)/out/solaris.amd64 out/
940
941.NOTPARALLEL: testsuite-build-solaris.rsync-out-of-vm testsuite-build-solaris.rsync-into-vm
942.PHONY: testsuite-build-solaris.rsync-out-of-vm testsuite-build-solaris.rsync-into-vm testsuite-build-solaris.build-it
943
944testsuite-build-solaris.amd64: testsuite-build-solaris.rsync-out-of-vm
945testsuite-build-solaris.x86: testsuite-build-solaris.rsync-out-of-vm
946endif
947
948testsuite-build-os2.x86:
949#ifeq ($(KBUILD_TARGET),os2)
950# + $(VBOX_KMK_TIME) $(KMK) $(VBOX_TESTSUITE_BUILD.x86) all $(VBOX_TESTSUITE_HOST_BUILD_TWEAK)
951#else
952# $(VBOX_KMK_TIME) ssh vbox@192.168.27.3 " cd /mnt/tinderbox/$(VBOX_TESTSUITE_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_TESTSUITE_BUILD.x86) "
953#endif
954
955testsuite-build-linux.amd64: $(VBOX_TESTSUITE_BUILD_WIN_HOST_FIRST)
956ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),linux.amd64)
957 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_TESTSUITE_BUILD.amd64) all $(VBOX_TESTSUITE_HOST_BUILD_TWEAK)
958else
959 $(call MSG_L1,Building Linux/amd64 testsuite)
960 $(VBOX_KMK_TIME) ssh vbox@192.168.27.12 " echo $@ && cd /mnt/tinderbox/$(VBOX_TESTSUITE_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_TESTSUITE_BUILD.amd64) all"
961endif
962
963testsuite-build-linux.x86: $(VBOX_TESTSUITE_BUILD_WIN_HOST_FIRST)
964ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),linux.x86)
965 + $(VBOX_KMK_TIME) $(KMK) $(VBOX_TESTSUITE_BUILD.x86) all $(VBOX_TESTSUITE_HOST_BUILD_TWEAK)
966else
967 $(call MSG_L1,Building Linux/x86 testsuite)
968 $(VBOX_KMK_TIME) ssh vbox@192.168.27.2 " echo $@ && cd /mnt/tinderbox/$(VBOX_TESTSUITE_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_TESTSUITE_BUILD.x86) all"
969endif
970
971
972testsuite-packing:
973 + $(KMK) VBOX_ONLY_TESTSUITE=1 \
974 VBOX_WITH_TESTSUITE_PACKING.darwin.amd64= \
975 VBOX_WITH_TESTSUITE_PACKING.darwin.x86= \
976 VBOX_WITH_TESTSUITE_PACKING.freebsd.amd64= \
977 VBOX_WITH_TESTSUITE_PACKING.freebsd.x86= \
978 VBOX_WITH_TESTSUITE_PACKING.linux.amd64=1 \
979 VBOX_WITH_TESTSUITE_PACKING.linux.x86=1 \
980 VBOX_WITH_TESTSUITE_PACKING.os2.x86= \
981 VBOX_WITH_TESTSUITE_PACKING.solaris.amd64=1 \
982 VBOX_WITH_TESTSUITE_PACKING.solaris.x86=1 \
983 VBOX_WITH_TESTSUITE_PACKING.win.amd64=1 \
984 VBOX_WITH_TESTSUITE_PACKING.win.x86=1 \
985 -C src/tests/testsuite \
986 $(PATH_OUT)/VBoxTestSuite.zip
987
988.PHONY: \
989 testsuite-build-win.x86 \
990 testsuite-build-win.amd64 \
991 testsuite-build-solaris.amd64 \
992 testsuite-build-solaris.x86 \
993 testsuite-build-os2.x86 \
994 testsuite-build-linux.amd64 \
995 testsuite-build-linux.x86 \
996 testsuite-packing
997
998
999#
1000# Build the EFI firmware, all of it.
1001#
1002# Mainly hooks right now, maybe we need them later.
1003#
1004efi-fetch:
1005
1006efi-build: $(VBOX_VERSION_HEADER)
1007 $(PATH_ROOT)/webtools/tinderbox/client/efi-build.sh
1008
1009efi-packing:
1010
1011#
1012# Generate VirtualBox-OSE-x.x.x.tar.bz2 (OSE) tarballs for distribution
1013# - includes kBuild
1014# - must be executed on an OSE checkout
1015#
1016
1017# the path where to store the tarball
1018TARBALLPATH ?= $(abspath $(PATH_ROOT)/..)
1019# the root directory inside the tarball
1020TARBALLROOT ?= VirtualBox-$(VBOX_VERSION_STRING)
1021# the name of the tarball file
1022TARBALLNAME ?= VirtualBox-$(VBOX_VERSION_STRING).tar.bz2
1023snapshot-ose:
1024 @$(call MSG_L1,Creating tarball $(TARBALLPATH)/$(TARBALLNAME))
1025 @if [ -r "$(PATH_ROOT)/src/VBox/RDP/server/server.cpp" ]; then \
1026 echo; \
1027 echo "Found RDP stuff, refused to build OSE tarball!"; \
1028 echo; \
1029 exit 1; \
1030 fi; \
1031 if [ -z "$(VBOX_OSE)" ]; then \
1032 echo; \
1033 echo "Please do 'kmk snapshot-ose VBOX_OSE=1'"; \
1034 echo; \
1035 exit 1; \
1036 fi
1037 $(QUIET)$(MKDIR) -p $(TARBALLPATH)
1038 $(QUIET)$(RM) -f $(TARBALLPATH)/$(TARBALLROOT)
1039 $(QUIET)$(LN_SYMLINK) $(PATH_ROOT) $(TARBALLPATH)/$(TARBALLROOT)
1040 $(QUIET)tar -cjh --owner 0 --group 0 --totals \
1041 --exclude=.svn \
1042 --exclude=$(TARBALLROOT)/out \
1043 --exclude=$(TARBALLROOT)/env.sh \
1044 --exclude=$(TARBALLROOT)/configure.log \
1045 --exclude=$(TARBALLROOT)/build.log \
1046 --exclude=$(TARBALLROOT)/AutoConfig.kmk \
1047 --exclude=$(TARBALLROOT)/LocalConfig.kmk \
1048 --exclude=$(TARBALLROOT)/prebuild \
1049 -C $(TARBALLPATH) \
1050 -f $(TARBALLPATH)/$(TARBALLNAME) \
1051 $(TARBALLROOT)
1052 $(QUIET)$(RM) $(TARBALLPATH)/$(TARBALLROOT)
1053
1054
1055#
1056# Generate VirtualBox-x.x.x.tar.bz2 (PUEL) zip archives for internal use only
1057# - includes kBuild
1058# - must be executed on an PUEL checkout
1059#
1060
1061# the path where to store the zip archive
1062ZIPPATH ?= $(abspath $(PATH_ROOT)/..)
1063# the root directory inside the zip archive
1064ZIPROOT ?= VirtualBox-$(VBOX_VERSION_STRING)
1065# the name of the zip archive
1066ZIPNAME ?= VirtualBox-$(VBOX_VERSION_STRING).zip
1067snapshot-puel:
1068 @$(call MSG_L1,Creating zip $(ZIPPATH)/$(ZIPNAME))
1069 @if [ ! -r "$(PATH_ROOT)/src/VBox/RDP/server/server.cpp" ]; then \
1070 echo; \
1071 echo "Did not find RDP stuff, is this an OSE branch?"; \
1072 echo; \
1073 exit 1; \
1074 fi
1075 @if [ -z "$(PASSWORD)" ]; then \
1076 echo; \
1077 echo "Please specify a password with PASSWORD=..."; \
1078 echo; \
1079 exit 1; \
1080 fi
1081 $(QUIET)$(MKDIR) -p $(ZIPPATH)
1082 $(QUIET)$(RM) -f $(ZIPPATH)/$(ZIPROOT)
1083 $(QUIET)$(RM) -f $(ZIPPATH)/$(ZIPNAME)
1084 $(QUIET)$(LN_SYMLINK) $(PATH_ROOT) $(ZIPPATH)/$(ZIPROOT)
1085 $(QUIET)(cd $(ZIPPATH); 7z a \
1086 -l -tzip -mmt=on -mx=7 -p$(PASSWORD) \
1087 -xr!.svn \
1088 -i!$(ZIPROOT)/Config.kmk \
1089 -i!$(ZIPROOT)/Doxyfile.Core \
1090 -i!$(ZIPROOT)/Makefile.kmk \
1091 -i!$(ZIPROOT)/configure \
1092 -i!$(ZIPROOT)/configure.vbs \
1093 -i!$(ZIPROOT)/doc \
1094 -i!$(ZIPROOT)/include \
1095 -i!$(ZIPROOT)/kBuild \
1096 -i!$(ZIPROOT)/src \
1097 -i!$(ZIPROOT)/tools/env.sh \
1098 -i!$(ZIPROOT)/tools/linux.x86/bin/* \
1099 -i!$(ZIPROOT)/tools/linux.amd64/bin/* \
1100 -x!$(ZIPROOT)/doc/Devices \
1101 -x!$(ZIPROOT)/doc/\*pdf \
1102 -x!$(ZIPROOT)/doc/L4VM \
1103 -x!$(ZIPROOT)/doc/VMM \
1104 -x!$(ZIPROOT)/doc/licenses_old \
1105 -x!$(ZIPROOT)/doc/manual/de_DE \
1106 -x!$(ZIPROOT)/doc/manual/fr_FR \
1107 -x!$(ZIPROOT)/src/tests \
1108 -x!$(ZIPROOT)/src/VBox/Artwork/2008-\* \
1109 -x!$(ZIPROOT)/src/VBox/Installer/AMI \
1110 -x!$(ZIPROOT)/src/VBox/Installer/Avanquest \
1111 -x!$(ZIPROOT)/src/VBox/Installer/Encore \
1112 -x!$(ZIPROOT)/src/VBox/Installer/linux/debian \
1113 -x!$(ZIPROOT)/src/VBox/Installer/linux/rpm \
1114 $(ZIPPATH)/$(ZIPNAME))
1115 $(QUIET)$(RM) $(ZIPPATH)/$(ZIPROOT)
1116
1117
1118#
1119# Generate ALL the rules.
1120#
1121include $(KBUILD_PATH)/subfooter.kmk
1122
1123
1124#
1125# Generate x86.mac and err.mac.
1126#
1127incs:
1128 $(SED) -f include/VBox/err.sed --output include/VBox/err.mac include/VBox/err.h
1129 $(APPEND) include/VBox/err.mac '%include "iprt/err.mac"'
1130 $(SED) -f include/VBox/err.sed --output include/iprt/err.mac include/iprt/err.h
1131 $(SED) -f include/VBox/various.sed --output include/VBox/x86.mac include/VBox/x86.h
1132 $(SED) -f include/VBox/various.sed --output include/VBox/param.mac include/VBox/param.h
1133 $(SED) -f include/VBox/various.sed --output include/VBox/VMMDevTesting.mac include/VBox/VMMDevTesting.h
1134
1135
1136#
1137# Generate Visual SlickEdit tagging #defines.
1138#
1139vslick.h: include/VBox/cdefs.h include/iprt/cdefs.h $(MAKEFILE)
1140 $(RM) -f -- $@ $@.tmp $@.tmp2 $@.tmp3
1141 $(APPEND) $@.tmp '// autogenerated'
1142 @$(APPEND) $@.tmp '#define IN_SLICKEDIT '
1143 @$(APPEND) $@.tmp '#define RT_C_DECLS_BEGIN '
1144 @$(APPEND) $@.tmp '#define RT_C_DECLS_END '
1145 @$(APPEND) $@.tmp '#define RT_NO_THROW '
1146 @$(APPEND) $@.tmp '#define RT_THROW(type) throw(type)'
1147
1148 @$(APPEND) $@.tmp '#define ATL_NO_VTABLE '
1149 @$(APPEND) $@.tmp '#define BEGIN_COM_MAP(a) '
1150 @$(APPEND) $@.tmp '#define COM_INTERFACE_ENTRY(a) '
1151 @$(APPEND) $@.tmp '#define COM_INTERFACE_ENTRY2(a,b) '
1152 @$(APPEND) $@.tmp '#define COM_INTERFACE_ENTRY3(a,b,c) '
1153 @$(APPEND) $@.tmp '#define COM_INTERFACE_ENTRY4(a,b,c,d) '
1154 @$(APPEND) $@.tmp '#define END_COM_MAP(a) '
1155
1156 @$(APPEND) $@.tmp '#define COM_DECL_READONLY_ENUM_AND_COLLECTION(a) '
1157 @$(APPEND) $@.tmp '#define COMGETTER(n) n '
1158 @$(APPEND) $@.tmp '#define COMSETTER(n) n '
1159 @$(APPEND) $@.tmp '#define ComSafeArrayIn(t,a) t a[] '
1160 @$(APPEND) $@.tmp '#define ComSafeArrayOut(t,a) t * a[] '
1161 @$(APPEND) $@.tmp '#define DECLARE_CLASSFACTORY(a) '
1162 @$(APPEND) $@.tmp '#define DECLARE_CLASSFACTORY_SINGLETON(a) '
1163 @$(APPEND) $@.tmp '#define DECLARE_REGISTRY_RESOURCEID(a) '
1164 @$(APPEND) $@.tmp '#define DECLARE_NOT_AGGREGATABLE(a) '
1165 @$(APPEND) $@.tmp '#define DECLARE_PROTECT_FINAL_CONSTRUCT(a) '
1166 @$(APPEND) $@.tmp '#define DECLARE_EMPTY_CTOR_DTOR(a) a(); ~a();'
1167 @$(APPEND) $@.tmp '#define DEFINE_EMPTY_CTOR_DTOR(a) a::a() {} a::~a() {}'
1168 @$(APPEND) $@.tmp '#define NS_DECL_ISUPPORTS '
1169 @$(APPEND) $@.tmp '#define NS_IMETHOD virtual nsresult '
1170 @$(APPEND) $@.tmp '#define NS_IMETHOD_(type) virtual type '
1171 @$(APPEND) $@.tmp '#define NS_IMETHODIMP nsresult '
1172 @$(APPEND) $@.tmp '#define NS_IMETHODIMP_(type) type '
1173 @$(APPEND) $@.tmp '#define PARSERS_EXPORT '
1174if1of ($(KBUILD_HOST),win)
1175 @$(APPEND) $@.tmp '#define STDMETHOD(m) virtual HRESULT m '
1176 @$(APPEND) $@.tmp '#define STDMETHOD_(type,m) virtual type m '
1177 @$(APPEND) $@.tmp '#define STDMETHODIMP HRESULT '
1178 @$(APPEND) $@.tmp '#define STDMETHODIMP_(type) type '
1179else
1180 @$(APPEND) $@.tmp '#define STDMETHOD(m) virtual nsresult m '
1181 @$(APPEND) $@.tmp '#define STDMETHOD_(type,m) virtual type m '
1182 @$(APPEND) $@.tmp '#define STDMETHODIMP nsresult '
1183 @$(APPEND) $@.tmp '#define STDMETHODIMP_(type) type '
1184endif
1185 @$(APPEND) $@.tmp '#define VBOX_SCRIPTABLE(a) public a '
1186 @$(APPEND) $@.tmp '#define VBOX_SCRIPTABLE_IMPL(a) '
1187 @$(APPEND) $@.tmp '#define VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(a) '
1188
1189 @$(APPEND) $@.tmp '#define CTX_SUFF(var) var##R3 '
1190 @$(APPEND) $@.tmp '#define CTXAllSUFF(var) var##R3 '
1191 @$(APPEND) $@.tmp '#define CTXSUFF(var) var##HC '
1192 @$(APPEND) $@.tmp '#define OTHERCTXSUFF(var) var##GC '
1193 @$(APPEND) $@.tmp '#define CTXALLMID(first, last) first##R3##last '
1194 @$(APPEND) $@.tmp '#define CTXMID(first, last) first##HC##last '
1195 @$(APPEND) $@.tmp '#define OTHERCTXMID(first, last) first##GC##last '
1196 @$(APPEND) $@.tmp '#define CTXTYPE(GCType, R3Type, R0Type) R3Type '
1197 @$(APPEND) $@.tmp '#define RCTYPE(RCType, HCType) RCType '
1198 @$(APPEND) $@.tmp '#define GCTYPE(GCType, HCType) GCType '
1199 @$(APPEND) $@.tmp '#define RCPTRTYPE(RCType) RCType '
1200 @$(APPEND) $@.tmp '#define GCPTRTYPE(GCType) GCType '
1201 @$(APPEND) $@.tmp '#define HCPTRTYPE(HCType) HCType '
1202 @$(APPEND) $@.tmp '#define R3R0PTRTYPE(HCType) HCType '
1203 @$(APPEND) $@.tmp '#define R0PTRTYPE(R3Type) R3Type '
1204 @$(APPEND) $@.tmp '#define R3PTRTYPE(R0Type) R0Type '
1205 @$(APPEND) $@.tmp '#define RT_SRC_POS __FILE__, __LINE__, __PRETTY_FUNCTION__ '
1206 @$(APPEND) $@.tmp '#define RT_SRC_POS_DECL const char *pszFile, unsigned iLine, const char *pszFunction '
1207 @$(APPEND) $@.tmp '#define RT_SRC_POS_ARGS pszFile, iLine, pszFunction '
1208 @$(APPEND) $@.tmp '#define RTCALL'
1209 @$(APPEND) $@.tmp '#define DECLINLINE(type) inline type '
1210 @$(APPEND) $@.tmp '#define DECL_FORCE_INLINE(type) inline type '
1211 @$(APPEND) $@.tmp '#define DECL_INVALID(type) type '
1212
1213 @$(APPEND) $@.tmp '#define PDMDEVINSINT_DECLARED 1'
1214 @$(APPEND) $@.tmp '#define VBOX_WITH_HGCM 1'
1215 @$(APPEND) $@.tmp '#define VBOXCALL'
1216
1217 @$(APPEND) $@.tmp '#define PGM_CTX(a,b) b'
1218 @$(APPEND) $@.tmp '#define PGM_CTX3(a,b,c) c'
1219 @$(APPEND) $@.tmp '#define PGM_GST_NAME(name) PGM_GST_NAME_AMD64(name)'
1220 @$(APPEND) $@.tmp '#define PGM_GST_NAME_REAL(name) PGM_CTX3(name)'
1221 @$(APPEND) $@.tmp '#define PGM_GST_NAME_PROT(name) PGM_CTX3(pgm,GstProt,name)'
1222 @$(APPEND) $@.tmp '#define PGM_GST_NAME_32BIT(name) PGM_CTX3(pgm,Gst32Bit,name)'
1223 @$(APPEND) $@.tmp '#define PGM_GST_NAME_PAE(name) PGM_CTX3(pgm,GstPAE,name)'
1224 @$(APPEND) $@.tmp '#define PGM_GST_NAME_AMD64(name) PGM_CTX3(pgm,GstAMD64,name)'
1225 @$(APPEND) $@.tmp '#define PGM_GST_DECL(type, name) type PGM_GST_NAME(name)'
1226 @$(APPEND) $@.tmp '#define PGM_SHW_NAME(name) PGM_GST_NAME_AMD64(name)'
1227 @$(APPEND) $@.tmp '#define PGM_SHW_NAME_32BIT(name) PGM_CTX3(pgm,Shw32Bit,name)'
1228 @$(APPEND) $@.tmp '#define PGM_SHW_NAME_PAE(name) PGM_CTX3(pgm,ShwPAE,name)'
1229 @$(APPEND) $@.tmp '#define PGM_SHW_NAME_AMD64(name) PGM_CTX3(pgm,ShwAMD64,name)'
1230 @$(APPEND) $@.tmp '#define PGM_SHW_NAME_NESTED(name) PGM_CTX3(pgm,ShwNested,name)'
1231 @$(APPEND) $@.tmp '#define PGM_SHW_NAME_EPT(name) PGM_CTX3(pgm,ShwEPT,name)'
1232 @$(APPEND) $@.tmp '#define PGM_SHW_DECL(type, name) type PGM_SHW_NAME(name)'
1233 @$(APPEND) $@.tmp '#define PGM_BTH_NAME(name) PGM_BTH_NAME_NESTED_AMD64(name)'
1234 @$(APPEND) $@.tmp '#define PGM_BTH_NAME_32BIT_REAL(name) PGM_CTX3(pgm,Bth,name)'
1235 @$(APPEND) $@.tmp '#define PGM_BTH_NAME_32BIT_PROT(name) PGM_CTX3(pgm,Bth,name)'
1236 @$(APPEND) $@.tmp '#define PGM_BTH_NAME_32BIT_32BIT(name) PGM_CTX3(pgm,Bth,name)'
1237 @$(APPEND) $@.tmp '#define PGM_BTH_NAME_PAE_REAL(name) PGM_CTX3(pgm,Bth,name)'
1238 @$(APPEND) $@.tmp '#define PGM_BTH_NAME_PAE_PROT(name) PGM_CTX3(pgm,Bth,name)'
1239 @$(APPEND) $@.tmp '#define PGM_BTH_NAME_PAE_32BIT(name) PGM_CTX3(pgm,Bth,name)'
1240 @$(APPEND) $@.tmp '#define PGM_BTH_NAME_PAE_PAE(name) PGM_CTX3(pgm,Bth,name)'
1241 @$(APPEND) $@.tmp '#define PGM_BTH_NAME_AMD64_PROT(name) PGM_CTX3(pgm,Bth,name)'
1242 @$(APPEND) $@.tmp '#define PGM_BTH_NAME_AMD64_AMD64(name) PGM_CTX3(pgm,Bth,name)'
1243 @$(APPEND) $@.tmp '#define PGM_BTH_NAME_NESTED_REAL(name) PGM_CTX3(pgm,Bth,name)'
1244 @$(APPEND) $@.tmp '#define PGM_BTH_NAME_NESTED_PROT(name) PGM_CTX3(pgm,Bth,name)'
1245 @$(APPEND) $@.tmp '#define PGM_BTH_NAME_NESTED_32BIT(name) PGM_CTX3(pgm,Bth,name)'
1246 @$(APPEND) $@.tmp '#define PGM_BTH_NAME_NESTED_PAE(name) PGM_CTX3(pgm,Bth,name)'
1247 @$(APPEND) $@.tmp '#define PGM_BTH_NAME_NESTED_AMD64(name) PGM_CTX3(pgm,Bth,name)'
1248 @$(APPEND) $@.tmp '#define PGM_BTH_NAME_EPT_REAL(name) PGM_CTX3(pgm,Bth,name)'
1249 @$(APPEND) $@.tmp '#define PGM_BTH_NAME_EPT_PROT(name) PGM_CTX3(pgm,Bth,name)'
1250 @$(APPEND) $@.tmp '#define PGM_BTH_NAME_EPT_32BIT(name) PGM_CTX3(pgm,Bth,name)'
1251 @$(APPEND) $@.tmp '#define PGM_BTH_NAME_EPT_PAE(name) PGM_CTX3(pgm,Bth,name)'
1252 @$(APPEND) $@.tmp '#define PGM_BTH_NAME_EPT_AMD64(name) PGM_CTX3(pgm,Bth,name)'
1253 @$(APPEND) $@.tmp '#define PGM_BTH_DECL(type, name) type PGM_BTH_NAME(name)'
1254
1255 $(SED) -e '/__cdecl/d' \
1256 -e '/^ *# *define.*DECL/!d' \
1257 -e '/DECLS/d' \
1258 -e '/DECLARE_CLS_/d' \
1259 -e '/_SRC_POS_DECL/d' \
1260 -e '/declspec/d' \
1261 -e '/__attribute__/d' \
1262 -e 's/# */#/g' \
1263 -e 's/ */ /g' \
1264 -e '/(type) DECLEXPORT/d' \
1265 -e '/ DECLEXPORT_CLASS/d' \
1266 -e 's/ *VBOXCALL//' \
1267 -e 's/ *RTCALL//' \
1268 -e 's/(type) DECLIMPORT(type)/(type) type/' \
1269 -e '/ DECLASM(type) type/d' \
1270 -e '/define *DECL..CALLBACKMEMBER(type[^)]*) *RT/d' \
1271 -e '/define *DECLINLINE(type)/d' \
1272 -e '/define *DECL_FORCE_INLINE(type)/d' \
1273 -e '/ *DECL_INVALID(/d' \
1274 -e '/define RT[DATGRC03]*DECL(type) *DECLHIDDEN(type)/d' \
1275 \
1276 --append $@.tmp \
1277 $(filter-out include/VBox/err.h, $(wildcard include/VBox/*.h)) \
1278 include/iprt/cdefs.h
1279 $(CAT_EXT) $@.tmp \
1280 | $(SED_EXT) -e 's/_/\x1F/g' -e 's/(/\x1E/g' -e 's/[[:space:]][[:space:]]*/\x1C/g' \
1281 | sort $(if-expr "$(KBUILD_TARGET)" == "win",,-f) \
1282 | $(SED_EXT) -e 's/\x1F/_/g' -e 's/\x1E/(/g' -e 's/\x1C/ /g' \
1283 | $(SED_EXT) -e 's/$$/\n/' --output $@.tmp2
1284 $(MV) -f $@.tmp2 $@
1285 $(RM) -f $@.tmp $@.tmp2 $@.tmp3
1286ifeq ($(KBUILD_HOST),win)
1287 @$(ECHO) 'TODO: Merge vslick.h with your "$(HOMEDRIVE)$(HOMEPATH)\Documents\My SlickEdit Config\x.y.z\usercpp.h" file.'
1288else ifeq ($(KBUILD_HOST),darwin)
1289 @$(ECHO) "TODO: Merge ./vslick.h with your ~/Library/Application\ Support/SlickEdit/x.y.z/unxcpp.h file."
1290else
1291 @$(ECHO) "TODO: Merge ./vslick.h with your ~/.slickedit/x.y.z/unxcpp.h file."
1292endif
1293
1294
1295#
1296# Add fetching of the tools to the 'up[date][2]' targets.
1297#
1298up update up2 update2::
1299ifndef VBOX_OSE
1300 +$(MAKE) -C tools fetch
1301else
1302 $(MAKE) -C tools -f Makefile-ose.kmk fetch
1303endif
1304
1305
1306
1307#
1308# Aliases for building the SDK.
1309#
1310.NOTPARALLEL: sdk sdk-fetch
1311sdk:
1312 + $(KMK) VBOX_ONLY_SDK=1 \
1313 pass_bldprogs pass_others pass_installs pass_packing
1314
1315sdk-fetch:
1316 + $(KMK) KBUILD_TARGET=win KBUILD_TARGET_ARCH=x86 -C tools fetch
1317
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