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