1 | # $Id: Makefile.kmk 6288 2008-01-09 00:47:09Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Top level makefile.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2007 innotek GmbH
|
---|
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 |
|
---|
18 | DEPTH = .
|
---|
19 | include $(PATH_KBUILD)/header.kmk
|
---|
20 |
|
---|
21 | ifdef VBOX_WITH_DOCS
|
---|
22 | ifndef VBOX_ONLY_ADDITIONS
|
---|
23 | SUBDIRS = doc/manual
|
---|
24 | endif
|
---|
25 | endif
|
---|
26 | SUBDIRS += src
|
---|
27 |
|
---|
28 | ifndef VBOX_ONLY_ADDITIONS
|
---|
29 | #
|
---|
30 | # Install external binaries (mostly redistributable parts of tools we use).
|
---|
31 | # This must be done *before* we build the manual.
|
---|
32 | #
|
---|
33 | # To avoid dragging in unnecessary tools and sdks here, we don't use the .win
|
---|
34 | # and .linux property suffixes.
|
---|
35 | #
|
---|
36 | INSTALLS = bin
|
---|
37 |
|
---|
38 | bin_INST = $(INST_BIN)
|
---|
39 |
|
---|
40 | # The SDL DLLs
|
---|
41 | ifeq ($(filter-out win os2,$(BUILD_TARGET)),)
|
---|
42 | ifneq ($(VBOX_WITH_VBOXSDL)$(VBOX_WITH_VBOXBFE),)
|
---|
43 | include $(PATH_KBUILD)/sdks/LIBSDL.kmk
|
---|
44 | bin_SOURCES += \
|
---|
45 | $(DLL_SDK_LIBSDL_SDL)
|
---|
46 | ifdef VBOX_WITH_SECURELABEL
|
---|
47 | bin_SOURCES += \
|
---|
48 | $(DLL_SDK_LIBSDL_SDLTTF)
|
---|
49 | endif
|
---|
50 | ifeq ($(BUILD_TARGET),os2)
|
---|
51 | bin_SOURCES += \
|
---|
52 | $(DLL_SDK_LIBSDL_FSLIB)
|
---|
53 | endif
|
---|
54 | endif
|
---|
55 | endif
|
---|
56 |
|
---|
57 |
|
---|
58 | # The Qt DLLs.
|
---|
59 | ifneq ($(VBOX_WITH_QTGUI),)
|
---|
60 | ifeq ($(BUILD_TARGET),win)
|
---|
61 | #include $(PATH_KBUILD)/sdks/QT3.kmk
|
---|
62 | #bin_SOURCES += \
|
---|
63 | # $(DLL_SDK_QT3_QT)
|
---|
64 | ifeq ($(BUILD_TARGET).$(BUILD_TARGET_ARCH),win.x86)
|
---|
65 | VBOX_DLL_QT ?= $(VBOX_PATH_QT)/bin/qt-mt333.dll
|
---|
66 | else ifeq ($(BUILD_TARGET).$(BUILD_TARGET_ARCH),win.amd64)
|
---|
67 | VBOX_DLL_QT ?= $(PATH_DEVTOOLS)/win.amd64/Qt/v3.3.8/lib/qt-mt338.dll=>qt-mt338.dll
|
---|
68 | endif
|
---|
69 | ifdef VBOX_DLL_QT
|
---|
70 | bin_SOURCES += \
|
---|
71 | $(VBOX_DLL_QT)=>$(not-dir $(VBOX_DLL_QT))
|
---|
72 | endif
|
---|
73 | else ifeq ($(BUILD_TARGET),os2)
|
---|
74 | VBOX_DLL_QT ?= $(lastword $(sort $(wildcard $(VBOX_PATH_QT)/bin/*qt*.dll)))
|
---|
75 | ifneq ($(strip $(VBOX_DLL_QT)),)
|
---|
76 | bin_SOURCES += \
|
---|
77 | $(VBOX_DLL_QT)=>$(not-dir $(VBOX_DLL_QT))
|
---|
78 | endif
|
---|
79 | else ifeq ($(VBOX_MUST_INSTALL_LIB_QT),1)
|
---|
80 | bin_SOURCES += \
|
---|
81 | $(LIB_QT)
|
---|
82 | endif
|
---|
83 | endif
|
---|
84 |
|
---|
85 |
|
---|
86 | # The compiler runtime DLLs.
|
---|
87 | ifeq ($(BUILD_TARGET).$(VBOX_WITHOUT_COMPILER_REDIST),win.)
|
---|
88 | ifdef VBOX_USE_VCC80
|
---|
89 | include $(PATH_KBUILD)/tools/VCC80X86.kmk
|
---|
90 | include $(PATH_KBUILD)/tools/VCC80AMD64.kmk
|
---|
91 | bin_SOURCES.x86 += \
|
---|
92 | $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
|
---|
93 | $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcr80.dll=>Microsoft.VC80.CRT/msvcr80.dll \
|
---|
94 | $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcp80.dll=>Microsoft.VC80.CRT/msvcp80.dll \
|
---|
95 | $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>testcase/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
|
---|
96 | $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcr80.dll=>testcase/Microsoft.VC80.CRT/msvcr80.dll \
|
---|
97 | $(PATH_TOOL_VCC80X86)/redist/x86/Microsoft.VC80.CRT/msvcp80.dll=>testcase/Microsoft.VC80.CRT/msvcp80.dll
|
---|
98 | bin_SOURCES.amd64 += \
|
---|
99 | $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
|
---|
100 | $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcr80.dll=>Microsoft.VC80.CRT/msvcr80.dll \
|
---|
101 | $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcp80.dll=>Microsoft.VC80.CRT/msvcp80.dll \
|
---|
102 | $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest=>testcase/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
|
---|
103 | $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcr80.dll=>testcase/Microsoft.VC80.CRT/msvcr80.dll \
|
---|
104 | $(PATH_TOOL_VCC80AMD64)/redist/amd64/Microsoft.VC80.CRT/msvcp80.dll=>testcase/Microsoft.VC80.CRT/msvcp80.dll
|
---|
105 | endif
|
---|
106 | ifndef VBOX_USE_VCC80
|
---|
107 | VBOX_INSTALL_VCC70_RT = 1
|
---|
108 | endif
|
---|
109 | ifeq ($(BUILD_TARGET).$(BUILD_TARGET_ARCH),win.x86)
|
---|
110 | VBOX_INSTALL_VCC70_RT = 1
|
---|
111 | endif
|
---|
112 | ifdef VBOX_INSTALL_VCC70_RT
|
---|
113 | include $(PATH_KBUILD)/tools/VCC70.kmk
|
---|
114 | ## @todo Move these defines to VCC70.
|
---|
115 | DLL_TOOL_VCC70_MSVCR71 ?= $(PATH_TOOL_VCC70)/bin/msvcr71.dll
|
---|
116 | ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCR71)),)
|
---|
117 | bin_SOURCES += \
|
---|
118 | $(DLL_TOOL_VCC70_MSVCR71)=>msvcr71.dll \
|
---|
119 | $(DLL_TOOL_VCC70_MSVCR71)=>testcase/msvcr71.dll
|
---|
120 | endif
|
---|
121 | DLL_TOOL_VCC70_MSVCP71 ?= $(PATH_TOOL_VCC70)/bin/msvcp71.dll
|
---|
122 | ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCP71)),)
|
---|
123 | bin_SOURCES += \
|
---|
124 | $(DLL_TOOL_VCC70_MSVCP71)=>msvcp71.dll \
|
---|
125 | $(DLL_TOOL_VCC70_MSVCP71)=>testcase/msvcp71.dll
|
---|
126 | endif
|
---|
127 | DLL_TOOL_VCC70_MSVCRT ?= $(PATH_TOOL_VCC70)/bin/msvcrt.dll
|
---|
128 | ifneq ($(wildcard $(DLL_TOOL_VCC70_MSVCRT)),)
|
---|
129 | bin_SOURCES += \
|
---|
130 | $(DLL_TOOL_VCC70_MSVCRT)=>msvcrt.dll \
|
---|
131 | $(DLL_TOOL_VCC70_MSVCRT)=>testcase/msvcrt.dll
|
---|
132 | endif
|
---|
133 | endif
|
---|
134 | endif
|
---|
135 |
|
---|
136 |
|
---|
137 | #
|
---|
138 | # Install additions iso from the build server.
|
---|
139 | # The $(CP)/$(RM) stuff can be replaced by a simple $(TOUCH) once that has
|
---|
140 | # been added to kBuild.
|
---|
141 | #
|
---|
142 | ## @todo need kmk_builtin_touch!
|
---|
143 | ifdef VBOX_WITH_ADDITIONS_FROM_BUILD_SERVER
|
---|
144 | INSTALLS += buildserver-additions
|
---|
145 | buildserver-additions_INST = $(INST_ADDITIONS)
|
---|
146 | buildserver-additions_MODE = 0644
|
---|
147 | buildserver-additions_SOURCES = $(PATH_TARGET)/VBoxGuestAdditions.iso
|
---|
148 | buildserver-additions_CLEANS = $(PATH_TARGET)/VBoxGuestAdditions.iso $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
|
---|
149 |
|
---|
150 | $(PATH_TARGET)/VBoxGuestAdditions.iso: $(VBOX_SVN_REV_KMK) $(PATH_DEVTOOLS)/bin/additions.sh | $(call DIRDEP, $(PATH_TARGET))
|
---|
151 | $(RM) -f $(PATH_TARGET)/VBoxGuestAdditions.iso $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
|
---|
152 | # $(PATH_DEVTOOLS)/bin/additions.sh --cmd fetch --filename $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
|
---|
153 | $(KMK) --affinity 1 -f $(MAKEFILE) buildserver-additions-affinity-hack
|
---|
154 | $(CP) -f $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp $(PATH_TARGET)/VBoxGuestAdditions.iso
|
---|
155 | $(RM) -f $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
|
---|
156 | $(QUIET)$(APPEND) $@ done
|
---|
157 |
|
---|
158 | buildserver-additions-affinity-hack:
|
---|
159 | $(SHELL) $(PATH_DEVTOOLS)/bin/additions.sh --cmd fetch --filename $(PATH_TARGET)/VBoxGuestAdditions.iso.tmp
|
---|
160 | endif
|
---|
161 |
|
---|
162 |
|
---|
163 | #
|
---|
164 | # Install staged binaries on platforms where we can't cross
|
---|
165 | # compile things.
|
---|
166 | #
|
---|
167 | ifneq ($(filter-out linux win l4, $(BUILD_TARGET)),)
|
---|
168 | VBOX_PATH_STAGED ?= .
|
---|
169 |
|
---|
170 | # Additions.
|
---|
171 | ifndef VBOX_WITH_LINUX_ADDITIONS
|
---|
172 | ifndef VBOX_WITH_WIN32_ADDITIONS
|
---|
173 | ifneq ($(wildcard $(VBOX_PATH_STAGED)/VBoxGuestAdditions.iso),)
|
---|
174 | INSTALLS += staged-additions
|
---|
175 | staged-additions_INST = $(INST_ADDITIONS)
|
---|
176 | staged-additions_MODE = 0644
|
---|
177 | staged-additions_SOURCES = $(VBOX_PATH_STAGED)/VBoxGuestAdditions.iso
|
---|
178 | endif
|
---|
179 | endif
|
---|
180 | endif
|
---|
181 |
|
---|
182 | # guesttool.exe
|
---|
183 | ifndef VBOX_WITH_WIN32_ADDITIONS
|
---|
184 | ifneq ($(wildcard $(VBOX_PATH_STAGED)/guesttool.exe),)
|
---|
185 | INSTALLS += staged-guesttool
|
---|
186 | staged-guesttool_INST = $(INST_BIN)
|
---|
187 | staged-guesttool_SOURCES = $(VBOX_PATH_STAGED)/guesttool.exe
|
---|
188 | endif
|
---|
189 | endif
|
---|
190 |
|
---|
191 | endif
|
---|
192 |
|
---|
193 | endif # !VBOX_ONLY_ADDITIONS
|
---|
194 |
|
---|
195 |
|
---|
196 | include $(PATH_KBUILD)/footer.kmk
|
---|
197 |
|
---|
198 |
|
---|
199 | #
|
---|
200 | # Generate documentation.
|
---|
201 | # (This should be converted into a separate pass or merged with an existing one later.)
|
---|
202 | #
|
---|
203 | docs: docs.Core
|
---|
204 | $(KMK) -C src/VBox/Main docs
|
---|
205 | $(KMK) -C src/VBox/Runtime docs
|
---|
206 |
|
---|
207 | docs.Core: $(PATH_TARGET)/docs.Core
|
---|
208 |
|
---|
209 |
|
---|
210 |
|
---|
211 | #
|
---|
212 | # The core (VMM+REM+Devices+Main) documentation.
|
---|
213 | #
|
---|
214 | # This includes so much because we wish to have the complete CFGM
|
---|
215 | # and GCFGM lists.
|
---|
216 | #
|
---|
217 | OTHER_CLEAN += \
|
---|
218 | $(PATH_TARGET)/Doxyfile \
|
---|
219 | $(PATH_TARGET)/Doxyfile.dep
|
---|
220 |
|
---|
221 | DOXYGEN_INPUT_DIRS = \
|
---|
222 | include/iprt \
|
---|
223 | include/VBox \
|
---|
224 | include/VBox/com \
|
---|
225 | include/VBox/HostServices \
|
---|
226 | src/VBox/VMM \
|
---|
227 | src/VBox/VMM/VMMR0 \
|
---|
228 | src/VBox/VMM/VMMGC \
|
---|
229 | src/VBox/VMM/VMMAll \
|
---|
230 | src/VBox/VMM/PATM \
|
---|
231 | src/VBox/VMM/PATM/VMMR0 \
|
---|
232 | src/VBox/VMM/PATM/VMMGC \
|
---|
233 | src/VBox/VMM/PATM/VMMAll \
|
---|
234 | src/VBox/VMM/VMMSwitcher \
|
---|
235 | src/VBox/Debugger \
|
---|
236 | src/VBox/Devices/ \
|
---|
237 | src/VBox/Devices/Audio \
|
---|
238 | src/VBox/Devices/Bus \
|
---|
239 | src/VBox/Devices/Graphics \
|
---|
240 | src/VBox/Devices/Graphics/BIOS \
|
---|
241 | src/VBox/Devices/Input \
|
---|
242 | src/VBox/Devices/Networking \
|
---|
243 | src/VBox/Devices/PC \
|
---|
244 | src/VBox/Devices/PC/BIOS \
|
---|
245 | src/VBox/Devices/Parallel \
|
---|
246 | src/VBox/Devices/Serial \
|
---|
247 | src/VBox/Devices/Storage \
|
---|
248 | src/VBox/Devices/VBoxHDDFormats \
|
---|
249 | src/VBox/Devices/VBoxHDDFormats/StorageCraft \
|
---|
250 | src/VBox/Devices/USB \
|
---|
251 | src/VBox/Devices/USB/darwin \
|
---|
252 | src/VBox/Devices/USB/linux \
|
---|
253 | src/VBox/Devices/USB/os2 \
|
---|
254 | src/VBox/Devices/USB/solaris \
|
---|
255 | src/VBox/Devices/USB/vrdp \
|
---|
256 | src/VBox/Devices/USB/win32 \
|
---|
257 | src/VBox/Devices/VMMDev \
|
---|
258 | src/VBox/Main/include \
|
---|
259 | src/VBox/Main/include/hgcm \
|
---|
260 | src/VBox/Main/ \
|
---|
261 | src/VBox/Main/glue \
|
---|
262 | src/VBox/Main/hgcm \
|
---|
263 | src/VBox/Main/webservice \
|
---|
264 | src/VBox/Main/xml \
|
---|
265 | src/VBox/Main/darwin \
|
---|
266 | src/VBox/Main/linux \
|
---|
267 | src/VBox/Main/os2 \
|
---|
268 | src/VBox/Main/solaris \
|
---|
269 | src/VBox/Main/win32 \
|
---|
270 |
|
---|
271 | # These must come first in order to make things look nice.
|
---|
272 | DOXYGEN_INPUT_FIRST =\
|
---|
273 | $(PATH_ROOT)/doc/VBox-doc.c \
|
---|
274 | $(PATH_ROOT)/doc/VBox-CodingGuidelines.cpp \
|
---|
275 | $(PATH_ROOT)/src/VBox/VMM/VMMCodingGuidelines.cpp \
|
---|
276 | $(PATH_ROOT)/src/VBox/VMM/VMMDocsRawMode.cpp \
|
---|
277 | $(PATH_ROOT)/include/VBox/cdefs.h \
|
---|
278 | $(PATH_ROOT)/include/VBox/vmapi.h \
|
---|
279 | $(PATH_ROOT)/include/VBox/vmm.h \
|
---|
280 | $(PATH_ROOT)/include/VBox/cpum.h \
|
---|
281 | $(PATH_ROOT)/include/VBox/mm.h \
|
---|
282 | $(PATH_ROOT)/include/VBox/pgm.h \
|
---|
283 | $(PATH_ROOT)/include/VBox/selm.h \
|
---|
284 | $(PATH_ROOT)/include/VBox/trpm.h \
|
---|
285 | $(PATH_ROOT)/include/VBox/patm.h \
|
---|
286 | $(PATH_ROOT)/include/VBox/dbgf.h \
|
---|
287 | $(PATH_ROOT)/include/VBox/stam.h \
|
---|
288 | $(PATH_ROOT)/include/VBox/em.h \
|
---|
289 | $(PATH_ROOT)/include/VBox/pdm.h \
|
---|
290 | $(PATH_ROOT)/include/VBox/rem.h \
|
---|
291 | $(PATH_ROOT)/include/VBox/iom.h \
|
---|
292 | $(PATH_ROOT)/include/VBox/cfgm.h \
|
---|
293 | $(PATH_ROOT)/include/VBox/tm.h \
|
---|
294 | $(PATH_ROOT)/include/VBox/csam.h \
|
---|
295 | $(PATH_ROOT)/include/VBox/ssm.h \
|
---|
296 | $(PATH_ROOT)/include/VBox/hwaccm.h \
|
---|
297 | $(PATH_ROOT)/include/VBox/hwacc_svm.h \
|
---|
298 | $(PATH_ROOT)/include/VBox/hwacc_vmx.h \
|
---|
299 | $(PATH_ROOT)/\
|
---|
300 | $(PATH_ROOT)/src/VBox/VMM/CFGMInternal.h \
|
---|
301 | $(PATH_ROOT)/src/VBox/VMM/CPUMInternal.h \
|
---|
302 | $(PATH_ROOT)/src/VBox/VMM/DBGFInternal.h \
|
---|
303 | $(PATH_ROOT)/src/VBox/VMM/EMInternal.h \
|
---|
304 | $(PATH_ROOT)/src/VBox/VMM/HWACCMInternal.h \
|
---|
305 | $(PATH_ROOT)/src/VBox/VMM/IOMInternal.h \
|
---|
306 | $(PATH_ROOT)/src/VBox/VMM/MMInternal.h \
|
---|
307 | $(PATH_ROOT)/src/VBox/VMM/PDMInternal.h \
|
---|
308 | $(PATH_ROOT)/src/VBox/VMM/PGMInternal.h \
|
---|
309 | $(PATH_ROOT)/src/VBox/VMM/PATM/CSAMInternal.h \
|
---|
310 | $(PATH_ROOT)/src/VBox/VMM/PATM/PATMInternal.h \
|
---|
311 | $(PATH_ROOT)/src/VBox/VMM/REMInternal.h \
|
---|
312 | $(PATH_ROOT)/src/VBox/VMM/SELMInternal.h \
|
---|
313 | $(PATH_ROOT)/src/VBox/VMM/SSMInternal.h \
|
---|
314 | $(PATH_ROOT)/src/VBox/VMM/STAMInternal.h \
|
---|
315 | $(PATH_ROOT)/src/VBox/VMM/TMInternal.h \
|
---|
316 | $(PATH_ROOT)/src/VBox/VMM/TRPMInternal.h \
|
---|
317 | $(PATH_ROOT)/src/VBox/VMM/VMInternal.h \
|
---|
318 | $(PATH_ROOT)/src/VBox/VMM/VMMInternal.h \
|
---|
319 | $(PATH_ROOT)/\
|
---|
320 | $(PATH_ROOT)/include/VBox/vm.h \
|
---|
321 | \
|
---|
322 | $(PATH_ROOT)/include/VBox/sup.h \
|
---|
323 | $(PATH_ROOT)/include/VBox/VBoxHDD.h \
|
---|
324 | $(PATH_ROOT)/include/VBox/types.h \
|
---|
325 | $(PATH_ROOT)/include/VBox/err.h \
|
---|
326 | $(PATH_ROOT)/include/VBox/x86.h \
|
---|
327 | $(PATH_ROOT)/include/VBox/cpumdis.h \
|
---|
328 | $(PATH_ROOT)/include/VBox/dbggui.h \
|
---|
329 | $(PATH_ROOT)/include/VBox/dis.h \
|
---|
330 | $(PATH_ROOT)/include/VBox/disopcode.h \
|
---|
331 | $(PATH_ROOT)/include/VBox/intnet.h \
|
---|
332 | $(PATH_ROOT)/include/VBox/settings.h \
|
---|
333 | $(PATH_ROOT)/include/VBox/pci.h \
|
---|
334 | $(PATH_ROOT)/include/VBox/scsi.h \
|
---|
335 | $(PATH_ROOT)/include/VBox/shflsvc.h \
|
---|
336 | $(PATH_ROOT)/include/VBox/hgcmsvc.h \
|
---|
337 | $(PATH_ROOT)/include/VBox/usb.h \
|
---|
338 | $(PATH_ROOT)/include/VBox/vusb.h \
|
---|
339 | $(PATH_ROOT)/\
|
---|
340 | $(PATH_ROOT)/include/VBox/log.h \
|
---|
341 | $(PATH_ROOT)/include/VBox/param.h \
|
---|
342 | $(PATH_ROOT)/include/VBox/version.h
|
---|
343 |
|
---|
344 | DOXYGEN_INPUT := \
|
---|
345 | $(filter-out %.cpp.h, $(sort $(wildcard $(addsuffix /*.h, $(DOXYGEN_INPUT_DIRS)))) ) \
|
---|
346 | $(foreach dir, $(DOXYGEN_INPUT_DIRS), $(wildcard $(dir)/*.cpp $(dir)/.c $(dir)/.asm))
|
---|
347 | DOXYGEN_INPUT := \
|
---|
348 | $(DOXYGEN_INPUT_FIRST) \
|
---|
349 | $(filter-out $(DOXYGEN_INPUT_FIRST), $(DOXYGEN_INPUT))
|
---|
350 |
|
---|
351 | # And some some additional stuff.
|
---|
352 | DOXYGEN_INPUT += \
|
---|
353 | $(PATH_ROOT)/src/recompiler/VBoxRecompiler.c \
|
---|
354 | $(PATH_ROOT)/src/recompiler/VBoxREMWrapper.cpp
|
---|
355 |
|
---|
356 |
|
---|
357 | DOXYGEN_OUTPUT = $(PATH_OUT)/docs/Core
|
---|
358 |
|
---|
359 | -include $(PATH_TARGET)/Doxyfile.dep
|
---|
360 |
|
---|
361 | # Generate the Doxyfile
|
---|
362 | $(PATH_TARGET)/Doxyfile: Doxyfile.Core \
|
---|
363 | $(comp-vars DOXYGEN_INPUT,DOXYGEN_INPUT_PREV,FORCE) \
|
---|
364 | $(comp-vars DOXYGEN_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE) \
|
---|
365 | | $(call DIRDEP, $(PATH_TARGET))
|
---|
366 | $(RM) -f $@ [email protected] $(PATH_TARGET)/Doxyfile.dep
|
---|
367 | $(CP) -f Doxyfile.Core [email protected]
|
---|
368 | $(APPEND) [email protected]
|
---|
369 | $(APPEND) [email protected] "OUTPUT_DIRECTORY = $(DOXYGEN_OUTPUT)"
|
---|
370 | $(APPEND) [email protected] "WARN_LOGFILE = $(DOXYGEN_OUTPUT)/errors"
|
---|
371 | $(APPEND) [email protected] "INCLUDE_PATH = $(PATH_ROOT)/include $(PATH_ROOT)/src/VBox/VMM $(PATH_ROOT)/src/VBox/Main/include "
|
---|
372 | $(APPEND) [email protected] "INCLUDE_FILE_PATTERNS = *.cpp.h"
|
---|
373 | $(APPEND) [email protected]
|
---|
374 | $(APPEND) [email protected] "INPUT = $(DOXYGEN_INPUT)"
|
---|
375 | $(APPEND) [email protected]
|
---|
376 | $(APPEND) [email protected] "PREDEFINED += $(DEFS) $(DEFS.$(BUILD_TARGET)) $(DEFS.$(BUILD_TARGET_ARCH)) $(ARCH_BITS_DEFS)"
|
---|
377 | $(APPEND) [email protected] "PREDEFINED += ARCH_BITS=HC_ARCH_BITS R3_ARCH_BITS=HC_ARCH_BITS R0_ARCH_BITS=HC_ARCH_BITS "
|
---|
378 | $(APPEND) [email protected]
|
---|
379 | $(MV) -f [email protected] $@
|
---|
380 | @$(APPEND) $(PATH_TARGET)/Doxyfile.dep "DOXYGEN_OUTPUT_PREV = $(DOXYGEN_OUTPUT)"
|
---|
381 | @$(APPEND) $(PATH_TARGET)/Doxyfile.dep "DOXYGEN_INPUT_PREV = $(DOXYGEN_INPUT)"
|
---|
382 |
|
---|
383 | # Create the output directory.
|
---|
384 | $(call DIRDEP, $(DOXYGEN_OUTPUT)):
|
---|
385 | $(MKDIR) -p $@
|
---|
386 |
|
---|
387 | # Do the actual job.
|
---|
388 | $(PATH_TARGET)/docs.Core: $(PATH_TARGET)/Doxyfile $(DOXYGEN_INPUT) | $(call DIRDEP, $(DOXYGEN_OUTPUT))
|
---|
389 | $(RM) -f $(wildcard $(DOXYGEN_OUTPUT)/html/*) $(PATH_TARGET)/docs.Core
|
---|
390 | doxygen $(PATH_TARGET)/Doxyfile
|
---|
391 | $(APPEND) $(PATH_TARGET)/docs.Core
|
---|
392 |
|
---|
393 |
|
---|
394 | #
|
---|
395 | # Generate x86.mac and err.mac.
|
---|
396 | #
|
---|
397 | incs:
|
---|
398 | $(SED) -f include/VBox/err.sed include/VBox/err.h > include/VBox/err.mac
|
---|
399 | echo '%include "iprt/err.mac"' >> include/VBox/err.mac
|
---|
400 | $(SED) -f include/VBox/err.sed include/iprt/err.h > include/iprt/err.mac
|
---|
401 | $(SED) -e '/__VBox_x86_h__/d' -e '/#define/!d' -e 's/#define/%define/' include/VBox/x86.h > include/VBox/x86.mac
|
---|
402 |
|
---|
403 |
|
---|
404 | #
|
---|
405 | # Generate Visual SlickEdit tagging #defines.
|
---|
406 | #
|
---|
407 | vslick.h: include/VBox/cdefs.h Makefile
|
---|
408 | echo '// autogenerated' > [email protected]
|
---|
409 | #echo '#define __BEGIN_DECLS ' >> [email protected]
|
---|
410 | #echo '#define __END_DECLS ' >> [email protected]
|
---|
411 |
|
---|
412 | echo '#define ATL_NO_VTABLE ' >> [email protected]
|
---|
413 | echo '#define BEGIN_COM_MAP(a) ' >> [email protected]
|
---|
414 | echo '#define END_COM_MAP(a) ' >> [email protected]
|
---|
415 |
|
---|
416 | echo '#define CHECKREADY if(!isReady()) return E_UNEXPECTED; ' >> [email protected]
|
---|
417 | echo '#define COM_DECL_READONLY_ENUM_AND_COLLECTION(a) ' >> [email protected]
|
---|
418 | echo '#define COM_INTERFACE_ENTRY(a) ' >> [email protected]
|
---|
419 | echo '#define COMGETTER(n) Get##n ' >> [email protected]
|
---|
420 | echo '#define COMSETTER(n) Set##n ' >> [email protected]
|
---|
421 | echo '#define DECLARE_NOT_AGGREGATABLE(a) ' >> [email protected]
|
---|
422 | echo '#define DECLARE_PROTECT_FINAL_CONSTRUCT(a) ' >> [email protected]
|
---|
423 | echo '#define NS_DECL_ISUPPORTS ' >> [email protected]
|
---|
424 | echo '#define NS_IMETHOD NS_IMETHOD_(nsresult) ' >> [email protected]
|
---|
425 | echo '#define NS_IMETHOD_(type) type ' >> [email protected]
|
---|
426 | echo '#define PARSERS_EXPORT ' >> [email protected]
|
---|
427 | echo '#define SAX_EXPORT ' >> [email protected]
|
---|
428 | echo '#define STDMETHOD(a) NS_IMETHOD a ' >> [email protected]
|
---|
429 | echo '#define XERCES_CPP_NAMESPACE_BEGIN ' >> [email protected]
|
---|
430 | echo '#define XERCES_CPP_NAMESPACE_END ' >> [email protected]
|
---|
431 |
|
---|
432 | echo '#define CTXAllSUFF(var) var##R3 ' >> [email protected]
|
---|
433 | echo '#define CTXSUFF(var) var##HC ' >> [email protected]
|
---|
434 | echo '#define OTHERCTXSUFF(var) var##GC ' >> [email protected]
|
---|
435 | echo '#define CTXALLMID(first, last) first##R3##last ' >> [email protected]
|
---|
436 | echo '#define CTXMID(first, last) first##HC##last ' >> [email protected]
|
---|
437 | echo '#define OTHERCTXMID(first, last) first##GC##last ' >> [email protected]
|
---|
438 | echo '#define CTXTYPE(GCType, R3Type, R0Type) R3Type ' >> [email protected]
|
---|
439 | echo '#define GCPTRTYPE(GCType) GCType ' >> [email protected]
|
---|
440 | echo '#define GCTYPE(GCType, HCType) GCType ' >> [email protected]
|
---|
441 | echo '#define HCPTRTYPE(HCType) HCType ' >> [email protected]
|
---|
442 | echo '#define R0PTRTYPE(R3Type) R3Type ' >> [email protected]
|
---|
443 | echo '#define R3PTRTYPE(R0Type) R0Type ' >> [email protected]
|
---|
444 | echo '#define RT_SRC_POS __FILE__, __LINE__, __PRETTY_FUNCTION__ ' >> [email protected]
|
---|
445 | echo '#define RT_SRC_POS_DECL const char *pszFile, unsigned iLine, const char *pszFunction ' >> [email protected]
|
---|
446 | echo '#define RT_SRC_POS_ARGS pszFile, iLine, pszFunction ' >> [email protected]
|
---|
447 | echo '#define RTCALL' >> [email protected]
|
---|
448 | echo '#define DECLINLINE(type) inline type ' >> [email protected]
|
---|
449 |
|
---|
450 | echo '#define PDM_SRC_POS __FILE__, __LINE__, __PRETTY_FUNCTION__ ' >> [email protected]
|
---|
451 | echo '#define PDM_SRC_POS_DECL const char *pszFile, unsigned iLine, const char *pszFunction ' >> [email protected]
|
---|
452 | echo '#define PDM_SRC_POS_ARGS pszFile, iLine, pszFunction ' >> [email protected]
|
---|
453 | echo '#define PDMDEVINSINT_DECLARED 1' >> [email protected]
|
---|
454 | echo '#define VBOXCALL' >> [email protected]
|
---|
455 |
|
---|
456 | $(SED) -e '/__cdecl/d' \
|
---|
457 | -e '/^ *# *define.*DECL/!d' \
|
---|
458 | -e '/DECLS/d' \
|
---|
459 | -e '/_SRC_POS_DECL/d' \
|
---|
460 | -e '/declspec/d' \
|
---|
461 | -e 's/# */#/g' \
|
---|
462 | -e 's/ */ /g' \
|
---|
463 | -e '/(type) DECLEXPORT/d' \
|
---|
464 | -e 's/ *VBOXCALL//' \
|
---|
465 | -e 's/ *RTCALL//' \
|
---|
466 | -e 's/(type) DECLIMPORT(type)/(type) type/' \
|
---|
467 | -e '/ DECLASM(type) type/d' \
|
---|
468 | -e '/define *DECL..CALLBACKMEMBER(type[^)]*) *RT/d' \
|
---|
469 | -e '/define *DECLINLINE(type)/d' \
|
---|
470 | \
|
---|
471 | include/iprt/cdefs.h \
|
---|
472 | include/VBox/cdefs.h \
|
---|
473 | >> [email protected]
|
---|
474 | sort [email protected] | sort | sed -e 's/$$/\n/' > [email protected]
|
---|
475 | $(MV) -f [email protected] $@
|
---|
476 | $(RM) -f [email protected] [email protected] [email protected]
|
---|
477 |
|
---|
478 |
|
---|
479 | ## add tools fetching to the 'up' / 'update' target.
|
---|
480 | up update::
|
---|
481 | # this doesn't work of course if kmk is updated: svn$(HOSTSUFF_EXE) up $(PATH_KBUILD)
|
---|
482 | ifndef VBOX_OSE
|
---|
483 | $(MAKE) -C tools fetch
|
---|
484 | else
|
---|
485 | $(MAKE) -C tools -f Makefile-ose.kmk fetch
|
---|
486 | endif
|
---|
487 |
|
---|
488 | up2 update2::
|
---|
489 | $(SVN) up src/lib/kStuff
|
---|
490 | if1of ($(BUILD_PLATFORM),win os2)
|
---|
491 | $(ECHO) This may fail if kmk.exe is updated.
|
---|
492 | endif
|
---|
493 | $(SVN) up kBuild
|
---|
494 |
|
---|
495 | #
|
---|
496 | # Build the additions, all of them.
|
---|
497 | #
|
---|
498 | # This is currently tailored (hardcoded) for the additions
|
---|
499 | # build box. Can make it pretty and configurable later.
|
---|
500 | #
|
---|
501 | # The fetching must be done in serial fashion, while the building
|
---|
502 | # should be more flexible wrt to -jN.
|
---|
503 | #
|
---|
504 | additions-fetch:
|
---|
505 | + $(KMK) -C tools fetch
|
---|
506 | + $(KMK) -C tools fetch BUILD_TARGET_ARCH=x86 BUILD_TARGET=linux
|
---|
507 | # + $(KMK) -C tools fetch BUILD_TARGET_ARCH=x86 BUILD_TARGET=os2
|
---|
508 | + $(KMK) -C tools fetch BUILD_TARGET_ARCH=x86 BUILD_TARGET=solaris
|
---|
509 | + $(KMK) -C tools fetch BUILD_TARGET_ARCH=x86 BUILD_TARGET=win
|
---|
510 |
|
---|
511 |
|
---|
512 | additions-build: \
|
---|
513 | additions-build-win.x86 \
|
---|
514 | additions-build-solaris.x86 \
|
---|
515 | additions-build-os2.x86 \
|
---|
516 | additions-build-linux.x86
|
---|
517 |
|
---|
518 | VBOX_ADDITIONS_BUILD = VBOX_ONLY_ADDITIONS=1 VBOX_WITHOUT_ADDITIONS_ISO=1 BUILD_TYPE=$(BUILD_TYPE) all packing
|
---|
519 |
|
---|
520 | additions-build-win.x86:
|
---|
521 | ifeq ($(BUILD_TARGET),win)
|
---|
522 | + $(KMK) BUILD_TARGET_ARCH=x86 VBOX_ADDITIONS_WIN32_ONLY=1 $(VBOX_ADDITIONS_BUILD)
|
---|
523 | else
|
---|
524 | ssh [email protected] " cd c:/vbox/add && ./tools/env.sh --no-wine kmk BUILD_TARGET_ARCH=x86 VBOX_ADDITIONS_WIN32_ONLY=1 $(VBOX_ADDITIONS_BUILD) "
|
---|
525 | endif
|
---|
526 |
|
---|
527 | additions-build-solaris.x86:
|
---|
528 | #ifeq ($(BUILD_TARGET),solaris)
|
---|
529 | # + $(KMK) BUILD_TARGET_ARCH=x86 $(VBOX_ADDITIONS_BUILD)
|
---|
530 | #else
|
---|
531 | # ssh [email protected] " cd /mnt/vbox/add && ./tools/env.sh --no-wine kmk BUILD_TARGET_ARCH=x86 $(VBOX_ADDITIONS_BUILD) "
|
---|
532 | #endif
|
---|
533 |
|
---|
534 | additions-build-os2.x86:
|
---|
535 | #ifeq ($(BUILD_TARGET),os2)
|
---|
536 | # + $(KMK) BUILD_TARGET_ARCH=x86
|
---|
537 | #else
|
---|
538 | # ssh [email protected] " cd /mnt/vbox/add && ./tools/env.sh --no-wine kmk BUILD_TARGET_ARCH=x86 $(VBOX_ADDITIONS_BUILD) "
|
---|
539 | #endif
|
---|
540 |
|
---|
541 | additions-build-linux.x86:
|
---|
542 | ifeq ($(BUILD_TARGET),linux)
|
---|
543 | + $(KMK) BUILD_TARGET_ARCH=x86 VBOX_ADDITIONS_LINUX_ONLY=1 $(VBOX_ADDITIONS_BUILD)
|
---|
544 | else
|
---|
545 | ssh [email protected] " cd /mnt/vbox/add && ./tools/env.sh --no-wine kmk BUILD_TARGET_ARCH=x86 VBOX_ADDITIONS_LINUX_ONLY=1 $(VBOX_ADDITIONS_BUILD) "
|
---|
546 | endif
|
---|
547 |
|
---|
548 |
|
---|
549 | additions-packing:
|
---|
550 | + $(KMK) VBOX_ONLY_ADDITIONS=1 \
|
---|
551 | VBOX_WITH_ADDITIONS_ISO.win.x86=1 \
|
---|
552 | VBOX_WITH_ADDITIONS_ISO.linux.x86=1 \
|
---|
553 | -C src/VBox/Additions \
|
---|
554 | $(VBOX_PATH_ADDITIONS)/VBoxGuestAdditions.iso
|
---|
555 |
|
---|
556 |
|
---|
557 | #
|
---|
558 | # Generate VirtualBox-OSE-x.x.x.tar.bz2 tarballs for distribution
|
---|
559 | #
|
---|
560 | # - includes kBuild
|
---|
561 | # - must be executed on an OSE checkout
|
---|
562 | #
|
---|
563 |
|
---|
564 | # the path where to store the tarball
|
---|
565 | TARBALLPATH ?= $(shell cd $(PATH_ROOT)/..; pwd)
|
---|
566 | #TARBALLPATH ?= $(abspath $(PATH_ROOT)/..) - this should also do the trick without spawning a shell.
|
---|
567 | # the root directory inside the tarball
|
---|
568 | TARBALLROOT ?= VirtualBox-$(VBOX_VERSION_STRING)
|
---|
569 | # the name of the tarball file
|
---|
570 | TARBALLNAME ?= VirtualBox-$(VBOX_VERSION_STRING).tar.bz2
|
---|
571 | snapshot:
|
---|
572 | @$(call MSG_L1,Creating tarball $(TARBALLPATH)/$(TARBALLNAME))
|
---|
573 | @if [ -d "$(PATH_ROOT)/src/VBox/Devices/USB" ]; then echo; echo "Found USB stuff, refused to build OSE tarball!"; echo; exit 1; fi
|
---|
574 | $(QUIET)$(MKDIR) -p $(TARBALLPATH)
|
---|
575 | $(QUIET)$(RM) -f $(wildcard $(TARBALLPATH)/VirtualBox*)
|
---|
576 | $(QUIET)$(LN_SYMLINK) $(PATH_ROOT) $(TARBALLPATH)/$(TARBALLROOT)
|
---|
577 | $(QUIET)tar -cjh --owner 0 --group 0 --totals \
|
---|
578 | --exclude=.svn \
|
---|
579 | --exclude=$(TARBALLROOT)/out \
|
---|
580 | --exclude=$(TARBALLROOT)/env.sh \
|
---|
581 | --exclude=$(TARBALLROOT)/configure.log \
|
---|
582 | --exclude=$(TARBALLROOT)/AutoConfig.kmk \
|
---|
583 | --exclude=$(TARBALLROOT)/LocalConfig.kmk \
|
---|
584 | -C $(TARBALLPATH) \
|
---|
585 | -f $(TARBALLPATH)/$(TARBALLNAME) \
|
---|
586 | $(TARBALLROOT)
|
---|
587 | $(QUIET)$(RM) $(TARBALLPATH)/$(TARBALLROOT)
|
---|