VirtualBox

source: vbox/trunk/Makefile.kmk@ 26034

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

Makefile: use time stamp file for EFI firmware unpacking, since the unzip tool preserves the time stamp and thus the unpacked files are always older than the zip file.

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