VirtualBox

source: vbox/trunk/Makefile.kmk@ 16560

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

root/Makefile.kmk: Moved the subheader.kmk include down so the BLDDIRS for the docs will work right.

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

© 2023 Oracle
ContactPrivacy policyTerms of Use