VirtualBox

source: vbox/trunk/Makefile.kmk@ 29077

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

Makefile.kmk: only install EFI stuff if EFI is actually enabled

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