VirtualBox

source: vbox/trunk/Makefile.kmk@ 12637

Last change on this file since 12637 was 12576, checked in by vboxsync, 16 years ago

Makefiles: Install the license file from the root makefile instead of the two qt guis.

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

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette