VirtualBox

source: vbox/trunk/Makefile.kmk@ 17827

Last change on this file since 17827 was 17642, checked in by vboxsync, 16 years ago

tools: Qt 4.4.3 for solaris

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